Re: [PATCH 1/3] videobuf2-core: Prevent size alignment wrapping buffer size to 0

2018-12-13 Thread Sakari Ailus
On Thu, Dec 13, 2018 at 02:49:44PM +0200, Laurent Pinchart wrote: > Hi Sakari, > > Thank you for the patch. > > On Thursday, 13 December 2018 12:40:04 EET Sakari Ailus wrote: > > PAGE_ALIGN() may wrap the buffer size around to 0. Prevent this by > > checking that the aligned value is not smaller

Re: [PATCH 1/3] videobuf2-core: Prevent size alignment wrapping buffer size to 0

2018-12-13 Thread Laurent Pinchart
Hi Sakari, Thank you for the patch. On Thursday, 13 December 2018 12:40:04 EET Sakari Ailus wrote: > PAGE_ALIGN() may wrap the buffer size around to 0. Prevent this by > checking that the aligned value is not smaller than the unaligned one. > > Note on backporting to stable: the file used to be

Re: [PATCH 1/3] videobuf2-core: Prevent size alignment wrapping buffer size to 0

2018-12-13 Thread Hans Verkuil
On 12/13/18 11:40 AM, Sakari Ailus wrote: > PAGE_ALIGN() may wrap the buffer size around to 0. Prevent this by > checking that the aligned value is not smaller than the unaligned one. > > Note on backporting to stable: the file used to be under > drivers/media/v4l2-core, it was moved to the curren

[PATCH 1/3] videobuf2-core: Prevent size alignment wrapping buffer size to 0

2018-12-13 Thread Sakari Ailus
PAGE_ALIGN() may wrap the buffer size around to 0. Prevent this by checking that the aligned value is not smaller than the unaligned one. Note on backporting to stable: the file used to be under drivers/media/v4l2-core, it was moved to the current location after 4.14. Signed-off-by: Sakari Ailus