Commit f9fda67
net/sched: fix use-after-free in taprio_dev_notifier
BugLink: https://bugs.launchpad.net/bugs/2120812
commit b160766e26d4e2e2d6fe2294e0b02f92baefcec5 upstream.
Since taprio’s taprio_dev_notifier() isn’t protected by an
RCU read-side critical section, a race with advance_sched()
can lead to a use-after-free.
Adding rcu_read_lock() inside taprio_dev_notifier() prevents this.
Fixes: fed87cc ("net/sched: taprio: automatically calculate queueMaxSDU based on TC gate durations")
Cc: [email protected]
Signed-off-by: Hyunwoo Kim <[email protected]>
Reviewed-by: Simon Horman <[email protected]>
Reviewed-by: Eric Dumazet <[email protected]>
Link: https://patch.msgid.link/aEzIYYxt0is9upYG@v4bel-B760M-AORUS-ELITE-AX
Signed-off-by: Jakub Kicinski <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Noah Wager <[email protected]>
Signed-off-by: Stefan Bader <[email protected]>1 parent 5e5a9a7 commit f9fda67
1 file changed
+4
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1328 | 1328 | | |
1329 | 1329 | | |
1330 | 1330 | | |
1331 | | - | |
| 1331 | + | |
| 1332 | + | |
1332 | 1333 | | |
1333 | 1334 | | |
1334 | 1335 | | |
1335 | | - | |
| 1336 | + | |
1336 | 1337 | | |
1337 | 1338 | | |
| 1339 | + | |
1338 | 1340 | | |
1339 | 1341 | | |
1340 | 1342 | | |
| |||
0 commit comments