Received: by 10.213.65.68 with SMTP id h4csp720346imn; Tue, 27 Mar 2018 07:35:17 -0700 (PDT) X-Google-Smtp-Source: AG47ELuLcASJZrjfMM5E59M2YvVB/oNrUL9Rjiy/Fykf7SPN8eOB1alBoTDJfuuIoyBthY+snY4w X-Received: by 10.99.108.2 with SMTP id h2mr31611448pgc.396.1522161317504; Tue, 27 Mar 2018 07:35:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522161317; cv=none; d=google.com; s=arc-20160816; b=CzEtrW+kEgQmed/k/T524tJYPtjIymhbSDuN5wO2iWsxAHzbfmtq4ol6tpGKn38W6g lhooqvTWuAehGgsWPKyAHlt+Wbk/ivPNfbopJEsLsA5Tb3Eki66NQZOkFAealDjTh854 5fw+DitwWFDCBc4FjhXiRU9/n6bo01r6iTt5YUjQAvQ9+gTu8hZSSrMe/ZD/YzpqBoZ4 e7bv0OdPHAN2DgGQfO1Z8lIVZRWVbv162w5GmIX3+4H1haRw8a8l5aMijtqf6TpqTehL Rc5kFsYSPFUOSbmvDKCvn129KZwwGueiopO8lBweWE0EPxgfHHw1+lDCCDeOKQSpB66S JT1g== 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=+FUvM74nbjPUbW91023NJbc46Qq7IyMZ4YnmnqqgSzA=; b=gGCe+Kjxp2vrvVU2Q/UOXz7QIe74eaQ5D34wIgJeaG0mLw86+ZbDIA5cLZ7382iSRM qJSEY0QrV8uQfNf8C1YCuYOPHXfJXGtzJpN3qGUuLZTtjK8Y7Rv5QX33QL3G7DtrPGPW fmg6WFF8xm1qQd/GH/Dfn2MHkii0v7J7fkuTfQ53de/Uu6VkkQBzrMU8QCvu45/p45NB fFFQOG4suH1ytMyQSGfwp2SzswX0eRijjwN/cWhS2hMM57G3lCUgOOK3MjxJnODccKr+ xbsnauhsJd2tvD24ljsLO2iZnvBFyKepxNKzzfigHU9Bi2Y/TgXVYMBc/VBVZhLQNYfq nf2w== 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 r20si1029032pff.361.2018.03.27.07.35.02; Tue, 27 Mar 2018 07:35:17 -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 S1752053AbeC0Odn (ORCPT + 99 others); Tue, 27 Mar 2018 10:33:43 -0400 Received: from verein.lst.de ([213.95.11.211]:40625 "EHLO newverein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750944AbeC0Odm (ORCPT ); Tue, 27 Mar 2018 10:33:42 -0400 Received: by newverein.lst.de (Postfix, from userid 2407) id 96B5768D36; Tue, 27 Mar 2018 16:33:41 +0200 (CEST) Date: Tue, 27 Mar 2018 16:33:41 +0200 From: Christoph Hellwig To: Sebastian Ott Cc: Christoph Hellwig , Jesper Nilsson , Geert Uytterhoeven , linux-kernel@vger.kernel.org Subject: Re: dma_zalloc_coherent broken with 57bf5a8963f80fb3828c46c3e3a5b2dd790e09a7 Message-ID: <20180327143341.GA4968@lst.de> References: 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 On Tue, Mar 27, 2018 at 10:12:54AM +0200, Sebastian Ott wrote: > Hi, > > commit 57bf5a8963f80fb3828c46c3e3a5b2dd790e09a7 broke usage of dma > allocations specifying __GFP_ZERO by silently removing that flag. > > Why should "the memory returned [] always be zeroed."? Because that is what the current implementations do - we always zero the memory returned from dma_map_ops.alloc().