Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp315941iob; Wed, 18 May 2022 02:52:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJycF2hW0SXyxeOGnH/rMUpEtkvFcAajPyiouGHxCyI96po5uUt+Wwp3yQ49OcyFvkDZG83O X-Received: by 2002:a17:90a:4896:b0:1de:fff2:6c48 with SMTP id b22-20020a17090a489600b001defff26c48mr25118842pjh.89.1652867531339; Wed, 18 May 2022 02:52:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652867531; cv=none; d=google.com; s=arc-20160816; b=GmPiLDgS4PpOUdU5G0taQyKhh1U3gSmqiB3YOTXm5GaE2UCduxiK2nCY2OYIJFSiIo BPc0fLNxOB/2n0wdeoFxjkVcP9kVavp26w2lDHTbXZ+9cYgD9uPGvpADSNofEbxk9CNG 7oQzpWEOiKTQJ2jimjXk1ubM3wq3ORR1khlgpVYqwrtgjlfJI2mBU1+WqjrluybzFfjO 58hv1eDKx7ipSB2UcpJ5uTOu1FvPB9rEX0CJX6W15nnIlILN8N7EV4NtfxOBGS9mtXRv KBBfQaEMpg3MNoRMuEqInQ6maRCX2jGrcdfKcX6fZZHXT2KtVKXLPHMq27Vuz9hZopUV GUdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature :dkim-signature; bh=aius02DgTUuGeviB9+AqIcI4nipIhT22GK6S5UOA+yk=; b=VvAXtLV0BM36xR8aOydz2vKsEwuMUaUbR+jCnFQV6PZFo5LGo/GS9+s6VWkTyDEXnV GHH6nDMVPskYZZ4gEH4GRozHVaOuqfO3Lo7IGJbYOmmyALDBuFmwgVROdKVgjtsXY4JZ vFszA27PaJbZqRQHvYu0kSLSS4rL1vE6fbgFb7j87nbBZPFpcuYnYAMRbSAHrmzj6yB7 qKZ8/cQVsVbUXssvl/x6+7KwxNt37EScODri1Wmoyrul8Nvwy86lIFj/56fDgA55YT8v jgXmd1Sv2Pm36ml3Hq/9IRU5Q+rGES/XxQU9OaWmeDpzYD9q1kLY59MauYAO67dAlrV8 s0pQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=IGWN2FNy; dkim=neutral (no key) header.i=@suse.de header.b=cfZ0vuRJ; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id a4-20020a170902ecc400b0015d0d05846dsi2537098plh.430.2022.05.18.02.52.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 May 2022 02:52:11 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=IGWN2FNy; dkim=neutral (no key) header.i=@suse.de header.b=cfZ0vuRJ; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id DE436FD35E; Wed, 18 May 2022 02:37:08 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234441AbiERJgs (ORCPT + 99 others); Wed, 18 May 2022 05:36:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57742 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234414AbiERJgd (ORCPT ); Wed, 18 May 2022 05:36:33 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5AAA81A388 for ; Wed, 18 May 2022 02:36:26 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 077F71FA46; Wed, 18 May 2022 09:36:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1652866585; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=aius02DgTUuGeviB9+AqIcI4nipIhT22GK6S5UOA+yk=; b=IGWN2FNyGugiWSTqY0TKEiH0PjlVIrFtILuJWLkI3JZqqk7ZPr3Vmf9WJBhsxqpbckNsko 5pkIhPqUPnXeuEm5TJJXDrMtkqj/lqtP/P2ovef0GT5Xhzi3JbnvXqopUSnK/Jo0IaKgmE rm46zXSPSKYeHZIIBSLyOYSppGu4MKQ= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1652866585; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=aius02DgTUuGeviB9+AqIcI4nipIhT22GK6S5UOA+yk=; b=cfZ0vuRJZ3OqDPhUWukfWa1/F/xF37L3NLfwq2u+KS2bqFZejO7ddpruwkMwfgmnJz7iQn bj1Hg0tgfxCQHHDQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id C60FC133F5; Wed, 18 May 2022 09:36:23 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id rdr3Khe+hGJJEQAAMHmgww (envelope-from ); Wed, 18 May 2022 09:36:23 +0000 Date: Wed, 18 May 2022 11:36:21 +0200 From: Oscar Salvador To: Miaohe Lin Cc: akpm@linux-foundation.org, willy@infradead.org, vbabka@suse.cz, dhowells@redhat.com, neilb@suse.de, apopple@nvidia.com, david@redhat.com, surenb@google.com, peterx@redhat.com, naoya.horiguchi@nec.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 05/15] mm/swap: print bad swap offset entry in get_swap_device Message-ID: References: <20220509131416.17553-1-linmiaohe@huawei.com> <20220509131416.17553-6-linmiaohe@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220509131416.17553-6-linmiaohe@huawei.com> X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 09, 2022 at 09:14:06PM +0800, Miaohe Lin wrote: > If offset exceeds the si->max, print bad swap offset entry to help debug > the unexpected case. > > Signed-off-by: Miaohe Lin Reviewed-by: Oscar Salvador > --- > mm/swapfile.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/mm/swapfile.c b/mm/swapfile.c > index 0aee6286d6a7..d4b81ca887c0 100644 > --- a/mm/swapfile.c > +++ b/mm/swapfile.c > @@ -1272,6 +1272,7 @@ struct swap_info_struct *get_swap_device(swp_entry_t entry) > out: > return NULL; > put_out: > + pr_err("%s: %s%08lx\n", __func__, Bad_offset, entry.val); > percpu_ref_put(&si->users); > return NULL; > } > -- > 2.23.0 > > -- Oscar Salvador SUSE Labs