1. 05 Oct, 2019 3 commits
    • Alan Stern's avatar
      HID: prodikeys: Fix general protection fault during probe · c0a697d3
      Alan Stern authored
      commit 98375b86 upstream.
      
      The syzbot fuzzer provoked a general protection fault in the
      hid-prodikeys driver:
      
      kasan: CONFIG_KASAN_INLINE enabled
      kasan: GPF could be caused by NULL-ptr deref or user memory access
      general protection fault: 0000 [#1] SMP KASAN
      CPU: 0 PID: 12 Comm: kworker/0:1 Not tainted 5.3.0-rc5+ #28
      Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
      Google 01/01/2011
      Workqueue: usb_hub_wq hub_event
      RIP: 0010:pcmidi_submit_output_report drivers/hid/hid-prodikeys.c:300  [inline]
      RIP: 0010:pcmidi_set_operational drivers/hid/hid-prodikeys.c:558 [inline]
      RIP: 0010:pcmidi_snd_initialise drivers/hid/hid-prodikeys.c:686 [inline]
      RIP: 0010:pk_probe+0xb51/0xfd0 drivers/hid/hid-prodikeys.c:836
      Code: 0f 85 50 04 00 00 48 8b 04 24 4c 89 7d 10 48 8b 58 08 e8 b2 53 e4 fc
      48 8b 54 24 20 48 b8 00 00 00 00 00 fc ff df 48 c1 ea 03 <80> 3c 02 00 0f
      85 13 04 00 00 48 ba 00 00 00 00 00 fc ff df 49 8b
      
      The problem is caused by the fact that pcmidi_get_output_report() will
      return an error if the HID device doesn't provide the right sort of
      output report, but pcmidi_set_operational() doesn't bother to check
      the return code and assumes the function call always succeeds.
      
      This patch adds the missing check and aborts the probe operation if
      necessary.
      
      Reported-and-tested-by: syzbot+1088533649dafa1c9004@syzkaller.appspotmail.com
      Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      CC: <stable@vger.kernel.org>
      Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      c0a697d3
    • Jack Morgenstein's avatar
      IB/core: Add an unbound WQ type to the new CQ API · 787f774b
      Jack Morgenstein authored
      commit f794809a upstream.
      
      The upstream kernel commit cited below modified the workqueue in the
      new CQ API to be bound to a specific CPU (instead of being unbound).
      This caused ALL users of the new CQ API to use the same bound WQ.
      
      Specifically, MAD handling was severely delayed when the CPU bound
      to the WQ was busy handling (higher priority) interrupts.
      
      This caused a delay in the MAD "heartbeat" response handling,
      which resulted in ports being incorrectly classified as "down".
      
      To fix this, add a new "unbound" WQ type to the new CQ API, so that users
      have the option to choose either a bound WQ or an unbound WQ.
      
      For MADs, choose the new "unbound" WQ.
      
      Fixes: b7363e67 ("IB/device: Convert ib-comp-wq to be CPU-bound")
      Signed-off-by: default avatarJack Morgenstein <jackm@dev.mellanox.co.il>
      Signed-off-by: default avatarLeon Romanovsky <leonro@mellanox.com>
      Reviewed-by: default avatarSagi Grimberg <sagi@grimberg.m>
      Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      787f774b
    • Marcel Holtmann's avatar
      Revert "Bluetooth: validate BLE connection interval updates" · 6b48ef1f
      Marcel Holtmann authored
      [ Upstream commit 68d19d7d ]
      
      This reverts commit c49a8682.
      
      There are devices which require low connection intervals for usable operation
      including keyboards and mice. Forcing a static connection interval for
      these types of devices has an impact in latency and causes a regression.
      Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      Signed-off-by: default avatarJohan Hedberg <johan.hedberg@intel.com>
      Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
      6b48ef1f
  2. 21 Sep, 2019 37 commits