1. 02 1月, 2017 11 次提交
  2. 26 12月, 2016 2 次提交
    • 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
    • T
      ktime: Get rid of the union · 2456e855
      Thomas Gleixner 提交于
      ktime is a union because the initial implementation stored the time in
      scalar nanoseconds on 64 bit machine and in a endianess optimized timespec
      variant for 32bit machines. The Y2038 cleanup removed the timespec variant
      and switched everything to scalar nanoseconds. The union remained, but
      become completely pointless.
      
      Get rid of the union and just keep ktime_t as simple typedef of type s64.
      
      The conversion was done with coccinelle and some manual mopping up.
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Cc: Peter Zijlstra <peterz@infradead.org>
      2456e855
  3. 25 12月, 2016 1 次提交
  4. 15 12月, 2016 1 次提交
  5. 14 12月, 2016 1 次提交
  6. 10 12月, 2016 1 次提交
  7. 09 12月, 2016 6 次提交
  8. 07 12月, 2016 2 次提交
  9. 06 12月, 2016 3 次提交
    • S
      usbip: fix warning in vhci_hcd_probe/lockdep_init_map · 918b8ac5
      Shuah Khan 提交于
      vhci_hcd calls sysfs_create_group() with dynamically allocated sysfs
      attributes triggering the lock-class key not persistent warning. Call
      sysfs_attr_init() for dynamically allocated sysfs attributes to fix it.
      
      vhci_hcd vhci_hcd: USB/IP Virtual Host Controller
      vhci_hcd vhci_hcd: new USB bus registered, assigned bus number 2
      BUG: key ffff88006a7e8d18 not in .data!
      ------------[ cut here ]------------
      WARNING: CPU: 0 PID: 1 at kernel/locking/lockdep.c:3131
      lockdep_init_map+0x60c/0x770
      DEBUG_LOCKS_WARN_ON(1)[    1.567044] Modules linked in:
      CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.9.0-rc7+ #58
      Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011
       ffff88006bce6eb8 ffffffff81f96c8a ffffffff00000a02 1ffff1000d79cd6a
       ffffed000d79cd62 000000046bce6ed8 0000000041b58ab3 ffffffff8598af40
       ffffffff81f969f8 0000000000000000 0000000041b58ab3 0000000000000200
      Call Trace:
       [<     inline     >] __dump_stack lib/dump_stack.c:15
       [<ffffffff81f96c8a>] dump_stack+0x292/0x398 lib/dump_stack.c:51
       [<ffffffff812b808f>] __warn+0x19f/0x1e0 kernel/panic.c:550
       [<ffffffff812b8195>] warn_slowpath_fmt+0xc5/0x110 kernel/panic.c:565
       [<ffffffff813f3efc>] lockdep_init_map+0x60c/0x770 kernel/locking/lockdep.c:3131
       [<ffffffff819e43d4>] __kernfs_create_file+0x114/0x2a0 fs/kernfs/file.c:954
       [<ffffffff819e68f5>] sysfs_add_file_mode_ns+0x225/0x520 fs/sysfs/file.c:305
       [<     inline     >] create_files fs/sysfs/group.c:64
       [<ffffffff819e8a89>] internal_create_group+0x239/0x8f0 fs/sysfs/group.c:134
       [<ffffffff819e915f>] sysfs_create_group+0x1f/0x30 fs/sysfs/group.c:156
       [<ffffffff8323de24>] vhci_start+0x5b4/0x7a0 drivers/usb/usbip/vhci_hcd.c:978
       [<ffffffff82c907ca>] usb_add_hcd+0x8da/0x1c60 drivers/usb/core/hcd.c:2867
       [<ffffffff8323bc57>] vhci_hcd_probe+0x97/0x130
      drivers/usb/usbip/vhci_hcd.c:1103
       ---
       ---
      ---[ end trace c33c7b202cf3aac8 ]---
      Signed-off-by: NShuah Khan <shuahkh@osg.samsung.com>
      Reported-by: NAndrey Konovalov <andreyknvl@google.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      918b8ac5
    • R
      usb: core: usbport: Use proper LED API to fix potential crash · 89778ba3
      Rafał Miłecki 提交于
      Calling brightness_set manually isn't safe as some LED drivers don't
      implement this callback. The best idea is to just use a proper helper
      which will fallback to the brightness_set_blocking callback if needed.
      
      This fixes:
      [ 1461.761528] Unable to handle kernel NULL pointer dereference at virtual address 00000000
      (...)
      [ 1462.117049] Backtrace:
      [ 1462.119521] [<bf228164>] (usbport_trig_port_store [ledtrig_usbport]) from [<c023f758>] (dev_attr_store+0x20/0x2c)
      [ 1462.129826]  r7:dcabc7c0 r6:dee0ff80 r5:00000002 r4:bf228164
      [ 1462.135511] [<c023f738>] (dev_attr_store) from [<c0169310>] (sysfs_kf_write+0x48/0x4c)
      [ 1462.143459]  r5:00000002 r4:c023f738
      [ 1462.147049] [<c01692c8>] (sysfs_kf_write) from [<c0168ab8>] (kernfs_fop_write+0xf8/0x1f8)
      [ 1462.155258]  r5:00000002 r4:df4a1000
      [ 1462.158850] [<c01689c0>] (kernfs_fop_write) from [<c0100c78>] (__vfs_write+0x34/0x120)
      [ 1462.166800]  r10:00000000 r9:dee0e000 r8:c000fc24 r7:00000002 r6:dee0ff80 r5:c01689c0
      [ 1462.174660]  r4:df727a80
      [ 1462.177204] [<c0100c44>] (__vfs_write) from [<c0101ae4>] (vfs_write+0xac/0x170)
      [ 1462.184543]  r9:dee0e000 r8:c000fc24 r7:dee0ff80 r6:b6f092d0 r5:df727a80 r4:00000002
      [ 1462.192319] [<c0101a38>] (vfs_write) from [<c01028dc>] (SyS_write+0x4c/0xa8)
      [ 1462.199396]  r9:dee0e000 r8:c000fc24 r7:00000002 r6:b6f092d0 r5:df727a80 r4:df727a80
      [ 1462.207174] [<c0102890>] (SyS_write) from [<c000fa60>] (ret_fast_syscall+0x0/0x3c)
      [ 1462.214774]  r7:00000004 r6:ffffffff r5:00000000 r4:00000000
      [ 1462.220456] Code: bad PC value
      [ 1462.223560] ---[ end trace 676638a3a12c7a56 ]---
      Reported-by: NRalph Sennhauser <ralph.sennhauser@gmail.com>
      Signed-off-by: NRafał Miłecki <rafal@milecki.pl>
      Fixes: 0f247626 ("usb: core: Introduce a USB port LED trigger")
      Cc: stable@vger.kernel.org # 4.9+
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      89778ba3
    • A
      [iov_iter] new primitives - copy_from_iter_full() and friends · cbbd26b8
      Al Viro 提交于
      copy_from_iter_full(), copy_from_iter_full_nocache() and
      csum_and_copy_from_iter_full() - counterparts of copy_from_iter()
      et.al., advancing iterator only in case of successful full copy
      and returning whether it had been successful or not.
      
      Convert some obvious users.  *NOTE* - do not blindly assume that
      something is a good candidate for those unless you are sure that
      not advancing iov_iter in failure case is the right thing in
      this case.  Anything that does short read/short write kind of
      stuff (or is in a loop, etc.) is unlikely to be a good one.
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      cbbd26b8
  10. 05 12月, 2016 9 次提交
  11. 01 12月, 2016 1 次提交
    • A
      fs: configfs: don't return anything from drop_link · e16769d4
      Andrzej Pietrasiewicz 提交于
      Documentation/filesystems/configfs/configfs.txt says:
      
      "When unlink(2) is called on the symbolic link, the source item is
      notified via the ->drop_link() method.  Like the ->drop_item() method,
      this is a void function and cannot return failure."
      
      The ->drop_item() is indeed a void function, the ->drop_link() is
      actually not. This, together with the fact that the value of ->drop_link()
      is silently ignored suggests, that it is the ->drop_link() return
      type that should be corrected and changed to void.
      
      This patch changes drop_link() signature and all its users.
      Signed-off-by: NAndrzej Pietrasiewicz <andrzej.p@samsung.com>
      [hch: reverted reformatting of some code]
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      e16769d4
  12. 30 11月, 2016 2 次提交