]> git.baikalelectronics.ru Git - kernel.git/commit
uwb: init beacon cache entry before registering uwb device
authorThomas Pugliese <thomas.pugliese@gmail.com>
Thu, 7 Aug 2014 20:45:35 +0000 (15:45 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 8 Sep 2014 23:03:21 +0000 (16:03 -0700)
commit0305d3b8e9b2abd680703e5238a0bcbb03f919a0
tree8e4fbaf27b6c4851b6d33928b2064f21268c687e
parente3ba57a1958f2c8ec6336cf901fb7c3446b1d07e
uwb: init beacon cache entry before registering uwb device

Make sure the uwb_dev->bce entry is set before calling uwb_dev_add in
uwbd_dev_onair so that usermode will only see the device after it is
properly initialized.  This fixes a kernel panic that can occur if
usermode tries to access the IEs sysfs attribute of a UWB device before
the driver has had a chance to set the beacon cache entry.

Signed-off-by: Thomas Pugliese <thomas.pugliese@gmail.com>
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/uwb/lc-dev.c