[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1417768091.2721.47.camel@perches.com>
Date: Fri, 05 Dec 2014 00:28:11 -0800
From: Joe Perches <joe@...ches.com>
To: Tristan Lelong <tristan@...ong.xyz>
Cc: oleg.drokin@...el.com, andreas.dilger@...el.com,
gregkh@...uxfoundation.org, askb23@...il.com,
john.hammond@...el.com, gdonald@...il.com, anhlq2110@...il.com,
fabio.falzoi84@...il.com, oort10@...il.com, agimenez@...valve.es,
rupran@...server.de, surya.seetharaman9@...il.com,
Julia.Lawall@...6.fr, a.terekhov@...il.com, liang.zhen@...el.com,
vthakkar1994@...il.com, amk@...y.com, srikrishanmalik@...il.com,
rd@...ekdostal.com, bergwolf@...il.com, dan.carpenter@...cle.com,
paul.gortmaker@...driver.com, tapaswenipathak@...il.com,
email@...istophjaeger.info, uja.ornl@...il.com,
brilliantov@...ox.ru, dmitry.eremin@...el.com,
HPDD-discuss@...ts.01.org, devel@...verdev.osuosl.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] staging: lustre: fix sparse warning on LPROC_SEQ_FOPS
macros
On Fri, 2014-12-05 at 00:03 -0800, Tristan Lelong wrote:
> This patch fix a sparse warning in lustre sources
>
> warning: incorrect type in argument 1 (different address spaces)
> expected void [noderef] <asn:1>*to
> got char *<noident>
[]
> diff --git a/drivers/staging/lustre/lustre/fld/lproc_fld.c b/drivers/staging/lustre/lustre/fld/lproc_fld.c
[]
> @@ -87,13 +87,21 @@ fld_proc_hash_seq_show(struct seq_file *m, void *unused)
> }
>
> static ssize_t
> -fld_proc_hash_seq_write(struct file *file, const char *buffer,
> - size_t count, loff_t *off)
> +fld_proc_hash_seq_write(struct file *file,
> + const char __user *buffer,
> + size_t count, loff_t *off)
> {
> struct lu_client_fld *fld;
> struct lu_fld_hash *hash = NULL;
> + char name[80];
> int i;
>
> + if (count > 80)
> + return -ENAMETOOLONG;
> +
> + if (copy_from_user(name, buffer, count) != 0)
> + return -EFAULT;
> +
> fld = ((struct seq_file *)file->private_data)->private;
> LASSERT(fld != NULL);
>
Why 80? Is there no #define for this length?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists