linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] binfmt_elf: Fix fill_prstatus() call in fill_note_info()
@ 2021-01-06  7:49 Geert Uytterhoeven
  0 siblings, 0 replies; only message in thread
From: Geert Uytterhoeven @ 2021-01-06  7:49 UTC (permalink / raw)
  To: Alexander Viro; +Cc: linux-fsdevel, linux-kernel

On m68k, which does not define CORE_DUMP_USE_REGSET:

    fs/binfmt_elf.c: In function ‘fill_note_info’:
    fs/binfmt_elf.c:2040:20: error: passing argument 1 of ‘fill_prstatus’ from incompatible pointer type [-Werror=incompatible-pointer-types]
     2040 |  fill_prstatus(info->prstatus, current, siginfo->si_signo);
	  |                ~~~~^~~~~~~~~~
	  |                    |
	  |                    struct elf_prstatus *
    fs/binfmt_elf.c:1498:55: note: expected ‘struct elf_prstatus_common *’ but argument is of type ‘struct elf_prstatus *’
     1498 | static void fill_prstatus(struct elf_prstatus_common *prstatus,
	  |                           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~

The fill_prstatus() signature was changed, but one caller was not
updated.

Reported-by: noreply@ellerman.id.au
Fixes: 147d88b334cd5416 ("elf_prstatus: collect the common part (everything before pr_reg) into a struct")
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
Compile-tested only.  Feel free to fold into the original commit.
---
 fs/binfmt_elf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c
index 1b678aff3bac93eb..4c1550b13899efd7 100644
--- a/fs/binfmt_elf.c
+++ b/fs/binfmt_elf.c
@@ -2037,7 +2037,7 @@ static int fill_note_info(struct elfhdr *elf, int phdrs,
 	}
 	/* now collect the dump for the current */
 	memset(info->prstatus, 0, sizeof(*info->prstatus));
-	fill_prstatus(info->prstatus, current, siginfo->si_signo);
+	fill_prstatus(&info->prstatus->common, current, siginfo->si_signo);
 	elf_core_copy_regs(&info->prstatus->pr_reg, regs);
 
 	/* Set up header */
-- 
2.25.1


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-01-06  7:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-06  7:49 [PATCH] binfmt_elf: Fix fill_prstatus() call in fill_note_info() Geert Uytterhoeven

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).