From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f52.google.com (mail-wr1-f52.google.com [209.85.221.52]) (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 A07E143634F for ; Wed, 4 Feb 2026 20:54:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.52 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770238476; cv=none; b=DFb9zgxAZieh9fgzJ2uPR/IXz082zMGIKCUZxgApeKViT5JR841dNUVekbsCAUH5oXti/lvhwRKGt/V4B0Vt5Mq4vS+OwRYNTjbeh99lqZYOc10oitqJ9niSh/h+AfdcAgx8/KPV918HRqkLXM7Q/fb6DkLYWVA9Rte1wZqxthQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770238476; c=relaxed/simple; bh=XQWx0E27Hz09IbIKVDyEB8/t3jmX9Rwr0dlpyPNSdgI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=GEDg0E8SScxhLERYtuY3xXLECRNl3bVWn1TDYfASY3rWd+T5IQTUTfrF/EEDxD++c/CmscaWrOS6Vccbbhmw0fnCF/PgMCelofrfLWqN1NjQo0pUu/hY+v08PZw9jRNcT8pFfhmfCdcYwxdtnGdtgpdYVGgm9jK7hNKITJ0TQws= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=LE6OD8vo; arc=none smtp.client-ip=209.85.221.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="LE6OD8vo" Received: by mail-wr1-f52.google.com with SMTP id ffacd0b85a97d-43284ed32a0so67963f8f.3 for ; Wed, 04 Feb 2026 12:54:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1770238474; x=1770843274; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=eTvXc4p3YYS50MtV8tURwG3grWXzMeUI4j3/qsvuHMc=; b=LE6OD8vo+MO1mgRNI25975DOAlKmgS8wV3w33h9f7V9WVbrPAe/NX8zKkrtjIPd6+m pzxFYbtEFetjM+Ri12Bc9Jg+Mlo/njx6M1pI1BN+9jmK0ebhRJ4nvKhVd1Ilo2bz7RKd jSOLT2djLJ+clKARmXwlgqlrabAClFoAOrXE+3899VME3Xq6RXlksXEhHoXSsTuagmzC yORsMpYRw03hlHVyXt6jJtfH7ZrxwzgIEuyZoODgKdux5JFTJy7V01lX57Q32Nux3D7+ vi+u1mmPErg+qKW39g5Fh+pKBR01LXTKzXv57sM/5qn7OID2cFfq4X1EjQFPaCo4oTzU of6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770238474; x=1770843274; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=eTvXc4p3YYS50MtV8tURwG3grWXzMeUI4j3/qsvuHMc=; b=ZDRTndR2xCN8gEm3IEhvtJiZql4eKyUt8lM4VPEZorKQe8hu5SoUR/mFlVID6aDe0V bxSa7IdxIOju+KrnvcwurmYd/2VITCUGY/Qq3kGBixDyB7Z1IscV40MIJ+QYYC6xMhMe foChxU4z6u70oLv0XCoAkXKWNA4kzdzLGrrIn4dZpJXgfKrxoHLM8me5UMrsy61rr76M y2eg2WTwu45qrtrZE0FdBimHlsq9tbHedhtR1ULdQcIhOOf1fv9cYr0vhYjuGALFAyGD qrRtZiADoVPqdk0A3S+OwShJNPoYWhgMAKqqiGGsuuKOkeXHO3dqjoxTDR6pqPxq8p7a k9bA== X-Gm-Message-State: AOJu0YwxGhoVJbl/IYYT1UoJcl4RLE8r1AcZRuSbFAl3uf+qG/bymsSB BrchDrYIr3slAel41XSKNDmJqk7IDLFJpz0QI2jggFs6jz4jk3n2IiLN X-Gm-Gg: AZuq6aJEh3PqRJBkCh3BCR08WxXpz5PeX9drpDhSiZyaPUveAcQEMvsxOq2fFGUqL6I aKEY4/LbgFTaalHxWG4r2lqd+85pbEk8XLEQnOSasYX/tM6gryu8Fo8E1BmXgjr15S+woR66Q6B 6TYidsKoQl28awonkYqs3pHo/8fnEG36c9uRcwbH4G7Ht27V8bJMbJCes2WsKRRAoRoYIcbdT1D IfZR3mPPrVjlUIWAjW1HHHOOKOI/AWc0IrMXif+lrBGnFA1HmU8JIiGX5BBsf7MGMxnGiAsQHJb jDBHSJokwVlJIorlaxg7J+xIkInEyBVtl3o4l+DSebHwGCq7wiV2aPy5c8RNLASjM/R0uf/z/rg m4B9YagvXFB/42WpneSE9BPwSVdtADhNyy07tYhFRF7NhNgmpJf1b28E1DUlfuC3v4sdxntibxG TgJg== X-Received: by 2002:a5d:5445:0:b0:436:1946:c186 with SMTP id ffacd0b85a97d-4361946c35amr4412453f8f.10.1770238473891; Wed, 04 Feb 2026 12:54:33 -0800 (PST) Received: from pc ([196.235.235.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-436180647aasm8081105f8f.41.2026.02.04.12.54.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Feb 2026 12:54:33 -0800 (PST) Date: Wed, 4 Feb 2026 21:54:31 +0100 From: Salah Triki To: Peter Rosin Cc: linux-kernel@vger.kernel.org Subject: Re: [PATCH] mux: core: fix reference count leak in mux_chip_register() Message-ID: References: <20260131120948.254947-1-salah.triki@gmail.com> <6f7ebe28-7b93-4e09-ef86-4428d35ada1b@axentia.se> Precedence: bulk X-Mailing-List: linux-kernel@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: <6f7ebe28-7b93-4e09-ef86-4428d35ada1b@axentia.se> On Sat, Jan 31, 2026 at 11:03:55PM +0100, Peter Rosin wrote: > Hi! > > > This patch is broken. NACK. > > The put_device() call that you seem to think is missing is found in the > mux_chip_free() function, which is what should be called to clean up > after (a successful) mux_chip_alloc(). > > If there really is a leak somewhere, the real problem is a missing call > to mux_chip_free(), not a missing put_device() in mux_chip_register(). > Adding a put_device() in mux_chip_register() leads to too many calls to > put_device(). > > Cheers, > Peter Thanks for the clarification, that makes sense. I'll drop this patch. Best regards, Salah