03 Sep, 2019

1 commit


30 Aug, 2019

1 commit

  • Pull cifs fixes from Steve French:
    "A few small SMB3 fixes, and a larger one to fix various older string
    handling functions"

    * tag '5.3-rc6-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6:
    cifs: update internal module number
    cifs: replace various strncpy with strscpy and similar
    cifs: Use kzfree() to zero out the password
    cifs: set domainName when a domain-key is used in multiuser

    Linus Torvalds
     

28 Aug, 2019

5 commits

  • To 2.22

    Signed-off-by: Steve French

    Steve French
     
  • Using strscpy is cleaner, and avoids some problems with
    handling maximum length strings. Linus noticed the
    original problem and Aurelien pointed out some additional
    problems. Fortunately most of this is SMB1 code (and
    in particular the ASCII string handling older, which
    is less common).

    Reported-by: Linus Torvalds
    Reviewed-by: Aurelien Aptel
    Signed-off-by: Ronnie Sahlberg
    Signed-off-by: Steve French

    Ronnie Sahlberg
     
  • It's safer to zero out the password so that it can never be disclosed.

    Fixes: 0c219f5799c7 ("cifs: set domainName when a domain-key is used in multiuser")
    Signed-off-by: Dan Carpenter
    Signed-off-by: Steve French

    Dan Carpenter
     
  • RHBZ: 1710429

    When we use a domain-key to authenticate using multiuser we must also set
    the domainnmame for the new volume as it will be used and passed to the server
    in the NTLMSSP Domain-name.

    Signed-off-by: Ronnie Sahlberg
    Signed-off-by: Steve French

    Ronnie Sahlberg
     
  • Pull NFS client bugfixes from Trond Myklebust:
    "Highlights include:

    Stable fixes:

    - Fix a page lock leak in nfs_pageio_resend()

    - Ensure O_DIRECT reports an error if the bytes read/written is 0

    - Don't handle errors if the bind/connect succeeded

    - Revert "NFSv4/flexfiles: Abort I/O early if the layout segment was
    invalidat ed"

    Bugfixes:

    - Don't refresh attributes with mounted-on-file information

    - Fix return values for nfs4_file_open() and nfs_finish_open()

    - Fix pnfs layoutstats reporting of I/O errors

    - Don't use soft RPC calls for pNFS/flexfiles I/O, and don't abort
    for soft I/O errors when the user specifies a hard mount.

    - Various fixes to the error handling in sunrpc

    - Don't report writepage()/writepages() errors twice"

    * tag 'nfs-for-5.3-3' of git://git.linux-nfs.org/projects/trondmy/linux-nfs:
    NFS: remove set but not used variable 'mapping'
    NFSv2: Fix write regression
    NFSv2: Fix eof handling
    NFS: Fix writepage(s) error handling to not report errors twice
    NFS: Fix spurious EIO read errors
    pNFS/flexfiles: Don't time out requests on hard mounts
    SUNRPC: Handle connection breakages correctly in call_status()
    Revert "NFSv4/flexfiles: Abort I/O early if the layout segment was invalidated"
    SUNRPC: Handle EADDRINUSE and ENOBUFS correctly
    pNFS/flexfiles: Turn off soft RPC calls
    SUNRPC: Don't handle errors if the bind/connect succeeded
    NFS: On fatal writeback errors, we need to call nfs_inode_remove_request()
    NFS: Fix initialisation of I/O result struct in nfs_pgio_rpcsetup
    NFS: Ensure O_DIRECT reports an error if the bytes read/written is 0
    NFSv4/pnfs: Fix a page lock leak in nfs_pageio_resend()
    NFSv4: Fix return value in nfs_finish_open()
    NFSv4: Fix return values for nfs4_file_open()
    NFS: Don't refresh attributes with mounted-on-file information

    Linus Torvalds
     

27 Aug, 2019

8 commits


26 Aug, 2019

1 commit

  • Pull UBIFS and JFFS2 fixes from Richard Weinberger:
    "UBIFS:
    - Don't block too long in writeback_inodes_sb()
    - Fix for a possible overrun of the log head
    - Fix double unlock in orphan_delete()

    JFFS2:
    - Remove C++ style from UAPI header and unbreak picky toolchains"

    * tag 'for-linus-5.3-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/ubifs:
    ubifs: Limit the number of pages in shrink_liability
    ubifs: Correctly initialize c->min_log_bytes
    ubifs: Fix double unlock around orphan_delete()
    jffs2: Remove C++ style comments from uapi header

    Linus Torvalds
     

