From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dan Carpenter Date: Thu, 10 Nov 2016 19:41:05 +0000 Subject: [patch] staging: lustre: lov: crash in error handling Message-Id: <20161110194105.GB18347@mwanda> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Oleg Drokin , "John L. Hammond" Cc: Andreas Dilger , James Simmons , Greg Kroah-Hartman , Amitoj Kaur Chawla , lustre-devel@lists.lustre.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org We accidentally made this unsigned so now the error handling will loop until it crashes. Fixes: 55051039fdad ('staging: lustre: lov: remove LSM from struct lustre_md') Signed-off-by: Dan Carpenter diff --git a/drivers/staging/lustre/lustre/lov/lov_ea.c b/drivers/staging/lustre/lustre/lov/lov_ea.c index 53db170..2e2abed 100644 --- a/drivers/staging/lustre/lustre/lov/lov_ea.c +++ b/drivers/staging/lustre/lustre/lov/lov_ea.c @@ -81,7 +81,7 @@ struct lov_stripe_md *lsm_alloc_plain(u16 stripe_count) size_t oinfo_ptrs_size, lsm_size; struct lov_stripe_md *lsm; struct lov_oinfo *loi; - unsigned int i; + int i; LASSERT(stripe_count <= LOV_MAX_STRIPE_COUNT); From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dan Carpenter Date: Thu, 10 Nov 2016 22:41:05 +0300 Subject: [lustre-devel] [patch] staging: lustre: lov: crash in error handling Message-ID: <20161110194105.GB18347@mwanda> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Oleg Drokin , "John L. Hammond" Cc: Andreas Dilger , James Simmons , Greg Kroah-Hartman , Amitoj Kaur Chawla , lustre-devel@lists.lustre.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org We accidentally made this unsigned so now the error handling will loop until it crashes. Fixes: 55051039fdad ('staging: lustre: lov: remove LSM from struct lustre_md') Signed-off-by: Dan Carpenter diff --git a/drivers/staging/lustre/lustre/lov/lov_ea.c b/drivers/staging/lustre/lustre/lov/lov_ea.c index 53db170..2e2abed 100644 --- a/drivers/staging/lustre/lustre/lov/lov_ea.c +++ b/drivers/staging/lustre/lustre/lov/lov_ea.c @@ -81,7 +81,7 @@ struct lov_stripe_md *lsm_alloc_plain(u16 stripe_count) size_t oinfo_ptrs_size, lsm_size; struct lov_stripe_md *lsm; struct lov_oinfo *loi; - unsigned int i; + int i; LASSERT(stripe_count <= LOV_MAX_STRIPE_COUNT); From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935920AbcKJTmE (ORCPT ); Thu, 10 Nov 2016 14:42:04 -0500 Received: from aserp1040.oracle.com ([141.146.126.69]:39886 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935174AbcKJTmC (ORCPT ); Thu, 10 Nov 2016 14:42:02 -0500 Date: Thu, 10 Nov 2016 22:41:05 +0300 From: Dan Carpenter To: Oleg Drokin , "John L. Hammond" Cc: Andreas Dilger , James Simmons , Greg Kroah-Hartman , Amitoj Kaur Chawla , lustre-devel@lists.lustre.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [patch] staging: lustre: lov: crash in error handling Message-ID: <20161110194105.GB18347@mwanda> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.6.0 (2016-04-01) X-Source-IP: userv0022.oracle.com [156.151.31.74] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We accidentally made this unsigned so now the error handling will loop until it crashes. Fixes: 55051039fdad ('staging: lustre: lov: remove LSM from struct lustre_md') Signed-off-by: Dan Carpenter diff --git a/drivers/staging/lustre/lustre/lov/lov_ea.c b/drivers/staging/lustre/lustre/lov/lov_ea.c index 53db170..2e2abed 100644 --- a/drivers/staging/lustre/lustre/lov/lov_ea.c +++ b/drivers/staging/lustre/lustre/lov/lov_ea.c @@ -81,7 +81,7 @@ struct lov_stripe_md *lsm_alloc_plain(u16 stripe_count) size_t oinfo_ptrs_size, lsm_size; struct lov_stripe_md *lsm; struct lov_oinfo *loi; - unsigned int i; + int i; LASSERT(stripe_count <= LOV_MAX_STRIPE_COUNT);