From: Jonathan Corbet <corbet@lwn.net>
To: Mathura_Kumar <academic1mathura@gmail.com>, brauner@kernel.org
Cc: academic1mathura@gmail.com, linux-arch@vger.kernel.org,
linux-kernel@vger.kernel.org, viro@zeniv.linux.org.uk
Subject: Re: [PATCH RESEND v2 1/4]IPC: Added New system call do_mq_timedreceive2() for non-destructive peek on posix mqueue
Date: Tue, 31 Mar 2026 10:17:30 -0600 [thread overview]
Message-ID: <87jyuskm79.fsf@trenco.lwn.net> (raw)
In-Reply-To: <20260320052340.6696-2-academic1mathura@gmail.com>
One other thing I noticed ...
Mathura_Kumar <academic1mathura@gmail.com> writes:
> Signed-off-by: Mathura_Kumar <academic1mathura@gmail.com>
> ---
> include/linux/compat.h | 6 +-
> include/linux/syscalls.h | 6 +
> include/uapi/asm-generic/unistd.h | 7 +-
> include/uapi/linux/mqueue.h | 14 ++-
> ipc/mqueue.c | 186 ++++++++++++++++++++++++++++--
> ipc/msg.c | 2 +-
> ipc/msgutil.c | 48 ++++----
> ipc/util.h | 3 +-
> kernel/sys_ni.c | 1 +
> 9 files changed, 231 insertions(+), 42 deletions(-)
[...]
> +static int do_mq_timedreceive2(mqd_t mqdes, struct mq_timedreceive2_args *args,
> + unsigned int flags, unsigned long index,
> + struct timespec64 *ts)
> +{
> + ssize_t ret;
> + struct msg_msg *msg_ptr, *k_msg_buffer;
> + long k_m_type;
> + size_t k_m_ts;
> + struct inode *inode;
> + struct mqueue_inode_info *info;
> +
> + if (!(flags & MQ_PEEK)) {
> + return do_mq_timedreceive(mqdes, args->msg_ptr, args->msg_len,
> + args->msg_prio, ts);
> + }
You don't check for unknown flags here; that will make impossible to add
new flags in the future.
jon
next prev parent reply other threads:[~2026-03-31 16:17 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-20 5:23 [PATCH RESEND v2 0/4] Add new system call for non-destructive peek and inspection to posix ipc mqueue Mathura_Kumar
2026-03-20 5:23 ` [PATCH RESEND v2 1/4]IPC: Added New system call do_mq_timedreceive2() for non-destructive peek on posix mqueue Mathura_Kumar
2026-03-30 20:02 ` Jonathan Corbet
2026-03-31 16:17 ` Jonathan Corbet [this message]
2026-03-20 5:23 ` [PATCH RESEND v2 2/4]IPC: Added system call number in all most common arch Mathura_Kumar
2026-03-20 5:23 ` [PATCH RESEND v2 3/4]IPC: Prepared Documentation and test Mathura_Kumar
2026-03-20 5:23 ` [PATCH RESEND v2 4/4]IPC:Added entry in performance tools for new system call Mathura_Kumar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87jyuskm79.fsf@trenco.lwn.net \
--to=corbet@lwn.net \
--cc=academic1mathura@gmail.com \
--cc=brauner@kernel.org \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox