V4L/DVB (13598): videobuf_dma_contig_user_get() for non-aligned offsets

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

I have a question about the following videobuf_dma_contig_user_get()
fix to 2.6.33:

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blobdiff;f=drivers/media/video/videobuf-dma-contig.c;h=22c01097e8a821f95c04ae9d8ae9432623381d46;hp=d25f28461da1fcaac4b5d74ad8d6cac65e286b4f;hb=31bedfa5068936b15a388842be1d03cdd1bdfb07;hpb=0d94e29459d372b6c5dda964a8b35a8d40050ca7

By including offset into the calculation of mem->size, doesn't that
impact the correctness of the sequent bound checking?

         if ((vb->baddr + mem->size) > vma->vm_end)
                 goto out_up;

Perhaps the fix should have been accompanied by the following change
to the above lines to avoid double counting of the non-align offset?

         if (PAGE_ALIGN(vb->baddr + vb->size) > vma->vm_end)
                 goto out_up;

Thanks,
William Huang
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux