[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LNX.2.00.1508011410170.925@pobox.suse.cz>
Date: Sat, 1 Aug 2015 14:11:40 +0200 (CEST)
From: Jiri Kosina <jkosina@...e.com>
To: Dmitry Torokhov <dmitry.torokhov@...il.com>
cc: Krzysztof Kozlowski <k.kozlowski@...sung.com>,
linux-input@...r.kernel.org, linux-kernel@...r.kernel.org,
sre@...nel.org, linux-pm@...r.kernel.org,
"H.J. Lu" <hjl.tools@...il.com>, stable@...r.kernel.org
Subject: Re: [PATCH] HID: hid-input: Fix accessing freed memory during driver
unbind
On Wed, 29 Jul 2015, Dmitry Torokhov wrote:
> > Another and less intrusive fix would be:
> >
> > char *name = dev->battery->desc->name;
> > struct power_supply_desc *psy_desc = dev->battery->desc;
> > power_supply_unregister(dev->battery);
> > kfree(name);
> > kfree(psy_desc);
>
> I would much rather prefer this to the other version as it does not
> leave memory hanging around, potentially indefinitely, but ultimately it
> is up to Jiri.
I must have been in some broken state of mind when applying the original
one, thanks a lot for catching my brainfart, Dmitry!
Kryzstof, could you please send me properly formatted patch with the
above, on top of your previous fix?
Thanks.
--
Jiri Kosina
SUSE Labs
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists