OpenCloudOS-Kernel/drivers/leds/trigger
Manfred Schlaegl c945cbcf45 leds: trigger: ledtrig-backlight: Fix invalid memory access in fb_event notification callback
fb_notifier_callback is called on any event fired by
fb_notifier_call_chain. Events may, or may not contain some data
(fb_event.data). In case of FB_EVENT_BLANK fb_event.data contains a
pointer to an integer holdingthe blank state. The Problem is, that in
ledtrig-backlight.c - fb_notifier_callback the pointer to blank state
is dereferenced BEFORE the event-type is checked.

Obviously this leads to problems with other events than FB_EVENT_BLANK,
where fb_event.data is undefined or NULL. It seems, that this problem
existed ever since the driver was added.

Like in drivers/video/backlight/backlight.c line 43 I would suggest to
return immediately on events other than FB_EVENT_BLANK.

Signed-off-by: Manfred Schlaegl <manfred.schlaegl@gmx.at>
Signed-off-by: Bryan Wu <cooloney@gmail.com>
2013-08-26 17:46:36 -07:00
..
Kconfig leds: add camera LED triggers 2013-04-01 11:04:50 -07:00
Makefile leds: add camera LED triggers 2013-04-01 11:04:50 -07:00
ledtrig-backlight.c leds: trigger: ledtrig-backlight: Fix invalid memory access in fb_event notification callback 2013-08-26 17:46:36 -07:00
ledtrig-camera.c leds: add camera LED triggers 2013-04-01 11:04:50 -07:00
ledtrig-cpu.c
ledtrig-default-on.c
ledtrig-gpio.c
ledtrig-heartbeat.c
ledtrig-ide-disk.c
ledtrig-oneshot.c
ledtrig-timer.c
ledtrig-transient.c