From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1763277AbbA3WCE (ORCPT ); Fri, 30 Jan 2015 17:02:04 -0500 Received: from mga14.intel.com ([192.55.52.115]:39540 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754852AbbA3WCC (ORCPT ); Fri, 30 Jan 2015 17:02:02 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.09,494,1418112000"; d="scan'208";a="645288064" Message-ID: <1422655318.9530.15.camel@schen9-desk2.jf.intel.com> Subject: Re: [PATCH] pci-dma: Fix x86 dma_alloc_coherent to fully clear all pages returned From: Tim Chen To: Greg KH Cc: "H. Peter Anvin" , Akinobu Mita , Mathias Nyman , Andi Kleen , Ingo Molnar , Andrew Morton , Marek Szyprowski , Thomas Gleixner , linux-kernel@vger.kernel.org, x86@kernel.org, linux-usb@vger.kernel.org Date: Fri, 30 Jan 2015 14:01:58 -0800 In-Reply-To: <20150130195853.GA17115@kroah.com> References: <1422647641.9530.2.camel@schen9-desk2.jf.intel.com> <20150130195853.GA17115@kroah.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.8.5 (3.8.5-2.fc19) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 2015-01-30 at 11:58 -0800, Greg KH wrote: > > Shouldn't this go to stable trees too? > Yes. Added the stable tag in updated patch that's resent. > Also, why is the xhci driver not asking for the memory it is going to > need? If it wants to use the full page, shouldn't it ask for it? > I agree that xhci should have done that, but it didn't. Commit d92ef66c4f8f ("x86: make dma_alloc_coherent() return zeroed memory if CMA is enabled") changed the behavior of dma_alloc_coherent by clearing only the memory being asked for. So for backward compatibility, clearing the pages completely to revert to dma_alloc_coherent's original behavior is probably the safe thing to do. Thanks. Tim