Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp2337729ybg; Fri, 5 Jun 2020 11:17:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyIAygcf0gtpSb5Iw4EVMCV0UqEB1lZGTUOilWixbBa8pn9mV69fKalNwvsfjC1SNDdpQ0a X-Received: by 2002:aa7:c908:: with SMTP id b8mr10604092edt.76.1591381075333; Fri, 05 Jun 2020 11:17:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591381075; cv=none; d=google.com; s=arc-20160816; b=hunlB8NvCZ9nL9znms56hChNYaS753YRPJVQ8N/zVho5Yirh4ooRRgIqR16fMBbhE9 KkfRCX/wOuAUYJZc0M5dYMGNs2wYFEqeRbJS0XwiN6NmwShCzEsSFVYz9wsNS08zkOt1 IDcAbxz8lPaN53krBJA2TsNhmCpCHGAo4MAZo78ONnocp8l4yhi9b5D4CO3njyTjgZMY MIcx3vYbs9gHXYq9+ibF7M+Ahxf30N03WQ7qxdxBjWJR5ep2Jy1iPMHuyXSYAVikpsGd mIkSsBsQu7aptoDzreXLmg1nI9rgrM0DUGa673FEIkZax8kF26ce78tmfVFawDLAG36U Cj0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=QLtVBAQHt79nrKp5l8gcbQoeTzLDxbZbAEut5UfqQPo=; b=oQRl98c0GdZQz+ESC8TVucg4DqxJFlY1wi0bm9U8ar/85TotudG4F2onM5/YxotBUS onrLq5qa7OHpjSBfxiSl9uFlsl8Ck9kjnNShDd2ypPJBoCmKWZtxFaM7NxWMLjz7u+3K sy9iTrrg/pDi0EQrMF1NfTF9O+0upSsoWBe31CLsN5ei7ndN9lqtuYGaUk1H97mdzdDu ods1EjC4w5iZWeQdiRfT9UCxfDq+8JGqKXLOOJgtB4/5VfHBwZLNuPz7rctfhqdHObgQ AlqKrHjKvjvQAq+ht8WS6ejsddoSlvymzO70UnNt4ue8NBvLuvn/FNHHNI00+OjWtbWV vZvA== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m13si4241823edq.249.2020.06.05.11.17.32; Fri, 05 Jun 2020 11:17:55 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727797AbgFESPn (ORCPT + 99 others); Fri, 5 Jun 2020 14:15:43 -0400 Received: from mail-lf1-f65.google.com ([209.85.167.65]:37136 "EHLO mail-lf1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726351AbgFESPn (ORCPT ); Fri, 5 Jun 2020 14:15:43 -0400 Received: by mail-lf1-f65.google.com with SMTP id x22so6375555lfd.4 for ; Fri, 05 Jun 2020 11:15:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=QLtVBAQHt79nrKp5l8gcbQoeTzLDxbZbAEut5UfqQPo=; b=awgz5BfPntR7n10eECfi7FiVWnkSDYIVburQtOzUeGSK+thIx/htnoWC31Y8SvrYN1 vOck4ajTt1BvJQvhG/Dkdv4GNb709m/n+GiiAiYYmkXkYeR5Dkdut5SbDZit4AW8l5Vr QrBxJH7+GyfhwuiwwUKOFspy+WWiXBVlq7zFshf8GJnpJTNresmQBj3aw48S2GuiwLne 6MfmLgXqHB76D2WlUtpXp11dZxHgvjR14bv5REMblGNp2vHpCBhfKlI7zAcLRNz8+rzr Y8XWMiVcSPWPHR/zgBgtIkvVHPwPnsrNB2njmuOgMOnxozNVY+MA+REf1TR5Lea26lZH 7GsA== X-Gm-Message-State: AOAM532UEDYpQD2zgaI8+ExCuGV6DBqQBZhaXKJqL1qVLpyHAa8RXjqo AWw1+Q8IgupxE3ze2GDKGkc= X-Received: by 2002:a19:642:: with SMTP id 63mr6064091lfg.173.1591380941170; Fri, 05 Jun 2020 11:15:41 -0700 (PDT) Received: from localhost.localdomain (broadband-37-110-38-130.ip.moscow.rt.ru. [37.110.38.130]) by smtp.googlemail.com with ESMTPSA id x69sm1254625lff.19.2020.06.05.11.15.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jun 2020 11:15:40 -0700 (PDT) From: Denis Efremov To: Jaegeuk Kim , Chao Yu Cc: Denis Efremov , linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] f2fs: use kfree() to free super in read_raw_super_block() Date: Fri, 5 Jun 2020 21:15:32 +0300 Message-Id: <20200605181533.73113-1-efremov@linux.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use kfree() instead of kvfree() to free super in read_raw_super_block() because the memory is allocated with kzalloc() in the function. Fixes: 5222595d093e ("f2fs: use kvmalloc, if kmalloc is failed") Signed-off-by: Denis Efremov --- fs/f2fs/super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index 8a9955902d84..9a3c8eba37e2 100644 --- a/fs/f2fs/super.c +++ b/fs/f2fs/super.c @@ -3130,7 +3130,7 @@ static int read_raw_super_block(struct f2fs_sb_info *sbi, /* No valid superblock */ if (!*raw_super) - kvfree(super); + kfree(super); else err = 0; -- 2.26.2