Re: [PATCH 18/20] staging/lustre/libcfs: get rid of debugfs/lnet/debug_mb

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jul 06, 2015 at 12:48:56PM -0400, green@xxxxxxxxxxxxxx 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

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux