1. 14 Nov, 2019 1 commit
    • Wei Wang's avatar
      thermal: Fix deadlock in thermal thermal_zone_device_check · 163b00cd
      Wei Wang authored
      1851799e ("thermal: Fix use-after-free when unregistering thermal zone
      device") changed cancel_delayed_work to cancel_delayed_work_sync to avoid
      a use-after-free issue. However, cancel_delayed_work_sync could be called
      insides the WQ causing deadlock.
      
      [54109.642398] c0   1162 kworker/u17:1   D    0 11030      2 0x00000000
      [54109.642437] c0   1162 Workqueue: thermal_passive_wq thermal_zone_device_check
      [54109.642447] c0   1162 Call trace:
      [54109.642456] c0   1162  __switch_to+0x138/0x158
      [54109.642467] c0   1162  __schedule+0xba4/0x1434
      [54109.642480] c0   1162  schedule_timeout+0xa0/0xb28
      [54109.642492] c0   1162  wait_for_common+0x138/0x2e8
      [54109.642511] c0   1162  flush_work+0x348/0x40c
      [54109.642522] c0   1162  __cancel_work_timer+0x180/0x218
      [54109.642544] c0   1162  handle_thermal_trip+0x2c4/0x5a4
      [54109.642553] c0   1162  thermal_zone_device_update+0x1b4/0x25c
      [54109.642563] c0   1162  thermal_zone_device_check+0x18/0x24
      [54109.642574] c0   1162  process_one_work+0x3cc/0x69c
      [54109.642583] c0   1162  worker_thread+0x49c/0x7c0
      [54109.642593] c0   1162  kthread+0x17c/0x1b0
      [54109.642602] c0   1162  ret_from_fork+0x10/0x18
      [54109.643051] c0   1162 kworker/u17:2   D    0 16245      2 0x00000000
      [54109.643067] c0   1162 Workqueue: thermal_passive_wq thermal_zone_device_check
      [54109.643077] c0   1162 Call trace:
      [54109.643085] c0   1162  __switch_to+0x138/0x158
      [54109.643095] c0   1162  __schedule+0xba4/0x1434
      [54109.643104] c0   1162  schedule_timeout+0xa0/0xb28
      [54109.643114] c0   1162  wait_for_common+0x138/0x2e8
      [54109.643122] c0   1162  flush_work+0x348/0x40c
      [54109.643131] c0   1162  __cancel_work_timer+0x180/0x218
      [54109.643141] c0   1162  handle_thermal_trip+0x2c4/0x5a4
      [54109.643150] c0   1162  thermal_zone_device_update+0x1b4/0x25c
      [54109.643159] c0   1162  thermal_zone_device_check+0x18/0x24
      [54109.643167] c0   1162  process_one_work+0x3cc/0x69c
      [54109.643177] c0   1162  worker_thread+0x49c/0x7c0
      [54109.643186] c0   1162  kthread+0x17c/0x1b0
      [54109.643195] c0   1162  ret_from_fork+0x10/0x18
      [54109.644500] c0   1162 cat             D    0  7766      1 0x00000001
      [54109.644515] c0   1162 Call trace:
      [54109.644524] c0   1162  __switch_to+0x138/0x158
      [54109.644536] c0   1162  __schedule+0xba4/0x1434
      [54109.644546] c0   1162  schedule_preempt_disabled+0x80/0xb0
      [54109.644555] c0   1162  __mutex_lock+0x3a8/0x7f0
      [54109.644563] c0   1162  __mutex_lock_slowpath+0x14/0x20
      [54109.644575] c0   1162  thermal_zone_get_temp+0x84/0x360
      [54109.644586] c0   1162  temp_show+0x30/0x78
      [54109.644609] c0   1162  dev_attr_show+0x5c/0xf0
      [54109.644628] c0   1162  sysfs_kf_seq_show+0xcc/0x1a4
      [54109.644636] c0   1162  kernfs_seq_show+0x48/0x88
      [54109.644656] c0   1162  seq_read+0x1f4/0x73c
      [54109.644664] c0   1162  kernfs_fop_read+0x84/0x318
      [54109.644683] c0   1162  __vfs_read+0x50/0x1bc
      [54109.644692] c0   1162  vfs_read+0xa4/0x140
      [54109.644701] c0   1162  SyS_read+0xbc/0x144
      [54109.644708] c0   1162  el0_svc_naked+0x34/0x38
      [54109.845800] c0   1162 D 720.000s 1->7766->7766 cat [panic]
      
      Fixes: 1851799e ("thermal: Fix use-after-free when unregistering thermal zone device")
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarWei Wang <wvw@google.com>
      Signed-off-by: default avatarZhang Rui <rui.zhang@intel.com>
      163b00cd
  2. 07 Nov, 2019 31 commits
  3. 03 Nov, 2019 2 commits
    • Linus Torvalds's avatar
      Linux 5.4-rc6 · a99d8080
      Linus Torvalds authored
      a99d8080
    • Linus Torvalds's avatar
      Merge tag 'usb-5.4-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb · 3a69c9e5
      Linus Torvalds authored
      Pull USB fixes from Greg KH:
       "The USB sub-maintainers woke up this past week and sent a bunch of
        tiny fixes. Here are a lot of small patches that that resolve a bunch
        of reported issues in the USB core, drivers, serial drivers, gadget
        drivers, and of course, xhci :)
      
        All of these have been in linux-next with no reported issues"
      
      * tag 'usb-5.4-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (31 commits)
        usb: dwc3: gadget: fix race when disabling ep with cancelled xfers
        usb: cdns3: gadget: Fix g_audio use case when connected to Super-Speed host
        usb: cdns3: gadget: reset EP_CLAIMED flag while unloading
        USB: serial: whiteheat: fix line-speed endianness
        USB: serial: whiteheat: fix potential slab corruption
        USB: gadget: Reject endpoints with 0 maxpacket value
        UAS: Revert commit 3ae62a42 ("UAS: fix alignment of scatter/gather segments")
        usb-storage: Revert commit 747668db ("usb-storage: Set virt_boundary_mask to avoid SG overflows")
        usbip: Fix free of unallocated memory in vhci tx
        usbip: tools: Fix read_usb_vudc_device() error path handling
        usb: xhci: fix __le32/__le64 accessors in debugfs code
        usb: xhci: fix Immediate Data Transfer endianness
        xhci: Fix use-after-free regression in xhci clear hub TT implementation
        USB: ldusb: fix control-message timeout
        USB: ldusb: use unsigned size format specifiers
        USB: ldusb: fix ring-buffer locking
        USB: Skip endpoints with 0 maxpacket length
        usb: cdns3: gadget: Don't manage pullups
        usb: dwc3: remove the call trace of USBx_GFLADJ
        usb: gadget: configfs: fix concurrent issue between composite APIs
        ...
      3a69c9e5
  4. 02 Nov, 2019 6 commits