mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
SUNRPC: Fix up task signalling
The RPC_TASK_KILLED flag should really not be set from another context because it can clobber data in the struct task when task->tk_flags is changed non-atomically. Let's therefore swap out RPC_TASK_KILLED with an atomic flag, and add a function to set that flag and safely wake up the task. Signed-off-by: Trond Myklebust <[email protected]> Signed-off-by: Anna Schumaker <[email protected]>
This commit is contained in:
parent
085b775580
commit
ae67bd3821
7 changed files with 40 additions and 26 deletions
|
|
@ -715,7 +715,7 @@ static void nlmclnt_unlock_callback(struct rpc_task *task, void *data)
|
|||
struct nlm_rqst *req = data;
|
||||
u32 status = ntohl(req->a_res.status);
|
||||
|
||||
if (RPC_ASSASSINATED(task))
|
||||
if (RPC_SIGNALLED(task))
|
||||
goto die;
|
||||
|
||||
if (task->tk_status < 0) {
|
||||
|
|
@ -783,7 +783,7 @@ static void nlmclnt_cancel_callback(struct rpc_task *task, void *data)
|
|||
struct nlm_rqst *req = data;
|
||||
u32 status = ntohl(req->a_res.status);
|
||||
|
||||
if (RPC_ASSASSINATED(task))
|
||||
if (RPC_SIGNALLED(task))
|
||||
goto die;
|
||||
|
||||
if (task->tk_status < 0) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue