kern_memio: don't treat any memio device as /dev/zero
authorSimon Schubert <corecode@dragonflybsd.org>
Fri, 7 Aug 2009 19:58:53 +0000 (21:58 +0200)
committerSimon Schubert <corecode@dragonflybsd.org>
Fri, 7 Aug 2009 20:03:54 +0000 (22:03 +0200)
We actually have to compare zerodev to the passed argument in
iszerodev(), and not compare it to NULL.

sys/kern/kern_memio.c

index 7ea25aa..1f2b1e1 100644 (file)
@@ -549,7 +549,7 @@ mmpoll(struct dev_poll_args *ap)
 int
 iszerodev(cdev_t dev)
 {
-       return (zerodev != NULL);
+       return (zerodev == dev);
 }
 
 static void