This is the 5.4.228 stable release

-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmOgShoACgkQONu9yGCS
 aT6y8hAArfx14MjKT2KO2ofFZbFhgSL7t9EKwbhUgL6uu+0zHqjyPOf4iSWiRDCx
 cR9bEV15klGIHeu9PWlk6+EGz7lGRStJXlctTGvPTTsvP01LOmqFISSktuB0p9QO
 oaJGAgMIVWj8O1Q6W6zRrxAIB+Dc4kVwaiiyNccc4V+4GYGOVR36f4sr6x9DSspy
 cFke4iwDnCENxVa/HzbQBVZ7l1DagW20xbm6grHLqPcyK3NKcpQqRSLKtFQHjjpx
 pv7+XHYq7CpARSM+pmO6PcyCVI8+/VZj99nqRobhOTZmEawUvW6RFX19+IOVFSTX
 4ZCvk49g+AHQJRY1+AwnYCPZYle3qCjDjrAldBf+Hf906SyVS4t9IG7i6i2AMjcT
 k/A6GLFVswAN+oV5hN7InZYFLdznzWJfIyCZXzFGaFx5p3mTCO6F9s/JYRlgR40Q
 YXeUZGlH13gJoQXN3EWrxwQnXGuXUJnHpbCWgiUFq8lKwVvOs1NvjjLbdPzFrwmW
 YGIG1lgKOcA26JqqvKC0+WnfW6dlsNQY39J/4eY6r7RfFcbNJQK03ZCCuUpNHIGw
 A/X8uArb7W+sm9N2o/gW7dulP0Ih2ll/aq2eXdfnEAq78n7DxEieQSgKOkgqfrhS
 9M+zyRF6EcQkF5CzSmjyaPpVmNaND/LaHnIrb5LvPOel0eCenGo=
 =UWla
 -----END PGP SIGNATURE-----

Merge 5.4.228 into android11-5.4-lts

Changes in 5.4.228
	net: bpf: Allow TC programs to call BPF_FUNC_skb_change_head
	x86/smpboot: Move rcu_cpu_starting() earlier
	mm/hugetlb: fix races when looking up a CONT-PTE/PMD size hugetlb page
	block: unhash blkdev part inode when the part is deleted
	nfp: fix use-after-free in area_cache_get()
	ASoC: ops: Check bounds for second channel in snd_soc_put_volsw_sx()
	pinctrl: meditatek: Startup with the IRQs disabled
	can: sja1000: fix size of OCR_MODE_MASK define
	can: mcba_usb: Fix termination command argument
	ASoC: ops: Correct bounds check for second channel on SX controls
	Linux 5.4.228

Change-Id: I37ed67e2d32e9ca369934f343368e6410630cf64
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
Greg Kroah-Hartman 2023-01-07 14:58:17 +00:00
commit 92a0ce5d0a
12 changed files with 63 additions and 31 deletions

View File

@ -1,7 +1,7 @@
# SPDX-License-Identifier: GPL-2.0 # SPDX-License-Identifier: GPL-2.0
VERSION = 5 VERSION = 5
PATCHLEVEL = 4 PATCHLEVEL = 4
SUBLEVEL = 227 SUBLEVEL = 228
EXTRAVERSION = EXTRAVERSION =
NAME = Kleptomaniac Octopus NAME = Kleptomaniac Octopus

View File

