29 Mar, 2014

1 commit

  • Commit c74a3bdd9b52 ("ocfs2: add clustername to cluster connection") is
    trying to strlcpy a string which was explicitly passed as NULL in the
    very same patch, triggering a NULL ptr deref.

    BUG: unable to handle kernel NULL pointer dereference at (null)
    IP: strlcpy (lib/string.c:388 lib/string.c:151)
    CPU: 19 PID: 19426 Comm: trinity-c19 Tainted: G W 3.14.0-rc7-next-20140325-sasha-00014-g9476368-dirty #274
    RIP: strlcpy (lib/string.c:388 lib/string.c:151)
    Call Trace:
    ocfs2_cluster_connect (fs/ocfs2/stackglue.c:350)
    ocfs2_cluster_connect_agnostic (fs/ocfs2/stackglue.c:396)
    user_dlm_register (fs/ocfs2/dlmfs/userdlm.c:679)
    dlmfs_mkdir (fs/ocfs2/dlmfs/dlmfs.c:503)
    vfs_mkdir (fs/namei.c:3467)
    SyS_mkdirat (fs/namei.c:3488 fs/namei.c:3472)
    tracesys (arch/x86/kernel/entry_64.S:749)

    akpm: this patch probably disables the feature. A temporary thing to
    avoid triviel oopses.

    Signed-off-by: Sasha Levin
    Cc: Goldwyn Rodrigues
    Cc: Mark Fasheh
    Cc: Joel Becker
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Sasha Levin
     

28 Mar, 2014

1 commit

  • Currently we allocated anon_inode_inode in anon_inodefs_mount. This is
    somewhat fragile as if that function ever gets called again, it will
    overwrite anon_inode_inode pointer. So move the initialization of
    anon_inode_inode to anon_inode_init().

    Signed-off-by: Jan Kara
    [ Further simplified on suggestion from Dave Jones ]
    Signed-off-by: Linus Torvalds

    Jan Kara
     

26 Mar, 2014

3 commits

  • The previous commit removed the register_filesystem() call and the
    associated error handling, but left the label for the error path that no
    longer exists. Remove that too.

    Signed-off-by: Linus Torvalds

    Linus Torvalds
     
  • anon_inodefs filesystem is a kernel internal filesystem userspace
    shouldn't mess with. Remove registration of it so userspace cannot
    even try to mount it (which would fail anyway because the filesystem is
    MS_NOUSER).

    This fixes an oops triggered by trinity when it tried mounting
    anon_inodefs which overwrote anon_inode_inode pointer while other CPU
    has been in anon_inode_getfile() between ihold() and d_instantiate().
    Thus effectively creating dentry pointing to an inode without holding a
    reference to it.

    Reported-by: Sasha Levin
    Signed-off-by: Jan Kara
    Signed-off-by: Linus Torvalds

    Jan Kara
     
  • Pull nfsd fix frm Bruce Fields:
    "J R Okajima sent this early and I was just slow to pass it along,
    apologies. Fortunately it's a simple fix"

    * 'nfsd-next' of git://linux-nfs.org/~bfields/linux:
    nfsd: fix lost nfserrno() call in nfsd_setattr()

    Linus Torvalds
     

23 Mar, 2014

4 commits

  • We can get false negative from __lookup_mnt() if an unrelated vfsmount
    gets moved. In that case legitimize_mnt() is guaranteed to fail,
    and we will fall back to non-RCU walk... unless we end up running
    into a hard error on a filesystem object we wouldn't have reached
    if not for that false negative. IOW, delaying that check until
    the end of pathname resolution is wrong - we should recheck right
    after we attempt to cross the mountpoint. We don't need to recheck
    unless we see d_mountpoint() being true - in that case even if
    we have just raced with mount/umount, we can simply go on as if
    we'd come at the moment when the sucker wasn't a mountpoint; if we
    run into a hard error as the result, it was a legitimate outcome.
    __lookup_mnt() returning NULL is different in that respect, since
    it might've happened due to operation on completely unrelated
    mountpoint.

    Cc: stable@vger.kernel.org
    Signed-off-by: Al Viro

    Al Viro
     
  • In all callchains leading to prepend_name(), the value left in *buflen
    is eventually discarded unused if prepend_name() has returned a negative.
    So we are free to do what prepend() does, and subtract from *buflen
    *before* checking for underflow (which turns into checking the sign
    of subtraction result, of course).

    Cc: stable@vger.kernel.org
    Signed-off-by: Al Viro

    Al Viro
     
  • Commit bd2a31d522344 ("get rid of fget_light()") introduced the
    __fdget_pos() function, which returns the resulting file pointer and
    fdput flags combined in an 'unsigned long'. However, it also changed the
    behavior to return files with FMODE_PATH set, which shouldn't happen
    because read(), write(), lseek(), etc. aren't allowed on such files.
    This commit restores the old behavior.

    This regression actually had no effect on read() and write() since
    FMODE_READ and FMODE_WRITE are not set on file descriptors opened with
    O_PATH, but it did cause lseek() on a file descriptor opened with O_PATH
    to fail with ESPIPE rather than EBADF.

    Signed-off-by: Eric Biggers
    Signed-off-by: Al Viro

    Eric Biggers
     
  • Commit 9c225f2655e36a4 ("vfs: atomic f_pos accesses as per POSIX") changed
    several system calls to use fdget_pos() instead of fdget(), but missed
    sys_llseek(). Fix it.

    Signed-off-by: Eric Biggers
    Signed-off-by: Al Viro

    Eric Biggers
     

12 Mar, 2014

1 commit

  • Pull CIFS fixes from Steve French:
    "A fix for the problem which Al spotted in cifs_writev and a followup
    (noticed when fixing CVE-2014-0069) patch to ensure that cifs never
    sends more than the smb frame length over the socket (as we saw with
    that cifs_iovec_write problem that Jeff fixed last month)"

    * 'for-next' of git://git.samba.org/sfrench/cifs-2.6:
    cifs: mask off top byte in get_rfc1002_length()
    cifs: sanity check length of data to send before sending
    CIFS: Fix wrong pos argument of cifs_find_lock_conflict

    Linus Torvalds
     

11 Mar, 2014

4 commits

  • Merge misc fixes from Andrew Morton:
    "Nine fixes"

    * emailed patches from Andrew Morton akpm@linux-foundation.org>:
    cris: convert ffs from an object-like macro to a function-like macro
    hfsplus: add HFSX subfolder count support
    tools/testing/selftests/ipc/msgque.c: handle msgget failure return correctly
    MAINTAINERS: blackfin: add git repository
    revert "kallsyms: fix absolute addresses for kASLR"
    mm/Kconfig: fix URL for zsmalloc benchmark
    fs/proc/base.c: fix GPF in /proc/$PID/map_files
    mm/compaction: break out of loop on !PageBuddy in isolate_freepages_block
    mm: fix GFP_THISNODE callers and clarify

    Linus Torvalds
     
  • Adds support for HFSX 'HasFolderCount' flag and a corresponding
    'folderCount' field in folder records. (For reference see
    HFS_FOLDERCOUNT and kHFSHasFolderCountBit/kHFSHasFolderCountMask in
    Apple's source code.)

    Ignoring subfolder count leads to fs errors found by Mac:

    ...
    Checking catalog hierarchy.
    HasFolderCount flag needs to be set (id = 105)
    (It should be 0x10 instead of 0)
    Incorrect folder count in a directory (id = 2)
    (It should be 7 instead of 6)
    ...

    Steps to reproduce:
    Format with "newfs_hfs -s /dev/diskXXX".
    Mount in Linux.
    Create a new directory in root.
    Unmount.
    Run "fsck_hfs /dev/diskXXX".

    The patch handles directory creation, deletion, and rename.

    Signed-off-by: Sergei Antonov
    Reviewed-by: Vyacheslav Dubeyko
    Cc: Al Viro
    Cc: Christoph Hellwig
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Sergei Antonov
     
  • The expected logic of proc_map_files_get_link() is either to return 0
    and initialize 'path' or return an error and leave 'path' uninitialized.

    By the time dname_to_vma_addr() returns 0 the corresponding vma may have
    already be gone. In this case the path is not initialized but the
    return value is still 0. This results in 'general protection fault'
    inside d_path().

    Steps to reproduce:

    CONFIG_CHECKPOINT_RESTORE=y

    fd = open(...);
    while (1) {
    mmap(fd, ...);
    munmap(fd, ...);
    }

    ls -la /proc/$PID/map_files

    Addresses https://bugzilla.kernel.org/show_bug.cgi?id=68991

    Signed-off-by: Artem Fetishev
    Signed-off-by: Aleksandr Terekhov
    Reported-by:
    Acked-by: Pavel Emelyanov
    Acked-by: Cyrill Gorcunov
    Reviewed-by: "Eric W. Biederman"
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Artem Fetishev
     
  • Pull vfs fixes from Al Viro.

    Clean up file table accesses (get rid of fget_light() in favor of the
    fdget() interface), add proper file position locking.

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
    get rid of fget_light()
    sockfd_lookup_light(): switch to fdget^W^Waway from fget_light
    vfs: atomic f_pos accesses as per POSIX
    ocfs2 syncs the wrong range...

    Linus Torvalds
     

10 Mar, 2014

4 commits

  • instead of returning the flags by reference, we can just have the
    low-level primitive return those in lower bits of unsigned long,
    with struct file * derived from the rest.

    Signed-off-by: Al Viro

    Al Viro
     
  • Our write() system call has always been atomic in the sense that you get
    the expected thread-safe contiguous write, but we haven't actually
    guaranteed that concurrent writes are serialized wrt f_pos accesses, so
    threads (or processes) that share a file descriptor and use "write()"
    concurrently would quite likely overwrite each others data.

    This violates POSIX.1-2008/SUSv4 Section XSI 2.9.7 that says:

    "2.9.7 Thread Interactions with Regular File Operations

    All of the following functions shall be atomic with respect to each
    other in the effects specified in POSIX.1-2008 when they operate on
    regular files or symbolic links: [...]"

    and one of the effects is the file position update.

    This unprotected file position behavior is not new behavior, and nobody
    has ever cared. Until now. Yongzhi Pan reported unexpected behavior to
    Michael Kerrisk that was due to this.

    This resolves the issue with a f_pos-specific lock that is taken by
    read/write/lseek on file descriptors that may be shared across threads
    or processes.

    Reported-by: Yongzhi Pan
    Reported-by: Michael Kerrisk
    Cc: Al Viro
    Signed-off-by: Linus Torvalds
    Signed-off-by: Al Viro

    Linus Torvalds
     
  • Cc: stable@vger.kernel.org
    Signed-off-by: Al Viro

    Al Viro
     
  • Pull NFS client bugfixes from Trond Myklebust:
    "Highlights include:

    - Fix another nfs4_sequence corruptor in RELEASE_LOCKOWNER
    - Fix an Oopsable delegation callback race
    - Fix another bad stateid infinite loop
    - Fail the data server I/O is the stateid represents a lost lock
    - Fix an Oopsable sunrpc trace event"

    * tag 'nfs-for-3.14-5' of git://git.linux-nfs.org/projects/trondmy/linux-nfs:
    SUNRPC: Fix oops when trace sunrpc_task events in nfs client
    NFSv4: Fail the truncate() if the lock/open stateid is invalid
    NFSv4.1 Fail data server I/O if stateid represents a lost lock
    NFSv4: Fix the return value of nfs4_select_rw_stateid
    NFSv4: nfs4_stateid_is_current should return 'true' for an invalid stateid
    NFS: Fix a delegation callback race
    NFSv4: Fix another nfs4_sequence corruptor

    Linus Torvalds
     

08 Mar, 2014

1 commit

  • Pull block fixes from Jens Axboe:
    "Small collection of fixes for 3.14-rc. It contains:

    - Three minor update to blk-mq from Christoph.

    - Reduce number of unaligned (< 4kb) in-flight writes on mtip32xx to
    two. From Micron.

    - Make the blk-mq CPU notify spinlock raw, since it can't be a
    sleeper spinlock on RT. From Mike Galbraith.

    - Drop now bogus BUG_ON() for bio iteration with blk integrity. From
    Nic Bellinger.

    - Properly propagate the SYNC flag on requests. From Shaohua"

    * 'for-linus' of git://git.kernel.dk/linux-block:
    blk-mq: add REQ_SYNC early
    rt,blk,mq: Make blk_mq_cpu_notify_lock a raw spinlock
    bio-integrity: Drop bio_integrity_verify BUG_ON in post bip->bip_iter world
    blk-mq: support partial I/O completions
    blk-mq: merge blk_mq_insert_request and blk_mq_run_request
    blk-mq: remove blk_mq_alloc_rq
    mtip32xx: Reduce the number of unaligned writes to 2

    Linus Torvalds
     

06 Mar, 2014

4 commits

  • If the open stateid could not be recovered, or the file locks were lost,
    then we should fail the truncate() operation altogether.

    Reported-by: Andy Adamson
    Link: http://lkml.kernel.org/r/1393954269-3974-1-git-send-email-andros@netapp.com
    Signed-off-by: Trond Myklebust

    Trond Myklebust
     
  • Signed-off-by: Andy Adamson
    Link: http://lkml.kernel.org/r/1393954269-3974-1-git-send-email-andros@netapp.com
    Signed-off-by: Trond Myklebust

    Andy Adamson
     
  • In commit 5521abfdcf4d6 (NFSv4: Resend the READ/WRITE RPC call
    if a stateid change causes an error), we overloaded the return value of
    nfs4_select_rw_stateid() to cause it to return -EWOULDBLOCK if an RPC
    call is outstanding that would cause the NFSv4 lock or open stateid
    to change.
    That is all redundant when we actually copy the stateid used in the
    read/write RPC call that failed, and check that against the current
    stateid. It is doubly so, when we consider that in the NFSv4.1 case,
    we also set the stateid's seqid to the special value '0', which means
    'match the current valid stateid'.

    Reported-by: Andy Adamson
    Link: http://lkml.kernel.org/r/1393954269-3974-1-git-send-email-andros@netapp.com
    Signed-off-by: Trond Myklebust

    Trond Myklebust
     
  • When nfs4_set_rw_stateid() can fails by returning EIO to indicate that
    the stateid is completely invalid, then it makes no sense to have it
    trigger a retry of the READ or WRITE operation. Instead, we should just
    have it fall through and attempt a recovery.

    This fixes an infinite loop in which the client keeps replaying the same
    bad stateid back to the server.

    Reported-by: Andy Adamson
    Link: http://lkml.kernel.org/r/1393954269-3974-1-git-send-email-andros@netapp.com
    Cc: stable@vger.kernel.org # 3.10+
    Signed-off-by: Trond Myklebust

    Trond Myklebust
     

04 Mar, 2014

3 commits

  • Current implementation of HFS+ driver has small issue with remount
    option. Namely, for example, you are unable to remount from RO mode
    into RW mode by means of command "mount -o remount,rw /dev/loop0
    /mnt/hfsplus". Trying to execute sequence of commands results in an
    error message:

    mount /dev/loop0 /mnt/hfsplus
    mount -o remount,ro /dev/loop0 /mnt/hfsplus
    mount -o remount,rw /dev/loop0 /mnt/hfsplus

    mount: you must specify the filesystem type

    mount -t hfsplus -o remount,rw /dev/loop0 /mnt/hfsplus

    mount: /mnt/hfsplus not mounted or bad option

    The reason of such issue is failure of mount syscall:

    mount("/dev/loop0", "/mnt/hfsplus", 0x2282a60, MS_MGC_VAL|MS_REMOUNT, NULL) = -1 EINVAL (Invalid argument)

    Namely, hfsplus_parse_options_remount() method receives empty "input"
    argument and return false in such case. As a result, hfsplus_remount()
    returns -EINVAL error code.

    This patch fixes the issue by means of return true for the case of empty
    "input" argument in hfsplus_parse_options_remount() method.

    Signed-off-by: Vyacheslav Dubeyko
    Cc: Al Viro
    Cc: Christoph Hellwig
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Vyacheslav Dubeyko
     
  • Global quota files are accessed from different nodes. Thus we cannot
    cache offset of quota structure in the quota file after we drop our node
    reference count to it because after that moment quota structure may be
    freed and reallocated elsewhere by a different node resulting in
    corruption of quota file.

    Fix the problem by clearing dq_off when we are releasing dquot structure.
    We also remove the DB_READ_B handling because it is useless -
    DQ_ACTIVE_B is set iff DQ_READ_B is set.

    Signed-off-by: Jan Kara
    Cc: Goldwyn Rodrigues
    Cc: Joel Becker
    Reviewed-by: Mark Fasheh
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jan Kara
     
  • Commit bf6bddf1924e ("mm: introduce compaction and migration for
    ballooned pages") introduces page_count(page) into memory compaction
    which dereferences page->first_page if PageTail(page).

    This results in a very rare NULL pointer dereference on the
    aforementioned page_count(page). Indeed, anything that does
    compound_head(), including page_count() is susceptible to racing with
    prep_compound_page() and seeing a NULL or dangling page->first_page
    pointer.

    This patch uses Andrea's implementation of compound_trans_head() that
    deals with such a race and makes it the default compound_head()
    implementation. This includes a read memory barrier that ensures that
    if PageTail(head) is true that we return a head page that is neither
    NULL nor dangling. The patch then adds a store memory barrier to
    prep_compound_page() to ensure page->first_page is set.

    This is the safest way to ensure we see the head page that we are
    expecting, PageTail(page) is already in the unlikely() path and the
    memory barriers are unfortunately required.

    Hugetlbfs is the exception, we don't enforce a store memory barrier
    during init since no race is possible.

    Signed-off-by: David Rientjes
    Cc: Holger Kiehl
    Cc: Christoph Lameter
    Cc: Rafael Aquini
    Cc: Vlastimil Babka
    Cc: Michal Hocko
    Cc: Mel Gorman
    Cc: Andrea Arcangeli
    Cc: Rik van Riel
    Cc: "Kirill A. Shutemov"
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Rientjes
     

03 Mar, 2014

2 commits


02 Mar, 2014

1 commit

  • nfs4_release_lockowner needs to set the rpc_message reply to point to
    the nfs4_sequence_res in order to avoid another Oopsable situation
    in nfs41_assign_slot.

    Fixes: fbd4bfd1d9d21 (NFS: Add nfs4_sequence calls for RELEASE_LOCKOWNER)
    Cc: stable@vger.kernel.org # 3.12+
    Signed-off-by: Trond Myklebust

    Trond Myklebust
     

01 Mar, 2014

1 commit

  • The rfc1002 length actually includes a type byte, which we aren't
    masking off. In most cases, it's not a problem since the
    RFC1002_SESSION_MESSAGE type is 0, but when doing a RFC1002 session
    establishment, the type is non-zero and that throws off the returned
    length.

    Signed-off-by: Jeff Layton
    Tested-by: Sachin Prabhu
    Signed-off-by: Steve French

    Jeff Layton
     

28 Feb, 2014

1 commit

  • Pull filesystem fixes from Jan Kara:
    "Notification, writeback, udf, quota fixes

    The notification patches are (with one exception) a fallout of my
    fsnotify rework which went into -rc1 (I've extented LTP to cover these
    cornercases to avoid similar breakage in future).

    The UDF patch is a nasty data corruption Al has recently reported,
    the revert of the writeback patch is due to possibility of violating
    sync(2) guarantees, and a quota bug can lead to corruption of quota
    files in ocfs2"

    * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs:
    fsnotify: Allocate overflow events with proper type
    fanotify: Handle overflow in case of permission events
    fsnotify: Fix detection whether overflow event is queued
    Revert "writeback: do not sync data dirtied after sync start"
    quota: Fix race between dqput() and dquot_scan_active()
    udf: Fix data corruption on file type conversion
    inotify: Fix reporting of cookies for inotify events

    Linus Torvalds
     

25 Feb, 2014

4 commits

  • As mount() and kill_sb() is not a one-to-one match, we shoudn't get
    ns refcnt unconditionally in sysfs_mount(), and instead we should
    get the refcnt only when kernfs_mount() allocated a new superblock.

    v2:
    - Changed the name of the new argument, suggested by Tejun.
    - Made the argument optional, suggested by Tejun.

    v3:
    - Make the new argument as second-to-last arg, suggested by Tejun.

    Signed-off-by: Li Zefan
    Acked-by: Tejun Heo
    ---
    fs/kernfs/mount.c | 8 +++++++-
    fs/sysfs/mount.c | 5 +++--
    include/linux/kernfs.h | 9 +++++----
    3 files changed, 15 insertions(+), 7 deletions(-)
    Signed-off-by: Greg Kroah-Hartman

    Li Zefan
     
  • Commit 7053aee26a35 "fsnotify: do not share events between notification
    groups" used overflow event statically allocated in a group with the
    size of the generic notification event. This causes problems because
    some code looks at type specific parts of event structure and gets
    confused by a random data it sees there and causes crashes.

    Fix the problem by allocating overflow event with type corresponding to
    the group type so code cannot get confused.

    Signed-off-by: Jan Kara

    Jan Kara
     
  • If the event queue overflows when we are handling permission event, we
    will never get response from userspace. So we must avoid waiting for it.
    Change fsnotify_add_notify_event() to return whether overflow has
    happened so that we can detect it in fanotify_handle_event() and act
    accordingly.

    Signed-off-by: Jan Kara

    Jan Kara
     
  • Currently we didn't initialize event's list head when we removed it from
    the event list. Thus a detection whether overflow event is already
    queued wasn't working. Fix it by always initializing the list head when
    deleting event from a list.

    Signed-off-by: Jan Kara

    Jan Kara
     

24 Feb, 2014

2 commits

  • We had a bug discovered recently where an upper layer function
    (cifs_iovec_write) could pass down a smb_rqst with an invalid amount of
    data in it. The length of the SMB frame would be correct, but the rqst
    struct would cause smb_send_rqst to send nearly 4GB of data.

    This should never be the case. Add some sanity checking to the beginning
    of smb_send_rqst that ensures that the amount of data we're going to
    send agrees with the length in the RFC1002 header. If it doesn't, WARN()
    and return -EIO to the upper layers.

    Signed-off-by: Jeff Layton
    Acked-by: Sachin Prabhu
    Reviewed-by: Pavel Shilovsky
    Signed-off-by: Steve French

    Jeff Layton
     
  • and use generic_file_aio_write rather than __generic_file_aio_write
    in cifs_writev.

    Signed-off-by: Pavel Shilovsky
    Reported-by: Al Viro
    Signed-off-by: Steve French

    Pavel Shilovsky
     

23 Feb, 2014

1 commit

  • Pull xfs fixes from Dave Chinner:
    "This is the first pull request I've had to do for you, so I'm still
    sorting things out. The reason I'm sending this and not Ben should be
    obvious from the first commit below - SGI has stepped down from the
    XFS maintainership role. As such, I'd like to take another
    opportunity to thank them for their many years of effort maintaining
    XFS and supporting the XFS community that they developed from the
    ground up.

    So I haven't had time to work things like signed tags into my
    workflows yet, so this is just a repo branch I'm asking you to pull
    from. And yes, I named the branch -rc4 because I wanted the fixes in
    rc4, not because the branch was for merging into -rc3. Probably not
    right, either.

    Anyway, I should have everything sorted out by the time the next merge
    window comes around. If there's anything that you don't like in the
    pull req, feel free to flame me unmercifully.

    The changes are fixes for recent regressions and important thinkos in
    verification code:

    - a log vector buffer alignment issue on ia32
    - timestamps on truncate got mangled
    - primary superblock CRC validation fixes and error message
    sanitisation"

    * 'xfs-fixes-for-3.14-rc4' of git://oss.sgi.com/xfs/xfs:
    xfs: limit superblock corruption errors to actual corruption
    xfs: skip verification on initial "guess" superblock read
    MAINTAINERS: SGI no longer maintaining XFS
    xfs: xfs_sb_read_verify() doesn't flag bad crcs on primary sb
    xfs: ensure correct log item buffer alignment
    xfs: ensure correct timestamp updates from truncate

    Linus Torvalds
     

22 Feb, 2014

2 commits

  • This reverts commit c4a391b53a72d2df4ee97f96f78c1d5971b47489. Dave
    Chinner has reported the commit may cause some
    inodes to be left out from sync(2). This is because we can call
    redirty_tail() for some inode (which sets i_dirtied_when to current time)
    after sync(2) has started or similarly requeue_inode() can set
    i_dirtied_when to current time if writeback had to skip some pages. The
    real problem is in the functions clobbering i_dirtied_when but fixing
    that isn't trivial so revert is a safer choice for now.

    CC: stable@vger.kernel.org # >= 3.13
    Signed-off-by: Jan Kara

    Jan Kara
     
  • Given that bip->bip_iter.bi_size is decremented after bio_advance() ->
    bio_integrity_advance() is called, the BUG_ON() in bio_integrity_verify()
    ends up tripping in v3.14-rc1 code with the advent of immutable biovecs
    in:

    commit d57a5f7c6605f15f3b5134837e68b448a7cea88e
    Author: Kent Overstreet
    Date: Sat Nov 23 17:20:16 2013 -0800

    bio-integrity: Convert to bvec_iter

    Given that there is no easy way to ascertain the original bi_size
    value, go ahead and drop this BUG_ON().

    Reported-by: Sagi Grimberg
    Reported-by: Akinobu Mita
    Acked-by: Martin K. Petersen
    Cc: Kent Overstreet
    Signed-off-by: Nicholas Bellinger
    Signed-off-by: Jens Axboe

    Nicholas Bellinger