diff options
author | 2022-12-19 21:27:05 +0900 | |
---|---|---|
committer | 2022-12-19 21:27:37 +0900 | |
commit | 273409e7e681a0d79ea8d29c615aafd47ccfc77c (patch) | |
tree | e2621d1ac3cb9373058c5ab49b0f4311ce034359 | |
parent | Linux patch 5.4.227 (diff) | |
download | linux-patches-273409e7e681a0d79ea8d29c615aafd47ccfc77c.tar.gz linux-patches-273409e7e681a0d79ea8d29c615aafd47ccfc77c.tar.bz2 linux-patches-273409e7e681a0d79ea8d29c615aafd47ccfc77c.zip |
Linux patch 5.4.2285.4-233
Signed-off-by: Alice Ferrazzi <alicef@gentoo.org>
-rw-r--r-- | 0000_README | 4 | ||||
-rw-r--r-- | 1227_linux-5.4.228.patch | 303 |
2 files changed, 307 insertions, 0 deletions
diff --git a/0000_README b/0000_README index 08ba1bba..63872f92 100644 --- a/0000_README +++ b/0000_README @@ -951,6 +951,10 @@ Patch: 1226_linux-5.4.227.patch From: http://www.kernel.org Desc: Linux 5.4.227 +Patch: 1227_linux-5.4.228.patch +From: http://www.kernel.org +Desc: Linux 5.4.228 + Patch: 1500_XATTR_USER_PREFIX.patch From: https://bugs.gentoo.org/show_bug.cgi?id=470644 Desc: Support for namespace user.pax.* on tmpfs. diff --git a/1227_linux-5.4.228.patch b/1227_linux-5.4.228.patch new file mode 100644 index 00000000..af9bd709 --- /dev/null +++ b/1227_linux-5.4.228.patch @@ -0,0 +1,303 @@ +diff --git a/Makefile b/Makefile +index 111f7c91ed6f7..d70676d900f5b 100644 +--- a/Makefile ++++ b/Makefile +@@ -1,7 +1,7 @@ + # SPDX-License-Identifier: GPL-2.0 + VERSION = 5 + PATCHLEVEL = 4 +-SUBLEVEL = 227 ++SUBLEVEL = 228 + EXTRAVERSION = + NAME = Kleptomaniac Octopus + +diff --git a/arch/x86/kernel/cpu/mtrr/mtrr.c b/arch/x86/kernel/cpu/mtrr/mtrr.c +index 507039c20128a..4482819bb13ca 100644 +--- a/arch/x86/kernel/cpu/mtrr/mtrr.c ++++ b/arch/x86/kernel/cpu/mtrr/mtrr.c +@@ -794,8 +794,6 @@ void mtrr_ap_init(void) + if (!use_intel() || mtrr_aps_delayed_init) + return; + +- rcu_cpu_starting(smp_processor_id()); +- + /* + * Ideally we should hold mtrr_mutex here to avoid mtrr entries + * changed, but this routine will be called in cpu boot time, +diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c +index 8367bd7a9a810..1699d18bd1548 100644 +--- a/arch/x86/kernel/smpboot.c ++++ b/arch/x86/kernel/smpboot.c +@@ -224,6 +224,7 @@ static void notrace start_secondary(void *unused) + #endif + load_current_idt(); + cpu_init(); ++ rcu_cpu_starting(raw_smp_processor_id()); + x86_cpuinit.early_percpu_clock_init(); + preempt_disable(); + smp_callin(); +diff --git a/block/partition-generic.c b/block/partition-generic.c +index aee643ce13d15..e69452c1f5ad8 100644 +--- a/block/partition-generic.c ++++ b/block/partition-generic.c +@@ -272,6 +272,7 @@ void delete_partition(struct gendisk *disk, int partno) + struct disk_part_tbl *ptbl = + rcu_dereference_protected(disk->part_tbl, 1); + struct hd_struct *part; ++ struct block_device *bdev; + + if (partno >= ptbl->len) + return; +@@ -292,6 +293,12 @@ void delete_partition(struct gendisk *disk, int partno) + * "in-use" until we really free the gendisk. + */ + blk_invalidate_devt(part_devt(part)); ++ ++ bdev = bdget(part_devt(part)); ++ if (bdev) { ++ remove_inode_hash(bdev->bd_inode); ++ bdput(bdev); ++ } + hd_struct_kill(part); + } + +diff --git a/drivers/net/can/usb/mcba_usb.c b/drivers/net/can/usb/mcba_usb.c +index 957e51a77d4d1..16fb4fc265183 100644 +--- a/drivers/net/can/usb/mcba_usb.c ++++ b/drivers/net/can/usb/mcba_usb.c +@@ -47,6 +47,10 @@ + #define MCBA_VER_REQ_USB 1 + #define MCBA_VER_REQ_CAN 2 + ++/* Drive the CAN_RES signal LOW "0" to activate R24 and R25 */ ++#define MCBA_VER_TERMINATION_ON 0 ++#define MCBA_VER_TERMINATION_OFF 1 ++ + #define MCBA_SIDL_EXID_MASK 0x8 + #define MCBA_DLC_MASK 0xf + #define MCBA_DLC_RTR_MASK 0x40 +@@ -469,7 +473,7 @@ static void mcba_usb_process_ka_usb(struct mcba_priv *priv, + priv->usb_ka_first_pass = false; + } + +- if (msg->termination_state) ++ if (msg->termination_state == MCBA_VER_TERMINATION_ON) + priv->can.termination = MCBA_TERMINATION_ENABLED; + else + priv->can.termination = MCBA_TERMINATION_DISABLED; +@@ -789,9 +793,9 @@ static int mcba_set_termination(struct net_device *netdev, u16 term) + }; + + if (term == MCBA_TERMINATION_ENABLED) +- usb_msg.termination = 1; ++ usb_msg.termination = MCBA_VER_TERMINATION_ON; + else +- usb_msg.termination = 0; ++ usb_msg.termination = MCBA_VER_TERMINATION_OFF; + + mcba_usb_xmit_cmd(priv, (struct mcba_usb_msg *)&usb_msg); + +diff --git a/drivers/net/ethernet/netronome/nfp/nfpcore/nfp_cppcore.c b/drivers/net/ethernet/netronome/nfp/nfpcore/nfp_cppcore.c +index 6ef48eb3a77d4..b163489489e95 100644 +--- a/drivers/net/ethernet/netronome/nfp/nfpcore/nfp_cppcore.c ++++ b/drivers/net/ethernet/netronome/nfp/nfpcore/nfp_cppcore.c +@@ -874,7 +874,6 @@ area_cache_get(struct nfp_cpp *cpp, u32 id, + } + + /* Adjust the start address to be cache size aligned */ +- cache->id = id; + cache->addr = addr & ~(u64)(cache->size - 1); + + /* Re-init to the new ID and address */ +@@ -894,6 +893,8 @@ area_cache_get(struct nfp_cpp *cpp, u32 id, + return NULL; + } + ++ cache->id = id; ++ + exit: + /* Adjust offset */ + *offset = addr - cache->addr; +diff --git a/drivers/pinctrl/mediatek/mtk-eint.c b/drivers/pinctrl/mediatek/mtk-eint.c +index 7e526bcf5e0b5..24502dfeb83fc 100644 +--- a/drivers/pinctrl/mediatek/mtk-eint.c ++++ b/drivers/pinctrl/mediatek/mtk-eint.c +@@ -277,12 +277,15 @@ static struct irq_chip mtk_eint_irq_chip = { + + static unsigned int mtk_eint_hw_init(struct mtk_eint *eint) + { +- void __iomem *reg = eint->base + eint->regs->dom_en; ++ void __iomem *dom_en = eint->base + eint->regs->dom_en; ++ void __iomem *mask_set = eint->base + eint->regs->mask_set; + unsigned int i; + + for (i = 0; i < eint->hw->ap_num; i += 32) { +- writel(0xffffffff, reg); +- reg += 4; ++ writel(0xffffffff, dom_en); ++ writel(0xffffffff, mask_set); ++ dom_en += 4; ++ mask_set += 4; + } + + return 0; +diff --git a/include/linux/can/platform/sja1000.h b/include/linux/can/platform/sja1000.h +index 5755ae5a47122..6a869682c1207 100644 +--- a/include/linux/can/platform/sja1000.h ++++ b/include/linux/can/platform/sja1000.h +@@ -14,7 +14,7 @@ + #define OCR_MODE_TEST 0x01 + #define OCR_MODE_NORMAL 0x02 + #define OCR_MODE_CLOCK 0x03 +-#define OCR_MODE_MASK 0x07 ++#define OCR_MODE_MASK 0x03 + #define OCR_TX0_INVERT 0x04 + #define OCR_TX0_PULLDOWN 0x08 + #define OCR_TX0_PULLUP 0x10 +diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h +index cef70d6e1657c..c7507135c2a05 100644 +--- a/include/linux/hugetlb.h ++++ b/include/linux/hugetlb.h +@@ -127,8 +127,8 @@ struct page *follow_huge_addr(struct mm_struct *mm, unsigned long address, + struct page *follow_huge_pd(struct vm_area_struct *vma, + unsigned long address, hugepd_t hpd, + int flags, int pdshift); +-struct page *follow_huge_pmd(struct mm_struct *mm, unsigned long address, +- pmd_t *pmd, int flags); ++struct page *follow_huge_pmd_pte(struct vm_area_struct *vma, unsigned long address, ++ int flags); + struct page *follow_huge_pud(struct mm_struct *mm, unsigned long address, + pud_t *pud, int flags); + struct page *follow_huge_pgd(struct mm_struct *mm, unsigned long address, +@@ -175,7 +175,7 @@ static inline void hugetlb_show_meminfo(void) + { + } + #define follow_huge_pd(vma, addr, hpd, flags, pdshift) NULL +-#define follow_huge_pmd(mm, addr, pmd, flags) NULL ++#define follow_huge_pmd_pte(vma, addr, flags) NULL + #define follow_huge_pud(mm, addr, pud, flags) NULL + #define follow_huge_pgd(mm, addr, pgd, flags) NULL + #define prepare_hugepage_range(file, addr, len) (-EINVAL) +diff --git a/mm/gup.c b/mm/gup.c +index 7ec083fe1c50b..2cff8b4d412c8 100644 +--- a/mm/gup.c ++++ b/mm/gup.c +@@ -188,6 +188,17 @@ static struct page *follow_page_pte(struct vm_area_struct *vma, + spinlock_t *ptl; + pte_t *ptep, pte; + ++ /* ++ * Considering PTE level hugetlb, like continuous-PTE hugetlb on ++ * ARM64 architecture. ++ */ ++ if (is_vm_hugetlb_page(vma)) { ++ page = follow_huge_pmd_pte(vma, address, flags); ++ if (page) ++ return page; ++ return no_page_table(vma, flags); ++ } ++ + retry: + if (unlikely(pmd_bad(*pmd))) + return no_page_table(vma, flags); +@@ -333,7 +344,7 @@ static struct page *follow_pmd_mask(struct vm_area_struct *vma, + if (pmd_none(pmdval)) + return no_page_table(vma, flags); + if (pmd_huge(pmdval) && vma->vm_flags & VM_HUGETLB) { +- page = follow_huge_pmd(mm, address, pmd, flags); ++ page = follow_huge_pmd_pte(vma, address, flags); + if (page) + return page; + return no_page_table(vma, flags); +diff --git a/mm/hugetlb.c b/mm/hugetlb.c +index 2126d78f053d8..e4478b62d0f78 100644 +--- a/mm/hugetlb.c ++++ b/mm/hugetlb.c +@@ -5157,30 +5157,30 @@ follow_huge_pd(struct vm_area_struct *vma, + } + + struct page * __weak +-follow_huge_pmd(struct mm_struct *mm, unsigned long address, +- pmd_t *pmd, int flags) ++follow_huge_pmd_pte(struct vm_area_struct *vma, unsigned long address, int flags) + { ++ struct hstate *h = hstate_vma(vma); ++ struct mm_struct *mm = vma->vm_mm; + struct page *page = NULL; + spinlock_t *ptl; +- pte_t pte; ++ pte_t *ptep, pte; ++ + retry: +- ptl = pmd_lockptr(mm, pmd); +- spin_lock(ptl); +- /* +- * make sure that the address range covered by this pmd is not +- * unmapped from other threads. +- */ +- if (!pmd_huge(*pmd)) +- goto out; +- pte = huge_ptep_get((pte_t *)pmd); ++ ptep = huge_pte_offset(mm, address, huge_page_size(h)); ++ if (!ptep) ++ return NULL; ++ ++ ptl = huge_pte_lock(h, mm, ptep); ++ pte = huge_ptep_get(ptep); + if (pte_present(pte)) { +- page = pmd_page(*pmd) + ((address & ~PMD_MASK) >> PAGE_SHIFT); ++ page = pte_page(pte) + ++ ((address & ~huge_page_mask(h)) >> PAGE_SHIFT); + if (flags & FOLL_GET) + get_page(page); + } else { + if (is_hugetlb_entry_migration(pte)) { + spin_unlock(ptl); +- __migration_entry_wait(mm, (pte_t *)pmd, ptl); ++ __migration_entry_wait(mm, ptep, ptl); + goto retry; + } + /* +@@ -5188,7 +5188,7 @@ retry: + * follow_page_mask(). + */ + } +-out: ++ + spin_unlock(ptl); + return page; + } +diff --git a/net/core/filter.c b/net/core/filter.c +index 72bf78032f458..e81f7772161a9 100644 +--- a/net/core/filter.c ++++ b/net/core/filter.c +@@ -6196,6 +6196,8 @@ tc_cls_act_func_proto(enum bpf_func_id func_id, const struct bpf_prog *prog) + return &bpf_skb_adjust_room_proto; + case BPF_FUNC_skb_change_tail: + return &bpf_skb_change_tail_proto; ++ case BPF_FUNC_skb_change_head: ++ return &bpf_skb_change_head_proto; + case BPF_FUNC_skb_get_tunnel_key: + return &bpf_skb_get_tunnel_key_proto; + case BPF_FUNC_skb_set_tunnel_key: +diff --git a/sound/soc/soc-ops.c b/sound/soc/soc-ops.c +index 2faf95d4bb75f..e01f3bf3ef171 100644 +--- a/sound/soc/soc-ops.c ++++ b/sound/soc/soc-ops.c +@@ -458,8 +458,15 @@ int snd_soc_put_volsw_sx(struct snd_kcontrol *kcontrol, + return err; + + if (snd_soc_volsw_is_stereo(mc)) { ++ val2 = ucontrol->value.integer.value[1]; ++ ++ if (mc->platform_max && val2 > mc->platform_max) ++ return -EINVAL; ++ if (val2 > max) ++ return -EINVAL; ++ + val_mask = mask << rshift; +- val2 = (ucontrol->value.integer.value[1] + min) & mask; ++ val2 = (val2 + min) & mask; + val2 = val2 << rshift; + + err = snd_soc_component_update_bits(component, reg2, val_mask, |