]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ubi: Fix race condition between ubi device creation and udev
authorIosif Harutyunov <iharutyunov@SonicWALL.com>
Fri, 22 Jul 2016 23:22:42 +0000 (23:22 +0000)
committerSasha Levin <alexander.levin@verizon.com>
Mon, 22 Aug 2016 16:23:23 +0000 (12:23 -0400)
commitcdf25333b42fb889f086ef65d0734d0dbdc49f4e
treec6b8bbca6c332a29110446823e79d7b335f57df2
parent6d1b8d7ad19d801a3e98f739fc6692598ece38a9
ubi: Fix race condition between ubi device creation and udev

[ Upstream commit 714fb87e8bc05ff78255afc0dca981e8c5242785 ]

Install the UBI device object before we arm sysfs.
Otherwise udev tries to read sysfs attributes before UBI is ready and
udev rules will not match.

Cc: <stable@vger.kernel.org>
Signed-off-by: Iosif Harutyunov <iharutyunov@sonicwall.com>
[rw: massaged commit message]
Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
drivers/mtd/ubi/build.c