Skip to content

Commit

Permalink
Revert "Merge branch 'ipv6-overflow-arith'"
Browse files Browse the repository at this point in the history
Linus dislikes these changes. To not hold up the net-merge let's revert
it for now and fix the bug like Linus suggested.

This reverts commit ec3661b, reversing
changes made to c80dbe0.

Cc: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Hannes Frederic Sowa authored and David S. Miller committed Oct 29, 2015
1 parent e18f6ac commit 1e0d69a
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 27 deletions.
4 changes: 0 additions & 4 deletions include/linux/compiler-gcc.h
Original file line number Diff line number Diff line change
Expand Up @@ -237,10 +237,6 @@
#define KASAN_ABI_VERSION 3
#endif

#if GCC_VERSION >= 50000
#define CC_HAVE_BUILTIN_OVERFLOW
#endif

#endif /* gcc version >= 40000 specific checks */

#if !defined(__noclone)
Expand Down
18 changes: 0 additions & 18 deletions include/linux/overflow-arith.h

This file was deleted.

6 changes: 1 addition & 5 deletions net/ipv6/ip6_output.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@

#include <linux/errno.h>
#include <linux/kernel.h>
#include <linux/overflow-arith.h>
#include <linux/string.h>
#include <linux/socket.h>
#include <linux/net.h>
Expand Down Expand Up @@ -585,10 +584,7 @@ int ip6_fragment(struct sock *sk, struct sk_buff *skb,
if (np->frag_size)
mtu = np->frag_size;
}

if (overflow_usub(mtu, hlen + sizeof(struct frag_hdr), &mtu) ||
mtu <= 7)
goto fail_toobig;
mtu -= hlen + sizeof(struct frag_hdr);

frag_id = ipv6_select_ident(net, &ipv6_hdr(skb)->daddr,
&ipv6_hdr(skb)->saddr);
Expand Down

0 comments on commit 1e0d69a

Please sign in to comment.