From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pf1-f172.google.com (mail-pf1-f172.google.com [209.85.210.172]) (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 0F9373B7746 for ; Sat, 8 Aug 2026 09:10:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786180211; cv=none; b=D2M46LydOEkemIyxW0cqTOL68OzXVeWFgknM+D0x0xjzLLGQG5RJUlMjmTa+xRgfkPUAr87HTUjJwEvhyjiAbjt4IZz/lVMPJsAtG5SIEaxbJDIAzylq+32EhmcaLtIUxzGiSPTDQ24FnOklESTmlG4yIWu9irCLOZy+JNrSNpU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786180211; c=relaxed/simple; bh=k/cWIdRMsW/LhHreJLBuB1Bs7FEShufRq6kvyp8vZXY=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=fQP052+uxGCJf9yhf0p5kiKRpqQiYEev3J8YMO3EG9kL0jRCxDkVSYVlak1h4JLzKPBOjwSs0mKnnJ77O2jJFBZO1QmYoreAKTBQ231Ry8ORA4M0V8pMQVGKn8ZXWPckt25ckMXUVtpSNw59QS05zjgm7cMZxDunyXF3WJk2goQ= 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=FZhHZwNC; arc=none smtp.client-ip=209.85.210.172 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="FZhHZwNC" Received: by mail-pf1-f172.google.com with SMTP id d2e1a72fcca58-8485bd28dd0so287381b3a.2 for ; Sat, 08 Aug 2026 02:10:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1786180209; x=1786785009; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=+D9dBeaqP6iptq9GitZZjO0xaBa9h14yN9QuWGSamj0=; b=FZhHZwNCVymYEg1uNqvL3iCz2GwkVSs++Qiyb0cq6mP7kY66E0fuEx+Y97sDS9HwYx DkJM/ViaFcab/rBJ2318MhFwFZw4mMrzAxXB7tTd05RRPgrQgpnW2kqDsLEjeukz+TXw 5H67zWk8iF2bokY1k7/70SEoIdZLatVcW4oRzYkXS9/qHM/NYJnaGbAG3ZJdVFSyH7X7 Dnn8EQOnqpm76IWqbW5nmMtiV0S1Dj57JUhnwJzcziG0C5ewQRY6ldWPLiOkPWBR3DvP 1h5h7i8KpGCGcRn1jMv8FhGYJTmLxVy/fOG+ImcZDVvfM6vhhtGlYhm9uwOhSdaaqDic J6lg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1786180209; x=1786785009; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=+D9dBeaqP6iptq9GitZZjO0xaBa9h14yN9QuWGSamj0=; b=jiHm8GaiRS0Yoar//LU5q1gNvojajw/Cj+nPtqhcG1eI35K8cOIloIjLjuNbjSoU3R QDHnqGiCC2GEUG7Qsxa2Moqle9DFmh12HOi6lgdowvViDkLLOpV/ZTkh5sgJrKLTmKtC 15zmT/X7O5phEFvQpjbvSEQ4v5r428ksYTj0oX2Y8ncDHah5pn5qLRrLWV8fZQQNZ/kz Xehi+PWFNaPV2KK+qJ83EnFtRFKwaFssi4xfEyrXGsrO+kU+eY2+fxzoymMrKB0dkbx2 o4+7ysMdLGPtgJu4fY6AqIHIkOE0lFuN0HPSEiJHdAK7UGRtU1QzS11HJojV41vmE6BX bKQw== X-Forwarded-Encrypted: i=1; AHgh+Ro0js3z5lfyYZN4rnU3jroH1nU7Ea7fXb3QyWyq5OUu0TepeKoXAyoNehRFluvB5zH4JEbHqWiVoHXIfLE=@vger.kernel.org X-Gm-Message-State: AOJu0Yz+l6+bidef8SghVetx2b5HLAnTBnfIEVxIRaNXRIha/+y7mE1T oIi7CIXsRpegLSO5R1tGRrSyc7aydU/M0j8cKmJlc1hgwc7jUGWdL0XoPN5hRaYRyyk= X-Gm-Gg: AR+sD10RlhOM3JCEsNvNuxr0AVR5QJH9MSiSqcNWKwsNDJUsMtuZB0a9SzH7q93XvTN 65DQXzZVBZ6Fbx/zs0OSlV4YGAR0QvuS0p83SZrlgSbsUGWjIPaY9qOWQW+54LH2gPiWJejTJsE HeyMKcwEMLMXXxBUHZFPRFtvjVzBNZEw7UBRKmjJV93MQdsShBTspB4UleZfLCo8LuT1MDSC3qL sOIERbVk7jUjN6oSi98iEiNLv6MKWMfUbcpEyDo7e2yh+q4O6aSOUL+zaKWS4K+TMf5MBVyGbWH C8ZJqCTGRIkx7PbCWhMQaPI3pznNEOgGq1OTQ+ev78i9uCy9YXz0DROK6c1HB1OYpWHDfq2DEYv eOi6VQmzqN1dbH3nqPaowvycAvmQFZ57KixWCru+s7ZarCqG2Q868YG4gIw6L+5vtQNVftpUm9D AkWYj51BoAWNPibEJe7dWk1iJ6JT9Xvu3jAYiQp6w/LSdJoOAtZxLIIl2kesbWPPyMv6kjjyIUe pIpSA== X-Received: by 2002:a05:6a21:498b:b0:3cb:9bae:9262 with SMTP id adf61e73a8af0-3cb9bae95a7mr22142838637.37.1786180209252; Sat, 08 Aug 2026 02:10:09 -0700 (PDT) Received: from SGN-LDSENG.tasernet.com ([2405:4800:5cc3:11a:1ac0:4dff:fe8b:4a69]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-315bec29672sm17146613eec.29.2026.08.08.02.10.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 08 Aug 2026 02:10:08 -0700 (PDT) From: Cong Nguyen To: Sakari Ailus , Bingbu Cao Cc: Tianshu Qiu , Mauro Carvalho Chehab , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] media: intel/ipu6: fix async notifier cleanup leak on parse error Date: Sat, 8 Aug 2026 16:10:02 +0700 Message-Id: <20260808091002.2684902-1-congnt264@gmail.com> X-Mailer: git-send-email 2.25.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit isys_notifier_init() calls v4l2_async_nf_init() and then adds fwnode remote subdevs in a loop with v4l2_async_nf_add_fwnode_remote(). If an endpoint parse or add fails partway through the loop, it jumps to err_parse and returns without calling v4l2_async_nf_cleanup(), leaking every v4l2_async_connection already added to the notifier's waiting list. The register-failure path just below already cleans up correctly, and the caller only tears the notifier down (isys_notifier_cleanup()) once isys_notifier_init() has returned success. Clean up the notifier on the parse error path too. Fixes: f50c4ca0a820 ("media: intel/ipu6: add the main input system driver") Cc: stable@vger.kernel.org Assisted-by: Claude:claude-opus-4 Signed-off-by: Cong Nguyen --- drivers/media/pci/intel/ipu6/ipu6-isys.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/media/pci/intel/ipu6/ipu6-isys.c b/drivers/media/pci/intel/ipu6/ipu6-isys.c index c9cdeb7054d7..24db2763de54 100644 --- a/drivers/media/pci/intel/ipu6/ipu6-isys.c +++ b/drivers/media/pci/intel/ipu6/ipu6-isys.c @@ -761,6 +761,7 @@ static int isys_notifier_init(struct ipu6_isys *isys) err_parse: fwnode_handle_put(ep); + v4l2_async_nf_cleanup(&isys->notifier); return ret; } -- 2.25.1