Re: [PATCH] siw: fix 64/32bit pointer inconsistency.

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

 



On Tue, Aug 20, 2019 at 03:14:42PM +0200, Bernard Metzler wrote:
>  		} else if (c_tx->in_syscall) {
> -			if (copy_from_user((void *)paddr,
> -					   (const void __user *)sge->laddr,
> -					   bytes))
> +			if (copy_from_user(paddr,
> +				(const void __user *)(uintptr_t)sge->laddr,
> +				bytes))

This pattern should be written u64_to_user_ptr(), in fact every
place that treats a user sourced u64 should use it.

Jason



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux