13 Apr, 2010

1 commit

  • Removing sufficiently large files would create aliases for a large
    number of segments. This in turn results in a large number of journal
    entries and an overflow of s_je_array.

    Cheap fix is to add a BUG_ON, turning memory corruption into something
    annoying, but less dangerous. Real fix is to count the number of
    affected segments and prevent the problem completely.

    Signed-off-by: Joern Engel

    Joern Engel
     

31 Mar, 2010

1 commit


30 Mar, 2010

2 commits


29 Mar, 2010

1 commit


28 Mar, 2010

2 commits

  • A comment in the old code read:
    /* The math in this function can surely use some love */

    And indeed it did. In the case that area->a_used_bytes is exactly
    4096 bytes below segment size it fell apart. pad_wbuf is now split
    into two helpers that are significantly less complicated.

    Signed-off-by: Joern Engel

    Joern Engel
     
  • The comment was correct, so make the code match the comment. As the
    new comment indicates, we might be able to do a little less work. But
    for the current -rc series let's keep it simple and just fix the bug.

    Signed-off-by: Joern Engel

    Joern Engel
     

27 Mar, 2010

10 commits


26 Mar, 2010

1 commit


25 Mar, 2010

12 commits

  • * 'bugfixes' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6:
    NFS: don't try to decode GETATTR if DELEGRETURN returned error
    sunrpc: handle allocation errors from __rpc_lookup_create()
    SUNRPC: Fix the return value of rpc_run_bc_task()
    SUNRPC: Fix a use after free bug with the NFSv4.1 backchannel
    SUNRPC: Fix a potential memory leak in auth_gss
    NFS: Prevent another deadlock in nfs_release_page()

    Linus Torvalds
     
  • Sparse complained about this missing spin_unlock()

    Signed-off-by: Dan Carpenter
    Signed-off-by: David Howells
    Signed-off-by: Linus Torvalds

    Dan Carpenter
     
  • do_sync_read/write() should set kiocb.ki_nbytes to be consistent with
    do_sync_readv_writev().

    Signed-off-by: David Howells
    Signed-off-by: Linus Torvalds

    David Howells
     
  • Fix an incorrect for-loop in elf_core_vma_data_size(). The advance-pointer
    statement lacks an assignment:

    CC fs/binfmt_elf_fdpic.o
    fs/binfmt_elf_fdpic.c: In function 'elf_core_vma_data_size':
    fs/binfmt_elf_fdpic.c:1593: warning: statement with no effect

    Signed-off-by: David Howells
    Signed-off-by: Linus Torvalds

    David Howells
     
  • Smaller size than a minimum blocksize can't be used, after all it's
    handled like 0 size.

    For extended partition itself, this makes sure to use bigger size than one
    logical sector size at least.

    Signed-off-by: OGAWA Hirofumi
    Cc: Daniel Taylor
    Cc: "H. Peter Anvin"
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    OGAWA Hirofumi
     
  • In order to use disks larger than 2TiB on Windows XP, it is necessary to
    use 4096-byte logical sectors in an MBR.

    Although the kernel storage and functions called from msdos.c used
    "sector_t" internally, msdos.c still used u32 variables, which results in
    the ability to handle XP-compatible large disks.

    This patch changes the internal variables to "sector_t".

    Daniel said: "In the near future, WD will be releasing products that need
    this patch".

    [hirofumi@mail.parknet.co.jp: tweaks and fix]
    Signed-off-by: Daniel Taylor
    Signed-off-by: OGAWA Hirofumi
    Cc: "H. Peter Anvin"
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Daniel Taylor
     
  • "m" is never NULL here. We need a different test for the end of list
    condition.

    Signed-off-by: Dan Carpenter
    Acked-by: KAMEZAWA Hiroyuki
    Acked-by: WANG Cong
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dan Carpenter
     
  • The reiserfs journal behaves inconsistently when determining whether to
    allow a mount of a read-only device.

    This is due to the use of the continue_replay variable to short circuit
    the journal scanning. If it's set, it's assumed that there are
    transactions to replay, but there may not be. If it's unset, it's assumed
    that there aren't any, and that may not be the case either.

    I've observed two failure cases:
    1) Where a clean file system on a read-only device refuses to mount
    2) Where a clean file system on a read-only device passes the
    optimization and then tries writing the journal header to update
    the latest mount id.

    The former is easily observable by using a freshly created file system on
    a read-only loopback device.

    This patch moves the check into journal_read_transaction, where it can
    bail out before it's about to replay a transaction. That way it can go
    through and skip transactions where appropriate, yet still refuse to mount
    a file system with outstanding transactions.

    Signed-off-by: Jeff Mahoney
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jeff Mahoney
     
  • Commit 57fe60df ("reiserfs: add atomic addition of selinux attributes
    during inode creation") contains a bug that will cause it to oops when
    mounting a file system that didn't previously contain extended attributes
    on a system using security.* xattrs.

    The issue is that while creating the privroot during mount
    reiserfs_security_init calls reiserfs_xattr_jcreate_nblocks which
    dereferences the xattr root. The xattr root doesn't exist, so we get an
    oops.

    Addresses http://bugzilla.kernel.org/show_bug.cgi?id=15309

    Signed-off-by: Jeff Mahoney
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jeff Mahoney
     
  • fs/binfmt_aout.c: In function `aout_core_dump':
    fs/binfmt_aout.c:125: warning: passing argument 2 of `dump_write' makes pointer from integer without a cast
    include/linux/coredump.h:12: note: expected `const void *' but argument is of type `long unsigned int'
    fs/binfmt_aout.c:132: warning: passing argument 2 of `dump_write' makes pointer from integer without a cast
    include/linux/coredump.h:12: note: expected `const void *' but argument is of type `long unsigned int'

    due to dump_write() expecting a user void *. Fold casts into the
    START_DATA/START_STACK macros and shut up the warnings.

    Signed-off-by: Borislav Petkov
    Cc: Daisuke HATAYAMA
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Borislav Petkov
     
  • When ext4 driver is used to mount a filesystem instead of the ext3 file
    system driver (through CONFIG_EXT4_USE_FOR_EXT23), do not enable delayed
    allocation by default since some ext3 users and application writers have
    developed unfortunate expectations about the safety of writing files on
    systems subject to sudden and violent death without using fsync().

    Signed-off-by: Jan Kara
    Signed-off-by: "Theodore Ts'o"

    Jan Kara
     
  • Oops. (Blush.)

    Thanks to Sedat Dilek for pointing this out.

    Signed-off-by: "Theodore Ts'o"

    Theodore Ts'o
     

24 Mar, 2010

2 commits


23 Mar, 2010

2 commits

  • According to the report from Andreas Beckmann (Message-ID:
    ), nilfs in 2.6.33 kernel got stuck
    after a disk full error.

    This turned out to be a regression by log writer updates merged at
    kernel 2.6.33. nilfs_segctor_abort_construction, which is a cleanup
    function for erroneous cases, was skipping writeback completion for
    some logs.

    This fixes the bug and would resolve the hang issue.

    Reported-by: Andreas Beckmann
    Signed-off-by: Ryusuke Konishi
    Tested-by: Ryusuke Konishi
    Cc: stable [2.6.33.x]

    Ryusuke Konishi
     
  • It seems clear from the surrounding code that xpermits is allowed to be
    NULL here.

    Signed-off-by: Dan Carpenter
    Signed-off-by: David Howells
    Signed-off-by: Linus Torvalds

    Dan Carpenter
     

22 Mar, 2010

2 commits

  • The reply parsing code attempts to decode the GETATTR response even if
    the DELEGRETURN portion of the compound returned an error. The GETATTR
    response won't actually exist if that's the case and we're asking the
    parser to read past the end of the response.

    This bug is fairly benign. The parser catches this without reading past
    the end of the response and decode_getfattr returns -EIO. Earlier
    kernels however had decode_op_hdr using the READ_BUF macro, and this
    bug would make this printk pop any time the client got an error from
    a delegreturn:

    kernel: decode_op_hdr: reply buffer overflowed in line XXXX

    More recent kernels seem to have replaced this printk with a dprintk.

    Signed-off-by: Jeff Layton
    Signed-off-by: Trond Myklebust

    Jeff Layton
     
  • Andreas Beckmann gave me a report that nilfs logged the following
    warnings when it got a disk full:

    nilfs_sufile_do_cancel_free: segment 0 must be clean
    nilfs_sufile_do_cancel_free: segment 1 must be clean

    These arise from a duplicate call to nilfs_segctor_cancel_freev in an
    error path of log writer. This will fix the issue.

    Reported-by: Andreas Beckmann
    Signed-off-by: Ryusuke Konishi

    Ryusuke Konishi
     

20 Mar, 2010

3 commits

  • We should not attempt to free the page if __GFP_FS is not set. Otherwise we
    can deadlock as per

    http://bugzilla.kernel.org/show_bug.cgi?id=15578

    Signed-off-by: Trond Myklebust
    Cc: stable@kernel.org

    Trond Myklebust
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client: (205 commits)
    ceph: update for write_inode API change
    ceph: reset osd after relevant messages timed out
    ceph: fix flush_dirty_caps race with caps migration
    ceph: include migrating caps in issued set
    ceph: fix osdmap decoding when pools include (removed) snaps
    ceph: return EBADF if waiting for caps on closed file
    ceph: set osd request message front length correctly
    ceph: reset front len on return to msgpool; BUG on mismatched front iov
    ceph: fix snaptrace decoding on cap migration between mds
    ceph: use single osd op reply msg
    ceph: reset bits on connection close
    ceph: remove bogus mds forward warning
    ceph: remove fragile __map_osds optimization
    ceph: fix connection fault STANDBY check
    ceph: invalidate_authorizer without con->mutex held
    ceph: don't clobber write return value when using O_SYNC
    ceph: fix client_request_forward decoding
    ceph: drop messages on unregistered mds sessions; cleanup
    ceph: fix comments, locking in destroy_inode
    ceph: move dereference after NULL test
    ...

    Fix trivial conflicts in Documentation/ioctl/ioctl-number.txt

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6:
    cifs: trivial white space
    [CIFS] checkpatch cleanup
    cifs: add cifs_revalidate_file
    cifs: add a CIFSSMBUnixQFileInfo function
    cifs: add a CIFSSMBQFileInfo function
    cifs: overhaul cifs_revalidate and rename to cifs_revalidate_dentry

    Linus Torvalds
     

19 Mar, 2010

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable: (30 commits)
    Btrfs: fix the inode ref searches done by btrfs_search_path_in_tree
    Btrfs: allow treeid==0 in the inode lookup ioctl
    Btrfs: return keys for large items to the search ioctl
    Btrfs: fix key checks and advance in the search ioctl
    Btrfs: buffer results in the space_info ioctl
    Btrfs: use __u64 types in ioctl.h
    Btrfs: fix search_ioctl key advance
    Btrfs: fix gfp flags masking in the compression code
    Btrfs: don't look at bio flags after submit_bio
    btrfs: using btrfs_stack_device_id() get devid
    btrfs: use memparse
    Btrfs: add a "df" ioctl for btrfs
    Btrfs: cache the extent state everywhere we possibly can V2
    Btrfs: cache ordered extent when completing io
    Btrfs: cache extent state in find_delalloc_range
    Btrfs: change the ordered tree to use a spinlock instead of a mutex
    Btrfs: finish read pages in the order they are submitted
    btrfs: fix btrfs_mkdir goto for no free objectids
    Btrfs: flush data on snapshot creation
    Btrfs: make df be a little bit more understandable
    ...

    Linus Torvalds