[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150708084202.GN4341@mwanda>
Date: Wed, 8 Jul 2015 11:45:59 +0300
From: Dan Carpenter <dan.carpenter@...cle.com>
To: green@...uxhacker.ru
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
devel@...verdev.osuosl.org,
Andreas Dilger <andreas.dilger@...el.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 18/20] staging/lustre/libcfs: get rid of
debugfs/lnet/debug_mb
On Mon, Jul 06, 2015 at 12:48:56PM -0400, green@...uxhacker.ru wrote:
> +static int libcfs_param_debug_mb_set(const char *val,
> + const struct kernel_param *kp)
> +{
> + int rc;
> + unsigned num;
> +
> + rc = kstrtouint(val, 0, &num);
> + if (rc == -EINVAL)
> + return -EINVAL;
Presumably, this is root only so using num uninitialized is not an
information leak.
> +
> + if (!*((unsigned int *)kp->arg)) {
> + *((unsigned int *)kp->arg) = num;
> + return 0;
> + }
> +
> + rc = cfs_trace_set_debug_mb(num);
> +
> + if (!rc)
> + *((unsigned int *)kp->arg) = cfs_trace_get_debug_mb();
> +
> + return rc;
> +}
regards,
dan carpenter
--
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