08 May, 2012

1 commit

  • I'm seeing an oops in mtd_dataflash.c with Linux 3.3. What appears to
    be happening is that otp_select_filemode calls mtd_read_fact_prot_reg
    with -1 for offset and length and a NULL buffer to test if OTP
    operations are supported. This finds its way down to otp_read in
    mtd_dataflash.c and causes an oops when memcpying the returned data
    into the NULL buf.

    None of the checks in otp_read catches the negative length and offset.
    Changing the length of the dummy read to 0 prevents the oops.

    Cc: stable@kernel.org [3.3+]
    Signed-off-by: Artem Bityutskiy
    Signed-off-by: David Woodhouse

    Will Newton
     

09 Apr, 2012

1 commit


01 Apr, 2012

2 commits

  • Pull second try at vfs part d#2 from Al Viro:
    "Miklos' first series (with do_lookup() rewrite split into edible
    chunks) + assorted bits and pieces.

    The 'untangling of do_lookup()' series is is a splitup of what used to
    be a monolithic patch from Miklos, so this series is basically "how do
    I convince myself that his patch is correct (or find a hole in it)".
    No holes found and I like the resulting cleanup, so in it went..."

    Changes from try 1: Fix a boot problem with selinux, and commit messages
    prettied up a bit.

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (24 commits)
    vfs: fix out-of-date dentry_unhash() comment
    vfs: split __lookup_hash
    untangling do_lookup() - take __lookup_hash()-calling case out of line.
    untangling do_lookup() - switch to calling __lookup_hash()
    untangling do_lookup() - merge d_alloc_and_lookup() callers
    untangling do_lookup() - merge failure exits in !dentry case
    untangling do_lookup() - massage !dentry case towards __lookup_hash()
    untangling do_lookup() - get rid of need_reval in !dentry case
    untangling do_lookup() - eliminate a loop.
    untangling do_lookup() - expand the area under ->i_mutex
    untangling do_lookup() - isolate !dentry stuff from the rest of it.
    vfs: move MAY_EXEC check from __lookup_hash()
    vfs: don't revalidate just looked up dentry
    vfs: fix d_need_lookup/d_revalidate order in do_lookup
    ext3: move headers to fs/ext3/
    migrate ext2_fs.h guts to fs/ext2/ext2.h
    new helper: ext2_image_size()
    get rid of pointless includes of ext2_fs.h
    ext2: No longer export ext2_fs.h to user space
    mtdchar: kill persistently held vfsmount
    ...

    Linus Torvalds
     
  • ... and mtdchar_notifier along with it; just have ->drop_inode() that
    will unconditionally get evict them instead of dances on mtd device
    removal and use simple_pin_fs() instead of kern_mount()

    Signed-off-by: Al Viro

    Al Viro
     

31 Mar, 2012

1 commit

  • Pull MTD changes from David Woodhouse:
    - Artem's cleanup of the MTD API continues apace.
    - Fixes and improvements for ST FSMC and SuperH FLCTL NAND, amongst
    others.
    - More work on DiskOnChip G3, new driver for DiskOnChip G4.
    - Clean up debug/warning printks in JFFS2 to use pr_.

    Fix up various trivial conflicts, largely due to changes in calling
    conventions for things like dmaengine_prep_slave_sg() (new inline
    wrapper to hide new parameter, clashing with rewrite of previously last
    parameter that used to be an 'append' flag, and is now a bitmap of
    'unsigned long flags').

    (Also some header file fallout - like so many merges this merge window -
    and silly conflicts with sparse fixes)

    * tag 'for-linus-3.4' of git://git.infradead.org/mtd-2.6: (120 commits)
    mtd: docg3 add protection against concurrency
    mtd: docg3 refactor cascade floors structure
    mtd: docg3 increase write/erase timeout
    mtd: docg3 fix inbound calculations
    mtd: nand: gpmi: fix function annotations
    mtd: phram: fix section mismatch for phram_setup
    mtd: unify initialization of erase_info->fail_addr
    mtd: support ONFI multi lun NAND
    mtd: sm_ftl: fix typo in major number.
    mtd: add device-tree support to spear_smi
    mtd: spear_smi: Remove default partition information from driver
    mtd: Add device-tree support to fsmc_nand
    mtd: fix section mismatch for doc_probe_device
    mtd: nand/fsmc: Remove sparse warnings and errors
    mtd: nand/fsmc: Add DMA support
    mtd: nand/fsmc: Access the NAND device word by word whenever possible
    mtd: nand/fsmc: Use dev_err to report error scenario
    mtd: nand/fsmc: Use devm routines
    mtd: nand/fsmc: Modify fsmc driver to accept nand timing parameters via platform
    mtd: fsmc_nand: add pm callbacks to support hibernation
    ...

    Linus Torvalds
     

27 Mar, 2012

1 commit

  • This patch renames all MTD functions by adding a "_" prefix:

    mtd->erase -> mtd->_erase
    mtd->read_oob -> mtd->_read_oob
    ...

    The reason is that we are re-working the MTD API and from now on it is
    an error to use MTD function pointers directly - we have a corresponding
    API call for every pointer. By adding a leading "_" we achieve the following:

    1. Make sure we convert every direct pointer users
    2. A leading "_" suggests that this interface is internal and it becomes
    less likely that people will use them directly
    3. Make sure all the out-of-tree modules stop compiling and the owners
    spot the big API change and amend them.

    Signed-off-by: Artem Bityutskiy
    Signed-off-by: David Woodhouse

    Artem Bityutskiy
     

24 Mar, 2012

1 commit


10 Jan, 2012

31 commits


08 Nov, 2011

1 commit

  • * git://git.infradead.org/mtd-2.6: (226 commits)
    mtd: tests: annotate as DANGEROUS in Kconfig
    mtd: tests: don't use mtd0 as a default
    mtd: clean up usage of MTD_DOCPROBE_ADDRESS
    jffs2: add compr=lzo and compr=zlib options
    jffs2: implement mount option parsing and compression overriding
    mtd: nand: initialize ops.mode
    mtd: provide an alias for the redboot module name
    mtd: m25p80: don't probe device which has status of 'disabled'
    mtd: nand_h1900 never worked
    mtd: Add DiskOnChip G3 support
    mtd: m25p80: add EON flash EN25Q32B into spi flash id table
    mtd: mark block device queue as non-rotational
    mtd: r852: make r852_pm_ops static
    mtd: m25p80: add support for at25df321a spi data flash
    mtd: mxc_nand: preset_v1_v2: unlock all NAND flash blocks
    mtd: nand: switch `check_pattern()' to standard `memcmp()'
    mtd: nand: invalidate cache on unaligned reads
    mtd: nand: do not scan bad blocks with NAND_BBT_NO_OOB set
    mtd: nand: wait to set BBT version
    mtd: nand: scrub BBT on ECC errors
    ...

    Fix up trivial conflicts:
    - arch/arm/mach-at91/board-usb-a9260.c
    Merged into board-usb-a926x.c
    - drivers/mtd/maps/lantiq-flash.c
    add_mtd_partitions -> mtd_device_register vs changed to use
    mtd_device_parse_register.

    Linus Torvalds
     

02 Nov, 2011

1 commit