Skip to contentSkip to conversation

siginfo fix for v4.16-rc3

GIT PULL Eric W. Biederman 1 participant 1 message Feb 22, 2018 VFS

lore
Share & tools
lore
#0 lore raw

Linus,

Please pull the siginfo-linus branch from the git tree:

git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace.git siginfo-linus

HEAD: 9026e820cbd2ea39a06a129ecdddf2739bd3602b fs/signalfd: fix build error for BUS_MCEERR_AR

This change fixes a build error that should only shows up on blackfin.

From: Randy Dunlap <[email protected]>
Date: Mon, 12 Feb 2018 13:18:38 -0800
Subject: [PATCH] fs/signalfd: fix build error for BUS_MCEERR_AR

Fix build error in fs/signalfd.c by using same method that is used in kernel/signal.c: separate blocks for different signal si_code values.

./fs/signalfd.c: error: 'BUS_MCEERR_AR' undeclared (first use in this function)

---
 fs/signalfd.c | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)
fs/signalfd.c +12 -3
index 9990957264e3..76bf9cc62074 100644
@@ -118,13 +118,22 @@ static int signalfd_copyinfo(struct signalfd_siginfo __user *uinfo,
 		err |= __put_user(kinfo->si_trapno, &uinfo->ssi_trapno);
 #endif
 #ifdef BUS_MCEERR_AO
-		/* 
+		/*
+		 * Other callers might not initialize the si_lsb field,
+		 * so check explicitly for the right codes here.
+		 */
+		if (kinfo->si_signo == SIGBUS &&
+		     kinfo->si_code == BUS_MCEERR_AO)
+			err |= __put_user((short) kinfo->si_addr_lsb,
+					  &uinfo->ssi_addr_lsb);
+#endif
+#ifdef BUS_MCEERR_AR
+		/*
 		 * Other callers might not initialize the si_lsb field,
 		 * so check explicitly for the right codes here.
 		 */
 		if (kinfo->si_signo == SIGBUS &&
-		    (kinfo->si_code == BUS_MCEERR_AR ||
-		     kinfo->si_code == BUS_MCEERR_AO))
+		    kinfo->si_code == BUS_MCEERR_AR)
 			err |= __put_user((short) kinfo->si_addr_lsb,
 					  &uinfo->ssi_addr_lsb);
 #endif
Signature · 1 line
2.14.1