]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
Fixes for 4.9
authorSasha Levin <sashal@kernel.org>
Mon, 30 May 2022 04:25:52 +0000 (00:25 -0400)
committerSasha Levin <sashal@kernel.org>
Mon, 30 May 2022 04:25:52 +0000 (00:25 -0400)
Signed-off-by: Sasha Levin <sashal@kernel.org>
queue-4.9/drivers-i2c-thunderx-allow-driver-to-work-with-acpi-.patch [new file with mode: 0644]
queue-4.9/net-af_key-check-encryption-module-availability-cons.patch [new file with mode: 0644]
queue-4.9/series

diff --git a/queue-4.9/drivers-i2c-thunderx-allow-driver-to-work-with-acpi-.patch b/queue-4.9/drivers-i2c-thunderx-allow-driver-to-work-with-acpi-.patch
new file mode 100644 (file)
index 0000000..9629e8c
--- /dev/null
@@ -0,0 +1,36 @@
+From fb01aed44f0a19c1a64a0fdb8136ed4ac01c8c59 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Wed, 11 May 2022 06:36:59 -0700
+Subject: drivers: i2c: thunderx: Allow driver to work with ACPI defined TWSI
+ controllers
+
+From: Piyush Malgujar <pmalgujar@marvell.com>
+
+[ Upstream commit 03a35bc856ddc09f2cc1f4701adecfbf3b464cb3 ]
+
+Due to i2c->adap.dev.fwnode not being set, ACPI_COMPANION() wasn't properly
+found for TWSI controllers.
+
+Signed-off-by: Szymon Balcerak <sbalcerak@marvell.com>
+Signed-off-by: Piyush Malgujar <pmalgujar@marvell.com>
+Signed-off-by: Wolfram Sang <wsa@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/i2c/busses/i2c-thunderx-pcidrv.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/drivers/i2c/busses/i2c-thunderx-pcidrv.c b/drivers/i2c/busses/i2c-thunderx-pcidrv.c
+index bba5b429f69c..3298483bb9b4 100644
+--- a/drivers/i2c/busses/i2c-thunderx-pcidrv.c
++++ b/drivers/i2c/busses/i2c-thunderx-pcidrv.c
+@@ -208,6 +208,7 @@ static int thunder_i2c_probe_pci(struct pci_dev *pdev,
+       i2c->adap.bus_recovery_info = &octeon_i2c_recovery_info;
+       i2c->adap.dev.parent = dev;
+       i2c->adap.dev.of_node = pdev->dev.of_node;
++      i2c->adap.dev.fwnode = dev->fwnode;
+       snprintf(i2c->adap.name, sizeof(i2c->adap.name),
+                "Cavium ThunderX i2c adapter at %s", dev_name(dev));
+       i2c_set_adapdata(&i2c->adap, i2c);
+-- 
+2.35.1
+
diff --git a/queue-4.9/net-af_key-check-encryption-module-availability-cons.patch b/queue-4.9/net-af_key-check-encryption-module-availability-cons.patch
new file mode 100644 (file)
index 0000000..a5479c9
--- /dev/null
@@ -0,0 +1,55 @@
+From 4587d4a56aa45ca3095671db55bfa1db0ed857da Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Wed, 18 May 2022 08:32:18 +0200
+Subject: net: af_key: check encryption module availability consistency
+
+From: Thomas Bartschies <thomas.bartschies@cvk.de>
+
+[ Upstream commit 015c44d7bff3f44d569716117becd570c179ca32 ]
+
+Since the recent introduction supporting the SM3 and SM4 hash algos for IPsec, the kernel
+produces invalid pfkey acquire messages, when these encryption modules are disabled. This
+happens because the availability of the algos wasn't checked in all necessary functions.
+This patch adds these checks.
+
+Signed-off-by: Thomas Bartschies <thomas.bartschies@cvk.de>
+Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ net/key/af_key.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/net/key/af_key.c b/net/key/af_key.c
+index 776f94ecbfe6..d5dc614af2f9 100644
+--- a/net/key/af_key.c
++++ b/net/key/af_key.c
+@@ -2935,7 +2935,7 @@ static int count_ah_combs(const struct xfrm_tmpl *t)
+                       break;
+               if (!aalg->pfkey_supported)
+                       continue;
+-              if (aalg_tmpl_set(t, aalg))
++              if (aalg_tmpl_set(t, aalg) && aalg->available)
+                       sz += sizeof(struct sadb_comb);
+       }
+       return sz + sizeof(struct sadb_prop);
+@@ -2953,7 +2953,7 @@ static int count_esp_combs(const struct xfrm_tmpl *t)
+               if (!ealg->pfkey_supported)
+                       continue;
+-              if (!(ealg_tmpl_set(t, ealg)))
++              if (!(ealg_tmpl_set(t, ealg) && ealg->available))
+                       continue;
+               for (k = 1; ; k++) {
+@@ -2964,7 +2964,7 @@ static int count_esp_combs(const struct xfrm_tmpl *t)
+                       if (!aalg->pfkey_supported)
+                               continue;
+-                      if (aalg_tmpl_set(t, aalg))
++                      if (aalg_tmpl_set(t, aalg) && aalg->available)
+                               sz += sizeof(struct sadb_comb);
+               }
+       }
+-- 
+2.35.1
+
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..bbc00d9a8d6f7117c8546a6ced68a003032192e0 100644 (file)
@@ -0,0 +1,2 @@
+net-af_key-check-encryption-module-availability-cons.patch
+drivers-i2c-thunderx-allow-driver-to-work-with-acpi-.patch