Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 615b2824 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman
Browse files

Merge 5.4.154 into android11-5.4-lts



Changes in 5.4.154
	net: phy: bcm7xxx: Fixed indirect MMD operations
	ext4: correct the error path of ext4_write_inline_data_end()
	HID: apple: Fix logical maximum and usage maximum of Magic Keyboard JIS
	netfilter: ip6_tables: zero-initialize fragment offset
	HID: wacom: Add new Intuos BT (CTL-4100WL/CTL-6100WL) device IDs
	netfilter: nf_nat_masquerade: make async masq_inet6_event handling generic
	netfilter: nf_nat_masquerade: defer conntrack walk to work queue
	mac80211: Drop frames from invalid MAC address in ad-hoc mode
	m68k: Handle arrivals of multiple signals correctly
	net: prevent user from passing illegal stab size
	mac80211: check return value of rhashtable_init
	net: sun: SUNVNET_COMMON should depend on INET
	drm/amdgpu: fix gart.bo pin_count leak
	scsi: ses: Fix unsigned comparison with less than zero
	scsi: virtio_scsi: Fix spelling mistake "Unsupport" -> "Unsupported"
	sched: Always inline is_percpu_thread()
	Linux 5.4.154

Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
Change-Id: Id7446f3f91cccc1c629d89f863b9e623b26a1947
parents 57f5a5a9 ce061ef4
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0
VERSION = 5
PATCHLEVEL = 4
SUBLEVEL = 153
SUBLEVEL = 154
EXTRAVERSION =
NAME = Kleptomaniac Octopus

