then it kmalloc() the memory for the message and copies the data from
user space into the kernel structure:
> /* allocate message header and text space*/
> msgh = (struct msg *) kmalloc (sizeof(*msgh) + msgsz, GFP_KERNEL);
> if (!msgh)
> return -ENOMEM;
> msgh->msg_spot = (char *) (msgh + 1);
>
> if (copy_from_user(msgh->msg_spot, msgp->mtext, msgsz))
> {
> kfree(msgh);
> return -EFAULT;
> }
Both kmalloc() and copy_from_user() could sleep.
I think this is a bug.
Has anyone tried to replace the current shm implementation with a
deserialized one, ie without the lock_kernel() calls?
-- Manfred- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/