Skip to contentSkip to conversation

BLOCK: Revert patch to hack around undeclared sigset_t in linux/compat.h

PATCH In review David Howells 4 participants 8 messages Oct 2, 2006

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 BLOCK: Revert patch to hack around undeclared sigset_t in linux/compat.h

From: David Howells <[email protected]>

Revert Andrew Morton's patch to temporarily hack around the lack of a declaration of sigset_t in linux/compat.h to make the block-disablement patches build on IA64. This got accidentally pushed to Linus and should be fixed in a different manner.

---

 arch/mips/kernel/signal_n32.c |    4 ++--
 fs/compat.c                   |    2 --
 include/linux/compat.h        |    1 +
 kernel/compat.c               |    2 --
 4 files changed, 3 insertions(+), 6 deletions(-)
arch/mips/kernel/signal_n32.c +2 -2
index 50c17ea..477c533 100644
@@ -42,8 +42,6 @@ #include <asm/war.h>
 
 #include "signal-common.h"
 
-extern void sigset_from_compat(sigset_t *set, compat_sigset_t *compat);
-
 /*
  * Including <asm/unistd.h> would give use the 64-bit syscall numbers ...
  */
@@ -83,6 +81,8 @@ #if ICACHE_REFILLS_WORKAROUND_WAR
 #endif
 };
 
+extern void sigset_from_compat (sigset_t *set, compat_sigset_t *compat);
+
 save_static_function(sysn32_rt_sigsuspend);
 __attribute_used__ noinline static int
 _sysn32_rt_sigsuspend(nabi_no_regargs struct pt_regs regs)
fs/compat.c +0 -2
index 13fb08d..d98c96f 100644
@@ -56,8 +56,6 @@ #include "internal.h"
 
 int compat_log = 1;
 
-extern void sigset_from_compat(sigset_t *set, compat_sigset_t *compat);
-
 int compat_printk(const char *fmt, ...)
 {
 	va_list ap;
include/linux/compat.h +1 -0
index 9760753..967e748 100644
@@ -227,6 +227,7 @@ static inline int compat_timespec_compar
 asmlinkage long compat_sys_adjtimex(struct compat_timex __user *utp);
 
 extern int compat_printk(const char *fmt, ...);
+extern void sigset_from_compat(sigset_t *set, compat_sigset_t *compat);
 
 #endif /* CONFIG_COMPAT */
 #endif /* _LINUX_COMPAT_H */
kernel/compat.c +0 -2
index b4fbd83..75573e5 100644
@@ -26,8 +26,6 @@ #include <linux/posix-timers.h>
 
 #include <asm/uaccess.h>
 
-extern void sigset_from_compat(sigset_t *set, compat_sigset_t *compat);
-
 int get_compat_timespec(struct timespec *ts, const struct compat_timespec __user *cts)
 {
 	return (!access_ok(VERIFY_READ, cts, sizeof(*cts)) ||
#1 lore raw

PATCH 2/2 BLOCK: Fix linux/compat.h's use sigset_t

From: David Howells <[email protected]>

Make linux/compat.h #include asm/signal.h to gain a definition of sigset_t so that it can externally declare sigset_from_compat().

This has been compile-tested for i386, x86_64, ia64, mips, mips64, frv, ppc and ppc64 and run-tested on frv.

---

 include/linux/compat.h |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
include/linux/compat.h +1 -0
index 967e748..ef5cd19 100644
@@ -13,6 +13,7 @@ #include <linux/sem.h>
 
 #include <asm/compat.h>
 #include <asm/siginfo.h>
+#include <asm/signal.h>
 
 #define compat_jiffies_to_clock_t(x)	\
 		(((unsigned long)(x) * COMPAT_USER_HZ) / HZ)
#2 lore raw

Re: [PATCH 2/2] BLOCK: Fix linux/compat.h's use sigset_t

Quoted 7 lines · David Howells

From: David Howells <[email protected]>

Make linux/compat.h #include asm/signal.h to gain a definition of sigset_t so that it can externally declare sigset_from_compat().

This has been compile-tested for i386, x86_64, ia64, mips, mips64, frv, ppc and ppc64 and run-tested on frv.

Ack both patches, thanks David.

Signature · 1 line
Jens Axboe
#3 lore raw

Re: [PATCH 2/2] BLOCK: Fix linux/compat.h's use sigset_t

Quoted 10 lines · Jens Axboe
Quoted 7 lines · David Howells

From: David Howells <[email protected]>

Make linux/compat.h #include asm/signal.h to gain a definition of sigset_t so that it can externally declare sigset_from_compat().

This has been compile-tested for i386, x86_64, ia64, mips, mips64, frv, ppc and ppc64 and run-tested on frv.

Ack both patches, thanks David.

Well, I already applied them, but I applied them as a single patch (since 1/2 wasn't actually usable on its own _or_ even just a plain revert, and 2/2 was really required for 1/2 to even compile).

Linus

#4 lore raw

Re: [PATCH 2/2] BLOCK: Fix linux/compat.h's use sigset_t

Quoted 10 lines · Linus Torvalds
Quoted 6 lines · Jens Axboe
Quoted 5 lines · David Howells

From: David Howells <[email protected]>

Make linux/compat.h #include asm/signal.h to gain a definition of sigset_t so that it can externally declare sigset_from_compat().

Quoted 8 lines
Quoted 4 lines
Quoted 2 lines

This has been compile-tested for i386, x86_64, ia64, mips, mips64, frv, ppc and ppc64 and run-tested on frv.

Ack both patches, thanks David.

Well, I already applied them, but I applied them as a single patch (since 1/2 wasn't actually usable on its own _or_ even just a plain revert, and 2/2 was really required for 1/2 to even compile).

Works for me, thanks Linus.

Signature · 1 line
Jens Axboe
#5 lore raw

Re: [PATCH 2/2] BLOCK: Fix linux/compat.h's use sigset_t

In reply to Linus Torvalds
Quoted 3 lines · Linus Torvalds

Well, I already applied them, but I applied them as a single patch (since 1/2 wasn't actually usable on its own _or_ even just a plain revert, and 2/2 was really required for 1/2 to even compile).

The sigset_from_compat() calls in fs/compat.c have currently no declaration of that function.
The change for include/linux/compat.h is appearently missing.

#6 lore raw

Re: [PATCH 2/2] BLOCK: Fix linux/compat.h's use sigset_t

Quoted 9 lines · Olaf Hering
Quoted 3 lines · Linus Torvalds

Well, I already applied them, but I applied them as a single patch (since 1/2 wasn't actually usable on its own _or_ even just a plain revert, and 2/2 was really required for 1/2 to even compile).

The sigset_from_compat() calls in fs/compat.c have currently no declaration of that function.
The change for include/linux/compat.h is appearently missing.

Yeah, damn, I don't know what happened there. I fixed the patch, but then actually applied the old version, it looks like.

Duh.

Linus "uhh.. Too little coffee?" Torvalds

#7 lore raw

Re: [PATCH 2/2] BLOCK: Fix linux/compat.h's use sigset_t

Quoted 3 lines · Linus Torvalds

Yeah, damn, I don't know what happened there. I fixed the patch, but then actually applied the old version, it looks like.

Nope, I just messed up fixing the patch. Nothing to see here. I'm a maroon.

I checked in the missing line.

Linus