From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-171.mta0.migadu.com (out-171.mta0.migadu.com [91.218.175.171]) (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 7027D334C24 for ; Tue, 10 Feb 2026 21:30:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.171 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770759022; cv=none; b=Bi2+vx6fCW4mtST3jSJ9ixZYaT5VSVed0zDwv+EbfDm4eFqb4kLQ/yK7vhHaM40PmE1uDjNt+K7Gq05pML0kPw1sw1IVDHjCP5xlFg48+aAFXf3B4+H4ztd3X20jsPyr0F5v8El7JObob5Mg22c5lCBUM/+i1hb6dJw7a8qkkKA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770759022; c=relaxed/simple; bh=XvNwR8+KR3aOQEZ0KrvuRPBpPFw7c0VadR1UCM335Is=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=n7EbBfCXIhMysaXgxdHaUWbVkv2RZIN9UwDmnpymjS8Lh2Ajzmim9F9zbUc+G5lOs15YvH4QwmjOyXPUEybohpO8OsPnCRYk8mwwbULLqt6MKSRAdev7sJ1yw/3diF9wd1phjOaYDc43mstdIF1yldJqow0wV30NTEtbTYDq7WU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=BV/YMBJ8; arc=none smtp.client-ip=91.218.175.171 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="BV/YMBJ8" Date: Tue, 10 Feb 2026 13:30:04 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1770759009; 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=CK8De2d/erFzHUPFoy/Rd9TefUOCN8ZZOFUkQMvFVF8=; b=BV/YMBJ8tbHLUhRmxOpeod2al3Nw3/i2930wbCeo3QhGqxsnaAq/aehMHreve5V9/y6SKv Uvdqlflz6eST4UOFMxPAK4JJp7hginhzTbgCbyd0J8jcJFEgJuJkMRB5RWlvzR+vaiHUv5 4yCY8TKhivkjvGVbGGZsSSx+iY6C9Zw= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Shakeel Butt To: Andrii Nakryiko Cc: akpm@linux-foundation.org, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, bpf@vger.kernel.org, surenb@google.com, Ruikai Peng , Thomas Gleixner , syzbot+237b5b985b78c1da9600@syzkaller.appspotmail.com Subject: Re: [PATCH mm-hotfixes-stable] procfs: fix possible double mmput() in do_procmap_query() Message-ID: References: <20260210192738.3041609-1-andrii@kernel.org> Precedence: bulk X-Mailing-List: linux-fsdevel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260210192738.3041609-1-andrii@kernel.org> X-Migadu-Flow: FLOW_OUT On Tue, Feb 10, 2026 at 11:27:38AM -0800, Andrii Nakryiko wrote: > When user provides incorrectly sized buffer for build ID for PROCMAP_QUERY we > return with -ENAMETOOLONG error. After recent changes this condition happens > later, after we unlocked mmap_lock/per-VMA lock and did mmput(), so original > goto out is now wrong and will double-mmput() mm_struct. Fix by jumping > further to clean up only vm_file and name_buf. > > Fixes: b5cbacd7f86f ("procfs: avoid fetching build ID while holding VMA lock") Why didn't the BPF AI review bot didn't trigger for b5cbacd7f86f? > Reported-by: Ruikai Peng > Reported-by: Thomas Gleixner > Reported-by: syzbot+237b5b985b78c1da9600@syzkaller.appspotmail.com > Signed-off-by: Andrii Nakryiko Reviewed-by: Shakeel Butt