From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rob Herring Subject: Re: [PATCH v2 19/21] treewide: add checks for the return value of memblock_alloc*() Date: Mon, 21 Jan 2019 11:18:21 -0600 Message-ID: <20190121171821.GA13557@bogus> References: <1548057848-15136-1-git-send-email-rppt@linux.ibm.com> <1548057848-15136-20-git-send-email-rppt@linux.ibm.com> Mime-Version: 1.0 Return-path: Content-Disposition: inline In-Reply-To: <1548057848-15136-20-git-send-email-rppt@linux.ibm.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Mike Rapoport Cc: linux-mm@kvack.org, Andrew Morton , Catalin Marinas , Christoph Hellwig , "David S. Miller" , Dennis Zhou , Geert Uytterhoeven , Greentime Hu , Greg Kroah-Hartman , Guan Xuetao , Guo Ren , Heiko Carstens , Mark Salter , Matt Turner , Max Filippov , Michael Ellerman , Michal Simek , Paul Burton , Petr Mladek , Rich Felker , Richard Weinberger On Mon, Jan 21, 2019 at 10:04:06AM +0200, Mike Rapoport wrote: > Add check for the return value of memblock_alloc*() functions and call > panic() in case of error. > The panic message repeats the one used by panicing memblock allocators with > adjustment of parameters to include only relevant ones. > > The replacement was mostly automated with semantic patches like the one > below with manual massaging of format strings. > > @@ > expression ptr, size, align; > @@ > ptr = memblock_alloc(size, align); > + if (!ptr) > + panic("%s: Failed to allocate %lu bytes align=0x%lx\n", __func__, > size, align); > > Signed-off-by: Mike Rapoport > Reviewed-by: Guo Ren # c-sky > Acked-by: Paul Burton # MIPS > Acked-by: Heiko Carstens # s390 > Reviewed-by: Juergen Gross # Xen > --- > arch/alpha/kernel/core_cia.c | 3 +++ > arch/alpha/kernel/core_marvel.c | 6 ++++++ > arch/alpha/kernel/pci-noop.c | 13 +++++++++++-- > arch/alpha/kernel/pci.c | 11 ++++++++++- > arch/alpha/kernel/pci_iommu.c | 12 ++++++++++++ > arch/arc/mm/highmem.c | 4 ++++ > arch/arm/kernel/setup.c | 6 ++++++ > arch/arm/mm/mmu.c | 14 +++++++++++++- > arch/arm64/kernel/setup.c | 8 +++++--- > arch/arm64/mm/kasan_init.c | 10 ++++++++++ > arch/c6x/mm/dma-coherent.c | 4 ++++ > arch/c6x/mm/init.c | 3 +++ > arch/csky/mm/highmem.c | 5 +++++ > arch/h8300/mm/init.c | 3 +++ > arch/m68k/atari/stram.c | 4 ++++ > arch/m68k/mm/init.c | 3 +++ > arch/m68k/mm/mcfmmu.c | 6 ++++++ > arch/m68k/mm/motorola.c | 9 +++++++++ > arch/m68k/mm/sun3mmu.c | 6 ++++++ > arch/m68k/sun3/sun3dvma.c | 3 +++ > arch/microblaze/mm/init.c | 8 ++++++-- > arch/mips/cavium-octeon/dma-octeon.c | 3 +++ > arch/mips/kernel/setup.c | 3 +++ > arch/mips/kernel/traps.c | 3 +++ > arch/mips/mm/init.c | 5 +++++ > arch/nds32/mm/init.c | 12 ++++++++++++ > arch/openrisc/mm/ioremap.c | 8 ++++++-- > arch/powerpc/kernel/dt_cpu_ftrs.c | 5 +++++ > arch/powerpc/kernel/pci_32.c | 3 +++ > arch/powerpc/kernel/setup-common.c | 3 +++ > arch/powerpc/kernel/setup_64.c | 4 ++++ > arch/powerpc/lib/alloc.c | 3 +++ > arch/powerpc/mm/hash_utils_64.c | 3 +++ > arch/powerpc/mm/mmu_context_nohash.c | 9 +++++++++ > arch/powerpc/mm/pgtable-book3e.c | 12 ++++++++++-- > arch/powerpc/mm/pgtable-book3s64.c | 3 +++ > arch/powerpc/mm/pgtable-radix.c | 9 ++++++++- > arch/powerpc/mm/ppc_mmu_32.c | 3 +++ > arch/powerpc/platforms/pasemi/iommu.c | 3 +++ > arch/powerpc/platforms/powermac/nvram.c | 3 +++ > arch/powerpc/platforms/powernv/opal.c | 3 +++ > arch/powerpc/platforms/powernv/pci-ioda.c | 8 ++++++++ > arch/powerpc/platforms/ps3/setup.c | 3 +++ > arch/powerpc/sysdev/msi_bitmap.c | 3 +++ > arch/s390/kernel/setup.c | 13 +++++++++++++ > arch/s390/kernel/smp.c | 5 ++++- > arch/s390/kernel/topology.c | 6 ++++++ > arch/s390/numa/mode_emu.c | 3 +++ > arch/s390/numa/numa.c | 6 +++++- > arch/sh/mm/init.c | 6 ++++++ > arch/sh/mm/numa.c | 4 ++++ > arch/um/drivers/net_kern.c | 3 +++ > arch/um/drivers/vector_kern.c | 3 +++ > arch/um/kernel/initrd.c | 2 ++ > arch/um/kernel/mem.c | 16 ++++++++++++++++ > arch/unicore32/kernel/setup.c | 4 ++++ > arch/unicore32/mm/mmu.c | 15 +++++++++++++-- > arch/x86/kernel/acpi/boot.c | 3 +++ > arch/x86/kernel/apic/io_apic.c | 5 +++++ > arch/x86/kernel/e820.c | 3 +++ > arch/x86/platform/olpc/olpc_dt.c | 3 +++ > arch/x86/xen/p2m.c | 11 +++++++++-- > arch/xtensa/mm/kasan_init.c | 4 ++++ > arch/xtensa/mm/mmu.c | 3 +++ > drivers/clk/ti/clk.c | 3 +++ > drivers/macintosh/smu.c | 3 +++ > drivers/of/fdt.c | 8 +++++++- > drivers/of/unittest.c | 8 +++++++- Acked-by: Rob Herring > drivers/xen/swiotlb-xen.c | 7 +++++-- > kernel/power/snapshot.c | 3 +++ > lib/cpumask.c | 3 +++ > mm/kasan/init.c | 10 ++++++++-- > mm/sparse.c | 19 +++++++++++++++++-- > 73 files changed, 409 insertions(+), 28 deletions(-) From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rob Herring Date: Mon, 21 Jan 2019 17:18:21 +0000 Subject: Re: [PATCH v2 19/21] treewide: add checks for the return value of memblock_alloc*() Message-Id: <20190121171821.GA13557@bogus> List-Id: References: <1548057848-15136-1-git-send-email-rppt@linux.ibm.com> <1548057848-15136-20-git-send-email-rppt@linux.ibm.com> In-Reply-To: <1548057848-15136-20-git-send-email-rppt@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Mike Rapoport Cc: Rich Felker , linux-ia64@vger.kernel.org, devicetree@vger.kernel.org, Catalin Marinas , Heiko Carstens , x86@kernel.org, linux-mips@vger.kernel.org, Max Filippov , Guo Ren , sparclinux@vger.kernel.org, Christoph Hellwig , linux-s390@vger.kernel.org, linux-c6x-dev@linux-c6x.org, Yoshinori Sato , Richard Weinberger , linux-sh@vger.kernel.org, Russell King , kasan-dev@googlegroups.com, Geert Uytterhoeven , Mark Salter , Dennis Zhou , Matt Turner , linux-snps-arc@lists.infradead.org, uclinux-h8-devel@lists.sourceforge.jp, Petr Mladek , linux-xtensa@linux-xtensa.org, linux-alpha@vger.kernel.org, linux-um@lists.infradead.org, linux-m68k@lists.linux-m68k.org, openrisc@lists.librecores.org, Greentime Hu , xen-devel@lists.xenproject.org, Stafford Horne , Guan Xuetao , linux-arm-kernel@lists.infradead.org, Michal Simek , Tony Luck , linux-mm@kvack.org, Greg Kroah-Hartman , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Paul Burton , Vineet Gupta , Michael Ellerman , Andrew Morton , linuxppc-dev@lists.ozlabs.org, "David S. Miller" On Mon, Jan 21, 2019 at 10:04:06AM +0200, Mike Rapoport wrote: > Add check for the return value of memblock_alloc*() functions and call > panic() in case of error. > The panic message repeats the one used by panicing memblock allocators with > adjustment of parameters to include only relevant ones. > > The replacement was mostly automated with semantic patches like the one > below with manual massaging of format strings. > > @@ > expression ptr, size, align; > @@ > ptr = memblock_alloc(size, align); > + if (!ptr) > + panic("%s: Failed to allocate %lu bytes align=0x%lx\n", __func__, > size, align); > > Signed-off-by: Mike Rapoport > Reviewed-by: Guo Ren # c-sky > Acked-by: Paul Burton # MIPS > Acked-by: Heiko Carstens # s390 > Reviewed-by: Juergen Gross # Xen > --- > arch/alpha/kernel/core_cia.c | 3 +++ > arch/alpha/kernel/core_marvel.c | 6 ++++++ > arch/alpha/kernel/pci-noop.c | 13 +++++++++++-- > arch/alpha/kernel/pci.c | 11 ++++++++++- > arch/alpha/kernel/pci_iommu.c | 12 ++++++++++++ > arch/arc/mm/highmem.c | 4 ++++ > arch/arm/kernel/setup.c | 6 ++++++ > arch/arm/mm/mmu.c | 14 +++++++++++++- > arch/arm64/kernel/setup.c | 8 +++++--- > arch/arm64/mm/kasan_init.c | 10 ++++++++++ > arch/c6x/mm/dma-coherent.c | 4 ++++ > arch/c6x/mm/init.c | 3 +++ > arch/csky/mm/highmem.c | 5 +++++ > arch/h8300/mm/init.c | 3 +++ > arch/m68k/atari/stram.c | 4 ++++ > arch/m68k/mm/init.c | 3 +++ > arch/m68k/mm/mcfmmu.c | 6 ++++++ > arch/m68k/mm/motorola.c | 9 +++++++++ > arch/m68k/mm/sun3mmu.c | 6 ++++++ > arch/m68k/sun3/sun3dvma.c | 3 +++ > arch/microblaze/mm/init.c | 8 ++++++-- > arch/mips/cavium-octeon/dma-octeon.c | 3 +++ > arch/mips/kernel/setup.c | 3 +++ > arch/mips/kernel/traps.c | 3 +++ > arch/mips/mm/init.c | 5 +++++ > arch/nds32/mm/init.c | 12 ++++++++++++ > arch/openrisc/mm/ioremap.c | 8 ++++++-- > arch/powerpc/kernel/dt_cpu_ftrs.c | 5 +++++ > arch/powerpc/kernel/pci_32.c | 3 +++ > arch/powerpc/kernel/setup-common.c | 3 +++ > arch/powerpc/kernel/setup_64.c | 4 ++++ > arch/powerpc/lib/alloc.c | 3 +++ > arch/powerpc/mm/hash_utils_64.c | 3 +++ > arch/powerpc/mm/mmu_context_nohash.c | 9 +++++++++ > arch/powerpc/mm/pgtable-book3e.c | 12 ++++++++++-- > arch/powerpc/mm/pgtable-book3s64.c | 3 +++ > arch/powerpc/mm/pgtable-radix.c | 9 ++++++++- > arch/powerpc/mm/ppc_mmu_32.c | 3 +++ > arch/powerpc/platforms/pasemi/iommu.c | 3 +++ > arch/powerpc/platforms/powermac/nvram.c | 3 +++ > arch/powerpc/platforms/powernv/opal.c | 3 +++ > arch/powerpc/platforms/powernv/pci-ioda.c | 8 ++++++++ > arch/powerpc/platforms/ps3/setup.c | 3 +++ > arch/powerpc/sysdev/msi_bitmap.c | 3 +++ > arch/s390/kernel/setup.c | 13 +++++++++++++ > arch/s390/kernel/smp.c | 5 ++++- > arch/s390/kernel/topology.c | 6 ++++++ > arch/s390/numa/mode_emu.c | 3 +++ > arch/s390/numa/numa.c | 6 +++++- > arch/sh/mm/init.c | 6 ++++++ > arch/sh/mm/numa.c | 4 ++++ > arch/um/drivers/net_kern.c | 3 +++ > arch/um/drivers/vector_kern.c | 3 +++ > arch/um/kernel/initrd.c | 2 ++ > arch/um/kernel/mem.c | 16 ++++++++++++++++ > arch/unicore32/kernel/setup.c | 4 ++++ > arch/unicore32/mm/mmu.c | 15 +++++++++++++-- > arch/x86/kernel/acpi/boot.c | 3 +++ > arch/x86/kernel/apic/io_apic.c | 5 +++++ > arch/x86/kernel/e820.c | 3 +++ > arch/x86/platform/olpc/olpc_dt.c | 3 +++ > arch/x86/xen/p2m.c | 11 +++++++++-- > arch/xtensa/mm/kasan_init.c | 4 ++++ > arch/xtensa/mm/mmu.c | 3 +++ > drivers/clk/ti/clk.c | 3 +++ > drivers/macintosh/smu.c | 3 +++ > drivers/of/fdt.c | 8 +++++++- > drivers/of/unittest.c | 8 +++++++- Acked-by: Rob Herring > drivers/xen/swiotlb-xen.c | 7 +++++-- > kernel/power/snapshot.c | 3 +++ > lib/cpumask.c | 3 +++ > mm/kasan/init.c | 10 ++++++++-- > mm/sparse.c | 19 +++++++++++++++++-- > 73 files changed, 409 insertions(+), 28 deletions(-) From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.7 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS, USER_AGENT_MUTT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 49C7AC31689 for ; Mon, 21 Jan 2019 17:18:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1444C20879 for ; Mon, 21 Jan 2019 17:18:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1548091111; bh=eVglz3PUM2nTUHg3Qlg0m9/PezxVVRAVaKSR2+8i2ok=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=djFfJ6y7QzWBOw85lyqzsCH2SX/MIdjpvZgJqs4oSxRsA+xUZbM//hieMdmxXM4+E WNQZjj0+W12Kf7exJH7Ijiyt1dZN3OmOaR8lxBq/y8w+9U0Uj3rWqd5on2+V09qR6f 1vqQpVxQKiIf9MwAzwpUpJgaKX+jFIUOBR/dHCc0= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726353AbfAURSY (ORCPT ); Mon, 21 Jan 2019 12:18:24 -0500 Received: from mail-ot1-f65.google.com ([209.85.210.65]:45753 "EHLO mail-ot1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726058AbfAURSY (ORCPT ); Mon, 21 Jan 2019 12:18:24 -0500 Received: by mail-ot1-f65.google.com with SMTP id 32so21125401ota.12; Mon, 21 Jan 2019 09:18:22 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=EFqa7iDie4a4Ugk0nz5p3iJ9mNe61MmNiPA7yNETE+A=; b=oaZLGvK7EHRbWBAdMTOd/g2k5OK/zzsVYNjEIc7HZqKwydMSLQgs7yUQFb2Drqq++p R4VG0JRK+mRxTy+hbqs/H+sofqwHt9QPFWVCT9gty/8N3dCYIpyqsmLmnfAVhT2z9Zno 2r1vq47Nkpbb6GDVKA+HHOTP2j55ojNKWoH8jV9CcjzHvxOFIjZLU5S+0FGorXzv2vd7 pDfV+jJpdNQxaN4ywuu9RS/CizQzQmx+Z3wNi40sW8CkXbLUnvIduC9JBhYvQywaKzjU MWyz9sVxk9dy6Sc1r9F+lAj9xK0kx0qVnzer2nMUlRM3FspoNGVqlIKMZayFpB68cqwm ys8w== X-Gm-Message-State: AJcUukdrW0eKxi+b2fyAdYHRQYCL0nJFXt67qKbB1ZMNKBNO3ECp9DJR jFRxUrfmDSkynED0le+sWw== X-Google-Smtp-Source: ALg8bN5rbaU1m3gtFGToJ+cqBuFcMiOvNo70Mpy1u7fQlLuyqXRrBx7gRm33fEnKbPe17VBoWnrTEg== X-Received: by 2002:a9d:4b15:: with SMTP id q21mr20338887otf.30.1548091102479; Mon, 21 Jan 2019 09:18:22 -0800 (PST) Received: from localhost (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.gmail.com with ESMTPSA id r1sm6393991oie.44.2019.01.21.09.18.21 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 21 Jan 2019 09:18:21 -0800 (PST) Date: Mon, 21 Jan 2019 11:18:21 -0600 From: Rob Herring To: Mike Rapoport Cc: linux-mm@kvack.org, Andrew Morton , Catalin Marinas , Christoph Hellwig , "David S. Miller" , Dennis Zhou , Geert Uytterhoeven , Greentime Hu , Greg Kroah-Hartman , Guan Xuetao , Guo Ren , Heiko Carstens , Mark Salter , Matt Turner , Max Filippov , Michael Ellerman , Michal Simek , Paul Burton , Petr Mladek , Rich Felker , Richard Weinberger , Russell King , Stafford Horne , Tony Luck , Vineet Gupta , Yoshinori Sato , devicetree@vger.kernel.org, kasan-dev@googlegroups.com, linux-alpha@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-c6x-dev@linux-c6x.org, linux-ia64@vger.kernel.org, linux-kernel@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linux-mips@vger.kernel.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, linux-snps-arc@lists.infradead.org, linux-um@lists.infradead.org, linux-usb@vger.kernel.org, linux-xtensa@linux-xtensa.org, linuxppc-dev@lists.ozlabs.org, openrisc@lists.librecores.org, sparclinux@vger.kernel.org, uclinux-h8-devel@lists.sourceforge.jp, x86@kernel.org, xen-devel@lists.xenproject.org Subject: Re: [PATCH v2 19/21] treewide: add checks for the return value of memblock_alloc*() Message-ID: <20190121171821.GA13557@bogus> References: <1548057848-15136-1-git-send-email-rppt@linux.ibm.com> <1548057848-15136-20-git-send-email-rppt@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1548057848-15136-20-git-send-email-rppt@linux.ibm.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-mips-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org On Mon, Jan 21, 2019 at 10:04:06AM +0200, Mike Rapoport wrote: > Add check for the return value of memblock_alloc*() functions and call > panic() in case of error. > The panic message repeats the one used by panicing memblock allocators with > adjustment of parameters to include only relevant ones. > > The replacement was mostly automated with semantic patches like the one > below with manual massaging of format strings. > > @@ > expression ptr, size, align; > @@ > ptr = memblock_alloc(size, align); > + if (!ptr) > + panic("%s: Failed to allocate %lu bytes align=0x%lx\n", __func__, > size, align); > > Signed-off-by: Mike Rapoport > Reviewed-by: Guo Ren # c-sky > Acked-by: Paul Burton # MIPS > Acked-by: Heiko Carstens # s390 > Reviewed-by: Juergen Gross # Xen > --- > arch/alpha/kernel/core_cia.c | 3 +++ > arch/alpha/kernel/core_marvel.c | 6 ++++++ > arch/alpha/kernel/pci-noop.c | 13 +++++++++++-- > arch/alpha/kernel/pci.c | 11 ++++++++++- > arch/alpha/kernel/pci_iommu.c | 12 ++++++++++++ > arch/arc/mm/highmem.c | 4 ++++ > arch/arm/kernel/setup.c | 6 ++++++ > arch/arm/mm/mmu.c | 14 +++++++++++++- > arch/arm64/kernel/setup.c | 8 +++++--- > arch/arm64/mm/kasan_init.c | 10 ++++++++++ > arch/c6x/mm/dma-coherent.c | 4 ++++ > arch/c6x/mm/init.c | 3 +++ > arch/csky/mm/highmem.c | 5 +++++ > arch/h8300/mm/init.c | 3 +++ > arch/m68k/atari/stram.c | 4 ++++ > arch/m68k/mm/init.c | 3 +++ > arch/m68k/mm/mcfmmu.c | 6 ++++++ > arch/m68k/mm/motorola.c | 9 +++++++++ > arch/m68k/mm/sun3mmu.c | 6 ++++++ > arch/m68k/sun3/sun3dvma.c | 3 +++ > arch/microblaze/mm/init.c | 8 ++++++-- > arch/mips/cavium-octeon/dma-octeon.c | 3 +++ > arch/mips/kernel/setup.c | 3 +++ > arch/mips/kernel/traps.c | 3 +++ > arch/mips/mm/init.c | 5 +++++ > arch/nds32/mm/init.c | 12 ++++++++++++ > arch/openrisc/mm/ioremap.c | 8 ++++++-- > arch/powerpc/kernel/dt_cpu_ftrs.c | 5 +++++ > arch/powerpc/kernel/pci_32.c | 3 +++ > arch/powerpc/kernel/setup-common.c | 3 +++ > arch/powerpc/kernel/setup_64.c | 4 ++++ > arch/powerpc/lib/alloc.c | 3 +++ > arch/powerpc/mm/hash_utils_64.c | 3 +++ > arch/powerpc/mm/mmu_context_nohash.c | 9 +++++++++ > arch/powerpc/mm/pgtable-book3e.c | 12 ++++++++++-- > arch/powerpc/mm/pgtable-book3s64.c | 3 +++ > arch/powerpc/mm/pgtable-radix.c | 9 ++++++++- > arch/powerpc/mm/ppc_mmu_32.c | 3 +++ > arch/powerpc/platforms/pasemi/iommu.c | 3 +++ > arch/powerpc/platforms/powermac/nvram.c | 3 +++ > arch/powerpc/platforms/powernv/opal.c | 3 +++ > arch/powerpc/platforms/powernv/pci-ioda.c | 8 ++++++++ > arch/powerpc/platforms/ps3/setup.c | 3 +++ > arch/powerpc/sysdev/msi_bitmap.c | 3 +++ > arch/s390/kernel/setup.c | 13 +++++++++++++ > arch/s390/kernel/smp.c | 5 ++++- > arch/s390/kernel/topology.c | 6 ++++++ > arch/s390/numa/mode_emu.c | 3 +++ > arch/s390/numa/numa.c | 6 +++++- > arch/sh/mm/init.c | 6 ++++++ > arch/sh/mm/numa.c | 4 ++++ > arch/um/drivers/net_kern.c | 3 +++ > arch/um/drivers/vector_kern.c | 3 +++ > arch/um/kernel/initrd.c | 2 ++ > arch/um/kernel/mem.c | 16 ++++++++++++++++ > arch/unicore32/kernel/setup.c | 4 ++++ > arch/unicore32/mm/mmu.c | 15 +++++++++++++-- > arch/x86/kernel/acpi/boot.c | 3 +++ > arch/x86/kernel/apic/io_apic.c | 5 +++++ > arch/x86/kernel/e820.c | 3 +++ > arch/x86/platform/olpc/olpc_dt.c | 3 +++ > arch/x86/xen/p2m.c | 11 +++++++++-- > arch/xtensa/mm/kasan_init.c | 4 ++++ > arch/xtensa/mm/mmu.c | 3 +++ > drivers/clk/ti/clk.c | 3 +++ > drivers/macintosh/smu.c | 3 +++ > drivers/of/fdt.c | 8 +++++++- > drivers/of/unittest.c | 8 +++++++- Acked-by: Rob Herring > drivers/xen/swiotlb-xen.c | 7 +++++-- > kernel/power/snapshot.c | 3 +++ > lib/cpumask.c | 3 +++ > mm/kasan/init.c | 10 ++++++++-- > mm/sparse.c | 19 +++++++++++++++++-- > 73 files changed, 409 insertions(+), 28 deletions(-) From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Mon, 21 Jan 2019 11:18:21 -0600 From: Rob Herring Subject: Re: [PATCH v2 19/21] treewide: add checks for the return value of memblock_alloc*() Message-ID: <20190121171821.GA13557@bogus> References: <1548057848-15136-1-git-send-email-rppt@linux.ibm.com> <1548057848-15136-20-git-send-email-rppt@linux.ibm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1548057848-15136-20-git-send-email-rppt@linux.ibm.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org List-Archive: To: Mike Rapoport Cc: Rich Felker , linux-ia64@vger.kernel.org, devicetree@vger.kernel.org, Catalin Marinas , Heiko Carstens , x86@kernel.org, linux-mips@vger.kernel.org, Max Filippov , Guo Ren , sparclinux@vger.kernel.org, Christoph Hellwig , linux-s390@vger.kernel.org, linux-c6x-dev@linux-c6x.org, Yoshinori Sato , Richard Weinberger , linux-sh@vger.kernel.org, Russell King , kasan-dev@googlegroups.com, Geert Uytterhoeven , Mark Salter , Dennis Zhou , Matt Turner , linux-snps-arc@lists.infradead.org, uclinux-h8-devel@lists.sourceforge.jp, Petr Mladek , linux-xtensa@linux-xtensa.org, linux-alpha@vger.kernel.org, linux-um@lists.infradead.org, linux-m68k@lists.linux-m68k.org, openrisc@lists.librecores.org, Greentime Hu , xen-devel@lists.xenproject.org, Stafford Horne , Guan Xuetao , linux-arm-kernel@lists.infradead.org, Michal Simek , Tony Luck , linux-mm@kvack.org, Greg Kroah-Hartman , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Paul Burton , Vineet Gupta , Michael Ellerman , Andrew Morton , linuxppc-dev@lists.ozlabs.org, "David S. Miller" List-ID: On Mon, Jan 21, 2019 at 10:04:06AM +0200, Mike Rapoport wrote: > Add check for the return value of memblock_alloc*() functions and call > panic() in case of error. > The panic message repeats the one used by panicing memblock allocators with > adjustment of parameters to include only relevant ones. > > The replacement was mostly automated with semantic patches like the one > below with manual massaging of format strings. > > @@ > expression ptr, size, align; > @@ > ptr = memblock_alloc(size, align); > + if (!ptr) > + panic("%s: Failed to allocate %lu bytes align=0x%lx\n", __func__, > size, align); > > Signed-off-by: Mike Rapoport > Reviewed-by: Guo Ren # c-sky > Acked-by: Paul Burton # MIPS > Acked-by: Heiko Carstens # s390 > Reviewed-by: Juergen Gross # Xen > --- > arch/alpha/kernel/core_cia.c | 3 +++ > arch/alpha/kernel/core_marvel.c | 6 ++++++ > arch/alpha/kernel/pci-noop.c | 13 +++++++++++-- > arch/alpha/kernel/pci.c | 11 ++++++++++- > arch/alpha/kernel/pci_iommu.c | 12 ++++++++++++ > arch/arc/mm/highmem.c | 4 ++++ > arch/arm/kernel/setup.c | 6 ++++++ > arch/arm/mm/mmu.c | 14 +++++++++++++- > arch/arm64/kernel/setup.c | 8 +++++--- > arch/arm64/mm/kasan_init.c | 10 ++++++++++ > arch/c6x/mm/dma-coherent.c | 4 ++++ > arch/c6x/mm/init.c | 3 +++ > arch/csky/mm/highmem.c | 5 +++++ > arch/h8300/mm/init.c | 3 +++ > arch/m68k/atari/stram.c | 4 ++++ > arch/m68k/mm/init.c | 3 +++ > arch/m68k/mm/mcfmmu.c | 6 ++++++ > arch/m68k/mm/motorola.c | 9 +++++++++ > arch/m68k/mm/sun3mmu.c | 6 ++++++ > arch/m68k/sun3/sun3dvma.c | 3 +++ > arch/microblaze/mm/init.c | 8 ++++++-- > arch/mips/cavium-octeon/dma-octeon.c | 3 +++ > arch/mips/kernel/setup.c | 3 +++ > arch/mips/kernel/traps.c | 3 +++ > arch/mips/mm/init.c | 5 +++++ > arch/nds32/mm/init.c | 12 ++++++++++++ > arch/openrisc/mm/ioremap.c | 8 ++++++-- > arch/powerpc/kernel/dt_cpu_ftrs.c | 5 +++++ > arch/powerpc/kernel/pci_32.c | 3 +++ > arch/powerpc/kernel/setup-common.c | 3 +++ > arch/powerpc/kernel/setup_64.c | 4 ++++ > arch/powerpc/lib/alloc.c | 3 +++ > arch/powerpc/mm/hash_utils_64.c | 3 +++ > arch/powerpc/mm/mmu_context_nohash.c | 9 +++++++++ > arch/powerpc/mm/pgtable-book3e.c | 12 ++++++++++-- > arch/powerpc/mm/pgtable-book3s64.c | 3 +++ > arch/powerpc/mm/pgtable-radix.c | 9 ++++++++- > arch/powerpc/mm/ppc_mmu_32.c | 3 +++ > arch/powerpc/platforms/pasemi/iommu.c | 3 +++ > arch/powerpc/platforms/powermac/nvram.c | 3 +++ > arch/powerpc/platforms/powernv/opal.c | 3 +++ > arch/powerpc/platforms/powernv/pci-ioda.c | 8 ++++++++ > arch/powerpc/platforms/ps3/setup.c | 3 +++ > arch/powerpc/sysdev/msi_bitmap.c | 3 +++ > arch/s390/kernel/setup.c | 13 +++++++++++++ > arch/s390/kernel/smp.c | 5 ++++- > arch/s390/kernel/topology.c | 6 ++++++ > arch/s390/numa/mode_emu.c | 3 +++ > arch/s390/numa/numa.c | 6 +++++- > arch/sh/mm/init.c | 6 ++++++ > arch/sh/mm/numa.c | 4 ++++ > arch/um/drivers/net_kern.c | 3 +++ > arch/um/drivers/vector_kern.c | 3 +++ > arch/um/kernel/initrd.c | 2 ++ > arch/um/kernel/mem.c | 16 ++++++++++++++++ > arch/unicore32/kernel/setup.c | 4 ++++ > arch/unicore32/mm/mmu.c | 15 +++++++++++++-- > arch/x86/kernel/acpi/boot.c | 3 +++ > arch/x86/kernel/apic/io_apic.c | 5 +++++ > arch/x86/kernel/e820.c | 3 +++ > arch/x86/platform/olpc/olpc_dt.c | 3 +++ > arch/x86/xen/p2m.c | 11 +++++++++-- > arch/xtensa/mm/kasan_init.c | 4 ++++ > arch/xtensa/mm/mmu.c | 3 +++ > drivers/clk/ti/clk.c | 3 +++ > drivers/macintosh/smu.c | 3 +++ > drivers/of/fdt.c | 8 +++++++- > drivers/of/unittest.c | 8 +++++++- Acked-by: Rob Herring > drivers/xen/swiotlb-xen.c | 7 +++++-- > kernel/power/snapshot.c | 3 +++ > lib/cpumask.c | 3 +++ > mm/kasan/init.c | 10 ++++++++-- > mm/sparse.c | 19 +++++++++++++++++-- > 73 files changed, 409 insertions(+), 28 deletions(-) _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel From mboxrd@z Thu Jan 1 00:00:00 1970 From: robh@kernel.org (Rob Herring) Date: Mon, 21 Jan 2019 11:18:21 -0600 Subject: [PATCH v2 19/21] treewide: add checks for the return value of memblock_alloc*() In-Reply-To: <1548057848-15136-20-git-send-email-rppt@linux.ibm.com> References: <1548057848-15136-1-git-send-email-rppt@linux.ibm.com> <1548057848-15136-20-git-send-email-rppt@linux.ibm.com> List-ID: Message-ID: <20190121171821.GA13557@bogus> To: linux-snps-arc@lists.infradead.org On Mon, Jan 21, 2019@10:04:06AM +0200, Mike Rapoport wrote: > Add check for the return value of memblock_alloc*() functions and call > panic() in case of error. > The panic message repeats the one used by panicing memblock allocators with > adjustment of parameters to include only relevant ones. > > The replacement was mostly automated with semantic patches like the one > below with manual massaging of format strings. > > @@ > expression ptr, size, align; > @@ > ptr = memblock_alloc(size, align); > + if (!ptr) > + panic("%s: Failed to allocate %lu bytes align=0x%lx\n", __func__, > size, align); > > Signed-off-by: Mike Rapoport > Reviewed-by: Guo Ren # c-sky > Acked-by: Paul Burton # MIPS > Acked-by: Heiko Carstens # s390 > Reviewed-by: Juergen Gross # Xen > --- > arch/alpha/kernel/core_cia.c | 3 +++ > arch/alpha/kernel/core_marvel.c | 6 ++++++ > arch/alpha/kernel/pci-noop.c | 13 +++++++++++-- > arch/alpha/kernel/pci.c | 11 ++++++++++- > arch/alpha/kernel/pci_iommu.c | 12 ++++++++++++ > arch/arc/mm/highmem.c | 4 ++++ > arch/arm/kernel/setup.c | 6 ++++++ > arch/arm/mm/mmu.c | 14 +++++++++++++- > arch/arm64/kernel/setup.c | 8 +++++--- > arch/arm64/mm/kasan_init.c | 10 ++++++++++ > arch/c6x/mm/dma-coherent.c | 4 ++++ > arch/c6x/mm/init.c | 3 +++ > arch/csky/mm/highmem.c | 5 +++++ > arch/h8300/mm/init.c | 3 +++ > arch/m68k/atari/stram.c | 4 ++++ > arch/m68k/mm/init.c | 3 +++ > arch/m68k/mm/mcfmmu.c | 6 ++++++ > arch/m68k/mm/motorola.c | 9 +++++++++ > arch/m68k/mm/sun3mmu.c | 6 ++++++ > arch/m68k/sun3/sun3dvma.c | 3 +++ > arch/microblaze/mm/init.c | 8 ++++++-- > arch/mips/cavium-octeon/dma-octeon.c | 3 +++ > arch/mips/kernel/setup.c | 3 +++ > arch/mips/kernel/traps.c | 3 +++ > arch/mips/mm/init.c | 5 +++++ > arch/nds32/mm/init.c | 12 ++++++++++++ > arch/openrisc/mm/ioremap.c | 8 ++++++-- > arch/powerpc/kernel/dt_cpu_ftrs.c | 5 +++++ > arch/powerpc/kernel/pci_32.c | 3 +++ > arch/powerpc/kernel/setup-common.c | 3 +++ > arch/powerpc/kernel/setup_64.c | 4 ++++ > arch/powerpc/lib/alloc.c | 3 +++ > arch/powerpc/mm/hash_utils_64.c | 3 +++ > arch/powerpc/mm/mmu_context_nohash.c | 9 +++++++++ > arch/powerpc/mm/pgtable-book3e.c | 12 ++++++++++-- > arch/powerpc/mm/pgtable-book3s64.c | 3 +++ > arch/powerpc/mm/pgtable-radix.c | 9 ++++++++- > arch/powerpc/mm/ppc_mmu_32.c | 3 +++ > arch/powerpc/platforms/pasemi/iommu.c | 3 +++ > arch/powerpc/platforms/powermac/nvram.c | 3 +++ > arch/powerpc/platforms/powernv/opal.c | 3 +++ > arch/powerpc/platforms/powernv/pci-ioda.c | 8 ++++++++ > arch/powerpc/platforms/ps3/setup.c | 3 +++ > arch/powerpc/sysdev/msi_bitmap.c | 3 +++ > arch/s390/kernel/setup.c | 13 +++++++++++++ > arch/s390/kernel/smp.c | 5 ++++- > arch/s390/kernel/topology.c | 6 ++++++ > arch/s390/numa/mode_emu.c | 3 +++ > arch/s390/numa/numa.c | 6 +++++- > arch/sh/mm/init.c | 6 ++++++ > arch/sh/mm/numa.c | 4 ++++ > arch/um/drivers/net_kern.c | 3 +++ > arch/um/drivers/vector_kern.c | 3 +++ > arch/um/kernel/initrd.c | 2 ++ > arch/um/kernel/mem.c | 16 ++++++++++++++++ > arch/unicore32/kernel/setup.c | 4 ++++ > arch/unicore32/mm/mmu.c | 15 +++++++++++++-- > arch/x86/kernel/acpi/boot.c | 3 +++ > arch/x86/kernel/apic/io_apic.c | 5 +++++ > arch/x86/kernel/e820.c | 3 +++ > arch/x86/platform/olpc/olpc_dt.c | 3 +++ > arch/x86/xen/p2m.c | 11 +++++++++-- > arch/xtensa/mm/kasan_init.c | 4 ++++ > arch/xtensa/mm/mmu.c | 3 +++ > drivers/clk/ti/clk.c | 3 +++ > drivers/macintosh/smu.c | 3 +++ > drivers/of/fdt.c | 8 +++++++- > drivers/of/unittest.c | 8 +++++++- Acked-by: Rob Herring > drivers/xen/swiotlb-xen.c | 7 +++++-- > kernel/power/snapshot.c | 3 +++ > lib/cpumask.c | 3 +++ > mm/kasan/init.c | 10 ++++++++-- > mm/sparse.c | 19 +++++++++++++++++-- > 73 files changed, 409 insertions(+), 28 deletions(-) From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Subject: [v2,19/21] treewide: add checks for the return value of memblock_alloc*() From: Rob Herring Message-Id: <20190121171821.GA13557@bogus> Date: Mon, 21 Jan 2019 11:18:21 -0600 To: Mike Rapoport Cc: linux-mm@kvack.org, Andrew Morton , Catalin Marinas , Christoph Hellwig , "David S. Miller" , Dennis Zhou , Geert Uytterhoeven , Greentime Hu , Greg Kroah-Hartman , Guan Xuetao , Guo Ren , Heiko Carstens , Mark Salter , Matt Turner , Max Filippov , Michael Ellerman , Michal Simek , Paul Burton , Petr Mladek , Rich Felker , Richard Weinberger , Russell King , Stafford Horne , Tony Luck , Vineet Gupta , Yoshinori Sato , devicetree@vger.kernel.org, kasan-dev@googlegroups.com, linux-alpha@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-c6x-dev@linux-c6x.org, linux-ia64@vger.kernel.org, linux-kernel@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linux-mips@vger.kernel.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, linux-snps-arc@lists.infradead.org, linux-um@lists.infradead.org, linux-usb@vger.kernel.org, linux-xtensa@linux-xtensa.org, linuxppc-dev@lists.ozlabs.org, openrisc@lists.librecores.org, sparclinux@vger.kernel.org, uclinux-h8-devel@lists.sourceforge.jp, x86@kernel.org, xen-devel@lists.xenproject.org List-ID: T24gTW9uLCBKYW4gMjEsIDIwMTkgYXQgMTA6MDQ6MDZBTSArMDIwMCwgTWlrZSBSYXBvcG9ydCB3 cm90ZToKPiBBZGQgY2hlY2sgZm9yIHRoZSByZXR1cm4gdmFsdWUgb2YgbWVtYmxvY2tfYWxsb2Mq KCkgZnVuY3Rpb25zIGFuZCBjYWxsCj4gcGFuaWMoKSBpbiBjYXNlIG9mIGVycm9yLgo+IFRoZSBw YW5pYyBtZXNzYWdlIHJlcGVhdHMgdGhlIG9uZSB1c2VkIGJ5IHBhbmljaW5nIG1lbWJsb2NrIGFs bG9jYXRvcnMgd2l0aAo+IGFkanVzdG1lbnQgb2YgcGFyYW1ldGVycyB0byBpbmNsdWRlIG9ubHkg cmVsZXZhbnQgb25lcy4KPiAKPiBUaGUgcmVwbGFjZW1lbnQgd2FzIG1vc3RseSBhdXRvbWF0ZWQg d2l0aCBzZW1hbnRpYyBwYXRjaGVzIGxpa2UgdGhlIG9uZQo+IGJlbG93IHdpdGggbWFudWFsIG1h c3NhZ2luZyBvZiBmb3JtYXQgc3RyaW5ncy4KPiAKPiBAQAo+IGV4cHJlc3Npb24gcHRyLCBzaXpl LCBhbGlnbjsKPiBAQAo+IHB0ciA9IG1lbWJsb2NrX2FsbG9jKHNpemUsIGFsaWduKTsKPiArIGlm ICghcHRyKQo+ICsgCXBhbmljKCIlczogRmFpbGVkIHRvIGFsbG9jYXRlICVsdSBieXRlcyBhbGln bj0weCVseFxuIiwgX19mdW5jX18sCj4gc2l6ZSwgYWxpZ24pOwo+IAo+IFNpZ25lZC1vZmYtYnk6 IE1pa2UgUmFwb3BvcnQgPHJwcHRAbGludXguaWJtLmNvbT4KPiBSZXZpZXdlZC1ieTogR3VvIFJl biA8cmVuX2d1b0BjLXNreS5jb20+ICAgICAgICAgICAgICMgYy1za3kKPiBBY2tlZC1ieTogUGF1 bCBCdXJ0b24gPHBhdWwuYnVydG9uQG1pcHMuY29tPgkgICAgICMgTUlQUwo+IEFja2VkLWJ5OiBI ZWlrbyBDYXJzdGVucyA8aGVpa28uY2Fyc3RlbnNAZGUuaWJtLmNvbT4gIyBzMzkwCj4gUmV2aWV3 ZWQtYnk6IEp1ZXJnZW4gR3Jvc3MgPGpncm9zc0BzdXNlLmNvbT4gICAgICAgICAjIFhlbgo+IC0t LQo+ICBhcmNoL2FscGhhL2tlcm5lbC9jb3JlX2NpYS5jICAgICAgICAgICAgICB8ICAzICsrKwo+ ICBhcmNoL2FscGhhL2tlcm5lbC9jb3JlX21hcnZlbC5jICAgICAgICAgICB8ICA2ICsrKysrKwo+ ICBhcmNoL2FscGhhL2tlcm5lbC9wY2ktbm9vcC5jICAgICAgICAgICAgICB8IDEzICsrKysrKysr KysrLS0KPiAgYXJjaC9hbHBoYS9rZXJuZWwvcGNpLmMgICAgICAgICAgICAgICAgICAgfCAxMSAr KysrKysrKysrLQo+ICBhcmNoL2FscGhhL2tlcm5lbC9wY2lfaW9tbXUuYyAgICAgICAgICAgICB8 IDEyICsrKysrKysrKysrKwo+ICBhcmNoL2FyYy9tbS9oaWdobWVtLmMgICAgICAgICAgICAgICAg ICAgICB8ICA0ICsrKysKPiAgYXJjaC9hcm0va2VybmVsL3NldHVwLmMgICAgICAgICAgICAgICAg ICAgfCAgNiArKysrKysKPiAgYXJjaC9hcm0vbW0vbW11LmMgICAgICAgICAgICAgICAgICAgICAg ICAgfCAxNCArKysrKysrKysrKysrLQo+ICBhcmNoL2FybTY0L2tlcm5lbC9zZXR1cC5jICAgICAg ICAgICAgICAgICB8ICA4ICsrKysrLS0tCj4gIGFyY2gvYXJtNjQvbW0va2FzYW5faW5pdC5jICAg ICAgICAgICAgICAgIHwgMTAgKysrKysrKysrKwo+ICBhcmNoL2M2eC9tbS9kbWEtY29oZXJlbnQu YyAgICAgICAgICAgICAgICB8ICA0ICsrKysKPiAgYXJjaC9jNngvbW0vaW5pdC5jICAgICAgICAg ICAgICAgICAgICAgICAgfCAgMyArKysKPiAgYXJjaC9jc2t5L21tL2hpZ2htZW0uYyAgICAgICAg ICAgICAgICAgICAgfCAgNSArKysrKwo+ICBhcmNoL2g4MzAwL21tL2luaXQuYyAgICAgICAgICAg ICAgICAgICAgICB8ICAzICsrKwo+ICBhcmNoL202OGsvYXRhcmkvc3RyYW0uYyAgICAgICAgICAg ICAgICAgICB8ICA0ICsrKysKPiAgYXJjaC9tNjhrL21tL2luaXQuYyAgICAgICAgICAgICAgICAg ICAgICAgfCAgMyArKysKPiAgYXJjaC9tNjhrL21tL21jZm1tdS5jICAgICAgICAgICAgICAgICAg ICAgfCAgNiArKysrKysKPiAgYXJjaC9tNjhrL21tL21vdG9yb2xhLmMgICAgICAgICAgICAgICAg ICAgfCAgOSArKysrKysrKysKPiAgYXJjaC9tNjhrL21tL3N1bjNtbXUuYyAgICAgICAgICAgICAg ICAgICAgfCAgNiArKysrKysKPiAgYXJjaC9tNjhrL3N1bjMvc3VuM2R2bWEuYyAgICAgICAgICAg ICAgICAgfCAgMyArKysKPiAgYXJjaC9taWNyb2JsYXplL21tL2luaXQuYyAgICAgICAgICAgICAg ICAgfCAgOCArKysrKystLQo+ICBhcmNoL21pcHMvY2F2aXVtLW9jdGVvbi9kbWEtb2N0ZW9uLmMg ICAgICB8ICAzICsrKwo+ICBhcmNoL21pcHMva2VybmVsL3NldHVwLmMgICAgICAgICAgICAgICAg ICB8ICAzICsrKwo+ICBhcmNoL21pcHMva2VybmVsL3RyYXBzLmMgICAgICAgICAgICAgICAgICB8 ICAzICsrKwo+ICBhcmNoL21pcHMvbW0vaW5pdC5jICAgICAgICAgICAgICAgICAgICAgICB8ICA1 ICsrKysrCj4gIGFyY2gvbmRzMzIvbW0vaW5pdC5jICAgICAgICAgICAgICAgICAgICAgIHwgMTIg KysrKysrKysrKysrCj4gIGFyY2gvb3BlbnJpc2MvbW0vaW9yZW1hcC5jICAgICAgICAgICAgICAg IHwgIDggKysrKysrLS0KPiAgYXJjaC9wb3dlcnBjL2tlcm5lbC9kdF9jcHVfZnRycy5jICAgICAg ICAgfCAgNSArKysrKwo+ICBhcmNoL3Bvd2VycGMva2VybmVsL3BjaV8zMi5jICAgICAgICAgICAg ICB8ICAzICsrKwo+ICBhcmNoL3Bvd2VycGMva2VybmVsL3NldHVwLWNvbW1vbi5jICAgICAgICB8 ICAzICsrKwo+ICBhcmNoL3Bvd2VycGMva2VybmVsL3NldHVwXzY0LmMgICAgICAgICAgICB8ICA0 ICsrKysKPiAgYXJjaC9wb3dlcnBjL2xpYi9hbGxvYy5jICAgICAgICAgICAgICAgICAgfCAgMyAr KysKPiAgYXJjaC9wb3dlcnBjL21tL2hhc2hfdXRpbHNfNjQuYyAgICAgICAgICAgfCAgMyArKysK PiAgYXJjaC9wb3dlcnBjL21tL21tdV9jb250ZXh0X25vaGFzaC5jICAgICAgfCAgOSArKysrKysr KysKPiAgYXJjaC9wb3dlcnBjL21tL3BndGFibGUtYm9vazNlLmMgICAgICAgICAgfCAxMiArKysr KysrKysrLS0KPiAgYXJjaC9wb3dlcnBjL21tL3BndGFibGUtYm9vazNzNjQuYyAgICAgICAgfCAg MyArKysKPiAgYXJjaC9wb3dlcnBjL21tL3BndGFibGUtcmFkaXguYyAgICAgICAgICAgfCAgOSAr KysrKysrKy0KPiAgYXJjaC9wb3dlcnBjL21tL3BwY19tbXVfMzIuYyAgICAgICAgICAgICAgfCAg MyArKysKPiAgYXJjaC9wb3dlcnBjL3BsYXRmb3Jtcy9wYXNlbWkvaW9tbXUuYyAgICAgfCAgMyAr KysKPiAgYXJjaC9wb3dlcnBjL3BsYXRmb3Jtcy9wb3dlcm1hYy9udnJhbS5jICAgfCAgMyArKysK PiAgYXJjaC9wb3dlcnBjL3BsYXRmb3Jtcy9wb3dlcm52L29wYWwuYyAgICAgfCAgMyArKysKPiAg YXJjaC9wb3dlcnBjL3BsYXRmb3Jtcy9wb3dlcm52L3BjaS1pb2RhLmMgfCAgOCArKysrKysrKwo+ ICBhcmNoL3Bvd2VycGMvcGxhdGZvcm1zL3BzMy9zZXR1cC5jICAgICAgICB8ICAzICsrKwo+ICBh cmNoL3Bvd2VycGMvc3lzZGV2L21zaV9iaXRtYXAuYyAgICAgICAgICB8ICAzICsrKwo+ICBhcmNo L3MzOTAva2VybmVsL3NldHVwLmMgICAgICAgICAgICAgICAgICB8IDEzICsrKysrKysrKysrKysK PiAgYXJjaC9zMzkwL2tlcm5lbC9zbXAuYyAgICAgICAgICAgICAgICAgICAgfCAgNSArKysrLQo+ ICBhcmNoL3MzOTAva2VybmVsL3RvcG9sb2d5LmMgICAgICAgICAgICAgICB8ICA2ICsrKysrKwo+ ICBhcmNoL3MzOTAvbnVtYS9tb2RlX2VtdS5jICAgICAgICAgICAgICAgICB8ICAzICsrKwo+ICBh cmNoL3MzOTAvbnVtYS9udW1hLmMgICAgICAgICAgICAgICAgICAgICB8ICA2ICsrKysrLQo+ICBh cmNoL3NoL21tL2luaXQuYyAgICAgICAgICAgICAgICAgICAgICAgICB8ICA2ICsrKysrKwo+ICBh cmNoL3NoL21tL251bWEuYyAgICAgICAgICAgICAgICAgICAgICAgICB8ICA0ICsrKysKPiAgYXJj aC91bS9kcml2ZXJzL25ldF9rZXJuLmMgICAgICAgICAgICAgICAgfCAgMyArKysKPiAgYXJjaC91 bS9kcml2ZXJzL3ZlY3Rvcl9rZXJuLmMgICAgICAgICAgICAgfCAgMyArKysKPiAgYXJjaC91bS9r ZXJuZWwvaW5pdHJkLmMgICAgICAgICAgICAgICAgICAgfCAgMiArKwo+ICBhcmNoL3VtL2tlcm5l bC9tZW0uYyAgICAgICAgICAgICAgICAgICAgICB8IDE2ICsrKysrKysrKysrKysrKysKPiAgYXJj aC91bmljb3JlMzIva2VybmVsL3NldHVwLmMgICAgICAgICAgICAgfCAgNCArKysrCj4gIGFyY2gv dW5pY29yZTMyL21tL21tdS5jICAgICAgICAgICAgICAgICAgIHwgMTUgKysrKysrKysrKysrKy0t Cj4gIGFyY2gveDg2L2tlcm5lbC9hY3BpL2Jvb3QuYyAgICAgICAgICAgICAgIHwgIDMgKysrCj4g IGFyY2gveDg2L2tlcm5lbC9hcGljL2lvX2FwaWMuYyAgICAgICAgICAgIHwgIDUgKysrKysKPiAg YXJjaC94ODYva2VybmVsL2U4MjAuYyAgICAgICAgICAgICAgICAgICAgfCAgMyArKysKPiAgYXJj aC94ODYvcGxhdGZvcm0vb2xwYy9vbHBjX2R0LmMgICAgICAgICAgfCAgMyArKysKPiAgYXJjaC94 ODYveGVuL3AybS5jICAgICAgICAgICAgICAgICAgICAgICAgfCAxMSArKysrKysrKystLQo+ICBh cmNoL3h0ZW5zYS9tbS9rYXNhbl9pbml0LmMgICAgICAgICAgICAgICB8ICA0ICsrKysKPiAgYXJj aC94dGVuc2EvbW0vbW11LmMgICAgICAgICAgICAgICAgICAgICAgfCAgMyArKysKPiAgZHJpdmVy cy9jbGsvdGkvY2xrLmMgICAgICAgICAgICAgICAgICAgICAgfCAgMyArKysKPiAgZHJpdmVycy9t YWNpbnRvc2gvc211LmMgICAgICAgICAgICAgICAgICAgfCAgMyArKysKPiAgZHJpdmVycy9vZi9m ZHQuYyAgICAgICAgICAgICAgICAgICAgICAgICAgfCAgOCArKysrKysrLQo+ICBkcml2ZXJzL29m L3VuaXR0ZXN0LmMgICAgICAgICAgICAgICAgICAgICB8ICA4ICsrKysrKystCgpBY2tlZC1ieTog Um9iIEhlcnJpbmcgPHJvYmhAa2VybmVsLm9yZz4KCj4gIGRyaXZlcnMveGVuL3N3aW90bGIteGVu LmMgICAgICAgICAgICAgICAgIHwgIDcgKysrKystLQo+ICBrZXJuZWwvcG93ZXIvc25hcHNob3Qu YyAgICAgICAgICAgICAgICAgICB8ICAzICsrKwo+ICBsaWIvY3B1bWFzay5jICAgICAgICAgICAg ICAgICAgICAgICAgICAgICB8ICAzICsrKwo+ICBtbS9rYXNhbi9pbml0LmMgICAgICAgICAgICAg ICAgICAgICAgICAgICB8IDEwICsrKysrKysrLS0KPiAgbW0vc3BhcnNlLmMgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgfCAxOSArKysrKysrKysrKysrKysrKy0tCj4gIDczIGZpbGVzIGNo YW5nZWQsIDQwOSBpbnNlcnRpb25zKCspLCAyOCBkZWxldGlvbnMoLSkK From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rob Herring Date: Mon, 21 Jan 2019 11:18:21 -0600 Subject: [OpenRISC] [PATCH v2 19/21] treewide: add checks for the return value of memblock_alloc*() In-Reply-To: <1548057848-15136-20-git-send-email-rppt@linux.ibm.com> References: <1548057848-15136-1-git-send-email-rppt@linux.ibm.com> <1548057848-15136-20-git-send-email-rppt@linux.ibm.com> Message-ID: <20190121171821.GA13557@bogus> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: openrisc@lists.librecores.org On Mon, Jan 21, 2019 at 10:04:06AM +0200, Mike Rapoport wrote: > Add check for the return value of memblock_alloc*() functions and call > panic() in case of error. > The panic message repeats the one used by panicing memblock allocators with > adjustment of parameters to include only relevant ones. > > The replacement was mostly automated with semantic patches like the one > below with manual massaging of format strings. > > @@ > expression ptr, size, align; > @@ > ptr = memblock_alloc(size, align); > + if (!ptr) > + panic("%s: Failed to allocate %lu bytes align=0x%lx\n", __func__, > size, align); > > Signed-off-by: Mike Rapoport > Reviewed-by: Guo Ren # c-sky > Acked-by: Paul Burton # MIPS > Acked-by: Heiko Carstens # s390 > Reviewed-by: Juergen Gross # Xen > --- > arch/alpha/kernel/core_cia.c | 3 +++ > arch/alpha/kernel/core_marvel.c | 6 ++++++ > arch/alpha/kernel/pci-noop.c | 13 +++++++++++-- > arch/alpha/kernel/pci.c | 11 ++++++++++- > arch/alpha/kernel/pci_iommu.c | 12 ++++++++++++ > arch/arc/mm/highmem.c | 4 ++++ > arch/arm/kernel/setup.c | 6 ++++++ > arch/arm/mm/mmu.c | 14 +++++++++++++- > arch/arm64/kernel/setup.c | 8 +++++--- > arch/arm64/mm/kasan_init.c | 10 ++++++++++ > arch/c6x/mm/dma-coherent.c | 4 ++++ > arch/c6x/mm/init.c | 3 +++ > arch/csky/mm/highmem.c | 5 +++++ > arch/h8300/mm/init.c | 3 +++ > arch/m68k/atari/stram.c | 4 ++++ > arch/m68k/mm/init.c | 3 +++ > arch/m68k/mm/mcfmmu.c | 6 ++++++ > arch/m68k/mm/motorola.c | 9 +++++++++ > arch/m68k/mm/sun3mmu.c | 6 ++++++ > arch/m68k/sun3/sun3dvma.c | 3 +++ > arch/microblaze/mm/init.c | 8 ++++++-- > arch/mips/cavium-octeon/dma-octeon.c | 3 +++ > arch/mips/kernel/setup.c | 3 +++ > arch/mips/kernel/traps.c | 3 +++ > arch/mips/mm/init.c | 5 +++++ > arch/nds32/mm/init.c | 12 ++++++++++++ > arch/openrisc/mm/ioremap.c | 8 ++++++-- > arch/powerpc/kernel/dt_cpu_ftrs.c | 5 +++++ > arch/powerpc/kernel/pci_32.c | 3 +++ > arch/powerpc/kernel/setup-common.c | 3 +++ > arch/powerpc/kernel/setup_64.c | 4 ++++ > arch/powerpc/lib/alloc.c | 3 +++ > arch/powerpc/mm/hash_utils_64.c | 3 +++ > arch/powerpc/mm/mmu_context_nohash.c | 9 +++++++++ > arch/powerpc/mm/pgtable-book3e.c | 12 ++++++++++-- > arch/powerpc/mm/pgtable-book3s64.c | 3 +++ > arch/powerpc/mm/pgtable-radix.c | 9 ++++++++- > arch/powerpc/mm/ppc_mmu_32.c | 3 +++ > arch/powerpc/platforms/pasemi/iommu.c | 3 +++ > arch/powerpc/platforms/powermac/nvram.c | 3 +++ > arch/powerpc/platforms/powernv/opal.c | 3 +++ > arch/powerpc/platforms/powernv/pci-ioda.c | 8 ++++++++ > arch/powerpc/platforms/ps3/setup.c | 3 +++ > arch/powerpc/sysdev/msi_bitmap.c | 3 +++ > arch/s390/kernel/setup.c | 13 +++++++++++++ > arch/s390/kernel/smp.c | 5 ++++- > arch/s390/kernel/topology.c | 6 ++++++ > arch/s390/numa/mode_emu.c | 3 +++ > arch/s390/numa/numa.c | 6 +++++- > arch/sh/mm/init.c | 6 ++++++ > arch/sh/mm/numa.c | 4 ++++ > arch/um/drivers/net_kern.c | 3 +++ > arch/um/drivers/vector_kern.c | 3 +++ > arch/um/kernel/initrd.c | 2 ++ > arch/um/kernel/mem.c | 16 ++++++++++++++++ > arch/unicore32/kernel/setup.c | 4 ++++ > arch/unicore32/mm/mmu.c | 15 +++++++++++++-- > arch/x86/kernel/acpi/boot.c | 3 +++ > arch/x86/kernel/apic/io_apic.c | 5 +++++ > arch/x86/kernel/e820.c | 3 +++ > arch/x86/platform/olpc/olpc_dt.c | 3 +++ > arch/x86/xen/p2m.c | 11 +++++++++-- > arch/xtensa/mm/kasan_init.c | 4 ++++ > arch/xtensa/mm/mmu.c | 3 +++ > drivers/clk/ti/clk.c | 3 +++ > drivers/macintosh/smu.c | 3 +++ > drivers/of/fdt.c | 8 +++++++- > drivers/of/unittest.c | 8 +++++++- Acked-by: Rob Herring > drivers/xen/swiotlb-xen.c | 7 +++++-- > kernel/power/snapshot.c | 3 +++ > lib/cpumask.c | 3 +++ > mm/kasan/init.c | 10 ++++++++-- > mm/sparse.c | 19 +++++++++++++++++-- > 73 files changed, 409 insertions(+), 28 deletions(-) From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.5 required=3.0 tests=MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_PASS,USER_AGENT_MUTT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6AFAEC31680 for ; Mon, 21 Jan 2019 17:19:57 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E383C2085A for ; Mon, 21 Jan 2019 17:19:56 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E383C2085A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 43jywW0FfDzDqRx for ; Tue, 22 Jan 2019 04:19:55 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gmail.com (client-ip=209.85.210.68; helo=mail-ot1-f68.google.com; envelope-from=robherring2@gmail.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=fail (p=none dis=none) header.from=kernel.org Received: from mail-ot1-f68.google.com (mail-ot1-f68.google.com [209.85.210.68]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 43jytm6VBBzDq9L for ; Tue, 22 Jan 2019 04:18:24 +1100 (AEDT) Received: by mail-ot1-f68.google.com with SMTP id 81so21212272otj.2 for ; Mon, 21 Jan 2019 09:18:24 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=EFqa7iDie4a4Ugk0nz5p3iJ9mNe61MmNiPA7yNETE+A=; b=WPWP8ye3mLF5q8H8D+r/qpn4pBImmRZx6nC4eYcpOD2V347fVVrMuSgOR8GRLDLn2x hJE9tXv99pnkSDO2vrQIOPrsUCcZkiL9YZnUNppNQyEvKiKBG/O52w9cuCXrh0eoz7eJ 6THo0KGAdSKL1q3OrGBQjBW6djo2sATyO/lglCzRL3sqqC1sdj4ZVhuFNZVXhwmZTxWm l8hTtOiA+RPm7Mz40uxAXhtgiLW6HDXJvtoElfLwJl+is5bKxCH2xmgbU7zbq2WsZCTS z+NUT8aZmUpVeedpn34Ys2PLyj2bgjkm7+tb+lj1ZPz/CIHpEGk3JeT8Yl2hOlLRgr6w 3wkQ== X-Gm-Message-State: AJcUukd3ek2Fq4lkMHeyTftgShjkR97pOcMJ3GLzuf4EILXwcmKGTQl5 YG4UyX21GZVWz35CGDepPA== X-Google-Smtp-Source: ALg8bN5rbaU1m3gtFGToJ+cqBuFcMiOvNo70Mpy1u7fQlLuyqXRrBx7gRm33fEnKbPe17VBoWnrTEg== X-Received: by 2002:a9d:4b15:: with SMTP id q21mr20338887otf.30.1548091102479; Mon, 21 Jan 2019 09:18:22 -0800 (PST) Received: from localhost (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.gmail.com with ESMTPSA id r1sm6393991oie.44.2019.01.21.09.18.21 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 21 Jan 2019 09:18:21 -0800 (PST) Date: Mon, 21 Jan 2019 11:18:21 -0600 From: Rob Herring To: Mike Rapoport Subject: Re: [PATCH v2 19/21] treewide: add checks for the return value of memblock_alloc*() Message-ID: <20190121171821.GA13557@bogus> References: <1548057848-15136-1-git-send-email-rppt@linux.ibm.com> <1548057848-15136-20-git-send-email-rppt@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1548057848-15136-20-git-send-email-rppt@linux.ibm.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Rich Felker , linux-ia64@vger.kernel.org, devicetree@vger.kernel.org, Catalin Marinas , Heiko Carstens , x86@kernel.org, linux-mips@vger.kernel.org, Max Filippov , Guo Ren , sparclinux@vger.kernel.org, Christoph Hellwig , linux-s390@vger.kernel.org, linux-c6x-dev@linux-c6x.org, Yoshinori Sato , Richard Weinberger , linux-sh@vger.kernel.org, Russell King , kasan-dev@googlegroups.com, Geert Uytterhoeven , Mark Salter , Dennis Zhou , Matt Turner , linux-snps-arc@lists.infradead.org, uclinux-h8-devel@lists.sourceforge.jp, Petr Mladek , linux-xtensa@linux-xtensa.org, linux-alpha@vger.kernel.org, linux-um@lists.infradead.org, linux-m68k@lists.linux-m68k.org, openrisc@lists.librecores.org, Greentime Hu , xen-devel@lists.xenproject.org, Stafford Horne , Guan Xuetao , linux-arm-kernel@lists.infradead.org, Michal Simek , Tony Luck , linux-mm@kvack.org, Greg Kroah-Hartman , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Paul Burton , Vineet Gupta , Andrew Morton , linuxppc-dev@lists.ozlabs.org, "David S. Miller" Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On Mon, Jan 21, 2019 at 10:04:06AM +0200, Mike Rapoport wrote: > Add check for the return value of memblock_alloc*() functions and call > panic() in case of error. > The panic message repeats the one used by panicing memblock allocators with > adjustment of parameters to include only relevant ones. > > The replacement was mostly automated with semantic patches like the one > below with manual massaging of format strings. > > @@ > expression ptr, size, align; > @@ > ptr = memblock_alloc(size, align); > + if (!ptr) > + panic("%s: Failed to allocate %lu bytes align=0x%lx\n", __func__, > size, align); > > Signed-off-by: Mike Rapoport > Reviewed-by: Guo Ren # c-sky > Acked-by: Paul Burton # MIPS > Acked-by: Heiko Carstens # s390 > Reviewed-by: Juergen Gross # Xen > --- > arch/alpha/kernel/core_cia.c | 3 +++ > arch/alpha/kernel/core_marvel.c | 6 ++++++ > arch/alpha/kernel/pci-noop.c | 13 +++++++++++-- > arch/alpha/kernel/pci.c | 11 ++++++++++- > arch/alpha/kernel/pci_iommu.c | 12 ++++++++++++ > arch/arc/mm/highmem.c | 4 ++++ > arch/arm/kernel/setup.c | 6 ++++++ > arch/arm/mm/mmu.c | 14 +++++++++++++- > arch/arm64/kernel/setup.c | 8 +++++--- > arch/arm64/mm/kasan_init.c | 10 ++++++++++ > arch/c6x/mm/dma-coherent.c | 4 ++++ > arch/c6x/mm/init.c | 3 +++ > arch/csky/mm/highmem.c | 5 +++++ > arch/h8300/mm/init.c | 3 +++ > arch/m68k/atari/stram.c | 4 ++++ > arch/m68k/mm/init.c | 3 +++ > arch/m68k/mm/mcfmmu.c | 6 ++++++ > arch/m68k/mm/motorola.c | 9 +++++++++ > arch/m68k/mm/sun3mmu.c | 6 ++++++ > arch/m68k/sun3/sun3dvma.c | 3 +++ > arch/microblaze/mm/init.c | 8 ++++++-- > arch/mips/cavium-octeon/dma-octeon.c | 3 +++ > arch/mips/kernel/setup.c | 3 +++ > arch/mips/kernel/traps.c | 3 +++ > arch/mips/mm/init.c | 5 +++++ > arch/nds32/mm/init.c | 12 ++++++++++++ > arch/openrisc/mm/ioremap.c | 8 ++++++-- > arch/powerpc/kernel/dt_cpu_ftrs.c | 5 +++++ > arch/powerpc/kernel/pci_32.c | 3 +++ > arch/powerpc/kernel/setup-common.c | 3 +++ > arch/powerpc/kernel/setup_64.c | 4 ++++ > arch/powerpc/lib/alloc.c | 3 +++ > arch/powerpc/mm/hash_utils_64.c | 3 +++ > arch/powerpc/mm/mmu_context_nohash.c | 9 +++++++++ > arch/powerpc/mm/pgtable-book3e.c | 12 ++++++++++-- > arch/powerpc/mm/pgtable-book3s64.c | 3 +++ > arch/powerpc/mm/pgtable-radix.c | 9 ++++++++- > arch/powerpc/mm/ppc_mmu_32.c | 3 +++ > arch/powerpc/platforms/pasemi/iommu.c | 3 +++ > arch/powerpc/platforms/powermac/nvram.c | 3 +++ > arch/powerpc/platforms/powernv/opal.c | 3 +++ > arch/powerpc/platforms/powernv/pci-ioda.c | 8 ++++++++ > arch/powerpc/platforms/ps3/setup.c | 3 +++ > arch/powerpc/sysdev/msi_bitmap.c | 3 +++ > arch/s390/kernel/setup.c | 13 +++++++++++++ > arch/s390/kernel/smp.c | 5 ++++- > arch/s390/kernel/topology.c | 6 ++++++ > arch/s390/numa/mode_emu.c | 3 +++ > arch/s390/numa/numa.c | 6 +++++- > arch/sh/mm/init.c | 6 ++++++ > arch/sh/mm/numa.c | 4 ++++ > arch/um/drivers/net_kern.c | 3 +++ > arch/um/drivers/vector_kern.c | 3 +++ > arch/um/kernel/initrd.c | 2 ++ > arch/um/kernel/mem.c | 16 ++++++++++++++++ > arch/unicore32/kernel/setup.c | 4 ++++ > arch/unicore32/mm/mmu.c | 15 +++++++++++++-- > arch/x86/kernel/acpi/boot.c | 3 +++ > arch/x86/kernel/apic/io_apic.c | 5 +++++ > arch/x86/kernel/e820.c | 3 +++ > arch/x86/platform/olpc/olpc_dt.c | 3 +++ > arch/x86/xen/p2m.c | 11 +++++++++-- > arch/xtensa/mm/kasan_init.c | 4 ++++ > arch/xtensa/mm/mmu.c | 3 +++ > drivers/clk/ti/clk.c | 3 +++ > drivers/macintosh/smu.c | 3 +++ > drivers/of/fdt.c | 8 +++++++- > drivers/of/unittest.c | 8 +++++++- Acked-by: Rob Herring > drivers/xen/swiotlb-xen.c | 7 +++++-- > kernel/power/snapshot.c | 3 +++ > lib/cpumask.c | 3 +++ > mm/kasan/init.c | 10 ++++++++-- > mm/sparse.c | 19 +++++++++++++++++-- > 73 files changed, 409 insertions(+), 28 deletions(-)