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.

SUNRPC: Fix Oopsable condition in rpc_pipefs

The elements on rpci->in_upcall are tracked by the filp->private_data,
which will ensure that they get released when the file is closed.

The exception is if rpc_close_pipes() gets called first, since that
sets rpci->ops to NULL.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>

+1 -1
+1 -1
net/sunrpc/rpc_pipe.c
··· 59 59 struct rpc_inode *rpci = RPC_I(inode); 60 60 61 61 __rpc_purge_list(rpci, &rpci->pipe, err); 62 - __rpc_purge_list(rpci, &rpci->in_upcall, err); 63 62 rpci->pipelen = 0; 64 63 wake_up(&rpci->waitq); 65 64 } ··· 118 119 down(&inode->i_sem); 119 120 if (rpci->ops != NULL) { 120 121 rpci->nreaders = 0; 122 + __rpc_purge_list(rpci, &rpci->in_upcall, -EPIPE); 121 123 __rpc_purge_upcall(inode, -EPIPE); 122 124 rpci->nwriters = 0; 123 125 if (rpci->ops->release_pipe)