diff options
| -rw-r--r-- | arch/ia64/include/asm/siginfo.h | 1 | ||||
| -rw-r--r-- | fs/signalfd.c | 10 | ||||
| -rw-r--r-- | include/linux/signalfd.h | 3 |
3 files changed, 13 insertions, 1 deletions
diff --git a/arch/ia64/include/asm/siginfo.h b/arch/ia64/include/asm/siginfo.h index 118d42979003..c8fcaa2ac48f 100644 --- a/arch/ia64/include/asm/siginfo.h +++ b/arch/ia64/include/asm/siginfo.h | |||
| @@ -62,6 +62,7 @@ typedef struct siginfo { | |||
| 62 | int _imm; /* immediate value for "break" */ | 62 | int _imm; /* immediate value for "break" */ |
| 63 | unsigned int _flags; /* see below */ | 63 | unsigned int _flags; /* see below */ |
| 64 | unsigned long _isr; /* isr */ | 64 | unsigned long _isr; /* isr */ |
| 65 | short _addr_lsb; /* lsb of faulting address */ | ||
| 65 | } _sigfault; | 66 | } _sigfault; |
| 66 | 67 | ||
| 67 | /* SIGPOLL */ | 68 | /* SIGPOLL */ |
diff --git a/fs/signalfd.c b/fs/signalfd.c index 1c5a6add779d..bdd4496ae67f 100644 --- a/fs/signalfd.c +++ b/fs/signalfd.c | |||
| @@ -99,6 +99,16 @@ static int signalfd_copyinfo(struct signalfd_siginfo __user *uinfo, | |||
| 99 | #ifdef __ARCH_SI_TRAPNO | 99 | #ifdef __ARCH_SI_TRAPNO |
| 100 | err |= __put_user(kinfo->si_trapno, &uinfo->ssi_trapno); | 100 | err |= __put_user(kinfo->si_trapno, &uinfo->ssi_trapno); |
| 101 | #endif | 101 | #endif |
| 102 | #ifdef BUS_MCEERR_AO | ||
| 103 | /* | ||
| 104 | * Other callers might not initialize the si_lsb field, | ||
| 105 | * so check explicitly for the right codes here. | ||
| 106 | */ | ||
| 107 | if (kinfo->si_code == BUS_MCEERR_AR || | ||
| 108 | kinfo->si_code == BUS_MCEERR_AO) | ||
| 109 | err |= __put_user((short) kinfo->si_addr_lsb, | ||
| 110 | &uinfo->ssi_addr_lsb); | ||
| 111 | #endif | ||
| 102 | break; | 112 | break; |
| 103 | case __SI_CHLD: | 113 | case __SI_CHLD: |
| 104 | err |= __put_user(kinfo->si_pid, &uinfo->ssi_pid); | 114 | err |= __put_user(kinfo->si_pid, &uinfo->ssi_pid); |
diff --git a/include/linux/signalfd.h b/include/linux/signalfd.h index b363b916c909..3ff4961da9b5 100644 --- a/include/linux/signalfd.h +++ b/include/linux/signalfd.h | |||
| @@ -33,6 +33,7 @@ struct signalfd_siginfo { | |||
| 33 | __u64 ssi_utime; | 33 | __u64 ssi_utime; |
| 34 | __u64 ssi_stime; | 34 | __u64 ssi_stime; |
| 35 | __u64 ssi_addr; | 35 | __u64 ssi_addr; |
| 36 | __u16 ssi_addr_lsb; | ||
| 36 | 37 | ||
| 37 | /* | 38 | /* |
| 38 | * Pad strcture to 128 bytes. Remember to update the | 39 | * Pad strcture to 128 bytes. Remember to update the |
| @@ -43,7 +44,7 @@ struct signalfd_siginfo { | |||
| 43 | * comes out of a read(2) and we really don't want to have | 44 | * comes out of a read(2) and we really don't want to have |
| 44 | * a compat on read(2). | 45 | * a compat on read(2). |
| 45 | */ | 46 | */ |
| 46 | __u8 __pad[48]; | 47 | __u8 __pad[46]; |
| 47 | }; | 48 | }; |
| 48 | 49 | ||
| 49 | 50 | ||
