23 Jul, 2009

3 commits


22 Jul, 2009

3 commits

  • We just had a case in which a buggy server occasionally returns the wrong
    attributes during an OPEN call. While the client does catch this sort of
    condition in nfs4_open_done(), and causes the nfs4_atomic_open() to return
    -EISDIR, the logic in nfs_atomic_lookup() is broken, since it causes a
    fallback to an ordinary lookup instead of just returning the error.

    When the buggy server then returns a regular file for the fallback lookup,
    the VFS allows the open, and bad things start to happen, since the open
    file doesn't have any associated NFSv4 state.

    The fix is firstly to return the EISDIR/ENOTDIR errors immediately, and
    secondly to ensure that we are always careful when dereferencing the
    nfs_open_context state pointer.

    Signed-off-by: Trond Myklebust

    Trond Myklebust
     
  • Commit 008f55d0e019943323c20a03493a2ba5672a4cc8 (nfs41: recover lease in
    _nfs4_lookup_root) forces the state manager to always run on mount. This is
    a bug in the case of NFSv4.0, which doesn't require us to send a
    setclientid until we want to grab file state.

    In any case, this is completely the wrong place to be doing state
    management. Moving that code into nfs4_init_session...

    Signed-off-by: Trond Myklebust

    Trond Myklebust
     
  • The oops http://www.kerneloops.org/raw.php?rawid=537858&msgid= appears to
    be due to the nfs4_lock_state->ls_state field being uninitialised. This
    happens if the call to nfs4_free_lock_state() is triggered at the end of
    nfs4_get_lock_state().

    The fix is to move the initialisation of ls_state into the allocator.

    Signed-off-by: Trond Myklebust

    Trond Myklebust
     

21 Jul, 2009

2 commits


16 Jul, 2009

1 commit


15 Jul, 2009

4 commits


14 Jul, 2009

