]> granicus.if.org Git - zfs/commitdiff
Proposed fix for oops on SIGINT in splat atomic:64-bit test.
authorNed Bass <bass6@llnl.gov>
Thu, 15 Jul 2010 16:49:38 +0000 (09:49 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Thu, 15 Jul 2010 19:50:15 +0000 (12:50 -0700)
The threads in the splat atomic:64-bit test share the data structure
atomic_priv_t ap, which lives on the kernel stack of the splat user-space
utility.  If splat terminates before the threads, accesses to that memory
location by the other threads become invalid.  Splat synchronizes with
the threads with the call:

wait_event_interruptible(ap.ap_waitq, splat_atomic_test1_cond(&ap, i));

Apparently, the SIGINT wakes and terminates splat prematurely, so that
GPFs or other bad things happen when the threads subsequently access ap.
This commit prevents this by using the uninterruptible form:

wait_event(ap.ap_waitq, splat_atomic_test1_cond(&ap, i));

module/splat/splat-atomic.c

index 9cdaa69df99a8be382060858210694b4486f28db..fd86a9fa86becf38d1dd111b92d9a8f9a486a4fe 100644 (file)
@@ -165,7 +165,7 @@ splat_atomic_test1(struct file *file, void *arg)
                schedule();
        }
 
-       wait_event_interruptible(ap.ap_waitq, splat_atomic_test1_cond(&ap, i));
+       wait_event(ap.ap_waitq, splat_atomic_test1_cond(&ap, i));
 
        if (rc) {
                splat_vprint(file, SPLAT_ATOMIC_TEST1_NAME, "Only started "