mfd: rtsx_usb: Avoid setting ucr->current_sg.status
authorLu Baolu <baolu.lu@linux.intel.com>
Thu, 11 Aug 2016 02:39:03 +0000 (10:39 +0800)
committerLee Jones <lee.jones@linaro.org>
Mon, 12 Sep 2016 08:56:12 +0000 (09:56 +0100)
commita3b71269c0107270663da924d044851b8ae924b0
tree9b19fc4dcc9932ceb3c4274ba2c689eb78d5b424
parent77cacbc1aa18aa18c2f4e2696ee3b21f1d7bf9e2
mfd: rtsx_usb: Avoid setting ucr->current_sg.status

Member "status" of struct usb_sg_request is managed by usb core. A
spin lock is used to serialize the change of it. The driver could
check the value of req->status, but should avoid changing it without
the hold of the spinlock. Otherwise, it could cause race or error
in usb core.

This patch could be backported to stable kernels with version later
than v3.14.

Cc: stable@vger.kernel.org # 3.14+
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Roger Tseng <rogerable@realtek.com>
Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
drivers/mfd/rtsx_usb.c
This page took 0.027393 seconds and 5 git commands to generate.