author: Qinglang Miao <miaoqinglang@huawei.com> 2020-11-19 15:08:39 +0800
committer: Corey Minyard <cminyard@mvista.com> 2020-11-19 06:36:28 -0600
commit: 368ffd9adc7a01234c0c68ffd72cc76840f20134
parent: a01a89b1db1066a6af23ae08b9a0c345b7966f0b
Commit Summary:
Diffstat:
1 file changed, 2 insertions, 1 deletion
diff --git a/drivers/char/ipmi/ipmi_msghandler.c b/drivers/char/ipmi/ipmi_msghandler.c
index 8774a3b8ff95..c44ad18464f1 100644
--- a/drivers/char/ipmi/ipmi_msghandler.c
+++ b/drivers/char/ipmi/ipmi_msghandler.c
@@ -747,7 +747,8 @@ int ipmi_smi_watcher_register(struct ipmi_smi_watcher *watcher)
list_add(&watcher->link, &smi_watchers);
index = srcu_read_lock(&ipmi_interfaces_srcu);
- list_for_each_entry_rcu(intf, &ipmi_interfaces, link) {
+ list_for_each_entry_rcu(intf, &ipmi_interfaces, link,
+ lockdep_is_held(&smi_watchers_mutex)) {
int intf_num = READ_ONCE(intf->intf_num);
if (intf_num == -1)