Re: [PATCH] xhci: use correct flags for spin_lock_irqrestore() when setting port power

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 13.04.2017 13:27, Ralph Sennhauser wrote:
On Thu, 13 Apr 2017 09:48:49 +0300
Mathias Nyman <mathias.nyman@xxxxxxxxxxxxxxx> wrote:

commit a6ff6cbf1fab ("usb: xhci: Add helper function
xhci_set_power_on().") created a helper to control port power that
needs to be called with xhci->lock held and interrupts disabled.
It relased the lock with spin_unlock_irqerstore using a new zero flag
variable instead of the origial flag from spin_lock_irqsave.
This regression triggered a static checker warning about bogus flags,
and a null pointer dereference on armada-385.

Fix it by passing a pointer to the correct flags and using it instead

Fixes: a6ff6cbf1fab ("usb: xhci: Add helper function
xhci_set_power_on().") Cc: Guoqing Zhang <guoqing.zhang@xxxxxxxxx>
Signed-off-by: Mathias Nyman <mathias.nyman@xxxxxxxxxxxxxxx>
---

Hi Mathias,

This patch fixes the issue for me on armada-385. So

Reported-by: Ralph Sennhauser <ralph.sennhauser@xxxxxxxxx>
Tested-by: Ralph Sennhauser <ralph.sennhauser@xxxxxxxxx>

Great, Thanks
I'll add those tags and check if Greg can take it usb-next still

-Mathias


--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux