From: Greg Kroah-Hartman Date: Tue, 8 Jun 2021 17:41:11 +0000 (+0200) Subject: 5.10-stable patches X-Git-Tag: v4.4.272~8 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f388a2ae253bb834c948f7ab8a6b6b741bb10303;p=thirdparty%2Fkernel%2Fstable-queue.git 5.10-stable patches added patches: i2c-qcom-geni-suspend-and-resume-the-bus-during-system_sleep_pm-ops.patch netfilter-nf_tables-missing-error-reporting-for-not-selected-expressions.patch --- diff --git a/queue-5.10/i2c-qcom-geni-suspend-and-resume-the-bus-during-system_sleep_pm-ops.patch b/queue-5.10/i2c-qcom-geni-suspend-and-resume-the-bus-during-system_sleep_pm-ops.patch new file mode 100644 index 00000000000..4c264c0ee65 --- /dev/null +++ b/queue-5.10/i2c-qcom-geni-suspend-and-resume-the-bus-during-system_sleep_pm-ops.patch @@ -0,0 +1,50 @@ +From 57648e860485de39c800a89f849fdd03c2d31d15 Mon Sep 17 00:00:00 2001 +From: Roja Rani Yarubandi +Date: Tue, 25 May 2021 18:40:51 +0530 +Subject: i2c: qcom-geni: Suspend and resume the bus during SYSTEM_SLEEP_PM ops + +From: Roja Rani Yarubandi + +commit 57648e860485de39c800a89f849fdd03c2d31d15 upstream. + +Mark bus as suspended during system suspend to block the future +transfers. Implement geni_i2c_resume_noirq() to resume the bus. + +Fixes: 37692de5d523 ("i2c: i2c-qcom-geni: Add bus driver for the Qualcomm GENI I2C controller") +Signed-off-by: Roja Rani Yarubandi +Reviewed-by: Stephen Boyd +Signed-off-by: Wolfram Sang +Signed-off-by: Greg Kroah-Hartman +--- + drivers/i2c/busses/i2c-qcom-geni.c | 12 +++++++++++- + 1 file changed, 11 insertions(+), 1 deletion(-) + +--- a/drivers/i2c/busses/i2c-qcom-geni.c ++++ b/drivers/i2c/busses/i2c-qcom-geni.c +@@ -702,6 +702,8 @@ static int __maybe_unused geni_i2c_suspe + { + struct geni_i2c_dev *gi2c = dev_get_drvdata(dev); + ++ i2c_mark_adapter_suspended(&gi2c->adap); ++ + if (!gi2c->suspended) { + geni_i2c_runtime_suspend(dev); + pm_runtime_disable(dev); +@@ -711,8 +713,16 @@ static int __maybe_unused geni_i2c_suspe + return 0; + } + ++static int __maybe_unused geni_i2c_resume_noirq(struct device *dev) ++{ ++ struct geni_i2c_dev *gi2c = dev_get_drvdata(dev); ++ ++ i2c_mark_adapter_resumed(&gi2c->adap); ++ return 0; ++} ++ + static const struct dev_pm_ops geni_i2c_pm_ops = { +- SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(geni_i2c_suspend_noirq, NULL) ++ SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(geni_i2c_suspend_noirq, geni_i2c_resume_noirq) + SET_RUNTIME_PM_OPS(geni_i2c_runtime_suspend, geni_i2c_runtime_resume, + NULL) + }; diff --git a/queue-5.10/netfilter-nf_tables-missing-error-reporting-for-not-selected-expressions.patch b/queue-5.10/netfilter-nf_tables-missing-error-reporting-for-not-selected-expressions.patch new file mode 100644 index 00000000000..0e515017524 --- /dev/null +++ b/queue-5.10/netfilter-nf_tables-missing-error-reporting-for-not-selected-expressions.patch @@ -0,0 +1,46 @@ +From c781471d67a56d7d4c113669a11ede0463b5c719 Mon Sep 17 00:00:00 2001 +From: Pablo Neira Ayuso +Date: Wed, 19 May 2021 13:32:20 +0200 +Subject: netfilter: nf_tables: missing error reporting for not selected expressions + +From: Pablo Neira Ayuso + +commit c781471d67a56d7d4c113669a11ede0463b5c719 upstream. + +Sometimes users forget to turn on nftables extensions from Kconfig that +they need. In such case, the error reporting from userspace is +misleading: + + $ sudo nft add rule x y counter + Error: Could not process rule: No such file or directory + add rule x y counter + ^^^^^^^^^^^^^^^^^^^^ + +Add missing NL_SET_BAD_ATTR() to provide a hint: + + $ nft add rule x y counter + Error: Could not process rule: No such file or directory + add rule x y counter + ^^^^^^^ + +Fixes: 83d9dcba06c5 ("netfilter: nf_tables: extended netlink error reporting for expressions") +Signed-off-by: Pablo Neira Ayuso +Signed-off-by: Greg Kroah-Hartman +--- + net/netfilter/nf_tables_api.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +--- a/net/netfilter/nf_tables_api.c ++++ b/net/netfilter/nf_tables_api.c +@@ -3263,8 +3263,10 @@ static int nf_tables_newrule(struct net + if (n == NFT_RULE_MAXEXPRS) + goto err1; + err = nf_tables_expr_parse(&ctx, tmp, &info[n]); +- if (err < 0) ++ if (err < 0) { ++ NL_SET_BAD_ATTR(extack, tmp); + goto err1; ++ } + size += info[n].ops->size; + n++; + } diff --git a/queue-5.10/series b/queue-5.10/series index 4ebffb0b359..0722ec61089 100644 --- a/queue-5.10/series +++ b/queue-5.10/series @@ -131,3 +131,5 @@ x86-kvm-teardown-pv-features-on-boot-cpu-as-well.patch x86-kvm-disable-kvmclock-on-all-cpus-on-shutdown.patch x86-kvm-disable-all-pv-features-on-crash.patch lib-lz4-explicitly-support-in-place-decompression.patch +i2c-qcom-geni-suspend-and-resume-the-bus-during-system_sleep_pm-ops.patch +netfilter-nf_tables-missing-error-reporting-for-not-selected-expressions.patch