lkml.org 
[lkml]   [2018]   [Feb]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Date
    Subject[PATCH 3.2 096/140] ALSA: pcm: Remove yet superfluous WARN_ON()
    3.2.100-rc1 review patch.  If anyone has any objections, please let me know.

    ------------------

    From: Takashi Iwai <tiwai@suse.de>

    commit 23b19b7b50fe1867da8d431eea9cd3e4b6328c2c upstream.

    muldiv32() contains a snd_BUG_ON() (which is morphed as WARN_ON() with
    debug option) for checking the case of 0 / 0. This would be helpful
    if this happens only as a logical error; however, since the hw refine
    is performed with any data set provided by user, the inconsistent
    values that can trigger such a condition might be passed easily.
    Actually, syzbot caught this by passing some zero'ed old hw_params
    ioctl.

    So, having snd_BUG_ON() there is simply superfluous and rather
    harmful to give unnecessary confusions. Let's get rid of it.

    Reported-by: syzbot+7e6ee55011deeebce15d@syzkaller.appspotmail.com
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
    ---
    sound/core/pcm_lib.c | 1 -
    1 file changed, 1 deletion(-)

    --- a/sound/core/pcm_lib.c
    +++ b/sound/core/pcm_lib.c
    @@ -590,7 +590,6 @@ static inline unsigned int muldiv32(unsi
    {
    u_int64_t n = (u_int64_t) a * b;
    if (c == 0) {
    - snd_BUG_ON(!n);
    *r = 0;
    return UINT_MAX;
    }
    \
     
     \ /
      Last update: 2018-02-28 18:32    [W:4.108 / U:0.340 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site