aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty/serial/sccnxp.c
diff options
context:
space:
mode:
authorTrond Myklebust <[email protected]>2014-11-19 17:47:50 +0000
committerJ. Bruce Fields <[email protected]>2014-11-19 20:45:44 +0000
commitc6c15e1ed303ffc47e696ea1c9a9df1761c1f603 (patch)
tree14422719ae15d5d0cf05393169e485c4ac645fca /drivers/tty/serial/sccnxp.c
parentSUNRPC: Fix locking around callback channel reply receive (diff)
downloadkernel-c6c15e1ed303ffc47e696ea1c9a9df1761c1f603.tar.gz
kernel-c6c15e1ed303ffc47e696ea1c9a9df1761c1f603.zip
nfsd: Fix slot wake up race in the nfsv4.1 callback code
The currect code for nfsd41_cb_get_slot() and nfsd4_cb_done() has no locking in order to guarantee atomicity, and so allows for races of the form. Task 1 Task 2 ====== ====== if (test_and_set_bit(0) != 0) { clear_bit(0) rpc_wake_up_next(queue) rpc_sleep_on(queue) return false; } This patch breaks the race condition by adding a retest of the bit after the call to rpc_sleep_on(). Signed-off-by: Trond Myklebust <[email protected]> Cc: [email protected] Signed-off-by: J. Bruce Fields <[email protected]>
Diffstat (limited to 'drivers/tty/serial/sccnxp.c')
0 files changed, 0 insertions, 0 deletions