25 Aug, 2019

2 commits

  • userfaultfd_release() should clear vm_flags/vm_userfaultfd_ctx even if
    mm->core_state != NULL.

    Otherwise a page fault can see userfaultfd_missing() == T and use an
    already freed userfaultfd_ctx.

    Link: http://lkml.kernel.org/r/20190820160237.GB4983@redhat.com
    Fixes: 04f5866e41fb ("coredump: fix race condition between mmget_not_zero()/get_task_mm() and core dumping")
    Signed-off-by: Oleg Nesterov
    Reported-by: Kefeng Wang
    Reviewed-by: Andrea Arcangeli
    Tested-by: Kefeng Wang
    Cc: Peter Xu
    Cc: Mike Rapoport
    Cc: Jann Horn
    Cc: Jason Gunthorpe
    Cc: Michal Hocko
    Cc: Tetsuo Handa
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Oleg Nesterov
     
  • Pull xfs fix from Darrick Wong:
    "A single patch that fixes a xfs lockup problem when a chown/chgrp
    operation fails due to running out of quota. It has survived the usual
    xfstests runs and merges cleanly with this morning's master:

    - Fix a forgotten inode unlock when chown/chgrp fail due to quota"

    * tag 'xfs-5.3-fixes-6' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux:
    xfs: fix missing ILOCK unlock when xfs_setattr_nonsize fails due to EDQUOT

    Linus Torvalds
     

24 Aug, 2019

3 commits

  • Pull block fixes from Jens Axboe:
    "Here's a set of fixes that should go into this release. This contains:

    - Three minor fixes for NVMe.

    - Three minor tweaks for the io_uring polling logic.

    - Officially mark Song as the MD maintainer, after he's been filling
    that role sucessfully for the last 6 months or so"

    * tag 'for-linus-20190823' of git://git.kernel.dk/linux-block:
    io_uring: add need_resched() check in inner poll loop
    md: update MAINTAINERS info
    io_uring: don't enter poll loop if we have CQEs pending
    nvme: Add quirk for LiteON CL1 devices running FW 22301111
    nvme: Fix cntlid validation when not using NVMEoF
    nvme-multipath: fix possible I/O hang when paths are updated
    io_uring: fix potential hang with polled IO

    Linus Torvalds
     
  • Pull xfs fixes from Darrick Wong:
    "Here are a few more bug fixes that trickled in since the last pull.
    They've survived the usual xfstests runs and merge cleanly with this
    morning's master.

    I expect there to be one more pull request tomorrow for the fix to
    that quota related inode unlock bug that we were reviewing last night,
    but it will continue to soak in the testing machine for several more
    hours.

    - Fix missing compat ioctl handling for get/setlabel

    - Fix missing ioctl pointer sanitization on s390

    - Fix a page locking deadlock in the dedupe comparison code

    - Fix inadequate locking in reflink code w.r.t. concurrent directio

    - Fix broken error detection when breaking layouts"

    * tag 'xfs-5.3-fixes-4' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux:
    fs/xfs: Fix return code of xfs_break_leased_layouts()
    xfs: fix reflink source file racing with directio writes
    vfs: fix page locking deadlocks when deduping files
    xfs: compat_ioctl: use compat_ptr()
    xfs: fall back to native ioctls for unhandled compat ones

    Linus Torvalds
     
  • Pull ceph fixes from Ilya Dryomov:
    "Three important fixes tagged for stable (an indefinite hang, a crash
    on an assert and a NULL pointer dereference) plus a small series from
    Luis fixing instances of vfree() under spinlock"

    * tag 'ceph-for-5.3-rc6' of git://github.com/ceph/ceph-client:
    libceph: fix PG split vs OSD (re)connect race
    ceph: don't try fill file_lock on unsuccessful GETFILELOCK reply
    ceph: clear page dirty before invalidate page
    ceph: fix buffer free while holding i_ceph_lock in fill_inode()
    ceph: fix buffer free while holding i_ceph_lock in __ceph_build_xattrs_blob()
    ceph: fix buffer free while holding i_ceph_lock in __ceph_setxattr()
    libceph: allow ceph_buffer_put() to receive a NULL ceph_buffer

    Linus Torvalds
     

23 Aug, 2019

