mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-26 05:34:13 +08:00
SUNRPC: Address RCU warning in net/sunrpc/svc.c
$ make C=1 W=1 net/sunrpc/svc.o
make[1]: Entering directory 'linux/obj/manet.1015granger.net'
GEN Makefile
CALL linux/server-development/scripts/checksyscalls.sh
DESCEND objtool
INSTALL libsubcmd_headers
DESCEND bpf/resolve_btfids
INSTALL libsubcmd_headers
CC [M] net/sunrpc/svc.o
CHECK linux/server-development/net/sunrpc/svc.c
linux/server-development/net/sunrpc/svc.c:1225:9: warning: incorrect type in argument 1 (different address spaces)
linux/server-development/net/sunrpc/svc.c:1225:9: expected struct spinlock [usertype] *lock
linux/server-development/net/sunrpc/svc.c:1225:9: got struct spinlock [noderef] __rcu *
linux/server-development/net/sunrpc/svc.c:1227:40: warning: incorrect type in argument 1 (different address spaces)
linux/server-development/net/sunrpc/svc.c:1227:40: expected struct spinlock [usertype] *lock
linux/server-development/net/sunrpc/svc.c:1227:40: got struct spinlock [noderef] __rcu *
make[1]: Leaving directory 'linux/obj/manet.1015granger.net'
Warning introduced by commit 913292c97d
("sched.h: Annotate
sighand_struct with __rcu").
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
This commit is contained in:
parent
a9156d7e7d
commit
00a87e5d1d
@ -1164,6 +1164,7 @@ static void __svc_unregister(struct net *net, const u32 program, const u32 versi
|
||||
*/
|
||||
static void svc_unregister(const struct svc_serv *serv, struct net *net)
|
||||
{
|
||||
struct sighand_struct *sighand;
|
||||
struct svc_program *progp;
|
||||
unsigned long flags;
|
||||
unsigned int i;
|
||||
@ -1180,9 +1181,12 @@ static void svc_unregister(const struct svc_serv *serv, struct net *net)
|
||||
}
|
||||
}
|
||||
|
||||
spin_lock_irqsave(¤t->sighand->siglock, flags);
|
||||
rcu_read_lock();
|
||||
sighand = rcu_dereference(current->sighand);
|
||||
spin_lock_irqsave(&sighand->siglock, flags);
|
||||
recalc_sigpending();
|
||||
spin_unlock_irqrestore(¤t->sighand->siglock, flags);
|
||||
spin_unlock_irqrestore(&sighand->siglock, flags);
|
||||
rcu_read_unlock();
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user