@ -794,8 +794,6 @@ void mtrr_ap_init(void)
if (!use_intel() || mtrr_aps_delayed_init) if (!use_intel() || mtrr_aps_delayed_init)
return; return;
rcu_cpu_starting(smp_processor_id());
/* /*
* Ideally we should hold mtrr_mutex here to avoid mtrr entries * Ideally we should hold mtrr_mutex here to avoid mtrr entries
* changed, but this routine will be called in cpu boot time, * changed, but this routine will be called in cpu boot time,

View File

@ -224,6 +224,7 @@ static void notrace start_secondary(void *unused)
#endif #endif
load_current_idt(); load_current_idt();
cpu_init(); cpu_init();
rcu_cpu_starting(raw_smp_processor_id());
x86_cpuinit.early_percpu_clock_init(); x86_cpuinit.early_percpu_clock_init();
preempt_disable(); preempt_disable();
smp_callin(); smp_callin();

View File

@ -272,6 +272,7 @@ void delete_partition(struct gendisk *disk, int partno)
struct disk_part_tbl *ptbl = struct disk_part_tbl *ptbl =
rcu_dereference_protected(disk->part_tbl, 1); rcu_dereference_protected(disk->part_tbl, 1);
struct hd_struct *part; struct hd_struct *part;
struct block_device *bdev;
if (partno >= ptbl->len) if (partno >= ptbl->len)
return; return;
@ -292,6 +293,12 @@ void delete_partition(struct gendisk *disk, int partno)
* "in-use" until we really free the gendisk. * "in-use" until we really free the gendisk.
*/ */
blk_invalidate_devt(part_devt(part)); 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); hd_struct_kill(part);
} }

View File

@ -47,6 +47,10 @@
#define MCBA_VER_REQ_USB 1 #define MCBA_VER_REQ_USB 1
#define MCBA_VER_REQ_CAN 2 #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_SIDL_EXID_MASK 0x8
#define MCBA_DLC_MASK 0xf #define MCBA_DLC_MASK 0xf
#define MCBA_DLC_RTR_MASK 0x40 #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; priv->usb_ka_first_pass = false;
} }
if (msg->termination_state) if (msg->termination_state == MCBA_VER_TERMINATION_ON)
priv->can.termination = MCBA_TERMINATION_ENABLED; priv->can.termination = MCBA_TERMINATION_ENABLED;
else else
priv->can.termination = MCBA_TERMINATION_DISABLED; 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) if (term == MCBA_TERMINATION_ENABLED)
usb_msg.termination = 1; usb_msg.termination = MCBA_VER_TERMINATION_ON;
else else
usb_msg.termination = 0; usb_msg.termination = MCBA_VER_TERMINATION_OFF;
mcba_usb_xmit_cmd(priv, (struct mcba_usb_msg *)&usb_msg); mcba_usb_xmit_cmd(priv, (struct mcba_usb_msg *)&usb_msg);

View File

@ -874,7 +874,6 @@ area_cache_get(struct nfp_cpp *cpp, u32 id,
} }
/* Adjust the start address to be cache size aligned */ /* Adjust the start address to be cache size aligned */
cache->id = id;
cache->addr = addr & ~(u64)(cache->size - 1); cache->addr = addr & ~(u64)(cache->size - 1);
/* Re-init to the new ID and address */ /* Re-init to the new ID and address */
@ -894,6 +893,8 @@ area_cache_get(struct nfp_cpp *cpp, u32 id,
return NULL; return NULL;
} }
cache->id = id;
exit: exit:
/* Adjust offset */ /* Adjust offset */
*offset = addr - cache->addr; *offset = addr - cache->addr;

View File

