Loading arch/cris/arch-v32/drivers/cryptocop.c +7 −16 Original line number Diff line number Diff line Loading @@ -2717,37 +2717,28 @@ static int cryptocop_ioctl_process(struct inode *inode, struct file *filp, unsig } } /* Acquire the mm page semaphore. */ down_read(¤t->mm->mmap_sem); err = get_user_pages((unsigned long int)(oper.indata + prev_ix), err = get_user_pages_fast((unsigned long)(oper.indata + prev_ix), noinpages, 0, /* read access only for in data */ inpages, NULL); false, /* read access only for in data */ inpages); if (err < 0) { up_read(¤t->mm->mmap_sem); nooutpages = noinpages = 0; DEBUG_API(printk("cryptocop_ioctl_process: get_user_pages indata\n")); goto error_cleanup; } noinpages = err; if (oper.do_cipher) { err = get_user_pages((unsigned long int)oper.cipher_outdata, err = get_user_pages_fast((unsigned long)oper.cipher_outdata, nooutpages, FOLL_WRITE, /* write access for out data */ outpages, NULL); up_read(¤t->mm->mmap_sem); true, /* write access for out data */ outpages); if (err < 0) { nooutpages = 0; DEBUG_API(printk("cryptocop_ioctl_process: get_user_pages outdata\n")); goto error_cleanup; } nooutpages = err; } else { up_read(¤t->mm->mmap_sem); } /* Add 6 to nooutpages to make room for possibly inserted buffers for storing digest and Loading Loading
arch/cris/arch-v32/drivers/cryptocop.c +7 −16 Original line number Diff line number Diff line Loading @@ -2717,37 +2717,28 @@ static int cryptocop_ioctl_process(struct inode *inode, struct file *filp, unsig } } /* Acquire the mm page semaphore. */ down_read(¤t->mm->mmap_sem); err = get_user_pages((unsigned long int)(oper.indata + prev_ix), err = get_user_pages_fast((unsigned long)(oper.indata + prev_ix), noinpages, 0, /* read access only for in data */ inpages, NULL); false, /* read access only for in data */ inpages); if (err < 0) { up_read(¤t->mm->mmap_sem); nooutpages = noinpages = 0; DEBUG_API(printk("cryptocop_ioctl_process: get_user_pages indata\n")); goto error_cleanup; } noinpages = err; if (oper.do_cipher) { err = get_user_pages((unsigned long int)oper.cipher_outdata, err = get_user_pages_fast((unsigned long)oper.cipher_outdata, nooutpages, FOLL_WRITE, /* write access for out data */ outpages, NULL); up_read(¤t->mm->mmap_sem); true, /* write access for out data */ outpages); if (err < 0) { nooutpages = 0; DEBUG_API(printk("cryptocop_ioctl_process: get_user_pages outdata\n")); goto error_cleanup; } nooutpages = err; } else { up_read(¤t->mm->mmap_sem); } /* Add 6 to nooutpages to make room for possibly inserted buffers for storing digest and Loading