All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Sakamoto <o-takashi@sakamocchi.jp>
To: Takashi Iwai <tiwai@suse.de>
Cc: alsa-devel@alsa-project.org, clemens@ladisch.de
Subject: Re: [PATCH 2/2] ALSA: ctl: refactoring for read operation
Date: Fri, 10 Apr 2015 19:52:47 +0900	[thread overview]
Message-ID: <5527AB7F.4010702@sakamocchi.jp> (raw)
In-Reply-To: <s5h7ftkl0v4.wl-tiwai@suse.de>

On Apr 10 2015 19:43, Takashi Iwai wrote:
>> I'm unaware of it... These code should be:
>>
>> if (copy_to_user(buffer, &ev, sizeof(struct snd_ctl_event))) {
>>     if (result == 0)
>>         result = -EFAULT;
>>     break;
> 
> Well, it's not much better than the original code, IMO.

OK. I dropped this patch.

>> And I realize sound/firewire/fireworks/fireworks_hwdep.c has the same
>> bug. I'll post another patch for this bug.
> 
> This is an implementation detail and I believe it rather depends on
> each driver.  (But I should reread POSIX definition again before
> concluding it.)
> 
> That said, it isn't wrong to return -EFAULT immediately, per se.
> The problem here is that you change the existing behavior.  Especially
> a core code like this should be treated carefully even for such a
> small behavior change.

Thanks

Takashi Sakamoto

      reply	other threads:[~2015-04-10 10:52 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-08 16:55 [PATCH 0/2 RFC] control core refactoring Takashi Sakamoto
2015-04-08 16:55 ` [PATCH 1/2] ALSA: ctl: evaluate macro instead of numerical value Takashi Sakamoto
2015-04-08 16:55 ` [PATCH 2/2] ALSA: ctl: refactoring for read operation Takashi Sakamoto
2015-04-09  5:33   ` Takashi Iwai
2015-04-09  7:35     ` Takashi Sakamoto
2015-04-09  8:17       ` Takashi Iwai
2015-04-09 23:42 ` [PATCH 0/2] control core refactoring Takashi Sakamoto
2015-04-09 23:43   ` [PATCH 1/2] ALSA: ctl: evaluate macro instead of numerical value Takashi Sakamoto
2015-04-10  7:49     ` Takashi Iwai
2015-04-12  7:20       ` Takashi Iwai
2015-04-09 23:43   ` [PATCH 2/2] ALSA: ctl: refactoring for read operation Takashi Sakamoto
2015-04-10  7:48     ` Takashi Iwai
2015-04-10 10:32       ` Takashi Sakamoto
2015-04-10 10:43         ` Takashi Iwai
2015-04-10 10:52           ` Takashi Sakamoto [this message]

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=5527AB7F.4010702@sakamocchi.jp \
    --to=o-takashi@sakamocchi.jp \
    --cc=alsa-devel@alsa-project.org \
    --cc=clemens@ladisch.de \
    --cc=tiwai@suse.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.