fbdev: add mutex for fb_mmap locking
Add a mutex to avoid a circular locking problem between the mm layer semaphore and fbdev ioctl mutex through the fb_mmap() call. Also, add mutex to all places where smem_start and smem_len fields change so the mutex inside the fb_mmap() is actually used. Changing of these fields before calling the framebuffer_register() are not mutexed. This is 2.6.31 material. It removes one lockdep (fb_mmap() and register_framebuffer()) but there is still another one (fb_release() and register_framebuffer()). It also cleans up handling of the smem_start and smem_len fields used by mutexed section of the fb_mmap(). Signed-off-by:Krzysztof Helt <krzysztof.h1@wp.pl> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: "Rafael J. Wysocki" <rjw@sisk.pl> Cc: <stable@kernel.org> Signed-off-by:
Andrew Morton <akpm@linux-foundation.org> Signed-off-by:
Linus Torvalds <torvalds@linux-foundation.org>
Showing
- drivers/video/atafb.c 6 additions, 1 deletiondrivers/video/atafb.c
- drivers/video/atmel_lcdfb.c 2 additions, 0 deletionsdrivers/video/atmel_lcdfb.c
- drivers/video/fbmem.c 5 additions, 8 deletionsdrivers/video/fbmem.c
- drivers/video/fsl-diu-fb.c 9 additions, 5 deletionsdrivers/video/fsl-diu-fb.c
- drivers/video/i810/i810_main.c 2 additions, 0 deletionsdrivers/video/i810/i810_main.c
- drivers/video/matrox/matroxfb_base.c 3 additions, 0 deletionsdrivers/video/matrox/matroxfb_base.c
- drivers/video/matrox/matroxfb_crtc2.c 4 additions, 1 deletiondrivers/video/matrox/matroxfb_crtc2.c
- drivers/video/mx3fb.c 11 additions, 6 deletionsdrivers/video/mx3fb.c
- drivers/video/omap/omapfb_main.c 4 additions, 0 deletionsdrivers/video/omap/omapfb_main.c
- drivers/video/platinumfb.c 2 additions, 0 deletionsdrivers/video/platinumfb.c
- drivers/video/pxafb.c 2 additions, 0 deletionsdrivers/video/pxafb.c
- drivers/video/sh7760fb.c 6 additions, 13 deletionsdrivers/video/sh7760fb.c
- drivers/video/sis/sis_main.c 2 additions, 0 deletionsdrivers/video/sis/sis_main.c
- drivers/video/sm501fb.c 13 additions, 8 deletionsdrivers/video/sm501fb.c
- drivers/video/w100fb.c 2 additions, 0 deletionsdrivers/video/w100fb.c
- include/linux/fb.h 1 addition, 0 deletionsinclude/linux/fb.h
Loading
Please register or sign in to comment