From: Dan Carpenter <dan.carpenter@oracle.com>
To: o-takashi@sakamocchi.jp
Cc: alsa-devel@alsa-project.org
Subject: [bug report] ALSA: seq: obsolete change of address limit
Date: Tue, 11 Oct 2016 14:06:14 +0300 [thread overview]
Message-ID: <20161011110614.GA1290@mwanda> (raw)
Hello Takashi Sakamoto,
The patch e12ec251e4db: "ALSA: seq: obsolete change of address limit"
from Aug 13, 2016, leads to the following static checker warning:
sound/core/seq/seq_compat.c:61 snd_seq_call_port_info_ioctl()
warn: did you mean to pass the address of 'data'
sound/core/seq/seq_compat.c
45 static int snd_seq_call_port_info_ioctl(struct snd_seq_client *client, unsigned int cmd,
46 struct snd_seq_port_info32 __user *data32)
47 {
48 int err = -EFAULT;
49 struct snd_seq_port_info *data;
50
51 data = kmalloc(sizeof(*data), GFP_KERNEL);
52 if (!data)
53 return -ENOMEM;
54
55 if (copy_from_user(data, data32, sizeof(*data32)) ||
56 get_user(data->flags, &data32->flags) ||
57 get_user(data->time_queue, &data32->time_queue))
58 goto error;
59 data->kernel = NULL;
60
61 err = snd_seq_kernel_client_ctl(client->number, cmd, &data);
This should almost certainly be "cmd, data);" without the &. Have you
tested this? It eventually gets passed to functions like
snd_seq_ioctl_create_port().
62 if (err < 0)
63 goto error;
64
65 if (copy_to_user(data32, data, sizeof(*data32)) ||
66 put_user(data->flags, &data32->flags) ||
67 put_user(data->time_queue, &data32->time_queue))
68 err = -EFAULT;
69
70 error:
71 kfree(data);
72 return err;
73 }
regards,
dan carpenter
next reply other threads:[~2016-10-11 11:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-11 11:06 Dan Carpenter [this message]
2016-10-12 0:09 ` [bug report] ALSA: seq: obsolete change of address limit Takashi Sakamoto
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=20161011110614.GA1290@mwanda \
--to=dan.carpenter@oracle.com \
--cc=alsa-devel@alsa-project.org \
--cc=o-takashi@sakamocchi.jp \
/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.