[NET]: Move the filter releasing into a separate call
This is done merely as a preparation for the fix. The sk_filter_uncharge() unaccounts the filter memory and calls the sk_filter_release(), which in turn decrements the refcount anf frees the filter. The latter function will be required separately. Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
55b333253d
commit
309dd5fc87
@ -915,7 +915,7 @@ void sk_free(struct sock *sk)
|
||||
|
||||
filter = rcu_dereference(sk->sk_filter);
|
||||
if (filter) {
|
||||
sk_filter_release(sk, filter);
|
||||
sk_filter_uncharge(sk, filter);
|
||||
rcu_assign_pointer(sk->sk_filter, NULL);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user