Received: by 10.192.165.148 with SMTP id m20csp430813imm; Fri, 20 Apr 2018 01:33:57 -0700 (PDT) X-Google-Smtp-Source: AIpwx4++rba4BgQtGa0XffNjjdfMSFaLwHJzdDI9ctg2PGv0gZBZW7Cnf7jTf3v8KhSzCkfPXodK X-Received: by 2002:a17:902:8501:: with SMTP id bj1-v6mr9158368plb.239.1524213237011; Fri, 20 Apr 2018 01:33:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524213236; cv=none; d=google.com; s=arc-20160816; b=NGuwEgAGvLYuZUHy9Bi1BdBEjzpZwAbGP2MrDlBbbkTzF2c+buXeFNb2t2vOE5uJhh DM8y9g2EwbrLndX5/EakAhB+GlvGLZmxVy7Ey1NnXEpxg2JD2uh9I8J86q8kDqEBSQyF 9UoyrlTvzdiyet+fLyIm7J4yq/187OiUlUSbRRTX33ITDjUsHMRs0A0bXUCv5us6bNBw RRL2M7lFVRIvWKiR5fkJLpDP3qOjrCvsF0YoMg4c+USQvmIaYOEzIMojHL89VAOnIaNi gismtVFgawM5xWVzFyEsugM0aHcTST3knoYh7udRSkM0h8wLDnzy0PGC9XZXCPU2r3UT EpbQ== 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:dkim-signature:arc-authentication-results; bh=JPG38DonNs4i8VLqXTrp4XhDTpfbRufy/YZnAckqzQI=; b=oTIjqdsYjMaPiss62KP9+IXr3uarI1C8I+ctvwSR4yIPv7TaGYN/ieSOHX+RmYsy5j xoC2N+vvRD7kDzBBK686x8n1ongwJEz5ZmNjaSQ2uCVzHPtM3ciLaW6wY6T/vK9FdUBt C5uTum6Gds1cHvN6m7JLV8semc6GcWggbzbL9zHufGpUjiDNsxDOYiIbkdJTxCEnWgfj y5IbtLUL4mAJI2ToxCWJLR3lknUvVCzotLNtUeBQyAhdtN263o6eloo94coh2GcSLFNf SZSnSX9Gic0zZ8WBhJLVAErrNLdG/G3825iMA72W1msI5smQ66pmv5AWZhb/zryx8dvz SzIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=NJQJVLTN; 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 d10si4662503pgu.626.2018.04.20.01.33.42; Fri, 20 Apr 2018 01:33:56 -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; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=NJQJVLTN; 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 S1754241AbeDTIb5 (ORCPT + 99 others); Fri, 20 Apr 2018 04:31:57 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:39842 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753957AbeDTIb4 (ORCPT ); Fri, 20 Apr 2018 04:31:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=JPG38DonNs4i8VLqXTrp4XhDTpfbRufy/YZnAckqzQI=; b=NJQJVLTN1TX9dQjDF9hot8Gyx 23Ih6Ce8VYcPpwl8r8hokz+C3TqFrHEp98XvLBcyZtPJaP+I6Y6cm2GS23kdgt1dlqHe4aKo+7Y+T OaUtIsSBpTkysCT48c6uGMgBtyyQDDp88Fc8KBTsAqtDQdsr6f1G6DgWlT7cZbVFru1RPL0BK9XLS WXHTe+Sj7vE9Uv3iZqpILNe2rcnixkBcSdlYZPc1tavA/19Vs18fqA109mwqKBE1FE8Qo7BDic5/F ctzWpRMuYMZhD0EzMM52LZSNvb8FtY6+ngtupgVwxb5qXOLQlZcB+Koh34dp/CryN9xr/OCZ19eXr ZDfBDxIrA==; Received: from hch by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1f9RSN-0002xM-PS; Fri, 20 Apr 2018 08:31:47 +0000 Date: Fri, 20 Apr 2018 01:31:47 -0700 From: Christoph Hellwig To: jacopo mondi Cc: Christoph Hellwig , Jacopo Mondi , ysato@users.sourceforge.jp, dalias@libc.org, thomas.petazzoni@free-electrons.com, robin.murphy@arm.com, geert@linux-m68k.org, linux-renesas-soc@vger.kernel.org, linux-sh@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] sh: mm: Fix unprotected access to struct device Message-ID: <20180420083147.GC31275@infradead.org> References: <1523972123-5700-1-git-send-email-jacopo+renesas@jmondi.org> <20180418104703.GA12462@infradead.org> <20180418131314.GC3999@w540> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180418131314.GC3999@w540> User-Agent: Mutt/1.9.2 (2017-12-15) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.