Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp783718lqo; Fri, 17 May 2024 01:04:25 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVi4bei2jIpfDRTsv9SGaKdnM2FFfRp30ehKXLU8aQMmLpK5ImNWyuyzEcOfAtQFnOdgrxO988mFzWbuzqGxgzHs0aH04Mp2tl8t3atMQ== X-Google-Smtp-Source: AGHT+IGBkxuK19S9/zgwFTn2gpziaXMR5CzFnZ9afwyVvQqSBiQr2gc0opRrUwCxPHXrnO4eDhlf X-Received: by 2002:a05:622a:5c9:b0:43e:3d64:8b3 with SMTP id d75a77b69052e-43e3d640eedmr38472141cf.4.1715933065515; Fri, 17 May 2024 01:04:25 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715933065; cv=pass; d=google.com; s=arc-20160816; b=wbR9lajhBBZV7QYEwEqL7e9dHKCSES1FUFCWzY21I05WjF98r+5IaIu0NgCp797GxJ xwgzt4z2aAMyBoouY9IVnoZWKiV15fhC09RHJ6rfUaTKygouSh/ux3MMl10BoegcaMk/ c9bi6C6DmUHok+KVUoIPe8XQ3DGFlZv/Vy7HngMp6Y3bq+CIh1Y607WYZ8x2pycBt/3i zWBPMRFFE4usCoCtAc7lb+KMHox8BaNVmxhOK3xG+pN4irt77uWUGUrkQljsNYw68mro Zc2axFn8pqAchlS5coSduqV98Hqt1IdDzLG4xuYjGBFyVS95k6kW++eYDbII9JKsBWfA t/7w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=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=bL8nBzvgrRN8/85Uy8fIof6tNpUprEpgDuTD7yR7Dto=; fh=Wpoo+lVxgbIh7zM0uUqog5trJEGalexqq4kcZfsu5/Y=; b=HBXrPRY2Hl2YTVnrdZZil0YFuib/HAus/bpf8WR+vIyALI116ZG+YQoKXiVECHNaP7 bTEQ1Ts7QWl/qXQGzYCPzUmXIo68hN1oXcltOpFy9SPgX/Ct2SyUUr9NGHb5Wx3eotYC /Z9SoAi+Xvy3YUCtDCRmtKNXmP2XY1XNLJflGZ9Dt1a9exRNurN5LQUom6J7yc9pDZ4o 4jV3DDgVs9iw2pyAZu5ENmvWwdPLbJDly3nok1l7e2u5D51X0xbabGzjgNoX/PcG0B9i jpnDcbH2EEzPJLcLq1oHUVFx3GXRhgobema81HhJVdMuOx1jJNpIDRbvawbZTRTle3Oc DidA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Da9yXPqd; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-181845-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-181845-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id d75a77b69052e-43e3c1ca99fsi38230851cf.671.2024.05.17.01.04.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 May 2024 01:04:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-181845-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Da9yXPqd; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-181845-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-181845-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 232301C2130B for ; Fri, 17 May 2024 08:04:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2E0DC20300; Fri, 17 May 2024 08:03:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="Da9yXPqd" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9FC762260A; Fri, 17 May 2024 08:03:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.19 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715933026; cv=none; b=rlEd4oFUc0CtHcczv0+KCCqGOvz7kDTKN/CmCIGiqkBS3iWbKozweTEHnY/QQO6Mz16s5LeJ0vR8C6ZvYQmFhLxV5xy7eLUPiFyBtPJEVcNvOg6yz+OxPFJMGAte5IKIE5XJ7OfcKnkMuWWaEKDoV+grTvxocN2pw9MICEvfx8U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715933026; c=relaxed/simple; bh=G/srp7uTaTSo3ien65VwLzBGNovcOAUtexLcayUN5hk=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=rQys7OJfjpxwVIeA6femBr53npU8Yv8bEgvf8sWP2m7E/ibIhK2/jt2uhsUwSisglFYNFQEyu2lHMURdma9JsA7QbMtYomJbL/7z3LyMcK49FXOFrBCkTWIPjF+80kF/LAXtz4Vl6SZt7GhzwyR2HTOiovX/I0OXz14K3GrK7FY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=Da9yXPqd; arc=none smtp.client-ip=192.198.163.19 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1715933025; x=1747469025; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=G/srp7uTaTSo3ien65VwLzBGNovcOAUtexLcayUN5hk=; b=Da9yXPqdZ4eT2iyjt2mly5sFo+WbVFcFYxymKDkyndblIQvhGN8FJKWa qYBacmwxEbcfIeooYjFLQf3dBMsu+Qd6tmdGJmBxjtGhi+Y8AxbXpE1KL 31JvHcSHe+75LQ12qbQ45mSxg0QTxizJUnHOE8mgx4GTZA4n4bhEGS2k7 LsfECym5obaW5VaVqnEXlSSXHpGzdnSF4IfKNVg7ujW6a6YGFnwqgnI4d pipmf9WHwZMEccZNe8Zf6AYYY4QPhb44RNUWLLqNHOdD2wU/C8UHsrFb5 lii6faqfcZzFB47hpze1lJg7XCTCkY/kYycPq5t2CHG+rSCSTvr6CDhtZ Q==; X-CSE-ConnectionGUID: Hkqu6OQDT52vaq+sz2IBcw== X-CSE-MsgGUID: qcjzzc8aQI6rD54JbfkV/g== X-IronPort-AV: E=McAfee;i="6600,9927,11074"; a="11936895" X-IronPort-AV: E=Sophos;i="6.08,167,1712646000"; d="scan'208";a="11936895" Received: from fmviesa005.fm.intel.com ([10.60.135.145]) by fmvoesa113.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 May 2024 01:03:44 -0700 X-CSE-ConnectionGUID: /CziZxrwSVukmBOEmE6LHw== X-CSE-MsgGUID: lVKBLj8HRcOy9D0z8RZBcw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,167,1712646000"; d="scan'208";a="36149923" Received: from turnipsi.fi.intel.com (HELO kekkonen.fi.intel.com) ([10.237.72.44]) by fmviesa005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 May 2024 01:03:32 -0700 Received: from kekkonen.localdomain (localhost [127.0.0.1]) by kekkonen.fi.intel.com (Postfix) with SMTP id A0C2F11FA44; Fri, 17 May 2024 11:03:27 +0300 (EEST) Date: Fri, 17 May 2024 08:03:27 +0000 From: Sakari Ailus To: ChiYuan Huang Cc: Mauro Carvalho Chehab , Daniel Scally , Laurent Pinchart , Jean-Michel Hautbois , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] media: v4l: async: Fix NULL pointer when v4l2 flash subdev binding Message-ID: References: <20240517063150.GA12245@linuxcarl2.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: On Fri, May 17, 2024 at 08:00:32AM +0000, Sakari Ailus wrote: > --------8<------------- > 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(). > --------8<------------- And a slightly different subject, too: "media: v4l: async: Fix NULL pointer dereference in adding ancillary links". No need to send v2. -- Sakari Ailus