Re: arch/arm/kernel/sys_oabi-compat.c:251:51: sparse: sparse: incorrect type in argument 3 (different address spaces)

From: Arnd Bergmann
Date: Tue Nov 23 2021 - 11:08:22 EST


On Tue, Nov 23, 2021 at 4:12 PM kernel test robot <lkp@xxxxxxxxx> wrote:
>
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@xxxxxxxxx>
>
>
> sparse warnings: (new ones prefixed by >>)
> >> arch/arm/kernel/sys_oabi-compat.c:251:51: sparse: sparse: incorrect type in argument 3 (different address spaces) @@ expected struct flock64 [noderef] __user *user @@ got struct flock64 * @@
> arch/arm/kernel/sys_oabi-compat.c:251:51: sparse: expected struct flock64 [noderef] __user *user
> arch/arm/kernel/sys_oabi-compat.c:251:51: sparse: got struct flock64 *
> arch/arm/kernel/sys_oabi-compat.c:265:55: sparse: sparse: incorrect type in argument 4 (different address spaces) @@ expected struct flock64 [noderef] __user *user @@ got struct flock64 * @@
> arch/arm/kernel/sys_oabi-compat.c:265:55: sparse: expected struct flock64 [noderef] __user *user
> arch/arm/kernel/sys_oabi-compat.c:265:55: sparse: got struct flock64 *
> arch/arm/kernel/sys_oabi-compat.c:292:23: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __poll_t [usertype] events @@ got unsigned int [addressable] [usertype] events @@
> arch/arm/kernel/sys_oabi-compat.c:292:23: sparse: expected restricted __poll_t [usertype] events
> arch/arm/kernel/sys_oabi-compat.c:292:23: sparse: got unsigned int [addressable] [usertype] events
> arch/arm/kernel/sys_oabi-compat.c:312:21: sparse: sparse: incorrect type in initializer (different base types) @@ expected unsigned int __pu_val @@ got restricted __poll_t [usertype] revents @@
> arch/arm/kernel/sys_oabi-compat.c:312:21: sparse: expected unsigned int __pu_val
> arch/arm/kernel/sys_oabi-compat.c:312:21: sparse: got restricted __poll_t [usertype] revents

Thanks for the report. I see this was a pre-existing problem that now
shows up on
arm as well, sent a fix for it at

https://lore.kernel.org/linux-fsdevel/20211123160531.93545-1-arnd@xxxxxxxxxx/T/

Arnd