Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp675628yba; Wed, 15 May 2019 08:06:07 -0700 (PDT) X-Google-Smtp-Source: APXvYqyG0PWBDCRwwSK14k0X+M3uBkwdBQ/MYWT9E7RA4kyT6a/sLSr1HjG68rgBQM7VUIJtgRvV X-Received: by 2002:a62:b517:: with SMTP id y23mr42508810pfe.182.1557932767585; Wed, 15 May 2019 08:06:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557932767; cv=none; d=google.com; s=arc-20160816; b=I4wDucOHUowypZE81ljDKe8iVBDplZgfZVH5/ZDkXygBXgJBL/3ea8fH5pupGl221S CIbTLElFXZOfcpbmkbtazhYhEQV3X3Q9J1gXXgAZb/e6X/FcdMu0vTtznfPa28O017Ly icqQyd0fp/xL/pxzHDSOs7PpENqKEOw9GW2iPwvNYHXYiwdvpz54XLAWb3Is+y+nHGn9 JxHk8yrgzvjBpdxh1wO6wF248ljTWZAwvtdU8eJZuCV/PF5fYt2dzGBmtuuk/TUVVsqL 6nat77cim3WiM/NIbzh7xAYQ7PuZ0vqUhAKvsAuaV2cmm+V+xZkJe2+YUSU4oUsyS1wV LB9w== 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-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=FKh5p7YUNtptnQS9Ece7TuhC8ViP4880CqVJILUI6fQ=; b=jIvOW1FdFt1UGaG1gL62HdQTfq4+iUm6+FO3U2RHeJLZbz9a0wod4/CYoBs7OrKyAt QFUTKCeU1okaQfPxik4m+qJqI++GXl/2g1JVtdqCB6I2IXlv0GumFYvAUY1ADq1W39fO Gbqv888LSfnTrjuyyE4iTnDiG2JtvP5vtkB2skmiCSewy6ZGMEkOJyK7e7CZYckOI1qm AKXYMoMaJ1+YoSW/MDRwex9A3EBteeRFY5oRt0r9l0xceqDmboc8YuHTuEs1S2/hkg3H 5rlSsp/0jl7/jaSlusrFJau3DwsJLRNz5rBOPG2bB2CSknDN/xnhQTL2/Kqb/bmKD7Py tgTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=u8ZxO+aI; 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 s1si2022156pgj.114.2019.05.15.08.05.38; Wed, 15 May 2019 08:06:07 -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=pass header.i=@kernel.org header.s=default header.b=u8ZxO+aI; 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 S1727115AbfEOPEK (ORCPT + 99 others); Wed, 15 May 2019 11:04:10 -0400 Received: from mail.kernel.org ([198.145.29.99]:56766 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726583AbfEOPEK (ORCPT ); Wed, 15 May 2019 11:04:10 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D396720818; Wed, 15 May 2019 15:04:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1557932649; bh=35dYv7cUrj9box5GYfZLkLxBHkEcek2CZmiVu9HLksA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=u8ZxO+aIhqlvTlqv5offOKjWeovz/LLOQMt+n6wfRE3fY6Id8zD51XO3GFgKVxRBd +OBfpOCFQHP4uYuF5BdcEv4Nyid7GcUUVqS5LhlbJaoIiy8XgNtIBbbBfFg1oXxZ07 B+ETbWC1AsIJB/rVtskuygrba2bnCMpjLU/Jfr1o= Date: Wed, 15 May 2019 17:04:06 +0200 From: Greg Kroah-Hartman To: Matthew Wilcox Cc: Lech Perczak , Al Viro , Eric Dumazet , "linux-kernel@vger.kernel.org" , Piotr Figiel , Krzysztof =?utf-8?Q?Drobi=C5=84ski?= , Pawel Lenkow , "linux-mm@kvack.org" Subject: Re: Recurring warning in page_copy_sane (inside copy_page_to_iter) when running stress tests involving drop_caches Message-ID: <20190515150406.GA22540@kroah.com> References: <14c9e6f4-3fb8-ca22-91cc-6970f1d52265@camlintechnologies.com> <011a16e4-6aff-104c-a19b-d2bd11caba99@camlintechnologies.com> <20190515144352.GC31704@bombadil.infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20190515144352.GC31704@bombadil.infradead.org> User-Agent: Mutt/1.11.4 (2019-03-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 15, 2019 at 07:43:52AM -0700, Matthew Wilcox wrote: > > > W dniu 25.04.2019 o?11:25, Lech Perczak pisze: > > >> Some time ago, after upgrading the Kernel on our i.MX6Q-based boards to mainline 4.18, and now to LTS 4.19 line, during stress tests we started noticing strange warnings coming from 'read' syscall, when page_copy_sane() check failed. Typical reproducibility is up to ~4 events per 24h. Warnings origin from different processes, mostly involved with the stress tests, but not necessarily with block devices we're stressing. If the warning appeared in process relating to block device stress test, it would be accompanied by corrupted data, as the read operation gets aborted. > > >> > > >> When I started debugging the issue, I noticed that in all cases we're dealing with highmem zero-order pages. In this case, page_head(page) == page, so page_address(page) should be equal to page_address(head). > > >> However, it isn't the case, as page_address(head) in each case returns zero, causing the value of "v" to explode, and the check to fail. > > You're seeing a race between page_address(page) being called twice. > Between those two calls, something has caused the page to be removed from > the page_address_map() list. Eric's patch avoids calling page_address(), > so apply it and be happy. > > Greg, can you consider 6daef95b8c914866a46247232a048447fff97279 for > backporting to stable? Nobody realised it was a bugfix at the time it > went in. I suspect there aren't too many of us running HIGHMEM kernels > any more. > Sure, what kernel version(s) should this go to? 4.19 and newer? thanks, greg k-h