+42 −46
Original line number Diff line number Diff line
@@ -448,7 +448,7 @@ static inline void save_fpu_state(struct sigcontext *sc, struct pt_regs *regs)

	if (CPU_IS_060 ? sc->sc_fpstate[2] : sc->sc_fpstate[0]) {
		fpu_version = sc->sc_fpstate[0];
		if (CPU_IS_020_OR_030 &&
		if (CPU_IS_020_OR_030 && !regs->stkadj &&
		    regs->vector >= (VEC_FPBRUC * 4) &&
		    regs->vector <= (VEC_FPNAN * 4)) {
			/* Clear pending exception in 68882 idle frame */
@@ -511,7 +511,7 @@ static inline int rt_save_fpu_state(struct ucontext __user *uc, struct pt_regs *
		if (!(CPU_IS_060 || CPU_IS_COLDFIRE))
			context_size = fpstate[1];
		fpu_version = fpstate[0];
		if (CPU_IS_020_OR_030 &&
		if (CPU_IS_020_OR_030 && !regs->stkadj &&
		    regs->vector >= (VEC_FPBRUC * 4) &&
		    regs->vector <= (VEC_FPNAN * 4)) {
			/* Clear pending exception in 68882 idle frame */
@@ -829,18 +829,24 @@ asmlinkage int do_rt_sigreturn(struct pt_regs *regs, struct switch_stack *sw)
	return 0;
}

static inline struct pt_regs *rte_regs(struct pt_regs *regs)
{
	return (void *)regs + regs->stkadj;
}

static void setup_sigcontext(struct sigcontext *sc, struct pt_regs *regs,
			     unsigned long mask)
{
	struct pt_regs *tregs = rte_regs(regs);
	sc->sc_mask = mask;
	sc->sc_usp = rdusp();
	sc->sc_d0 = regs->d0;
	sc->sc_d1 = regs->d1;
	sc->sc_a0 = regs->a0;
	sc->sc_a1 = regs->a1;
	sc->sc_sr = regs->sr;
	sc->sc_pc = regs->pc;
	sc->sc_formatvec = regs->format << 12 | regs->vector;
	sc->sc_sr = tregs->sr;
	sc->sc_pc = tregs->pc;
	sc->sc_formatvec = tregs->format << 12 | tregs->vector;
	save_a5_state(sc, regs);
	save_fpu_state(sc, regs);
}
@@ -848,6 +854,7 @@ static void setup_sigcontext(struct sigcontext *sc, struct pt_regs *regs,
static inline int rt_setup_ucontext(struct ucontext __user *uc, struct pt_regs *regs)
{
	struct switch_stack *sw = (struct switch_stack *)regs - 1;
	struct pt_regs *tregs = rte_regs(regs);
	greg_t __user *gregs = uc->uc_mcontext.gregs;
	int err = 0;

@@ -868,9 +875,9 @@ static inline int rt_setup_ucontext(struct ucontext __user *uc, struct pt_regs *
	err |= __put_user(sw->a5, &gregs[13]);
	err |= __put_user(sw->a6, &gregs[14]);
	err |= __put_user(rdusp(), &gregs[15]);
	err |= __put_user(regs->pc, &gregs[16]);
	err |= __put_user(regs->sr, &gregs[17]);
	err |= __put_user((regs->format << 12) | regs->vector, &uc->uc_formatvec);
	err |= __put_user(tregs->pc, &gregs[16]);
	err |= __put_user(tregs->sr, &gregs[17]);
	err |= __put_user((tregs->format << 12) | tregs->vector, &uc->uc_formatvec);
	err |= rt_save_fpu_state(uc, regs);
	return err;
}
@@ -887,13 +894,14 @@ static int setup_frame(struct ksignal *ksig, sigset_t *set,
			struct pt_regs *regs)
{
	struct sigframe __user *frame;
	int fsize = frame_extra_sizes(regs->format);
	struct pt_regs *tregs = rte_regs(regs);
	int fsize = frame_extra_sizes(tregs->format);
	struct sigcontext context;
	int err = 0, sig = ksig->sig;

	if (fsize < 0) {
		pr_debug("setup_frame: Unknown frame format %#x\n",
			 regs->format);
			 tregs->format);
		return -EFAULT;
	}

@@ -904,7 +912,7 @@ static int setup_frame(struct ksignal *ksig, sigset_t *set,

	err |= __put_user(sig, &frame->sig);

	err |= __put_user(regs->vector, &frame->code);
	err |= __put_user(tregs->vector, &frame->code);
	err |= __put_user(&frame->sc, &frame->psc);

	if (_NSIG_WORDS > 1)
@@ -929,34 +937,28 @@ static int setup_frame(struct ksignal *ksig, sigset_t *set,

	push_cache ((unsigned long) &frame->retcode);

	/*
	 * Set up registers for signal handler.  All the state we are about
	 * to destroy is successfully copied to sigframe.
	 */
	wrusp ((unsigned long) frame);
	regs->pc = (unsigned long) ksig->ka.sa.sa_handler;
	adjustformat(regs);

	/*
	 * This is subtle; if we build more than one sigframe, all but the
	 * first one will see frame format 0 and have fsize == 0, so we won't
	 * screw stkadj.
	 */
	if (fsize)
	if (fsize) {
		regs->stkadj = fsize;

	/* Prepare to skip over the extra stuff in the exception frame.  */
	if (regs->stkadj) {
		struct pt_regs *tregs =
			(struct pt_regs *)((ulong)regs + regs->stkadj);
		tregs = rte_regs(regs);
		pr_debug("Performing stackadjust=%04lx\n", regs->stkadj);
		/* This must be copied with decreasing addresses to
                   handle overlaps.  */
		tregs->vector = 0;
		tregs->format = 0;
		tregs->pc = regs->pc;
		tregs->sr = regs->sr;
	}

	/*
	 * Set up registers for signal handler.  All the state we are about
	 * to destroy is successfully copied to sigframe.
	 */
	wrusp ((unsigned long) frame);
	tregs->pc = (unsigned long) ksig->ka.sa.sa_handler;
	adjustformat(regs);

	return 0;
}

@@ -964,7 +966,8 @@ static int setup_rt_frame(struct ksignal *ksig, sigset_t *set,
			   struct pt_regs *regs)
{
	struct rt_sigframe __user *frame;
	int fsize = frame_extra_sizes(regs->format);
	struct pt_regs *tregs = rte_regs(regs);
	int fsize = frame_extra_sizes(tregs->format);
	int err = 0, sig = ksig->sig;

	if (fsize < 0) {
@@ -1013,34 +1016,27 @@ static int setup_rt_frame(struct ksignal *ksig, sigset_t *set,

	push_cache ((unsigned long) &frame->retcode);

	/*
	 * Set up registers for signal handler.  All the state we are about
	 * to destroy is successfully copied to sigframe.
	 */
	wrusp ((unsigned long) frame);
	regs->pc = (unsigned long) ksig->ka.sa.sa_handler;
	adjustformat(regs);

	/*
	 * This is subtle; if we build more than one sigframe, all but the
	 * first one will see frame format 0 and have fsize == 0, so we won't
	 * screw stkadj.
	 */
	if (fsize)
	if (fsize) {
		regs->stkadj = fsize;

	/* Prepare to skip over the extra stuff in the exception frame.  */
	if (regs->stkadj) {
		struct pt_regs *tregs =
			(struct pt_regs *)((ulong)regs + regs->stkadj);
		tregs = rte_regs(regs);
		pr_debug("Performing stackadjust=%04lx\n", regs->stkadj);
		/* This must be copied with decreasing addresses to
                   handle overlaps.  */
		tregs->vector = 0;
		tregs->format = 0;
		tregs->pc = regs->pc;
		tregs->sr = regs->sr;
	}

	/*
	 * Set up registers for signal handler.  All the state we are about
	 * to destroy is successfully copied to sigframe.
	 */
	wrusp ((unsigned long) frame);
	tregs->pc = (unsigned long) ksig->ka.sa.sa_handler;
	adjustformat(regs);
	return 0;
}

+2 −1
Original line number Diff line number Diff line
@@ -903,6 +903,8 @@ static int gmc_v10_0_hw_fini(void *handle)
{
	struct amdgpu_device *adev = (struct amdgpu_device *)handle;

	gmc_v10_0_gart_disable(adev);

	if (amdgpu_sriov_vf(adev)) {
		/* full access mode, so don't touch any GMC register */
		DRM_DEBUG("For SRIOV client, shouldn't do anything.\n");
@@ -910,7 +912,6 @@ static int gmc_v10_0_hw_fini(void *handle)
	}

	amdgpu_irq_put(adev, &adev->gmc.vm_fault, 0);
	gmc_v10_0_gart_disable(adev);

	return 0;
}
+2 −1
Original line number Diff line number Diff line
@@ -1526,6 +1526,8 @@ static int gmc_v9_0_hw_fini(void *handle)
{
	struct amdgpu_device *adev = (struct amdgpu_device *)handle;

	gmc_v9_0_gart_disable(adev);

	if (amdgpu_sriov_vf(adev)) {
		/* full access mode, so don't touch any GMC register */
		DRM_DEBUG("For SRIOV client, shouldn't do anything.\n");
@@ -1534,7 +1536,6 @@ static int gmc_v9_0_hw_fini(void *handle)

	amdgpu_irq_put(adev, &adev->gmc.ecc_irq, 0);
	amdgpu_irq_put(adev, &adev->gmc.vm_fault, 0);
	gmc_v9_0_gart_disable(adev);

	return 0;
}
+7 −0
Original line number Diff line number Diff line
@@ -301,12 +301,19 @@ static int apple_event(struct hid_device *hdev, struct hid_field *field,

/*
 * MacBook JIS keyboard has wrong logical maximum
 * Magic Keyboard JIS has wrong logical maximum
 */
static __u8 *apple_report_fixup(struct hid_device *hdev, __u8 *rdesc,
		unsigned int *rsize)
{
	struct apple_sc *asc = hid_get_drvdata(hdev);

	if(*rsize >=71 && rdesc[70] == 0x65 && rdesc[64] == 0x65) {
		hid_info(hdev,
			 "fixing up Magic Keyboard JIS report descriptor\n");
		rdesc[64] = rdesc[70] = 0xe7;
	}

	if ((asc->quirks & APPLE_RDESC_JIS) && *rsize >= 60 &&
			rdesc[53] == 0x65 && rdesc[59] == 0x65) {
		hid_info(hdev,
Loading