From: Wolfram Sang <wsa@kernel.org>
To: Andreas Hecht <andreas.e.hecht@gmail.com>
Cc: linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] i2c: i2c-dev: Add __user annotation
Date: Thu, 24 Jun 2021 21:48:31 +0200 [thread overview]
Message-ID: <YNThj3wA0P7/twn3@kunai> (raw)
In-Reply-To: <20210624152535.4949-1-andreas.e.hecht@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 693 bytes --]
On Thu, Jun 24, 2021 at 05:25:35PM +0200, Andreas Hecht wrote:
> Fix Sparse warnings:
> drivers/i2c/i2c-dev.c:546:19: warning: incorrect type in assignment (different address spaces)
> drivers/i2c/i2c-dev.c:549:53: warning: incorrect type in argument 2 (different address spaces)
>
> compat_ptr() returns a pointer tagged __user which gets assigned to a
> pointer missing the __user annotation. The same pointer is passed to
> copy_from_user() as an argument where it is expected to have the __user
> annotation. Fix both by adding the __user annotation to the pointer.
>
> Signed-off-by: Andreas Hecht <andreas.e.hecht@gmail.com>
Nice catch. Applied to for-current, thanks!
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
prev parent reply other threads:[~2021-06-24 19:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-24 15:25 [PATCH] i2c: i2c-dev: Add __user annotation Andreas Hecht
2021-06-24 19:48 ` Wolfram Sang [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=YNThj3wA0P7/twn3@kunai \
--to=wsa@kernel.org \
--cc=andreas.e.hecht@gmail.com \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.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