提交 b08cd961 编写于 作者: R Roel Kluin 提交者: Linus Torvalds

uml: bad macro expansion, parameter is member

`ELF_CORE_COPY_REGS(x, y)' will make expansions like:
`(y)[0] = (x)->x.gp[0]' but correct is `(y)[0] = (x)->regs.gp[0]'
Signed-off-by: NRoel Kluin <roel.kluin@gmail.com>
Cc: WANG Cong <amwang@redhat.com>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 276c974a
......@@ -66,28 +66,28 @@ typedef struct user_i387_struct elf_fpregset_t;
PT_REGS_R15(regs) = 0; \
} while (0)
#define ELF_CORE_COPY_REGS(pr_reg, regs) \
(pr_reg)[0] = (regs)->regs.gp[0]; \
(pr_reg)[1] = (regs)->regs.gp[1]; \
(pr_reg)[2] = (regs)->regs.gp[2]; \
(pr_reg)[3] = (regs)->regs.gp[3]; \
(pr_reg)[4] = (regs)->regs.gp[4]; \
(pr_reg)[5] = (regs)->regs.gp[5]; \
(pr_reg)[6] = (regs)->regs.gp[6]; \
(pr_reg)[7] = (regs)->regs.gp[7]; \
(pr_reg)[8] = (regs)->regs.gp[8]; \
(pr_reg)[9] = (regs)->regs.gp[9]; \
(pr_reg)[10] = (regs)->regs.gp[10]; \
(pr_reg)[11] = (regs)->regs.gp[11]; \
(pr_reg)[12] = (regs)->regs.gp[12]; \
(pr_reg)[13] = (regs)->regs.gp[13]; \
(pr_reg)[14] = (regs)->regs.gp[14]; \
(pr_reg)[15] = (regs)->regs.gp[15]; \
(pr_reg)[16] = (regs)->regs.gp[16]; \
(pr_reg)[17] = (regs)->regs.gp[17]; \
(pr_reg)[18] = (regs)->regs.gp[18]; \
(pr_reg)[19] = (regs)->regs.gp[19]; \
(pr_reg)[20] = (regs)->regs.gp[20]; \
#define ELF_CORE_COPY_REGS(pr_reg, _regs) \
(pr_reg)[0] = (_regs)->regs.gp[0]; \
(pr_reg)[1] = (_regs)->regs.gp[1]; \
(pr_reg)[2] = (_regs)->regs.gp[2]; \
(pr_reg)[3] = (_regs)->regs.gp[3]; \
(pr_reg)[4] = (_regs)->regs.gp[4]; \
(pr_reg)[5] = (_regs)->regs.gp[5]; \
(pr_reg)[6] = (_regs)->regs.gp[6]; \
(pr_reg)[7] = (_regs)->regs.gp[7]; \
(pr_reg)[8] = (_regs)->regs.gp[8]; \
(pr_reg)[9] = (_regs)->regs.gp[9]; \
(pr_reg)[10] = (_regs)->regs.gp[10]; \
(pr_reg)[11] = (_regs)->regs.gp[11]; \
(pr_reg)[12] = (_regs)->regs.gp[12]; \
(pr_reg)[13] = (_regs)->regs.gp[13]; \
(pr_reg)[14] = (_regs)->regs.gp[14]; \
(pr_reg)[15] = (_regs)->regs.gp[15]; \
(pr_reg)[16] = (_regs)->regs.gp[16]; \
(pr_reg)[17] = (_regs)->regs.gp[17]; \
(pr_reg)[18] = (_regs)->regs.gp[18]; \
(pr_reg)[19] = (_regs)->regs.gp[19]; \
(pr_reg)[20] = (_regs)->regs.gp[20]; \
(pr_reg)[21] = current->thread.arch.fs; \
(pr_reg)[22] = 0; \
(pr_reg)[23] = 0; \
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册