Patch "backlight: lcd: Fix race condition during register" has been added to the 3.18-stable tree
Subsystems (3)
This is a note to let you know that I've just added the patch titled
backlight: lcd: Fix race condition during register
to the 3.18-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
backlight-lcd-fix-race-condition-during-register.patch
and it can be found in the queue-3.18 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From foo@baz Sun Nov 19 12:16:40 CET 2017
From: Uwe Kleine-K�nig <[email protected]>
Date: Wed, 6 Jul 2016 19:33:05 +0200
Subject: backlight: lcd: Fix race condition during register
From: Uwe Kleine-K�nig <[email protected]>
[ Upstream commit cc21942bce652d1a92dae85b785378256e1df1f7 ]
Once device_register is called for a device its attributes might be accessed. As the callbacks of a lcd device's attributes make use of the lcd_ops, the respective member must be setup before calling device_register.
--- drivers/video/backlight/lcd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/video/backlight/lcd.c +2 -2
@@ -226,6 +226,8 @@ struct lcd_device *lcd_device_register(cdev_set_name (&new_ld->dev,"%s" , name);dev_set_drvdata (&new_ld->dev, devdata); + new_ld->ops = ops; + rc =device_register (&new_ld->dev);if (rc) {put_device (&new_ld->dev);
@@ -238,8 +240,6 @@ struct lcd_device *lcd_device_register(creturn ERR_PTR (rc); } - new_ld->ops = ops; -return new_ld; }EXPORT_SYMBOL (lcd_device_register);
Patches currently in stable-queue which might be from [email protected] are
queue-3.18/backlight-lcd-fix-race-condition-during-register.patch