All of lore.kernel.org
 help / color / mirror / Atom feed
From: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH net-next 1/6] net: qualcomm: rmnet: Remove the rmnet_map_results enum
Date: Tue, 05 Dec 2017 12:02:30 -0700	[thread overview]
Message-ID: <2b60a2a26dd536a3d68e2e8688102e32@codeaurora.org> (raw)
In-Reply-To: <20171205.115340.922583515967797421.davem@davemloft.net>

> This will crash, you didn't test the new code path that does the
> kfree_skb().
> 
> You should use an SKB helper function which will realloc the headroom
> if ETH_HLEN is not available, instead of failing.
...
> That is definitely not the only thing this change is doing:
> Previously these paths would return "RMNET_MAP_CONSUMED":
> Causing this code to return.
> Now, instead the code jumps to fail:
> 
>> @@ -142,7 +142,11 @@ static int rmnet_map_egress_handler(struct 
>> sk_buff *skb,
>> 
>>  	skb->protocol = htons(ETH_P_MAP);
>> 
>> -	return RMNET_MAP_SUCCESS;
>> +	return 0;
>> +
>> +fail:
>> +	kfree_skb(skb);
>> +	return -ENOMEM;
>>  }
>> 
> 
> Which frees the SKB.
> 
> This is a behavioral change, perhaps a bug fix.
> 
> Well, nobody knows because you do not explain this at all in your
> commit message.
> 
> Do not mix functional changes with cleanups.  If you want to change how
> freeing the SKB is done, do it in a separate change from the patch that
> removes this enumeration.
> 
> Thank you.

Hi David

I will send the change in freeing behavior as a bug fix for net and then
post updates on this series after it.

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

  reply	other threads:[~2017-12-05 19:02 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-04  6:37 [PATCH net-next 0/6] net: qualcomm: rmnet: Configuration options Subash Abhinov Kasiviswanathan
2017-12-04  6:37 ` [PATCH net-next 1/6] net: qualcomm: rmnet: Remove the rmnet_map_results enum Subash Abhinov Kasiviswanathan
2017-12-05 16:53   ` David Miller
2017-12-05 19:02     ` Subash Abhinov Kasiviswanathan [this message]
2017-12-04  6:37 ` [PATCH net-next 2/6] net: qualcomm: rmnet: Remove the some redundant macros Subash Abhinov Kasiviswanathan
2017-12-04  6:37 ` [PATCH net-next 3/6] net: qualcomm: rmnet: Allow only one rmnet dev per muxid per real dev Subash Abhinov Kasiviswanathan
2017-12-04  6:37 ` [PATCH net-next 4/6] net: qualcomm: rmnet: Process packets over ethernet Subash Abhinov Kasiviswanathan
2017-12-05 16:55   ` David Miller
2017-12-04  6:37 ` [PATCH net-next 5/6] net: qualcomm: rmnet: Allow to configure flags for new devices Subash Abhinov Kasiviswanathan
2017-12-08 16:26   ` Dan Williams
2017-12-08 18:59     ` Subash Abhinov Kasiviswanathan
2017-12-04  6:37 ` [PATCH net-next 6/6] net: qualcomm: rmnet: Allow to configure flags for existing devices Subash Abhinov Kasiviswanathan

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=2b60a2a26dd536a3d68e2e8688102e32@codeaurora.org \
    --to=subashab@codeaurora.org \
    --cc=davem@davemloft.net \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.