Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Roel Kluin and committed by
Greg Kroah-Hartman
dcbbcefb 05d6d677

+1 -1
+1 -1
drivers/staging/poch/poch.c
··· 1026 1026 } 1027 1027 break; 1028 1028 case POCH_IOC_GET_COUNTERS: 1029 - if (access_ok(VERIFY_WRITE, argp, sizeof(struct poch_counters))) 1029 + if (!access_ok(VERIFY_WRITE, argp, sizeof(struct poch_counters))) 1030 1030 return -EFAULT; 1031 1031 1032 1032 spin_lock_irq(&channel->counters_lock);