]> git.ipfire.org Git - thirdparty/kernel/stable.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>
Sun, 5 Oct 2014 20:40:58 +0000 (13:40 -0700)
commit659235150ff367afd36515e1b9bcaaf23ff1b0ba
tree9124fa1d18960b05cbf6299608804e817d7a52a5
parentfe359c391b06ef69351955458d2d6b7d37a6ab2a
uwb: init beacon cache entry before registering uwb device

commit 675f0ab2fe5a0f7325208e60b617a5f32b86d72c upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/uwb/lc-dev.c