Unverified Commit a08a6658 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!6631 Backport 5.10.205 LTS patches from upstream

Merge Pull Request from: @sanglipeng 
 
https://gitee.com/openeuler/kernel/issues/I9JPUP

Conflicts:
Already merged(5):
64a032015c33  atm: Fix Use-After-Free in do_vcc_ioctl
a232eb81c7cb  appletalk: Fix Use-After-Free in atalk_ioctl
7ccfc078cd47  perf: Fix perf_event_validate_size() lockdep splat
26eeec522aca  ext4: prevent the normalized size from exceeding EXT_MAX_BLOCKS
7eda5960a533  net/rose: Fix Use-After-Free in rose_ioctl

Rejected(1):
022b82336a62  PCI: loongson: Limit MRRS to 256

Kabi broken(2):
97275e470c2a  net: ipv6: support reporting otherwise unknown prefix flags in RTM_NEWPREFIX
2623cf1fe825  cred: switch to using atomic_long_t

Total patches: 60 - 5 - 1 - 2 = 52 
 
Link:https://gitee.com/openeuler/kernel/pulls/6631

 

Reviewed-by: default avatarJialin Zhang <zhangjialin11@huawei.com>
Signed-off-by: default avatarJialin Zhang <zhangjialin11@huawei.com>
parents 6a8736d8 9d8420a5
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -780,6 +780,12 @@ static inline pte_t pte_modify(pte_t pte, pgprot_t newprot)
	if (pte_hw_dirty(pte))
		pte = pte_mkdirty(pte);
	pte_val(pte) = (pte_val(pte) & ~mask) | (pgprot_val(newprot) & mask);
	/*
	 * If we end up clearing hw dirtiness for a sw-dirty PTE, set hardware
	 * dirtiness again.
	 */
	if (pte_sw_dirty(pte))
		pte = pte_mkdirty(pte);
	return pte;
}

+13 −4
Original line number Diff line number Diff line
@@ -36,6 +36,9 @@ _GLOBAL(ftrace_regs_caller)
	/* Save the original return address in A's stack frame */
	std	r0,LRSAVE(r1)

	/* Create a minimal stack frame for representing B */
	stdu	r1, -STACK_FRAME_MIN_SIZE(r1)

	/* Create our stack frame + pt_regs */
	stdu	r1,-SWITCH_FRAME_SIZE(r1)

@@ -52,7 +55,7 @@ _GLOBAL(ftrace_regs_caller)
	SAVE_10GPRS(22, r1)

	/* Save previous stack pointer (r1) */
	addi	r8, r1, SWITCH_FRAME_SIZE
	addi	r8, r1, SWITCH_FRAME_SIZE+STACK_FRAME_MIN_SIZE
	std	r8, GPR1(r1)

	/* Load special regs for save below */
@@ -65,6 +68,8 @@ _GLOBAL(ftrace_regs_caller)
	mflr	r7
	/* Save it as pt_regs->nip */
	std     r7, _NIP(r1)
	/* Also save it in B's stackframe header for proper unwind */
	std	r7, LRSAVE+SWITCH_FRAME_SIZE(r1)
	/* Save the read LR in pt_regs->link */
	std     r0, _LINK(r1)

@@ -121,7 +126,7 @@ ftrace_regs_call:
	ld	r2, 24(r1)

	/* Pop our stack frame */
	addi r1, r1, SWITCH_FRAME_SIZE
	addi r1, r1, SWITCH_FRAME_SIZE+STACK_FRAME_MIN_SIZE

#ifdef CONFIG_LIVEPATCH
        /* Based on the cmpd above, if the NIP was altered handle livepatch */
@@ -145,7 +150,7 @@ ftrace_no_trace:
	mflr	r3
	mtctr	r3
	REST_GPR(3, r1)
	addi	r1, r1, SWITCH_FRAME_SIZE
	addi	r1, r1, SWITCH_FRAME_SIZE+STACK_FRAME_MIN_SIZE
	mtlr	r0
	bctr

@@ -153,6 +158,9 @@ _GLOBAL(ftrace_caller)
	/* Save the original return address in A's stack frame */
	std	r0, LRSAVE(r1)

	/* Create a minimal stack frame for representing B */
	stdu	r1, -STACK_FRAME_MIN_SIZE(r1)

	/* Create our stack frame + pt_regs */
	stdu	r1, -SWITCH_FRAME_SIZE(r1)

