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]
Message-ID: <20110805151747.GB18527@suse.de>
Date:	Fri, 5 Aug 2011 08:17:47 -0700
From:	Greg KH <gregkh@...e.de>
To:	Alexey Khoroshilov <khoroshilov@...ras.ru>
Cc:	wfp5p@...ginia.edu, linux-kernel@...r.kernel.org
Subject: Re: Staging: serqt_usb2: kmalloc(GFP_NOIO) with spinlock held in
 qt_break() and qt_tiocmset()

On Fri, Aug 05, 2011 at 06:35:10PM +0400, Alexey Khoroshilov wrote:
> qt_break() calls usb_control_msg() with spinlock held,

Ick, not good, that will sleep.

> while usb_control_msg() calls kmalloc(GFP_NOIO) and indirectly usb_alloc_urb(GFP_NOIO).

You forgot the obvious call to wait_for_completion_timeout() in the
usb_control_msg() callchain that shows that a spinlock is not a good
thing to be using here :)

> The same is true for qt_tiocmget() and qt_tiocmset().
> 
> Is replacing spinlock with mutex an appropriate solution to fix the issue?

Yes, it sounds like it.

patches gladly accepted.

thanks,

greg k-h
--
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