summaryrefslogtreecommitdiff
path: root/net/unix/af_unix.c
diff options
context:
space:
mode:
authorMing Lei <ming.lei@canonical.com>2012-08-04 08:01:23 +0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-08-17 00:28:50 +0400
commit0cfc1e1e7b5347b4b6df1212f365ce6620bdd98f (patch)
tree4d976455cea5dc6055c132b0f9833b01afe5c285 /net/unix/af_unix.c
parent2887b3959c8b2f6ed1f62ce95c0888aedb1ea84b (diff)
downloadlinux-0cfc1e1e7b5347b4b6df1212f365ce6620bdd98f.tar.xz
firmware loader: fix device lifetime
Callers of request_firmware* must hold the reference count of @device, otherwise it is easy to trigger oops since the firmware loader device is the child of @device. This patch adds comments about the usage. In fact, most of drivers call request_firmware* in its probe() or open(), so the constraint should be reasonable and can be satisfied. Also this patch holds the reference count of @device before schedule_work() in request_firmware_nowait() to avoid that the @device is released after request_firmware_nowait returns and before the worker function is scheduled. Signed-off-by: Ming Lei <ming.lei@canonical.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/unix/af_unix.c')
0 files changed, 0 insertions, 0 deletions