Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp654595yba; Wed, 15 May 2019 07:45:35 -0700 (PDT) X-Google-Smtp-Source: APXvYqzGDd2JHzoFoMh0byDLaUR79aD2RbsTdl5orrIk4a1rlKwKtRn6uHpQOrFNoog3ouRJItu8 X-Received: by 2002:a17:902:7b93:: with SMTP id w19mr29550751pll.191.1557931535589; Wed, 15 May 2019 07:45:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557931535; cv=none; d=google.com; s=arc-20160816; b=PzbW7uNSRpWLdreHXyrBByVuGGecrRezCK2Jyuu/W40ZCvbGU4gclw9HbrlBkd7WWg aEfjCjCGOJFSNlTui4BXC8Z4ajcFRWZxe59w0Ob6GDUboLf2Lajjqmhnhj7XtgdLvCbm popasWejXYfth5KivOGDOoUIclL7bh8v3Nb2JqRRNYtiticGMYb3Y7+8X8Xg6Eth1Xcg YJXTFKxvjHhNf9s5nwDXbSYCpj1K0hqB1YlXUjTa04brDvq17vfShPQv2wtARSJ+ZnOo 6OJuTZim7oeKSgheQRTY10uGJUOt46DwMwk4FEPHoCs/AbN5yXs2eMRKHwvf2SohZALy XYMA== 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=msiRUtVZ8HSn4DdePbxIYPVfN3e75W0NOasQGN4KIA4=; b=uyQ6zznd45tZ5Ck47M9sQshP6aKjo34KOIAPCSO6JKtyWf0V+wCQzLtPEH0+YXE0Wp n5oTufrkK9Gpe9HqaACvoYvSC1hLelPW8iPofKjPmpd5CPbNzJX62EiWvP5HWlMUQf61 eMFi9I/JnL+QrliAwboO3KHmFC3G1YTvGlGCBK7ZWVwKDgRiLn71tmV8GGhmTFNlfZi/ 2ibF/J+8b96RhjRUIQGbLxnZ4MVrmlaB0xwpkWiXk2goiHq2KfhO/3uMRb+TPXHP4qxU W47HoazW+ErT5w0hPCLAViKn8t5TVvjQIyE01LtWCAQb1p0hXNjXdMgyIqOQnyQIczUV ZtGA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=uCVDsA4d; 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 3si12417plc.227.2019.05.15.07.45.19; Wed, 15 May 2019 07:45:35 -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=uCVDsA4d; 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 S1728306AbfEOOn6 (ORCPT + 99 others); Wed, 15 May 2019 10:43:58 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:43902 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726084AbfEOOn6 (ORCPT ); Wed, 15 May 2019 10:43:58 -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-Transfer-Encoding :Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Sender:Reply-To: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=msiRUtVZ8HSn4DdePbxIYPVfN3e75W0NOasQGN4KIA4=; b=uCVDsA4d940++i/x0z86awqY8K 10/9BCM/Z2Mr0+jfdFAvIZQ4drczdD3cJM+hemK6nb+JfJXaTqwxb0gGKHFpfGsTvCMsUJTVWLOqt kTf9wmMtnOPMinxGJ+hKQ1cekn6o7hZxCTGnqq43/5e009Lcr9KYZqFqHeejj+WL/2gNniCr+IT/R xmvRstEmckj37vMCYFbw+sL9rOJk749p9X9qdx9gwByu10InW7Vz2azwPG37Ie5NnbtWk/M7C3B3E AKkKCe/4Qu7sAQkWJFIzAEME8T6aQjyKTQe2R6ZpdVHQXiPBPwItazGv8RDsdZLdhKqJOO78WvqX1 ytPC6/6Q==; Received: from willy by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1hQv8K-0006cq-SW; Wed, 15 May 2019 14:43:52 +0000 Date: Wed, 15 May 2019 07:43:52 -0700 From: Matthew Wilcox To: Lech Perczak Cc: Al Viro , Eric Dumazet , "linux-kernel@vger.kernel.org" , Piotr Figiel , Krzysztof =?utf-8?Q?Drobi=C5=84ski?= , Pawel Lenkow , "linux-mm@kvack.org" , Greg Kroah-Hartman Subject: Re: Recurring warning in page_copy_sane (inside copy_page_to_iter) when running stress tests involving drop_caches Message-ID: <20190515144352.GC31704@bombadil.infradead.org> References: <14c9e6f4-3fb8-ca22-91cc-6970f1d52265@camlintechnologies.com> <011a16e4-6aff-104c-a19b-d2bd11caba99@camlintechnologies.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <011a16e4-6aff-104c-a19b-d2bd11caba99@camlintechnologies.com> User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > 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.