]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
USB: serial: cyberjack: fix write-URB completion race
authorJohan Hovold <johan@kernel.org>
Mon, 26 Oct 2020 08:25:48 +0000 (09:25 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 10 Nov 2020 11:36:00 +0000 (12:36 +0100)
commit202dae99e649d49355133d2bb9150244fd7695e5
treee948c7ffde5c8dd863e11ad50328aa7304c7ee40
parent288609c2bae2b08a21d1c794053c7e761620a946
USB: serial: cyberjack: fix write-URB completion race

commit 985616f0457d9f555fff417d0da56174f70cc14f upstream.

The write-URB busy flag was being cleared before the completion handler
was done with the URB, something which could lead to corrupt transfers
due to a racing write request if the URB is resubmitted.

Fixes: 507ca9bc0476 ("[PATCH] USB: add ability for usb-serial drivers to determine if their write urb is currently being used.")
Cc: stable <stable@vger.kernel.org> # 2.6.13
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/serial/cyberjack.c