[lustre-devel] [PATCH] Mark a pointer as an userspace pointer using __user macro.
James Simmons
jsimmons at infradead.org
Mon Apr 11 17:05:32 PDT 2016
> This change fixes below sparse error: "error: incompatible types
> in comparison expression (different address spaces)"
>
> Signed-off-by: Antoine BLIN <antoine.blin at lip6.fr>
Sigh, I thought the worst was behind us for the LNet/libcfs cleanup.
I agree with Greg this is just papering over the problem. Properly
fixing this will require the tools to be fixed as well. I wonder
if ioctls are best way to handle this, perhaps debugfs?
> ---
> drivers/staging/lustre/lnet/selftest/conrpc.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/staging/lustre/lnet/selftest/conrpc.c b/drivers/staging/lustre/lnet/selftest/conrpc.c
> index 2be9451..1fdabb3 100644
> --- a/drivers/staging/lustre/lnet/selftest/conrpc.c
> +++ b/drivers/staging/lustre/lnet/selftest/conrpc.c
> @@ -490,10 +490,10 @@ lstcon_rpc_trans_interpreter(lstcon_rpc_trans_t *trans,
> sizeof(struct list_head)))
> return -EFAULT;
>
> - if (tmp.next == head_up)
> - return 0;
> + next = (struct list_head __user *)tmp.next;
>
> - next = tmp.next;
> + if (next == head_up)
> + return 0;
>
> ent = list_entry(next, lstcon_rpc_ent_t, rpe_link);
>
> --
> 2.7.4
>
> _______________________________________________
> lustre-devel mailing list
> lustre-devel at lists.lustre.org
> http://lists.lustre.org/listinfo.cgi/lustre-devel-lustre.org
>
More information about the lustre-devel
mailing list