4 commits

  • fs/Kconfig file was split into individual fs/*/Kconfig files before
    nilfs was merged. I've found the current config entry of nilfs is
    tainting the work. Sorry, I didn't notice. This fixes the violation.

    Signed-off-by: Ryusuke Konishi
    Cc: Alexey Dobriyan

    Ryusuke Konishi
     
  • * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4:
    jbd2: fix race between write_metadata_buffer and get_write_access
    ext4: Fix ext4_mb_initialize_context() to initialize all fields
    ext4: fix null handler of ioctls in no journal mode
    ext4: Fix buffer head reference leak in no-journal mode
    ext4: Move __ext4_journalled_writepage() to avoid forward declaration
    ext4: Fix mmap/truncate race when blocksize < pagesize && !nodellaoc
    ext4: Fix mmap/truncate race when blocksize < pagesize && delayed allocation
    ext4: Don't look at buffer_heads outside i_size.
    ext4: Fix goal inum check in the inode allocator
    ext4: fix no journal corruption with locale-gen
    ext4: Calculate required journal credits for inserting an extent properly
    ext4: Fix truncation of symlinks after failed write
    jbd2: Fix a race between checkpointing code and journal_get_write_access()
    ext4: Use rcu_barrier() on module unload.
    ext4: naturally align struct ext4_allocation_request
    ext4: mark several more functions in mballoc.c as noinline
    ext4: Fix potential reclaim deadlock when truncating partial block
    jbd2: Remove GFP_ATOMIC kmalloc from inside spinlock critical region
    ext4: Fix type warning on 64-bit platforms in tracing events header

    Linus Torvalds
     
  • The function jbd2_journal_write_metadata_buffer() calls
    jbd_unlock_bh_state(bh_in) too early; this could potentially allow
    another thread to call get_write_access on the buffer head, modify the
    data, and dirty it, and allowing the wrong data to be written into the
    journal. Fortunately, if we lose this race, the only time this will
    actually cause filesystem corruption is if there is a system crash or
    other unclean shutdown of the system before the next commit can take
    place.

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

    dingdinghua
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6:
    wm97xx_batery: replace driver_data with dev_get_drvdata()
    omap: video: remove direct access of driver_data
    Sound: remove direct access of driver_data
    driver model: fix show/store prototypes in doc.
    Firmware: firmware_class, fix lock imbalance
    Driver Core: remove BUS_ID_SIZE
    sparc: remove driver-core BUS_ID_SIZE
    partitions: fix broken uevent_suppress conversion
    devres: WARN() and return, don't crash on device_del() of uninitialized device

    Linus Torvalds
     

13 Jul, 2009

7 commits

  • Pavel Roskin pointed out that kmemcheck indicated that
    ext4_mb_store_history() was accessing uninitialized values of
    ac->ac_tail and ac->ac_buddy leading to garbage in the mballoc
    history. Fix this by initializing the entire structure to all zeros
    first.

    Also, two fields were getting doubly initialized by the caller of
    ext4_mb_initialize_context, so remove them for efficiency's sake.

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

    Theodore Ts'o
     
  • The EXT4_IOC_GROUP_ADD and EXT4_IOC_GROUP_EXTEND ioctls should not
    flush the journal in no_journal mode. Otherwise, running resize2fs on
    a mounted no_journal partition triggers the following error messages:

    BUG: unable to handle kernel NULL pointer dereference at 00000014
    IP: [] _spin_lock+0x8/0x19
    *pde = 00000000
    Oops: 0002 [#1] SMP

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

    Peng Tao
     
  • We found a problem with buffer head reference leaks when using an ext4
    partition without a journal. In particular, calls to ext4_forget() would
    not to a brelse() on the input buffer head, which will cause pages they
    belong to to not be reclaimable.

    Further investigation showed that all places where ext4_journal_forget() and
    ext4_journal_revoke() are called are subject to the same problem. The patch
    below changes __ext4_journal_forget/__ext4_journal_revoke to do an explicit
    release of the buffer head when the journal handle isn't valid.

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

    Curt Wohlgemuth
     
  • If TRACE_INCLDUE_FILE is defined,
    will be included and compiled, otherwise it will be

    So TRACE_SYSTEM should be defined outside of #if proctection,
    just like TRACE_INCLUDE_FILE.

    Imaging this scenario:

    #include
    -> TRACE_SYSTEM == foo
    ...
    #include
    -> TRACE_SYSTEM == bar
    ...
    #define CREATE_TRACE_POINTS
    #include
    -> TRACE_SYSTEM == bar !!!

    and then bar.h will be included and compiled.

    Signed-off-by: Li Zefan
    Cc: Steven Rostedt
    Cc: Frederic Weisbecker
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Li Zefan
     
  • git commit f67f129e "Driver core: implement uevent suppress in kobject"
    contains this chunk for fs/partitions/check.c:

    /* suppress uevent if the disk supresses it */
    - if (!ddev->uevent_suppress)
    + if (!dev_get_uevent_suppress(pdev))
    kobject_uevent(&pdev->kobj, KOBJ_ADD);

    However that should have been

    - if (!ddev->uevent_suppress)
    + if (!dev_get_uevent_suppress(ddev))

    Signed-off-by: Heiko Carstens
    Acked-by: Ming Lei
    Cc: stable
    Signed-off-by: Greg Kroah-Hartman

    Heiko Carstens
     
  • Fix the following warning:

    fs/afs/dir.c: In function 'afs_d_revalidate':
    fs/afs/dir.c:567: warning: 'fid.vnode' may be used uninitialized in this function
    fs/afs/dir.c:567: warning: 'fid.unique' may be used uninitialized in this function

    by marking the 'fid' variable as an uninitialized_var. The problem is
    that gcc doesn't always manage to work out that fid is always set on the
    path through the function that uses it.

    Cc: linux-afs@lists.infradead.org
    Cc: linux-kernel@vger.kernel.org
    Signed-off-by: Artem Bityutskiy
    Signed-off-by: David Howells
    Signed-off-by: Linus Torvalds

    Artem Bityutskiy
     
  • * 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
     

12 Jul, 2009

1 commit


