Commit 2eb6c6a
net: move replay logic to tc_modify_qdisc
Eric reports that by the time we call netdev_lock_ops after
rtnl_unlock/rtnl_lock, the dev might point to an invalid device.
As suggested by Jakub in [0], move rtnl lock/unlock and request_module
outside of qdisc_create. This removes extra complexity with relocking
the netdev.
0: https://lore.kernel.org/netdev/20250325032803.1542c15e@kernel.org/
Fixes: a0527ee ("net: hold netdev instance lock during qdisc ndo_setup_tc")
Reported-by: Eric Dumazet <edumazet@google.com>
Link: https://lore.kernel.org/netdev/20250305163732.2766420-1-sdf@fomichev.me/T/#me8dfd778ea4c4463acab55644e3f9836bc608771
Signed-off-by: Stanislav Fomichev <sdf@fomichev.me>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Link: https://patch.msgid.link/20250325175427.3818808-1-sdf@fomichev.me
Signed-off-by: Jakub Kicinski <kuba@kernel.org>1 parent 67d1a89 commit 2eb6c6a
1 file changed
Lines changed: 27 additions & 46 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1267 | 1267 | | |
1268 | 1268 | | |
1269 | 1269 | | |
1270 | | - | |
1271 | | - | |
1272 | | - | |
1273 | | - | |
1274 | | - | |
1275 | | - | |
1276 | | - | |
1277 | | - | |
1278 | | - | |
1279 | | - | |
1280 | | - | |
1281 | | - | |
1282 | | - | |
1283 | | - | |
1284 | | - | |
1285 | | - | |
1286 | | - | |
1287 | | - | |
1288 | | - | |
1289 | | - | |
1290 | | - | |
1291 | | - | |
1292 | | - | |
1293 | | - | |
1294 | | - | |
1295 | | - | |
1296 | | - | |
1297 | | - | |
1298 | | - | |
1299 | | - | |
1300 | | - | |
1301 | 1270 | | |
| 1271 | + | |
1302 | 1272 | | |
1303 | 1273 | | |
1304 | 1274 | | |
| |||
1623 | 1593 | | |
1624 | 1594 | | |
1625 | 1595 | | |
1626 | | - | |
1627 | | - | |
| 1596 | + | |
1628 | 1597 | | |
1629 | 1598 | | |
1630 | 1599 | | |
| |||
1789 | 1758 | | |
1790 | 1759 | | |
1791 | 1760 | | |
1792 | | - | |
1793 | | - | |
1794 | | - | |
1795 | | - | |
1796 | | - | |
| 1761 | + | |
1797 | 1762 | | |
1798 | | - | |
1799 | 1763 | | |
1800 | 1764 | | |
1801 | 1765 | | |
| |||
1808 | 1772 | | |
1809 | 1773 | | |
1810 | 1774 | | |
| 1775 | + | |
| 1776 | + | |
| 1777 | + | |
| 1778 | + | |
| 1779 | + | |
| 1780 | + | |
| 1781 | + | |
| 1782 | + | |
| 1783 | + | |
| 1784 | + | |
| 1785 | + | |
| 1786 | + | |
| 1787 | + | |
| 1788 | + | |
| 1789 | + | |
| 1790 | + | |
| 1791 | + | |
| 1792 | + | |
| 1793 | + | |
| 1794 | + | |
| 1795 | + | |
1811 | 1796 | | |
1812 | 1797 | | |
1813 | 1798 | | |
| |||
1818 | 1803 | | |
1819 | 1804 | | |
1820 | 1805 | | |
1821 | | - | |
1822 | 1806 | | |
1823 | 1807 | | |
1824 | | - | |
1825 | | - | |
1826 | 1808 | | |
1827 | 1809 | | |
1828 | 1810 | | |
1829 | 1811 | | |
1830 | 1812 | | |
| 1813 | + | |
| 1814 | + | |
1831 | 1815 | | |
1832 | 1816 | | |
1833 | 1817 | | |
1834 | 1818 | | |
1835 | 1819 | | |
1836 | | - | |
1837 | 1820 | | |
1838 | | - | |
| 1821 | + | |
1839 | 1822 | | |
1840 | | - | |
1841 | | - | |
1842 | 1823 | | |
1843 | 1824 | | |
1844 | 1825 | | |
| |||
0 commit comments