Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2187288rwd; Fri, 2 Jun 2023 06:11:56 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6oriHO3t2AZodmWZn0iFjvBhZxC/VXdLeE7xb9JqETXH04kFR8FDcwxLy9ywIrOX5rGvVf X-Received: by 2002:a17:902:7241:b0:1a9:b8c3:c2c2 with SMTP id c1-20020a170902724100b001a9b8c3c2c2mr2276205pll.37.1685711515865; Fri, 02 Jun 2023 06:11:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685711515; cv=none; d=google.com; s=arc-20160816; b=xUMf95JmRUP2ZBygKXveWz3ZFT/R53As9cCMJP3WaHw9/kG8s7Orijhw+8gGVxD+ac LvBAKFSBylI4ihZwMq/RAuKS1+R1Df2GiXCfqfL4gVpYPC7w1OXzORfhXk79+GFn80Mb bnun244HRSuJhsoCIe+8XtewgGASvUuRoX/a0QF8snUCujqfseB8Wn7MEYzkmJ9N5M7X Afq8x1UUMkpv1he4dgVBDj1KkKINnnb63i7pa27WDjMjwwJUUIxOQmfe42LM511eW3av xDlledhCmgqYfxcFTWkoJsQTYgXcQZ6otjgFYquS/6ZHevuyjVmIWiGrQFaeHoSr+bNC 9+Mw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject:from :content-language:user-agent:mime-version:date:message-id :dkim-signature; bh=4OU+KWjof0+InLZd2Z+zpgcjkLN1kNtQWyAbuvbyUrk=; b=vCDPCIEVjrJOuuDFqeaFGVOCu8GzVrENkX6M0dPjRJ3pmJK0g93WzA6+4pCHyo0o2C 2TBdnVK5vPZgqHBI4KwqIvAjOmTYtKD/KcFWwUK+z/rqDRpTYb8X+A15d9mnSetauYrE +G2NPnt50+5khUwX1yhmhPoZzxPOegIGvnIejd5mUwRbozNGPFA/nBNqyna+2DkemN+K IFRr0AcdYx5LD8ykFpuENQ6IGSVFhC9Vb4UN4ISUOe/nmG4VG8s90MMwedPFidj7wd4c 2nmEywyXLe/lx5Eeqb6/1QEwbZ6LDDrpBwP7ZZ7ZEJx2A6esomeE5sGVsUg/5EoFFkYG hvdw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=THMTmlN5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e3-20020a17090301c300b001b04c797f7csi939122plh.210.2023.06.02.06.11.43; Fri, 02 Jun 2023 06:11:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=THMTmlN5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229488AbjFBMjX (ORCPT + 99 others); Fri, 2 Jun 2023 08:39:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42256 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235581AbjFBMi6 (ORCPT ); Fri, 2 Jun 2023 08:38:58 -0400 Received: from mail-wr1-x429.google.com (mail-wr1-x429.google.com [IPv6:2a00:1450:4864:20::429]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3BB421B4 for ; Fri, 2 Jun 2023 05:38:48 -0700 (PDT) Received: by mail-wr1-x429.google.com with SMTP id ffacd0b85a97d-3094910b150so2052875f8f.0 for ; Fri, 02 Jun 2023 05:38:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1685709526; x=1688301526; h=content-transfer-encoding:cc:to:subject:from:content-language :user-agent:mime-version:date:message-id:from:to:cc:subject:date :message-id:reply-to; bh=4OU+KWjof0+InLZd2Z+zpgcjkLN1kNtQWyAbuvbyUrk=; b=THMTmlN5uce2BLQVfhctAcE/ElUX8NGBjHT7ZwaEEpk7TrJXwy8U846OoMakn3sogC bhn9ipKsssaW5c8qvXobEpWZ51lv89/EojxzjAUwtEcwfz6O15ss3k676AmfEE6dDKIY 0ER3nmveAix1DnYC8oujXKVY1yYl66vs6rTOCw4OlFYBBpk11Li650O6j/JljHPi23kq +gunUqdF62aWlDOwOD9JA6JVPP+nqfKoiTkiL2ZG7zExPf0n74eN2O5JoDryVqvGx7yz TpYGm3Rm2k5/7vMBV3whTwPrzFMy/hmbF4foWat529V0ZqRhUBIdnyS1S0OGlMHLFZ/u EFeQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685709526; x=1688301526; h=content-transfer-encoding:cc:to:subject:from:content-language :user-agent:mime-version:date:message-id:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=4OU+KWjof0+InLZd2Z+zpgcjkLN1kNtQWyAbuvbyUrk=; b=D55++v3PhdExQFfRL04hPjselqfroV6esbmj4zdXvIEKzuXbfXRR1ghQ89d4ZBkFPT s3czomGryC4EIewqc5mjqLTftVwd6POEJluFCtgE8Z6yXfpQFQVQ2J+kPXhHJRhy/cjW Zj/DwWeQdcYy/HVskxl7ZiTTraBvjKQgY7z55q9ut2MtA0cz2mR5lih1lDgQj16gaJDR 2iigWE87wI8Ke4D72v55mCUjaXm8Oy+rrrMWvZ1/nE1sfWmRsU0V2tvpCR3PTnPDIcXG 0pbzA6q0HVsLi2NBk4OltUGLz9cdjGkpK97pn2V2pbMQoiweywkIJkYVhZA15Vd5f6wz 1/Vg== X-Gm-Message-State: AC+VfDy7BuaiflylLCe2+ZtlKHCA8TzPuD989Ha/XRf8LiqGW/8iA0Ef Ya7jfyd1bWCRnorkB+5yDTY= X-Received: by 2002:a5d:49c4:0:b0:30a:dcba:2d81 with SMTP id t4-20020a5d49c4000000b0030adcba2d81mr3707936wrs.38.1685709526341; Fri, 02 Jun 2023 05:38:46 -0700 (PDT) Received: from [192.168.0.210] (cpc154979-craw9-2-0-cust193.16-3.cable.virginm.net. [80.193.200.194]) by smtp.googlemail.com with ESMTPSA id x11-20020a5d650b000000b00307972e46fasm1567347wru.107.2023.06.02.05.38.45 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 02 Jun 2023 05:38:45 -0700 (PDT) Message-ID: <1cbc8768-7a94-530d-f3ba-923038e6ef12@gmail.com> Date: Fri, 2 Jun 2023 13:38:44 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Content-Language: en-US From: "Colin King (gmail)" Subject: re: zswap: do not shrink if cgroup may not zswap To: Nhat Pham , Seth Jennings , Dan Streetman , Vitaly Wool , Andrew Morton , Johannes Weiner , Linux-MM Cc: "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 Hi, static analysis with clang scan build has detected an issue in the following commit: commit 6804144bf1cfa3978ad98e625d8a1d2a4b80cbee Author: Nhat Pham Date: Tue May 30 15:24:40 2023 -0700 zswap: do not shrink if cgroup may not zswap The issue is as follows in function zswap_frontswap_store in mm/zswap.c: /* * XXX: zswap reclaim does not work with cgroups yet. Without a * cgroup-aware entry LRU, we will push out entries system-wide based on * local cgroup limits. */ objcg = get_obj_cgroup_from_page(page); if (objcg && !obj_cgroup_may_zswap(objcg)) goto reject; mm/zswap.c:1210:6: warning: variable 'ret' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized] The goto reject path ends up returning ret, however, ret at this point has not been initialized, so a garbage return value is being returned by function zswap_frontswap_store Colin