From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.3 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7F42BC2D0A3 for ; Thu, 12 Nov 2020 09:15:48 +0000 (UTC) Received: from lists.sourceforge.net (lists.sourceforge.net [216.105.38.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C1DE3216FD; Thu, 12 Nov 2020 09:15:47 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=sourceforge.net header.i=@sourceforge.net header.b="JMyPa0X6"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=sf.net header.i=@sf.net header.b="M1deU8JW"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="nOHltpbu" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C1DE3216FD Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linux-f2fs-devel-bounces@lists.sourceforge.net Received: from [127.0.0.1] (helo=sfs-ml-2.v29.lw.sourceforge.com) by sfs-ml-2.v29.lw.sourceforge.com with esmtp (Exim 4.90_1) (envelope-from ) id 1kd8hg-0007L2-Ge; Thu, 12 Nov 2020 09:15:40 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-2.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kd8he-0007Ko-TJ for linux-f2fs-devel@lists.sourceforge.net; Thu, 12 Nov 2020 09:15:38 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:MIME-Version:Message-Id: Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=XgmYy2oo4yKBBbCgZapoTN1Dk2safVBvCvsBcacBH84=; b=JMyPa0X6qyD571tyPzuXEpJDhR CBz//DX/J10AULzvDrFI4DoeE6a1GMxxS3gvZrVy9kWYnxvqveHmMv9AFlfdO7U1TNYnlr9Cyb21q Tz015t19Ii1bHJ7TmQyGtMOePm6rxKg1lPtU5SW5ZYGaESAPBCQhrlSy5Io28PAzjebk=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:MIME-Version:Message-Id:Date:Subject:Cc:To:From :Sender:Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post: List-Owner:List-Archive; bh=XgmYy2oo4yKBBbCgZapoTN1Dk2safVBvCvsBcacBH84=; b=M 1deU8JWVCBQ2HWqu5yyLliedIkpp9n0rmMBmus/nTFg7zguZGz37it9LnkmTGWDuCNWBRRwQuZrxz n1JeYO0CIbJCaHiU2ouylQeomqnt/r3XjczWcbCdtHq2SgMmpbdY53domTbLY4yk9uCmfiPs2ZuLC NNFmHNH25IFZmn3w=; Received: from mail-pg1-f194.google.com ([209.85.215.194]) by sfi-mx-3.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.92.2) id 1kd8hX-008uQE-7w for linux-f2fs-devel@lists.sourceforge.net; Thu, 12 Nov 2020 09:15:38 +0000 Received: by mail-pg1-f194.google.com with SMTP id h6so3664852pgk.4 for ; Thu, 12 Nov 2020 01:15:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=XgmYy2oo4yKBBbCgZapoTN1Dk2safVBvCvsBcacBH84=; b=nOHltpbuC1nXtvVXy/kE63t7xaR73y8DD+/umP4rn+YqoshfbjOPLRh2mfDXiQp8n1 tpINs1tuWXdoao8PKk88VSkWeTSFPIyTPHEnJj4KV0NYZEpuHZICiKsv9on4GwvQ99CN bQF3/SO1rL+1MXjjonLXSNr/fU6pdfrWIYjcgImLjWkvyMIXM930cvgUaqAGlIGzUjQI yxhdwebbODkd69u1PZ7/OySD1P/c6/QBRqaYzblvIt1FJwTPYdpI6ARQDAYNRdhJVF2Q XByhuB5lvih7TWLCVDOSNwEb1VMYSYnj4EiWFukBCan/SaHYEUnCJLPSI6iLmy1uh6+y pGww== 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=XgmYy2oo4yKBBbCgZapoTN1Dk2safVBvCvsBcacBH84=; b=Ej5J64JM6MF4AD1US5/QBRtlfNtD80TpVsVrzstCak4N+YNh/FE3IKkcp1OpoCl3fz TlZYvgIHLpKvgJOX8b4bVCoxztEofdcvl1M2+hpim8dZpf3x4bwAYYR3Bln3s5YHnCco WIW08ucbszuy2Y/cUilOk0aS+susQH1of1Jr1lHUHK1eZdOw18UXuje+cK4OonVg+47b +xJdS+6dOtf1NFwakCGtbwv4h8lbSUAS9Pv4aK/D5ffpfIcm8LzRuvEhJXNwS5hlwivh qEvJVWMvV1dDQfZVRSp0Mho47y3Mcfag0HEApTYg32g4aLdmU98YvSmlkRgRKUvOBpu1 FzXg== X-Gm-Message-State: AOAM5320k1jJyLLB2sp+NsevEjNy2SFxk/gc1BfvExYZqsotYSUCml20 dJ/zIQqCgkai0mycjIpJYOU= X-Google-Smtp-Source: ABdhPJzhtkhhaTTCEKurgpkKcIW4YvAekQe9Uoe4fC4twzYsrMKS/mBSUexuxFvtjpTrLNhJtLhitQ== X-Received: by 2002:a17:90a:ea16:: with SMTP id w22mr8469271pjy.64.1605172518561; Thu, 12 Nov 2020 01:15:18 -0800 (PST) Received: from localhost.localdomain ([27.122.242.75]) by smtp.gmail.com with ESMTPSA id y3sm4852816pgq.40.2020.11.12.01.15.16 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Nov 2020 01:15:18 -0800 (PST) From: Hyeongseok Kim To: yuchao0@huawei.com, jaegeuk@kernel.org Date: Thu, 12 Nov 2020 18:14:54 +0900 Message-Id: <20201112091454.15311-1-hyeongseok@gmail.com> X-Mailer: git-send-email 2.27.0.83.g0313f36 MIME-Version: 1.0 X-Headers-End: 1kd8hX-008uQE-7w Subject: [f2fs-dev] [PATCH v2] f2fs: fix double free of unicode map X-BeenThere: linux-f2fs-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-fsdevel@vger.kernel.org, Hyeongseok Kim , hyeongseok.kim@lge.com, linux-f2fs-devel@lists.sourceforge.net Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net In case of retrying fill_super with skip_recovery, s_encoding for casefold would not be loaded again even though it's already been freed because it's not NULL. Set NULL after free to prevent double freeing when unmount. Fixes: eca4873ee1b6 ("f2fs: Use generic casefolding support") Signed-off-by: Hyeongseok Kim --- fs/f2fs/super.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index 00eff2f51807..fef22e476c52 100644 --- a/fs/f2fs/super.c +++ b/fs/f2fs/super.c @@ -3918,6 +3918,7 @@ static int f2fs_fill_super(struct super_block *sb, void *data, int silent) #ifdef CONFIG_UNICODE utf8_unload(sb->s_encoding); + sb->s_encoding = NULL; #endif free_options: #ifdef CONFIG_QUOTA -- 2.27.0.83.g0313f36 _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel