1. 05 5月, 2019 1 次提交
  2. 22 11月, 2017 1 次提交
    • K
      treewide: Remove TIMER_FUNC_TYPE and TIMER_DATA_TYPE casts · 841b86f3
      Kees Cook 提交于
      With all callbacks converted, and the timer callback prototype
      switched over, the TIMER_FUNC_TYPE cast is no longer needed,
      so remove it. Conversion was done with the following scripts:
      
          perl -pi -e 's|\(TIMER_FUNC_TYPE\)||g' \
              $(git grep TIMER_FUNC_TYPE | cut -d: -f1 | sort -u)
      
          perl -pi -e 's|\(TIMER_DATA_TYPE\)||g' \
              $(git grep TIMER_DATA_TYPE | cut -d: -f1 | sort -u)
      
      The now unused macros are also dropped from include/linux/timer.h.
      Signed-off-by: NKees Cook <keescook@chromium.org>
      841b86f3
  3. 17 10月, 2017 1 次提交
  4. 11 10月, 2017 2 次提交
    • T
      ALSA: line6: Add yet more sanity checks for invalid EPs · 4f95646c
      Takashi Iwai 提交于
      There are a few other places calling usb_submit_urb() with the URB
      composed from the fixed endpoint without validation.  For avoiding the
      spurious kernel warnings, add the sanity checks to appropriate
      places.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      4f95646c
    • T
      ALSA: line6: Add a sanity check for invalid EPs · 2a4340c5
      Takashi Iwai 提交于
      As syzkaller spotted, currently line6 drivers submit a URB with the
      fixed EP without checking whether it's actually available, which may
      result in a kernel warning like:
        usb 1-1: BOGUS urb xfer, pipe 3 != type 1
        ------------[ cut here ]------------
        WARNING: CPU: 0 PID: 24 at drivers/usb/core/urb.c:449
        usb_submit_urb+0xf8a/0x11d0
        Modules linked in:
        CPU: 0 PID: 24 Comm: kworker/0:1 Not tainted 4.14.0-rc2-42613-g1488251d1a98 #238
        Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011
        Workqueue: usb_hub_wq hub_event
        Call Trace:
         line6_start_listen+0x55f/0x9e0 sound/usb/line6/driver.c:82
         line6_init_cap_control sound/usb/line6/driver.c:690
         line6_probe+0x7c9/0x1310 sound/usb/line6/driver.c:764
         podhd_probe+0x64/0x70 sound/usb/line6/podhd.c:474
         usb_probe_interface+0x35d/0x8e0 drivers/usb/core/driver.c:361
         ....
      
      This patch adds a sanity check of validity of EPs at the device
      initialization phase for avoiding the call with an invalid EP.
      Reported-by: NAndrey Konovalov <andreyknvl@google.com>
      Tested-by: NAndrey Konovalov <andreyknvl@google.com>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      2a4340c5
  5. 09 10月, 2017 1 次提交
    • T
      ALSA: line6: Fix leftover URB at error-path during probe · c95072b3
      Takashi Iwai 提交于
      While line6_probe() may kick off URB for a control MIDI endpoint, the
      function doesn't clean up it properly at its error path.  This results
      in a leftover URB action that is eventually triggered later and causes
      an Oops like:
        general protection fault: 0000 [#1] PREEMPT SMP KASAN
        CPU: 1 PID: 0 Comm: swapper/1 Not tainted
        RIP: 0010:usb_fill_bulk_urb ./include/linux/usb.h:1619
        RIP: 0010:line6_start_listen+0x3fe/0x9e0 sound/usb/line6/driver.c:76
        Call Trace:
         <IRQ>
         line6_data_received+0x1f7/0x470 sound/usb/line6/driver.c:326
         __usb_hcd_giveback_urb+0x2e0/0x650 drivers/usb/core/hcd.c:1779
         usb_hcd_giveback_urb+0x337/0x420 drivers/usb/core/hcd.c:1845
         dummy_timer+0xba9/0x39f0 drivers/usb/gadget/udc/dummy_hcd.c:1965
         call_timer_fn+0x2a2/0x940 kernel/time/timer.c:1281
         ....
      
      Since the whole clean-up procedure is done in line6_disconnect()
      callback, we can simply call it in the error path instead of
      open-coding the whole again.  It'll fix such an issue automagically.
      
      The bug was spotted by syzkaller.
      
      Fixes: eedd0e95 ("ALSA: line6: Don't forget to call driver's destructor at error path")
      Reported-by: NAndrey Konovalov <andreyknvl@google.com>
      Tested-by: NAndrey Konovalov <andreyknvl@google.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      c95072b3
  6. 07 2月, 2017 2 次提交
  7. 13 10月, 2016 1 次提交
  8. 26 9月, 2016 1 次提交
    • T
      ALSA: usb-line6: use the same declaration as definition in header for MIDI manufacturer ID · 8da08ca0
      Takashi Sakamoto 提交于
      Currently, usb-line6 module exports an array of MIDI manufacturer ID and
      usb-pod module uses it. However, the declaration is not the definition in
      common header. The difference is explicit length of array. Although
      compiler calculates it and everything goes well, it's better to use the
      same representation between definition and declaration.
      
      This commit fills the length of array for usb-line6 module. As a small
      good sub-effect, this commit suppress below warnings from static analysis
      by sparse v0.5.0.
      
      sound/usb/line6/driver.c:274:43: error: cannot size expression
      sound/usb/line6/driver.c:275:16: error: cannot size expression
      sound/usb/line6/driver.c:276:16: error: cannot size expression
      sound/usb/line6/driver.c:277:16: error: cannot size expression
      
      Fixes: 705ececd ("Staging: add line6 usb driver")
      Signed-off-by: NTakashi Sakamoto <o-takashi@sakamocchi.jp>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      8da08ca0
  9. 20 9月, 2016 7 次提交
  10. 12 2月, 2015 1 次提交
  11. 11 2月, 2015 4 次提交
  12. 08 2月, 2015 1 次提交
  13. 03 2月, 2015 2 次提交
  14. 29 1月, 2015 3 次提交
  15. 28 1月, 2015 9 次提交
  16. 20 1月, 2015 3 次提交