aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/sunrpc
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2012-01-17 22:57:37 -0500
committerTrond Myklebust <Trond.Myklebust@netapp.com>2012-01-31 19:28:08 -0500
commit961a828df64979d2a9faeeeee043391670a193b9 (patch)
tree4b7ddaf1a19c589e3c8ec96b6c732faa507f2899 /include/linux/sunrpc
parent2aeb98f498ce37742b743080fdc6c8cf64053599 (diff)
SUNRPC: Fix potential races in xprt_lock_write_next()
We have to ensure that the wake up from the waitqueue and the assignment of xprt->snd_task are atomic. We can do this by assigning the snd_task while under the waitqueue spinlock. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'include/linux/sunrpc')
-rw-r--r--include/linux/sunrpc/sched.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/sunrpc/sched.h b/include/linux/sunrpc/sched.h
index b16243a35f0b..bd337f990a41 100644
--- a/include/linux/sunrpc/sched.h
+++ b/include/linux/sunrpc/sched.h
@@ -235,6 +235,9 @@ void rpc_wake_up_queued_task(struct rpc_wait_queue *,
235 struct rpc_task *); 235 struct rpc_task *);
236void rpc_wake_up(struct rpc_wait_queue *); 236void rpc_wake_up(struct rpc_wait_queue *);
237struct rpc_task *rpc_wake_up_next(struct rpc_wait_queue *); 237struct rpc_task *rpc_wake_up_next(struct rpc_wait_queue *);
238struct rpc_task *rpc_wake_up_first(struct rpc_wait_queue *,
239 bool (*)(struct rpc_task *, void *),
240 void *);
238void rpc_wake_up_status(struct rpc_wait_queue *, int); 241void rpc_wake_up_status(struct rpc_wait_queue *, int);
239int rpc_queue_empty(struct rpc_wait_queue *); 242int rpc_queue_empty(struct rpc_wait_queue *);
240void rpc_delay(struct rpc_task *, unsigned long); 243void rpc_delay(struct rpc_task *, unsigned long);