Magnus, >Thanks for the patch. For non-page aligned user space pointers I agree >that a fix is needed. Don't you think the while loop in >videobuf_dma_contig_user_get() also needs to be adjusted to include >the last page? I think the while loop checks one page too little in >the non-aligned case today. > >Cheers, > >/ magnus Thanks for reviewing my patch. It had worked for non-aligned address in my testing. If I understand this code correctly, the physical address of the user page start is determined in the first loop (pages_done == 0) and additional loops are run to make sure the memory is physically contiguous. Initially the mem->size is set to number of pages aligned to page size. Assume we pass 4097 bytes as size. mem->size = PAGE_ALIGN(vb->size); => 2 Inside the loop, iteration is done for 0 to pages-1. pages_done < (mem->size >> 12) => pages_done < 2 => iterate 2 times For size of 4096, we iterate once. For size of 4095, we iterate once. So IMO the loop is already iterate one more time when we pass non-aligned address since size is aligned to include the last page. So based on this could you ack my patch so that we could ask Mauro to merge it with priority? Murali Karicheri Software Design Engineer Texas Instruments Inc. Germantown, MD 20874 phone: 301-407-9583 email: m-karicheri2@xxxxxx -- 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