Commit 4fab641
net/sched: fix error recovery in qdisc_create()
If TCA_STAB attribute is malformed, qdisc_get_stab() returns
an error, and we end up calling ops->destroy() while ops->init()
has not been called yet.
While we are at it, call qdisc_put_stab() after ops->destroy().
Fixes: 1f62879 ("net/sched: make stab available before ops->init() call")
Reported-by: syzbot+d44d88f1d11e6ca8576b@syzkaller.appspotmail.com
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Vladimir Oltean <vladimir.oltean@nxp.com>
Cc: Kurt Kanzenbach <kurt@linutronix.de>
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>1 parent cafc366 commit 4fab641
1 file changed
+8
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1286 | 1286 | | |
1287 | 1287 | | |
1288 | 1288 | | |
1289 | | - | |
| 1289 | + | |
1290 | 1290 | | |
1291 | 1291 | | |
1292 | 1292 | | |
1293 | 1293 | | |
1294 | 1294 | | |
1295 | 1295 | | |
1296 | 1296 | | |
1297 | | - | |
| 1297 | + | |
1298 | 1298 | | |
1299 | 1299 | | |
1300 | 1300 | | |
1301 | 1301 | | |
1302 | 1302 | | |
1303 | 1303 | | |
1304 | | - | |
| 1304 | + | |
1305 | 1305 | | |
1306 | 1306 | | |
1307 | 1307 | | |
| |||
1312 | 1312 | | |
1313 | 1313 | | |
1314 | 1314 | | |
1315 | | - | |
| 1315 | + | |
1316 | 1316 | | |
1317 | 1317 | | |
1318 | 1318 | | |
| |||
1321 | 1321 | | |
1322 | 1322 | | |
1323 | 1323 | | |
1324 | | - | |
1325 | | - | |
1326 | 1324 | | |
1327 | | - | |
| 1325 | + | |
| 1326 | + | |
| 1327 | + | |
1328 | 1328 | | |
1329 | 1329 | | |
| 1330 | + | |
1330 | 1331 | | |
1331 | 1332 | | |
1332 | 1333 | | |
| |||
0 commit comments