OpenVZ Forum


Home » Mailing lists » Devel » [PATCH v6 00/10] IPC: checkpoint/restore in userspace enhancements
Re: [PATCH v6 08/10] IPC: message queue receive cleanup [message #48379 is a reply to message #48342] Tue, 16 October 2012 07:56 Go to previous messageGo to previous message
Stanislav Kinsbursky is currently offline  Stanislav Kinsbursky
Messages: 683
Registered: October 2011
Senior Member
16.10.2012 00:03, Ben Hutchings пишет:
> On Mon, 2012-10-15 at 20:00 +0400, Stanislav Kinsbursky wrote:
>> This patch moves all message related manipulation into one function msg_fill().
>> Actually, two functions because of the compat one.
>>
>> Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com>
>> ---
>> include/linux/msg.h | 5 +++--
>> ipc/compat.c | 36 +++++++++++++++++++-----------------
>> ipc/msg.c | 44 +++++++++++++++++++++++---------------------
>> 3 files changed, 45 insertions(+), 40 deletions(-)
>>
>> diff --git a/include/linux/msg.h b/include/linux/msg.h
>> index 7a4b9e9..f38edba 100644
>> --- a/include/linux/msg.h
>> +++ b/include/linux/msg.h
>> @@ -34,7 +34,8 @@ struct msg_queue {
>> /* Helper routines for sys_msgsnd and sys_msgrcv */
>> extern long do_msgsnd(int msqid, long mtype, void __user *mtext,
>> size_t msgsz, int msgflg);
>> -extern long do_msgrcv(int msqid, long *pmtype, void __user *mtext,
>> - size_t msgsz, long msgtyp, int msgflg);
>> +extern long do_msgrcv(int msqid, void __user *buf, size_t bufsz, long msgtyp,
>> + int msgflg,
>> + long (*msg_fill)(void __user *, struct msg_msg *, size_t ));
>>
>> #endif /* _LINUX_MSG_H */
>> diff --git a/ipc/compat.c b/ipc/compat.c
>> index 84d8efd..b879d50 100644
>> --- a/ipc/compat.c
>> +++ b/ipc/compat.c
> [...]
>> @@ -394,7 +395,8 @@ long compat_sys_msgrcv(int msqid, struct compat_msgbuf __user *msgp,
>> {
>> long err, mtype;
>>
>> - err = do_msgrcv(msqid, &mtype, msgp->mtext, (ssize_t)msgsz, msgtyp, msgflg);
>> + err = do_msgrcv(msqid, &mtype, msgp->mtext, (ssize_t)msgsz, msgtyp,
>> + msgflg, compat_do_msg_fill);
>> if (err < 0)
>> goto out;
>>
> [...]
>
> That isn't even the right number of arguments now...
>

Thanks, will fix.

> Ben.
>


--
Best regards,
Stanislav Kinsbursky
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: [PATCH v6 00/10] IPC: checkpoint/restore in userspace enhancements
Next Topic: [PATCH v5] posix timers: allocate timer id per process
Goto Forum:
  


Current Time: Thu Aug 21 02:32:13 GMT 2025

Total time taken to generate the page: 0.05903 seconds