Received: by 2002:a05:6a10:c7c6:0:0:0:0 with SMTP id h6csp3124931pxy; Wed, 4 Aug 2021 03:01:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw9Zq1Bp3/iF6YusTiIYndorOLjhelBaaZrVDpDx7n81vIXPXSSdjOa94EpXPjokOhL8gad X-Received: by 2002:aa7:d696:: with SMTP id d22mr3969936edr.309.1628071318597; Wed, 04 Aug 2021 03:01:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628071318; cv=none; d=google.com; s=arc-20160816; b=IlvEEcxzOaC3t3cxm38CCiBECvgKi149Im+54oKsrZ+7VPT+lRrZoeymXMKdV1T6dz RJI4QoYPCiCveaJvSn649mL4n7PfrhU0ZorTrA0PuUVptEfqxylOl/o+P1tMd6a5L5Ez FfoigWsuGpG49KlNf7v7fV3vd8QXqm6lY6KIkjmlMochJYSS1L8dmwAR/1Q+rAklqjhT wqZ9W6Qvj3U7B16i+VbzCa2+2ySX0yewhqey+HrMi28FibgJtfAY1S2gwL42TFQUYxa/ /GK4LWroB22UVKMEs9HdyrxLqpVqpzAmLXcPiEn9rO549mMFXPkNF8aRKwa0KcbJatyr otoQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:message-id:in-reply-to :date:references:subject:cc:to:from; bh=lG6pj3v91tPZoeM7cRES18ZGgogLwrDMBsO2nxjQNoc=; b=Rnzwkw3R6L3VGqiQdehN5gOGOH+k92eKhvvkU1JGEOu7kAtn8Xq+Jk9AsSevdxLE8D f8ByNthqXvtQPQiWOdEXIRPDIaGWINBDvnyo30JX2yttKGCrpyNf4V6EfcB/O+KWiAEB wKKZbm6+5J6B1xEMjGI2kXZrup/Uz5YK7lrbxvu+jcbtgQygf9Y5gzSFj5U5enGWWDf6 LghDaEM+UBjQk/NJSq72+CUkchIM4w9WJHA82oKR3QBUpEHZt9+HIq0TSG6ghsIF/Y9r taA1b45AUJ6S+7a73qpVeSunseD8JwlYjxutNWlpwog5TS/CtZpsYh2GZzYeQ/iK5HwO Z3NA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p26si1781984edu.78.2021.08.04.03.01.08; Wed, 04 Aug 2021 03:01:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236822AbhHDJB5 (ORCPT + 99 others); Wed, 4 Aug 2021 05:01:57 -0400 Received: from mga02.intel.com ([134.134.136.20]:44644 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236801AbhHDJB5 (ORCPT ); Wed, 4 Aug 2021 05:01:57 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10065"; a="201049700" X-IronPort-AV: E=Sophos;i="5.84,293,1620716400"; d="scan'208";a="201049700" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Aug 2021 02:01:43 -0700 X-IronPort-AV: E=Sophos;i="5.84,293,1620716400"; d="scan'208";a="667757443" Received: from yhuang6-desk2.sh.intel.com (HELO yhuang6-desk2.ccr.corp.intel.com) ([10.239.159.119]) by fmsmga006-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Aug 2021 02:01:40 -0700 From: "Huang, Ying" To: Matthew Wilcox Cc: Hugh Dickins , Andrew Morton , David Hildenbrand , Yang Shi , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Miaohe Lin , Johannes Weiner , Michal Hocko , Joonsoo Kim , Minchan Kim Subject: Re: [PATCH] mm,shmem: Fix a typo in shmem_swapin_page() References: <20210723080000.93953-1-ying.huang@intel.com> <24187e5e-069-9f3f-cefe-39ac70783753@google.com> <8735rr54i9.fsf@yhuang6-desk2.ccr.corp.intel.com> Date: Wed, 04 Aug 2021 17:01:39 +0800 In-Reply-To: (Matthew Wilcox's message of "Tue, 3 Aug 2021 13:01:09 +0100") Message-ID: <87czqt4m8c.fsf@yhuang6-desk2.ccr.corp.intel.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=ascii Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Matthew Wilcox writes: > On Tue, Aug 03, 2021 at 04:14:38PM +0800, Huang, Ying wrote: >> Matthew Wilcox writes: >> > But I REALLY REALLY REALLY want a reproducer. Right now, I have a hard >> > time believing this, or any of the other races can really happen. >> >> I think the race is only theoretical too. Firstly, swapoff is a rare >> operations in practice; secondly, the race window is really small. > > So do something to provoke it. Widen the window. Put an msleep(1000) > between *pagep = NULL and the call to get_swap_device(). That's assuming > that the swapon/swapoff loop that I proposed doesn't work. Did you > try it? I haven't tried it. Do you agree that the race is possible in theory? But if you still really want it, I can try to do that. Best Regards, Huang, Ying