diff options
author | Flavio Leitner <fleitner@redhat.com> | 2010-02-02 10:32:29 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-02-02 10:32:29 -0500 |
commit | c85bb41e93184bf5494dde6d8fe5a81b564c84c8 (patch) | |
tree | 2a5daec2aecc3fb3eedfba3f63a2156f38575b2d /include/linux/igmp.h | |
parent | 8b64056dacf6ec81986d63dff96fca039fe95f6e (diff) |
igmp: fix ip_mc_sf_allow race [v5]
Almost all igmp functions accessing inet->mc_list are protected by
rtnl_lock(), but there is one exception which is ip_mc_sf_allow(),
so there is a chance of either ip_mc_drop_socket or ip_mc_leave_group
remove an entry while ip_mc_sf_allow is running causing a crash.
Signed-off-by: Flavio Leitner <fleitner@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/igmp.h')
-rw-r--r-- | include/linux/igmp.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/igmp.h b/include/linux/igmp.h index 724c27e5d173..93fc2449af10 100644 --- a/include/linux/igmp.h +++ b/include/linux/igmp.h | |||
@@ -153,6 +153,7 @@ extern int sysctl_igmp_max_msf; | |||
153 | struct ip_sf_socklist { | 153 | struct ip_sf_socklist { |
154 | unsigned int sl_max; | 154 | unsigned int sl_max; |
155 | unsigned int sl_count; | 155 | unsigned int sl_count; |
156 | struct rcu_head rcu; | ||
156 | __be32 sl_addr[0]; | 157 | __be32 sl_addr[0]; |
157 | }; | 158 | }; |
158 | 159 | ||
@@ -170,6 +171,7 @@ struct ip_mc_socklist { | |||
170 | struct ip_mreqn multi; | 171 | struct ip_mreqn multi; |
171 | unsigned int sfmode; /* MCAST_{INCLUDE,EXCLUDE} */ | 172 | unsigned int sfmode; /* MCAST_{INCLUDE,EXCLUDE} */ |
172 | struct ip_sf_socklist *sflist; | 173 | struct ip_sf_socklist *sflist; |
174 | struct rcu_head rcu; | ||
173 | }; | 175 | }; |
174 | 176 | ||
175 | struct ip_sf_list { | 177 | struct ip_sf_list { |