diff options
author | Peter Hurley <peter@hurleysoftware.com> | 2014-02-10 02:59:06 +0100 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2014-02-14 22:39:29 +0100 |
commit | 960603a54aa0d5f4f1c4f1037bcaee571d03cb1e (patch) | |
tree | e226fbc1a87886de9b8fdc821d6f39a4d67ee40a /lib/test-kstrtox.c | |
parent | Bluetooth: Fix racy acquire of rfcomm_dev reference (diff) | |
download | linux-960603a54aa0d5f4f1c4f1037bcaee571d03cb1e.tar.xz linux-960603a54aa0d5f4f1c4f1037bcaee571d03cb1e.zip |
Bluetooth: Exclude released devices from RFCOMMGETDEVLIST ioctl
When enumerating RFCOMM devices in the rfcomm_dev_list, holding
the rfcomm_dev_lock only guarantees the existence of the enumerated
rfcomm_dev in memory, and not safe access to its state. Testing
the device state (such as RFCOMM_TTY_RELEASED) does not guarantee
the device will remain in that state for the subsequent access
to the rfcomm_dev's fields, nor guarantee that teardown has not
commenced.
Obtain an rfcomm_dev reference for the duration of rfcomm_dev
access.
Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Tested-By: Alexander Holler <holler@ahsoftware.de>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'lib/test-kstrtox.c')
0 files changed, 0 insertions, 0 deletions