From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752320AbbJEN1z (ORCPT ); Mon, 5 Oct 2015 09:27:55 -0400 Received: from 99-149-18-83.lightspeed.fshrin.sbcglobal.net ([99.149.18.83]:59036 "EHLO i4031.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752008AbbJEN1x (ORCPT ); Mon, 5 Oct 2015 09:27:53 -0400 X-Greylist: delayed 393 seconds by postgrey-1.27 at vger.kernel.org; Mon, 05 Oct 2015 09:27:53 EDT X-Spam-Report: * -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Date: Mon, 05 Oct 2015 09:40:04 -0400 From: "David B. Robins" To: David Miller Cc: linux-usb@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] net: usb: asix: Fix crash on skb alloc failure In-Reply-To: <20151005.033155.2121849340240343993.davem@davemloft.net> References: <1443644404-6452-1-git-send-email-linux@davidrobins.net> <20151005.033155.2121849340240343993.davem@davemloft.net> Message-ID: <69f8994562da8cb064f138b162a99c4d@i4031.net> User-Agent: Roundcube Webmail/0.9.5 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2015-10-05 06:31, David Miller wrote: > From: "David B. Robins" > Date: Wed, 30 Sep 2015 16:20:04 -0400 > >> If asix_rx_fixup_internal() fails to allocate rx->ax_skb, it will >> return >> but not clear rx->size. rx points to driver private data. A later call >> assumes that nonzero size means ax_skb was allocated and passes a null >> ax_skb to skb_put. Changed allocation failure return to clear size >> first. >> >> Found testing board with AX88772B devices. >> >> Signed-off-by: David B. Robins > > Applied, thanks. While I am happy for the patch I submitted to be applied, and it is consistent with existing error handling and does fix the specific issue, I believe a later series of 5 patches by Dean Jenkins that more comprehensively address the issue (grouped under subject "Improve ASIX RX memory allocation error handling") should be preferred.