]> git.baikalelectronics.ru Git - kernel.git/commit
video: sm501fb: Early initialization of mm_lock mutex.
authorPaul Mundt <lethal@linux-sh.org>
Fri, 3 Jul 2009 06:45:56 +0000 (15:45 +0900)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 4 Jul 2009 17:39:06 +0000 (10:39 -0700)
commit56ace762529160ea1952e13f89095e899a1daaa2
tree01020b4eaa2df173889ebcfb71f7dc02097dede6
parent148e6c7e27e4bf1abd8e53281bbced4f3e917c6a
video: sm501fb: Early initialization of mm_lock mutex.

Commit 60c0fc2b77a9cc1247164ce7877fae05c4ddf9e4 (fbdev: add mutex for
fb_mmap locking) introduces a ->mm_lock mutex for protecting smem
assignments. Unfortunately in the case of sm501fb these happen quite
early in the initialization code, well before the mutex_init() that takes
place in register_framebuffer(), leading to:

   Badness at kernel/mutex.c:207

   Pid : 1, Comm:          swapper
   CPU : 0                 Not tainted  (2.6.31-rc1-00284-g529ba0d-dirty #2273)

   PC is at __mutex_lock_slowpath+0x72/0x1bc
   PR is at __mutex_lock_slowpath+0x66/0x1bc
   ...

matroxfb appears to have the same issue and has solved it with an early
mutex_init(), so we do the same for sm501fb.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Cc: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/video/sm501fb.c