Received: by 10.192.165.148 with SMTP id m20csp332110imm; Wed, 2 May 2018 00:42:36 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqcX6J8EYWio0PZ1dNSqDpAPps8y7SrPy6FXFRvHLxS4uDENO04kd/s25bkfCmWkcmsGc8u X-Received: by 2002:a63:203:: with SMTP id 3-v6mr8386901pgc.133.1525246956148; Wed, 02 May 2018 00:42:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525246956; cv=none; d=google.com; s=arc-20160816; b=ORJM9ummKGbMQymaydLLgHQu4/HblqGwiZ+tgY+ed8h1RmMtH7c2UqnljLPWjbGBqc +y+PcSaR71ZOYG+DZY2kOtk7gLtnUVW2oNA2DXKutkqHbLdxDrFW5FTs6NQ3ppX7L3VP hzm9QaGe8+7TLbtpgrbtgOMDg6z0xyJ3cehu2OiorteHkEETCt7vs6poqYUFOdbn6DOG x1SiDgvXZ7+Bmr4JST9CPGENJgbnEQjIEb6z0pdt/UQiV/DqCer3nf7geBCn2RBE8ZZE 7tZWV5hubn7pXOVGuwqEglPBs9xQ8/qh0icDn/B8FBWVb14baCtk7kUhpUF3RW/L878o GAow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=K6TgVDpRKFQt6nJhBqN0swx7h5jN3tM2u7VAp32PGdY=; b=aZBZY2LQbjh/OZnzZtujnFqgY159YNPUE9dv8iNdghw3wnIYkk5lGGxCNrqFzn9Ucb fEUQVXZyqT0u5vxioJQd6ToEP/Q8Tocwh7bfqki+B09YvyvKXezTEy0/vumSj/nUbc1D KpJVh8NPEAFP3nuuM6Wz3V3JMapRglxI8YVqg4HZcRXvjLqk0glfYTr50tQJobrV12e2 cBJaQfDbPl6kLe1dkYrm3x59TjEZDlnokqoylEyeoc6plDPibL2sKyV3qCpMo8u78M3E 55YUhM4z5cWGi7DfRjBaBqhw/QTNCr/yyPGJbVsE5plFRL5s86h1xtBujWI9YZEE9l54 W8HA== ARC-Authentication-Results: i=1; mx.google.com; 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 e3-v6si8815349pgr.400.2018.05.02.00.42.21; Wed, 02 May 2018 00:42:36 -0700 (PDT) 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; 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 S1751459AbeEBHlp (ORCPT + 99 others); Wed, 2 May 2018 03:41:45 -0400 Received: from relay3-d.mail.gandi.net ([217.70.183.195]:44913 "EHLO relay3-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751436AbeEBHlm (ORCPT ); Wed, 2 May 2018 03:41:42 -0400 X-Originating-IP: 2.224.242.101 Received: from w540 (2-224-242-101.ip172.fastwebnet.it [2.224.242.101]) (Authenticated sender: jacopo@jmondi.org) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id B309960023; Wed, 2 May 2018 09:41:34 +0200 (CEST) Date: Wed, 2 May 2018 09:41:33 +0200 From: jacopo mondi To: hch@infradead.org Cc: Geert Uytterhoeven , Jacopo Mondi , Yoshinori Sato , Rich Felker , Thomas Petazzoni , Robin Murphy , Linux-Renesas , Linux-sh list , Linux Kernel Mailing List Subject: Re: [PATCH] sh: mm: Fix unprotected access to struct device Message-ID: <20180502074133.GD17527@w540> References: <1523972123-5700-1-git-send-email-jacopo+renesas@jmondi.org> <20180418104703.GA12462@infradead.org> <20180418131314.GC3999@w540> <20180420083147.GC31275@infradead.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="sXc4Kmr5FA7axrvy" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-Spam-Level: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --sXc4Kmr5FA7axrvy Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Hi Christoph, On Fri, Apr 20, 2018 at 11:59:13AM +0200, Geert Uytterhoeven wrote: > Hi Christoph, > > On Fri, Apr 20, 2018 at 10:31 AM, Christoph Hellwig wrote: > > On Wed, Apr 18, 2018 at 03:13:14PM +0200, jacopo mondi wrote: > >> As long as it goes for arch/sh, the only user of dma_alloc_coherent() > >> is platform_resource_setup_memory(), and it has been fixed by this > >> patch. > > > > Great! > > > >> Unfortunately, as Thomas pointed out, there are drivers which calls > >> into this with the wrong 'struct device' as the sh_eth one he had fixed. > > > > Yes, we'll need fixes there. Other DMA ops implementations also look > > at struct device, so they generally are buggy. > > > >> I would then say that as long as it goes for the NULL case, we should be > >> fine now. > > > > Then I'd say skil that part, please. > > The major reason for keeping the NULL WARN_ON() checks is to make it > obvious to the developer what is wrong, and fall back to the old behavior. > > Without the checks, the kernel will just crash during early startup, > without a clue in the (missing) kernel output, usually leading to a > frustrating bisection experience (if the developer is sufficiently motivated, > at all). > > Hence my vote for keeping the checks. Gentle ping as I don't see this patch being collected in v4.17-rc3 Thanks j > > Gr{oetje,eeting}s, > > Geert > > -- > Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org > > In personal conversations with technical people, I call myself a hacker. But > when I'm talking to journalists I just say "programmer" or something like that. > -- Linus Torvalds --sXc4Kmr5FA7axrvy Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJa6WutAAoJEHI0Bo8WoVY8CYYP/2N/7yrUnb3i7cWeEF1OFoLZ nXYQlHzmWBkA011mxrHC4dtoJHv+i1N85amPAMHMs6teawOkIR2VCEwMPWr6vmY4 HegIHIdbf2Qlc14AzIMZ8P0t3BB9zLQoXkzT16saV+PMh019wXN8oD0q1vJBAmN/ I8eTCptil6FnhJrkGiuJuxzoSX1EdcFOyYC0AB6l1pMG+hc98V4JBphpA8WLTpc7 +S997xBY5Y/WF9K4IGCSdaSFCFcv3S3uTE2GjOIHnDwIKxAJhmsOWDs4xbmBXCWz BMTi2llfa10o96WqBQi39CuKT7HcLbc6Oj0fEKm9U9YtF/CCs/vCLUkk6ZCDK2Nv Sw3ZnQVZpv6V5Nltuk2mtqn+LqM9JzgjfN7slEnkC4JA8PgK+N/aW8wsnq/2e7QY vJSeW3+FXiIrvRdgQbif4EgXLzAiYzyozbq6KG8KInuFvMo82u0BjTiz93e0F6XD 7udl060h3DfoXVmBVuKPVYpOhJgO+PTEVLm53lQzCucpOePgAflUs9XaTP9AxJ3O PSdHIt3RF/Il8NqsDargaIQlq9L15rHYBfK2++zLuHbmrf36DPcRJBCEg0PGwCsY RSkP+Tinfi3tV30oPtt3T9WeVlzumlqzCI4SiGKosouAdlU6A2LwpMCM1ZZBjUI/ mkHWCqa16xsN6SS7A9Es =HPqX -----END PGP SIGNATURE----- --sXc4Kmr5FA7axrvy--