[lkml]   [2005]   [Dec]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: More info for DSM w/r/t sunffb on 2.6.15-rc6

    On Fri, 23 Dec 2005, David S. Miller wrote:
    > Something like this patch below.
    > Signed-off-by: David S. Miller <>
    > diff --git a/drivers/video/sbuslib.c b/drivers/video/sbuslib.c
    > index 646c43f..ac937da 100644
    > --- a/drivers/video/sbuslib.c
    > +++ b/drivers/video/sbuslib.c
    > @@ -46,6 +46,9 @@ int sbusfb_mmap_helper(struct sbus_mmap_
    > unsigned long off;
    > int i;
    > + if (!(vma->vm_flags & VM_SHARED))
    > + return -EINVAL;
    > +

    Side note - as I explained to Nick the other week, VM_SHARED really means
    "shared _writable_" mapping, so you're now disallowing a shared read-only
    open too.

    Which may be fine, of course. Especially if sbusfb always ends up giving a
    writable pfn-mapping. But I wanted to check that that was what you meant
    to do.

    To test for MAP_SHARED, either do the is_cow_mapping() thing, or check
    the VM_MAYSHARE bit.

    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2009-11-18 23:46    [W:0.020 / U:21.980 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site