1. 20 Feb, 2019 35 commits
  2. 15 Feb, 2019 5 commits
    • Greg Kroah-Hartman's avatar
      Linux 4.14.101 · d6bf9dce
      Greg Kroah-Hartman authored
      d6bf9dce
    • Linus Torvalds's avatar
      Revert "exec: load_script: don't blindly truncate shebang string" · 56f88d75
      Linus Torvalds authored
      commit cb5b020a upstream.
      
      This reverts commit 8099b047.
      
      It turns out that people do actually depend on the shebang string being
      truncated, and on the fact that an interpreter (like perl) will often
      just re-interpret it entirely to get the full argument list.
      Reported-by: default avatarSamuel Dionne-Riel <samuel@dionne-riel.com>
      Acked-by: default avatarKees Cook <keescook@chromium.org>
      Cc: Oleg Nesterov <oleg@redhat.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      56f88d75
    • Greg Kroah-Hartman's avatar
      Linux 4.14.100 · 557ac4e2
      Greg Kroah-Hartman authored
      557ac4e2
    • Xiubo Li's avatar
      Revert "uio: use request_threaded_irq instead" · f142573d
      Xiubo Li authored
      commit 3d27c4de upstream.
      
      Since mutex lock in irq hanler is useless currently, here will
      remove it together with it.
      
      This reverts commit 9421e45f.
      
      Reported-by: james.r.harris@intel.com
      CC: Ahsan Atta <ahsan.atta@intel.com>
      Signed-off-by: default avatarXiubo Li <xiubli@redhat.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: default avatarTommi Rantala <tommi.t.rantala@nokia.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      f142573d
    • Xiubo Li's avatar
      uio: fix possible circular locking dependency · 5d07d245
      Xiubo Li authored
      commit b34e9a15 upstream.
      
      The call trace:
      XXX/1910 is trying to acquire lock:
       (&mm->mmap_sem){++++++}, at: [<ffffffff97008c87>] might_fault+0x57/0xb0
      
      but task is already holding lock:
       (&idev->info_lock){+.+...}, at: [<ffffffffc0638a06>] uio_write+0x46/0x130 [uio]
      
      which lock already depends on the new lock.
      
      the existing dependency chain (in reverse order) is:
      
      -> #1 (&idev->info_lock){+.+...}:
             [<ffffffff96f31fc9>] lock_acquire+0x99/0x1e0
             [<ffffffff975edad3>] mutex_lock_nested+0x93/0x410
             [<ffffffffc063873d>] uio_mmap+0x2d/0x170 [uio]
             [<ffffffff97016b58>] mmap_region+0x428/0x650
             [<ffffffff97017138>] do_mmap+0x3b8/0x4e0
             [<ffffffff96ffaba3>] vm_mmap_pgoff+0xd3/0x120
             [<ffffffff97015261>] SyS_mmap_pgoff+0x1f1/0x270
             [<ffffffff96e387c2>] SyS_mmap+0x22/0x30
             [<ffffffff975ff315>] system_call_fastpath+0x1c/0x21
      
      -> #0 (&mm->mmap_sem){++++++}:
             [<ffffffff96f30e9c>] __lock_acquire+0xdac/0x15f0
             [<ffffffff96f31fc9>] lock_acquire+0x99/0x1e0
             [<ffffffff97008cb4>] might_fault+0x84/0xb0
             [<ffffffffc0638a74>] uio_write+0xb4/0x130 [uio]
             [<ffffffff9706ffa3>] vfs_write+0xc3/0x1f0
             [<ffffffff97070e2a>] SyS_write+0x8a/0x100
             [<ffffffff975ff315>] system_call_fastpath+0x1c/0x21
      
      other info that might help us debug this:
       Possible unsafe locking scenario:
             CPU0                    CPU1
             ----                    ----
        lock(&idev->info_lock);
                                     lock(&mm->mmap_sem);
                                     lock(&idev->info_lock);
        lock(&mm->mmap_sem);
      
       *** DEADLOCK ***
      1 lock held by XXX/1910:
       #0:  (&idev->info_lock){+.+...}, at: [<ffffffffc0638a06>] uio_write+0x46/0x130 [uio]
      
      stack backtrace:
      CPU: 0 PID: 1910 Comm: XXX Kdump: loaded Not tainted #1
      Hardware name: VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform, BIOS 6.00 05/19/2017
      Call Trace:
       [<ffffffff975e9211>] dump_stack+0x19/0x1b
       [<ffffffff975e260a>] print_circular_bug+0x1f9/0x207
       [<ffffffff96f2f6a7>] check_prevs_add+0x957/0x960
       [<ffffffff96f30e9c>] __lock_acquire+0xdac/0x15f0
       [<ffffffff96f2fb19>] ? mark_held_locks+0xb9/0x140
       [<ffffffff96f31fc9>] lock_acquire+0x99/0x1e0
       [<ffffffff97008c87>] ? might_fault+0x57/0xb0
       [<ffffffff97008cb4>] might_fault+0x84/0xb0
       [<ffffffff97008c87>] ? might_fault+0x57/0xb0
       [<ffffffffc0638a74>] uio_write+0xb4/0x130 [uio]
       [<ffffffff9706ffa3>] vfs_write+0xc3/0x1f0
       [<ffffffff9709349c>] ? fget_light+0xfc/0x510
       [<ffffffff97070e2a>] SyS_write+0x8a/0x100
       [<ffffffff975ff315>] system_call_fastpath+0x1c/0x21
      Signed-off-by: default avatarXiubo Li <xiubli@redhat.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: default avatarTommi Rantala <tommi.t.rantala@nokia.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      5d07d245