Skip to content

Commit 1e0d69a

Browse files
strssndktndavem330
authored andcommitted
Revert "Merge branch 'ipv6-overflow-arith'"
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>
1 parent e18f6ac commit 1e0d69a

File tree

3 files changed

+1
-27
lines changed

3 files changed

+1
-27
lines changed

include/linux/compiler-gcc.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -237,10 +237,6 @@
237237
#define KASAN_ABI_VERSION 3
238238
#endif
239239

240-
#if GCC_VERSION >= 50000
241-
#define CC_HAVE_BUILTIN_OVERFLOW
242-
#endif
243-
244240
#endif /* gcc version >= 40000 specific checks */
245241

246242
#if !defined(__noclone)

include/linux/overflow-arith.h

Lines changed: 0 additions & 18 deletions
This file was deleted.

net/ipv6/ip6_output.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828

2929
#include <linux/errno.h>
3030
#include <linux/kernel.h>
31-
#include <linux/overflow-arith.h>
3231
#include <linux/string.h>
3332
#include <linux/socket.h>
3433
#include <linux/net.h>
@@ -585,10 +584,7 @@ int ip6_fragment(struct sock *sk, struct sk_buff *skb,
585584
if (np->frag_size)
586585
mtu = np->frag_size;
587586
}
588-
589-
if (overflow_usub(mtu, hlen + sizeof(struct frag_hdr), &mtu) ||
590-
mtu <= 7)
591-
goto fail_toobig;
587+
mtu -= hlen + sizeof(struct frag_hdr);
592588

593589
frag_id = ipv6_select_ident(net, &ipv6_hdr(skb)->daddr,
594590
&ipv6_hdr(skb)->saddr);

0 commit comments

Comments
 (0)