aboutsummaryrefslogtreecommitdiff
path: root/net/ipv6/ip6_flowlabel.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-02-13 09:34:07 +0100
committerIngo Molnar <mingo@elte.hu>2009-02-13 09:34:07 +0100
commite9c4ffb11f0b19005b5b9dc8481687a3637e5887 (patch)
tree7007f2ff846b9b057c5cd7c25e8b82e49f9b4b63 /net/ipv6/ip6_flowlabel.c
parent4bcf349a0f90d1e69eb35c6df0fa285c886c1cd6 (diff)
parent071a0bc2ceace31266836801510879407a3701fa (diff)
Merge branch 'linus' into perfcounters/core
Conflicts: arch/x86/kernel/acpi/boot.c
Diffstat (limited to 'net/ipv6/ip6_flowlabel.c')
-rw-r--r--net/ipv6/ip6_flowlabel.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/net/ipv6/ip6_flowlabel.c b/net/ipv6/ip6_flowlabel.c
index c62dd247774..7712578bdc6 100644
--- a/net/ipv6/ip6_flowlabel.c
+++ b/net/ipv6/ip6_flowlabel.c
@@ -323,17 +323,21 @@ static struct ip6_flowlabel *
fl_create(struct net *net, struct in6_flowlabel_req *freq, char __user *optval,
int optlen, int *err_p)
{
- struct ip6_flowlabel *fl;
+ struct ip6_flowlabel *fl = NULL;
int olen;
int addr_type;
int err;
+ olen = optlen - CMSG_ALIGN(sizeof(*freq));
+ err = -EINVAL;
+ if (olen > 64 * 1024)
+ goto done;
+
err = -ENOMEM;
fl = kzalloc(sizeof(*fl), GFP_KERNEL);
if (fl == NULL)
goto done;
- olen = optlen - CMSG_ALIGN(sizeof(*freq));
if (olen > 0) {
struct msghdr msg;
struct flowi flowi;