Received: by 2002:a05:7412:f589:b0:e2:908c:2ebd with SMTP id eh9csp820067rdb; Wed, 1 Nov 2023 04:01:36 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG1MhvOfMUJZScnhGqpejxCJFyulF6O0FVrpbqXHvay2CbdS45AP2iYjQu4/kSNlk7+4A/A X-Received: by 2002:a05:6830:25d5:b0:6b9:924e:b43b with SMTP id d21-20020a05683025d500b006b9924eb43bmr19100927otu.6.1698836496387; Wed, 01 Nov 2023 04:01:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698836496; cv=none; d=google.com; s=arc-20160816; b=zO/+hCUBOh2Cb0NAxslcoVuNPkRdd4EXkg2ifaXyAu4neHwBekOxisgK2qZZ7gviEl xDPgTET2bFoq3H9zrjMAw1sdAd0jarx8RThEbXgmRPdjZlfkH3kmpvQYTKN2i+bVIN56 zoyUIO6ooxMS7FrWaNPlsHi6QOey2bfwGTAUz9WP5ZSraAZboI4TmljIsiKdmEsZKQt7 QtAYQE4NxzpIXRmFsj4xXH70uVqyNcyGwiCLRGWZbzLdVPGKXvWCo/YSqqA6+Cv9Kvfq 2cZeSseY+sXZNb6bn1sw9blxQnN59XyxE2WkLfILfsL/J8uSGqtT7Q5IeU2XPtqbYMqC kO2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=ChCUMS4Z0zFJSSZC7NvVm2TXc5lFEMGFDVYjPFXyk18=; fh=b1CxJs31AR6ZbObOzONFnY6K2qwWpJCR757Ny1GaiZw=; b=cEkI1nwyUlQqZw8eqABBR/Ti8ygnTEzycVMpTdWh6qIVDniJWuR4w4uceZfGgeO+dr quUVvp3epPipO07WPMfPtimo+63DdmHaa4WfUFj1NlD2oBOxXmN1DZ0REMucxYDkOhpe gTkIRO/SSDpOCW9dlJzqxKUTs6XGSEpjzpwb8boBejo2S3zRmMT8cN8fw1ljlOGvZl0y BkRkvkuUzNAkdfffSQ4XccSOmo2g/r2/Y+iQsSfAtcjc8Vrl/uyMozo9RRBzrjbb9n2o I0UytwivNv3CzGOad5DRCPcLLY7Ni4h8Q02iOJUDHJ92zqWtPMsElfZyhW9K4MqQIbxQ 6UIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=CBUGIDfG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id e12-20020a9d730c000000b006c6361d1fd0si386356otk.305.2023.11.01.04.01.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Nov 2023 04:01:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=CBUGIDfG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 830658077FAB; Wed, 1 Nov 2023 04:00:18 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231501AbjKALAC (ORCPT + 99 others); Wed, 1 Nov 2023 07:00:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45074 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229731AbjKALAB (ORCPT ); Wed, 1 Nov 2023 07:00:01 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1161FFC for ; Wed, 1 Nov 2023 03:59:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1698836355; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ChCUMS4Z0zFJSSZC7NvVm2TXc5lFEMGFDVYjPFXyk18=; b=CBUGIDfGcAFMcZVYl+tBbboYHDpWHw/EJDSJpOT1YWgV6RztNp1jUfgg9Kus9rvMOWgsZW dlGM3ahyK4vfdMbXdXvK8drvEVoJkU0zj59ai6E45scT+mHeBXuvCl1vK5IFBV3+9qR69A 0ficsu3p7bvpgmjNsWPOgoXckLAHlQ4= Received: from mail-ej1-f69.google.com (mail-ej1-f69.google.com [209.85.218.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-619-fyY86f_8NsCcwA_q8KmtfA-1; Wed, 01 Nov 2023 06:59:13 -0400 X-MC-Unique: fyY86f_8NsCcwA_q8KmtfA-1 Received: by mail-ej1-f69.google.com with SMTP id a640c23a62f3a-9a681c3470fso453869666b.1 for ; Wed, 01 Nov 2023 03:59:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698836352; x=1699441152; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ChCUMS4Z0zFJSSZC7NvVm2TXc5lFEMGFDVYjPFXyk18=; b=sq8wcFVyGvV7t2jDUNlemPNVpqpOG7SZSaBPt2Mf0soZBrWxWTgNLDZr/ZOkHgJ1KE yGJVZpEzAB8cRpgZS8WyTIbTjgKHdap0HNwIBcwFaBMj7xuTcoELjV326qyhzYGxoz0C eL1S2XIk7/gaE/lOlYzuVT2xtLMI1KWQqaHdzyPzWtpLxH8kzlCIlmkfavIYQQdYvGr+ UCwqh1gJ7v2sHx0oHTibuitoIItJFhllWpliiJbrIcnH4eUpDxT8GDuJ35FKKb5Ug2Wc 2qi1LNZwOUuP/iVDLIokLzXe6vL3RCj8omD0XF8Pv0Ni80QLOjmN612KiCivuBEAU0+D Ir2A== X-Gm-Message-State: AOJu0YxlciinQcWpA4pKxMtX0TVdJa83Crw9IrUhykEupgrDUQpPBmm5 0rrWkaPqpmgBcpKXHWVrOSretDCSv0HPdYh8J6ZuYzTUfOJ6h6DFtERmQcjzDMJx2WdmLa7L5cS +kdaqAa2RhV6xB7r7MsFZQ6Iv X-Received: by 2002:a17:907:a44:b0:9be:b668:5700 with SMTP id be4-20020a1709070a4400b009beb6685700mr1473979ejc.58.1698836352534; Wed, 01 Nov 2023 03:59:12 -0700 (PDT) X-Received: by 2002:a17:907:a44:b0:9be:b668:5700 with SMTP id be4-20020a1709070a4400b009beb6685700mr1473967ejc.58.1698836352277; Wed, 01 Nov 2023 03:59:12 -0700 (PDT) Received: from ?IPV6:2001:1c00:c32:7800:5bfa:a036:83f0:f9ec? (2001-1c00-0c32-7800-5bfa-a036-83f0-f9ec.cable.dynamic.v6.ziggo.nl. [2001:1c00:c32:7800:5bfa:a036:83f0:f9ec]) by smtp.gmail.com with ESMTPSA id a22-20020a1709062b1600b0099ddc81903asm2265963ejg.221.2023.11.01.03.59.11 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 01 Nov 2023 03:59:11 -0700 (PDT) Message-ID: <24e0ae5c-26bb-6efa-d59a-262541d2a452@redhat.com> Date: Wed, 1 Nov 2023 11:59:10 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: [PATCH 1/2] vboxsf: Avoid an spurious warning if load_nls_xxx() fails Content-Language: en-US, nl To: Christophe JAILLET , Christoph Hellwig , Al Viro Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, linux-fsdevel@vger.kernel.org References: From: Hans de Goede In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.0 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Wed, 01 Nov 2023 04:00:18 -0700 (PDT) Hi Christophe, On 11/1/23 11:49, Christophe JAILLET wrote: > If an load_nls_xxx() function fails a few lines above, the 'sbi->bdi_id' is > still 0. > So, in the error handling path, we will call ida_simple_remove(..., 0) > which is not allocated yet. > > In order to prevent a spurious "ida_free called for id=0 which is not > allocated." message, tweak the error handling path and add a new label. > > Fixes: 0fd169576648 ("fs: Add VirtualBox guest shared folder (vboxsf) support") > Signed-off-by: Christophe JAILLET Thank you, both patches look good to me: Reviewed-by: Hans de Goede for the series. Regards, Hans > --- > fs/vboxsf/super.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/fs/vboxsf/super.c b/fs/vboxsf/super.c > index 1fb8f4df60cb..9848af78215b 100644 > --- a/fs/vboxsf/super.c > +++ b/fs/vboxsf/super.c > @@ -151,7 +151,7 @@ static int vboxsf_fill_super(struct super_block *sb, struct fs_context *fc) > if (!sbi->nls) { > vbg_err("vboxsf: Count not load '%s' nls\n", nls_name); > err = -EINVAL; > - goto fail_free; > + goto fail_destroy_idr; > } > } > > @@ -224,6 +224,7 @@ static int vboxsf_fill_super(struct super_block *sb, struct fs_context *fc) > ida_simple_remove(&vboxsf_bdi_ida, sbi->bdi_id); > if (sbi->nls) > unload_nls(sbi->nls); > +fail_destroy_idr: > idr_destroy(&sbi->ino_idr); > kfree(sbi); > return err;