diff options
| author | Jakub Kicinski <[email protected]> | 2024-04-03 20:22:59 +0000 |
|---|---|---|
| committer | David S. Miller <[email protected]> | 2024-04-06 17:20:14 +0000 |
| commit | 8e69b3459ca1ed4f6f7bd0b0a11962ddb3e7d34a (patch) | |
| tree | aa765a5811a11f51979fdb87c0e70a8a2079e156 /net/devlink/dev.c | |
| parent | net: skbuff: generalize the skb->decrypted bit (diff) | |
| download | kernel-8e69b3459ca1ed4f6f7bd0b0a11962ddb3e7d34a.tar.gz kernel-8e69b3459ca1ed4f6f7bd0b0a11962ddb3e7d34a.zip | |
netlink: add nlmsg_consume() and use it in devlink compat
devlink_compat_running_version() sticks out when running
netdevsim tests and watching dropped skbs. Add nlmsg_consume()
for cases were we want to free a netlink skb but it is expected,
rather than a drop. af_netlink code uses consume_skb() directly,
which is fine, but some may prefer the symmetry of nlmsg_new() /
nlmsg_consume().
Signed-off-by: Jakub Kicinski <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'net/devlink/dev.c')
| -rw-r--r-- | net/devlink/dev.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/devlink/dev.c b/net/devlink/dev.c index c609deb42e88..13c73f50da3d 100644 --- a/net/devlink/dev.c +++ b/net/devlink/dev.c @@ -1214,7 +1214,7 @@ static void __devlink_compat_running_version(struct devlink *devlink, } } free_msg: - nlmsg_free(msg); + nlmsg_consume(msg); } void devlink_compat_running_version(struct devlink *devlink, |
