17 Dec, 2009

3 commits

  • * 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6: (38 commits)
    direct I/O fallback sync simplification
    ocfs: stop using do_sync_mapping_range
    cleanup blockdev_direct_IO locking
    make generic_acl slightly more generic
    sanitize xattr handler prototypes
    libfs: move EXPORT_SYMBOL for d_alloc_name
    vfs: force reval of target when following LAST_BIND symlinks (try #7)
    ima: limit imbalance msg
    Untangling ima mess, part 3: kill dead code in ima
    Untangling ima mess, part 2: deal with counters
    Untangling ima mess, part 1: alloc_file()
    O_TRUNC open shouldn't fail after file truncation
    ima: call ima_inode_free ima_inode_free
    IMA: clean up the IMA counts updating code
    ima: only insert at inode creation time
    ima: valid return code from ima_inode_alloc
    fs: move get_empty_filp() deffinition to internal.h
    Sanitize exec_permission_lite()
    Kill cached_lookup() and real_lookup()
    Kill path_lookup_open()
    ...

    Trivial conflicts in fs/direct-io.c

    Linus Torvalds
     
  • * git://git.infradead.org/mtd-2.6: (90 commits)
    jffs2: Fix long-standing bug with symlink garbage collection.
    mtd: OneNAND: Fix test of unsigned in onenand_otp_walk()
    mtd: cfi_cmdset_0002, fix lock imbalance
    Revert "mtd: move mxcnd_remove to .exit.text"
    mtd: m25p80: add support for Macronix MX25L4005A
    kmsg_dump: fix build for CONFIG_PRINTK=n
    mtd: nandsim: add support for 4KiB pages
    mtd: mtdoops: refactor as a kmsg_dumper
    mtd: mtdoops: make record size configurable
    mtd: mtdoops: limit the maximum mtd partition size
    mtd: mtdoops: keep track of used/unused pages in an array
    mtd: mtdoops: several minor cleanups
    core: Add kernel message dumper to call on oopses and panics
    mtd: add ARM pismo support
    mtd: pxa3xx_nand: Fix PIO data transfer
    mtd: nand: fix multi-chip suspend problem
    mtd: add support for switching old SST chips into QRY mode
    mtd: fix M29W800D dev_id and uaddr
    mtd: don't use PF_MEMALLOC
    mtd: Add bad block table overrides to Davinci NAND driver
    ...

    Fixed up conflicts (mostly trivial) in
    drivers/mtd/devices/m25p80.c
    drivers/mtd/maps/pcmciamtd.c
    drivers/mtd/nand/pxa3xx_nand.c
    kernel/printk.c

    Linus Torvalds
     
  • Add a flags argument to struct xattr_handler and pass it to all xattr
    handler methods. This allows using the same methods for multiple
    handlers, e.g. for the ACL methods which perform exactly the same action
    for the access and default ACLs, just using a different underlying
    attribute. With a little more groundwork it'll also allow sharing the
    methods for the regular user/trusted/secure handlers in extN, ocfs2 and
    jffs2 like it's already done for xfs in this patch.

    Also change the inode argument to the handlers to a dentry to allow
    using the handlers mechnism for filesystems that require it later,
    e.g. cifs.

    [with GFS2 bits updated by Steven Whitehouse ]

    Signed-off-by: Christoph Hellwig
    Reviewed-by: James Morris
    Acked-by: Joel Becker
    Signed-off-by: Al Viro

    Christoph Hellwig
     

16 Dec, 2009

1 commit

  • Ever since jffs2_garbage_collect_metadata() was first half-written in
    February 2001, it's been broken on architectures where 'char' is signed.
    When garbage collecting a symlink with target length above 127, the payload
    length would end up negative, causing interesting and bad things to happen.

    Cc: stable@kernel.org
    Signed-off-by: David Woodhouse

    David Woodhouse
     

08 Dec, 2009

1 commit


04 Dec, 2009

1 commit

  • That is "success", "unknown", "through", "performance", "[re|un]mapping"
    , "access", "default", "reasonable", "[con]currently", "temperature"
    , "channel", "[un]used", "application", "example","hierarchy", "therefore"
    , "[over|under]flow", "contiguous", "threshold", "enough" and others.

    Signed-off-by: André Goddard Rosa
    Signed-off-by: Jiri Kosina

    André Goddard Rosa
     

01 Dec, 2009

1 commit

  • In 2.6.23 kernel, commit a32ea1e1f925399e0d81ca3f7394a44a6dafa12c
    ("Fix read/truncate race") fixed a race in the generic code, and as a
    side effect, now do_generic_file_read() can ask us to readpage() past
    the i_size. This seems to be correctly handled by the block routines
    (e.g. block_read_full_page() fills the page with zeroes in case if
    somebody is trying to read past the last inode's block).

    JFFS2 doesn't handle this; it assumes that it won't be asked to read
    pages which don't exist -- and thus that there will be at least _one_
    valid 'frag' on the page it's being asked to read. It will fill any
    holes with the following memset:

    memset(buf, 0, min(end, frag->ofs + frag->size) - offset);

    When the 'closest smaller match' returned by jffs2_lookup_node_frag() is
    actually on a previous page and ends before 'offset', that results in:

    memset(buf, 0, );

    Hopefully, in most cases the corruption is fatal, and quickly causing
    random oopses, like this:

    root@10.0.0.4:~/ltp-fs-20090531# ./testcases/kernel/fs/ftest/ftest01
    Unable to handle kernel paging request for data at address 0x00000008
    Faulting instruction address: 0xc01cd980
    Oops: Kernel access of bad area, sig: 11 [#1]
    [...]
    NIP [c01cd980] rb_insert_color+0x38/0x184
    LR [c0043978] enqueue_hrtimer+0x88/0xc4
    Call Trace:
    [c6c63b60] [c004f9a8] tick_sched_timer+0xa0/0xe4 (unreliable)
    [c6c63b80] [c0043978] enqueue_hrtimer+0x88/0xc4
    [c6c63b90] [c0043a48] __run_hrtimer+0x94/0xbc
    [c6c63bb0] [c0044628] hrtimer_interrupt+0x140/0x2b8
    [c6c63c10] [c000f8e8] timer_interrupt+0x13c/0x254
    [c6c63c30] [c001352c] ret_from_except+0x0/0x14
    --- Exception: 901 at memset+0x38/0x5c
    LR = jffs2_read_inode_range+0x144/0x17c
    [c6c63cf0] [00000000] (null) (unreliable)

    This patch fixes the issue, plus fixes all LTP tests on NAND/UBI with
    JFFS2 filesystem that were failing since 2.6.23 (seems like the bug
    above also broke the truncation).

    Reported-By: Anton Vorontsov
    Tested-By: Anton Vorontsov
    Signed-off-by: David Woodhouse
    Cc: stable@kernel.org
    Signed-off-by: Linus Torvalds

    David Woodhouse
     

30 Nov, 2009

2 commits


24 Sep, 2009

1 commit

  • * git://git.infradead.org/mtd-2.6: (58 commits)
    mtd: jedec_probe: add PSD4256G6V id
    mtd: OneNand support for Nomadik 8815 SoC (on NHK8815 board)
    mtd: nand: driver for Nomadik 8815 SoC (on NHK8815 board)
    m25p80: Add Spansion S25FL129P serial flashes
    jffs2: Use SLAB_HWCACHE_ALIGN for jffs2_raw_{dirent,inode} slabs
    mtd: sh_flctl: register sh_flctl using platform_driver_probe()
    mtd: nand: txx9ndfmc: transfer 512 byte at a time if possible
    mtd: nand: fix tmio_nand ecc correction
    mtd: nand: add __nand_correct_data helper function
    mtd: cfi_cmdset_0002: add 0xFF intolerance for M29W128G
    mtd: inftl: fix fold chain block number
    mtd: jedec: fix compilation problem with I28F640C3B definition
    mtd: nand: fix ECC Correction bug for SMC ordering for NDFC driver
    mtd: ofpart: Check availability of reg property instead of name property
    driver/Makefile: Initialize "mtd" and "spi" before "net"
    mtd: omap: adding DMA mode support in nand prefetch/post-write
    mtd: omap: add support for nand prefetch-read and post-write
    mtd: add nand support for w90p910 (v2)
    mtd: maps: add mtd-ram support to physmap_of
    mtd: pxa3xx_nand: add single-bit error corrections reporting
    ...

    Linus Torvalds
     

22 Sep, 2009

1 commit


20 Sep, 2009

2 commits


09 Sep, 2009

1 commit


04 Sep, 2009

1 commit


03 Sep, 2009

1 commit

  • The function jffs2_nor_wbuf_flash_setup() doesn't allocate the verify buffer
    if CONFIG_JFFS2_FS_WBUF_VERIFY is defined, so causing a kernel panic when
    that macro is enabled and the verify function is called. Similarly the
    jffs2_nor_wbuf_flash_cleanup() must free the buffer if
    CONFIG_JFFS2_FS_WBUF_VERIFY is enabled.
    The following patch fixes the problem.
    The following patch applies to 2.6.30 kernel.

    Signed-off-by: Massimo Cirillo
    Signed-off-by: Artem Bityutskiy
    Signed-off-by: David Woodhouse
    Cc: stable@kernel.org

    Massimo Cirillo
     

04 Aug, 2009

1 commit

  • This fixes "kernel BUG at fs/jffs2/file.c:251!".
    This pseudocode hopefully illustrates the scenario that triggers it:

    jffs2_write_begin {
    jffs2_do_readpage_nolock {
    jffs2_read_inode_range {
    jffs2_read_dnode {
    Data CRC 33c102e9 != calculated CRC 0ef77e7b for node at 005d42e4
    return -EIO;
    }
    }
    ClearPageUptodate(pg);
    return 0;
    }
    }

    jffs2_write_end {
    BUG_ON(!PageUptodate(pg));
    }

    Signed-off-by: Anders Grafström
    Signed-off-by: David Woodhouse

    Anders Grafström
     

13 Jul, 2009

1 commit

  • * Remove smp_lock.h from files which don't need it (including some headers!)
    * Add smp_lock.h to files which do need it
    * Make smp_lock.h include conditional in hardirq.h
    It's needed only for one kernel_locked() usage which is under CONFIG_PREEMPT

    This will make hardirq.h inclusion cheaper for every PREEMPT=n config
    (which includes allmodconfig/allyesconfig, BTW)

    Signed-off-by: Alexey Dobriyan
    Signed-off-by: Linus Torvalds

    Alexey Dobriyan
     

09 Jul, 2009

1 commit

  • Commit 5fd29d6ccbc98884569d6f3105aeca70858b3e0f ("printk: clean up
    handling of log-levels and newlines") changed printk semantics. printk
    lines with multiple KERN_ prefixes are no longer emitted as
    before the patch.

    is now included in the output on each additional use.

    Remove all uses of multiple KERN_s in formats.

    Signed-off-by: Joe Perches
    Signed-off-by: Linus Torvalds

    Joe Perches
     

02 Jul, 2009

1 commit

  • * git://git.infradead.org/mtd-2.6:
    mtd: nand: fix build failure and incorrect return from omap_wait()
    mtd: Use BLOCK_NIL consistently in NFTL/INFTL
    mtd: m25p80 timeout too short for worst-case m25p16 devices
    mtd: atmel_nand: Fix typo s/parititions/partitions/
    mtd: cmdlineparts: Use 64-bit format when printing a debug message.
    mtd: maps: Remove BUS_ID_SIZE from integrator_flash
    jffs2: fix another potential leak on error path in scan.c

    Linus Torvalds
     

25 Jun, 2009

1 commit


24 Jun, 2009

2 commits


23 Jun, 2009

2 commits

  • Signed-off-by: David Woodhouse

    David Woodhouse
     
  • * git://git.infradead.org/mtd-2.6: (63 commits)
    mtd: OneNAND: Allow setting of boundary information when built as module
    jffs2: leaking jffs2_summary in function jffs2_scan_medium
    mtd: nand: Fix memory leak on txx9ndfmc probe failure.
    mtd: orion_nand: use burst reads with double word accesses
    mtd/nand: s3c6400 support for s3c2410 driver
    [MTD] [NAND] S3C2410: Use DIV_ROUND_UP
    [MTD] [NAND] S3C2410: Deal with unaligned lengths in S3C2440 buffer read/write
    [MTD] [NAND] S3C2410: Allow the machine code to get the BBT table from NAND
    [MTD] [NAND] S3C2410: Added a kerneldoc for s3c2410_nand_set
    mtd: physmap_of: Add multiple regions and concatenation support
    mtd: nand: max_retries off by one in mxc_nand
    mtd: nand: s3c2410_nand_setrate(): use correct macros for 2412/2440
    mtd: onenand: add bbt_wait & unlock_all as replaceable for some platform
    mtd: Flex-OneNAND support
    mtd: nand: add OMAP2/OMAP3 NAND driver
    mtd: maps: Blackfin async: fix memory leaks in probe/remove funcs
    mtd: uclinux: mark local stuff static
    mtd: uclinux: do not allow to be built as a module
    mtd: uclinux: allow systems to override map addr/size
    mtd: blackfin NFC: fix hang when using NAND on BF527-EZKITs
    ...

    Linus Torvalds
     

15 Jun, 2009

1 commit


12 Jun, 2009

6 commits

  • The call to ->write_super from __sync_filesystem will go away, so make
    sure jffs2 performs the same actions from inside ->sync_fs.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Al Viro

    Christoph Hellwig
     
  • [xfs, btrfs, capifs, shmem don't need BKL, exempt]

    Signed-off-by: Alessio Igor Bogani
    Signed-off-by: Al Viro

    Alessio Igor Bogani
     
  • Push down lock_super into ->write_super instances and remove it from the
    caller.

    Following filesystem don't need ->s_lock in ->write_super and are skipped:

    * bfs, nilfs2 - no other uses of s_lock and have internal locks in
    ->write_super
    * ext2 - uses BKL in ext2_write_super and has internal calls without s_lock
    * reiserfs - no other uses of s_lock as has reiserfs_write_lock (BKL) in
    ->write_super
    * xfs - no other uses of s_lock and uses internal lock (buffer lock on
    superblock buffer) to serialize ->write_super. Also xfs_fs_write_super
    is superflous and will go away in the next merge window

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Al Viro

    Christoph Hellwig
     
  • jffs2_write_super is only called from super.c and doesn't use any
    functionality from fs.c. So move it over to super.c and make it
    static there.

    [should go in through the vfs tree as it is a requirement for the
    next patch]

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Al Viro

    Christoph Hellwig
     
  • Move BKL into ->put_super from the only caller. A couple of
    filesystems had trivial enough ->put_super (only kfree and NULLing of
    s_fs_info + stuff in there) to not get any locking: coda, cramfs, efs,
    hugetlbfs, omfs, qnx4, shmem, all others got the full treatment. Most
    of them probably don't need it, but I'd rather sort that out individually.
    Preferably after all the other BKL pushdowns in that area.

    [AV: original used to move lock_super() down as well; these changes are
    removed since we don't do lock_super() at all in generic_shutdown_super()
    now]
    [AV: fuse, btrfs and xfs are known to need no damn BKL, exempt]

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Al Viro

    Christoph Hellwig
     
  • We just did a full fs writeout using sync_filesystem before, and if
    that's not enough for the filesystem it can perform it's own writeout
    in ->put_super, which many filesystems already do.

    Move a call to foofs_write_super into every foofs_put_super for now to
    guarantee identical behaviour until it's cleaned up by the individual
    filesystem maintainers.

    Exceptions:

    - affs already has identical copy & pasted code at the beginning of
    affs_put_super so no need to do it twice.
    - xfs does the right thing without it and I have changes pending for
    the xfs tree touching this are so I don't really need conflicts
    here..

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Al Viro

    Christoph Hellwig
     

29 May, 2009

1 commit

  • Erase errors such as:
    "Newly-erased block contained word 0xa4ef223e at offset 0x0296a014"
    and failure to write the clean marker,
    moves the offending erase block to erasing list before calling
    jffs2_erase_failed(). This is bad as jffs2_erase_failed() will
    also move the block to the bad_list, but is now moving the
    wrong block, causing FS corruption.

    Signed-off-by: Joakim Tjernlund
    Signed-off-by: David Woodhouse

    Joakim Tjernlund
     

07 Apr, 2009

1 commit

  • * git://git.infradead.org/mtd-2.6: (53 commits)
    [MTD] struct device - replace bus_id with dev_name(), dev_set_name()
    [MTD] [NOR] Fixup for Numonyx M29W128 chips
    [MTD] mtdpart: Make ecc_stats more realistic.
    powerpc/85xx: TQM8548: Update DTS file for multi-chip support
    powerpc: NAND: FSL UPM: document new bindings
    [MTD] [NAND] FSL-UPM: Add wait flags to support board/chip specific delays
    [MTD] [NAND] FSL-UPM: add multi chip support
    [MTD] [NOR] Add device parent info to physmap_of
    [MTD] [NAND] Add support for NAND on the Socrates board
    [MTD] [NAND] Add support for 4KiB pages.
    [MTD] sysfs support should not depend on CONFIG_PROC_FS
    [MTD] [NAND] Add parent info for CAFÉ controller
    [MTD] support driver model updates
    [MTD] driver model updates (part 2)
    [MTD] driver model updates
    [MTD] [NAND] move gen_nand's probe function to .devinit.text
    [MTD] [MAPS] move sa1100 flash's probe function to .devinit.text
    [MTD] fix use after free in register_mtd_blktrans
    [MTD] [MAPS] Drop now unused sharpsl-flash map
    [MTD] ofpart: Check name property to determine partition nodes.
    ...

    Manually fix trivial conflict in drivers/mtd/maps/Makefile

    Linus Torvalds
     

01 Apr, 2009

1 commit


20 Mar, 2009

2 commits


21 Feb, 2009

1 commit

  • At scan time we observed following scenario:

    node A inserted
    node B inserted
    node C inserted -> sets overlapped flag on node B

    node A is removed due to CRC failure -> overlapped flag on node B remains

    while (tn->overlapped)
    tn = tn_prev(tn);

    ==> crash, when tn_prev(B) is referenced.

    When the ultimate node is removed at scan time and the overlapped flag
    is set on the penultimate node, then nothing updates the overlapped
    flag of that node. The overlapped iterators blindly expect that the
    ultimate node does not have the overlapped flag set, which causes the
    scan code to crash.

    It would be a huge overhead to go through the node chain on node
    removal and fix up the overlapped flags, so detecting such a case on
    the fly in the overlapped iterators is a simpler and reliable
    solution.

    Cc: stable@kernel.org
    Signed-off-by: Thomas Gleixner
    Signed-off-by: David Woodhouse

    Thomas Gleixner
     

14 Feb, 2009

1 commit

  • I've noticed some pretty poor behavior on OLPC machines after bootup, when
    gdm/X are starting. The GCD monopolizes the scheduler (which in turns
    means it gets to do more nand i/o), which results in processes taking much
    much longer than they should to start.

    As an example, on an OLPC machine going from OFW to a usable X (via
    auto-login gdm) takes 2m 30s. The majority of this time is consumed by
    the switch into graphical mode. With this patch, we cut a full 60s off of
    bootup time. After bootup, things are much snappier as well.

    Note that we have seen a CRC node error with this patch that causes the machine
    to fail to boot, but we've also seen that problem without this patch.

    Signed-off-by: Andres Salomon
    Signed-off-by: Andrew Morton
    Signed-off-by: David Woodhouse

    Andres Salomon
     

10 Jan, 2009

1 commit

  • 'rb_prev()', 'rb_next()' and 'rb_replace_node()' are declared in
    include/linux/rbtree.h, no need for JFFS2 to re-declare them. I
    believe these are left-overs from the old days when the common
    RB tree code did not have those call and JFFS2 had private
    implementation.

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

    Artem Bityutskiy