3 commits

  • Benjamin Moody reported to Debian that XFS partially wedges when a chgrp
    fails on account of being out of disk quota. I ran his reproducer
    script:

    # adduser dummy
    # adduser dummy plugdev

    # dd if=/dev/zero bs=1M count=100 of=test.img
    # mkfs.xfs test.img
    # mount -t xfs -o gquota test.img /mnt
    # mkdir -p /mnt/dummy
    # chown -c dummy /mnt/dummy
    # xfs_quota -xc 'limit -g bsoft=100k bhard=100k plugdev' /mnt

    (and then as user dummy)

    $ dd if=/dev/urandom bs=1M count=50 of=/mnt/dummy/foo
    $ chgrp plugdev /mnt/dummy/foo

    and saw:

    ================================================
    WARNING: lock held when returning to user space!
    5.3.0-rc5 #rc5 Tainted: G W
    ------------------------------------------------
    chgrp/47006 is leaving the kernel with locks still held!
    1 lock held by chgrp/47006:
    #0: 000000006664ea2d (&xfs_nondir_ilock_class){++++}, at: xfs_ilock+0xd2/0x290 [xfs]

    ...which is clearly caused by xfs_setattr_nonsize failing to unlock the
    ILOCK after the xfs_qm_vop_chown_reserve call fails. Add the missing
    unlock.

    Reported-by: benjamin.moody@gmail.com
    Fixes: 253f4911f297 ("xfs: better xfs_trans_alloc interface")
    Signed-off-by: Darrick J. Wong
    Reviewed-by: Dave Chinner
    Tested-by: Salvatore Bonaccorso

    Darrick J. Wong
     
  • The outer poll loop checks for whether we need to reschedule, and
    returns to userspace if we do. However, it's possible to get stuck
    in the inner loop as well, if the CPU we are running on needs to
    reschedule to finish the IO work.

    Add the need_resched() check in the inner loop as well. This fixes
    a potential hang if the kernel is configured with
    CONFIG_PREEMPT_VOLUNTARY=y.

    Reported-by: Sagi Grimberg
    Reviewed-by: Sagi Grimberg
    Tested-by: Sagi Grimberg
    Signed-off-by: Jens Axboe

    Jens Axboe
     
  • Pull AFS fixes from David Howells:

    - Fix a cell record leak due to the default error not being cleared.

    - Fix an oops in tracepoint due to a pointer that may contain an error.

    - Fix the ACL storage op for YFS where the wrong op definition is being
    used. By luck, this only actually affects the information appearing
    in traces.

    * tag 'afs-fixes-20190822' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs:
    afs: use correct afs_call_type in yfs_fs_store_opaque_acl2
    afs: Fix possible oops in afs_lookup trace event
    afs: Fix leak in afs_lookup_cell_rcu()

    Linus Torvalds
     

22 Aug, 2019

