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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 07DB9C6FA83 for ; Tue, 6 Sep 2022 16:31:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233572AbiIFQbQ (ORCPT ); Tue, 6 Sep 2022 12:31:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57696 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232511AbiIFQa7 (ORCPT ); Tue, 6 Sep 2022 12:30:59 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4E24881B1A for ; Tue, 6 Sep 2022 09:01:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1662480117; 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: in-reply-to:in-reply-to:references:references; bh=r1ECInH9l5hHSYuBPQXMovo4JVv9CbvTfByNoEFXbjY=; b=agXSrjA4Mx6gDatDCca/L8cIf5rgAeI/yWSdL2Tohs3Wf6XYHTp38Ae/nD5CNHuvT0smOD wuwRZ4aUxXhQ8PouqkswOfmI6wJPy2ao233Oh83mj+ifvcL15Wmx/HGPBjpXywCJtkDzR9 fZvrJsxI7c87hNqDNiIkfl8I3fSLeHM= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-356-1OLXvOMMOFypIeCm05EdrA-1; Tue, 06 Sep 2022 12:01:54 -0400 X-MC-Unique: 1OLXvOMMOFypIeCm05EdrA-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 31B5985A58F; Tue, 6 Sep 2022 16:01:53 +0000 (UTC) Received: from warthog.procyon.org.uk (unknown [10.33.36.72]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6BBD44010D2A; Tue, 6 Sep 2022 16:01:51 +0000 (UTC) Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells In-Reply-To: <7a154687f8be9d7a2365ae4a93f2b7f734002904.camel@kernel.org> References: <7a154687f8be9d7a2365ae4a93f2b7f734002904.camel@kernel.org> <217595.1662033775@warthog.procyon.org.uk> To: Jeff Layton Cc: dhowells@redhat.com, viro@zeniv.linux.org.uk, Trond Myklebust , Anna Schumaker , Scott Mayhew , Paul Moore , Casey Schaufler , linux-nfs@vger.kernel.org, selinux@vger.kernel.org, linux-security-module@vger.kernel.org, linux-fsdevel@vger.kernel.org, dwysocha@redhat.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH v5] vfs, security: Fix automount superblock LSM init problem, preventing NFS sb sharing MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3349243.1662480110.1@warthog.procyon.org.uk> Date: Tue, 06 Sep 2022 17:01:50 +0100 Message-ID: <3349244.1662480110@warthog.procyon.org.uk> X-Scanned-By: MIMEDefang 2.84 on 10.11.54.2 Precedence: bulk List-ID: Jeff Layton wrote: > If this or the other allocations below fail, do you need to free the > prior ones here? Or do they automagically get cleaned up somehow? Once the fs_context is allocated, it will always get cleaned up with put_fs_context(), which will dispose of the partially constructed smack_mnt_opts struct. David