Bluetooth: Verify dlci not in use before rfcomm_dev create
authorPeter Hurley <peter@hurleysoftware.com>
Mon, 10 Feb 2014 01:59:10 +0000 (20:59 -0500)
committerMarcel Holtmann <marcel@holtmann.org>
Fri, 14 Feb 2014 21:39:30 +0000 (13:39 -0800)
commitc10a848cea89a8f0418fa0efec33c4e8507aab4b
tree1c6eaf6a370f29ca4438bac6a8654c1fabbb1ae2
parentc949c224cfd7d5445ef947e8b93c0657323d5be5
Bluetooth: Verify dlci not in use before rfcomm_dev create

Only one session/channel combination may be in use at any one
time. However, the failure does not occur until the tty is
opened (in rfcomm_dlc_open()).

Because these settings are actually bound at rfcomm device
creation (via RFCOMMCREATEDEV ioctl), validate and fail before
creating the rfcomm tty device.

Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Tested-By: Alexander Holler <holler@ahsoftware.de>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
include/net/bluetooth/rfcomm.h
net/bluetooth/rfcomm/core.c
net/bluetooth/rfcomm/tty.c