diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.cExcept that is a valid case, see a few lines higher:
index 4788f6b37053..622345af323e 100644
--- a/net/ipv6/ip6_output.c
+++ b/net/ipv6/ip6_output.c
@@ -1629,6 +1629,13 @@ static int __ip6_append_data(struct sock *sk,
err = -EINVAL;
goto error;
}
+ if (unlikely(alloclen < fraglen)) {
+ if (printk_ratelimit())
+ pr_warn("%s: wrong alloclen: %d, fraglen: %d",
+ __func__, alloclen, fraglen);
+ alloclen = fraglen;
+ }
+
alloclen = min_t(int, fraglen, MAX_HEADER);
pagedlen = fraglen - alloclen;
You need to report the input values that cause the problem later on.