From: Takashi Iwai <tiwai@suse.de>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Andrej Krutak <dev@andree.sk>, Jaroslav Kysela <perex@perex.cz>,
alsa-devel@alsa-project.org,
kbuild test robot <fengguang.wu@intel.com>,
Takashi Sakamoto <o-takashi@sakamocchi.jp>,
kernel-janitors@vger.kernel.org
Subject: Re: [patch] ALSA: line6: fix a crash in line6_hwdep_write()
Date: Wed, 12 Oct 2016 18:11:16 +0000 [thread overview]
Message-ID: <s5h37k1jv3v.wl-tiwai@suse.de> (raw)
In-Reply-To: <20161012062140.GT12841@mwanda>
On Wed, 12 Oct 2016 08:21:40 +0200,
Dan Carpenter wrote:
>
> The error checking here is messed up so we could end up dereferencing
> -EFAULT.
>
> Fixes: a16039cbf1a1 ('ALSA: line6: Add hwdep interface to access the POD control messages')
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Applied, thanks.
Takashi
>
> diff --git a/sound/usb/line6/driver.c b/sound/usb/line6/driver.c
> index 14e587e..90009c0 100644
> --- a/sound/usb/line6/driver.c
> +++ b/sound/usb/line6/driver.c
> @@ -604,8 +604,8 @@ line6_hwdep_write(struct snd_hwdep *hwdep, const char __user *data, long count,
> }
>
> data_copy = memdup_user(data, count);
> - if (IS_ERR(ERR_PTR))
> - return -ENOMEM;
> + if (IS_ERR(data_copy))
> + return PTR_ERR(data_copy);
>
> rv = line6_send_raw_message(line6, data_copy, count);
>
>
prev parent reply other threads:[~2016-10-12 18:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-12 6:21 [patch] ALSA: line6: fix a crash in line6_hwdep_write() Dan Carpenter
2016-10-12 6:41 ` Takashi Sakamoto
2016-10-12 18:11 ` Takashi Iwai [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=s5h37k1jv3v.wl-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=alsa-devel@alsa-project.org \
--cc=dan.carpenter@oracle.com \
--cc=dev@andree.sk \
--cc=fengguang.wu@intel.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=o-takashi@sakamocchi.jp \
--cc=perex@perex.cz \
/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