hulk inclusion category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/I65RG3?from=project-issue CVE: NA
--------------------------------
This reverts commit a569e359009d31a736879ba182f7b8a2e42e4436.
Because the list_add double bug has been fixed in linux stable 5.10 and the related patches will be merged in this patch set.
Signed-off-by: Jinjie Ruan ruanjinjie@huawei.com --- arch/arm64/kernel/armv8_deprecated.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/arch/arm64/kernel/armv8_deprecated.c b/arch/arm64/kernel/armv8_deprecated.c index ab955c249f37..4a0ba2800e45 100644 --- a/arch/arm64/kernel/armv8_deprecated.c +++ b/arch/arm64/kernel/armv8_deprecated.c @@ -208,12 +208,10 @@ static int emulation_proc_handler(struct ctl_table *table, int write, loff_t *ppos) { int ret = 0; - struct insn_emulation *insn; - enum insn_emulation_mode prev_mode; + struct insn_emulation *insn = container_of(table->data, struct insn_emulation, current_mode); + enum insn_emulation_mode prev_mode = insn->current_mode;
mutex_lock(&insn_emulation_mutex); - insn = container_of(table->data, struct insn_emulation, current_mode); - prev_mode = insn->current_mode; ret = proc_dointvec_minmax(table, write, buffer, lenp, ppos);
if (ret || !write || prev_mode == insn->current_mode)