diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-02-24 21:52:27 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-02-24 21:52:27 +0100 |
commit | 87b203079ed949de52f0d92aeae20e5e0116c12f (patch) | |
tree | 1878756f936963822ed2d51a15db1da5814973e7 /net/ipv6/ip6_flowlabel.c | |
parent | 58105ef1857112a186696c9b8957020090226a28 (diff) | |
parent | a852cbfaaf8122827602027b1614971cfd832304 (diff) |
Merge branch 'x86/core' into core/percpu
Diffstat (limited to 'net/ipv6/ip6_flowlabel.c')
-rw-r--r-- | net/ipv6/ip6_flowlabel.c | 8 |
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; |