diff options
| author | Stanislav Fomichev <[email protected]> | 2025-03-05 16:37:27 +0000 |
|---|---|---|
| committer | Jakub Kicinski <[email protected]> | 2025-03-06 20:59:44 +0000 |
| commit | 97246d6d21c21fb4c5235770a21855e457096a96 (patch) | |
| tree | 49c269b1d3a1eca0e8c9aaf08677f39c55be0b9b /net/core/dev_api.c | |
| parent | net: hold netdev instance lock during sysfs operations (diff) | |
| download | kernel-97246d6d21c21fb4c5235770a21855e457096a96.tar.gz kernel-97246d6d21c21fb4c5235770a21855e457096a96.zip | |
net: hold netdev instance lock during ndo_bpf
Cover the paths that come via bpf system call and XSK bind.
Cc: Saeed Mahameed <[email protected]>
Signed-off-by: Stanislav Fomichev <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'net/core/dev_api.c')
| -rw-r--r-- | net/core/dev_api.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/net/core/dev_api.c b/net/core/dev_api.c index 7bd667b34b80..98db990ce21c 100644 --- a/net/core/dev_api.c +++ b/net/core/dev_api.c @@ -317,3 +317,15 @@ int dev_set_mac_address(struct net_device *dev, struct sockaddr *sa, return ret; } EXPORT_SYMBOL(dev_set_mac_address); + +int dev_xdp_propagate(struct net_device *dev, struct netdev_bpf *bpf) +{ + int ret; + + netdev_lock_ops(dev); + ret = netif_xdp_propagate(dev, bpf); + netdev_unlock_ops(dev); + + return ret; +} +EXPORT_SYMBOL_GPL(dev_xdp_propagate); |
