提交 e2eb8d45 编写于 作者: J Jarek Poplawski 提交者: David S. Miller

[SCTP] ipv6: inconsistent lock state ipv6_add_addr/sctp_v6_copy_addrlist

lockdep found that dev->lock taken from softirq in ipv6_add_addr
is also taken in sctp_v6_copy_addrlist with softirqs enabled, so
lockup is possible.
Noticed-by: NSimon Arlott <simon@arlott.org>
Signed-off-by: NJarek Poplawski <jarkao2@o2.pl>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 ca426635
......@@ -360,7 +360,7 @@ static void sctp_v6_copy_addrlist(struct list_head *addrlist,
return;
}
read_lock(&in6_dev->lock);
read_lock_bh(&in6_dev->lock);
for (ifp = in6_dev->addr_list; ifp; ifp = ifp->if_next) {
/* Add the address to the local list. */
addr = t_new(struct sctp_sockaddr_entry, GFP_ATOMIC);
......@@ -374,7 +374,7 @@ static void sctp_v6_copy_addrlist(struct list_head *addrlist,
}
}
read_unlock(&in6_dev->lock);
read_unlock_bh(&in6_dev->lock);
rcu_read_unlock();
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册