From: Wolfram Sang <wsa@kernel.org>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Jakub Kicinski <kuba@kernel.org>,
linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1 2/2] i2c: dev: Force case user pointers in compat_i2cdev_ioctl()
Date: Fri, 15 Apr 2022 23:33:40 +0200 [thread overview]
Message-ID: <YlnktBB0uT3kmzo0@shikoro> (raw)
In-Reply-To: <20220411180752.36920-2-andriy.shevchenko@linux.intel.com>
[-- Attachment #1: Type: text/plain, Size: 718 bytes --]
On Mon, Apr 11, 2022 at 09:07:52PM +0300, Andy Shevchenko wrote:
> Sparse has warned us about wrong address space for user pointers:
>
> i2c-dev.c:561:50: warning: incorrect type in initializer (different address spaces)
> i2c-dev.c:561:50: expected unsigned char [usertype] *buf
> i2c-dev.c:561:50: got void [noderef] __user *
>
> Force cast the pointer to (__u8 *) that is used by I²C core code.
>
> Note, this is an additional fix to the previously addressed similar issue
> in the I2C_RDWR case in the same function.
>
> Fixes: 3265a7e6b41b ("i2c: dev: Add __user annotation")
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Applied to for-current, thanks!
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2022-04-15 21:33 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-11 18:07 [PATCH v1 1/2] i2c: dev: check return value when calling dev_set_name() Andy Shevchenko
2022-04-11 18:07 ` [PATCH v1 2/2] i2c: dev: Force case user pointers in compat_i2cdev_ioctl() Andy Shevchenko
2022-04-15 21:33 ` Wolfram Sang [this message]
2022-04-15 21:23 ` [PATCH v1 1/2] i2c: dev: check return value when calling dev_set_name() Wolfram Sang
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=YlnktBB0uT3kmzo0@shikoro \
--to=wsa@kernel.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=kuba@kernel.org \
--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