11 Jul, 2009

8 commits

  • commit 5404ac8e4418ab3d254950ee4f9bcafc1da20b4a ("isofs: cleanup mount
    option processing") missed conversion of joliet option flag resulting
    in non-working Joliet support.

    CC: walt
    Signed-off-by: Bartlomiej Zolnierkiewicz
    Signed-off-by: Jan Kara
    Signed-off-by: Linus Torvalds

    Bartlomiej Zolnierkiewicz
     
  • * 'linux-next' of git://git.infradead.org/ubifs-2.6:
    UBIFS: fix corruption dump
    UBIFS: clean up free space checking
    UBIFS: small amendments in the LEB scanning code
    UBIFS: dump a little more in case of corruptions
    MAINTAINERS: update ahunter's e-mail address
    UBIFS: allow more than one volume to be mounted
    UBIFS: fix assertion warning
    UBIFS: minor spelling and grammar fixes
    UBIFS: fix 64-bit divisions in debug print
    UBIFS: few spelling fixes
    UBIFS: set write-buffer timout to 3-5 seconds
    UBIFS: slightly optimize write-buffer timer usage
    UBIFS: improve debugging messaged
    UBIFS: fix integer overflow warning

    Linus Torvalds
     
  • * 'for-linus' of git://git.open-osd.org/linux-open-osd:
    osdblk: Adjust queue limits to lower device's limits
    osdblk: a Linux block device for OSD objects
    MAINTAINERS: Add osd maintained files (F:)
    exofs: Avoid using file_fsync()
    exofs: Remove IBM copyrights
    exofs: Fix bio leak in error handling path (sync read)

    Linus Torvalds
     
  • When building v2.6.31-rc2-344-g69ca06c, the following build errors are
    found due to missing includes:

    CC [M] fs/fuse/dev.o
    fs/fuse/dev.c: In function ‘request_end’:
    fs/fuse/dev.c:289: error: ‘BLK_RW_SYNC’ undeclared (first use in this function)
    ...
    fs/nfs/write.c: In function ‘nfs_set_page_writeback’:
    fs/nfs/write.c:207: error: ‘BLK_RW_ASYNC’ undeclared (first use in this function)

    Signed-off-by: Larry Finger@lwfinger.net>
    Signed-off-by: Linus Torvalds

    Larry Finger
     
  • * 'for-linus' of git://git.kernel.dk/linux-2.6-block:
    cfq-iosched: reset oom_cfqq in cfq_set_request()
    block: fix sg SG_DXFER_TO_FROM_DEV regression
    block: call blk_scsi_ioctl_init()
    Fix congestion_wait() sync/async vs read/write confusion

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ryusuke/nilfs2:
    nilfs2: fix disorder in cp count on error during deleting checkpoints
    nilfs2: fix lockdep warning between regular file and inode file
    nilfs2: fix incorrect KERN_CRIT messages in case of write failures
    nilfs2: fix hang problem of log writer which occurs after write failures
    nilfs2: remove unlikely directive causing mis-conversion of error code

    Linus Torvalds
     
  • I overlooked SG_DXFER_TO_FROM_DEV support when I converted sg to use
    the block layer mapping API (2.6.28).

    Douglas Gilbert explained SG_DXFER_TO_FROM_DEV:

    http://www.spinics.net/lists/linux-scsi/msg37135.html

    =
    The semantics of SG_DXFER_TO_FROM_DEV were:
    - copy user space buffer to kernel (LLD) buffer
    - do SCSI command which is assumed to be of the DATA_IN
    (data from device) variety. This would overwrite
    some or all of the kernel buffer
    - copy kernel (LLD) buffer back to the user space.

    The idea was to detect short reads by filling the original
    user space buffer with some marker bytes ("0xec" it would
    seem in this report). The "resid" value is a better way
    of detecting short reads but that was only added this century
    and requires co-operation from the LLD.
    =

    This patch changes the block layer mapping API to support this
    semantics. This simply adds another field to struct rq_map_data and
    enables __bio_copy_iov() to copy data from user space even with READ
    requests.

    It's better to add the flags field and kills null_mapped and the new
    from_user fields in struct rq_map_data but that approach makes it
    difficult to send this patch to stable trees because st and osst
    drivers use struct rq_map_data (they were converted to use the block
    layer in 2.6.29 and 2.6.30). Well, I should clean up the block layer
    mapping API.

    zhou sf reported this regiression and tested this patch:

    http://www.spinics.net/lists/linux-scsi/msg37128.html
    http://www.spinics.net/lists/linux-scsi/msg37168.html

    Reported-by: zhou sf
    Tested-by: zhou sf
    Cc: stable@kernel.org
    Signed-off-by: FUJITA Tomonori
    Signed-off-by: Jens Axboe

    FUJITA Tomonori
     
  • Commit 1faa16d22877f4839bd433547d770c676d1d964c accidentally broke
    the bdi congestion wait queue logic, causing us to wait on congestion
    for WRITE (== 1) when we really wanted BLK_RW_ASYNC (== 0) instead.

    Signed-off-by: Jens Axboe

    Jens Axboe
     

10 Jul, 2009

7 commits

  • Acked-by: Jeff Layton
    Signed-off-by: Steve French

    Steve French
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6:
    cifs: when ATTR_READONLY is set, only clear write bits on non-directories
    cifs: remove cifsInodeInfo->inUse counter
    cifs: convert cifs_get_inode_info and non-posix readdir to use cifs_iget
    [CIFS] update cifs version number
    cifs: add and use CIFSSMBUnixSetFileInfo for setattr calls
    cifs: make a separate function for filling out FILE_UNIX_BASIC_INFO
    cifs: rename CIFSSMBUnixSetInfo to CIFSSMBUnixSetPathInfo
    cifs: add pid of initiating process to spnego upcall info
    cifs: fix regression with O_EXCL creates and optimize away lookup
    cifs: add new cifs_iget function and convert unix codepath to use it

    Linus Torvalds
     
  • cifs: when ATTR_READONLY is set, only clear write bits on non-directories

    On windows servers, ATTR_READONLY apparently either has no meaning or
    serves as some sort of queue to certain applications for unrelated
    behavior. This MS kbase article has details:

    http://support.microsoft.com/kb/326549/

    Don't clear the write bits directory mode when ATTR_READONLY is set.

    Reported-by: pouchat@peewiki.net
    Signed-off-by: Jeff Layton
    Signed-off-by: Steve French

    Jeff Layton
     
  • cifs: remove cifsInodeInfo->inUse counter

    It was purported to be a refcounter of some sort, but was never
    used that way. It never served any purpose that wasn't served equally well
    by the I_NEW flag.

    Signed-off-by: Jeff Layton
    Reviewed-by: Christoph Hellwig
    Signed-off-by: Steve French

    Jeff Layton
     
  • cifs: convert cifs_get_inode_info and non-posix readdir to use cifs_iget

    Rather than allocating an inode and filling it out, have
    cifs_get_inode_info fill out a cifs_fattr and call cifs_iget. This means
    a pretty hefty reorganization of cifs_get_inode_info.

    For the readdir codepath, add a couple of new functions for filling out
    cifs_fattr's from different FindFile response infolevels.

    Finally, remove cifs_new_inode since there are no more callers.

    Signed-off-by: Jeff Layton
    Reviewed-by: Christoph Hellwig
    Signed-off-by: Steve French

    Jeff Layton
     
  • Signed-off-by: Steve French

    Steve French
     
  • cifs: add and use CIFSSMBUnixSetFileInfo for setattr calls

    When there's an open filehandle, SET_FILE_INFO is apparently preferred
    over SET_PATH_INFO. Add a new variant that sets a FILE_UNIX_INFO_BASIC
    infolevel via SET_FILE_INFO and switch cifs_setattr_unix to use the
    new call when there's an open filehandle available.

    Signed-off-by: Jeff Layton
    Signed-off-by: Steve French

    Jeff Layton