From 0be083132c9e401785179a15b7156df06845b1a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?YOSHIFUJI=20Hideaki=20/=20=E5=90=89=E8=97=A4=E8=8B=B1?= =?UTF-8?q?=E6=98=8E?= Date: Wed, 30 Jan 2013 09:26:42 +0000 Subject: [PATCH] --- yaml --- r: 352015 b: refs/heads/master c: f256dc59d0729cf7d371b93062375d9bc79c1e44 h: refs/heads/master i: 352013: 38a5550780066bd2c6d74813c22647e551dc7161 352011: 06171f1c6242ca0bcc560af3fdcb823a3265a9d9 352007: a8d077a9232bc8c90c56da22989135f7b40cac30 351999: ce666a44a1a0a85c63cc608facc0bb18f8123d4e v: v3 --- [refs] | 2 +- trunk/net/ipv6/ip6_flowlabel.c | 13 +++++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 479940958eef..aacf168abce8 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 3b58908a92e00840bcd9050808f3dc86fd547029 +refs/heads/master: f256dc59d0729cf7d371b93062375d9bc79c1e44 diff --git a/trunk/net/ipv6/ip6_flowlabel.c b/trunk/net/ipv6/ip6_flowlabel.c index 29124b7a04c8..5d767f1b8780 100644 --- a/trunk/net/ipv6/ip6_flowlabel.c +++ b/trunk/net/ipv6/ip6_flowlabel.c @@ -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; } }