Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932456AbbBBCyq (ORCPT ); Sun, 1 Feb 2015 21:54:46 -0500 Received: from linuxhacker.ru ([217.76.32.60]:59855 "EHLO fiona.linuxhacker.ru" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1755282AbbBBCxd (ORCPT ); Sun, 1 Feb 2015 21:53:33 -0500 From: green@linuxhacker.ru To: Greg Kroah-Hartman , devel@driverdev.osuosl.org, Andreas Dilger Cc: Linux Kernel Mailing List , Patrick Farrell , Oleg Drokin Subject: [PATCH 19/20] staging/lustre/clio: Do not allow group locks with gid 0 Date: Sun, 1 Feb 2015 21:52:18 -0500 Message-Id: <1422845539-26742-20-git-send-email-green@linuxhacker.ru> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1422845539-26742-1-git-send-email-green@linuxhacker.ru> References: <1422845539-26742-1-git-send-email-green@linuxhacker.ru> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1412 Lines: 42 From: Patrick Farrell When a group lock with GID=0 is released (put_grouplock is called), an assertion in cl_put_grouplock is hit. We should not allow group lock requests with GID=0, instead we should return -EINVAL. Signed-off-by: Patrick Farrell Reviewed-on: http://review.whamcloud.com/12459 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5817 Reviewed-by: Andreas Dilger Reviewed-by: frank zago Signed-off-by: Oleg Drokin --- drivers/staging/lustre/lustre/llite/file.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/staging/lustre/lustre/llite/file.c b/drivers/staging/lustre/lustre/llite/file.c index ca270f4..7c7ef7e 100644 --- a/drivers/staging/lustre/lustre/llite/file.c +++ b/drivers/staging/lustre/lustre/llite/file.c @@ -1553,6 +1553,11 @@ ll_get_grouplock(struct inode *inode, struct file *file, unsigned long arg) struct ccc_grouplock grouplock; int rc; + if (arg == 0) { + CWARN("group id for group lock must not be 0\n"); + return -EINVAL; + } + if (ll_file_nolock(file)) return -EOPNOTSUPP; -- 2.1.0 -- 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/