提交 59d399d3 编写于 作者: T Thomas Renninger 提交者: Len Brown

[ACPI] Fix Null pointer deref in video/lcd/brightness

http://bugzilla.kernel.org/show_bug.cgi?id=5571Signed-off-by: NThomas Renninger <trenn@suse.de>
Signed-off-by: NNishanth Aravamudan <nacc@us.ibm.com>
Signed-off-by: NYu Luming <luming.yu@gmail.com>
Cc: <stable@kernel.org>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLen Brown <len.brown@intel.com>
上级 d2149b54
...@@ -812,7 +812,7 @@ acpi_video_device_write_brightness(struct file *file, ...@@ -812,7 +812,7 @@ acpi_video_device_write_brightness(struct file *file,
ACPI_FUNCTION_TRACE("acpi_video_device_write_brightness"); ACPI_FUNCTION_TRACE("acpi_video_device_write_brightness");
if (!dev || count + 1 > sizeof str) if (!dev || !dev->brightness || count + 1 > sizeof str)
return_VALUE(-EINVAL); return_VALUE(-EINVAL);
if (copy_from_user(str, buffer, count)) if (copy_from_user(str, buffer, count))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册