Commit 9b8c88f
l2tp: do not use sock_hold() in pppol2tp_session_get_sock()
pppol2tp_session_get_sock() is using RCU, it must be ready
for sk_refcnt being zero.
Commit ee40fb2 ("l2tp: protect sock pointer of
struct pppol2tp_session with RCU") was correct because it
had a call_rcu(..., pppol2tp_put_sk) which was later removed in blamed commit.
pppol2tp_recv() can use pppol2tp_session_get_sock() as well.
Fixes: c5cbaef ("l2tp: refactor ppp socket/session relationship")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: James Chapman <jchapman@katalix.com>
Reviewed-by: Guillaume Nault <gnault@redhat.com>
Link: https://patch.msgid.link/20250826134435.1683435-1-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>1 parent 2e87504 commit 9b8c88f
1 file changed
+8
-17
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
| 132 | + | |
136 | 133 | | |
137 | 134 | | |
138 | 135 | | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | 136 | | |
147 | | - | |
| 137 | + | |
148 | 138 | | |
149 | 139 | | |
150 | 140 | | |
| |||
206 | 196 | | |
207 | 197 | | |
208 | 198 | | |
209 | | - | |
210 | | - | |
| 199 | + | |
211 | 200 | | |
212 | 201 | | |
213 | 202 | | |
214 | 203 | | |
215 | 204 | | |
216 | | - | |
| 205 | + | |
217 | 206 | | |
218 | 207 | | |
219 | 208 | | |
| |||
510 | 499 | | |
511 | 500 | | |
512 | 501 | | |
| 502 | + | |
513 | 503 | | |
514 | 504 | | |
515 | 505 | | |
516 | 506 | | |
517 | 507 | | |
518 | | - | |
519 | 508 | | |
| 509 | + | |
520 | 510 | | |
521 | 511 | | |
522 | 512 | | |
| |||
1530 | 1520 | | |
1531 | 1521 | | |
1532 | 1522 | | |
| 1523 | + | |
1533 | 1524 | | |
1534 | 1525 | | |
1535 | 1526 | | |
| |||
1565 | 1556 | | |
1566 | 1557 | | |
1567 | 1558 | | |
1568 | | - | |
1569 | 1559 | | |
| 1560 | + | |
1570 | 1561 | | |
1571 | 1562 | | |
1572 | 1563 | | |
| |||
0 commit comments