mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-28 17:48:58 +00:00
438e593f22
Removed because they are upstream:
generic/backport-5.15/741-v6.9-01-netfilter-flowtable-validate-pppoe-header.patch
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-5.15.y&id=d06977b9a4109f8738bb276125eb6a0b772bc433
Removed because they are upstream:
generic/backport-5.15/741-v6.9-02-netfilter-flowtable-incorrect-pppoe-tuple.patch
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-5.15.y&id=e719b52d0c56989b0f3475a03a6d64f182c85b56
Manual adapted the following patches:
generic/pending-5.15/700-netfilter-nft_flow_offload-handle-netdevice-events-f.patch
generic/pending-5.15/723-net-mt7531-ensure-all-MACs-are-powered-down-before-r.patch
generic/hack-5.15/650-netfilter-add-xt_FLOWOFFLOAD-target.patch
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 84d0b0b925
)
30 lines
1003 B
Diff
30 lines
1003 B
Diff
From f8740e21bb2a6eb11da683901e22fbb6fea80dc8 Mon Sep 17 00:00:00 2001
|
|
From: Maxime Ripard <maxime@cerno.tech>
|
|
Date: Tue, 5 Apr 2022 15:20:27 +0200
|
|
Subject: [PATCH] clk: Test the clock pointer in clk_hw_get_name()
|
|
|
|
Unlike __clk_get_name(), clk_hw_get_name() doesn't test wether passed
|
|
clk_hw pointer is NULL or not and dereferences it directly. This can
|
|
then lead to NULL pointer dereference.
|
|
|
|
Let's make sure the pointer isn't NULL before dereferencing it.
|
|
|
|
Tested-by: Alexander Stein <alexander.stein@ew.tq-group.com> # imx8mp
|
|
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com> # exynos4210, meson g12b
|
|
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
|
|
---
|
|
drivers/clk/clk.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
--- a/drivers/clk/clk.c
|
|
+++ b/drivers/clk/clk.c
|
|
@@ -368,7 +368,7 @@ EXPORT_SYMBOL_GPL(__clk_get_name);
|
|
|
|
const char *clk_hw_get_name(const struct clk_hw *hw)
|
|
{
|
|
- return hw->core->name;
|
|
+ return !hw ? NULL : hw->core->name;
|
|
}
|
|
EXPORT_SYMBOL_GPL(clk_hw_get_name);
|
|
|