All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] ipc/mq: Do not vaild queue attributes default/ceiling value If the user pass attr as NULL
@ 2013-08-12 15:09 Sasikantha Babu
  2013-08-12 15:09 ` [PATCH 2/2] ipc/mq: Removed unused def_attr local variable and its initialization in do_create Sasikantha Babu
  2013-08-15 20:01 ` [PATCH 1/2] ipc/mq: Do not vaild queue attributes default/ceiling value If the user pass attr as NULL Doug Ledford
  0 siblings, 2 replies; 4+ messages in thread
From: Sasikantha Babu @ 2013-08-12 15:09 UTC (permalink / raw)
  To: Al Viro, Jeff Layton, Andrew Morton, Eric W. Biederman,
	Vladimir Davydov
  Cc: linux-kernel, Sasikantha Babu

Kernel should not validate queue attributes default/ceiling value while
creating a mqueue, if user pass attr as NULL. Otherwise In worst case
If the validation fails then sys_mq_open returns -EINVAL/-EOVERFLOW
which will make user clueless about reason for the failure.

Signed-off-by: Sasikantha Babu <sasikanth.v19@gmail.com>
---
 ipc/mqueue.c |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)

diff --git a/ipc/mqueue.c b/ipc/mqueue.c
index ae1996d..04ece80 100644
--- a/ipc/mqueue.c
+++ b/ipc/mqueue.c
@@ -748,9 +748,6 @@ static struct file *do_create(struct ipc_namespace *ipc_ns, struct inode *dir,
 					 ipc_ns->mq_msg_default);
 		def_attr.mq_msgsize = min(ipc_ns->mq_msgsize_max,
 					  ipc_ns->mq_msgsize_default);
-		ret = mq_attr_ok(ipc_ns, &def_attr);
-		if (ret)
-			return ERR_PTR(ret);
 	}
 
 	mode &= ~current_umask();
-- 
1.7.3.4


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-08-15 20:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-12 15:09 [PATCH 1/2] ipc/mq: Do not vaild queue attributes default/ceiling value If the user pass attr as NULL Sasikantha Babu
2013-08-12 15:09 ` [PATCH 2/2] ipc/mq: Removed unused def_attr local variable and its initialization in do_create Sasikantha Babu
2013-08-15 20:06   ` Doug Ledford
2013-08-15 20:01 ` [PATCH 1/2] ipc/mq: Do not vaild queue attributes default/ceiling value If the user pass attr as NULL Doug Ledford

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.