* [ammarfaizi2-block:dhowells/linux-fs/rxrpc-next 4/10] net/rxrpc/recvmsg.c:37:19: warning: variable 'sk' is uninitialized when used here
@ 2023-02-11 1:19 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-02-11 1:19 UTC (permalink / raw)
To: David Howells; +Cc: llvm, oe-kbuild-all, Ammar Faizi, GNU/Weeb Mailing List
tree: https://github.com/ammarfaizi2/linux-block dhowells/linux-fs/rxrpc-next
head: c661a1d21c087e6a776a85eb4c60fbba29caaf99
commit: 0f2dc9220002c9a8172c453b9550df310bf9bd60 [4/10] rxrpc: Allow UDP socket sharing for AF_RXRPC service sockets
config: i386-randconfig-a013 (https://download.01.org/0day-ci/archive/20230211/[email protected]/config)
compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/ammarfaizi2/linux-block/commit/0f2dc9220002c9a8172c453b9550df310bf9bd60
git remote add ammarfaizi2-block https://github.com/ammarfaizi2/linux-block
git fetch --no-tags ammarfaizi2-block dhowells/linux-fs/rxrpc-next
git checkout 0f2dc9220002c9a8172c453b9550df310bf9bd60
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash net/rxrpc/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <[email protected]>
| Link: https://lore.kernel.org/oe-kbuild-all/[email protected]/
All warnings (new ones prefixed by >>):
>> net/rxrpc/recvmsg.c:37:19: warning: variable 'sk' is uninitialized when used here [-Wuninitialized]
call->notify_rx(sk, call, call->user_call_ID);
^~
net/rxrpc/recvmsg.c:26:17: note: initialize the variable 'sk' to silence this warning
struct sock *sk;
^
= NULL
1 warning generated.
vim +/sk +37 net/rxrpc/recvmsg.c
17926a79320afa net/rxrpc/ar-recvmsg.c David Howells 2007-04-26 18
17926a79320afa net/rxrpc/ar-recvmsg.c David Howells 2007-04-26 19 /*
248f219cb8bcbf net/rxrpc/recvmsg.c David Howells 2016-09-08 20 * Post a call for attention by the socket or kernel service. Further
248f219cb8bcbf net/rxrpc/recvmsg.c David Howells 2016-09-08 21 * notifications are suppressed by putting recvmsg_link on a dummy queue.
17926a79320afa net/rxrpc/ar-recvmsg.c David Howells 2007-04-26 22 */
248f219cb8bcbf net/rxrpc/recvmsg.c David Howells 2016-09-08 23 void rxrpc_notify_socket(struct rxrpc_call *call)
17926a79320afa net/rxrpc/ar-recvmsg.c David Howells 2007-04-26 24 {
248f219cb8bcbf net/rxrpc/recvmsg.c David Howells 2016-09-08 25 struct rxrpc_sock *rx;
248f219cb8bcbf net/rxrpc/recvmsg.c David Howells 2016-09-08 26 struct sock *sk;
17926a79320afa net/rxrpc/ar-recvmsg.c David Howells 2007-04-26 27
248f219cb8bcbf net/rxrpc/recvmsg.c David Howells 2016-09-08 28 _enter("%d", call->debug_id);
17926a79320afa net/rxrpc/ar-recvmsg.c David Howells 2007-04-26 29
248f219cb8bcbf net/rxrpc/recvmsg.c David Howells 2016-09-08 30 if (!list_empty(&call->recvmsg_link))
248f219cb8bcbf net/rxrpc/recvmsg.c David Howells 2016-09-08 31 return;
17926a79320afa net/rxrpc/ar-recvmsg.c David Howells 2007-04-26 32
248f219cb8bcbf net/rxrpc/recvmsg.c David Howells 2016-09-08 33 rcu_read_lock();
17926a79320afa net/rxrpc/ar-recvmsg.c David Howells 2007-04-26 34
248f219cb8bcbf net/rxrpc/recvmsg.c David Howells 2016-09-08 35 if (call->notify_rx) {
3dd9c8b5f09fd2 net/rxrpc/recvmsg.c David Howells 2020-01-24 36 spin_lock(&call->notify_lock);
248f219cb8bcbf net/rxrpc/recvmsg.c David Howells 2016-09-08 @37 call->notify_rx(sk, call, call->user_call_ID);
3dd9c8b5f09fd2 net/rxrpc/recvmsg.c David Howells 2020-01-24 38 spin_unlock(&call->notify_lock);
0f2dc9220002c9 net/rxrpc/recvmsg.c David Howells 2022-06-16 39 goto out;
0f2dc9220002c9 net/rxrpc/recvmsg.c David Howells 2022-06-16 40 }
0f2dc9220002c9 net/rxrpc/recvmsg.c David Howells 2022-06-16 41
0f2dc9220002c9 net/rxrpc/recvmsg.c David Howells 2022-06-16 42 rx = rcu_dereference(call->socket);
0f2dc9220002c9 net/rxrpc/recvmsg.c David Howells 2022-06-16 43 if (rx) {
0f2dc9220002c9 net/rxrpc/recvmsg.c David Howells 2022-06-16 44 sk = &rx->sk;
0f2dc9220002c9 net/rxrpc/recvmsg.c David Howells 2022-06-16 45 if (sk->sk_state >= RXRPC_CLOSE)
0f2dc9220002c9 net/rxrpc/recvmsg.c David Howells 2022-06-16 46 goto out;
0f2dc9220002c9 net/rxrpc/recvmsg.c David Howells 2022-06-16 47
223f59016fa2b6 net/rxrpc/recvmsg.c David Howells 2022-10-12 48 spin_lock(&rx->recvmsg_lock);
248f219cb8bcbf net/rxrpc/recvmsg.c David Howells 2016-09-08 49 if (list_empty(&call->recvmsg_link)) {
cb0fc0c9722c0c net/rxrpc/recvmsg.c David Howells 2022-10-21 50 rxrpc_get_call(call, rxrpc_call_get_notify_socket);
248f219cb8bcbf net/rxrpc/recvmsg.c David Howells 2016-09-08 51 list_add_tail(&call->recvmsg_link, &rx->recvmsg_q);
214a64a83a9705 net/rxrpc/recvmsg.c David Howells 2020-07-28 52 rx->nr_recvmsg++;
248f219cb8bcbf net/rxrpc/recvmsg.c David Howells 2016-09-08 53 }
223f59016fa2b6 net/rxrpc/recvmsg.c David Howells 2022-10-12 54 spin_unlock(&rx->recvmsg_lock);
17926a79320afa net/rxrpc/ar-recvmsg.c David Howells 2007-04-26 55
248f219cb8bcbf net/rxrpc/recvmsg.c David Howells 2016-09-08 56 if (!sock_flag(sk, SOCK_DEAD)) {
248f219cb8bcbf net/rxrpc/recvmsg.c David Howells 2016-09-08 57 _debug("call %ps", sk->sk_data_ready);
248f219cb8bcbf net/rxrpc/recvmsg.c David Howells 2016-09-08 58 sk->sk_data_ready(sk);
248f219cb8bcbf net/rxrpc/recvmsg.c David Howells 2016-09-08 59 }
0f2dc9220002c9 net/rxrpc/recvmsg.c David Howells 2022-06-16 60 goto out;
0f2dc9220002c9 net/rxrpc/recvmsg.c David Howells 2022-06-16 61 }
0f2dc9220002c9 net/rxrpc/recvmsg.c David Howells 2022-06-16 62
0f2dc9220002c9 net/rxrpc/recvmsg.c David Howells 2022-06-16 63 if (call->service) {
0f2dc9220002c9 net/rxrpc/recvmsg.c David Howells 2022-06-16 64 struct rxrpc_service *b = call->service;
0f2dc9220002c9 net/rxrpc/recvmsg.c David Howells 2022-06-16 65
0f2dc9220002c9 net/rxrpc/recvmsg.c David Howells 2022-06-16 66 spin_lock(&b->incoming_lock);
0f2dc9220002c9 net/rxrpc/recvmsg.c David Howells 2022-06-16 67 if (list_empty(&call->recvmsg_link)) {
0f2dc9220002c9 net/rxrpc/recvmsg.c David Howells 2022-06-16 68 list_add_tail(&call->recvmsg_link, &b->to_be_accepted);
0f2dc9220002c9 net/rxrpc/recvmsg.c David Howells 2022-06-16 69 b->nr_tba++;
248f219cb8bcbf net/rxrpc/recvmsg.c David Howells 2016-09-08 70 }
0f2dc9220002c9 net/rxrpc/recvmsg.c David Howells 2022-06-16 71 list_for_each_entry(rx, &b->waiting_sockets, accept_link) {
0f2dc9220002c9 net/rxrpc/recvmsg.c David Howells 2022-06-16 72 sk = &rx->sk;
0f2dc9220002c9 net/rxrpc/recvmsg.c David Howells 2022-06-16 73 if (!sock_flag(sk, SOCK_DEAD))
0f2dc9220002c9 net/rxrpc/recvmsg.c David Howells 2022-06-16 74 sk->sk_data_ready(sk);
0f2dc9220002c9 net/rxrpc/recvmsg.c David Howells 2022-06-16 75 }
0f2dc9220002c9 net/rxrpc/recvmsg.c David Howells 2022-06-16 76 spin_unlock(&b->incoming_lock);
248f219cb8bcbf net/rxrpc/recvmsg.c David Howells 2016-09-08 77 }
17926a79320afa net/rxrpc/ar-recvmsg.c David Howells 2007-04-26 78
0f2dc9220002c9 net/rxrpc/recvmsg.c David Howells 2022-06-16 79 out:
248f219cb8bcbf net/rxrpc/recvmsg.c David Howells 2016-09-08 80 rcu_read_unlock();
248f219cb8bcbf net/rxrpc/recvmsg.c David Howells 2016-09-08 81 _leave("");
248f219cb8bcbf net/rxrpc/recvmsg.c David Howells 2016-09-08 82 }
17926a79320afa net/rxrpc/ar-recvmsg.c David Howells 2007-04-26 83
:::::: The code at line 37 was first introduced by commit
:::::: 248f219cb8bcbfbd7f132752d44afa2df7c241d1 rxrpc: Rewrite the data and ack handling code
:::::: TO: David Howells <[email protected]>
:::::: CC: David Howells <[email protected]>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-02-11 1:20 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-11 1:19 [ammarfaizi2-block:dhowells/linux-fs/rxrpc-next 4/10] net/rxrpc/recvmsg.c:37:19: warning: variable 'sk' is uninitialized when used here kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox