Received: by 10.192.165.156 with SMTP id m28csp1621247imm; Wed, 18 Apr 2018 12:46:17 -0700 (PDT) X-Google-Smtp-Source: AIpwx49zG26cuQ7/NrRncavnvT87hu8DQW+wnBOSj6u/2jluRg3mHqUIoCvv5B8jAAKIReFlUf40 X-Received: by 10.99.138.202 with SMTP id y193mr2745496pgd.224.1524080777735; Wed, 18 Apr 2018 12:46:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524080777; cv=none; d=google.com; s=arc-20160816; b=PfIL9SswYRqfCSKplCtsi5Zx1wIwTPbdgk+QCm1jVA1fM0ePY1tWbH7hGyy0EtwmTk 6BQclk+MngvyWVKblIHeTf89SranukX0D4VJ6oarv4tz+Yw7RSMMPCft6iwlg9GU95Qn ih4tCdRvniefFX+ZkFlROvNK03ajNHedg4AS7uP5v5xPv1IYafbU905uSXknn4Kp5cWk QYTc/MS5KkjW+7zRXkTN0usFZ5YfeKugAwmOSUBKWcCbR0UTPsuF8tq/yRmHKM3Pg7bz X+CosL6ITNA+HO3JVcY47g+PCBXE29485r328Xl7f1uAJfKphSXCw4ZRu4dXUqBiEE+9 HhZA== 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 :references:in-reply-to:message-id:subject:cc:to:from:date :arc-authentication-results; bh=nah9djZiT1fXujSSfLvtlGQVOvHJgCIJ4wgoqY2/euA=; b=ndU24DQbGenTdwqW8ircfiKdo2eH8d8exGjiek7Y2I2it60fX6CFWns3r2iLpfFaLd hNUb7AwsDBi7z2rg9VD7lipDMqUgGUoMU6bGlI5cBIpuXb4R3efMOd3h0zV6lSCm9p8l 14gwTFZFcvtG74Dfb1R5krdUTWsqtxv0ShNGhKOlSL1HsbsAw9VUvXkK0GcbpmTUboc+ NA/lyXBvu846ZhIIAhLdr5QmNRPz9XTIA+DdzD30G5rMk7qwYO2puGbRqwgJXb+Uq1Kg qJDPa0Hgai3KoKMoxDX918JYdoKKnudZtWns6OuwPV/MTdq4NdjEem5v0YSonOJD+lcX kqHQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p4si1619735pgf.469.2018.04.18.12.46.03; Wed, 18 Apr 2018 12:46:17 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752699AbeDRTng (ORCPT + 99 others); Wed, 18 Apr 2018 15:43:36 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:51676 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752504AbeDRTnf (ORCPT ); Wed, 18 Apr 2018 15:43:35 -0400 Received: from akpm3.svl.corp.google.com (unknown [104.133.9.71]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 9B6C518FED; Wed, 18 Apr 2018 19:43:34 +0000 (UTC) Date: Wed, 18 Apr 2018 12:43:32 -0700 From: Andrew Morton To: Chengguang Xu Cc: linux-fsdevel@vger.kernel.org, dhowells@redhat.com, kstewart@linuxfoundation.org, gregkh@linuxfoundation.org, tglx@linutronix.de, pombredanne@nexb.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] hfsplus: fix potential refcnt problem of nls module Message-Id: <20180418124332.aac5d1d8f331ce78732836d6@linux-foundation.org> In-Reply-To: <1523948733-8537-2-git-send-email-cgxu519@gmx.com> References: <1523948733-8537-1-git-send-email-cgxu519@gmx.com> <1523948733-8537-2-git-send-email-cgxu519@gmx.com> X-Mailer: Sylpheed 3.6.0 (GTK+ 2.24.31; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 17 Apr 2018 15:05:33 +0800 Chengguang Xu wrote: > When specifying nls option multiple times in a mount, > current option parsing will cause inaccurate refcount of nls > module. Hence, call unload_nls for previous one in this case. > > --- a/fs/hfsplus/options.c > +++ b/fs/hfsplus/options.c > @@ -171,8 +171,10 @@ int hfsplus_parse_options(char *input, struct hfsplus_sb_info *sbi) > return 0; > } > p = match_strdup(&args[0]); > - if (p) > + if (p) { > + unload_nls(sbi->nls); > sbi->nls = load_nls(p); > + } > if (!sbi->nls) { > pr_err("unable to load nls mapping \"%s\"\n", > p); Same problem as in [patch 1/2]