lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140901114935.GA8617@sudip-PC>
Date:	Mon, 1 Sep 2014 17:19:35 +0530
From:	Sudip Mukherjee <sudipm.mukherjee@...il.com>
To:	Dan Carpenter <dan.carpenter@...cle.com>
Cc:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org,
	alan@...ux.intel.com
Subject: Re: [PATCH] staging: goldfish_audio.c: sparse warning of incorrect
 type

On Mon, Sep 01, 2014 at 12:35:14PM +0300, Dan Carpenter wrote:
> On Sun, Aug 31, 2014 at 09:46:22PM +0530, Sudip Mukherjee wrote:
> > @@ -133,9 +134,15 @@ static ssize_t goldfish_audio_read(struct file *fp, char __user *buf,
> >  						AUDIO_READ_BUFFER_AVAILABLE);
> >  
> >  		/* copy data to user space */
> > -		if (copy_to_user(buf, data->read_buffer, length))
> > +		buffer = kzalloc(length, GFP_KERNEL);
> > +		if (buffer == NULL)
> > +			return -ENOMEM;
> > +		memcpy_fromio(buffer, data->read_buffer, length);
> > +		if (copy_to_user((void __user *)buf, buffer, length)) {
>                                  ^^^^^^^^^^^^^^^
> This cast shouldn't be needed.
> 
> regards,
> dan carpenter
> 

yes , its not needed . I just checked it again after removing the cast. Actually I gave it as sparse was showing warning for argument 1 also. I should have rechecked it after fixing the warning for argument2. Sorry for it.
Anyways, if Alan confirms that this patch is actually needed then I will resubmit a modified patch.

thanks
Sudip
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