@ -277,12 +277,15 @@ static struct irq_chip mtk_eint_irq_chip = {
static unsigned int mtk_eint_hw_init(struct mtk_eint *eint) 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; unsigned int i;
for (i = 0; i < eint->hw->ap_num; i += 32) { for (i = 0; i < eint->hw->ap_num; i += 32) {
writel(0xffffffff, reg); writel(0xffffffff, dom_en);
reg += 4; writel(0xffffffff, mask_set);
dom_en += 4;
mask_set += 4;
} }
return 0; return 0;

View File

@ -14,7 +14,7 @@
#define OCR_MODE_TEST 0x01 #define OCR_MODE_TEST 0x01
#define OCR_MODE_NORMAL 0x02 #define OCR_MODE_NORMAL 0x02
#define OCR_MODE_CLOCK 0x03 #define OCR_MODE_CLOCK 0x03
#define OCR_MODE_MASK 0x07 #define OCR_MODE_MASK 0x03
#define OCR_TX0_INVERT 0x04 #define OCR_TX0_INVERT 0x04
#define OCR_TX0_PULLDOWN 0x08 #define OCR_TX0_PULLDOWN 0x08
#define OCR_TX0_PULLUP 0x10 #define OCR_TX0_PULLUP 0x10

View File

@ -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, struct page *follow_huge_pd(struct vm_area_struct *vma,
unsigned long address, hugepd_t hpd, unsigned long address, hugepd_t hpd,
int flags, int pdshift); int flags, int pdshift);
struct page *follow_huge_pmd(struct mm_struct *mm, unsigned long address, struct page *follow_huge_pmd_pte(struct vm_area_struct *vma, unsigned long address,
pmd_t *pmd, int flags); int flags);
struct page *follow_huge_pud(struct mm_struct *mm, unsigned long address, struct page *follow_huge_pud(struct mm_struct *mm, unsigned long address,
pud_t *pud, int flags); pud_t *pud, int flags);
struct page *follow_huge_pgd(struct mm_struct *mm, unsigned long address, 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_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_pud(mm, addr, pud, flags) NULL
#define follow_huge_pgd(mm, addr, pgd, flags) NULL #define follow_huge_pgd(mm, addr, pgd, flags) NULL
#define prepare_hugepage_range(file, addr, len) (-EINVAL) #define prepare_hugepage_range(file, addr, len) (-EINVAL)

View File

@ -188,6 +188,17 @@ static struct page *follow_page_pte(struct vm_area_struct *vma,
spinlock_t *ptl; spinlock_t *ptl;
pte_t *ptep, pte; 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: retry:
if (unlikely(pmd_bad(*pmd))) if (unlikely(pmd_bad(*pmd)))
return no_page_table(vma, flags); 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)) if (pmd_none(pmdval))
return no_page_table(vma, flags); return no_page_table(vma, flags);
if (pmd_huge(pmdval) && vma->vm_flags & VM_HUGETLB) { 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) if (page)
return page; return page;
return no_page_table(vma, flags); return no_page_table(vma, flags);

View File

@ -5157,30 +5157,30 @@ follow_huge_pd(struct vm_area_struct *vma,
} }
struct page * __weak struct page * __weak
follow_huge_pmd(struct mm_struct *mm, unsigned long address, follow_huge_pmd_pte(struct vm_area_struct *vma, unsigned long address, int flags)
pmd_t *pmd, int flags)
{ {
struct hstate *h = hstate_vma(vma);
struct mm_struct *mm = vma->vm_mm;
struct page *page = NULL; struct page *page = NULL;
spinlock_t *ptl; spinlock_t *ptl;
pte_t pte; pte_t *ptep, pte;
retry: retry:
ptl = pmd_lockptr(mm, pmd); ptep = huge_pte_offset(mm, address, huge_page_size(h));
spin_lock(ptl); if (!ptep)
/* return NULL;
* make sure that the address range covered by this pmd is not
* unmapped from other threads. ptl = huge_pte_lock(h, mm, ptep);
*/ pte = huge_ptep_get(ptep);
if (!pmd_huge(*pmd))
goto out;
pte = huge_ptep_get((pte_t *)pmd);
if (pte_present(pte)) { 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) if (flags & FOLL_GET)
get_page(page); get_page(page);
} else { } else {
if (is_hugetlb_entry_migration(pte)) { if (is_hugetlb_entry_migration(pte)) {
spin_unlock(ptl); spin_unlock(ptl);
__migration_entry_wait(mm, (pte_t *)pmd, ptl); __migration_entry_wait(mm, ptep, ptl);
goto retry; goto retry;
} }
/* /*
@ -5188,7 +5188,7 @@ retry:
* follow_page_mask(). * follow_page_mask().
*/ */
} }
out:
spin_unlock(ptl); spin_unlock(ptl);
return page; return page;
} }

View File

@ -458,8 +458,15 @@ int snd_soc_put_volsw_sx(struct snd_kcontrol *kcontrol,
return err; return err;
if (snd_soc_volsw_is_stereo(mc)) { 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; val_mask = mask << rshift;
val2 = (ucontrol->value.integer.value[1] + min) & mask; val2 = (val2 + min) & mask;
val2 = val2 << rshift; val2 = val2 << rshift;
err = snd_soc_component_update_bits(component, reg2, val_mask, err = snd_soc_component_update_bits(component, reg2, val_mask,