netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Gregory Rose <gvrose8192@gmail.com>
To: Eric Dumazet <eric.dumazet@gmail.com>, Netdev <netdev@vger.kernel.org>
Subject: Re: net: Initialize return value in gro_cells_receive
Date: Wed, 7 Oct 2020 08:50:42 -0700	[thread overview]
Message-ID: <03e2fd9c-e4c9-cff4-90c9-99ea9d3a5713@gmail.com> (raw)
In-Reply-To: <9c6415e4-9d3b-2ba9-494a-c24316ec60c4@gmail.com>



On 10/7/2020 1:21 AM, Eric Dumazet wrote:
> 
> 
> On 10/6/20 8:53 PM, Gregory Rose wrote:
>> The 'res' return value is uninitalized and may be returned with
>> some random value.  Initialize to NET_RX_DROP as the default
>> return value.
>>
>> Signed-off-by: Greg Rose <gvrose8192@gmail.com>
>>
>> diff --git a/net/core/gro_cells.c b/net/core/gro_cells.c
>> index e095fb871d91..4e835960db07 100644
>> --- a/net/core/gro_cells.c
>> +++ b/net/core/gro_cells.c
>> @@ -13,7 +13,7 @@ int gro_cells_receive(struct gro_cells *gcells, struct sk_buff *skb)
>>   {
>>          struct net_device *dev = skb->dev;
>>          struct gro_cell *cell;
>> -       int res;
>> +       int res = NET_RX_DROP;
>>
>>          rcu_read_lock();
>>          if (unlikely(!(dev->flags & IFF_UP)))
> 
> I do not think this is needed.
> 
> Also, when/if sending a patch fixing a bug, we require a Fixes: tag.
> 
> Thanks.
> 
If it's not needed then feel free to ignore it.  It just looked like
the unlikely case returns without setting the return value.

Thanks

- Greg

Thanks,

  reply	other threads:[~2020-10-07 15:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-06 18:53 net: Initialize return value in gro_cells_receive Gregory Rose
2020-10-07  8:21 ` Eric Dumazet
2020-10-07 15:50   ` Gregory Rose [this message]
2020-10-07 16:37     ` Eric Dumazet
2020-10-07 18:39       ` Gregory Rose

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=03e2fd9c-e4c9-cff4-90c9-99ea9d3a5713@gmail.com \
    --to=gvrose8192@gmail.com \
    --cc=eric.dumazet@gmail.com \
    --cc=netdev@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).