* [Patch net] kcm: fix a signedness in kcm_splice_read()
@ 2016-05-17 21:05 Cong Wang
2016-05-19 18:27 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Cong Wang @ 2016-05-17 21:05 UTC (permalink / raw)
To: netdev; +Cc: linuxdev.baldrick, Cong Wang, Tom Herbert
skb_splice_bits() returns int, kcm_splice_read() returns ssize_t,
both are signed.
We may need another patch to make them all ssize_t, but that
deserves a separated patch.
Fixes: 91687355b927 ("kcm: Splice support")
Reported-by: David Binderman <linuxdev.baldrick@gmail.com>
Cc: Tom Herbert <tom@herbertland.com>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
---
net/kcm/kcmsock.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/kcm/kcmsock.c b/net/kcm/kcmsock.c
index 40662d73..0b68ba7 100644
--- a/net/kcm/kcmsock.c
+++ b/net/kcm/kcmsock.c
@@ -1483,7 +1483,7 @@ static ssize_t kcm_splice_read(struct socket *sock, loff_t *ppos,
long timeo;
struct kcm_rx_msg *rxm;
int err = 0;
- size_t copied;
+ ssize_t copied;
struct sk_buff *skb;
/* Only support splice for SOCKSEQPACKET */
--
2.1.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Patch net] kcm: fix a signedness in kcm_splice_read()
2016-05-17 21:05 [Patch net] kcm: fix a signedness in kcm_splice_read() Cong Wang
@ 2016-05-19 18:27 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2016-05-19 18:27 UTC (permalink / raw)
To: xiyou.wangcong; +Cc: netdev, linuxdev.baldrick, tom
From: Cong Wang <xiyou.wangcong@gmail.com>
Date: Tue, 17 May 2016 14:05:49 -0700
> skb_splice_bits() returns int, kcm_splice_read() returns ssize_t,
> both are signed.
>
> We may need another patch to make them all ssize_t, but that
> deserves a separated patch.
>
> Fixes: 91687355b927 ("kcm: Splice support")
> Reported-by: David Binderman <linuxdev.baldrick@gmail.com>
> Cc: Tom Herbert <tom@herbertland.com>
> Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-05-19 18:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-17 21:05 [Patch net] kcm: fix a signedness in kcm_splice_read() Cong Wang
2016-05-19 18:27 ` David Miller
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).