12 commits

  • If the number of dirty pages to be written back is large,
    then writeback_inodes_sb will block waiting for a long time,
    causing hung task detection alarm. Therefore, we should limit
    the maximum number of pages written back this time, which let
    the budget be completed faster. The remaining dirty pages
    tend to rely on the writeback mechanism to complete the
    synchronization.

    Fixes: b6e51316daed ("writeback: separate starting of sync vs opportunistic writeback")
    Signed-off-by: Liu Song
    Signed-off-by: Richard Weinberger

    Liu Song
     
  • Currently on a freshly mounted UBIFS, c->min_log_bytes is 0.
    This can lead to a log overrun and make commits fail.

    Recent kernels will report the following assert:
    UBIFS assert failed: c->lhead_lnum != c->ltail_lnum, in fs/ubifs/log.c:412

    c->min_log_bytes can have two states, 0 and c->leb_size.
    It controls how much bytes of the log area are reserved for non-bud
    nodes such as commit nodes.

    After a commit it has to be set to c->leb_size such that we have always
    enough space for a commit. While a commit runs it can be 0 to make the
    remaining bytes of the log available to writers.

    Having it set to 0 right after mount is wrong since no space for commits
    is reserved.

    Fixes: 1e51764a3c2ac ("UBIFS: add new flash file system")
    Reported-and-tested-by: Uwe Kleine-König
    Signed-off-by: Richard Weinberger

    Richard Weinberger
     
  • We unlock after orphan_delete(), so no need to unlock
    in the function too.

    Reported-by: Han Xu
    Fixes: 8009ce956c3d ("ubifs: Don't leak orphans on memory during commit")
    Signed-off-by: Richard Weinberger

    Richard Weinberger
     
  • It seems that 'yfs_RXYFSStoreOpaqueACL2' should be use in
    yfs_fs_store_opaque_acl2().

    Fixes: f5e4546347bc ("afs: Implement YFS ACL setting")
    Signed-off-by: YueHaibing
    Signed-off-by: David Howells

    YueHaibing
     
  • The afs_lookup trace event can cause the following:

    [ 216.576777] BUG: kernel NULL pointer dereference, address: 000000000000023b
    [ 216.576803] #PF: supervisor read access in kernel mode
    [ 216.576813] #PF: error_code(0x0000) - not-present page
    ...
    [ 216.576913] RIP: 0010:trace_event_raw_event_afs_lookup+0x9e/0x1c0 [kafs]

    If the inode from afs_do_lookup() is an error other than ENOENT, or if it
    is ENOENT and afs_try_auto_mntpt() returns an error, the trace event will
    try to dereference the error pointer as a valid pointer.

    Use IS_ERR_OR_NULL to only pass a valid pointer for the trace, or NULL.

    Ideally the trace would include the error value, but for now just avoid
    the oops.

    Fixes: 80548b03991f ("afs: Add more tracepoints")
    Signed-off-by: Marc Dionne
    Signed-off-by: David Howells

    Marc Dionne
     
  • Fix a leak on the cell refcount in afs_lookup_cell_rcu() due to
    non-clearance of the default error in the case a NULL cell name is passed
    and the workstation default cell is used.

    Also put a bit at the end to make sure we don't leak a cell ref if we're
    going to be returning an error.

    This leak results in an assertion like the following when the kafs module is
    unloaded:

    AFS: Assertion failed
    2 == 1 is false
    0x2 == 0x1 is false
    ------------[ cut here ]------------
    kernel BUG at fs/afs/cell.c:770!
    ...
    RIP: 0010:afs_manage_cells+0x220/0x42f [kafs]
    ...
    process_one_work+0x4c2/0x82c
    ? pool_mayday_timeout+0x1e1/0x1e1
    ? do_raw_spin_lock+0x134/0x175
    worker_thread+0x336/0x4a6
    ? rescuer_thread+0x4af/0x4af
    kthread+0x1de/0x1ee
    ? kthread_park+0xd4/0xd4
    ret_from_fork+0x24/0x30

    Fixes: 989782dcdc91 ("afs: Overhaul cell database management")
    Signed-off-by: David Howells

    David Howells
     
  • When ceph_mdsc_do_request returns an error, we can't assume that the
    filelock_reply pointer will be set. Only try to fetch fields out of
    the r_reply_info when it returns success.

    Cc: stable@vger.kernel.org
    Reported-by: Hector Martin
    Signed-off-by: Jeff Layton
    Reviewed-by: "Yan, Zheng"
    Signed-off-by: Ilya Dryomov

    Jeff Layton
     
  • clear_page_dirty_for_io(page) before mapping->a_ops->invalidatepage().
    invalidatepage() clears page's private flag, if dirty flag is not
    cleared, the page may cause BUG_ON failure in ceph_set_page_dirty().

    Cc: stable@vger.kernel.org
    Link: https://tracker.ceph.com/issues/40862
    Signed-off-by: Erqi Chen
    Reviewed-by: Jeff Layton
    Signed-off-by: Ilya Dryomov

    Erqi Chen
     
  • Calling ceph_buffer_put() in fill_inode() may result in freeing the
    i_xattrs.blob buffer while holding the i_ceph_lock. This can be fixed by
    postponing the call until later, when the lock is released.

    The following backtrace was triggered by fstests generic/070.

    BUG: sleeping function called from invalid context at mm/vmalloc.c:2283
    in_atomic(): 1, irqs_disabled(): 0, pid: 3852, name: kworker/0:4
    6 locks held by kworker/0:4/3852:
    #0: 000000004270f6bb ((wq_completion)ceph-msgr){+.+.}, at: process_one_work+0x1b8/0x5f0
    #1: 00000000eb420803 ((work_completion)(&(&con->work)->work)){+.+.}, at: process_one_work+0x1b8/0x5f0
    #2: 00000000be1c53a4 (&s->s_mutex){+.+.}, at: dispatch+0x288/0x1476
    #3: 00000000559cb958 (&mdsc->snap_rwsem){++++}, at: dispatch+0x2eb/0x1476
    #4: 000000000d5ebbae (&req->r_fill_mutex){+.+.}, at: dispatch+0x2fc/0x1476
    #5: 00000000a83d0514 (&(&ci->i_ceph_lock)->rlock){+.+.}, at: fill_inode.isra.0+0xf8/0xf70
    CPU: 0 PID: 3852 Comm: kworker/0:4 Not tainted 5.2.0+ #441
    Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.12.1-0-ga5cab58-prebuilt.qemu.org 04/01/2014
    Workqueue: ceph-msgr ceph_con_workfn
    Call Trace:
    dump_stack+0x67/0x90
    ___might_sleep.cold+0x9f/0xb1
    vfree+0x4b/0x60
    ceph_buffer_release+0x1b/0x60
    fill_inode.isra.0+0xa9b/0xf70
    ceph_fill_trace+0x13b/0xc70
    ? dispatch+0x2eb/0x1476
    dispatch+0x320/0x1476
    ? __mutex_unlock_slowpath+0x4d/0x2a0
    ceph_con_workfn+0xc97/0x2ec0
    ? process_one_work+0x1b8/0x5f0
    process_one_work+0x244/0x5f0
    worker_thread+0x4d/0x3e0
    kthread+0x105/0x140
    ? process_one_work+0x5f0/0x5f0
    ? kthread_park+0x90/0x90
    ret_from_fork+0x3a/0x50

    Signed-off-by: Luis Henriques
    Reviewed-by: Jeff Layton
    Signed-off-by: Ilya Dryomov

    Luis Henriques
     
  • Calling ceph_buffer_put() in __ceph_build_xattrs_blob() may result in
    freeing the i_xattrs.blob buffer while holding the i_ceph_lock. This can
    be fixed by having this function returning the old blob buffer and have
    the callers of this function freeing it when the lock is released.

    The following backtrace was triggered by fstests generic/117.

    BUG: sleeping function called from invalid context at mm/vmalloc.c:2283
    in_atomic(): 1, irqs_disabled(): 0, pid: 649, name: fsstress
    4 locks held by fsstress/649:
    #0: 00000000a7478e7e (&type->s_umount_key#19){++++}, at: iterate_supers+0x77/0xf0
    #1: 00000000f8de1423 (&(&ci->i_ceph_lock)->rlock){+.+.}, at: ceph_check_caps+0x7b/0xc60
    #2: 00000000562f2b27 (&s->s_mutex){+.+.}, at: ceph_check_caps+0x3bd/0xc60
    #3: 00000000f83ce16a (&mdsc->snap_rwsem){++++}, at: ceph_check_caps+0x3ed/0xc60
    CPU: 1 PID: 649 Comm: fsstress Not tainted 5.2.0+ #439
    Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.12.1-0-ga5cab58-prebuilt.qemu.org 04/01/2014
    Call Trace:
    dump_stack+0x67/0x90
    ___might_sleep.cold+0x9f/0xb1
    vfree+0x4b/0x60
    ceph_buffer_release+0x1b/0x60
    __ceph_build_xattrs_blob+0x12b/0x170
    __send_cap+0x302/0x540
    ? __lock_acquire+0x23c/0x1e40
    ? __mark_caps_flushing+0x15c/0x280
    ? _raw_spin_unlock+0x24/0x30
    ceph_check_caps+0x5f0/0xc60
    ceph_flush_dirty_caps+0x7c/0x150
    ? __ia32_sys_fdatasync+0x20/0x20
    ceph_sync_fs+0x5a/0x130
    iterate_supers+0x8f/0xf0
    ksys_sync+0x4f/0xb0
    __ia32_sys_sync+0xa/0x10
    do_syscall_64+0x50/0x1c0
    entry_SYSCALL_64_after_hwframe+0x49/0xbe
    RIP: 0033:0x7fc6409ab617

    Signed-off-by: Luis Henriques
    Reviewed-by: Jeff Layton
    Signed-off-by: Ilya Dryomov

    Luis Henriques
     
  • Calling ceph_buffer_put() in __ceph_setxattr() may end up freeing the
    i_xattrs.prealloc_blob buffer while holding the i_ceph_lock. This can be
    fixed by postponing the call until later, when the lock is released.

    The following backtrace was triggered by fstests generic/117.

    BUG: sleeping function called from invalid context at mm/vmalloc.c:2283
    in_atomic(): 1, irqs_disabled(): 0, pid: 650, name: fsstress
    3 locks held by fsstress/650:
    #0: 00000000870a0fe8 (sb_writers#8){.+.+}, at: mnt_want_write+0x20/0x50
    #1: 00000000ba0c4c74 (&type->i_mutex_dir_key#6){++++}, at: vfs_setxattr+0x55/0xa0
    #2: 000000008dfbb3f2 (&(&ci->i_ceph_lock)->rlock){+.+.}, at: __ceph_setxattr+0x297/0x810
    CPU: 1 PID: 650 Comm: fsstress Not tainted 5.2.0+ #437
    Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.12.1-0-ga5cab58-prebuilt.qemu.org 04/01/2014
    Call Trace:
    dump_stack+0x67/0x90
    ___might_sleep.cold+0x9f/0xb1
    vfree+0x4b/0x60
    ceph_buffer_release+0x1b/0x60
    __ceph_setxattr+0x2b4/0x810
    __vfs_setxattr+0x66/0x80
    __vfs_setxattr_noperm+0x59/0xf0
    vfs_setxattr+0x81/0xa0
    setxattr+0x115/0x230
    ? filename_lookup+0xc9/0x140
    ? rcu_read_lock_sched_held+0x74/0x80
    ? rcu_sync_lockdep_assert+0x2e/0x60
    ? __sb_start_write+0x142/0x1a0
    ? mnt_want_write+0x20/0x50
    path_setxattr+0xba/0xd0
    __x64_sys_lsetxattr+0x24/0x30
    do_syscall_64+0x50/0x1c0
    entry_SYSCALL_64_after_hwframe+0x49/0xbe
    RIP: 0033:0x7ff23514359a

    Signed-off-by: Luis Henriques
    Reviewed-by: Jeff Layton
    Signed-off-by: Ilya Dryomov

    Luis Henriques
     
  • Pull nfsd fixes from Bruce Fields:
    "Fix nfsd bugs: three in the new nfsd/clients/ code, one in the reply
    cache containerization"

    * tag 'nfsd-5.3-1' of git://linux-nfs.org/~bfields/linux:
    nfsd4: Fix kernel crash when reading proc file reply_cache_stats
    nfsd: initialize i_private before d_add
    nfsd: use i_wrlock instead of rcu for nfsdfs i_private
    nfsd: fix dentry leak upon mkdir failure.

    Linus Torvalds
     

