From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4D85B347BDB for ; Sat, 8 Aug 2026 13:35:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.69 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786196102; cv=none; b=GYVzoUsBBNOwlgws1RlaVaLXOrdH2mmQvhZaB/Guw6NKUYdQ3iVlczBUQY7YQiLP1W/pbpT6fRxMYaWSOcUbSGTLE46rG5fen1O/j3TWpIjLEnHIf6ZBOsGQAzpNFFP9OiRhfWR42cqFE3H4tHgoGw1yljExPUK5zEOmoA3LmtM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786196102; c=relaxed/simple; bh=JRubGFDX9S46Mba3f+Qie4nGEwFmeq5nX1Mltdde/ZQ=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=mMH/0NhMQX3YCobTGgdi4IsKhvmMHjMSnAMMM6cX/gEjQf1fvx8alKAT6iYxUUdTgU8g6I/aTRTBAmWrbZ2Bsh6aM6mHvybqe3omnD1DIkioSzGJrKIJnUuIqu25AxkUUjpWxMEmFuFodduYY2+l2ZU5MUDPrIghuM/IE7a6Y3M= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=kPzxcFS2; arc=none smtp.client-ip=209.85.128.69 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="kPzxcFS2" Received: by mail-wm1-f69.google.com with SMTP id 5b1f17b1804b1-496bbcf7d1eso3227315e9.0 for ; Sat, 08 Aug 2026 06:35:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1786196099; x=1786800899; darn=vger.kernel.org; h=content-type:cc:to:from:subject:message-id:references:mime-version :in-reply-to:date:from:to:cc:subject:date:message-id:reply-to :content-type; bh=QntxayfxnQC7MDlmUoQUeIngngDM0mXXiJFdwceOqc8=; b=kPzxcFS2iNDr6VDQThI4purDs67FvNXNvmEnupLtVjmV8i4NDA6d3zZVoE43FaIErn DuGjJO8X887XoveqDDdpiSMFzLAh7j9MvU4Eee7IkWVynPI8QOZmtMRI0ZA+1cNKEiDB MCnqOij5za+Z8bJU40wuh3RatZrJIks8UpC0NT+AcT3Q8L8b2CmzTRR/3kBBWFbyVRoy 5+Q5fWQcAESiy2ENEU5xzYQ9SeTiEb7iOLjgz37/yKA9nkR5vnDzDBJ6y3bdolCiNxAO 87DGcB7pApQ1ezoSETMpyttNUjAyctvjhZhpl0U05cAvOfqmjgPU0teQ52qQFmLd7J/N Xzpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1786196099; x=1786800899; h=content-type:cc:to:from:subject:message-id:references:mime-version :in-reply-to:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=QntxayfxnQC7MDlmUoQUeIngngDM0mXXiJFdwceOqc8=; b=Z94NjiEmYHzD3rMjuUCsnAH2Iz4R0pf9ykj3mU6nqGqybp3eWhhJpFCeKJgAjgOh3j KPuEM5qzfmf52IyLmmp/GRNQ1mV/KHPPVHoQMx3Vm/lqRmZvX8W6BoTzyYcI+Cfz7dVA xFX2XYdu0pYTAk6w/ThRxX4o57zHyDxp7os7HAJuZHm9hX01EMB0udSyQibGFP7Y48Gs G21XcSEm/v80AfuDG6tuGk5dfrS+/wkMxtcyOSCRI5lLIZHordq/hLIyKnE8/qR6nDlU 7Smx08mgqOyP81YPhi1RO91CElhFPS9v0JiO4NtSQAb1AzA24TN/nhYEHJJcD1V4DCNZ wApQ== X-Forwarded-Encrypted: i=1; AHgh+RoHkMSIR5H4oIttXsyZOaudwG1EwS/v+ht84YjkPS4QKTEyGyrp7TMI6ZAhzD0KkVtkO0xqkeM3iaJGMJ8=@vger.kernel.org X-Gm-Message-State: AOJu0YzUwW03vVRpeJVngN26xZkYN069PbeyvrDE6RD8o8ZPpE8xglgZ vQJxRofNPZbLRhI65+KIRxqud9fLhodEA3wA++OWeDCA1kAaGPKv6B7iYV9AsaDSrjX7OU9eYD1 WLiSD2HAM/cLq+BvzpQ== X-Received: from wmbjs11.prod.google.com ([2002:a05:600c:564b:b0:495:5edc:795b]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a05:600c:3489:b0:499:5e50:5be9 with SMTP id 5b1f17b1804b1-49961b8cc18mr96155655e9.16.1786196099260; Sat, 08 Aug 2026 06:34:59 -0700 (PDT) Date: Sat, 8 Aug 2026 13:34:58 +0000 In-Reply-To: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: Message-ID: Subject: Re: [PATCH] binderfs: free minor on binder-control creation failure From: Alice Ryhl To: Chao Huang <958028483@qq.com> Cc: Carlos Llamas , Greg Kroah-Hartman , "Arve =?utf-8?B?SGrDuG5uZXbDpWc=?=" , Todd Kjos , Christian Brauner , linux-kernel@vger.kernel.org, Chao Huang Content-Type: text/plain; charset="utf-8" On Thu, Aug 06, 2026 at 07:23:38PM +0800, Chao Huang wrote: > From: Chao Huang > > binderfs_binder_ctl_create() allocates a minor before creating the > binder-control dentry. If d_alloc_name() fails, the error path frees the > device and drops the inode, but leaves the minor allocated in > binderfs_minors. Repeated failures can therefore exhaust the global minor > IDA. > > Initialize minor to an invalid value and release it from the common error > path after a successful allocation. > > Signed-off-by: Chao Huang Thanks! Please fix drivers/android/binder/rust_binderfs.c as well. Alice