Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3492440imu; Sun, 11 Nov 2018 16:19:42 -0800 (PST) X-Google-Smtp-Source: AJdET5eveSO2Lp9jHIohQL2MFuRCz6uA37llul36PXjvqxFsT6TMC/sGibYBnwPijSm4lIyqpI7V X-Received: by 2002:a62:dbc6:: with SMTP id f189-v6mr18107777pfg.130.1541981982016; Sun, 11 Nov 2018 16:19:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541981981; cv=none; d=google.com; s=arc-20160816; b=SyIh10RzCK5OryU5p/6cxTCLr0w3on2d++INCiykh8j++MXVOArfWS1UhWsfE6137U QopzirSGXAUdgXz2H2SDvkYWyFeWvpop9M+LMMPls006NaB2QUJ5rrxib/JeNrxoSbQe lQHlDiPEoRXib6sSATIgBHn1oQ4Na4wtAKkIkc9ozpAQmErapNuT/8452WEXWIrU7Ys5 cZZ6ItUuxF9EHpgxDTMBqtCTMv7IlX7VRqqIg4jikbItwEMZ1g5LtkJ4PBOfSdvxDDYL adyN+9J4bW47UV0fY2I0EqOhoav3f5Gim1fIB6z9iyKZxdiQ78KeibWdMmQsnzDA1r6+ 2c5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=kNJj1q3FFpisvr9EdT+xXAy+SZ+z0hWY1sAypY3aoO8=; b=CDMoJxPLJeR4XwFGitUpIP0B938LFnhOLtApiY20WOQmtyO89ZnQg9idzubOcJGxnP Uu1g4Py7pZ/LgNbIW15JBs73TXqNM7qDpH4Pd46C4nQ9we1Scl2YdSzoOUYZstLGeoEI L8kmPeQIgHsXUK1eCoY++Fkk35JbMkYAOasSWvX1Lmm/p+hhCjAYR+xyVXtCwBXKPVva EMckiqEUThMl37No0l+rmGBtNscEXUIUNNl6fqvGxBu+oRrzAen7AoUwNiThaW99Myqv oNiLkyiyNcL3O/hECCJkJ42yOftlFdDv+Ic19cqU7w/5xGJDLLaXF/6h7LVzTg2aaL8V JNDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ChMpbe6K; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p19-v6si15465043plr.124.2018.11.11.16.19.26; Sun, 11 Nov 2018 16:19:41 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ChMpbe6K; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730258AbeKLKJg (ORCPT + 99 others); Mon, 12 Nov 2018 05:09:36 -0500 Received: from mail.kernel.org ([198.145.29.99]:58420 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729919AbeKLIQ5 (ORCPT ); Mon, 12 Nov 2018 03:16:57 -0500 Received: from localhost (unknown [206.108.79.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 17921223C8; Sun, 11 Nov 2018 22:27:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541975222; bh=lLM+8/WPsmv731/UyQLV7yafwkIU9C7dTkew4JH3KzI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ChMpbe6KVqcd4SNM7IXgotxvnqJ7ybrCzsAV7o82LwewqiAkoOxbOHIl3C/eQ0PG1 /BvUz4qT+y/cps2CWF2/NRDCkhx9X5HPck9THzxjsmv8bASL3UzVpyslrP+OePgdTJ 4oOi+0JMn1jjenH3J7LHVSE8ii9MceVz7VvCiXZA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Ricardo Ribalda Delgado , Boris Brezillon Subject: [PATCH 4.19 005/361] mtd: maps: gpio-addr-flash: Fix ioremapped size Date: Sun, 11 Nov 2018 14:15:52 -0800 Message-Id: <20181111221620.818436341@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181111221619.915519183@linuxfoundation.org> References: <20181111221619.915519183@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.19-stable review patch. If anyone has any objections, please let me know. ------------------ From: Ricardo Ribalda Delgado commit 6c925b333368cda4e1b0513b07f72316c0e7edd7 upstream. We should only iomap the area of the chip that is memory mapped. Otherwise we could be mapping devices beyond the memory space or that belong to other devices. Signed-off-by: Ricardo Ribalda Delgado Fixes: ebd71e3a4861 ("mtd: maps: gpio-addr-flash: fix warnings and make more portable") Cc: Signed-off-by: Boris Brezillon Signed-off-by: Greg Kroah-Hartman --- drivers/mtd/maps/gpio-addr-flash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/mtd/maps/gpio-addr-flash.c +++ b/drivers/mtd/maps/gpio-addr-flash.c @@ -238,7 +238,7 @@ static int gpio_flash_probe(struct platf state->map.copy_to = gf_copy_to; state->map.bankwidth = pdata->width; state->map.size = state->win_size * (1 << state->gpio_count); - state->map.virt = ioremap_nocache(memory->start, state->map.size); + state->map.virt = ioremap_nocache(memory->start, state->win_size); if (!state->map.virt) return -ENOMEM;