Re: [PATCH 1/2] [media] vb2: Fix an off by one error in 'vb2_plane_vaddr'

2017-04-25 Thread Dan Carpenter
Gar... No. The 3.6+ from a9ae4692eda4 ("[media] vb2: fix plane index sanity check in vb2_plane_cookie()") feels totally arbitrary to me. No need to be consistent. Just do: Cc: sta...@vger.kernel.org Fixes: e23ccc0ad925 ("[media] v4l: add videobuf2 Video for Linux 2 driver framework") Fixes ta

Re: [PATCH 1/2] [media] vb2: Fix an off by one error in 'vb2_plane_vaddr'

2017-04-24 Thread Christophe JAILLET
Le 24/04/2017 à 22:29, Sakari Ailus a écrit : Hi Christophe, On Mon, Apr 24, 2017 at 10:00:24PM +0200, Christophe JAILLET wrote: Le 24/04/2017 à 16:16, Sakari Ailus a écrit : On Sun, Apr 23, 2017 at 11:32:57PM +0200, Christophe JAILLET wrote: We should ensure that 'plane_no' is '< vb->num_pla

Re: [PATCH 1/2] [media] vb2: Fix an off by one error in 'vb2_plane_vaddr'

2017-04-24 Thread Sakari Ailus
Hi Christophe, On Mon, Apr 24, 2017 at 10:00:24PM +0200, Christophe JAILLET wrote: > Le 24/04/2017 à 16:16, Sakari Ailus a écrit : > >On Sun, Apr 23, 2017 at 11:32:57PM +0200, Christophe JAILLET wrote: > >>We should ensure that 'plane_no' is '< vb->num_planes' as done in > >>'vb2_plane_cookie' jus

Re: [PATCH 1/2] [media] vb2: Fix an off by one error in 'vb2_plane_vaddr'

2017-04-24 Thread Christophe JAILLET
Le 24/04/2017 à 16:16, Sakari Ailus a écrit : On Sun, Apr 23, 2017 at 11:32:57PM +0200, Christophe JAILLET wrote: We should ensure that 'plane_no' is '< vb->num_planes' as done in 'vb2_plane_cookie' just a few lines below. Signed-off-by: Christophe JAILLET --- drivers/media/v4l2-core/videobu

Re: [PATCH 1/2] [media] vb2: Fix an off by one error in 'vb2_plane_vaddr'

2017-04-24 Thread Sakari Ailus
On Sun, Apr 23, 2017 at 11:32:57PM +0200, Christophe JAILLET wrote: > We should ensure that 'plane_no' is '< vb->num_planes' as done in > 'vb2_plane_cookie' just a few lines below. > > Signed-off-by: Christophe JAILLET > --- > drivers/media/v4l2-core/videobuf2-core.c | 2 +- > 1 file changed, 1

[PATCH 1/2] [media] vb2: Fix an off by one error in 'vb2_plane_vaddr'

2017-04-23 Thread Christophe JAILLET
We should ensure that 'plane_no' is '< vb->num_planes' as done in 'vb2_plane_cookie' just a few lines below. Signed-off-by: Christophe JAILLET --- drivers/media/v4l2-core/videobuf2-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/v4l2-core/videobuf2-core.c