Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp2394957pxb; Tue, 12 Oct 2021 05:49:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwSCBUazUcleg7VDNP6gSDv7EEn+zXeFc6iQj273nN8xgLyNOMiXTSQBlJv7vgkjLffaft5 X-Received: by 2002:a62:1d14:0:b0:44d:3b0b:d027 with SMTP id d20-20020a621d14000000b0044d3b0bd027mr3772104pfd.60.1634042972513; Tue, 12 Oct 2021 05:49:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634042972; cv=none; d=google.com; s=arc-20160816; b=CKBn0UoazeCvSzQEzL4Na7uRLEgoqRbylidiYJtK2WckyLfV2sqUerOcOOOZDkXAdZ SuYbOpr3cXO+5w2SFWdeBrRqNhjBnxJZ1UqwxQyZlJZKlCqdRjG6HJ63p5QMZ/UlGNEB 9W92q21Dv25mJ4uANGcayxmazQU+yLzV4pl60FPPzLTeuchz+J18e+nNk+0YmjRzjT9F C7wsjmCrGf/VlPRQLHKldQrQ6JA1cBNtiRCkdnzILoxpn+u4zkC0BH9/wMZjk6Z4qfeI dWqKV9V6u4s2TX1eo1folFUsi4GqglDpA4gq1wSx6NlEJVw+YkJmux1Y8GmFbZfwsPjM zE9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=7X/s+LDa8rTtWAZIkHSrARf3pGldfaarUzj53fsqHiY=; b=Ng3KQNjNlMmf4FXtmJJbH+esMckvn3SVDLV92Ytzqp9GYaJ6z3zXEJBN+cF04v39me tNA4vse91c4kjpE/dAlkPb/nI58Vn7xDYmhO6ufqMb4N4rWAaGLPZp2oT4HXpPnnp7fN BL2t1PSt+EnIm2y6D7hr8SY4q6cPXbdgL8pqMSHVBqxeLwfPZ1K/hQ4aLK4T+FoFmQFF yKQ+kprBLB1oHIBKeIzagCtwqnxYAO2EUz+AK7hpLUxzUbR/567M7XD9cEiUjyRbCzgv tNBcx7xXMC6jj7wDhRA2bMsgeLxZqNGjDpNZMczju/GN0nwrqSZ0cKkynugvODrWI7OO HVSw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-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 b11si15092742pgq.626.2021.10.12.05.49.09; Tue, 12 Oct 2021 05:49:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-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-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236479AbhJLMvI (ORCPT + 99 others); Tue, 12 Oct 2021 08:51:08 -0400 Received: from verein.lst.de ([213.95.11.211]:41317 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236326AbhJLMvI (ORCPT ); Tue, 12 Oct 2021 08:51:08 -0400 Received: by verein.lst.de (Postfix, from userid 2407) id 8972067373; Tue, 12 Oct 2021 14:49:04 +0200 (CEST) Date: Tue, 12 Oct 2021 14:49:04 +0200 From: Christoph Hellwig To: Gabriel Krisman Bertazi Cc: Christoph Hellwig , Shreeya Patel , linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net Subject: Re: [PATCH 10/11] unicode: Add utf8-data module Message-ID: <20211012124904.GB9518@lst.de> References: <20210915070006.954653-1-hch@lst.de> <20210915070006.954653-11-hch@lst.de> <87wnmipjrw.fsf@collabora.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87wnmipjrw.fsf@collabora.com> User-Agent: Mutt/1.5.17 (2007-11-01) Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org [fullquote deleted] On Tue, Oct 12, 2021 at 08:25:23AM -0300, Gabriel Krisman Bertazi wrote: > > @@ -187,6 +207,7 @@ EXPORT_SYMBOL(utf8_load); > > > > void utf8_unload(struct unicode_map *um) > > { > > + symbol_put(utf8_data_table); > > This triggers a BUG_ON if the symbol isn't loaded/loadable, > i.e. ext4_fill_super fails early. I'm not sure how to fix it, though. Does this fix it? diff --git a/fs/unicode/utf8-core.c b/fs/unicode/utf8-core.c index 38ca824f10158..67aaadc3ab072 100644 --- a/fs/unicode/utf8-core.c +++ b/fs/unicode/utf8-core.c @@ -207,8 +207,10 @@ EXPORT_SYMBOL(utf8_load); void utf8_unload(struct unicode_map *um) { - symbol_put(utf8_data_table); - kfree(um); + if (um) { + symbol_put(utf8_data_table); + kfree(um); + } } EXPORT_SYMBOL(utf8_unload);