staging: most: hdm-usb: synchronize release of struct buf_anchor
authorChristian Gromm <christian.gromm@microchip.com>
Fri, 19 Aug 2016 09:12:56 +0000 (11:12 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 21 Aug 2016 14:53:57 +0000 (16:53 +0200)
commitb24c9fe9fcf9c7a04fa08e5c1da7d156011e6b63
treec42ea2dd507ac164b810fe4dfe054fdea072d5f3
parentcf6a599ef700914d9237f4dcf7afe01dd2ca6368
staging: most: hdm-usb: synchronize release of struct buf_anchor

In case a channel that is going to be destroyed has been tagged as not
"healthy" by the function hdm_poison_channel() while the functions
hdm_write_completion() or hdm_read_completion() are being executed, they
race for destruction of buf_anchor.

This patch fixes the problem.

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/most/hdm-usb/hdm_usb.c