ubi: Fix race condition between ubi device creation and udev

[ Upstream commit 714fb87e8b ]

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>
This commit is contained in:
Iosif Harutyunov 2016-07-22 23:22:42 +00:00 • committed by Sasha Levin
commit cdf25333b4