From: Shuah Khan <shuah@kernel.org>
To: "Gustavo A. R. Silva" <garsilva@embeddedor.com>,
Valentina Manea <valentina.manea.m@gmail.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
Shuah Khan <shuahkh@osg.samsung.com>,
Shuah Khan <shuah@kernel.org>
Subject: USB: usbip: remove useless call in usbip_recv
Date: Tue, 2 Jan 2018 16:36:28 -0700 [thread overview]
Message-ID: <18a01b9f-fa64-c5af-424b-c6beff6d3808@kernel.org> (raw)
On 01/02/2018 07:02 AM, Gustavo A. R. Silva wrote:
> Calling msg_data_left(&msg) is only useful for its return value,
> which in this particular case is ignored.
>
> Fix this by removing such call.
>
> Addresses-Coverity-ID: 1427080
> Fixes: 90120d15f4c3 ("usbip: prevent leaking socket pointer address in messages")
> Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
> ---
> drivers/usb/usbip/usbip_common.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/usb/usbip/usbip_common.c b/drivers/usb/usbip/usbip_common.c
> index 7b219d9..b5af6fc 100644
> --- a/drivers/usb/usbip/usbip_common.c
> +++ b/drivers/usb/usbip/usbip_common.c
> @@ -325,7 +325,6 @@ int usbip_recv(struct socket *sock, void *buf, int size)
> usbip_dbg_xmit("enter\n");
>
> do {
> - msg_data_left(&msg);
> sock->sk->sk_allocation = GFP_NOIO;
>
> result = sock_recvmsg(sock, &msg, MSG_WAITALL);
>
Thanks for the patch. Looks good to me.
Acked-by: Shuah Khan <shuahkh@osg.samsung.com>
Greg, please pick this patch up.
thanks,
-- Shuah
---
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next reply other threads:[~2018-01-02 23:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-02 23:36 Shuah Khan [this message]
-- strict thread matches above, loose matches on Subject: below --
2018-01-02 14:02 USB: usbip: remove useless call in usbip_recv Gustavo A. R. Silva
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=18a01b9f-fa64-c5af-424b-c6beff6d3808@kernel.org \
--to=shuah@kernel.org \
--cc=garsilva@embeddedor.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=shuahkh@osg.samsung.com \
--cc=valentina.manea.m@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).