Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756910Ab3HLPJw (ORCPT ); Mon, 12 Aug 2013 11:09:52 -0400 Received: from mail-ve0-f171.google.com ([209.85.128.171]:42566 "EHLO mail-ve0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756228Ab3HLPJv (ORCPT ); Mon, 12 Aug 2013 11:09:51 -0400 From: Sasikantha Babu To: Al Viro , Jeff Layton , Andrew Morton , "Eric W. Biederman" , Vladimir Davydov Cc: linux-kernel@vger.kernel.org, Sasikantha Babu Subject: [PATCH 1/2] ipc/mq: Do not vaild queue attributes default/ceiling value If the user pass attr as NULL Date: Mon, 12 Aug 2013 20:39:41 +0530 Message-Id: <1376320182-2118-1-git-send-email-sasikanth.v19@gmail.com> X-Mailer: git-send-email 1.7.3.4 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1107 Lines: 32 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 --- 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/