RE: [patch 2/3] Staging: sst: more dereferencing user pointers

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

 



>  	case _IOC_NR(SNDRV_SST_STREAM_SET_PARAMS): {
> -		struct snd_sst_params *str_param = (struct snd_sst_params *)arg;
> +		struct snd_sst_params str_param;
Now this is a struct...
> 
[snip]
> +
>  		if (!str_id) {
So this becomes bogus check, can be removed :-)
> 
> +				retval = copy_to_user(dest, &retval, sizeof(__u32));
>  				if (retval)
>  					retval = -EFAULT;
Trivial but this can be changed to 
				if (copy_to_user())
					retval = -EFAULT;	

Overall its good, tested it as well,
just bogus if() needs to be removed

~Vinod















_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/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