public inbox for [email protected]
 help / color / mirror / Atom feed
From: Dan Carpenter <[email protected]>
To: [email protected], David Howells <[email protected]>
Cc: [email protected], [email protected],
	Ammar Faizi <[email protected]>,
	GNU/Weeb Mailing List <[email protected]>
Subject: [ammarfaizi2-block:dhowells/linux-fs/rxrpc-ringless-5 29/79] net/rxrpc/io_thread.c:52 rxrpc_error_report() error: uninitialized symbol 'skb'.
Date: Mon, 7 Nov 2022 11:02:26 +0300	[thread overview]
Message-ID: <[email protected]> (raw)

tree:   https://github.com/ammarfaizi2/linux-block dhowells/linux-fs/rxrpc-ringless-5
head:   ae32660a904fd27bf548d6bb4a3fc340645da2ca
commit: ea8a55f838fb351b99eb2558a82492dc41246871 [29/79] rxrpc: Move error processing into the local endpoint I/O thread
config: openrisc-randconfig-m031-20221106
compiler: or1k-linux-gcc (GCC) 12.1.0

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <[email protected]>
| Reported-by: Dan Carpenter <[email protected]>

New smatch warnings:
net/rxrpc/io_thread.c:52 rxrpc_error_report() error: uninitialized symbol 'skb'.

Old smatch warnings:
net/rxrpc/io_thread.c:210 rxrpc_input_packet() warn: passing freed memory 'skb'

vim +/skb +52 net/rxrpc/io_thread.c

ea8a55f838fb35 David Howells 2022-10-10  43  void rxrpc_error_report(struct sock *sk)
ea8a55f838fb35 David Howells 2022-10-10  44  {
ea8a55f838fb35 David Howells 2022-10-10  45  	struct rxrpc_local *local;
ea8a55f838fb35 David Howells 2022-10-10  46  	struct sk_buff *skb;
ea8a55f838fb35 David Howells 2022-10-10  47  
ea8a55f838fb35 David Howells 2022-10-10  48  	rcu_read_lock();
ea8a55f838fb35 David Howells 2022-10-10  49  	local = rcu_dereference_sk_user_data(sk);
ea8a55f838fb35 David Howells 2022-10-10  50  	if (unlikely(!local)) {
ea8a55f838fb35 David Howells 2022-10-10  51  		rcu_read_unlock();
ea8a55f838fb35 David Howells 2022-10-10 @52  		kfree_skb(skb);

"skb" is uninitialized.

ea8a55f838fb35 David Howells 2022-10-10  53  		return;
ea8a55f838fb35 David Howells 2022-10-10  54  	}
ea8a55f838fb35 David Howells 2022-10-10  55  
ea8a55f838fb35 David Howells 2022-10-10  56  	while ((skb = skb_dequeue(&sk->sk_error_queue))) {
ea8a55f838fb35 David Howells 2022-10-10  57  		skb->mark = RXRPC_SKB_MARK_ERROR;
ea8a55f838fb35 David Howells 2022-10-10  58  		rxrpc_new_skb(skb, rxrpc_skb_received);
ea8a55f838fb35 David Howells 2022-10-10  59  		skb_queue_tail(&local->rx_queue, skb);
ea8a55f838fb35 David Howells 2022-10-10  60  	}
ea8a55f838fb35 David Howells 2022-10-10  61  
ea8a55f838fb35 David Howells 2022-10-10  62  	rxrpc_wake_up_io_thread(local);
ea8a55f838fb35 David Howells 2022-10-10  63  	rcu_read_unlock();
ea8a55f838fb35 David Howells 2022-10-10  64  }

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp


             reply	other threads:[~2022-11-07  8:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-07  8:02 Dan Carpenter [this message]
2022-11-16 13:57 ` [ammarfaizi2-block:dhowells/linux-fs/rxrpc-ringless-5 29/79] net/rxrpc/io_thread.c:52 rxrpc_error_report() error: uninitialized symbol 'skb' David Howells
2022-11-16 18:49   ` Dan Carpenter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox