mirror of
https://github.com/openwrt/openwrt.git
synced 2025-01-01 11:36:49 +00:00
b389c3d66f
Manually adapted: bcm27xx/patches-5.15/950-0166-xhci-Use-more-event-ring-segment-table-entries.patch I replaced it with the version from main branch which applies more easily bcm27xx/patches-5.15/950-0600-xhci-quirks-add-link-TRB-quirk-for-VL805.patch bcm27xx/patches-5.15/950-0605-xhci-refactor-out-TRBS_PER_SEGMENT-define-in-runtime.patch bcm27xx/patches-5.15/950-0606-usb-xhci-add-VLI_TRB_CACHE_BUG-quirk.patch bcm27xx/patches-5.15/950-0717-usb-xhci-add-a-quirk-for-Superspeed-bulk-OUT-transfe.patch bcm53xx/patches-5.15/180-usb-xhci-add-support-for-performing-fake-doorbell.patch generic/hack-5.15/645-netfilter-connmark-introduce-set-dscpmark.patch Added patch: generic/backport-5.15/777-netfilter-xtables-fix-typo-causing-some-targets-to-not-load-on-IPv6.patch This fixes a bug intoduced in this version. Adapt kernel configuration for newly added option CONFIG_PROC_MEM_ALWAYS_FORCE. Link: https://github.com/openwrt/openwrt/pull/16882 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
31 lines
1.0 KiB
Diff
31 lines
1.0 KiB
Diff
From 2203718c2f59ffdd6c78d54e5add594aebb4461e Mon Sep 17 00:00:00 2001
|
|
From: Georgi Valkov <gvalkov@gmail.com>
|
|
Date: Wed, 7 Jun 2023 15:56:59 +0200
|
|
Subject: [PATCH 1/4] usbnet: ipheth: fix risk of NULL pointer deallocation
|
|
|
|
The cleanup precedure in ipheth_probe will attempt to free a
|
|
NULL pointer in dev->ctrl_buf if the memory allocation for
|
|
this buffer is not successful. While kfree ignores NULL pointers,
|
|
and the existing code is safe, it is a better design to rearrange
|
|
the goto labels and avoid this.
|
|
|
|
Signed-off-by: Georgi Valkov <gvalkov@gmail.com>
|
|
Signed-off-by: Foster Snowhill <forst@pen.gy>
|
|
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
---
|
|
drivers/net/usb/ipheth.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
--- a/drivers/net/usb/ipheth.c
|
|
+++ b/drivers/net/usb/ipheth.c
|
|
@@ -511,8 +511,8 @@ err_register_netdev:
|
|
ipheth_free_urbs(dev);
|
|
err_alloc_urbs:
|
|
err_get_macaddr:
|
|
-err_alloc_ctrl_buf:
|
|
kfree(dev->ctrl_buf);
|
|
+err_alloc_ctrl_buf:
|
|
err_endpoints:
|
|
free_netdev(netdev);
|
|
return retval;
|