From mboxrd@z Thu Jan 1 00:00:00 1970 From: Subash Abhinov Kasiviswanathan 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 Message-ID: <2b60a2a26dd536a3d68e2e8688102e32@codeaurora.org> References: <1512369428-20455-1-git-send-email-subashab@codeaurora.org> <1512369428-20455-2-git-send-email-subashab@codeaurora.org> <20171205.115340.922583515967797421.davem@davemloft.net> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org To: David Miller Return-path: Received: from smtp.codeaurora.org ([198.145.29.96]:57778 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752608AbdLETCb (ORCPT ); Tue, 5 Dec 2017 14:02:31 -0500 In-Reply-To: <20171205.115340.922583515967797421.davem@davemloft.net> Sender: netdev-owner@vger.kernel.org List-ID: > 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