From: Peter Hurley Date: Mon, 10 Feb 2014 01:59:06 +0000 (-0500) Subject: Bluetooth: Exclude released devices from RFCOMMGETDEVLIST ioctl X-Git-Tag: v3.15-rc1~113^2~159^2^2~130^2~68 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=960603a54aa0d5f4f1c4f1037bcaee571d03cb1e;p=pandora-kernel.git 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 Tested-By: Alexander Holler Signed-off-by: Marcel Holtmann --- Reading git-diff-tree failed