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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <DBFB1B45AF80394ABD1C807E9F28D1570453626FF0@BLRX7MCDC203.AMER.DELL.COM>
Date:	Tue, 28 Jun 2011 21:59:32 +0530
From:	<Shyam_Iyer@...l.com>
To:	<davem@...emloft.net>, <shyam.iyer.t@...il.com>
CC:	<netdev@...r.kernel.org>, <rmody@...cade.com>, <ddutt@...cade.com>
Subject: RE: [PATCH] [net][bna] Fix call trace when interrupts are disabled
 while sleeping function kzalloc is called

(My replies bounced of netdev for some reason..resending)

> -----Original Message-----
> From: David Miller [mailto:davem@...emloft.net]
> Sent: Monday, June 27, 2011 7:07 PM
> To: shyam.iyer.t@...il.com
> Cc: netdev@...r.kernel.org; rmody@...cade.com; ddutt@...cadel.com;
> Iyer, Shyam
> Subject: Re: [PATCH] [net][bna] Fix call trace when interrupts are
> disabled while sleeping function kzalloc is called
> 
> From: Shyam Iyer <shyam.iyer.t@...il.com>
> Date: Mon, 27 Jun 2011 16:21:32 -0400
> 
> > The kzalloc sleeps and disabling interrupts(spin_lock_irqsave)
> > causes oops like the one.
> 
> What if ->cfg_flags changes while you have dropped the lock?
> 
> If the lock doesn't protect those flags, what was it being
> taken for in the first place?

Oops yes!

Here is try 2.

I found that I had to initialize the flags variable outside the spin_lock_irqsave in the following way to fix the problem. The sleeping kzalloc function is in fact in the request_threaded_irq call which allocates the irq handler function and its flags arguments.

Attached patch fixes the issue.

Download attachment "0001-Fix-call-trace-in-request_irq.patch" of type "application/octet-stream" (1042 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