stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH AUTOSEL 4.18 067/113] powerpc: Fix size calculation using resource_size()
@ 2018-08-30 18:07 Sasha Levin
  2018-08-30 18:07 ` [PATCH AUTOSEL 4.18 068/113] perf probe powerpc: Fix trace event post-processing Sasha Levin
                   ` (45 more replies)
  0 siblings, 46 replies; 57+ messages in thread
From: Sasha Levin @ 2018-08-30 18:07 UTC (permalink / raw)
  To: stable@vger.kernel.org; +Cc: Dan Carpenter, Michael Ellerman, Sasha Levin

From: Dan Carpenter <dan.carpenter@oracle.com>

[ Upstream commit c42d3be0c06f0c1c416054022aa535c08a1f9b39 ]

The problem is the the calculation should be "end - start + 1" but the
plus one is missing in this calculation.

Fixes: 8626816e905e ("powerpc: add support for MPIC message register API")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Tyrel Datwyler <tyreld@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
---
 arch/powerpc/sysdev/mpic_msgr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/sysdev/mpic_msgr.c b/arch/powerpc/sysdev/mpic_msgr.c
index eb69a5186243..280e964e1aa8 100644
--- a/arch/powerpc/sysdev/mpic_msgr.c
+++ b/arch/powerpc/sysdev/mpic_msgr.c
@@ -196,7 +196,7 @@ static int mpic_msgr_probe(struct platform_device *dev)
 
 	/* IO map the message register block. */
 	of_address_to_resource(np, 0, &rsrc);
-	msgr_block_addr = ioremap(rsrc.start, rsrc.end - rsrc.start);
+	msgr_block_addr = ioremap(rsrc.start, resource_size(&rsrc));
 	if (!msgr_block_addr) {
 		dev_err(&dev->dev, "Failed to iomap MPIC message registers");
 		return -EFAULT;
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 57+ messages in thread

end of thread, other threads:[~2018-09-07  4:55 UTC | newest]

Thread overview: 57+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-30 18:07 [PATCH AUTOSEL 4.18 067/113] powerpc: Fix size calculation using resource_size() Sasha Levin
2018-08-30 18:07 ` [PATCH AUTOSEL 4.18 068/113] perf probe powerpc: Fix trace event post-processing Sasha Levin
2018-08-30 18:07 ` [PATCH AUTOSEL 4.18 069/113] block: bvec_nr_vecs() returns value for wrong slab Sasha Levin
2018-08-30 18:07 ` [PATCH AUTOSEL 4.18 070/113] brcmfmac: fix brcmf_wiphy_wowl_params() NULL pointer dereference Sasha Levin
2018-08-30 18:07 ` [PATCH AUTOSEL 4.18 071/113] s390/dasd: fix hanging offline processing due to canceled worker Sasha Levin
2018-08-30 18:07 ` [PATCH AUTOSEL 4.18 072/113] s390/dasd: fix panic for failed online processing Sasha Levin
2018-08-30 18:07 ` [PATCH AUTOSEL 4.18 073/113] ACPI / scan: Initialize status to ACPI_STA_DEFAULT Sasha Levin
2018-08-30 18:07 ` [PATCH AUTOSEL 4.18 074/113] blk-mq: count the hctx as active before allocating tag Sasha Levin
2018-08-30 18:07 ` [PATCH AUTOSEL 4.18 075/113] scsi: aic94xx: fix an error code in aic94xx_init() Sasha Levin
2018-08-30 18:07 ` [PATCH AUTOSEL 4.18 076/113] NFSv4: Fix error handling in nfs4_sp4_select_mode() Sasha Levin
2018-08-30 18:07 ` [PATCH AUTOSEL 4.18 077/113] ALSA: hda/ca0132 - Add DSP setup defaults for Recon3D Sasha Levin
2018-08-30 20:13   ` Takashi Iwai
2018-08-30 18:07 ` [PATCH AUTOSEL 4.18 078/113] ALSA: hda/ca0132 - Add quirk ID and enum " Sasha Levin
2018-08-30 20:08   ` Takashi Iwai
2018-08-30 20:10     ` Connor McAdams
2018-08-31 16:07       ` Sasha Levin
2018-09-02  6:30         ` Takashi Iwai
2018-09-02 12:56           ` Sasha Levin
2018-08-30 18:07 ` [PATCH AUTOSEL 4.18 079/113] ALSA: hda/ca0132 - Add alt_functions unsolicited response Sasha Levin
2018-08-30 18:07 ` [PATCH AUTOSEL 4.18 080/113] Input: do not use WARN() in input_alloc_absinfo() Sasha Levin
2018-08-30 18:07 ` [PATCH AUTOSEL 4.18 081/113] xen/balloon: fix balloon initialization for PVH Dom0 Sasha Levin
2018-08-30 18:07 ` [PATCH AUTOSEL 4.18 082/113] PCI: mvebu: Fix I/O space end address calculation Sasha Levin
2018-08-30 18:07 ` [PATCH AUTOSEL 4.18 083/113] dm kcopyd: avoid softlockup in run_complete_job Sasha Levin
2018-08-30 18:07 ` [PATCH AUTOSEL 4.18 084/113] staging: comedi: ni_mio_common: fix subdevice flags for PFI subdevice Sasha Levin
2018-08-30 18:07 ` [PATCH AUTOSEL 4.18 085/113] ASoC: rt5677: Fix initialization of rt5677_of_match.data Sasha Levin
2018-08-30 18:07 ` [PATCH AUTOSEL 4.18 086/113] iommu/omap: Fix cache flushes on L2 table entries Sasha Levin
2018-08-30 18:07 ` [PATCH AUTOSEL 4.18 087/113] selftests/powerpc: Kill child processes on SIGINT Sasha Levin
2018-08-30 18:07 ` [PATCH AUTOSEL 4.18 088/113] selinux: cleanup dentry and inodes on error in selinuxfs Sasha Levin
2018-08-30 18:07 ` [PATCH AUTOSEL 4.18 089/113] RDS: IB: fix 'passing zero to ERR_PTR()' warning Sasha Levin
2018-08-30 18:07 ` [PATCH AUTOSEL 4.18 090/113] cfq: Suppress compiler warnings about comparisons Sasha Levin
2018-08-30 18:07 ` [PATCH AUTOSEL 4.18 091/113] smb3: fix reset of bytes read and written stats Sasha Levin
2018-08-30 18:08 ` [PATCH AUTOSEL 4.18 092/113] CIFS: fix memory leak and remove dead code Sasha Levin
2018-08-30 18:08 ` [PATCH AUTOSEL 4.18 093/113] SMB3: Number of requests sent should be displayed for SMB3 not just CIFS Sasha Levin
2018-08-30 18:08 ` [PATCH AUTOSEL 4.18 094/113] smb3: if server does not support posix do not allow posix mount option Sasha Levin
2018-08-30 18:08 ` [PATCH AUTOSEL 4.18 095/113] powerpc/platforms/85xx: fix t1042rdb_diu.c build errors & warning Sasha Levin
2018-08-30 18:08 ` [PATCH AUTOSEL 4.18 096/113] powerpc/64s: Make rfi_flush_fallback a little more robust Sasha Levin
2018-08-30 18:08 ` [PATCH AUTOSEL 4.18 097/113] um: fix parallel building with O= option Sasha Levin
2018-08-30 18:08 ` [PATCH AUTOSEL 4.18 098/113] powerpc/pseries: Avoid using the size greater than RTAS_ERROR_LOG_MAX Sasha Levin
2018-08-30 18:08 ` [PATCH AUTOSEL 4.18 099/113] clk: rockchip: Add pclk_rkpwm_pmu to PMU critical clocks in rk3399 Sasha Levin
2018-08-30 18:08 ` [PATCH AUTOSEL 4.18 100/113] drm/amd/display: Read back max backlight value at boot Sasha Levin
2018-08-30 18:08 ` [PATCH AUTOSEL 4.18 101/113] KVM: vmx: track host_state.loaded using a loaded_vmcs pointer Sasha Levin
2018-08-30 18:08 ` [PATCH AUTOSEL 4.18 102/113] kvm: nVMX: Fix fault vector for VMX operation at CPL > 0 Sasha Levin
2018-08-30 18:08 ` [PATCH AUTOSEL 4.18 103/113] drm/etnaviv: fix crash in GPU suspend when init failed due to buffer placement Sasha Levin
2018-08-30 18:08 ` [PATCH AUTOSEL 4.18 104/113] btrfs: Exit gracefully when chunk map cannot be inserted to the tree Sasha Levin
2018-08-30 18:08 ` [PATCH AUTOSEL 4.18 105/113] btrfs: replace: Reset on-disk dev stats value after replace Sasha Levin
2018-08-30 18:08 ` [PATCH AUTOSEL 4.18 106/113] btrfs: fix in-memory value of total_devices after seed device deletion Sasha Levin
2018-08-30 18:08 ` [PATCH AUTOSEL 4.18 107/113] btrfs: Rewrite retry logic in do_chunk_alloc Sasha Levin
2018-09-05  9:22   ` David Sterba
2018-09-07  0:16     ` Sasha Levin
2018-08-30 18:08 ` [PATCH AUTOSEL 4.18 108/113] btrfs: relocation: Only remove reloc rb_trees if reloc control has been initialized Sasha Levin
2018-08-30 18:08 ` [PATCH AUTOSEL 4.18 109/113] btrfs: tree-checker: Detect invalid and empty essential trees Sasha Levin
2018-08-30 18:08 ` [PATCH AUTOSEL 4.18 110/113] btrfs: check-integrity: Fix NULL pointer dereference for degraded mount Sasha Levin
2018-08-30 18:08 ` [PATCH AUTOSEL 4.18 111/113] btrfs: lift uuid_mutex to callers of btrfs_open_devices Sasha Levin
2018-09-05  9:29   ` David Sterba
2018-09-07  0:17     ` Sasha Levin
2018-08-30 18:08 ` [PATCH AUTOSEL 4.18 112/113] btrfs: Don't remove block group that still has pinned down bytes Sasha Levin
2018-08-30 18:08 ` [PATCH AUTOSEL 4.18 113/113] btrfs: Fix a C compliance issue Sasha Levin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).