1. 09 5月, 2018 1 次提交
  2. 26 4月, 2018 1 次提交
  3. 25 4月, 2018 4 次提交
  4. 19 4月, 2018 1 次提交
  5. 12 4月, 2018 2 次提交
  6. 09 4月, 2018 2 次提交
    • R
      HID: hidraw: Fix crash on HIDIOCGFEATURE with a destroyed device · a955358d
      Rodrigo Rivas Costa 提交于
      Doing `ioctl(HIDIOCGFEATURE)` in a tight loop on a hidraw device
      and then disconnecting the device, or unloading the driver, can
      cause a NULL pointer dereference.
      
      When a hidraw device is destroyed it sets 0 to `dev->exist`.
      Most functions check 'dev->exist' before doing its work, but
      `hidraw_get_report()` was missing that check.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: NRodrigo Rivas Costa <rodrigorivascosta@gmail.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      a955358d
    • D
      HID: input: fix battery level reporting on BT mice · 2e210bbb
      Dmitry Torokhov 提交于
      The commit 581c4484 ("HID: input: map digitizer battery usage")
      assumed that devices having input (qas opposed to feature) report for
      battery strength would report the data on their own, without the need to
      be polled by the kernel; unfortunately it is not so. Many wireless mice
      do not send unsolicited reports with battery strength data and have to
      be polled explicitly. As a complication, stylus devices on digitizers
      are not normally connected to the base and thus can not be polled - the
      base can only determine battery strength in the stylus when it is in
      proximity.
      
      To solve this issue, we add a special flag that tells the kernel
      to avoid polling the device (and expect unsolicited reports) and set it
      when report field with physical usage of digitizer stylus (HID_DG_STYLUS).
      Unless this flag is set, and we have not seen the unsolicited reports,
      the kernel will attempt to poll the device when userspace attempts to
      read "capacity" and "state" attributes of power_supply object
      corresponding to the devices battery.
      
      Fixes: 581c4484 ("HID: input: map digitizer battery usage")
      Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=198095
      Cc: stable@vger.kernel.org
      Reported-and-tested-by: NMartin van Es <martin@mrvanes.com>
      Signed-off-by: NDmitry Torokhov <dmitry.torokhov@gmail.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      2e210bbb
  7. 28 3月, 2018 1 次提交
  8. 27 3月, 2018 1 次提交
  9. 23 3月, 2018 6 次提交
  10. 07 3月, 2018 4 次提交
  11. 06 3月, 2018 6 次提交
  12. 16 2月, 2018 10 次提交
  13. 12 2月, 2018 1 次提交
    • L
      vfs: do bulk POLL* -> EPOLL* replacement · a9a08845
      Linus Torvalds 提交于
      This is the mindless scripted replacement of kernel use of POLL*
      variables as described by Al, done by this script:
      
          for V in IN OUT PRI ERR RDNORM RDBAND WRNORM WRBAND HUP RDHUP NVAL MSG; do
              L=`git grep -l -w POLL$V | grep -v '^t' | grep -v /um/ | grep -v '^sa' | grep -v '/poll.h$'|grep -v '^D'`
              for f in $L; do sed -i "-es/^\([^\"]*\)\(\<POLL$V\>\)/\\1E\\2/" $f; done
          done
      
      with de-mangling cleanups yet to come.
      
      NOTE! On almost all architectures, the EPOLL* constants have the same
      values as the POLL* constants do.  But they keyword here is "almost".
      For various bad reasons they aren't the same, and epoll() doesn't
      actually work quite correctly in some cases due to this on Sparc et al.
      
      The next patch from Al will sort out the final differences, and we
      should be all done.
      Scripted-by: NAl Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      a9a08845