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.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=ham 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 19402C10F27 for ; Tue, 10 Mar 2020 18:25:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DC2D9205F4 for ; Tue, 10 Mar 2020 18:25:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727006AbgCJSZs (ORCPT ); Tue, 10 Mar 2020 14:25:48 -0400 Received: from verein.lst.de ([213.95.11.211]:54486 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726415AbgCJSZs (ORCPT ); Tue, 10 Mar 2020 14:25:48 -0400 Received: by verein.lst.de (Postfix, from userid 2407) id 3E8C268BE1; Tue, 10 Mar 2020 19:25:46 +0100 (CET) Date: Tue, 10 Mar 2020 19:25:46 +0100 From: Christoph Hellwig To: Linus Torvalds Cc: linux-kernel@vger.kernel.org, Greg Kroah-Hartman , iommu@lists.linux-foundation.org, aros@gmx.com Subject: Re: [Bug 206175] Fedora >= 5.4 kernels instantly freeze on boot without producing any display output Message-ID: <20200310182546.GA9268@lst.de> References: <20200310162342.GA4483@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org FYI, Linus' latest rant shows up in bugzilla, but never made it to me, just as the other replies from Artem and Hans. This just shows how broken bugzilla is as a reporting tool. Please be a little more calm, I've always taken reported regressions series and as a first priority, but it really does not help if information is hidden away. Adding Artem to the Cc list and drop bugzilla to make this work a bit better. Artem, can you test the patch below? This fixes the broken dma_mask handling in platform_device_register_full that could override a perfectly valid mask with 0. If this doesn't work, can you throw in a dump_stack() into the working kernel build to see where platform_device_register_full and setup_pdev_dma_masks get called for your system? diff --git a/drivers/base/platform.c b/drivers/base/platform.c index 7fa654f1288b..03035661eb6b 100644 --- a/drivers/base/platform.c +++ b/drivers/base/platform.c @@ -662,19 +662,6 @@ struct platform_device *platform_device_register_full( pdev->dev.of_node_reused = pdevinfo->of_node_reused; if (pdevinfo->dma_mask) { - /* - * This memory isn't freed when the device is put, - * I don't have a nice idea for that though. Conceptually - * dma_mask in struct device should not be a pointer. - * See http://thread.gmane.org/gmane.linux.kernel.pci/9081 - */ - pdev->dev.dma_mask = - kmalloc(sizeof(*pdev->dev.dma_mask), GFP_KERNEL); - if (!pdev->dev.dma_mask) - goto err; - - kmemleak_ignore(pdev->dev.dma_mask); - *pdev->dev.dma_mask = pdevinfo->dma_mask; pdev->dev.coherent_dma_mask = pdevinfo->dma_mask; }