diff options
author | Eric Dumazet <edumazet@google.com> | 2017-10-10 19:12:33 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-10-10 20:24:29 -0700 |
commit | c0576e3975084d4699b7bfef578613fb8e1144f6 (patch) | |
tree | 3c077a45caeb9a84a3c552bd623034f6b788f7da /net/mac80211/key.c | |
parent | 75cb070960ade40fba5de32138390f3c85c90941 (diff) | |
download | linux-c0576e3975084d4699b7bfef578613fb8e1144f6.tar.bz2 |
net: call cgroup_sk_alloc() earlier in sk_clone_lock()
If for some reason, the newly allocated child need to be freed,
we will call cgroup_put() (via sk_free_unlock_clone()) while the
corresponding cgroup_get() was not yet done, and we will free memory
too soon.
Fixes: d979a39d7242 ("cgroup: duplicate cgroup reference when cloning sockets")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Tejun Heo <tj@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/mac80211/key.c')
0 files changed, 0 insertions, 0 deletions