From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752488AbcHLPlS (ORCPT ); Fri, 12 Aug 2016 11:41:18 -0400 Received: from mga04.intel.com ([192.55.52.120]:63779 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750708AbcHLPj7 (ORCPT ); Fri, 12 Aug 2016 11:39:59 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,511,1464678000"; d="scan'208";a="747884128" Message-ID: <1471016396.29184.11.camel@linux.intel.com> Subject: Re: [PATCH] UBIFS: fix assertion in layout_in_gaps() From: Artem Bityutskiy Reply-To: artem.bityutskiy@linux.intel.com To: Vincent =?ISO-8859-1?Q?Stehl=E9?= , linux-mtd@lists.infradead.org Cc: linux-kernel@vger.kernel.org Date: Fri, 12 Aug 2016 18:39:56 +0300 In-Reply-To: <1471008390-19227-1-git-send-email-vincent.stehle@intel.com> References: <1471008390-19227-1-git-send-email-vincent.stehle@intel.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.20.4 (3.20.4-1.fc24) Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 2016-08-12 at 15:26 +0200, Vincent Stehlé wrote: > An assertion in layout_in_gaps() verifies that the gap_lebs pointer > is > below the maximum bound. When computing this maximum bound the > idx_lebs > count is multiplied by sizeof(int), while C pointers arithmetic does > take > into account the size of the pointed elements implicitly already. > Remove > the multiplication to fix the assertion. > > Fixes: 1e51764a3c2ac05a ("UBIFS: add new flash file system") > Signed-off-by: Vincent Stehlé > Cc: Artem Bityutskiy Signed-off-by: Artem Bityutskiy Thanks! --  Best Regards, Artem Bityutskiy