[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-id: <50802580.7090809@samsung.com>
Date: Thu, 18 Oct 2012 17:51:28 +0200
From: Sylwester Nawrocki <s.nawrocki@...sung.com>
To: Ezequiel Garcia <elezegarcia@...il.com>
Cc: Peter Senna Tschudin <peter.senna@...il.com>, pawel@...iak.com,
m.szyprowski@...sung.com, kyungmin.park@...sung.com,
mchehab@...radead.org, linux-media@...r.kernel.org,
linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: Re: [PATCH V2] drivers/media/v4l2-core/videobuf2-core.c: fix error
return code
On 10/18/2012 05:28 PM, Ezequiel Garcia wrote:
> On Thu, Oct 18, 2012 at 11:47 AM, Peter Senna Tschudin
> <peter.senna@...il.com> wrote:
>> This patch fixes a NULL pointer dereference bug at __vb2_init_fileio().
>> The NULL pointer deference happens at videobuf2-core.c:
>>
>> static size_t __vb2_perform_fileio(struct vb2_queue *q, char __user *data, size_t count,
>> loff_t *ppos, int nonblock, int read)
>> {
>> ...
>> if (!q->fileio) {
>> ret = __vb2_init_fileio(q, read);
>> dprintk(3, "file io: vb2_init_fileio result: %d\n", ret);
>> if (ret)
>> return ret;
>> }
>> fileio = q->fileio; // NULL pointer deference here
>> ...
>> }
>>
>> It was tested with vivi driver and qv4l2 for selecting read() as capture method.
>> The OOPS happened when I've artificially forced the error by commenting the line:
>> if (fileio->bufs[i].vaddr == NULL)
>>
>
> ... but if you manually changed the original source, how
> can this be a real BUG?
>
> Or am I missing something here ?
He just commented out this line to trigger the bug, i.e. to simulate
a situation where fileio->bufs[i].vaddr is NULL. Which is now not
handled properly.
--
Thanks,
Sylwester
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists