1. 23 Apr, 2019 23 commits
  2. 11 Apr, 2019 1 commit
  3. 03 Apr, 2019 1 commit
  4. 01 Apr, 2019 4 commits
  5. 27 Mar, 2019 1 commit
  6. 20 Mar, 2019 1 commit
  7. 19 Mar, 2019 2 commits
    • He, Bo's avatar
      HID: debug: fix race condition with between rdesc_show() and device removal · cef0d494
      He, Bo authored
      There is a race condition that could happen if hid_debug_rdesc_show()
      is running while hdev is in the process of going away (device removal,
      system suspend, etc) which could result in NULL pointer dereference:
      
      	 BUG: unable to handle kernel paging request at 0000000783316040
      	 CPU: 1 PID: 1512 Comm: getevent Tainted: G     U     O 4.19.20-quilt-2e5dc0ac-00029-gc455a447dd55 #1
      	 RIP: 0010:hid_dump_device+0x9b/0x160
      	 Call Trace:
      	  hid_debug_rdesc_show+0x72/0x1d0
      	  seq_read+0xe0/0x410
      	  full_proxy_read+0x5f/0x90
      	  __vfs_read+0x3a/0x170
      	  vfs_read+0xa0/0x150
      	  ksys_read+0x58/0xc0
      	  __x64_sys_read+0x1a/0x20
      	  do_syscall_64+0x55/0x110
      	  entry_SYSCALL_64_after_hwframe+0x49/0xbe
      
      Grab driver_input_lock to make sure the input device exists throughout the
      whole process of dumping the rdesc.
      
      [jkosina@suse.cz: update changelog a bit]
      Signed-off-by: default avatarhe, bo <bo.he@intel.com>
      Signed-off-by: default avatar"Zhang, Jun" <jun.zhang@intel.com>
      Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
      cef0d494
    • Kangjie Lu's avatar
      HID: logitech: check the return value of create_singlethread_workqueue · 6c44b15e
      Kangjie Lu authored
      create_singlethread_workqueue may fail and return NULL. The fix checks if it is
      NULL to avoid NULL pointer dereference.  Also, the fix moves the call of
      create_singlethread_workqueue earlier to avoid resource-release issues.
      Signed-off-by: default avatarKangjie Lu <kjlu@umn.edu>
      Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
      6c44b15e
  8. 18 Mar, 2019 2 commits
  9. 11 Mar, 2019 4 commits
    • Colin Ian King's avatar
      HID: uclogic: remove redudant duplicated null check on ver_ptr · 1cbbd85f
      Colin Ian King authored
      Currently ver_ptr is being null checked twice, once before calling
      usb_string and once afterwards.  The second null check is redundant
      and can be removed, remove it.
      
      Detected by CoverityScan, CID#1477308 ("Logically dead code")
      Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
      Signed-off-by: default avatarBenjamin Tissoires <benjamin.tissoires@redhat.com>
      1cbbd85f
    • Andy Shevchenko's avatar
      HID: quirks: Drop misused kernel-doc annotation · 78b92f5f
      Andy Shevchenko authored
      The kernel-doc annotation is misused for hid_mouse_ignore_list. The script
      complains about it:
      
      drivers/hid/hid-quirks.c:894: warning: cannot understand function prototype: 'const struct hid_device_id hid_mouse_ignore_list[] = '
      
      Drop the annotation to make script happy.
      Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Signed-off-by: default avatarBenjamin Tissoires <benjamin.tissoires@redhat.com>
      78b92f5f
    • Arnd Bergmann's avatar
      HID: hid-asus: select CONFIG_POWER_SUPPLY · a23eab89
      Arnd Bergmann authored
      The newly added power supply code fails to link when the power supply core
      code is disabled:
      
      drivers/hid/hid-asus.o: In function `asus_battery_get_property':
      hid-asus.c:(.text+0x11de): undefined reference to `power_supply_get_drvdata'
      drivers/hid/hid-asus.o: In function `asus_probe':
      hid-asus.c:(.text+0x170c): undefined reference to `devm_power_supply_register'
      hid-asus.c:(.text+0x1734): undefined reference to `power_supply_powers'
      drivers/hid/hid-asus.o: In function `asus_raw_event':
      hid-asus.c:(.text+0x1914): undefined reference to `power_supply_changed'
      
      Select the subsystem from Kconfig as we do for other hid drivers already.
      
      Fixes: 6311d329 ("HID: hid-asus: Add BT keyboard dock battery monitoring support")
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarBenjamin Tissoires <benjamin.tissoires@redhat.com>
      a23eab89
    • Louis Taylor's avatar
      HID: quirks: use correct format chars in dbg_hid · 7d01427a
      Louis Taylor authored
      When building with -Wformat, clang warns:
      
      drivers/hid/hid-quirks.c:1075:27: warning: format specifies type
      'unsigned short' but the argument has type '__u32' (aka 'unsigned int')
      [-Wformat]
      		  bl_entry->driver_data, bl_entry->vendor,
      					 ^~~~~~~~~~~~~~~~
      ./include/linux/hid.h:1170:48: note: expanded from macro 'dbg_hid'
      	  printk(KERN_DEBUG "%s: " format, __FILE__, ##arg);      \
      				   ~~~~~~              ^~~
      drivers/hid/hid-quirks.c:1076:4: warning: format specifies type
      'unsigned short' but the argument has type '__u32' (aka 'unsigned int')
      [-Wformat]
      		  bl_entry->product);
      		  ^~~~~~~~~~~~~~~~~
      ./include/linux/hid.h:1170:48: note: expanded from macro 'dbg_hid'
      	  printk(KERN_DEBUG "%s: " format, __FILE__, ##arg);      \
      				   ~~~~~~              ^~~
      drivers/hid/hid-quirks.c:1242:12: warning: format specifies type
      'unsigned short' but the argument has type '__u32' (aka 'unsigned int')
      [-Wformat]
      		  quirks, hdev->vendor, hdev->product);
      			  ^~~~~~~~~~~~
      ./include/linux/hid.h:1170:48: note: expanded from macro 'dbg_hid'
      	  printk(KERN_DEBUG "%s: " format, __FILE__, ##arg);      \
      				   ~~~~~~              ^~~
      drivers/hid/hid-quirks.c:1242:26: warning: format specifies type
      'unsigned short' but the argument has type '__u32' (aka 'unsigned int')
      [-Wformat]
      		  quirks, hdev->vendor, hdev->product);
      					^~~~~~~~~~~~~
      ./include/linux/hid.h:1170:48: note: expanded from macro 'dbg_hid'
      	  printk(KERN_DEBUG "%s: " format, __FILE__, ##arg);      \
      				   ~~~~~~              ^~~
      4 warnings generated.
      
      This patch fixes the format strings to use the correct format type for unsigned
      ints.
      
      Link: https://github.com/ClangBuiltLinux/linux/issues/378Signed-off-by: default avatarLouis Taylor <louis@kragniz.eu>
      Reviewed-by: default avatarNick Desaulniers <ndesaulniers@google.com>
      Signed-off-by: default avatarBenjamin Tissoires <benjamin.tissoires@redhat.com>
      7d01427a
  10. 08 Mar, 2019 1 commit
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid · c6400e5c
      Linus Torvalds authored
      Pull HID updates from Jiri Kosina:
      
       - support for Pro Pen slim, from Jason Gerecke
      
       - power management improvements to Intel-ISH driver, from Song Hongyan
      
       - UCLogic driver revamp in order to be able to support wider range of
         Huion tablets, from Nikolai Kondrashov
      
       - Asus Transbook support, from NOGUCHI Hiroshi
      
       - other assorted small bugfixes / cleanups and device ID additions
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid: (46 commits)
        HID: Remove Waltop tablets from hid_have_special_driver
        HID: Remove KYE tablets from hid_have_special_driver
        HID: Remove hid-uclogic entries from hid_have_special_driver
        HID: uclogic: Do not initialize non-USB devices
        HID: uclogic: Add support for Ugee G5
        HID: uclogic: Support Gray-coded rotary encoders
        HID: uclogic: Support faking Wacom pad device ID
        HID: uclogic: Add support for XP-Pen Deco 01
        HID: uclogic: Add support for XP-Pen Star G640
        HID: uclogic: Add support for XP-Pen Star G540
        HID: uclogic: Add support for Ugee EX07S frame controls
        HID: uclogic: Add support for Ugee M540
        HID: uclogic: Add support for Ugee 2150
        HID: uclogic: Support v2 protocol
        HID: uclogic: Support fragmented high-res reports
        HID: uclogic: Support in-range reporting emulation
        HID: uclogic: Designate current protocol v1
        HID: uclogic: Re-initialize tablets on resume
        HID: uclogic: Extract tablet parameter discovery into a module
        HID: uclogic: Extract report descriptors to a module
        ...
      c6400e5c