Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp4983108iob; Mon, 9 May 2022 06:17:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxY2UcXyuJfKgRkjXhDSpIRYUw8ORYSO4v6U6gSWiI7lcLrynB3qPQMtXz+3KIUr4noOI67 X-Received: by 2002:a17:902:ccc9:b0:15b:c265:b7a0 with SMTP id z9-20020a170902ccc900b0015bc265b7a0mr16143331ple.107.1652102221359; Mon, 09 May 2022 06:17:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652102221; cv=none; d=google.com; s=arc-20160816; b=cTh+CO/k7twW87k2MjDYNOAyCRyEG2U2bkyJYDIJmunbixs+8urhEzuDE7kizGUoyf d2JnyL7u8USmo2T0v/eF9psWH1jfY7+m9oEOHvaELJ8JfP4RGIxWOvSS3qEwre9afOM7 +mS7M+NJ6RzHR91V4tcwH7qV3IWOwFxX9rVFrC0cHzAm0nlDqgkvYAq7ZVKyW40cA3vY 2SKgFq0lVJCvqVMvWbdlW0Dt+hQ4yAynCvH3kw2BDBNE8Dgsco5D38lQecS2A9IzMqNt U5L0gyJprv8yt1W+AMFmIRXtk9a3udWq46RtiO8woMft+DF9ym0ShHFQDAoeJo55cWS4 iZPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=V7sVFTS+5yAR0azVOLl3V1WjaBaPiQnp0mUHjeDUakM=; b=x/7npvKh9Ussbkp7JY/0tA+9VzLvZmopMZu3CoYcvvKf9THIGDGuMOl8J6Sx/3rhHO YQ6WwyuaYFbZep82vQNrCeXAy58bCS8R/lsj2ctkRrHV33B9YTttJJSSqiSvqIdmzM9F CdSlv5PKeozvvVoQqd47sPdC2NyncsuDptEXYq6/F9tjQC2XJ71MQGKRoKCyRIb1aREZ jxkGQ0QcgP4rxxdybgPO5GCSvQgCVOy7bsAuG3benMmUSaNbDonBEAUBNXtDzMQolCzB QMeYZNnOhuoLfn2DWLSA+iL8miCQ7ikCAu1jpCFYZdu8KOuMiDMuiy0HqOugpVPI5g5C F+hw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id u34-20020a634722000000b003c6750425e7si11806267pga.596.2022.05.09.06.17.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 May 2022 06:17:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id F10892AD76A; Mon, 9 May 2022 06:15:05 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235483AbiEINSe (ORCPT + 99 others); Mon, 9 May 2022 09:18:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41988 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235304AbiEINSE (ORCPT ); Mon, 9 May 2022 09:18:04 -0400 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9F2932A76BC for ; Mon, 9 May 2022 06:14:10 -0700 (PDT) Received: from canpemm500002.china.huawei.com (unknown [172.30.72.56]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4KxhSS7182zhZ3l; Mon, 9 May 2022 21:13:28 +0800 (CST) Received: from huawei.com (10.175.124.27) by canpemm500002.china.huawei.com (7.192.104.244) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Mon, 9 May 2022 21:14:01 +0800 From: Miaohe Lin To: CC: , , , , , , , , , , , Subject: [PATCH 05/15] mm/swap: print bad swap offset entry in get_swap_device Date: Mon, 9 May 2022 21:14:06 +0800 Message-ID: <20220509131416.17553-6-linmiaohe@huawei.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20220509131416.17553-1-linmiaohe@huawei.com> References: <20220509131416.17553-1-linmiaohe@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.124.27] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To canpemm500002.china.huawei.com (7.192.104.244) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, 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 If offset exceeds the si->max, print bad swap offset entry to help debug the unexpected case. Signed-off-by: Miaohe Lin --- 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