@@ -166,6 +174,7 @@ _GLOBAL(ftrace_caller)
	/* Get the _mcount() call site out of LR */
	mflr	r7
	std     r7, _NIP(r1)
	std	r7, LRSAVE+SWITCH_FRAME_SIZE(r1)

	/* Save callee's TOC in the ABI compliant location */
	std	r2, 24(r1)
@@ -200,7 +209,7 @@ ftrace_call:
	ld	r2, 24(r1)

	/* Pop our stack frame */
	addi	r1, r1, SWITCH_FRAME_SIZE
	addi	r1, r1, SWITCH_FRAME_SIZE+STACK_FRAME_MIN_SIZE

	/* Reload original LR */
	ld	r0, LRSAVE(r1)
+2 −0
Original line number Diff line number Diff line
@@ -1480,6 +1480,7 @@ static void tg_conf_updated(struct throtl_grp *tg, u64 *old_limits, bool global)
		   tg_bps_limit(tg, READ), tg_bps_limit(tg, WRITE),
		   tg_iops_limit(tg, READ), tg_iops_limit(tg, WRITE));

	rcu_read_lock();
	/*
	 * Update has_rules[] flags for the updated tg's subtree.  A tg is
	 * considered to have rules if either the tg itself or any of its
@@ -1507,6 +1508,7 @@ static void tg_conf_updated(struct throtl_grp *tg, u64 *old_limits, bool global)
		this_tg->latency_target = max(this_tg->latency_target,
				parent_tg->latency_target);
	}
	rcu_read_unlock();

	throtl_update_slice(tg, old_limits);

+4 −4
Original line number Diff line number Diff line
@@ -449,9 +449,9 @@ static ssize_t console_show(struct device *dev, struct device_attribute *attr,
	struct sk_buff *skb;
	unsigned int len;

	spin_lock(&card->cli_queue_lock);
	spin_lock_bh(&card->cli_queue_lock);
	skb = skb_dequeue(&card->cli_queue[SOLOS_CHAN(atmdev)]);
	spin_unlock(&card->cli_queue_lock);
	spin_unlock_bh(&card->cli_queue_lock);
	if(skb == NULL)
		return sprintf(buf, "No data.\n");

@@ -956,14 +956,14 @@ static void pclose(struct atm_vcc *vcc)
	struct pkt_hdr *header;

	/* Remove any yet-to-be-transmitted packets from the pending queue */
	spin_lock(&card->tx_queue_lock);
	spin_lock_bh(&card->tx_queue_lock);
	skb_queue_walk_safe(&card->tx_queue[port], skb, tmpskb) {
		if (SKB_CB(skb)->vcc == vcc) {
			skb_unlink(skb, &card->tx_queue[port]);
			solos_pop(vcc, skb);
		}
	}
	spin_unlock(&card->tx_queue_lock);
	spin_unlock_bh(&card->tx_queue_lock);

	skb = alloc_skb(sizeof(*header), GFP_KERNEL);
	if (!skb) {
+5 −0
Original line number Diff line number Diff line
@@ -582,6 +582,7 @@ static void mtk_drm_crtc_atomic_begin(struct drm_crtc *crtc,
{
	struct mtk_crtc_state *state = to_mtk_crtc_state(crtc->state);
	struct mtk_drm_crtc *mtk_crtc = to_mtk_crtc(crtc);
	unsigned long flags;

	if (mtk_crtc->event && state->base.event)
		DRM_ERROR("new event while there is still a pending event\n");
@@ -589,7 +590,11 @@ static void mtk_drm_crtc_atomic_begin(struct drm_crtc *crtc,
	if (state->base.event) {
		state->base.event->pipe = drm_crtc_index(crtc);
		WARN_ON(drm_crtc_vblank_get(crtc) != 0);

		spin_lock_irqsave(&crtc->dev->event_lock, flags);
		mtk_crtc->event = state->base.event;
		spin_unlock_irqrestore(&crtc->dev->event_lock, flags);

		state->base.event = NULL;
	}
}
Loading