Re: [PATCH v2 4/6] sysctl: Fixes scsi_logging_level bounds

"Martin K. Petersen" <[email protected]>
Newsgroups gmane.linux.drivers.rdma,gmane.linux.kernel,gmane.linux.scsi,gmane.comp.file-systems.coda.general,gmane.linux.nfs
Organization Oracle Corporation
Message-ID <[email protected]>
Hi Nicolas!

> --- a/drivers/scsi/scsi_sysctl.c
> +++ b/drivers/scsi/scsi_sysctl.c
> @@ -17,7 +17,9 @@ static const struct ctl_table scsi_table[] = {
>  	  .data		= &scsi_logging_level,
>  	  .maxlen	= sizeof(scsi_logging_level),
>  	  .mode		= 0644,
> -	  .proc_handler	= proc_dointvec },
> +	  .proc_handler	= proc_dointvec_minmax,
> +	  .extra1	= SYSCTL_ZERO,
> +	  .extra2	= SYSCTL_INT_MAX },

scsi_logging_level is a bitmask and should be unsigned.

-- 
Martin K. Petersen	Oracle Linux Engineering
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.