Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753881AbbHLNTR (ORCPT ); Wed, 12 Aug 2015 09:19:17 -0400 Received: from mx0.mattleach.net ([176.58.118.143]:57182 "EHLO mx0.mattleach.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752084AbbHLNTP (ORCPT ); Wed, 12 Aug 2015 09:19:15 -0400 X-Greylist: delayed 331 seconds by postgrey-1.27 at vger.kernel.org; Wed, 12 Aug 2015 09:19:14 EDT Message-ID: <1439381729.357.0.camel@mattleach.net> Subject: Re: [PATCH] HID: hid-input: fix double-free in cleanup_battery From: Matthew Leach To: Jiri Kosina Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, Krzysztof Kozlowski , Sebastian Reichel , stable@vger.kernel.org Date: Wed, 12 Aug 2015 13:15:29 +0100 In-Reply-To: References: <1439381384-13733-1-git-send-email-matthew@mattleach.net> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.16.4 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: 848 Lines: 24 On Wed, 2015-08-12 at 15:16 +0200, Jiri Kosina wrote: > On Wed, 12 Aug 2015, Matthew Leach wrote: > > > The power supply layer has taken control of the power supply > objects > > from the drivers to core, see [1]. As such, calling > > power_supply_unregister is enough to free the power_supply device. > > > > Remove the extra kfree's as the power_supply core will handle > freeing > > the power_supply object for us. > > Please see commit 0621809e37 ("HID: hid-input: Fix accessing freed > memory > during device disconnect") in Linus' tree. Ah. I missed that. Sorry for the noise. -- Matt -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/