Re: [staging:staging-testing 144/177] drivers/staging/lustre/lnet/libcfs/linux/linux-module.c:66:32-38: ERROR: application of sizeof to pointer

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

 



On Mar 25, 2016, at 12:49 AM, kbuild test robot wrote:

> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git staging-testing
> head:   6d197476df27efdb304959845e43f69d1b971a35
> commit: b8ff756bc3513e489f24c14cfb6a8a39d3f3b150 [144/177] staging: lustre: libcfs: merge code from libcfs_ioctl into libcfs_ioctl_getdata
> 
> 
> coccinelle warnings: (new ones prefixed by >>)
> 
>>> drivers/staging/lustre/lnet/libcfs/linux/linux-module.c:66:32-38: ERROR: application of sizeof to pointer
> 
> vim +66 drivers/staging/lustre/lnet/libcfs/linux/linux-module.c
> 
>    50		if (data->ioc_inllen1)
>    51			data->ioc_inlbuf1 = &data->ioc_bulk[0];
>    52	
>    53		if (data->ioc_inllen2)
>    54			data->ioc_inlbuf2 = &data->ioc_bulk[0] +
>    55				cfs_size_round(data->ioc_inllen1);
>    56	
>    57		return 0;
>    58	}
>    59	
>    60	int libcfs_ioctl_getdata(struct libcfs_ioctl_hdr **hdr_pp,
>    61				 const struct libcfs_ioctl_hdr __user *uhdr)
>    62	{
>    63		struct libcfs_ioctl_hdr hdr;
>    64		int err = 0;
>    65	
>> 66		if (copy_from_user(&hdr, uhdr, sizeof(uhdr)))

Yes, this is a real bug and should have been sizeof of hdr, not uhdr.
(also it's a new addition as it was not part of the original patch
in http://review.whamcloud.com/11313)

Thanks!

_______________________________________________
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