]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
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)
committerBen Hutchings <ben@decadent.org.uk>
Thu, 23 Feb 2017 03:54:09 +0000 (03:54 +0000)
commit315d5cc06a0d6b4eb1900e94e3bee45c42124d3c
tree8e14a4ec3d56d3a5524da2c9fe547b18fdeb2869
parent0de782facf8117f70a07c77fa7815ebef5a04703
mfd: rtsx_usb: Avoid setting ucr->current_sg.status

commit 8dcc5ff8fcaf778bb57ab4448fedca9e381d088f upstream.

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: 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>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/mfd/rtsx_usb.c