Commit f256dc59 authored by YOSHIFUJI Hideaki / 吉藤英明's avatar YOSHIFUJI Hideaki / 吉藤英明 Committed by David S. Miller

ipv6 flowlabel: Ensure to take lock when modifying np->ip6_sk_fl_list.

Signed-off-by: default avatarYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 3b58908a
......@@ -255,10 +255,19 @@ void fl6_free_socklist(struct sock *sk)
struct ipv6_pinfo *np = inet6_sk(sk);
struct ipv6_fl_socklist *sfl;
while ((sfl = np->ipv6_fl_list) != NULL) {
np->ipv6_fl_list = sfl->next;
if (!np->ipv6_fl_list)
return;
write_lock_bh(&ipv6_sk_fl_lock);
sfl = np->ipv6_fl_list;
np->ipv6_fl_list = NULL;
write_unlock_bh(&ipv6_sk_fl_lock);
while (sfl) {
struct ipv6_fl_socklist *next = sfl->next;
fl_release(sfl->fl);
kfree(sfl);
sfl = next;
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment