mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [RESEND PATCH] ipv4: ip_check_defrag should correctly check return value of skb_copy_bits
@ 2015-02-19  9:26 Alexander Drozdov
  2015-02-19 14:50 ` Eric Dumazet
  0 siblings, 1 reply; 2+ messages in thread
From: Alexander Drozdov @ 2015-02-19  9:26 UTC (permalink / raw)
  To: David S. Miller, Alexey Kuznetsov, James Morris,
	ideaki YOSHIFUJI, Patrick McHardy, Eric Dumazet
  Cc: netdev, linux-kernel, Alexander Drozdov, Johannes Berg

skb_copy_bits() returns zero on success and a negative value on error,
so it is needed to invert the condition in ip_check_defrag().

Fixes: 1bf3751ec90c ("ipv4: ip_check_defrag must not modify skb before unsharing")
Signed-off-by: Alexander Drozdov <al.drozdov@gmail.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Cc: Johannes Berg <johannes.berg@intel.com>
---
 net/ipv4/ip_fragment.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/ipv4/ip_fragment.c b/net/ipv4/ip_fragment.c
index e5b6d0d..2c8d98e 100644
--- a/net/ipv4/ip_fragment.c
+++ b/net/ipv4/ip_fragment.c
@@ -664,7 +664,7 @@ struct sk_buff *ip_check_defrag(struct sk_buff *skb, u32 user)
 	if (skb->protocol != htons(ETH_P_IP))
 		return skb;
 
-	if (!skb_copy_bits(skb, 0, &iph, sizeof(iph)))
+	if (skb_copy_bits(skb, 0, &iph, sizeof(iph)) < 0)
 		return skb;
 
 	if (iph.ihl < 5 || iph.version != 4)
-- 
1.9.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [RESEND PATCH] ipv4: ip_check_defrag should correctly check return value of skb_copy_bits
  2015-02-19  9:26 [RESEND PATCH] ipv4: ip_check_defrag should correctly check return value of skb_copy_bits Alexander Drozdov
@ 2015-02-19 14:50 ` Eric Dumazet
  0 siblings, 0 replies; 2+ messages in thread
From: Eric Dumazet @ 2015-02-19 14:50 UTC (permalink / raw)
  To: Alexander Drozdov
  Cc: David S. Miller, Alexey Kuznetsov, James Morris,
	ideaki YOSHIFUJI, Patrick McHardy, Eric Dumazet, netdev,
	linux-kernel, Johannes Berg

On Thu, 2015-02-19 at 12:26 +0300, Alexander Drozdov wrote:
> skb_copy_bits() returns zero on success and a negative value on error,
> so it is needed to invert the condition in ip_check_defrag().
> 
> Fixes: 1bf3751ec90c ("ipv4: ip_check_defrag must not modify skb before unsharing")
> Signed-off-by: Alexander Drozdov <al.drozdov@gmail.com>
> Acked-by: Eric Dumazet <edumazet@google.com>
> Cc: Johannes Berg <johannes.berg@intel.com>
> ---
>  net/ipv4/ip_fragment.c | 2 +-

No need to resend, your first patch is still active in patchwork.
David is probably traveling from Ottawa.

vi +100  Documentation/networking/netdev-FAQ.txt

Q: I sent a patch and I'm wondering what happened to it.  How can I tell
   whether it got merged?

A: Start by looking at the main patchworks queue for netdev:

        http://patchwork.ozlabs.org/project/netdev/list/

   The "State" field will tell you exactly where things are at with
   your patch.

Q: The above only says "Under Review".  How can I find out more?

A: Generally speaking, the patches get triaged quickly (in less than 48h).
   So be patient.  Asking the maintainer for status updates on your
   patch is a good way to ensure your patch is ignored or pushed to
   the bottom of the priority list.



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-02-19 14:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-19  9:26 [RESEND PATCH] ipv4: ip_check_defrag should correctly check return value of skb_copy_bits Alexander Drozdov
2015-02-19 14:50 ` Eric Dumazet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®