lkml.org 
[lkml]   [2023]   [Sep]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH v2 02/25] ALSA: pcm: Add copy ops with iov_iter
    On Sat, 02 Sep 2023 07:30:44 +0200,
    Al Viro wrote:
    >
    > On Tue, Aug 15, 2023 at 09:01:13PM +0200, Takashi Iwai wrote:
    >
    > > - if (copy_from_user(get_dma_ptr(substream->runtime, channel, hwoff),
    > > - (void __user *)buf, bytes))
    > > + if (!copy_from_iter(get_dma_ptr(substream->runtime, channel, hwoff),
    > > + bytes, iter))
    >
    > The former is "if not everything got copied", the latter - "if nothing got
    > copied"; the same goes for other places like that.

    Thanks, yes, this should be
    if (copy_from_iter(...) != bytes)

    Other places have been already corrected in v2 patchset, but this
    place was overseen. Will fix it.


    Takashi

    \
     
     \ /
      Last update: 2023-09-02 08:00    [W:8.253 / U:0.020 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site