From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: linux-kernel@vger.kernel.org, Amit Shah <amit.shah@redhat.com>,
Arnd Bergmann <arnd@arndb.de>,
virtualization@lists.linux-foundation.org
Subject: Re: [PATCH] virtio_console: fix sparse warnings
Date: Tue, 3 Feb 2015 15:48:25 -0800 [thread overview]
Message-ID: <20150203234825.GA24626@kroah.com> (raw)
In-Reply-To: <1417433749-17408-1-git-send-email-mst@redhat.com>
On Mon, Dec 01, 2014 at 01:35:57PM +0200, Michael S. Tsirkin wrote:
> CHECK drivers/char/virtio_console.c
> drivers/char/virtio_console.c:687:36: warning: incorrect type in
> argument 1 (different address spaces)
> drivers/char/virtio_console.c:687:36: expected void [noderef]
> <asn:1>*to
> drivers/char/virtio_console.c:687:36: got char *out_buf
> drivers/char/virtio_console.c:790:35: warning: incorrect type in
> argument 2 (different address spaces)
> drivers/char/virtio_console.c:790:35: expected char *out_buf
> drivers/char/virtio_console.c:790:35: got char [noderef]
> <asn:1>*ubuf
>
> fill_readbuf is reused with both kernel and userspace pointers,
> depending on value of to_user flag.
That's horrid, don't do that. Have two different functions for this
type of thing, otherwise you defeat the whole purpose of trying to track
__user pointers.
thanks,
greg k-h
prev parent reply other threads:[~2015-02-03 23:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-01 11:35 [PATCH] virtio_console: fix sparse warnings Michael S. Tsirkin
2015-02-03 23:48 ` Greg Kroah-Hartman [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=20150203234825.GA24626@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=amit.shah@redhat.com \
--cc=arnd@arndb.de \
--cc=linux-kernel@vger.kernel.org \
--cc=mst@redhat.com \
--cc=virtualization@lists.linux-foundation.org \
/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