Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752211AbdHASQJ (ORCPT ); Tue, 1 Aug 2017 14:16:09 -0400 Received: from imap0.codethink.co.uk ([185.43.218.159]:57487 "EHLO imap0.codethink.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751931AbdHASQH (ORCPT ); Tue, 1 Aug 2017 14:16:07 -0400 Message-ID: <1501611355.2047.6.camel@codethink.co.uk> Subject: Re: [PATCH 4.4 07/83] NFC: fix broken device allocation From: Ben Hutchings To: Johan Hovold , Samuel Ortiz Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org, Greg Kroah-Hartman Date: Tue, 01 Aug 2017 19:15:55 +0100 In-Reply-To: <20170725191709.515284558@linuxfoundation.org> References: <20170725191708.449126292@linuxfoundation.org> <20170725191709.515284558@linuxfoundation.org> Organization: Codethink Ltd. Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.12.9-1+b1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 701 Lines: 34 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. Ben. -- Ben Hutchings Software Developer, Codethink Ltd.