[PATCH linux dev-4.10 v3 09/31] drivers: fsi: sbefifo: Remove warning and user data access check
Andrew Jeffery
andrew at aj.id.au
Fri Oct 6 09:01:25 AEDT 2017
On Thu, 2017-10-05 at 14:24 -0500, Eddie James wrote:
> From: "Edward A. James" <eajames at us.ibm.com>
>
> We check for user buffer access when we copy the data. No reason to
> throw a kernel warning if there is an offset provided; just ignore it.
>
> Signed-off-by: Edward A. James <eajames at us.ibm.com>
Reviewed-by: Andrew Jeffery <andrew at aj.id.au>
> ---
> drivers/fsi/fsi-sbefifo.c | 10 ----------
> 1 file changed, 10 deletions(-)
>
> diff --git a/drivers/fsi/fsi-sbefifo.c b/drivers/fsi/fsi-sbefifo.c
> index 5efba30..60b133d 100644
> --- a/drivers/fsi/fsi-sbefifo.c
> +++ b/drivers/fsi/fsi-sbefifo.c
> @@ -621,11 +621,6 @@ static ssize_t sbefifo_read(struct file *file, char __user *buf, size_t len,
> {
> struct sbefifo_client *client = file->private_data;
>
> - WARN_ON(*offset);
> -
> - if (!access_ok(VERIFY_WRITE, buf, len))
> - return -EFAULT;
> -
> return sbefifo_read_common(client, buf, NULL, len);
> }
>
> @@ -748,11 +743,6 @@ static ssize_t sbefifo_write(struct file *file, const char __user *buf,
> {
> struct sbefifo_client *client = file->private_data;
>
> - WARN_ON(*offset);
> -
> - if (!access_ok(VERIFY_READ, buf, len))
> - return -EFAULT;
> -
> return sbefifo_write_common(client, buf, NULL, len);
> }
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: This is a digitally signed message part
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20171006/b42fbc7c/attachment.sig>
More information about the openbmc
mailing list