From: Sasha Levin Date: Sun, 24 May 2020 13:51:25 +0000 (-0400) Subject: Fixes for 4.14 X-Git-Tag: v4.4.225~30 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d362b2b59aa412a730033bd13627b4b49a025539;p=thirdparty%2Fkernel%2Fstable-queue.git Fixes for 4.14 Signed-off-by: Sasha Levin --- diff --git a/queue-4.14/cxgb4-cxgb4vf-fix-mac_hlist-initialization-and-free.patch b/queue-4.14/cxgb4-cxgb4vf-fix-mac_hlist-initialization-and-free.patch new file mode 100644 index 00000000000..2d4449ad30d --- /dev/null +++ b/queue-4.14/cxgb4-cxgb4vf-fix-mac_hlist-initialization-and-free.patch @@ -0,0 +1,116 @@ +From 6e7d18d866159baac28b8b938bd3baef8c02fc99 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Tue, 20 Nov 2018 12:11:39 +0530 +Subject: cxgb4/cxgb4vf: Fix mac_hlist initialization and free + +From: Arjun Vynipadath + +[ Upstream commit b539ea60f5043b9acd7562f04fa2117f18776cbb ] + +Null pointer dereference seen when cxgb4vf driver is unloaded +without bringing up any interfaces, moving mac_hlist initialization +to driver probe and free the mac_hlist in remove to fix the issue. + +Fixes: 24357e06ba51 ("cxgb4vf: fix memleak in mac_hlist initialization") +Signed-off-by: Arjun Vynipadath +Signed-off-by: Casey Leedom +Signed-off-by: Ganesh Goudar +Signed-off-by: David S. Miller +Signed-off-by: Sasha Levin +--- + .../net/ethernet/chelsio/cxgb4/cxgb4_main.c | 19 ++++++++++--------- + .../ethernet/chelsio/cxgb4vf/cxgb4vf_main.c | 6 +++--- + 2 files changed, 13 insertions(+), 12 deletions(-) + +diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c +index 9d1438c3c3ca..6eb65b870da7 100644 +--- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c ++++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c +@@ -2241,8 +2241,6 @@ static int cxgb_up(struct adapter *adap) + #if IS_ENABLED(CONFIG_IPV6) + update_clip(adap); + #endif +- /* Initialize hash mac addr list*/ +- INIT_LIST_HEAD(&adap->mac_hlist); + return err; + + irq_err: +@@ -2256,8 +2254,6 @@ static int cxgb_up(struct adapter *adap) + + static void cxgb_down(struct adapter *adapter) + { +- struct hash_mac_addr *entry, *tmp; +- + cancel_work_sync(&adapter->tid_release_task); + cancel_work_sync(&adapter->db_full_task); + cancel_work_sync(&adapter->db_drop_task); +@@ -2267,11 +2263,6 @@ static void cxgb_down(struct adapter *adapter) + t4_sge_stop(adapter); + t4_free_sge_resources(adapter); + +- list_for_each_entry_safe(entry, tmp, &adapter->mac_hlist, list) { +- list_del(&entry->list); +- kfree(entry); +- } +- + adapter->flags &= ~FULL_INIT_DONE; + } + +@@ -4970,6 +4961,9 @@ static int init_one(struct pci_dev *pdev, const struct pci_device_id *ent) + (is_t5(adapter->params.chip) ? STATMODE_V(0) : + T6_STATMODE_V(0))); + ++ /* Initialize hash mac addr list */ ++ INIT_LIST_HEAD(&adapter->mac_hlist); ++ + for_each_port(adapter, i) { + netdev = alloc_etherdev_mq(sizeof(struct port_info), + MAX_ETH_QSETS); +@@ -5260,6 +5254,7 @@ static int init_one(struct pci_dev *pdev, const struct pci_device_id *ent) + static void remove_one(struct pci_dev *pdev) + { + struct adapter *adapter = pci_get_drvdata(pdev); ++ struct hash_mac_addr *entry, *tmp; + + if (!adapter) { + pci_release_regions(pdev); +@@ -5303,6 +5298,12 @@ static void remove_one(struct pci_dev *pdev) + if (adapter->num_uld || adapter->num_ofld_uld) + t4_uld_mem_free(adapter); + free_some_resources(adapter); ++ list_for_each_entry_safe(entry, tmp, &adapter->mac_hlist, ++ list) { ++ list_del(&entry->list); ++ kfree(entry); ++ } ++ + #if IS_ENABLED(CONFIG_IPV6) + t4_cleanup_clip_tbl(adapter); + #endif +diff --git a/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c b/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c +index 26ba18ea08c6..fa116f0a107d 100644 +--- a/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c ++++ b/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c +@@ -715,9 +715,6 @@ static int adapter_up(struct adapter *adapter) + if (adapter->flags & USING_MSIX) + name_msix_vecs(adapter); + +- /* Initialize hash mac addr list*/ +- INIT_LIST_HEAD(&adapter->mac_hlist); +- + adapter->flags |= FULL_INIT_DONE; + } + +@@ -2936,6 +2933,9 @@ static int cxgb4vf_pci_probe(struct pci_dev *pdev, + if (err) + goto err_unmap_bar; + ++ /* Initialize hash mac addr list */ ++ INIT_LIST_HEAD(&adapter->mac_hlist); ++ + /* + * Allocate our "adapter ports" and stitch everything together. + */ +-- +2.25.1 + diff --git a/queue-4.14/cxgb4-free-mac_hlist-properly.patch b/queue-4.14/cxgb4-free-mac_hlist-properly.patch new file mode 100644 index 00000000000..70c65dadb46 --- /dev/null +++ b/queue-4.14/cxgb4-free-mac_hlist-properly.patch @@ -0,0 +1,49 @@ +From f24a834e0b8890c6577476ec1d975ef61a48883f Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Fri, 9 Nov 2018 14:50:25 +0530 +Subject: cxgb4: free mac_hlist properly + +From: Arjun Vynipadath + +[ Upstream commit 2a8d84bf513823ba398f4b2dec41b8decf4041af ] + +The locally maintained list for tracking hash mac table was +not freed during driver remove. + +Signed-off-by: Arjun Vynipadath +Signed-off-by: Ganesh Goudar +Signed-off-by: David S. Miller +Signed-off-by: Sasha Levin +--- + drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c +index 0e13989608f1..9d1438c3c3ca 100644 +--- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c ++++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c +@@ -2256,6 +2256,8 @@ static int cxgb_up(struct adapter *adap) + + static void cxgb_down(struct adapter *adapter) + { ++ struct hash_mac_addr *entry, *tmp; ++ + cancel_work_sync(&adapter->tid_release_task); + cancel_work_sync(&adapter->db_full_task); + cancel_work_sync(&adapter->db_drop_task); +@@ -2264,6 +2266,12 @@ static void cxgb_down(struct adapter *adapter) + + t4_sge_stop(adapter); + t4_free_sge_resources(adapter); ++ ++ list_for_each_entry_safe(entry, tmp, &adapter->mac_hlist, list) { ++ list_del(&entry->list); ++ kfree(entry); ++ } ++ + adapter->flags &= ~FULL_INIT_DONE; + } + +-- +2.25.1 + diff --git a/queue-4.14/edac-ghes-use-cper-module-handles-to-locate-dimms.patch b/queue-4.14/edac-ghes-use-cper-module-handles-to-locate-dimms.patch new file mode 100644 index 00000000000..d5ec36f0106 --- /dev/null +++ b/queue-4.14/edac-ghes-use-cper-module-handles-to-locate-dimms.patch @@ -0,0 +1,104 @@ +From e810a46f1f7a2d9b7a7fc9a09d691716e60e4ab6 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Wed, 19 Sep 2018 01:59:00 +0000 +Subject: EDAC, ghes: Use CPER module handles to locate DIMMs + +From: Fan Wu + +[ Upstream commit c798c88f3962ddff89c7aa818986caeecd46ab4c ] + +Use SMBIOS module handle type 17, on platforms which provide valid +ones, to locate the corresponding DIMM and thus have per-DIMM error +counter updates. + +Signed-off-by: Fan Wu +[ Massage commit message. ] +Signed-off-by: Borislav Petkov +Reviewed-by: Tyler Baicar +Reviewed-by: James Morse +Tested-by: Toshi Kani +Cc: Mauro Carvalho Chehab +Cc: baicar.tyler@gmail.com +Cc: john.garry@huawei.com +Cc: linux-arm-kernel@lists.infradead.org +Cc: linux-edac +Cc: shiju.jose@huawei.com +Cc: tanxiaofei@huawei.com +Cc: wanghuiqiang@huawei.com +Link: http://lkml.kernel.org/r/1537322340-1860-1-git-send-email-wufan@codeaurora.org +Signed-off-by: Sasha Levin +--- + drivers/edac/ghes_edac.c | 23 +++++++++++++++++++++++ + include/linux/edac.h | 2 ++ + 2 files changed, 25 insertions(+) + +diff --git a/drivers/edac/ghes_edac.c b/drivers/edac/ghes_edac.c +index acae39278669..440cb01304bc 100644 +--- a/drivers/edac/ghes_edac.c ++++ b/drivers/edac/ghes_edac.c +@@ -72,6 +72,18 @@ static void ghes_edac_count_dimms(const struct dmi_header *dh, void *arg) + (*num_dimm)++; + } + ++static int get_dimm_smbios_index(u16 handle) ++{ ++ struct mem_ctl_info *mci = ghes_pvt->mci; ++ int i; ++ ++ for (i = 0; i < mci->tot_dimms; i++) { ++ if (mci->dimms[i]->smbios_handle == handle) ++ return i; ++ } ++ return -1; ++} ++ + static void ghes_edac_dmidecode(const struct dmi_header *dh, void *arg) + { + struct ghes_edac_dimm_fill *dimm_fill = arg; +@@ -159,6 +171,8 @@ static void ghes_edac_dmidecode(const struct dmi_header *dh, void *arg) + entry->total_width, entry->data_width); + } + ++ dimm->smbios_handle = entry->handle; ++ + dimm_fill->count++; + } + } +@@ -305,12 +319,21 @@ void ghes_edac_report_mem_error(struct ghes *ghes, int sev, + p += sprintf(p, "bit_pos:%d ", mem_err->bit_pos); + if (mem_err->validation_bits & CPER_MEM_VALID_MODULE_HANDLE) { + const char *bank = NULL, *device = NULL; ++ int index = -1; ++ + dmi_memdev_name(mem_err->mem_dev_handle, &bank, &device); + if (bank != NULL && device != NULL) + p += sprintf(p, "DIMM location:%s %s ", bank, device); + else + p += sprintf(p, "DIMM DMI handle: 0x%.4x ", + mem_err->mem_dev_handle); ++ ++ index = get_dimm_smbios_index(mem_err->mem_dev_handle); ++ if (index >= 0) { ++ e->top_layer = index; ++ e->enable_per_layer_report = true; ++ } ++ + } + if (p > e->location) + *(p - 1) = '\0'; +diff --git a/include/linux/edac.h b/include/linux/edac.h +index 90f72336aea6..3a3b1cc34218 100644 +--- a/include/linux/edac.h ++++ b/include/linux/edac.h +@@ -449,6 +449,8 @@ struct dimm_info { + u32 nr_pages; /* number of pages on this dimm */ + + unsigned csrow, cschannel; /* Points to the old API data */ ++ ++ u16 smbios_handle; /* Handle for SMBIOS type 17 */ + }; + + /** +-- +2.25.1 + diff --git a/queue-4.14/libnvdimm-btt-fix-lba-masking-during-free-list-popul.patch b/queue-4.14/libnvdimm-btt-fix-lba-masking-during-free-list-popul.patch new file mode 100644 index 00000000000..d38aec613f0 --- /dev/null +++ b/queue-4.14/libnvdimm-btt-fix-lba-masking-during-free-list-popul.patch @@ -0,0 +1,153 @@ +From 87b43b63fdd77efb1020c6f871957bbdc635f933 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Wed, 27 Feb 2019 17:06:27 -0700 +Subject: libnvdimm/btt: Fix LBA masking during 'free list' population + +From: Vishal Verma + +[ Upstream commit 9dedc73a4658ebcc0c9b58c3cb84e9ac80122213 ] + +The Linux BTT implementation assumes that log entries will never have +the 'zero' flag set, and indeed it never sets that flag for log entries +itself. + +However, the UEFI spec is ambiguous on the exact format of the LBA field +of a log entry, specifically as to whether it should include the +additional flag bits or not. While a zero bit doesn't make sense in the +context of a log entry, other BTT implementations might still have it set. + +If an implementation does happen to have it set, we would happily read +it in as the next block to write to for writes. Since a high bit is set, +it pushes the block number out of the range of an 'arena', and we fail +such a write with an EIO. + +Follow the robustness principle, and tolerate such implementations by +stripping out the zero flag when populating the free list during +initialization. Additionally, use the same stripped out entries for +detection of incomplete writes and map restoration that happens at this +stage. + +Add a sysfs file 'log_zero_flags' that indicates the ability to accept +such a layout to userspace applications. This enables 'ndctl +check-namespace' to recognize whether the kernel is able to handle zero +flags, or whether it should attempt a fix-up under the --repair option. + +Cc: Dan Williams +Reported-by: Dexuan Cui +Reported-by: Pedro d'Aquino Filocre F S Barbuda +Tested-by: Dexuan Cui +Signed-off-by: Vishal Verma +Signed-off-by: Dan Williams +Signed-off-by: Sasha Levin +--- + drivers/nvdimm/btt.c | 25 +++++++++++++++++++------ + drivers/nvdimm/btt.h | 2 ++ + drivers/nvdimm/btt_devs.c | 8 ++++++++ + 3 files changed, 29 insertions(+), 6 deletions(-) + +diff --git a/drivers/nvdimm/btt.c b/drivers/nvdimm/btt.c +index 61e519f1d768..c46b7e1b0132 100644 +--- a/drivers/nvdimm/btt.c ++++ b/drivers/nvdimm/btt.c +@@ -541,8 +541,8 @@ static int arena_clear_freelist_error(struct arena_info *arena, u32 lane) + static int btt_freelist_init(struct arena_info *arena) + { + int new, ret; +- u32 i, map_entry; + struct log_entry log_new; ++ u32 i, map_entry, log_oldmap, log_newmap; + + arena->freelist = kcalloc(arena->nfree, sizeof(struct free_entry), + GFP_KERNEL); +@@ -554,16 +554,22 @@ static int btt_freelist_init(struct arena_info *arena) + if (new < 0) + return new; + ++ /* old and new map entries with any flags stripped out */ ++ log_oldmap = ent_lba(le32_to_cpu(log_new.old_map)); ++ log_newmap = ent_lba(le32_to_cpu(log_new.new_map)); ++ + /* sub points to the next one to be overwritten */ + arena->freelist[i].sub = 1 - new; + arena->freelist[i].seq = nd_inc_seq(le32_to_cpu(log_new.seq)); +- arena->freelist[i].block = le32_to_cpu(log_new.old_map); ++ arena->freelist[i].block = log_oldmap; + + /* + * FIXME: if error clearing fails during init, we want to make + * the BTT read-only + */ +- if (ent_e_flag(log_new.old_map)) { ++ if (ent_e_flag(log_new.old_map) && ++ !ent_normal(log_new.old_map)) { ++ arena->freelist[i].has_err = 1; + ret = arena_clear_freelist_error(arena, i); + if (ret) + dev_err_ratelimited(to_dev(arena), +@@ -571,7 +577,7 @@ static int btt_freelist_init(struct arena_info *arena) + } + + /* This implies a newly created or untouched flog entry */ +- if (log_new.old_map == log_new.new_map) ++ if (log_oldmap == log_newmap) + continue; + + /* Check if map recovery is needed */ +@@ -579,8 +585,15 @@ static int btt_freelist_init(struct arena_info *arena) + NULL, NULL, 0); + if (ret) + return ret; +- if ((le32_to_cpu(log_new.new_map) != map_entry) && +- (le32_to_cpu(log_new.old_map) == map_entry)) { ++ ++ /* ++ * The map_entry from btt_read_map is stripped of any flag bits, ++ * so use the stripped out versions from the log as well for ++ * testing whether recovery is needed. For restoration, use the ++ * 'raw' version of the log entries as that captured what we ++ * were going to write originally. ++ */ ++ if ((log_newmap != map_entry) && (log_oldmap == map_entry)) { + /* + * Last transaction wrote the flog, but wasn't able + * to complete the map write. So fix up the map. +diff --git a/drivers/nvdimm/btt.h b/drivers/nvdimm/btt.h +index 2609683c4167..c3e6a5da2ec7 100644 +--- a/drivers/nvdimm/btt.h ++++ b/drivers/nvdimm/btt.h +@@ -44,6 +44,8 @@ + #define ent_e_flag(ent) (!!(ent & MAP_ERR_MASK)) + #define ent_z_flag(ent) (!!(ent & MAP_TRIM_MASK)) + #define set_e_flag(ent) (ent |= MAP_ERR_MASK) ++/* 'normal' is both e and z flags set */ ++#define ent_normal(ent) (ent_e_flag(ent) && ent_z_flag(ent)) + + enum btt_init_state { + INIT_UNCHECKED = 0, +diff --git a/drivers/nvdimm/btt_devs.c b/drivers/nvdimm/btt_devs.c +index e610dd890263..76a74e292fd7 100644 +--- a/drivers/nvdimm/btt_devs.c ++++ b/drivers/nvdimm/btt_devs.c +@@ -159,11 +159,19 @@ static ssize_t size_show(struct device *dev, + } + static DEVICE_ATTR_RO(size); + ++static ssize_t log_zero_flags_show(struct device *dev, ++ struct device_attribute *attr, char *buf) ++{ ++ return sprintf(buf, "Y\n"); ++} ++static DEVICE_ATTR_RO(log_zero_flags); ++ + static struct attribute *nd_btt_attributes[] = { + &dev_attr_sector_size.attr, + &dev_attr_namespace.attr, + &dev_attr_uuid.attr, + &dev_attr_size.attr, ++ &dev_attr_log_zero_flags.attr, + NULL, + }; + +-- +2.25.1 + diff --git a/queue-4.14/libnvdimm-btt-remove-unnecessary-code-in-btt_freelis.patch b/queue-4.14/libnvdimm-btt-remove-unnecessary-code-in-btt_freelis.patch new file mode 100644 index 00000000000..8e15566ffa3 --- /dev/null +++ b/queue-4.14/libnvdimm-btt-remove-unnecessary-code-in-btt_freelis.patch @@ -0,0 +1,51 @@ +From caabb7ad6ac4b36332ce447b2c7d2b6f29c5bdbe Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Wed, 27 Feb 2019 17:06:26 -0700 +Subject: libnvdimm/btt: Remove unnecessary code in btt_freelist_init + +From: Vishal Verma + +[ Upstream commit 2f8c9011151337d0bc106693f272f9bddbccfab2 ] + +We call btt_log_read() twice, once to get the 'old' log entry, and again +to get the 'new' entry. However, we have no use for the 'old' entry, so +remove it. + +Cc: Dan Williams +Signed-off-by: Vishal Verma +Signed-off-by: Dan Williams +Signed-off-by: Sasha Levin +--- + drivers/nvdimm/btt.c | 8 ++------ + 1 file changed, 2 insertions(+), 6 deletions(-) + +diff --git a/drivers/nvdimm/btt.c b/drivers/nvdimm/btt.c +index 471498469d0a..61e519f1d768 100644 +--- a/drivers/nvdimm/btt.c ++++ b/drivers/nvdimm/btt.c +@@ -540,9 +540,9 @@ static int arena_clear_freelist_error(struct arena_info *arena, u32 lane) + + static int btt_freelist_init(struct arena_info *arena) + { +- int old, new, ret; ++ int new, ret; + u32 i, map_entry; +- struct log_entry log_new, log_old; ++ struct log_entry log_new; + + arena->freelist = kcalloc(arena->nfree, sizeof(struct free_entry), + GFP_KERNEL); +@@ -550,10 +550,6 @@ static int btt_freelist_init(struct arena_info *arena) + return -ENOMEM; + + for (i = 0; i < arena->nfree; i++) { +- old = btt_log_read(arena, i, &log_old, LOG_OLD_ENT); +- if (old < 0) +- return old; +- + new = btt_log_read(arena, i, &log_new, LOG_NEW_ENT); + if (new < 0) + return new; +-- +2.25.1 + diff --git a/queue-4.14/media-fdp1-fix-r-car-m3-n-naming-in-debug-message.patch b/queue-4.14/media-fdp1-fix-r-car-m3-n-naming-in-debug-message.patch new file mode 100644 index 00000000000..9f19539b250 --- /dev/null +++ b/queue-4.14/media-fdp1-fix-r-car-m3-n-naming-in-debug-message.patch @@ -0,0 +1,37 @@ +From 48d0af4a056b0fac2696dd17f070a497d3f09ac0 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Thu, 24 Oct 2019 10:09:16 -0300 +Subject: media: fdp1: Fix R-Car M3-N naming in debug message + +From: Geert Uytterhoeven + +[ Upstream commit c05b9d7b9f3ece2831e4e4829f10e904df296df8 ] + +The official name is "R-Car M3-N", not "R-Car M3N". + +Fixes: 4e8c120de9268fc2 ("media: fdp1: Support M3N and E3 platforms") +Signed-off-by: Geert Uytterhoeven +Reviewed-by: Kieran Bingham +Signed-off-by: Hans Verkuil +Signed-off-by: Mauro Carvalho Chehab +Signed-off-by: Sasha Levin +--- + drivers/media/platform/rcar_fdp1.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/media/platform/rcar_fdp1.c b/drivers/media/platform/rcar_fdp1.c +index d8d406c79cfa..5965e34e36cc 100644 +--- a/drivers/media/platform/rcar_fdp1.c ++++ b/drivers/media/platform/rcar_fdp1.c +@@ -2372,7 +2372,7 @@ static int fdp1_probe(struct platform_device *pdev) + dprintk(fdp1, "FDP1 Version R-Car H3\n"); + break; + case FD1_IP_M3N: +- dprintk(fdp1, "FDP1 Version R-Car M3N\n"); ++ dprintk(fdp1, "FDP1 Version R-Car M3-N\n"); + break; + case FD1_IP_E3: + dprintk(fdp1, "FDP1 Version R-Car E3\n"); +-- +2.25.1 + diff --git a/queue-4.14/ppp-mppe-revert-ppp-mppe-add-softdep-to-arc4.patch b/queue-4.14/ppp-mppe-revert-ppp-mppe-add-softdep-to-arc4.patch new file mode 100644 index 00000000000..ab8735cbcd0 --- /dev/null +++ b/queue-4.14/ppp-mppe-revert-ppp-mppe-add-softdep-to-arc4.patch @@ -0,0 +1,47 @@ +From d48b15b0bc7bfab006a20888cec8f03d9067a022 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Fri, 12 Jul 2019 16:39:31 -0700 +Subject: ppp: mppe: Revert "ppp: mppe: Add softdep to arc4" + +From: Eric Biggers + +[ Upstream commit 25a09ce79639a8775244808c17282c491cff89cf ] + +Commit 0e5a610b5ca5 ("ppp: mppe: switch to RC4 library interface"), +which was merged through the crypto tree for v5.3, changed ppp_mppe.c to +use the new arc4_crypt() library function rather than access RC4 through +the dynamic crypto_skcipher API. + +Meanwhile commit aad1dcc4f011 ("ppp: mppe: Add softdep to arc4") was +merged through the net tree and added a module soft-dependency on "arc4". + +The latter commit no longer makes sense because the code now uses the +"libarc4" module rather than "arc4", and also due to the direct use of +arc4_crypt(), no module soft-dependency is required. + +So revert the latter commit. + +Cc: Takashi Iwai +Cc: Ard Biesheuvel +Signed-off-by: Eric Biggers +Signed-off-by: David S. Miller +Signed-off-by: Sasha Levin +--- + drivers/net/ppp/ppp_mppe.c | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/drivers/net/ppp/ppp_mppe.c b/drivers/net/ppp/ppp_mppe.c +index d9eda7c217e9..6c7fd98cb00a 100644 +--- a/drivers/net/ppp/ppp_mppe.c ++++ b/drivers/net/ppp/ppp_mppe.c +@@ -63,7 +63,6 @@ MODULE_AUTHOR("Frank Cusack "); + MODULE_DESCRIPTION("Point-to-Point Protocol Microsoft Point-to-Point Encryption support"); + MODULE_LICENSE("Dual BSD/GPL"); + MODULE_ALIAS("ppp-compress-" __stringify(CI_MPPE)); +-MODULE_SOFTDEP("pre: arc4"); + MODULE_VERSION("1.0.2"); + + static unsigned int +-- +2.25.1 + diff --git a/queue-4.14/revert-gfs2-don-t-demote-a-glock-until-its-revokes-a.patch b/queue-4.14/revert-gfs2-don-t-demote-a-glock-until-its-revokes-a.patch new file mode 100644 index 00000000000..7ddb6fb63b7 --- /dev/null +++ b/queue-4.14/revert-gfs2-don-t-demote-a-glock-until-its-revokes-a.patch @@ -0,0 +1,48 @@ +From c9b208cc5de6650a295c7b5bb231f1edab5c81b4 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Fri, 8 May 2020 15:01:25 -0500 +Subject: Revert "gfs2: Don't demote a glock until its revokes are written" + +From: Bob Peterson + +[ Upstream commit b14c94908b1b884276a6608dea3d0b1b510338b7 ] + +This reverts commit df5db5f9ee112e76b5202fbc331f990a0fc316d6. + +This patch fixes a regression: patch df5db5f9ee112 allowed function +run_queue() to bypass its call to do_xmote() if revokes were queued for +the glock. That's wrong because its call to do_xmote() is what is +responsible for calling the go_sync() glops functions to sync both +the ail list and any revokes queued for it. By bypassing the call, +gfs2 could get into a stand-off where the glock could not be demoted +until its revokes are written back, but the revokes would not be +written back because do_xmote() was never called. + +It "sort of" works, however, because there are other mechanisms like +the log flush daemon (logd) that can sync the ail items and revokes, +if it deems it necessary. The problem is: without file system pressure, +it might never deem it necessary. + +Signed-off-by: Bob Peterson +Signed-off-by: Sasha Levin +--- + fs/gfs2/glock.c | 3 --- + 1 file changed, 3 deletions(-) + +diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c +index 1e2ff4b32c79..aea1ed0aebd0 100644 +--- a/fs/gfs2/glock.c ++++ b/fs/gfs2/glock.c +@@ -636,9 +636,6 @@ __acquires(&gl->gl_lockref.lock) + goto out_unlock; + if (nonblock) + goto out_sched; +- smp_mb(); +- if (atomic_read(&gl->gl_revokes) != 0) +- goto out_sched; + set_bit(GLF_DEMOTE_IN_PROGRESS, &gl->gl_flags); + GLOCK_BUG_ON(gl, gl->gl_demote_state == LM_ST_EXCLUSIVE); + gl->gl_target = gl->gl_demote_state; +-- +2.25.1 + diff --git a/queue-4.14/series b/queue-4.14/series index ee6ede7ad02..dc780fdda29 100644 --- a/queue-4.14/series +++ b/queue-4.14/series @@ -41,3 +41,11 @@ powerpc-remove-strict_kernel_rwx-incompatibility-wit.patch powerpc-64s-disable-strict_kernel_rwx.patch x86-uaccess-ubsan-fix-ubsan-vs.-smap.patch ubsan-build-ubsan.c-more-conservatively.patch +libnvdimm-btt-remove-unnecessary-code-in-btt_freelis.patch +libnvdimm-btt-fix-lba-masking-during-free-list-popul.patch +ppp-mppe-revert-ppp-mppe-add-softdep-to-arc4.patch +media-fdp1-fix-r-car-m3-n-naming-in-debug-message.patch +edac-ghes-use-cper-module-handles-to-locate-dimms.patch +cxgb4-free-mac_hlist-properly.patch +cxgb4-cxgb4vf-fix-mac_hlist-initialization-and-free.patch +revert-gfs2-don-t-demote-a-glock-until-its-revokes-a.patch