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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 16 Oct 2016 16:03:38 +0000 (18:03 +0200)
commit6c4c6ae5725b670d6470958bc99ee7022cd357ce
tree383a01046d0750a180bf69aff24928f6f3500c55
parent14ca6ce4528d834c9c2abe4b3423e58df2390c0f
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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/mfd/rtsx_usb.c
This page took 0.024188 seconds and 5 git commands to generate.