diff options
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/sock.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/net/core/sock.c b/net/core/sock.c index c9083ad44ea1..e4f40b175acb 100644 --- a/net/core/sock.c +++ b/net/core/sock.c @@ -820,6 +820,14 @@ void sock_set_rcvbuf(struct sock *sk, int val) } EXPORT_SYMBOL(sock_set_rcvbuf); +void sock_set_mark(struct sock *sk, u32 val) +{ + lock_sock(sk); + sk->sk_mark = val; + release_sock(sk); +} +EXPORT_SYMBOL(sock_set_mark); + /* * This is meant for all protocols to use and covers goings on * at the socket level. Everything here is generic. @@ -2257,7 +2265,7 @@ static inline void __sock_kfree_s(struct sock *sk, void *mem, int size, if (WARN_ON_ONCE(!mem)) return; if (nullify) - kzfree(mem); + kfree_sensitive(mem); else kfree(mem); atomic_sub(size, &sk->sk_omem_alloc); |