1. 04 Dec, 2015 1 commit
    • Jiri Slaby's avatar
      hwrng: core - sleep interruptible in read · 1ab87298
      Jiri Slaby authored
      hwrng kthread can be waiting via hwrng_fillfn for some data from a rng
      like virtio-rng:
      hwrng           D ffff880093e17798     0   382      2 0x00000000
      ...
      Call Trace:
       [<ffffffff817339c6>] wait_for_completion_killable+0x96/0x210
       [<ffffffffa00aa1b7>] virtio_read+0x57/0xf0 [virtio_rng]
       [<ffffffff814f4a35>] hwrng_fillfn+0x75/0x130
       [<ffffffff810aa243>] kthread+0xf3/0x110
      
      And when some user program tries to read the /dev node in this state,
      we get:
      rngd            D ffff880093e17798     0   762      1 0x00000004
      ...
      Call Trace:
       [<ffffffff817351ac>] mutex_lock_nested+0x15c/0x3e0
       [<ffffffff814f478e>] rng_dev_read+0x6e/0x240
       [<ffffffff81231958>] __vfs_read+0x28/0xe0
       [<ffffffff81232393>] vfs_read+0x83/0x130
      
      And this is indeed unkillable. So use mutex_lock_interruptible
      instead of mutex_lock in rng_dev_read and exit immediatelly when
      interrupted. And possibly return already read data, if any (as POSIX
      allows).
      
      v2: use ERESTARTSYS instead of EINTR
      Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
      Cc: Matt Mackall <mpm@selenic.com>
      Cc: Herbert Xu <herbert@gondor.apana.org.au>
      Cc: <linux-crypto@vger.kernel.org>
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      1ab87298
  2. 27 Nov, 2015 3 commits
  3. 24 Nov, 2015 3 commits
  4. 23 Nov, 2015 8 commits
  5. 17 Nov, 2015 19 commits
  6. 16 Nov, 2015 3 commits
  7. 15 Nov, 2015 3 commits
    • Linus Torvalds's avatar
      Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 0ca9b676
      Linus Torvalds authored
      Pull perf updates from Thomas Gleixner:
       "Mostly updates to the perf tool plus two fixes to the kernel core code:
      
         - Handle tracepoint filters correctly for inherited events (Peter
           Zijlstra)
      
         - Prevent a deadlock in perf_lock_task_context (Paul McKenney)
      
         - Add missing newlines to some pr_err() calls (Arnaldo Carvalho de
           Melo)
      
         - Print full source file paths when using 'perf annotate --print-line
           --full-paths' (Michael Petlan)
      
         - Fix 'perf probe -d' when just one out of uprobes and kprobes is
           enabled (Wang Nan)
      
         - Add compiler.h to list.h to fix 'make perf-tar-src-pkg' generated
           tarballs, i.e. out of tree building (Arnaldo Carvalho de Melo)
      
         - Add the llvm-src-base.c and llvm-src-kbuild.c files, generated by
           the 'perf test' LLVM entries, when running it in-tree, to
           .gitignore (Yunlong Song)
      
         - libbpf error reporting improvements, using a strerror interface to
           more precisely tell the user about problems with the provided
           scriptlet, be it in C or as a ready made object file (Wang Nan)
      
         - Do not be case sensitive when searching for matching 'perf test'
           entries (Arnaldo Carvalho de Melo)
      
         - Inform the user about objdump failures in 'perf annotate' (Andi
           Kleen)
      
         - Improve the LLVM 'perf test' entry, introduce a new ones for BPF
           and kbuild tests to check the environment used by clang to compile
           .c scriptlets (Wang Nan)"
      
      * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (32 commits)
        perf/x86/intel/rapl: Remove the unused RAPL_EVENT_DESC() macro
        tools include: Add compiler.h to list.h
        perf probe: Verify parameters in two functions
        perf session: Add missing newlines to some pr_err() calls
        perf annotate: Support full source file paths for srcline fix
        perf test: Add llvm-src-base.c and llvm-src-kbuild.c to .gitignore
        perf: Fix inherited events vs. tracepoint filters
        perf: Disable IRQs across RCU RS CS that acquires scheduler lock
        perf test: Do not be case sensitive when searching for matching tests
        perf test: Add 'perf test BPF'
        perf test: Enhance the LLVM tests: add kbuild test
        perf test: Enhance the LLVM test: update basic BPF test program
        perf bpf: Improve BPF related error messages
        perf tools: Make fetch_kernel_version() publicly available
        bpf tools: Add new API bpf_object__get_kversion()
        bpf tools: Improve libbpf error reporting
        perf probe: Cleanup find_perf_probe_point_from_map to reduce redundancy
        perf annotate: Inform the user about objdump failures in --stdio
        perf stat: Make stat options global
        perf sched latency: Fix thread pid reuse issue
        ...
      0ca9b676
    • Linus Torvalds's avatar
      Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 051b29f2
      Linus Torvalds authored
      Pull scheduler fix from Thomas Gleixner:
       "A single fix to prevent math underflow in the numa balancing code"
      
      * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        sched/numa: Fix math underflow in task_tick_numa()
      051b29f2
    • Linus Torvalds's avatar
      Merge branch 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 8f98e292
      Linus Torvalds authored
      Pull liblockdep fixes from Thomas Gleixner:
       "Three small patches to synchronize liblockdep with the latest core
        changes"
      
      * 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        tools/liblockdep: explicitly declare lockdep API we call from liblockdep
        tools/liblockdep: add userspace versions of WRITE_ONCE and RCU_INIT_POINTER
        tools/liblockdep: remove task argument from debug_check_no_locks_held
      8f98e292