From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-yw1-f175.google.com (mail-yw1-f175.google.com [209.85.128.175]) (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 70F691DD0EF for ; Wed, 15 Jul 2026 07:06:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=pass smtp.client-ip=209.85.128.175 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784099212; cv=pass; b=KRgg9CdSewFae8e92eFJ7CXKfLdF8QO4y8B2epBZ49PordynTKxFVM+fGrqhaWnSbjEb+qSrqfA63JR6P49Haj5W45lMI7WqEIKrtqLVsxUL/iBJ8csREYDP2ALKX7Y6sHMU5+i9Wf20XpKDesXqxgG/bYQyQ2esnW2UBs9VJWU= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784099212; c=relaxed/simple; bh=p2EMMrnVxqOTtiRkqVAQnELW3imwbqh/ojHP0xwjfzY=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=MerIV3bjvn87A0QRfp5MDmakR6mW19p7EnH89aI6e4RdV7Sv/ojCti0jomuPNtskpGnz4nt7MR3tR33FPy9zb5CalIuOjfn1xe8sMyCEycc/SakXonndxiMutv3ka0o5hNlLrtQRWri5CLpqtq4NZGpKXBFogwiYzuGySqg3nw0= ARC-Authentication-Results:i=2; 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=CKL095c4; arc=pass smtp.client-ip=209.85.128.175 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="CKL095c4" Received: by mail-yw1-f175.google.com with SMTP id 00721157ae682-809b19a7f25so68782257b3.3 for ; Wed, 15 Jul 2026 00:06:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1784099210; cv=none; d=google.com; s=arc-20260327; b=Jq44iPCvPJWReY3UO7qWbMR9DmzbuCCqGoTtm1bJdO6XfTWvNrue0oPkEmOAAPc+f7 HTmlguuQ25tyVdxlAhPXKyIXBpsMrptpX74TDstqM7Chy3cvRnjbb0oC8GuJx9rdL98C MCqJJkrZWcLyJ+g/ZsBHnVodeKoO3Ke53azvbbHK/zzkHYkyfA3jrww5+iRhMP7QiEHd 4B4cLVpzFSGKV2uMsmpOiY9Ic0Per5mXnW9YHhQcVXhzJHHhHXC54qjCujaIjj4cbh5I hH13OWU7vSWK49HNfBTTSei+6A1UMjK6VlSEBMKRbp6lM61iTwOkMPaGC41JjKwJLaM+ sPNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=NpZ6Jcupvh46QbV8K3TWCquwqLQ1FypJF8PP760gOuU=; fh=dTC3UgGEBk75svQhuB1TqeWFuydttXFMKUZW68xxO8E=; b=WN47udGYTSO/saVfAHwpGv5hnfH8cczP3yyC4ibF9YyN1rQa9bl1UYyPXqnIRrvG3j bsWt/0GVhAXnNNkeA9hAgzh/9sQAMNSiLEj2cYcPv8E+p6Exm8juJFfiZZLn75ojJ/xZ IA/DBhXmXSAqw29KEcQHK0y4Mn5Fjm5GZ0e2ZdGgKtYg0UOGSyuJ5HlJ1p9wGqxoCtDI KXfrLCmChv4QeNHzhS9lLOAeH9evjm7LHpdTNHfirMUuj3wn/uDe+4vB62Rkf726rxss LWtHLXvYe5a00+n/wLCIpBOOKWEGr0YfAZ6ip4nnOvkvDLNUsQo/7C+NY4q7HbbFBxtd GuhA==; darn=vger.kernel.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1784099210; x=1784704010; darn=vger.kernel.org; h=content-transfer-encoding:content-type:cc:to:subject:message-id :date:from:in-reply-to:references:mime-version:from:to:cc:subject :date:message-id:reply-to:content-type; bh=NpZ6Jcupvh46QbV8K3TWCquwqLQ1FypJF8PP760gOuU=; b=CKL095c4IzzglWE6n9D2L8IinB5v3V1DRHSQw9De+hQ8Ny7PHJxs3Xb5zhNjq8ypth rIaIOD3Svx6YKWvQ4ibmwEUOU3WcDRqnAiyTmJaqbKXKyNjnFh4B7HJzbsihXaCex76B bxK9PFLBKuBR+cYJ6pYZtOSJw5Eh5k4dB2M6046zuvf9bktDucpa1UCLoTFNf7z+wuQ5 yJSxBne6x70ktp6m2tF4UTeL2qQASoLcnkMhprhp/2COiVcgOn868f47iwkxn+cvLOmP jbWaGtgR9r78ElgINU6ytvfpR4d/V45ICYm3/3hvWdcWz6D2NxTSSqN3NdN1IdA8RBmG fqcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784099210; x=1784704010; h=content-transfer-encoding:content-type:cc:to:subject:message-id :date:from:in-reply-to:references:mime-version:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=NpZ6Jcupvh46QbV8K3TWCquwqLQ1FypJF8PP760gOuU=; b=gVFRnswso39IfbQ0bCqmq2ltOs5XkxBOnm61pEww9wKjS9gvzU9P+JosVkzobxAs8e dR+3xuPiy4iqN4AeTakcLR1RNbTT99oAGpQRuD2NciGKKvLL9rpDVW4jkliSbklMeaNp yrWa2ZNAEX/D/l0IACtGbdcmmZAxZSYjbcpnY/wKd8CpnVYLQlXRa7WIswL+WmHLadGK S73t+S+aZ/p5cFQEk0tuP17i2mtDQNkg3dNTuWfwhi9sXMonYynS0Kruw8YcEiozsvy0 U3Tyz+NgDSyNsVtoVVuh3IjEYdjcQTzWCUc1F9VhR9UclO1YOi/bIt5UfUZk6MtIMCf2 98GA== X-Forwarded-Encrypted: i=1; AHgh+RqhxpaEMy5Louzb7sRJ55YvmNjRNpoyxBJjgSiZbSKTYIFEsi5tzno51G/4DgBQCwGE1h9MAQukG3wEt3k=@vger.kernel.org X-Gm-Message-State: AOJu0YyRUzqoJefEJxzpM2B1ap3q6fdghOxzEcZZB5tfQnNFMF3uT8ta R6tq58E2OI58SS37zh99jrlfdokMgg/bBLMcH7QVx5ETacNjC7SG+qLuXtU463lGL3iGMMuM6Z+ msxCY3Qh2s1Qnh2fv/IEEv9QZd8tMZsv7SHox8Z3KqDaa X-Gm-Gg: AfdE7clBant959XfFAoyYv7Le7r0J09q0pq8696uzTDwSLYzcRU/Cd/QglJzkG0pZ1b mvp4WmL0VXO7onGg+3d2eLppAGyuGnJ2JDmWpv77hbMZC+i4eIrjzcNTJBsJMO9H2jvv6qGfN7R uSBatwdb5bweShgBa3IRxzd3iBGtTZTAuKLjSVIkt1RWjPtwSS+ua6Omb8bv8GzWwJ+695389xG aJSVzLPHqvrylZjfqqu+ycDSMMrAwP05ZTsxupNaPxnTvDUjZU+vbEuQd9/eFEN2A2tatqQzQ== X-Received: by 2002:a05:690c:4507:b0:7e8:6a6a:dc11 with SMTP id 00721157ae682-81ecf86d451mr12713117b3.19.1784099210433; Wed, 15 Jul 2026 00:06:50 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20260713120205.1003691-1-lgs201920130244@gmail.com> In-Reply-To: From: Guangshuo Li Date: Wed, 15 Jul 2026 15:06:37 +0800 X-Gm-Features: AUfX_mwMVIoQ4P2rxDkVgjIjeTAh1lpuwURAt76LNRFtWsBtWR3K-SIy6N9kKfg Message-ID: Subject: Re: [PATCH v2] intel_th: Fix MSC output device reference leak To: Johan Hovold Cc: Alexander Shishkin , Greg Kroah-Hartman , linux-kernel@vger.kernel.org, stable@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, 13 Jul 2026 at 22:02, Johan Hovold wrote: > > On Mon, Jul 13, 2026 at 08:02:05PM +0800, Guangshuo Li wrote: > > intel_th_output_open() looks up the output device with > > bus_find_device_by_devt(), which returns the device with a reference th= at > > must be dropped after use. > > > > The reference is currently intended to be dropped from > > intel_th_output_release(). However, a successful open replaces > > file->f_op with the output driver's file operations before returning, s= o > > close runs the output driver's release method rather than > > intel_th_output_release(). > > > > For MSC outputs, close runs intel_th_msc_release(). That release path > > only removes the per-file iterator and does not drop the device > > reference taken by intel_th_output_open(), so every successful MSC open > > leaks one device reference. > > > > Drop the device reference from intel_th_msc_release(), which is the > > release path that is actually used for MSC output files. > > > > Fixes: 95fc36a234da ("intel_th: fix device leak on output open()") > > Cc: stable@vger.kernel.org > > Signed-off-by: Guangshuo Li > > --- > > v2: > > - Add Cc stable. > > - No code changes. > > You forgot to remove the intel_th_output_fops release callback as I > mentioned here: > > https://lore.kernel.org/all/aktZDK0NZrTdEqOm@hovoldconsulting.com= / > > Johan Sorry about that. I=E2=80=99ll address it in v3. Thanks, Guangshuo