Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp808065lqo; Fri, 17 May 2024 02:04:32 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVJjkfy03AahGvL2QZ4exywbe25zFvJ3CQGNB4+uHX4eaAgUfIm331Aw/FoeXFBJHuMjXHfjo9DgVXzkf1H2p7AE/L/epcwo+LuF18amQ== X-Google-Smtp-Source: AGHT+IHfvJpaaKRZcQMZkmmVzR4Vk/MMlCtLiBZzCmJ2w3YTBXuNjmJbORKXDuU1hsM5qLxT06eg X-Received: by 2002:a17:907:7b8a:b0:a59:9b8e:aa61 with SMTP id a640c23a62f3a-a5a2d5c9303mr1912736766b.35.1715936672348; Fri, 17 May 2024 02:04:32 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715936672; cv=pass; d=google.com; s=arc-20160816; b=FYN321dDBF479v1aoCmbyJUZ2wEbso8iIXRDRBSkH7lQoV6+7dvGSDLRlqGZgmDYpS EGZTEdS8UAmaCMhijQNSktIlkoDAG1dEMTOZoCg+S+bzXkKzBNxiOcsINvzAUi1BdGgc iTO+cXDKPCqz+l/zWxC1BKIxMJ4yIBobMLLeXG9DJ/hFfNKwRgdc1MS/+dmx+SCiNRMa 6tS2eG6eB3mLns+4IgeuepYkjtGLLehQ24tRlztgNDXTiaah8sSOgGcOkms4F8pzgvLM dBPFj4EyVOW+oh+Wg8/9izrrE2lDKeZbGYdpJaAxFDjFgTwxg2Sr84rFHh8lAX4EJFIE 2IlQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:in-reply-to:content-disposition:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :message-id:subject:cc:to:from:date:dkim-signature; bh=MwpP6VQrwBifZRjJxzXqLOLi6//U/+JHEGrk8rK8hBE=; fh=y9c2msnlduPVQF+94yQz0qgCF2ZDB2ybBgcEQt/ved8=; b=ADW74CcnCssEdxz4VqUJtCqq/L1rIsNYxnHC8ynL1/XZCOuBdItuUDxi/H2j3MCCkD /padQ1EuLjqB3DwXixfKFw63JPjNjwNRlpXeeXPcb8uD1lqGYhkGVIDVo8adc32bv4un fiREFzCQY53x8xiYj3RUt88xEJxtwIRJzGfW12usFym6AtzMY9ehq8EvU1OGCCZexbYJ M9dEBTSxPH3BXbtKp00r5777YQk3X8kAD7mgr4QS6oJ7ZRqT4pH7YQYkHki6G6Mx+dM/ t/Flt8FE8Kc5pB7cQQiUghoNKI8WYrJBTB3oc4EcQI3C780zfaT9rIHwOT305FMKal3M iFnw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@richtek.com header.s=richtek header.b=YnsB0o80; arc=pass (i=1 spf=pass spfdomain=richtek.com dkim=pass dkdomain=richtek.com dmarc=pass fromdomain=richtek.com); spf=pass (google.com: domain of linux-kernel+bounces-181892-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-181892-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=richtek.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id a640c23a62f3a-a5a17baff1asi1004151866b.696.2024.05.17.02.04.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 May 2024 02:04:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-181892-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@richtek.com header.s=richtek header.b=YnsB0o80; arc=pass (i=1 spf=pass spfdomain=richtek.com dkim=pass dkdomain=richtek.com dmarc=pass fromdomain=richtek.com); spf=pass (google.com: domain of linux-kernel+bounces-181892-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-181892-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=richtek.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 17BB81F2178B for ; Fri, 17 May 2024 09:04:32 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 93EA128DCA; Fri, 17 May 2024 09:03:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=richtek.com header.i=@richtek.com header.b="YnsB0o80" Received: from mg.richtek.com (mg.richtek.com [220.130.44.152]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 32CC420313; Fri, 17 May 2024 09:03:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=220.130.44.152 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715936634; cv=none; b=qHcfEGeViWocuiNmx+M6J+2lnsuO71u0XhEYS88Or6v3f7AbZAe7FSHODgEFa/vWLQL8ox7pkfu5MLfC1eddjoI+SNys9WjGx36F4XM8rpZL7/RNSMj3hCsvqDcB7eYGyvmSMRNvHN/1F0CtlsKRsHbaeLj7anq/HYTJYytE3q4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715936634; c=relaxed/simple; bh=lSYn1SIS2fkvLCLFM+efNsgxEGwWxnkze40au5ChSvA=; h=Date:From:To:CC:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=r2DypDNOZq1+IRrbRY32WwTZp0NOfCgq7QJTYy+D7v2jdR9itsI5XafUuB4+nQCa707Cbvo6Vm/QOkGXEnTQB6ja2JkmaC5XJaE3h8FgFqjrKiXqGrt2oy0kO5BRpDLW+C4d1GUamHBl7BpmOgOqrG8KFdYOzSHqv3hv89dLE5M= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=richtek.com; spf=pass smtp.mailfrom=richtek.com; dkim=pass (2048-bit key) header.d=richtek.com header.i=@richtek.com header.b=YnsB0o80; arc=none smtp.client-ip=220.130.44.152 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=richtek.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=richtek.com X-MailGates: (SIP:2,PASS,NONE)(compute_score:DELIVER,40,3) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=richtek.com; s=richtek; t=1715936630; bh=MwpP6VQrwBifZRjJxzXqLOLi6//U/+JHEGrk8rK8hBE=; l=579; h=Date:From:To:Subject:Message-ID:MIME-Version; b=YnsB0o80T01qrKKLuYsmTfiUDQlaZwCuHAgWsNnpUaH2eEe+H/j7nKxnu8cvKAreg /mCFynPeFSxp9DxfnOKGxC62dzwZ6nEjSGiumedVL9Aa0OdJSpoWcPSs4vqNP6Fc+R 1SZZz3vqMD62gYP2npsocIMIc0N3cEqE6rAzf0ZTtqcdYID6lOlUhJljRPxawvFVxM N0mblc0439Pb/i67vvxHwGUzLeq+LlITdi5OPT22hmaIDB4m4iLZXMlJmdnQm/oqaM 2gRrP1JbTWKmhEOISJXMbCKkNJItVtiy/iOsvE6lJQw660uf+bV7uvDIAPtUkX5XHU r1DBRSG2aNnAA== Received: from 192.168.10.47 by mg.richtek.com with MailGates ESMTPS Server V6.0(3213197:0:AUTH_RELAY) (envelope-from ) (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256/256); Fri, 17 May 2024 17:03:31 +0800 (CST) Received: from ex4.rt.l (192.168.10.47) by ex4.rt.l (192.168.10.47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Fri, 17 May 2024 17:03:30 +0800 Received: from linuxcarl2.richtek.com (192.168.10.154) by ex4.rt.l (192.168.10.45) with Microsoft SMTP Server id 15.2.1544.4 via Frontend Transport; Fri, 17 May 2024 17:03:30 +0800 Date: Fri, 17 May 2024 17:03:30 +0800 From: ChiYuan Huang To: Sakari Ailus , Mauro Carvalho Chehab CC: Daniel Scally , Laurent Pinchart , Jean-Michel Hautbois , , Subject: Re: [PATCH] media: v4l: async: Fix NULL pointer dereference in adding ancillary links Message-ID: <20240517090330.GA23279@linuxcarl2.richtek.com> References: <57fca5dbcb8e157371deeba019eba430bf7148b2.1715935535.git.cy_huang@richtek.com> 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: <57fca5dbcb8e157371deeba019eba430bf7148b2.1715935535.git.cy_huang@richtek.com> User-Agent: Mutt/1.5.21 (2010-09-15) On Fri, May 17, 2024 at 04:51:29PM +0800, cy_huang@richtek.com wrote: > From: ChiYuan Huang > > In v4l2_async_create_ancillary_links(), ancillary links are created for > lens and flash sub-devices. These are sub-device to sub-device links and if > the async notifier is related to a V4L2 device, the source sub-device of > the ancillary link is NULL, leading to a NULL pointer dereference. Check > the notifier's sd field is non-NULL in v4l2_async_create_ancillary_links(). Not seeing the message 'No send the v2 patch'. Please ignore this one.