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] [day] [month] [year] [list]
Message-Id: <201203260817.29733.arnd@arndb.de>
Date:	Mon, 26 Mar 2012 08:17:28 +0000
From:	Arnd Bergmann <arnd@...db.de>
To:	Axel Lin <axel.lin@...il.com>
Cc:	linux-kernel@...r.kernel.org, Donggeun Kim <dg77.kim@...sung.com>,
	MyungJoo Ham <myungjoo.ham@...sung.com>,
	Kyungmin Park <kyungmin.park@...sung.com>,
	"Greg Kroah-Hartman" <greg@...ah.com>
Subject: Re: [PATCH RESEND] misc: Fix irq leak in max8997_muic_probe error path

On Monday 26 March 2012, Axel Lin wrote:
> 
> Current code does not properly free allocated irqs if request_threaded_irq
> returns error, fix it.
> 
> Signed-off-by: Axel Lin <axel.lin@...il.com>
> Acked-by: MyungJoo Ham <myungjoo.ham@...sung.com>

It took me a while to see why this is correct.

Acked-by: Arnd Bergmann <arnd@...db.de>

Note: It would be nicer to move the dev_err() down into the error path as well
and also fix the message to print the correct irq number, but your patch is
the important part.

Note to the driver maintainers: It looks like there is a race in the 
max8997_muic_irq_handler() function assigning the info->irq member
when multiple interrupts come in at the same time. Also, calling
sched_work from a threaded interrupt handler is pointless. I would suggest
fixing both of these by removing the work function and calling moving
its contents into the interrupt handler directly. Please correct me if I
am missing somehting here.

	Arnd

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