Re: [PATCH] CKRM: 4/10 CKRM: Full rcfs support

From: Arjan van de Ven
Date: Thu Feb 24 2005 - 05:21:41 EST


On Thu, 2005-02-24 at 01:33 -0800, Gerrit Huizenga wrote:

> > > + if (!access_ok(VERIFY_READ, buf, count))
> > > + return -EFAULT;
> > > + down(&(ri->vfs_inode.i_sem));
> > > + optbuf = kmalloc(TARGET_MAX_INPUT_SIZE, GFP_KERNEL);
> >
> > kmalloc with a lock held? Is that a good idea?
>
> Lock? Or sema? Sema should be okay here, right?

not if that semaphore can be grabbed from a file data write out path...

and the semaphore sounds VFS-ish so it sure makes me nervous.



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/