From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751505AbeAPPCW (ORCPT + 1 other); Tue, 16 Jan 2018 10:02:22 -0500 Received: from metis.ext.pengutronix.de ([85.220.165.71]:45195 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750790AbeAPPCQ (ORCPT ); Tue, 16 Jan 2018 10:02:16 -0500 Message-ID: <1516114934.9022.10.camel@pengutronix.de> Subject: Re: [PATCH] [RESEND] gpu: ipu-v3: prg: avoid possible array underflow From: Philipp Zabel To: Arnd Bergmann Cc: Lucas Stach , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Date: Tue, 16 Jan 2018 16:02:14 +0100 In-Reply-To: <20180116143212.1411334-1-arnd@arndb.de> References: <20180116143212.1411334-1-arnd@arndb.de> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.22.6-1+deb9u1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 2001:67c:670:100:3ad5:47ff:feaf:1a17 X-SA-Exim-Mail-From: p.zabel@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: Hi Arnd, On Tue, 2018-01-16 at 15:31 +0100, Arnd Bergmann wrote: > gcc-8 reports that we access an array with a negative index > in an error case: > > drivers/gpu/ipu-v3/ipu-prg.c: In function 'ipu_prg_channel_disable': > drivers/gpu/ipu-v3/ipu-prg.c:252:43: error: array subscript -22 is below array bounds of 'struct ipu_prg_channel[3]' [-Werror=array-bounds] > > This moves the range check in front of the dereference. > > Signed-off-by: Arnd Bergmann > ---- > Originally sent on Dec 4, 2017. No reply, so resending unchanged. Thank you, applied to imx-drm/fixes. regards Philipp