Received: by 10.192.165.156 with SMTP id m28csp1476828imm; Wed, 18 Apr 2018 10:12:38 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+CG2cI+5LHz09qgvV184N0nLHaE2qJZA+xX+76/7+t8s/h9TNjGBZjWQdjFMsK1EMavZbM X-Received: by 2002:a17:902:bb8c:: with SMTP id m12-v6mr2876805pls.53.1524071558007; Wed, 18 Apr 2018 10:12:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524071557; cv=none; d=google.com; s=arc-20160816; b=VLRo4eBxb+RH+yIapP/JPJrkX56aSbooaDANr+F7h6DA1gyT8KQisYLv1FAB6ZhEVx IwU04BMv3I83rtssMe7DFCE/lOZ2tCzkxE40arTMVBoDk9lgb3ddzJCwlhKEvcJ45WF4 c7H6wpbs+BL+ubA+bkb4wnQOyyjbcXB3xonWGPCktzHEC1sSqguf6pinb4z0O6Tvg9Lq k7cdJi99UMCqBbu47UG2Ohx2nwbVgTLfBj8hyFDNmVeDuhaVvf/C+qh52D2LD0XlAAIA fLU00GHzhqAOdHUxL2yXCnam+VSfaAs09MfwW5069P4JupKrqwEORAgRqYarYBcvy629 gRlA== 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:date:cc:to:from:subject:message-id :dkim-signature:arc-authentication-results; bh=cSVPMAjgTV8D8ArKAsiOUOYTSMJRmpKS1cC0kXMC9fQ=; b=bs9XhWCKyGNw2y1ZCeDUyyhzjeh/uI4gygKWrnVUCgO3GWTqVxyDRJ/P2amVHdbb1u FyH/Kr9/Sqd7rHrWz0qzoy1bqYk6otnW0GbqJ8Zhg3od7gvYJoYR7hxZWO7Tlaohfuxv wCfdwlhv7A4ci7SWTV1qsRbtGxSJNv0a6w5MNc0p6r6k8HwDHa4eVR990w2wUV9ptTsc eu82LmNSS+4hKYVQ6sRTvpdpesEY+gWrk1hTU9Ul4BXQFmiI1/hzcXY+GZgH2qsmrFLu n3kEh1z7zbzPNJ/HUYZ2G++FbsVFZMsENew/cobJuqGNdh2mvmuR9ourSqqoYPMsrlsU WzvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@dubeyko-com.20150623.gappssmtp.com header.s=20150623 header.b=Q4/QMRGz; 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 z124si1529908pfb.188.2018.04.18.10.12.24; Wed, 18 Apr 2018 10:12:37 -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; dkim=pass header.i=@dubeyko-com.20150623.gappssmtp.com header.s=20150623 header.b=Q4/QMRGz; 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 S1752749AbeDRRLH (ORCPT + 99 others); Wed, 18 Apr 2018 13:11:07 -0400 Received: from mail-pg0-f66.google.com ([74.125.83.66]:39172 "EHLO mail-pg0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751335AbeDRRLD (ORCPT ); Wed, 18 Apr 2018 13:11:03 -0400 Received: by mail-pg0-f66.google.com with SMTP id b9so1157909pgf.6 for ; Wed, 18 Apr 2018 10:11:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dubeyko-com.20150623.gappssmtp.com; s=20150623; h=message-id:subject:from:to:cc:date:in-reply-to:references :mime-version:content-transfer-encoding; bh=cSVPMAjgTV8D8ArKAsiOUOYTSMJRmpKS1cC0kXMC9fQ=; b=Q4/QMRGz3uVxwWuKdZu4oJJXCfkqkYZByej61oMzbTbYR9zYBgMJmCCi+UvNZOwb2g Srn3EWoewTUW7hAg7UyWMFYmD/hcm33uJaIhpvNB1CaWj12yUTKL1/ZHEowvKQWjWC8h w+03yGXTZuzys84+VoVEK7AAieJtOcgvXe5FYiZLHncyA0HkSJEHX8tXdRj8yHQAW2Gx ZRfjAz1jtrg0aFGKhM3Jj8Jt1sQPsxTkKXRapy/Y0+WexV+lqcURTvIfYBbz8zSHflbG jyK6NfCjXeRlLwuRZQhgh0ZERdI2F1oncNFDQ0HodM9r3E4HgluuwB6h5yWFZr0CW6hs AUpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:mime-version:content-transfer-encoding; bh=cSVPMAjgTV8D8ArKAsiOUOYTSMJRmpKS1cC0kXMC9fQ=; b=b5gfXIh0rmjnqEZwamet0uKza3E2tEVTqOa2as9jz7nqwjV8BC9Tk0sLMeb9AXbNgy UDHYcFW9K0sZs66z/yp1P6VRjcMcLgAw8RXX3xiu4KX4DssXxoMMA3zHRPqMGhYXM8mR Im2B2OtruK11fOZh3Kq8TpSzjQOAaRoWEzgXBO0a2JPoVERqokwU+6O0i+AiB3PnBzPn +7uPkj4nTRfteEJlZMrsC0dC0LdWu7m3XY6/yODosFr/j2r+B9FLVM2TEKanzHLIKjDW YyYcxEc+O0EFs56vcR7DNEDOYEkxXq0DxwgX7KY070+Xn1kFv4hSMYxlYaTKBg1hKLSB JNnA== X-Gm-Message-State: ALQs6tCgvvhdnwdz8CwnZqwwlpIUXTwRag46ikD2hF95uXqOVznNQK7p RZEkqMRNGF7z32vWz3I3QocSmw== X-Received: by 10.167.133.66 with SMTP id y2mr2742522pfn.210.1524071463200; Wed, 18 Apr 2018 10:11:03 -0700 (PDT) Received: from ubuntu-16 (c-24-130-14-162.hsd1.ca.comcast.net. [24.130.14.162]) by smtp.gmail.com with ESMTPSA id c3sm3787138pfd.28.2018.04.18.10.11.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 18 Apr 2018 10:11:02 -0700 (PDT) Message-ID: <1524071461.2606.8.camel@dubeyko.com> Subject: Re: [PATCH 2/2] hfsplus: fix potential refcnt problem of nls module From: Viacheslav Dubeyko To: Chengguang Xu , linux-fsdevel@vger.kernel.org Cc: dhowells@redhat.com, kstewart@linuxfoundation.org, gregkh@linuxfoundation.org, tglx@linutronix.de, pombredanne@nexb.com, linux-kernel@vger.kernel.org, Andrew Morton Date: Wed, 18 Apr 2018 10:11:01 -0700 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> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.18.5.2-0ubuntu3.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 On Tue, 2018-04-17 at 15:05 +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. > > Signed-off-by: Chengguang Xu Looks good. Reviewed-by: Vyacheslav Dubeyko Thanks, Vyacheslav Dubeyko. > --- >  fs/hfsplus/options.c | 4 +++- >  1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/fs/hfsplus/options.c b/fs/hfsplus/options.c > index 047e05c..068d4e2 100644 > --- 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);