Message ID | 20221110143423.3250790-1-senozhatsky@chromium.org (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0A859C4332F for <linux-mm@archiver.kernel.org>; Thu, 10 Nov 2022 14:34:40 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 4245C6B0071; Thu, 10 Nov 2022 09:34:40 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 3D4898E0001; Thu, 10 Nov 2022 09:34:40 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 29B376B0074; Thu, 10 Nov 2022 09:34:40 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 17DC86B0071 for <linux-mm@kvack.org>; Thu, 10 Nov 2022 09:34:40 -0500 (EST) Received: from smtpin22.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id BBE0A161630 for <linux-mm@kvack.org>; Thu, 10 Nov 2022 14:34:39 +0000 (UTC) X-FDA: 80117778678.22.4245975 Received: from mail-pj1-f48.google.com (mail-pj1-f48.google.com [209.85.216.48]) by imf22.hostedemail.com (Postfix) with ESMTP id 5117FC0013 for <linux-mm@kvack.org>; Thu, 10 Nov 2022 14:34:39 +0000 (UTC) Received: by mail-pj1-f48.google.com with SMTP id k5so1650042pjo.5 for <linux-mm@kvack.org>; Thu, 10 Nov 2022 06:34:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=4naR2xBcDe88j8RrDO7aS/st7Z9xD3TqZu4x6dohykE=; b=F0UMYn5USPzsikDqy/bJvgjGt7aKcJjJ2LtVWwGGQCzs4g1wcqpVTvDf/UJs3CernC dK4b+fU7C/FenkqEvXqNiKo+CQ5C4gXBLc0jSlCKj97DhN0O+Xj0WK4ZfLlbV3CONKhl c5hnJ6RQ0FutnInUqXLYQBN0ANb4cEMbFVkus= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=4naR2xBcDe88j8RrDO7aS/st7Z9xD3TqZu4x6dohykE=; b=DQt2n/WaFqf4nZT9Ngprvd4mLTyAyMu3MXSjsYGX0vsrB2VRnuT7GQxWD7V4wlVOfu 6Vus78HdBZQhcWrvS996uBweEfz+tY6AWZcmXz6VcQzSoUQdkUpvtw4EsIRuW+QT5ZZU bl28BiHcWAfCo8BtF5Hgu2859sx5gO5N6bt8ftBb6JjxrfRKISYxmDtv4Eo4SMRII4qv fU6NxYzjNW+sd0QeicW9s0kF6MASAuzMPTkS/L0yYt+hDQv2AEZQD02w1B10X7fktnkK b0fJIqTdM1FdIuVsFiHf9myQYTiJT/A81pomDHmiwUgIFkJSihnnJVYzWlbAT4I78JRg ziMA== X-Gm-Message-State: ACrzQf1TccMBLLDWCekze0qdH2dequ07l2yzNnpFn3HayRJU0u0s2Ci3 9Z250iYLz5nDze945uQxOt5q4A== X-Google-Smtp-Source: AMsMyM4q3FQariaZiCL4NdNu4LaNek6ASbXwbHj0w2pktetZMHoN12rDx3FnR1VA3Mu6E6NsSjdBkQ== X-Received: by 2002:a17:90a:c984:b0:20a:ac88:d39d with SMTP id w4-20020a17090ac98400b0020aac88d39dmr81779176pjt.13.1668090878111; Thu, 10 Nov 2022 06:34:38 -0800 (PST) Received: from tigerii.tok.corp.google.com ([2401:fa00:8f:203:6ff1:37e4:b5b3:487e]) by smtp.gmail.com with ESMTPSA id iw17-20020a170903045100b00186a6b63525sm11234655plb.120.2022.11.10.06.34.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Nov 2022 06:34:37 -0800 (PST) From: Sergey Senozhatsky <senozhatsky@chromium.org> To: Andrew Morton <akpm@linux-foundation.org> Cc: Minchan Kim <minchan@kernel.org>, Nitin Gupta <ngupta@vflare.org>, Suleiman Souhlal <suleiman@google.com>, linux-kernel@vger.kernel.org, linux-mm@kvack.org, llvm@lists.linux.dev, Sergey Senozhatsky <senozhatsky@chromium.org>, Nathan Chancellor <nathan@kernel.org> Subject: [PATCH] zram: we should always zero out err variable in recompress loop Date: Thu, 10 Nov 2022 23:34:23 +0900 Message-Id: <20221110143423.3250790-1-senozhatsky@chromium.org> X-Mailer: git-send-email 2.38.1.431.g37b22c650d-goog In-Reply-To: <20221109115047.2921851-5-senozhatsky@chromium.org> References: <20221109115047.2921851-5-senozhatsky@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1668090879; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=4naR2xBcDe88j8RrDO7aS/st7Z9xD3TqZu4x6dohykE=; b=LGbnOD9oP0GUOaWDUl7wd4ve53/MaJKbkhEtUBjmjEYTCKmAVkbtX07odxZPINLpi/+7So LafLJe8UYawN4rlUMMRE9Ful/lmFNMWEtywap/SdtF1Rp+Dm/mBkIbNqCACsUo8iyysUlD sKZjz3eMyRK+qKjKtiCqDkHEiUadqMA= ARC-Authentication-Results: i=1; imf22.hostedemail.com; dkim=pass header.d=chromium.org header.s=google header.b=F0UMYn5U; spf=pass (imf22.hostedemail.com: domain of senozhatsky@chromium.org designates 209.85.216.48 as permitted sender) smtp.mailfrom=senozhatsky@chromium.org; dmarc=pass (policy=none) header.from=chromium.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1668090879; a=rsa-sha256; cv=none; b=yR/x6sCQ1AJGT4ahJBoRVrNe6fnb7GJegmwq2K8UB2wH8sAIMLyomuiLuOMBTAYkSg/cyg G7wij9BfsUiwaGwhAAI6v8Criimt/MnijXGxe8N2QJ28VteP5dF+H6sRVuJLswV314zYYc UUoEO4SmG7H5uux6n0IZzpvAGqOvDhg= X-Rspamd-Queue-Id: 5117FC0013 Authentication-Results: imf22.hostedemail.com; dkim=pass header.d=chromium.org header.s=google header.b=F0UMYn5U; spf=pass (imf22.hostedemail.com: domain of senozhatsky@chromium.org designates 209.85.216.48 as permitted sender) smtp.mailfrom=senozhatsky@chromium.org; dmarc=pass (policy=none) header.from=chromium.org X-Rspamd-Server: rspam10 X-Rspam-User: X-Stat-Signature: ds6ka4o6etwpfpkpnftk5zi4tbn1dbfq X-HE-Tag: 1668090879-715479 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> |
Series |
zram: we should always zero out err variable in recompress loop
|
expand
|
diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c index 171eccc2249d..9d33801e8ba8 100644 --- a/drivers/block/zram/zram_drv.c +++ b/drivers/block/zram/zram_drv.c @@ -1891,7 +1891,7 @@ static ssize_t recompress_store(struct device *dev, ret = len; for (index = 0; index < nr_pages; index++) { - int err; + int err = 0; zram_slot_lock(zram, index);
Reported-by: Nathan Chancellor <nathan@kernel.org> Signed-off-by: Sergey Senozhatsky <senozhatsky@chromium.org> --- drivers/block/zram/zram_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)