lkml.org 
[lkml]   [2015]   [Feb]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Question regarding sparse warning in staging/lustre
On Sun, Feb 08, 2015 at 10:27:23PM +0100, Adrian Remonda wrote:
> Hello,
>
> I'm cleaning the drivers/staging/lustre driver.
> I have got the next warning from sparse:
>
> drivers/staging/lustre/lnet/selftest//conctl.c:918:30: warning: incorrect type in argument 1 (different address spaces)
> drivers/staging/lustre/lnet/selftest//conctl.c:918:30: expected void [noderef] <asn:1>*to
> drivers/staging/lustre/lnet/selftest//conctl.c:918:30: got char *ioc_pbuf2
>
> If I add the __user macro as next:
>
> --- a/drivers/staging/lustre/lnet/selftest/conctl.c
> +++ b/drivers/staging/lustre/lnet/selftest/conctl.c
> @@ -46,7 +46,7 @@
> #include "console.h"
>
> static int
> -lst_session_new_ioctl(lstio_session_new_args_t *args)
> +lst_session_new_ioctl(lstio_session_new_args_t __user *args)
> {
> char *name;
> int rc;
>
> The warning turns to:
>
> drivers/staging/lustre/lnet/selftest//conctl.c:825:13: warning: dereference of noderef expression
>
> Now the question:
> Is this right or it is just a false warning from sparse?
> Should the __user macro should be also inside the structure fields?

The user/kernel fields in lustre are a total mess, I wouldn't work on
them if you don't have to as they need an overhaul in some areas.

So I'd recommend just staying away :)

good luck!

greg k-h


\
 
 \ /
  Last update: 2015-02-09 01:01    [W:0.048 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site