From 6d7bf9d25d88e44a2eedea76b5cda821dc01da9d Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 7 Jan 2020 15:08:01 +0100 Subject: [PATCH] 4.14-stable patches added patches: nfsd4-fix-up-replay_matches_cache.patch platform-x86-pmc_atom-add-siemens-connect-x300-to-critclk_systems-dmi-table.patch pm-devfreq-check-null-governor-in-available_governors_show.patch scsi-qla2xxx-drop-superfluous-init_work-of-del_work.patch xfs-don-t-check-for-ag-deadlock-for-realtime-files-in-bunmapi.patch --- .../nfsd4-fix-up-replay_matches_cache.patch | 52 +++++++++++++++++++ ...ct-x300-to-critclk_systems-dmi-table.patch | 40 ++++++++++++++ ...governor-in-available_governors_show.patch | 34 ++++++++++++ ...op-superfluous-init_work-of-del_work.patch | 38 ++++++++++++++ queue-4.14/series | 5 ++ ...adlock-for-realtime-files-in-bunmapi.patch | 40 ++++++++++++++ 6 files changed, 209 insertions(+) create mode 100644 queue-4.14/nfsd4-fix-up-replay_matches_cache.patch create mode 100644 queue-4.14/platform-x86-pmc_atom-add-siemens-connect-x300-to-critclk_systems-dmi-table.patch create mode 100644 queue-4.14/pm-devfreq-check-null-governor-in-available_governors_show.patch create mode 100644 queue-4.14/scsi-qla2xxx-drop-superfluous-init_work-of-del_work.patch create mode 100644 queue-4.14/xfs-don-t-check-for-ag-deadlock-for-realtime-files-in-bunmapi.patch diff --git a/queue-4.14/nfsd4-fix-up-replay_matches_cache.patch b/queue-4.14/nfsd4-fix-up-replay_matches_cache.patch new file mode 100644 index 00000000000..e32890ae748 --- /dev/null +++ b/queue-4.14/nfsd4-fix-up-replay_matches_cache.patch @@ -0,0 +1,52 @@ +From 6e73e92b155c868ff7fce9d108839668caf1d9be Mon Sep 17 00:00:00 2001 +From: Scott Mayhew +Date: Wed, 9 Oct 2019 15:11:37 -0400 +Subject: nfsd4: fix up replay_matches_cache() + +From: Scott Mayhew + +commit 6e73e92b155c868ff7fce9d108839668caf1d9be upstream. + +When running an nfs stress test, I see quite a few cached replies that +don't match up with the actual request. The first comment in +replay_matches_cache() makes sense, but the code doesn't seem to +match... fix it. + +This isn't exactly a bugfix, as the server isn't required to catch every +case of a false retry. So, we may as well do this, but if this is +fixing a problem then that suggests there's a client bug. + +Fixes: 53da6a53e1d4 ("nfsd4: catch some false session retries") +Signed-off-by: Scott Mayhew +Signed-off-by: J. Bruce Fields +Signed-off-by: Greg Kroah-Hartman + +--- + fs/nfsd/nfs4state.c | 15 ++++++++++----- + 1 file changed, 10 insertions(+), 5 deletions(-) + +--- a/fs/nfsd/nfs4state.c ++++ b/fs/nfsd/nfs4state.c +@@ -3058,12 +3058,17 @@ static bool replay_matches_cache(struct + (bool)seq->cachethis) + return false; + /* +- * If there's an error than the reply can have fewer ops than +- * the call. But if we cached a reply with *more* ops than the +- * call you're sending us now, then this new call is clearly not +- * really a replay of the old one: ++ * If there's an error then the reply can have fewer ops than ++ * the call. + */ +- if (slot->sl_opcnt < argp->opcnt) ++ if (slot->sl_opcnt < argp->opcnt && !slot->sl_status) ++ return false; ++ /* ++ * But if we cached a reply with *more* ops than the call you're ++ * sending us now, then this new call is clearly not really a ++ * replay of the old one: ++ */ ++ if (slot->sl_opcnt > argp->opcnt) + return false; + /* This is the only check explicitly called by spec: */ + if (!same_creds(&rqstp->rq_cred, &slot->sl_cred)) diff --git a/queue-4.14/platform-x86-pmc_atom-add-siemens-connect-x300-to-critclk_systems-dmi-table.patch b/queue-4.14/platform-x86-pmc_atom-add-siemens-connect-x300-to-critclk_systems-dmi-table.patch new file mode 100644 index 00000000000..e4ad0d00928 --- /dev/null +++ b/queue-4.14/platform-x86-pmc_atom-add-siemens-connect-x300-to-critclk_systems-dmi-table.patch @@ -0,0 +1,40 @@ +From e8796c6c69d129420ee94a1906b18d86b84644d4 Mon Sep 17 00:00:00 2001 +From: Michael Haener +Date: Fri, 29 Nov 2019 10:16:49 +0100 +Subject: platform/x86: pmc_atom: Add Siemens CONNECT X300 to critclk_systems DMI table + +From: Michael Haener + +commit e8796c6c69d129420ee94a1906b18d86b84644d4 upstream. + +The CONNECT X300 uses the PMC clock for on-board components and gets +stuck during boot if the clock is disabled. Therefore, add this +device to the critical systems list. +Tested on CONNECT X300. + +Fixes: 648e921888ad ("clk: x86: Stop marking clocks as CLK_IS_CRITICAL") +Signed-off-by: Michael Haener +Signed-off-by: Andy Shevchenko +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/platform/x86/pmc_atom.c | 8 ++++++++ + 1 file changed, 8 insertions(+) + +--- a/drivers/platform/x86/pmc_atom.c ++++ b/drivers/platform/x86/pmc_atom.c +@@ -482,6 +482,14 @@ static const struct dmi_system_id critcl + DMI_MATCH(DMI_PRODUCT_VERSION, "6ES7647-8B"), + }, + }, ++ { ++ .ident = "CONNECT X300", ++ .matches = { ++ DMI_MATCH(DMI_SYS_VENDOR, "SIEMENS AG"), ++ DMI_MATCH(DMI_PRODUCT_VERSION, "A5E45074588"), ++ }, ++ }, ++ + { /*sentinel*/ } + }; + diff --git a/queue-4.14/pm-devfreq-check-null-governor-in-available_governors_show.patch b/queue-4.14/pm-devfreq-check-null-governor-in-available_governors_show.patch new file mode 100644 index 00000000000..6ce544d62e5 --- /dev/null +++ b/queue-4.14/pm-devfreq-check-null-governor-in-available_governors_show.patch @@ -0,0 +1,34 @@ +From d68adc8f85cd757bd33c8d7b2660ad6f16f7f3dc Mon Sep 17 00:00:00 2001 +From: Leonard Crestez +Date: Tue, 24 Sep 2019 10:26:53 +0300 +Subject: PM / devfreq: Check NULL governor in available_governors_show + +From: Leonard Crestez + +commit d68adc8f85cd757bd33c8d7b2660ad6f16f7f3dc upstream. + +The governor is initialized after sysfs attributes become visible so in +theory the governor field can be NULL here. + +Fixes: bcf23c79c4e46 ("PM / devfreq: Fix available_governor sysfs") +Signed-off-by: Leonard Crestez +Reviewed-by: Matthias Kaehlcke +Reviewed-by: Chanwoo Choi +Signed-off-by: Chanwoo Choi +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/devfreq/devfreq.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/devfreq/devfreq.c ++++ b/drivers/devfreq/devfreq.c +@@ -974,7 +974,7 @@ static ssize_t available_governors_show( + * The devfreq with immutable governor (e.g., passive) shows + * only own governor. + */ +- if (df->governor->immutable) { ++ if (df->governor && df->governor->immutable) { + count = scnprintf(&buf[count], DEVFREQ_NAME_LEN, + "%s ", df->governor_name); + /* diff --git a/queue-4.14/scsi-qla2xxx-drop-superfluous-init_work-of-del_work.patch b/queue-4.14/scsi-qla2xxx-drop-superfluous-init_work-of-del_work.patch new file mode 100644 index 00000000000..db640bfc9af --- /dev/null +++ b/queue-4.14/scsi-qla2xxx-drop-superfluous-init_work-of-del_work.patch @@ -0,0 +1,38 @@ +From 600954e6f2df695434887dfc6a99a098859990cf Mon Sep 17 00:00:00 2001 +From: Roman Bolshakov +Date: Mon, 25 Nov 2019 19:56:53 +0300 +Subject: scsi: qla2xxx: Drop superfluous INIT_WORK of del_work + +From: Roman Bolshakov + +commit 600954e6f2df695434887dfc6a99a098859990cf upstream. + +del_work is already initialized inside qla2x00_alloc_fcport, there's no +need to overwrite it. Indeed, it might prevent complete traversal of +workqueue list. + +Fixes: a01c77d2cbc45 ("scsi: qla2xxx: Move session delete to driver work queue") +Cc: Quinn Tran +Link: https://lore.kernel.org/r/20191125165702.1013-5-r.bolshakov@yadro.com +Acked-by: Himanshu Madhani +Reviewed-by: Hannes Reinecke +Tested-by: Hannes Reinecke +Reviewed-by: Bart Van Assche +Signed-off-by: Roman Bolshakov +Signed-off-by: Martin K. Petersen +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/scsi/qla2xxx/qla_target.c | 1 - + 1 file changed, 1 deletion(-) + +--- a/drivers/scsi/qla2xxx/qla_target.c ++++ b/drivers/scsi/qla2xxx/qla_target.c +@@ -1210,7 +1210,6 @@ void qlt_schedule_sess_for_deletion(stru + "Scheduling sess %p for deletion %8phC\n", + sess, sess->port_name); + +- INIT_WORK(&sess->del_work, qla24xx_delete_sess_fn); + queue_work(sess->vha->hw->wq, &sess->del_work); + } + diff --git a/queue-4.14/series b/queue-4.14/series index be921c4d792..4415515684c 100644 --- a/queue-4.14/series +++ b/queue-4.14/series @@ -43,3 +43,8 @@ alsa-firewire-motu-correct-a-typo-in-the-clock-proc-string.patch exit-panic-before-exit_mm-on-global-init-exit.patch ftrace-avoid-potential-division-by-zero-in-function-profiler.patch arm64-revert-support-for-execute-only-user-mappings.patch +pm-devfreq-check-null-governor-in-available_governors_show.patch +nfsd4-fix-up-replay_matches_cache.patch +scsi-qla2xxx-drop-superfluous-init_work-of-del_work.patch +xfs-don-t-check-for-ag-deadlock-for-realtime-files-in-bunmapi.patch +platform-x86-pmc_atom-add-siemens-connect-x300-to-critclk_systems-dmi-table.patch diff --git a/queue-4.14/xfs-don-t-check-for-ag-deadlock-for-realtime-files-in-bunmapi.patch b/queue-4.14/xfs-don-t-check-for-ag-deadlock-for-realtime-files-in-bunmapi.patch new file mode 100644 index 00000000000..da3cc56326a --- /dev/null +++ b/queue-4.14/xfs-don-t-check-for-ag-deadlock-for-realtime-files-in-bunmapi.patch @@ -0,0 +1,40 @@ +From 69ffe5960df16938bccfe1b65382af0b3de51265 Mon Sep 17 00:00:00 2001 +From: Omar Sandoval +Date: Tue, 26 Nov 2019 16:58:08 -0800 +Subject: xfs: don't check for AG deadlock for realtime files in bunmapi + +From: Omar Sandoval + +commit 69ffe5960df16938bccfe1b65382af0b3de51265 upstream. + +Commit 5b094d6dac04 ("xfs: fix multi-AG deadlock in xfs_bunmapi") added +a check in __xfs_bunmapi() to stop early if we would touch multiple AGs +in the wrong order. However, this check isn't applicable for realtime +files. In most cases, it just makes us do unnecessary commits. However, +without the fix from the previous commit ("xfs: fix realtime file data +space leak"), if the last and second-to-last extents also happen to have +different "AG numbers", then the break actually causes __xfs_bunmapi() +to return without making any progress, which sends +xfs_itruncate_extents_flags() into an infinite loop. + +Fixes: 5b094d6dac04 ("xfs: fix multi-AG deadlock in xfs_bunmapi") +Signed-off-by: Omar Sandoval +Reviewed-by: Darrick J. Wong +Signed-off-by: Darrick J. Wong +Signed-off-by: Greg Kroah-Hartman + +--- + fs/xfs/libxfs/xfs_bmap.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/fs/xfs/libxfs/xfs_bmap.c ++++ b/fs/xfs/libxfs/xfs_bmap.c +@@ -5556,7 +5556,7 @@ __xfs_bunmapi( + * Make sure we don't touch multiple AGF headers out of order + * in a single transaction, as that could cause AB-BA deadlocks. + */ +- if (!wasdel) { ++ if (!wasdel && !isrt) { + agno = XFS_FSB_TO_AGNO(mp, del.br_startblock); + if (prev_agno != NULLAGNUMBER && prev_agno > agno) + break; -- 2.47.3