From: Roel Kluin Date: Wed, 28 Jan 2009 21:14:17 +0000 (+0100) Subject: Staging: poch: fix verification of memory area X-Git-Tag: v2.6.29-rc4~99^2 X-Git-Url: http://pileus.org/git/?a=commitdiff_plain;h=dcbbcefb6a6d540b605421e85fbaa4cea3fef5a2;p=~andy%2Flinux Staging: poch: fix verification of memory area fix verification of memory area Signed-off-by: Roel Kluin Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/poch/poch.c b/drivers/staging/poch/poch.c index ec343ef53a8..0d111ddfabb 100644 --- a/drivers/staging/poch/poch.c +++ b/drivers/staging/poch/poch.c @@ -1026,7 +1026,7 @@ static int poch_ioctl(struct inode *inode, struct file *filp, } break; case POCH_IOC_GET_COUNTERS: - if (access_ok(VERIFY_WRITE, argp, sizeof(struct poch_counters))) + if (!access_ok(VERIFY_WRITE, argp, sizeof(struct poch_counters))) return -EFAULT; spin_lock_irq(&channel->counters_lock);