public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Sylwester Nawrocki <s.nawrocki@samsung.com>
To: Peter Senna Tschudin <peter.senna@gmail.com>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>,
	kernel-janitors@vger.kernel.org, Julia.Lawall@lip6.fr,
	linux-media@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 4/14] drivers/media/v4l2-core/videobuf2-core.c: fix error return code
Date: Wed, 10 Oct 2012 19:07:27 +0200	[thread overview]
Message-ID: <5075AB4F.3030709@samsung.com> (raw)
In-Reply-To: <CA+MoWDp6nMccVQxm93ht-4vxYN4HTACW+H-Xa9onaykwQFwyWw@mail.gmail.com>

Hi Peter,

On 10/10/2012 06:47 PM, Peter Senna Tschudin wrote:
>>> diff --git a/drivers/media/v4l2-core/videobuf2-core.c b/drivers/media/v4l2-core/videobuf2-core.c
>>> index 4da3df6..f6bc240 100644
>>> --- a/drivers/media/v4l2-core/videobuf2-core.c
>>> +++ b/drivers/media/v4l2-core/videobuf2-core.c
>>> @@ -1876,8 +1876,10 @@ static int __vb2_init_fileio(struct vb2_queue *q, int read)
>>>        */
>>>       for (i = 0; i < q->num_buffers; i++) {
>>>               fileio->bufs[i].vaddr = vb2_plane_vaddr(q->bufs[i], 0);
>>> -             if (fileio->bufs[i].vaddr == NULL)
>>> +             if (fileio->bufs[i].vaddr == NULL) {
>>> +                     ret = -EFAULT;
>>>                       goto err_reqbufs;
>>> +             }
>>
>> Had you test this patch? I suspect it breaks the driver, as there are failures under
>> streaming handling that are acceptable, as it may indicate that userspace was not
>> able to handle all queued frames in time. On such cases, what the Kernel does is to
>> just discard the frame. Userspace is able to detect it, by looking inside the timestamp
>> added on each frame.
> 
> No, I have not tested it. This was the only place the function was
> returning non negative value for error path, so looked as a bug to me.
> May I add a comment about returning non-negative value is intended
> there?

There are several drivers depending on core modules like videobuf2. By making
random changes for something that _looks like_ a bug to you and not verifying
it by testing with at least one driver you are potentially causing trouble to
developers that are already busy fixing real bugs or working on new features.

I appreciate your help but I also don't want to see _any_ untested, not trivial
patches for core modules like videobuf2 being applied.

--
Thanks,
Sylwester


  reply	other threads:[~2012-10-10 17:07 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-06 15:23 [PATCH 4/14] drivers/media/v4l2-core/videobuf2-core.c: fix error return code Peter Senna Tschudin
2012-10-06 11:17 ` Mauro Carvalho Chehab
2012-10-10 16:47   ` Peter Senna Tschudin
2012-10-10 17:07     ` Sylwester Nawrocki [this message]
2012-10-18 14:47       ` [PATCH V2] " Peter Senna Tschudin
2012-10-18 15:28         ` Ezequiel Garcia
2012-10-18 15:39           ` Peter Senna Tschudin
2012-10-18 15:51           ` Sylwester Nawrocki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5075AB4F.3030709@samsung.com \
    --to=s.nawrocki@samsung.com \
    --cc=Julia.Lawall@lip6.fr \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@infradead.org \
    --cc=peter.senna@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox