From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf0-f66.google.com ([209.85.215.66]:37237 "EHLO mail-lf0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752276AbdHATQu (ORCPT ); Tue, 1 Aug 2017 15:16:50 -0400 Date: Tue, 1 Aug 2017 21:16:46 +0200 From: Johan Hovold To: Ben Hutchings Cc: Johan Hovold , Samuel Ortiz , linux-kernel@vger.kernel.org, stable@vger.kernel.org, Greg Kroah-Hartman , "David S. Miller" , Dan Carpenter , Andrew Morton Subject: Re: [PATCH 4.4 07/83] NFC: fix broken device allocation Message-ID: <20170801191646.GH30136@localhost> References: <20170725191708.449126292@linuxfoundation.org> <20170725191709.515284558@linuxfoundation.org> <1501611355.2047.6.camel@codethink.co.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1501611355.2047.6.camel@codethink.co.uk> Sender: stable-owner@vger.kernel.org List-ID: On Tue, Aug 01, 2017 at 07:15:55PM +0100, Ben Hutchings wrote: > On Tue, 2017-07-25 at 12:18 -0700, Greg Kroah-Hartman wrote: > > 4.4-stable review patch. If anyone has any objections, please let me know. > > > > ------------------ > > > > From: Johan Hovold > > > > commit 20777bc57c346b6994f465e0d8261a7fbf213a09 upstream. > [...] > > --- a/net/nfc/core.c > > +++ b/net/nfc/core.c > [...] > > @@ -1077,6 +1089,11 @@ struct nfc_dev *nfc_allocate_device(stru > > } > > > > return dev; > > + > > +err_free_dev: > > + kfree(dev); > > + > > + return ERR_PTR(rc); > > } > > EXPORT_SYMBOL(nfc_allocate_device); > [...] > > But the callers expect a null pointer on error, not an error pointer. > This looks broken in mainline too. Indeed. Dan's checkers found this one quickly and I posted a fix on the 9th of July: https://lkml.kernel.org/r/20170709110858.20331-1-johan@kernel.org but it has unfortunately not been applied yet despite a reminder sent to Samuel and Dave when Greg picked it up for stable ten days ago. Perhaps it can go in through Andrew's tree if there's going to be further delays (e.g. due to vacations)? Thanks, Johan