Received: by 2002:ab2:6309:0:b0:1fb:d597:ff75 with SMTP id s9csp889064lqt; Fri, 7 Jun 2024 01:26:24 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW7onCTZuIJbnSUWcFK0ixFAhmK/pCSv3+FkNNWngHYPJIe60Om1UFBuiUTeUpWF3/OVeg+gEogTHadEXNITadyEAaXIaVvoLlNyKyQHg== X-Google-Smtp-Source: AGHT+IHmU8jAmgsKKJh/EowRAmc7j3H9zPlVZCP8V4O7M2bL6t3LYHPy1vImTya+BXBpForP3Ak9 X-Received: by 2002:ac8:4d47:0:b0:440:47ef:e72b with SMTP id d75a77b69052e-44047efebd6mr6665311cf.50.1717748784404; Fri, 07 Jun 2024 01:26:24 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717748784; cv=pass; d=google.com; s=arc-20160816; b=l4xTw8Qs+JAILKWuOU0PWc9QBxHbdgmniH4X02yTMkbwrwQHepJ/2HCHVtWHPRNbGe mYpe7sACPjR0FuvUh9m1rrWL+gRVV2U3bnf9z27+yld3W36se1XtPgsMeIrC863+g5Lw KxzfzYgRfCHWSOU2IWYu0fVGwX0mKtR8ma+ScWm92r78rHeN8+tKZws+ZgRL7IYleWhx 0Svyhrz1yxBCt79gScx4n8yYTe4MAXeXlCTK/fLuTTDDZei3gTRzGllH3vJ6InluA7b8 b/tTQrBo0fnIZYrZtzDIGCspL/tX0WmhBv6uMu81fvl9LZiOCbHPUKIAxs0Rhz8bf1MW BHLQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=ORHnZa81MTx79wWzMdPXEmgkK3/n9+FWj6CNynHAa7A=; fh=TC9daztezbaCHv95xhXsezYIUyFk/3c4WmRyNgGB914=; b=DmP641JcIrNW4dMJpfr3zXJ9zLTZanOu9dkmHyy9igYEPJH5Z9OV+H9casIO+dt2u/ EP6elBaJJC3kebiwLriQYdI/x2awy+kQ6w9P2LDmODLfme9aFyWmt+t/+Lab5Rc9Gk2t GlGti1NcJu9SpELMYvAnpn8DjlhvdeGWwo0EBekmwZ9buvVD/0+i+7PUGhG25TSdbiah TYnp2BhZvxknxsQ4kiu+5EklcVv4lWJdlrCrr7gsUY20vax5Ra5xdJpaQ+owEtIwoTsv siAX9kM0suW8jYZajJB4AC4LYTGO0mcCMfIF+414GGJWTsv29CqCnt5dKBoTNX45Zpeb O6Vg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=fhIEYSm6; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-205596-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-205596-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev 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-44038a6d40fsi31960691cf.112.2024.06.07.01.26.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Jun 2024 01:26:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-205596-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=@linux.dev header.s=key1 header.b=fhIEYSm6; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-205596-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-205596-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev 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 226FF1C23318 for ; Fri, 7 Jun 2024 08:26:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3C0C015B0F5; Fri, 7 Jun 2024 08:26:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="fhIEYSm6" Received: from out-189.mta1.migadu.com (out-189.mta1.migadu.com [95.215.58.189]) (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 0E54E15A863 for ; Fri, 7 Jun 2024 08:26:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.189 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717748777; cv=none; b=e4nEoAVUTIIGaUd3jf8zr7Qc5tMPvyPNmb8SQC7AicdSdHbgzAWvtK5I5SetciLaJgqLDoe+CY76sTecsyPwhgtuAcVKcHRbbkmKbafqRdkyBnuEIM2FNdtKEra4liarcujWbz8ZOsca232s3x3r0zqK20zHM+Ga5zcdy4qrLtk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717748777; c=relaxed/simple; bh=6RYn8Ak83TO778TRb6ww3Lrzb+/vIQANG6vEzYSNBU0=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=GJkp+YX5OPnBg8wZg3mTKJq9juKKu6dtGUObrhfWZSQR2m/tQ0wOMFJs/pA4D+19saAoen51ewnsMYPEY5P/ZMizaOFm+teAOqDv8d/X8MlGMj99sVFs+wZ95F0JEy1sSpA0IsFw/owumM0qwmsSQkA9/C0YaqJb4Z1guR7b5Fc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=fhIEYSm6; arc=none smtp.client-ip=95.215.58.189 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev X-Envelope-To: sakari.ailus@linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1717748771; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=ORHnZa81MTx79wWzMdPXEmgkK3/n9+FWj6CNynHAa7A=; b=fhIEYSm6XJiVQ/oi4DVYTdIFml931HDUrr7Ti04GWauP8jXhgzYx68/moxavLp0q+dcKSJ fAgBag2bNI2yB0m21NBk+xPpzBWm+6aSaq4pUy587D4svrXClPqc5pU03Qm0d9434FnMjN P7U9NZB7jZAyo8E8uFdFAIf4RWO2Cv8= X-Envelope-To: bingbu.cao@intel.com X-Envelope-To: tian.shu.qiu@intel.com X-Envelope-To: mchehab@kernel.org X-Envelope-To: hverkuil-cisco@xs4all.nl X-Envelope-To: linux-media@vger.kernel.org X-Envelope-To: linux-kernel@vger.kernel.org X-Envelope-To: gehao@kylinos.cn X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Hao Ge To: sakari.ailus@linux.intel.com, bingbu.cao@intel.com, tian.shu.qiu@intel.com, mchehab@kernel.org Cc: hverkuil-cisco@xs4all.nl, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, Hao Ge Subject: [PATCH] media: intel/ipu6: Fix a null pointer dereference in ipu6_isys_query_stream_by_source Date: Fri, 7 Jun 2024 16:25:42 +0800 Message-Id: <20240607082542.380166-1-hao.ge@linux.dev> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT From: Hao Ge stream is NULL when source is less than 0 in ipu6_isys_query_stream_by_source. It's a null pointer dereference. Actually, this should be isys->adev->auxdev.dev. Fixes: 3c1dfb5a69cf ("media: intel/ipu6: input system video nodes and buffer queues") Signed-off-by: Hao Ge --- drivers/media/pci/intel/ipu6/ipu6-isys-video.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/pci/intel/ipu6/ipu6-isys-video.c b/drivers/media/pci/intel/ipu6/ipu6-isys-video.c index c8a33e1e910c..06090cc0a476 100644 --- a/drivers/media/pci/intel/ipu6/ipu6-isys-video.c +++ b/drivers/media/pci/intel/ipu6/ipu6-isys-video.c @@ -943,7 +943,7 @@ ipu6_isys_query_stream_by_source(struct ipu6_isys *isys, int source, u8 vc) return NULL; if (source < 0) { - dev_err(&stream->isys->adev->auxdev.dev, + dev_err(&isys->adev->auxdev.dev, "query stream with invalid port number\n"); return NULL; } -- 2.25.1