From: Sasha Levin Date: Mon, 30 May 2022 04:25:52 +0000 (-0400) Subject: Fixes for 4.9 X-Git-Tag: v4.9.317~44^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=08046f2e7faed0377a07eb7a75b8949654829230;p=thirdparty%2Fkernel%2Fstable-queue.git Fixes for 4.9 Signed-off-by: Sasha Levin --- 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 index 00000000000..9629e8c8832 --- /dev/null +++ b/queue-4.9/drivers-i2c-thunderx-allow-driver-to-work-with-acpi-.patch @@ -0,0 +1,36 @@ +From fb01aed44f0a19c1a64a0fdb8136ed4ac01c8c59 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +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 + +[ 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 +Signed-off-by: Piyush Malgujar +Signed-off-by: Wolfram Sang +Signed-off-by: Sasha Levin +--- + 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 index 00000000000..a5479c931d1 --- /dev/null +++ b/queue-4.9/net-af_key-check-encryption-module-availability-cons.patch @@ -0,0 +1,55 @@ +From 4587d4a56aa45ca3095671db55bfa1db0ed857da Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Wed, 18 May 2022 08:32:18 +0200 +Subject: net: af_key: check encryption module availability consistency + +From: Thomas Bartschies + +[ 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 +Signed-off-by: Steffen Klassert +Signed-off-by: Sasha Levin +--- + 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 + diff --git a/queue-4.9/series b/queue-4.9/series index e69de29bb2d..bbc00d9a8d6 100644 --- a/queue-4.9/series +++ b/queue-4.9/series @@ -0,0 +1,2 @@ +net-af_key-check-encryption-module-availability-cons.patch +drivers-i2c-thunderx-allow-driver-to-work-with-acpi-.patch