lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <YxlkJc+QHfDAc95s@Laptop-X1>
Date:   Thu, 8 Sep 2022 11:40:21 +0800
From:   Hangbin Liu <liuhangbin@...il.com>
To:     netdev@...r.kernel.org
Cc:     "David S. Miller" <davem@...emloft.net>,
        Hideaki YOSHIFUJI <yoshfuji@...ux-ipv6.org>,
        David Ahern <dsahern@...nel.org>,
        Eric Dumazet <edumazet@...gle.com>,
        Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>,
        Liu Jian <liujian56@...wei.com>,
        Taehee Yoo <ap420073@...il.com>, Jiri Benc <jbenc@...hat.com>
Subject: [IGMP Discuss] Should we use one lock for struct ip_mc_list ?

Hi,

When reviewing commit 23d2b94043ca ("igmp: Add ip_mc_list lock in
ip_check_mc_rcu"). Jiri pointed that struct ip_mc_list is protected by
different lock.

In function ip_check_mc_rcu() and ip_mc_del_src(), the struct ip_mc_list
in in_dev->mc_list is protected by the lock of struct ip_mc_list itself.

But in function igmpv3_send_cr, the ip_mc_list in in_dev->mc_tomb is
protected by in_dev->mc_tomb_lock.

This is no clear doc about what is protected by ip_mc_list->lock.

Is it OK for a single field that be protected by different locks?

Taehee did an update for MLD by using one mc_lock in commit 63ed8de4be81
("mld: add mc_lock for protecting per-interface mld data"). Should we also
do this on IGMP?

Thanks
Hangbin

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