1. 22 2月, 2017 1 次提交
  2. 14 2月, 2017 3 次提交
    • K
      cdrom: Make device operations read-only · 853fe1bf
      Kees Cook 提交于
      Since function tables are a common target for attackers, it's best to keep
      them in read-only memory. As such, this makes the CDROM device ops tables
      const. This drops additionally n_minors, since it isn't used meaningfully,
      and sets the only user of cdrom_dummy_generic_packet explicitly so the
      variables can all be const.
      
      Inspired by similar changes in grsecurity/PaX.
      Signed-off-by: NKees Cook <keescook@chromium.org>
      Acked-by: NDavid S. Miller <davem@davemloft.net>
      Signed-off-by: NJens Axboe <axboe@fb.com>
      853fe1bf
    • C
      cciss: switch to pci_irq_alloc_vectors · c5c9b26e
      Christoph Hellwig 提交于
      Simple cleanup to use the new APIs.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Acked-by: NDon Brace <don.brace@microsemi.com>
      Tested-by: NDon Brace <don.brace@microsemi.com>
      Signed-off-by: NJens Axboe <axboe@fb.com>
      c5c9b26e
    • M
      block/loop: fix race between I/O and set_status · ecdd0959
      Ming Lei 提交于
      Inside set_status, transfer need to setup again, so
      we have to drain IO before the transition, otherwise
      oops may be triggered like the following:
      
      	divide error: 0000 [#1] SMP KASAN
      	CPU: 0 PID: 2935 Comm: loop7 Not tainted 4.10.0-rc7+ #213
      	Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs
      	01/01/2011
      	task: ffff88006ba1e840 task.stack: ffff880067338000
      	RIP: 0010:transfer_xor+0x1d1/0x440 drivers/block/loop.c:110
      	RSP: 0018:ffff88006733f108 EFLAGS: 00010246
      	RAX: 0000000000000000 RBX: ffff8800688d7000 RCX: 0000000000000059
      	RDX: 0000000000000000 RSI: 1ffff1000d743f43 RDI: ffff880068891c08
      	RBP: ffff88006733f160 R08: ffff8800688d7001 R09: 0000000000000000
      	R10: 0000000000000000 R11: 0000000000000000 R12: ffff8800688d7000
      	R13: ffff880067b7d000 R14: dffffc0000000000 R15: 0000000000000000
      	FS:  0000000000000000(0000) GS:ffff88006d000000(0000)
      	knlGS:0000000000000000
      	CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      	CR2: 00000000006c17e0 CR3: 0000000066e3b000 CR4: 00000000001406f0
      	Call Trace:
      	 lo_do_transfer drivers/block/loop.c:251 [inline]
      	 lo_read_transfer drivers/block/loop.c:392 [inline]
      	 do_req_filebacked drivers/block/loop.c:541 [inline]
      	 loop_handle_cmd drivers/block/loop.c:1677 [inline]
      	 loop_queue_work+0xda0/0x49b0 drivers/block/loop.c:1689
      	 kthread_worker_fn+0x4c3/0xa30 kernel/kthread.c:630
      	 kthread+0x326/0x3f0 kernel/kthread.c:227
      	 ret_from_fork+0x31/0x40 arch/x86/entry/entry_64.S:430
      	Code: 03 83 e2 07 41 29 df 42 0f b6 04 30 4d 8d 44 24 01 38 d0 7f 08
      	84 c0 0f 85 62 02 00 00 44 89 f8 41 0f b6 48 ff 25 ff 01 00 00 99 <f7>
      	7d c8 48 63 d2 48 03 55 d0 48 89 d0 48 89 d7 48 c1 e8 03 83
      	RIP: transfer_xor+0x1d1/0x440 drivers/block/loop.c:110 RSP:
      	ffff88006733f108
      	---[ end trace 0166f7bd3b0c0933 ]---
      Reported-by: NDmitry Vyukov <dvyukov@google.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: NMing Lei <tom.leiming@gmail.com>
      Tested-by: NDmitry Vyukov <dvyukov@google.com>
      Signed-off-by: NJens Axboe <axboe@fb.com>
      ecdd0959
  3. 03 2月, 2017 1 次提交
  4. 02 2月, 2017 3 次提交
  5. 01 2月, 2017 8 次提交
  6. 31 1月, 2017 2 次提交
  7. 28 1月, 2017 1 次提交
  8. 24 1月, 2017 2 次提交
  9. 20 1月, 2017 1 次提交
  10. 14 1月, 2017 3 次提交
    • P
      locking/atomic, kref: Kill kref_sub() · bdfafc4f
      Peter Zijlstra 提交于
      By general sentiment kref_sub() is a bad interface, make it go away.
      Signed-off-by: NPeter Zijlstra (Intel) <peterz@infradead.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: linux-kernel@vger.kernel.org
      Signed-off-by: NIngo Molnar <mingo@kernel.org>
      bdfafc4f
    • P
      locking/atomic, kref: Add kref_read() · 2c935bc5
      Peter Zijlstra 提交于
      Since we need to change the implementation, stop exposing internals.
      
      Provide kref_read() to read the current reference count; typically
      used for debug messages.
      
      Kills two anti-patterns:
      
      	atomic_read(&kref->refcount)
      	kref->refcount.counter
      Signed-off-by: NPeter Zijlstra (Intel) <peterz@infradead.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: linux-kernel@vger.kernel.org
      Signed-off-by: NIngo Molnar <mingo@kernel.org>
      2c935bc5
    • P
      locking/atomic, kref: Add KREF_INIT() · 1e24edca
      Peter Zijlstra 提交于
      Since we need to change the implementation, stop exposing internals.
      
      Provide KREF_INIT() to allow static initialization of struct kref.
      Signed-off-by: NPeter Zijlstra (Intel) <peterz@infradead.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: linux-kernel@vger.kernel.org
      Signed-off-by: NIngo Molnar <mingo@kernel.org>
      1e24edca
  11. 12 1月, 2017 1 次提交
  12. 11 1月, 2017 5 次提交
  13. 26 12月, 2016 1 次提交
    • T
      ktime: Cleanup ktime_set() usage · 8b0e1953
      Thomas Gleixner 提交于
      ktime_set(S,N) was required for the timespec storage type and is still
      useful for situations where a Seconds and Nanoseconds part of a time value
      needs to be converted. For anything where the Seconds argument is 0, this
      is pointless and can be replaced with a simple assignment.
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Cc: Peter Zijlstra <peterz@infradead.org>
      8b0e1953
  14. 25 12月, 2016 1 次提交
  15. 13 12月, 2016 1 次提交
  16. 09 12月, 2016 2 次提交
  17. 08 12月, 2016 1 次提交
  18. 04 12月, 2016 1 次提交
    • J
      nbd: fix 64-bit division · e88f72cb
      Jens Axboe 提交于
      We have this:
      
      ERROR: "__aeabi_ldivmod" [drivers/block/nbd.ko] undefined!
      ERROR: "__divdi3" [drivers/block/nbd.ko] undefined!
      nbd.c:(.text+0x247c72): undefined reference to `__divdi3'
      
      due to a recent commit, that did 64-bit division. Use the proper
      divider function so that 32-bit compiles don't break.
      
      Fixes: ef77b515 ("nbd: use loff_t for blocksize and nbd_set_size args")
      Signed-off-by: NJens Axboe <axboe@fb.com>
      e88f72cb
  19. 03 12月, 2016 1 次提交
  20. 02 12月, 2016 1 次提交