Merge branch 'hwpoison-fixes-2.6.37' into hwpoison
authorAndi Kleen <ak@linux.intel.com>
Fri, 22 Oct 2010 15:40:07 +0000 (17:40 +0200)
committerAndi Kleen <ak@linux.intel.com>
Fri, 22 Oct 2010 15:40:07 +0000 (17:40 +0200)
arch/ia64/include/asm/siginfo.h
fs/signalfd.c
include/linux/signalfd.h

index 118d4297900319df2d97840fc7149cce0ad8610c..c8fcaa2ac48f88f13bd93e1d25fd3fd5d2031c6a 100644 (file)
@@ -62,6 +62,7 @@ typedef struct siginfo {
                        int _imm;               /* immediate value for "break" */
                        unsigned int _flags;    /* see below */
                        unsigned long _isr;     /* isr */
+                       short _addr_lsb;        /* lsb of faulting address */
                } _sigfault;
 
                /* SIGPOLL */
index 1c5a6add779d07c1da65aa644d2300ef89dfe7d8..bdd4496ae67fb8e423820c8acb798154a5c55ba2 100644 (file)
@@ -98,6 +98,16 @@ static int signalfd_copyinfo(struct signalfd_siginfo __user *uinfo,
                err |= __put_user((long) kinfo->si_addr, &uinfo->ssi_addr);
 #ifdef __ARCH_SI_TRAPNO
                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_code == BUS_MCEERR_AR ||
+                   kinfo->si_code == BUS_MCEERR_AO)
+                       err |= __put_user((short) kinfo->si_addr_lsb,
+                                         &uinfo->ssi_addr_lsb);
 #endif
                break;
        case __SI_CHLD:
index b363b916c90961a9d61877f26d900d9111aeacb7..3ff4961da9b514992cf0edabf07c1b08d2121027 100644 (file)
@@ -33,6 +33,7 @@ struct signalfd_siginfo {
        __u64 ssi_utime;
        __u64 ssi_stime;
        __u64 ssi_addr;
+       __u16 ssi_addr_lsb;
 
        /*
         * Pad strcture to 128 bytes. Remember to update the
@@ -43,7 +44,7 @@ struct signalfd_siginfo {
         * comes out of a read(2) and we really don't want to have
         * a compat on read(2).
         */
-       __u8 __pad[48];
+       __u8 __pad[46];
 };