Re: [PATCH v1 2/2] i2c: dev: Force case user pointers in compat_i2cdev_ioctl()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxx>

Applied to for-current, thanks!

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux