History

net: watchdog: add net device refcount tracker

Add a netdevice_tracker inside struct net_device, to track the self reference when a device has an active watchdog timer.

Eric Dumazet committed 4 years ago

Commit f12bf6f1 parent b2dcdc72 files · +8 −4Browse files

Showing the changes to include/linux (1 of 2 files). Show all

Unified · Split

include/linux/netdevice.h+2−0
@@ -1951,6 +1951,7 @@ enum netdev_ml_priv_type { · 1950 unmodified lines
19511951 *
19521952 * @dev_addr_shadow: Copy of @dev_addr to catch direct writes.
19531953 * @linkwatch_dev_tracker: refcount tracker used by linkwatch.
1954+ * @watchdog_dev_tracker: refcount tracker used by watchdog.
19541955 *
19551956 * FIXME: cleanup struct net_device such that network protocol info
19561957 * moves out.
@@ -2282,6 +2283,7 @@ struct net_device { · 325 unmodified lines
22822283
22832284 u8 dev_addr_shadow[MAX_ADDR_LEN];
22842285 netdevice_tracker linkwatch_dev_tracker;
2286+ netdevice_tracker watchdog_dev_tracker;
22852287 };
22862288 #define to_net_dev(d) container_of(d, struct net_device, dev)
22872289