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

On Wed, Nov 16, 2022 at 01:57:43PM +0000, David Howells wrote:
> Dan Carpenter <[email protected]> wrote:
> 
> > New smatch warnings:
> > net/rxrpc/io_thread.c:52 rxrpc_error_report() error: uninitialized symbol 'skb'.
> 
> Fixed that.
> 
> > Old smatch warnings:
> > net/rxrpc/io_thread.c:210 rxrpc_input_packet() warn: passing freed memory 'skb'
> 
> Do you know if that's still there?  "Old" in what sense?
> 

The file name has changed so it took me a while to track this down.
This is fine.  The "skb" pointer here is just used for tracing and not
dereferenced.

net/rxrpc/input.c
   563          /* Unshare the packet so that it can be modified for in-place
   564           * decryption.
   565           */
   566          if (sp->hdr.securityIndex != 0) {
   567                  struct sk_buff *nskb = skb_unshare(skb, GFP_ATOMIC);
                                                           ^^^
There is still a reference to "skb" somewhere but we drop ours.

   568                  if (!nskb) {
   569                          rxrpc_eaten_skb(skb, rxrpc_skb_unshared_nomem);
                                                ^^^
This would be a bug if it were dereferenced but it's just tracing stuff
that doesn't dereference the "skb" pointer.

   570                          return;
   571                  }
   572  
   573                  if (nskb != skb) {
   574                          rxrpc_eaten_skb(skb, rxrpc_skb_received);
   575                          skb = nskb;
   576                          rxrpc_new_skb(skb, rxrpc_skb_unshared);
   577                          sp = rxrpc_skb(skb);
   578                  }
   579          }

regards,
dan carpenter


      reply	other threads:[~2022-11-16 18:49 UTC|newest]

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

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 \
    --in-reply-to=Y3Uwwl4QjVNT1Jly@kadam \
    [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