Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

[PATCH] NFS: Fix Oops in rpc_call_sync()

Fix the Oops in http://bugzilla.linux-nfs.org/show_bug.cgi?id=138
We shouldn't be calling rpc_release_task() for tasks that are not active.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Trond Myklebust and committed by
Linus Torvalds
bde8f00c 5394cd21

+5 -7
-1
include/linux/sunrpc/sched.h
··· 250 250 int flags, const struct rpc_call_ops *ops, 251 251 void *data); 252 252 void rpc_put_task(struct rpc_task *); 253 - void rpc_release_task(struct rpc_task *); 254 253 void rpc_exit_task(struct rpc_task *); 255 254 void rpc_release_calldata(const struct rpc_call_ops *, void *); 256 255 void rpc_killall_tasks(struct rpc_clnt *);
+3 -5
net/sunrpc/clnt.c
··· 490 490 491 491 /* Set up the call info struct and execute the task */ 492 492 status = task->tk_status; 493 - if (status != 0) { 494 - rpc_release_task(task); 493 + if (status != 0) 495 494 goto out; 496 - } 497 495 atomic_inc(&task->tk_count); 498 496 status = rpc_execute(task); 499 497 if (status == 0) 500 498 status = task->tk_status; 501 - rpc_put_task(task); 502 499 out: 500 + rpc_put_task(task); 503 501 rpc_restore_sigmask(&oldset); 504 502 return status; 505 503 } ··· 535 537 if (status == 0) 536 538 rpc_execute(task); 537 539 else 538 - rpc_release_task(task); 540 + rpc_put_task(task); 539 541 540 542 rpc_restore_sigmask(&oldset); 541 543 return status;
+2 -1
net/sunrpc/sched.c
··· 42 42 static void __rpc_default_timer(struct rpc_task *task); 43 43 static void rpciod_killall(void); 44 44 static void rpc_async_schedule(struct work_struct *); 45 + static void rpc_release_task(struct rpc_task *task); 45 46 46 47 /* 47 48 * RPC tasks sit here while waiting for conditions to improve. ··· 897 896 } 898 897 EXPORT_SYMBOL(rpc_put_task); 899 898 900 - void rpc_release_task(struct rpc_task *task) 899 + static void rpc_release_task(struct rpc_task *task) 901 900 { 902 901 #ifdef RPC_DEBUG 903 902 BUG_ON(task->tk_magic != RPC_TASK_MAGIC_ID);