21 Aug, 2019

2 commits

  • We need to check if we have CQEs pending before starting a poll loop,
    as those could be the events we will be spinning for (and hence we'll
    find none). This can happen if a CQE triggers an error, or if it is
    found by eg an IRQ before we get a chance to find it through polling.

    Signed-off-by: Jens Axboe

    Jens Axboe
     
  • If a request issue ends up being punted to async context to avoid
    blocking, we can get into a situation where the original application
    enters the poll loop for that very request before it has been issued.
    This should not be an issue, except that the polling will hold the
    io_uring uring_ctx mutex for the duration of the poll. When the async
    worker has actually issued the request, it needs to acquire this mutex
    to add the request to the poll issued list. Since the application
    polling is already holding this mutex, the workqueue sleeps on the
    mutex forever, and the application thus never gets a chance to poll for
    the very request it was interested in.

    Fix this by ensuring that the polling drops the uring_ctx occasionally
    if it's not making any progress.

    Reported-by: Jeffrey M. Birnbaum
    Signed-off-by: Jens Axboe

    Jens Axboe
     

20 Aug, 2019

2 commits

  • The parens used in the while loop would result in error being assigned
    the value 1 rather than the intended errno value.

    This is required to return -ETXTBSY from follow on break_layout()
    changes.

    Signed-off-by: Ira Weiny
    Reviewed-by: Darrick J. Wong
    Signed-off-by: Darrick J. Wong

    Ira Weiny
     
  • …iederm/user-namespace

    Pull kernel thread signal handling fix from Eric Biederman:
    "I overlooked the fact that kernel threads are created with all signals
    set to SIG_IGN, and accidentally caused a regression in cifs and drbd
    when replacing force_sig with send_sig.

    This is my fix for that regression. I add a new function
    allow_kernel_signal which allows kernel threads to receive signals
    sent from the kernel, but continues to ignore all signals sent from
    userspace. This ensures the user space interface for cifs and drbd
    remain the same.

    These kernel threads depend on blocking networking calls which block
    until something is received or a signal is pending. Making receiving
    of signals somewhat necessary for these kernel threads.

    Perhaps someday we can cleanup those interfaces and remove
    allow_kernel_signal. If not allow_kernel_signal is pretty trivial and
    clearly documents what is going on so I don't think we will mind
    carrying it"

    * 'siginfo-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace:
    signal: Allow cifs and drbd to receive their terminating signals

    Linus Torvalds