aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/gtp.c
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2024-09-05 16:51:58 +0200
committerHans de Goede <hdegoede@redhat.com>2024-09-05 16:57:36 +0200
commit56d8b784c56588cd40f98e4b1d4f6e29e3cb02b8 (patch)
tree5edd10e48440fcbb5a76bbb9b78dc1706b3d5cec /drivers/net/gtp.c
parentplatform/x86: thinkpad_acpi: Fix uninitialized symbol 's' warning (diff)
parenthwmon: (hp-wmi-sensors) Check if WMI event data exists (diff)
downloadlinux-56d8b784c56588cd40f98e4b1d4f6e29e3cb02b8.tar.gz
linux-56d8b784c56588cd40f98e4b1d4f6e29e3cb02b8.zip
Merge tag 'hwmon-for-v6.11-rc7' into review-hans
Merge "hwmon fixes for v6.11-rc7" into review-hans to bring in commit a54da9df75cd ("hwmon: (hp-wmi-sensors) Check if WMI event data exists"). This is a dependency for a set of WMI event data refactoring changes.
Diffstat (limited to 'drivers/net/gtp.c')
-rw-r--r--drivers/net/gtp.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/gtp.c b/drivers/net/gtp.c
index 427b91aca50d..2e94d10348cc 100644
--- a/drivers/net/gtp.c
+++ b/drivers/net/gtp.c
@@ -1269,6 +1269,9 @@ static netdev_tx_t gtp_dev_xmit(struct sk_buff *skb, struct net_device *dev)
if (skb_cow_head(skb, dev->needed_headroom))
goto tx_err;
+ if (!pskb_inet_may_pull(skb))
+ goto tx_err;
+
skb_reset_inner_headers(skb);
/* PDP context lookups in gtp_build_skb_*() need rcu read-side lock. */
@@ -1650,7 +1653,7 @@ static struct sock *gtp_encap_enable_socket(int fd, int type,
sock = sockfd_lookup(fd, &err);
if (!sock) {
pr_debug("gtp socket fd=%d not found\n", fd);
- return NULL;
+ return ERR_PTR(err);
}
sk = sock->sk;