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]
Date:	Fri, 04 May 2007 08:41:53 +0200
From:	Marcel Holtmann <marcel@...tmann.org>
To:	Jiri Kosina <jkosina@...e.cz>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	linux-kernel@...r.kernel.org, bluez-devel@...ts.sourceforge.net
Subject: Re: [PATCH] Bluetooth: postpone hci_dev unregistration

Hi Jiri,

> (I sent this a week ago but it seems to have got lost in other noise, 
> resending)
> 
> From: Jiri Kosina <jkosina@...e.cz>
> 
> Bluetooth: postpone hci_dev unregistration
>     
> Commit b40df57 substituted bh_lock_sock() in hci_sock_dev_event() for 
> lock_sock() when unregistering HCI device, in order to prevent deadlock 
> against locking in l2cap_connect_cfm() from softirq context.
>     
> This however introduces another problem - hci_sock_dev_event() for 
> HCI_DEV_UNREG can also be triggered in atomic context, in which calling 
> lock_sock() is not safe as it could sleep. Reported by Jeremy Fitzhardinge 
> at http://lkml.org/lkml/2007/4/23/271
> 
> This patch moves the detaching of sockets from hci_device into workqueue, 
> so that lock_sock() can be used safely. This requires movement of 
> deallocation of hci_dev - deallocating device just after 
> hci_unregister_dev() would be too soon, as it could happen before the 
> workqueue has been run.

I saw the report on LKML, but I am not really comfortable with this
approach. It feels like an ugly hack. This needs more thinking and I
think that simplifying the looking between HCI and L2CAP should be the
goal.

Regards

Marcel


-
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