From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9049C26982C for ; Wed, 21 Jan 2026 15:09:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769008177; cv=none; b=TnGGimaM2cxpvImvstQjimvjCn9oTVnar+iij6O3ZQATMhzJLcbRBicPuKz1NkLjjjhVeLQaeXEMerB2dqbWZnOZl/XFNsAo9EYXXBSeGZCPvhbG9dAZ09YQAC1lCXfBZAyr9Agb3I0KbYxRbU4/fIv5CKNvT8hfzLEcEFuYzeY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769008177; c=relaxed/simple; bh=28sXgVNf0Wht5rKNeRqvJBtP0GkBUYCm5WU0V/hUUwA=; h=From:Message-ID:Date:MIME-Version:Subject:To:Cc:References: In-Reply-To:Content-Type; b=hqTnhlS0hAwYG6ajghn9PdiLRikJyczN4N9jkc6anYKAB8oQgIOhgMU95F28L46s+IbA26dVR4twgc0/M1VWRNr9VURYQrNMOfjlcHORKIHBxP/r/JHF1fGwmKaBt4NF02zfqQCODUxHrCfM5IWhqhD9sOn7YUZGEtKIhcAalhU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=D+eAdxH3; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b=P9SVKLJw; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="D+eAdxH3"; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b="P9SVKLJw" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1769008173; 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=uY+pt3bmrvrb1Hk1eTt5XNY/+OLl0+7wKbN4hRmyI3I=; b=D+eAdxH3xzeL/ssPWpweSMBFNpDYqx+MBuv34x1WV7Kpni4gjtSPsczTFTIa6UwTPtOMvJ 8pJS28tcD9Cie0P2CoAIhrB3FyD/4Ouil4nzsWY6WbsweZ/pq/JKQo87r63eoCyLMZOxaE LXmr3siRJuFWO9TI4VxO2rWrpiiK2bA= Received: from mail-qt1-f198.google.com (mail-qt1-f198.google.com [209.85.160.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-636-iAHN7420PBeK3DENMXPtIA-1; Wed, 21 Jan 2026 10:09:32 -0500 X-MC-Unique: iAHN7420PBeK3DENMXPtIA-1 X-Mimecast-MFC-AGG-ID: iAHN7420PBeK3DENMXPtIA_1769008171 Received: by mail-qt1-f198.google.com with SMTP id d75a77b69052e-50147745917so289083101cf.3 for ; Wed, 21 Jan 2026 07:09:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1769008171; x=1769612971; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:subject:user-agent:mime-version:date:message-id:from:from:to :cc:subject:date:message-id:reply-to; bh=uY+pt3bmrvrb1Hk1eTt5XNY/+OLl0+7wKbN4hRmyI3I=; b=P9SVKLJwJ4enVNTZwGuOG7Xkbu9zzjnnctqv8fZDlHURJlGScqPQSPWcQa8AMtjPxB OukQliMDRJVBixS/Sb6bjV0R7W0fL1AvvWTrxyojG41mF0HaJl/T+z3kJIO+wyeJxWF+ CULeeqQxYnP44DVaII0hMl+vJAqCNuZMRdCYRF3Ppu97uIWrjDTA3dxHfkHH79drbmOu 24jBf0iKk9VdFc+3sSMeCR2s6zwsCOXrPkujdKkbcY7ux3vjZ7+IDrVLVM6lGhr08zon 9/l843FwQJKYeiLgHwAqRlbz+Rdl/yA4/cQ0kswPHMH4MMafO93XkqbfPtF9MT0L3KVD AnIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769008171; x=1769612971; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:subject:user-agent:mime-version:date:message-id:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=uY+pt3bmrvrb1Hk1eTt5XNY/+OLl0+7wKbN4hRmyI3I=; b=jG0whridMlhMu60IC+SONcf7Q1dj7xAZlXWleyhxkI0Ke6Lh5+nq8YkHR3tzb3ecZQ LLb46Pss2/tTny53LdCjdvWr4Wr21oiYhxvBB5koBSyNrXN+TZdo8qWJyo/gsOCJ2nAu UKcvQX0eb/OoUWt3LqVQPjO37zMRo0mBvzgEajx1jBIiilBJl4Zb5bwPjTPXE45SJgCW juL6D4RA3CxBVmyderUqDbSxHLCengFZl4CPZ1XvwzeSrp2JXRIr0oDfAyapyjp7rDy7 trygx4VMCGY7XuYd6pOLrB2vYAcB8jmZj5+Zej5R/MWq468lnLTn3A5OVr6xkTs9Hhex hSnA== X-Forwarded-Encrypted: i=1; AJvYcCUEnAUKzp7eRYl0xoP0lwNzzRgA5wWIIvT40hQqnA0lXNQH1fjfI6ceXD0rFBDR/ljsM1UcVccaituk/RQ=@vger.kernel.org X-Gm-Message-State: AOJu0Yw1lgbUfDnMd6GqS69xKpRX/phDrWXmj0vsYy99wxneO6V05lhd gF00kdjjFuyrkA3flZQtcjh/2Gx3AaEZX7StdlZNXf2PhqJ5444x2ta0HaQiTqkw6cN0ym6egGH fWAzivLRvq2V/sPB3+H7gYwm4Ou+b77Zz66MT8qDK/97978az1Rr4QbcdsA1Yl3huYA== X-Gm-Gg: AZuq6aIBeJBlAimGiTo8s+TeVbkbHd/6JmU2kE8xfu0z2927sEhBwGMbqU6qd3ByfXC Y7b6mAxGqNM0wUwGq6eCULwBzBp4KWT8+/eJ9hUOT7QCaWW6QpOsrshg7khbOsO2hknsWk6JcgX Tf+9vLiUQKH6HL90t5Hi6pyYvXVE1MzKpvauuRVWAJOZzwPUACqFvF8JT994JfUj29ZSt5GjBvT 1PHbzZ/kzC3bwxrTPandJfUE/utBhqlwqDjbl84UyLpLiwQ1oEGcglrHLbcQVP+5NbM5qFAcusy HWKf21yxl+p9TktXYJv2uIJb7hqoZo38W7kUV73ZE2NjyywH+xY1mDaqsjXa2r+Z6yrrZ1zABlJ Eq6DOEqAvNQYak10j04XFB+nEryKt3M051ZQDjx5+m+W90iAaZrTd1UNR X-Received: by 2002:a05:622a:4c8:b0:4f1:d85c:d7c3 with SMTP id d75a77b69052e-502a1f777b1mr265101491cf.66.1769008171499; Wed, 21 Jan 2026 07:09:31 -0800 (PST) X-Received: by 2002:a05:622a:4c8:b0:4f1:d85c:d7c3 with SMTP id d75a77b69052e-502a1f777b1mr265100951cf.66.1769008171129; Wed, 21 Jan 2026 07:09:31 -0800 (PST) Received: from ?IPV6:2601:188:c102:b180:1f8b:71d0:77b1:1f6e? ([2601:188:c102:b180:1f8b:71d0:77b1:1f6e]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-502a1d9f2a1sm117028691cf.10.2026.01.21.07.09.30 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 21 Jan 2026 07:09:30 -0800 (PST) From: Waiman Long X-Google-Original-From: Waiman Long Message-ID: <204e011a-582f-474a-980c-27c30620b8d7@redhat.com> Date: Wed, 21 Jan 2026 10:09:29 -0500 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 1/2] audit: Quit audit_free_names() early if name list empty To: Al Viro , Waiman Long Cc: Paul Moore , Eric Paris , Christian Brauner , linux-kernel@vger.kernel.org, audit@vger.kernel.org, Richard Guy Briggs , Ricardo Robaina References: <20260121023509.410423-1-longman@redhat.com> <20260121031105.GB3183987@ZenIV> <84955de9-823f-4b3d-9107-f7d4aee38b88@redhat.com> <20260121052623.GC3183987@ZenIV> Content-Language: en-US In-Reply-To: <20260121052623.GC3183987@ZenIV> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 1/21/26 12:26 AM, Al Viro wrote: > On Tue, Jan 20, 2026 at 11:08:45PM -0500, Waiman Long wrote: >> On 1/20/26 10:11 PM, Al Viro wrote: >>> On Tue, Jan 20, 2026 at 09:35:08PM -0500, Waiman Long wrote: >>>> Optimize audit_free_names() by quitting early if the name list is empty. >>>> This eliminates the need to acquire and release the fs_struct spinlock >>>> in path_put(). >>> Why would path_put() go anywhere need fs_struct spinlock??? >>> >> path_put() is defined in include/linux/fs_struct.h. It calls >> read_seq{un}lock_excl(&fs->seq) which, in turn, acquires the releases the >> spinlock underneath the seqlock_t. > Really? Which kernel would that be? On mainline we have > > ; git grep -n -w path_put include/linux/fs_struct.h > ; $ git grep -C 6 'void path_put\>' fs/namei.c > fs/namei.c-/** > fs/namei.c- * path_put - put a reference to a path > fs/namei.c- * @path: path to put the reference to > fs/namei.c- * > fs/namei.c- * Given a path decrement the reference count to the dentry and the vfsmount. > fs/namei.c- */ > fs/namei.c:void path_put(const struct path *path) > fs/namei.c-{ > fs/namei.c- dput(path->dentry); > fs/namei.c- mntput(path->mnt); > fs/namei.c-} > fs/namei.c-EXPORT_SYMBOL(path_put); > fs/namei.c- > ; > Sorry, my mistake. I mixed it up with get_fs_pwd(). Will fix the patch. Cheers, Longman