Ver Fonte

Staging: poch: fix verification of memory area

fix verification of memory area

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Roel Kluin há 16 anos atrás
pai
commit
dcbbcefb6a
1 ficheiros alterados com 1 adições e 1 exclusões
  1. 1 1
      drivers/staging/poch/poch.c

+ 1 - 1
drivers/staging/poch/poch.c

@@ -1026,7 +1026,7 @@ static int poch_ioctl(struct inode *inode, struct file *filp,
 		}
 		}
 		break;
 		break;
 	case POCH_IOC_GET_COUNTERS:
 	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;
 			return -EFAULT;
 
 
 		spin_lock_irq(&channel->counters_lock);
 		spin_lock_irq(&channel->counters_lock);