From: Greg Kroah-Hartman Date: Thu, 15 May 2008 20:44:08 +0000 (-0700) Subject: mm: bdi: fix race in bdi_class device creation X-Git-Tag: v2.6.26-rc4~94^2~11 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=19051c5035d217e572672a2ca9db06c1cef50e9b;p=pandora-kernel.git mm: bdi: fix race in bdi_class device creation 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_vargs(). Many thanks to Arthur Jones for reporting the bug, and testing patches out. Cc: Kay Sievers Cc: Arthur Jones Cc: Peter Zijlstra Cc: Miklos Szeredi Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed