lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 7 Nov 2013 01:18:54 +0000
From:	"Liu, Chuansheng" <chuansheng.liu@...el.com>
To:	"tj@...nel.org" <tj@...nel.org>
CC:	Greg KH <gregkh@...uxfoundation.org>,
	"dmitry.torokhov@...il.com" <dmitry.torokhov@...il.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH] devres: Freeing the drs after all release() are called

Hello,

> -----Original Message-----
> From: Tejun Heo [mailto:htejun@...il.com] On Behalf Of tj@...nel.org
> Sent: Thursday, November 07, 2013 8:52 AM
> To: Liu, Chuansheng
> Cc: Greg KH; dmitry.torokhov@...il.com; linux-kernel@...r.kernel.org
> Subject: Re: [PATCH] devres: Freeing the drs after all release() are called
> 
> Hello,
> 
> On Thu, Nov 07, 2013 at 12:36:56AM +0000, Liu, Chuansheng wrote:
> > Yes, I knew I can put the code always like below:
> > A = devm_kzalloc();
> > C = devm_kzalloc();
> > ...
> > B= devm_request_threaded_irq(isr_handler);
> >
> > But, the above is just one simple coding prototype, if there are many calling:
> > E -- > F -- > D -- >... then to devm_kzalloc().
> >
> > To be honest, it will make code too hard to always adapt the rule?
> > And I trying to find out every potential devm_kzalloc() before irq requesting.
> 
> It isn't a good idea to paper over existing bugs from upper layer.
> You realize that the above code sequence is already buggy during init
> unless there's something explicitly blocking generation of irqs until
> init is complete, right?  The right thing to do would be either
> reordering the operations or wrapping the operation which unblocks irq
> at the end of init with devres so that irq gets blocked before the
> rest of release proceeds.
> 
> What we must *NOT* do is working around existing bugs in a half-assed
> way from midlayer.  

Yes, doing the right order initialization is always right thing.
But normally when we hit the panic during shutdown/reboot like below:
PAGE FAULT XXX 0x12345678

It is really difficult to debug.
So at least, could we have method to expose these hidden issues?

Thanks.

I am reviewing other codes' usage of devm_request_threaded_irq() also.

--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