From: Michael Hennerich Date: Fri, 28 Mar 2008 21:16:06 +0000 (-0700) Subject: blackfin video driver: fix bug when opening/reading/mmaping BF54x and BF52x framebuff... X-Git-Tag: v2.6.25-rc8~49 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=363df3994f034e7fe87d146fcf19f6a3ab2a2291;p=linux-2.6 blackfin video driver: fix bug when opening/reading/mmaping BF54x and BF52x framebuffer simultaneously http://blackfin.uclinux.org/gf/project/uclinux-dist/tracker/?action=TrackerItemEdit&tracker_item_id=3974 opening/reading/mmaping BF54x and BF52x framebuffer simultaneously triggers BUG: failure at mm/nommu.c:470/add_nommu_vma() Add VM_SHARED to the default vm_flags Signed-off-by: Michael Hennerich Signed-off-by: Bryan Wu Cc: Geert Uytterhoeven Cc: "Antonino A. Daplas" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/video/bf54x-lq043fb.c b/drivers/video/bf54x-lq043fb.c index 986a550c04..eefba3d0e4 100644 --- a/drivers/video/bf54x-lq043fb.c +++ b/drivers/video/bf54x-lq043fb.c @@ -384,7 +384,7 @@ static int bfin_bf54x_fb_mmap(struct fb_info *info, struct vm_area_struct *vma) * Other flags can be set, and are documented in * include/linux/mm.h */ - vma->vm_flags |= VM_MAYSHARE; + vma->vm_flags |= VM_MAYSHARE | VM_SHARED; return 0; } diff --git a/drivers/video/bfin-t350mcqb-fb.c b/drivers/video/bfin-t350mcqb-fb.c index f36ca7f6d8..135d6dd7e6 100644 --- a/drivers/video/bfin-t350mcqb-fb.c +++ b/drivers/video/bfin-t350mcqb-fb.c @@ -302,7 +302,7 @@ static int bfin_t350mcqb_fb_mmap(struct fb_info *info, struct vm_area_struct *vm * Other flags can be set, and are documented in * include/linux/mm.h */ - vma->vm_flags |= VM_MAYSHARE; + vma->vm_flags |= VM_MAYSHARE | VM_SHARED; return 0; }