]> err.no Git - linux-2.6/commit
fbdev: fix race in device_create
authorGreg Kroah-Hartman <gregkh@suse.de>
Thu, 15 May 2008 20:44:08 +0000 (13:44 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 20 May 2008 20:31:53 +0000 (13:31 -0700)
commit8b485877e0b9eb23c3579f50cca165f75442c6cc
tree709b03e7436df3895bf49868ec3de8d2078d281a
parent19051c5035d217e572672a2ca9db06c1cef50e9b
fbdev: fix race in device_create

There is a race from when a device is created with device_create() and
then the drvdata is set with a call to dev_set_drvdata() in which a
sysfs file could be open, yet the drvdata will be NULL, causing all
sorts of bad things to happen.

This patch fixes the problem by using the new function,
device_create_drvdata().

Cc: Kay Sievers <kay.sievers@vrfy.org>
Cc: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/video/display/display-sysfs.c