Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934035AbcJMCxw (ORCPT ); Wed, 12 Oct 2016 22:53:52 -0400 Received: from szxga01-in.huawei.com ([58.251.152.64]:38789 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933767AbcJMCxu (ORCPT ); Wed, 12 Oct 2016 22:53:50 -0400 Subject: Re: [PATCH 3.4 088/125] ser_gigaset: fix deallocation of platform device structure To: Paul Bolle , , References: <1476275600-4626-1-git-send-email-lizf@kernel.org> <1476275641-4697-88-git-send-email-lizf@kernel.org> <1476276740.9670.19.camel@tiscali.nl> CC: , Tilman Schmidt , "David S. Miller" From: Zefan Li Message-ID: <57FEF708.2060405@huawei.com> Date: Thu, 13 Oct 2016 10:52:56 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <1476276740.9670.19.camel@tiscali.nl> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.177.19.236] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1095 Lines: 27 On 2016/10/12 20:52, Paul Bolle wrote: > Zefan Li, > > On Wed, 2016-10-12 at 20:33 +0800, lizf@kernel.org wrote: >> When shutting down the device, the struct ser_cardstate must not be >> kfree()d immediately after the call to platform_device_unregister() >> since the embedded struct platform_device is still in use. >> Move the kfree() call to the release method instead. >> >> Signed-off-by: Tilman Schmidt >> Fixes: 2869b23e4b95 ("drivers/isdn/gigaset: new M101 driver (v2)") >> Reported-by: Sasha Levin >> Signed-off-by: Paul Bolle >> Signed-off-by: David S. Miller >> Signed-off-by: Zefan Li > > There has been a follow up for this fix. I'll have to dive into my > archive to see why that was needed. > > It was complicated, because there has been a short period in which this > fix was correct. Something like that, I'm speaking from memory. > (Perhaps Tilman's memory is less imperfect.) > > I'll try get back to this shortly (in a day or so). > Thanks for looking into this.