Linux 5.4.161
Greg Kroah-Hartman
maintainerI'm announcing the release of the 5.4.161 kernel.
All users of the 5.4 kernel series must upgrade.
The updated 5.4.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-5.4.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2 +- arch/mips/include/asm/cmpxchg.h | 3 +++ arch/parisc/kernel/entry.S | 2 +- drivers/pci/msi.c | 27 +++++++++++++++------------ drivers/pci/quirks.c | 6 ++++++ drivers/scsi/ufs/ufshcd.c | 17 ++++++++++++----- drivers/soc/tegra/pmc.c | 2 +- fs/erofs/zdata.c | 15 +++++++-------- fs/erofs/zpvec.h | 14 +++++++++----- fs/ext4/super.c | 9 ++++----- include/linux/pci.h | 2 ++ security/Kconfig | 3 +++ 12 files changed, 64 insertions(+), 38 deletions(-)
Adrian Hunter (1):
scsi: ufs: Fix interrupt error message for shared interrupts
Dmitry Osipenko (1):
soc/tegra: pmc: Fix imbalanced clock disabling in error code path
Gao Xiang (1):
erofs: fix unsafe pagevec reuse of hooked pclusters
Greg Kroah-Hartman (1):
Linux 5.4.161
Jaegeuk Kim (1):
scsi: ufs: Fix tm request when non-fatal error happens
Kees Cook (1):
fortify: Explicitly disable Clang support
Maciej W. Rozycki (1):
MIPS: Fix assembly error from MIPSr2 code used within MIPS_ISA_ARCH_LEVEL
Marc Zyngier (2):
PCI/MSI: Deal with devices lying about their MSI mask capability
PCI: Add MSI masking quirk for Nvidia ION AHCI
Shaoying Xu (1):
ext4: fix lazy initialization next schedule time computation in more granular unit
Sven Schnelle (1):
parisc/entry: fix trace test in syscall exit path
Thomas Gleixner (1):
PCI/MSI: Destroy sysfs before freeing entries
Yue Hu (1):
erofs: remove the occupied parameter from z_erofs_pagevec_enqueue()
Greg Kroah-Hartman
maintainerMakefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 5 PATCHLEVEL = 4 -SUBLEVEL = 160 +SUBLEVEL = 161 EXTRAVERSION = NAME = Kleptomaniac Octopus
arch/mips/include/asm/cmpxchg.h +3 -0
@@ -239,6 +239,7 @@ static inline unsigned long __cmpxchg64(volatile void *ptr," .set " MIPS_ISA_ARCH_LEVEL " \n" /* Load 64 bits from ptr */ "1: lld %L0, %3 # __cmpxchg64 \n" +" .set pop \n" /* * Split the 64 bit value we loaded into the 2 registers that hold the * ret variable.
@@ -266,6 +267,8 @@ static inline unsigned long __cmpxchg64(volatile void *ptr," or %L1, %L1, $at \n" " .set at \n"# endif +" .set push \n" +" .set " MIPS_ISA_ARCH_LEVEL " \n" /* Attempt to store new at ptr */ " scd %L1, %2 \n" /* If we failed, loop! */
arch/parisc/kernel/entry.S +1 -1
@@ -1842,7 +1842,7 @@ syscall_restore: /* Are we being ptraced? */ LDREG TI_FLAGS-THREAD_SZ_ALGN-FRAME_SIZE(%r30),%r19 - ldi _TIF_SYSCALL_TRACE_MASK,%r2 + ldi _TIF_SINGLESTEP|_TIF_BLOCKSTEP,%r2 and,COND(=) %r19,%r2,%r0 b,n syscall_restore_rfi
drivers/pci/msi.c +15 -12
@@ -395,18 +395,6 @@ static void free_msi_irqs(struct pci_dev *dev)for (i =0 ; i < entry->nvec_used; i++)BUG_ON (irq_has_action (entry->irq + i)); -pci_msi_teardown_msi_irqs (dev); - -list_for_each_entry_safe (entry, tmp, msi_list, list) { -if (entry->msi_attrib.is_msix) { -if (list_is_last (&entry->list, msi_list)) -iounmap (entry->mask_base); - } - -list_del (&entry->list); -free_msi_entry (entry); - } -if (dev->msi_irq_groups) {sysfs_remove_groups (&dev->dev.kobj, dev->msi_irq_groups); msi_attrs = dev->msi_irq_groups[0 ]->attrs;
@@ -422,6 +410,18 @@ static void free_msi_irqs(struct pci_dev *dev)kfree (dev->msi_irq_groups); dev->msi_irq_groups =NULL ; } + +pci_msi_teardown_msi_irqs (dev); + +list_for_each_entry_safe (entry, tmp, msi_list, list) { +if (entry->msi_attrib.is_msix) { +if (list_is_last (&entry->list, msi_list)) +iounmap (entry->mask_base); + } + +list_del (&entry->list); +free_msi_entry (entry); + } }static void pci_intx_for_msi (struct pci_dev *dev,int enable)
@@ -591,6 +591,9 @@ msi_setup_entry(struct pci_dev *dev, int nvec, struct irq_affinity *affd) goto out;pci_read_config_word (dev, dev->msi_cap +PCI_MSI_FLAGS , &control); +/* Lies, damned lies, and MSIs */ +if (dev->dev_flags &PCI_DEV_FLAGS_HAS_MSI_MASKING ) + control |=PCI_MSI_FLAGS_MASKBIT ; entry->msi_attrib.is_msix =0 ; entry->msi_attrib.is_64 = !!(control &PCI_MSI_FLAGS_64BIT );
drivers/pci/quirks.c +6 -0
@@ -5777,3 +5777,9 @@ static void apex_pci_fixup_class(struct pci_dev *pdev) }DECLARE_PCI_FIXUP_CLASS_HEADER (0x1ac1 ,0x089a ,PCI_CLASS_NOT_DEFINED ,8 , apex_pci_fixup_class); + +static void nvidia_ion_ahci_fixup (struct pci_dev *pdev) +{ + pdev->dev_flags |=PCI_DEV_FLAGS_HAS_MSI_MASKING ; +} +DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_NVIDIA ,0x0ab8 , nvidia_ion_ahci_fixup);
drivers/scsi/ufs/ufshcd.c +12 -5
@@ -4748,7 +4748,8 @@ ufshcd_transfer_rsp_status(struct ufs_hba *hba, struct ufshcd_lrb *lrbp)break ; }/* end of switch */ -if ((host_byte (result) !=DID_OK ) && !hba->silence_err_logs) +if ((host_byte (result) !=DID_OK ) && + (host_byte (result) !=DID_REQUEUE ) && !hba->silence_err_logs)ufshcd_print_trs (hba,1 << lrbp->task_tag, true);return result; }
@@ -5661,9 +5662,12 @@ static irqreturn_t ufshcd_intr(int irq, void *__hba) intr_status =ufshcd_readl (hba,REG_INTERRUPT_STATUS ); } -if (retval ==IRQ_NONE ) { -dev_err (hba->dev,"%s: Unhandled interrupt 0x%08x\n" , - __func__, intr_status); +if (enabled_intr_status && retval ==IRQ_NONE && + !ufshcd_eh_in_progress (hba)) { +dev_err (hba->dev,"%s: Unhandled interrupt 0x%08x (-, 0x%08x)\n" , + __func__, + intr_status, + enabled_intr_status);ufshcd_dump_regs (hba,0 ,UFSHCI_REG_SPACE_SIZE ,"host_regs: " ); }
@@ -5705,7 +5709,10 @@ static int __ufshcd_issue_tm_cmd(struct ufs_hba *hba,/* * blk_get_request() is used here only to get a free tag. */ - req =blk_get_request (q,REQ_OP_DRV_OUT ,BLK_MQ_REQ_RESERVED ); + req =blk_get_request (q,REQ_OP_DRV_OUT ,0 ); +if (IS_ERR (req)) +return PTR_ERR (req); + req->end_io_data = &wait;ufshcd_hold (hba, false);
drivers/soc/tegra/pmc.c +1 -1
@@ -579,7 +579,7 @@ static int tegra_powergate_power_up(struct tegra_powergate *pg, err =tegra_powergate_enable_clocks (pg);if (err) - goto disable_clks; + goto powergate_off;usleep_range (10 ,20 );
fs/erofs/zdata.c +7 -8
@@ -288,11 +288,10 @@ static inline bool z_erofs_try_inplace_io(struct z_erofs_collector *clt,/* callers must be with collection lock held */ static int z_erofs_attach_page (struct z_erofs_collector *clt, -struct page *page, -enum z_erofs_page_type type) +struct page *page,enum z_erofs_page_type type, +bool pvec_safereuse) {int ret; -bool occupied;/* give priority for inplaceio */ if (clt->mode >= COLLECT_PRIMARY &&
@@ -300,10 +299,9 @@ static int z_erofs_attach_page(struct z_erofs_collector *clt, z_erofs_try_inplace_io(clt, page))return 0 ; - ret =z_erofs_pagevec_enqueue (&clt->vector, - page, type, &occupied); + ret =z_erofs_pagevec_enqueue (&clt->vector, page, type, + pvec_safereuse); clt->cl->vcnt += (unsigned int )ret; -return ret ?0 : -EAGAIN ; }
@@ -654,14 +652,15 @@ static int z_erofs_do_read_page(struct z_erofs_decompress_frontend *fe, tight &= (clt->mode >=COLLECT_PRIMARY_FOLLOWED ); retry: - err =z_erofs_attach_page (clt, page, page_type); + err =z_erofs_attach_page (clt, page, page_type, + clt->mode >=COLLECT_PRIMARY_FOLLOWED );/* should allocate an additional staging page for pagevec */ if (err == -EAGAIN ) {struct page *const newpage =__stagingpage_alloc (pagepool,GFP_NOFS ); err =z_erofs_attach_page (clt, newpage, -Z_EROFS_PAGE_TYPE_EXCLUSIVE ); +Z_EROFS_PAGE_TYPE_EXCLUSIVE , true);if (!err) goto retry; }
fs/erofs/zpvec.h +9 -5
@@ -108,12 +108,17 @@ static inline void z_erofs_pagevec_ctor_init(struct z_erofs_pagevec_ctor *ctor,static inline bool z_erofs_pagevec_enqueue (struct z_erofs_pagevec_ctor *ctor,struct page *page,enum z_erofs_page_type type, -bool *occupied) +bool pvec_safereuse) { - *occupied = false; -if (!ctor->next && type) -if (ctor->index +1 == ctor->nr) +if (!ctor->next) { +/* some pages cannot be reused as pvec safely without I/O */ +if (type ==Z_EROFS_PAGE_TYPE_EXCLUSIVE && !pvec_safereuse) + type =Z_EROFS_VLE_PAGE_TYPE_TAIL_SHARED ; + +if (type !=Z_EROFS_PAGE_TYPE_EXCLUSIVE && + ctor->index +1 == ctor->nr)return false; + }if (ctor->index >= ctor->nr)z_erofs_pagevec_ctor_pagedown (ctor, false);
@@ -125,7 +130,6 @@ static inline bool z_erofs_pagevec_enqueue(struct z_erofs_pagevec_ctor *ctor,/* should remind that collector->next never equal to 1, 2 */ if (type == (uintptr_t )ctor->next) { ctor->next = page; - *occupied = true; } ctor->pages[ctor->index++] =tagptr_fold (erofs_vtptr_t, page, type);return true;
fs/ext4/super.c +4 -5
@@ -3071,8 +3071,8 @@ static int ext4_run_li_request(struct ext4_li_request *elr)struct ext4_group_desc *gdp =NULL ;ext4_group_t group, ngroups;struct super_block *sb; -unsigned long timeout =0 ;int ret =0 ; +u64 start_time; sb = elr->lr_super; ngroups =EXT4_SB (sb)->s_groups_count;
@@ -3092,13 +3092,12 @@ static int ext4_run_li_request(struct ext4_li_request *elr) ret =1 ;if (!ret) { - timeout = jiffies; + start_time =ktime_get_real_ns (); ret =ext4_init_inode_table (sb, group, elr->lr_timeout ?0 :1 );if (elr->lr_timeout ==0 ) { - timeout = (jiffies - timeout) * - elr->lr_sbi->s_li_wait_mult; - elr->lr_timeout = timeout; + elr->lr_timeout =nsecs_to_jiffies ((ktime_get_real_ns () - start_time) * + elr->lr_sbi->s_li_wait_mult); } elr->lr_next_sched = jiffies + elr->lr_timeout; elr->lr_next_group = group +1 ;
include/linux/pci.h +2 -0
@@ -208,6 +208,8 @@ enum pci_dev_flags {PCI_DEV_FLAGS_NO_FLR_RESET = (__force pci_dev_flags_t) (1 <<10 ),/* Don't use Relaxed Ordering for TLPs directed at this device */ PCI_DEV_FLAGS_NO_RELAXED_ORDERING = (__force pci_dev_flags_t) (1 <<11 ), +/* Device does honor MSI masking despite saying otherwise */ + PCI_DEV_FLAGS_HAS_MSI_MASKING = (__force pci_dev_flags_t) (1 << 12), }; enum pci_irq_reroute_variant {
security/Kconfig +3 -0
@@ -191,6 +191,9 @@ config HARDENED_USERCOPY_PAGESPAN config FORTIFY_SOURCE bool "Harden common str/mem functions against buffer overflows" depends on ARCH_HAS_FORTIFY_SOURCE + # https://bugs.llvm.org/show_bug.cgi?id=50322 + # https://bugs.llvm.org/show_bug.cgi?id=41459 + depends on !CC_IS_CLANG help Detect overflows of buffers in common string and memory functions where the compiler can determine and validate the buffer sizes.
Greg Kroah-Hartman
maintainerQuoted 8 lines · Greg Kroah-Hartman
I'm announcing the release of the 5.4.161 kernel.
All users of the 5.4 kernel series must upgrade.
The updated 5.4.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.gitlinux-5.4.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
And I didn't even announce a -rc release for this kernel, yet I did a release for it, sorry about that everyone.
The reason this happened was my scripts went and "take the review comments for the kernel release and dump them in a mbox" triggered the messages that were reviewing the "5.15.4-rc1" release as valid for the 5.4 release tree as the simple search was just for "5.4" in the subject line. :(
So that caused the 5.15.4 and 5.4.161 release commits to have the identical "Tested-by:" messages in it, ick.
Anyway, bonus kernel release, sorry about that everyone. It might be nice to have people test it, even though it does work for me here...
greg "release all the kernels!" k-h