From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=74.125.82.199 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796318200; b=djuVlSRfZZFDIVR/xXlenmpLSYW1qQY50bcSn10SqvEAduGU+BtBwyE8APbL/Sqi0hzw xTyzDcilG7Q0aoEl5ugQbG0We6UAvPOtkR8of2X7MGFaARHXoqhbnu+eXgu4BgA7vxvAe S9I4IFY2YO+C4oKStQW7p5JeJeV5p6hSyfwotxAQ3nYP1Q4Ohefov9TZfg+hpRi9aUGFo 6L/4Eal8Y+1n7fegk/jVvmCgktzSJSs0jdMa/Vn7KLkB1f2nFeMzamlKhJ3cJYCp7VnOt vQaUbCpMzNA1JJtUhEqZcJqSCiOZK867e1AiA7BJWRUmBz3ThTaZ9coufhPxaqgBSGA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796318200; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Received:Date:In-Reply-To: Mime-Version:References:X-Mailer:Message-ID:Subject:From:To:Cc: Content-Type; bh=Iexy0xjTfcf+IxHbDoI9KqL5krGNGWE0GWHjcBrciDw=; b=b3aNgqJECDHfLbgF27Aw2gdklDZQXM+VQWWHUyVYCnr14kitb+bYdtW40f8xI9EVVhvc FPrVOyh6iMYpWNviyn/LSOP5xKQcxTP7DruAHk3JdTqtcw14RmJdHRi6NihQy4gCfTlaM QCP5llOwTW2cnMsVhdnpj2eQ/T+atCwh6NTbPQJPh6hgY4Ibk8BmV+G1VxgxzjwLLD0KO /BvXvphRH/G+Mx/s+Me7mi7w4JX1iN01p0W1iE3f31eXw4woy5bM4fufh85MZ1Jn9+w7J ArJvMZInAA5NYXUFhgkJbfp9nfncB+yUne9aAwHBvRdTC8lxZmhrhKPmbO6aLtwlAgg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=google.com; spf=pass smtp.mailfrom=flex--irogers.bounces.google.com; dkim=pass header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20260707 header.b=pq4k6Aen; arc=none smtp.remote-ip=74.125.82.199 Received: from mail-dy1-f199.google.com (mail-dy1-f199.google.com [74.125.82.199]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BC598606A697 for ; Thu, 3 Dec 2026 17:16:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org BC598606A697 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--irogers.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20260707 header.b=pq4k6Aen Received: by mail-dy1-f199.google.com with SMTP id 5a478bee46e88-386c3309469so13049168eec.0 for ; Thu, 03 Dec 2026 09:16:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20260707; t=1796318199; x=1796922999; darn=lists.linux.dev; h=content-type:cc:to:from:subject:message-id:references:mime-version :in-reply-to:date:from:to:cc:subject:date:message-id:reply-to :content-type; bh=Iexy0xjTfcf+IxHbDoI9KqL5krGNGWE0GWHjcBrciDw=; b=pq4k6AenTMqz7JRls8TvG3jalevvJzb+M2E0mPqa07KKPIv+OZ4GXppoThCTFB1GQd XHGF/83JGjIDAh0GWTLLspVSUaOPdGx9ICNEZRDG7HlpaB5NGxmEl9o5Ky+AQzz2j0Tj TacXjaNzz/JH/v3VqV5sKl4+f8zHjuhdRGE8mcGKfxCU+hRyn1pk9JaDmmjluLR62FFw D5oTRMLLnoKM8CA8exJy2os5YywoSzkIFD0J+V5Fu/633r7B0aC0UqbyESy2yVfBC6El Flw9SNmWbK98gyDaSTO5ECDO7JDiwEGzSRwROe4eFg4fAqHoc2xZFUryPLblrGCJdgAu 4Zhw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796318199; x=1796922999; h=content-type:cc:to:from:subject:message-id:references:mime-version :in-reply-to:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=Iexy0xjTfcf+IxHbDoI9KqL5krGNGWE0GWHjcBrciDw=; b=frTbkwKwDqMO1exdQn6moh0BFHP0ZIF3q7/HgZkQpkKBSjSXcB/0E/biYfucVIFXeI Ycps3nZVu2nvnkprxChbI2LL65jk/DY8k41VTovGzc1NeO2sAwnSOBIy7j3Nsrz9ukhp lQQZ549P0sOHgzMOS99yOhfDOYdxuiQAu+iwFCfjSej/vJlCWlvFBU7q1sPyYhg4Dc2f nes61Bkj/coXGNr7QWGY5uRgu53zn2PZ6FJl1UKW4yOrs4GIjRFxjVLyUub+PuJwDQ/3 ZFdRJ+MwYc9Q8pDU5Ft4tXiRNMkjWy8Zg1JZcL8+TfE1eJc2QPs0CtIbD/r/2crB8p4T HxuA== X-Forwarded-Encrypted: i=1; AL+hErGrFPtC7VRiw//2o2W/RQXXAg5Lg/4npC0/hVI+tvKEY9WpbGqTcWM3gPtNZo6Fl87EVdZaWnFtg+XG1LaH@lists.linux.dev X-Gm-Message-State: APuU4Z9PyyyeVqyG1JfL9Fk052mXo6hEx2POkNai/c8UqBaue9GPODwh l1Jozkuhd1QSbJawCUJ6CgsjYhGMLRefRPb+GAoJdW9C48Y9e9R4AoRX0gwFbifIs/Qf+KsmY5i JSmsEF0p+rQ== X-Received: from dlbqd2.prod.google.com ([2002:a05:7023:b02:b0:1b5:25e:958b]) (user=irogers job=prod-delivery.src-stubby-dispatcher) by 2002:a05:7022:c84:b0:15d:fb47:4268 with SMTP id a92af1059eb24-1b5568c9b56mr40983056c88.21.1796318198534; Thu, 03 Dec 2026 09:16:38 -0800 (PST) Date: Thu, 3 Dec 2026 09:15:46 -0800 In-Reply-To: <20261203171549.438355-1-irogers@google.com> X-Mailing-List: linux-staging@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Mime-Version: 1.0 References: <20261203171549.438355-1-irogers@google.com> X-Mailer: git-send-email 2.56.1.911.g883d8bcb20-goog Message-ID: <20261203171549.438355-5-irogers@google.com> Subject: [PATCH 4/5] staging: media: ipu3: Set .owner = THIS_MODULE in v4l2_file_operations From: Ian Rogers To: Mauro Carvalho Chehab , Hans Verkuil , Sakari Ailus , Laurent Pinchart Cc: Nathan Chancellor , linux-media@vger.kernel.org, llvm@lists.linux.dev, linux-kernel@vger.kernel.org, Ian Rogers , Greg Kroah-Hartman , Yong Zhi , linux-staging@lists.linux.dev Content-Type: text/plain; charset="UTF-8" video_register_device() passes vdev->fops->owner to __video_register_device(), which sets vdev->cdev->owner = owner so chrdev_open() pins the V4L2 driver module while the device node is open. When .owner is omitted in a const struct v4l2_file_operations, vdev->cdev->owner is NULL and the driver module is not reference counted on open(). Set .owner = THIS_MODULE in imgu_v4l2_fops, found with Clang's require_explicit_initialization attribute. Fixes: a0ca1627b450 ("media: staging/intel-ipu3: Add v4l2 driver based on media framework") Signed-off-by: Ian Rogers --- drivers/staging/media/ipu3/ipu3-v4l2.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/media/ipu3/ipu3-v4l2.c b/drivers/staging/media/ipu3/ipu3-v4l2.c index 61fdefe78c3d..12b808c2bf7e 100644 --- a/drivers/staging/media/ipu3/ipu3-v4l2.c +++ b/drivers/staging/media/ipu3/ipu3-v4l2.c @@ -951,6 +951,7 @@ static const struct v4l2_file_operations imgu_v4l2_fops = { .release = vb2_fop_release, .poll = vb2_fop_poll, .mmap = vb2_fop_mmap, + .owner = THIS_MODULE, }; /******************** v4l2_ioctl_ops ********************/ -- 2.56.1.839.g22a8290db9-goog