Commit 452a3ee
ipv6: fix a race in ip6_sock_set_v6only()
It is unlikely that this function will be ever called
with isk->inet_num being not zero.
Perform the check on isk->inet_num inside the locked section
for complete safety.
Fixes: 9b11574 ("ipv6: add ip6_sock_set_v6only")
Signed-off-by: Eric Dumazet <[email protected]>
Reviewed-by: Simon Horman <[email protected]>
Reviewed-by: Fernando Fernandez Mancera <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>1 parent 77c5e3f commit 452a3ee
1 file changed
Lines changed: 7 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1213 | 1213 | | |
1214 | 1214 | | |
1215 | 1215 | | |
1216 | | - | |
1217 | | - | |
| 1216 | + | |
| 1217 | + | |
1218 | 1218 | | |
1219 | | - | |
| 1219 | + | |
| 1220 | + | |
| 1221 | + | |
| 1222 | + | |
1220 | 1223 | | |
1221 | | - | |
| 1224 | + | |
1222 | 1225 | | |
1223 | 1226 | | |
1224 | 1227 | | |
| |||
0 commit comments