From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932491AbbELL1c (ORCPT ); Tue, 12 May 2015 07:27:32 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:49278 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753244AbbELL1a (ORCPT ); Tue, 12 May 2015 07:27:30 -0400 Date: Tue, 12 May 2015 14:27:13 +0300 From: Dan Carpenter To: Sudip Mukherjee Cc: Willy Tarreau , Greg Kroah-Hartman , devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] staging: panel: fix stackdump Message-ID: <20150512112712.GP14154@mwanda> References: <1431429344-11164-1-git-send-email-sudipm.mukherjee@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1431429344-11164-1-git-send-email-sudipm.mukherjee@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Source-IP: aserv0022.oracle.com [141.146.126.234] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 12, 2015 at 04:45:44PM +0530, Sudip Mukherjee wrote: > if we load the module, unload and then again try to load the module, we > will get a stackdump. In the module_exit function we are unregistering > the device and releasing the parport. So when we reach the detach > function parport is already null and the unregister_reboot_notifier() > is never called. When we again try to load the module it again tries > register_reboot_notifier() and gives us a stackdump as its earlier > registration is still not removed. It was caused by the commit > . The right format is: commit bb046fef9668 ('staging: panel: register reboot') It is in case human beings reading your description don't remember which patch bb046fef9668 was. > Fix this by moving all the unregistering and releasing in the detach > function, which should be the ideal case as the detach will be called if > we try to unregister the driver or if the parport is removed. > We also have the Fixes: tag. Fixes: bb046fef9668 ('staging: panel: register reboot') > Signed-off-by: Sudip Mukherjee regards, dan carpenter