ID Workflow Result Correct Bug Created Started Finished Revision
90329101 repro-c Reproduced: ✅ ❓ general protection fault in subdev_open 2026/08/07 13:50 2026/08/07 15:42 2026/08/07 16:49 e4ef95d6
Agent: prod-syz-agent-0
External Bug ID: ---

Inputs:
BaseBranch master
BaseCommit RC
BaseRepository git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
BugTitle general protection fault in subdev_open
CrashLogID 6259312353083392
CrashReportID 5156695682056192
KernelCommit 0d839570765118029aa8bf4a95444c6a11aacf85
KernelConfig
Show (280109 bytes)
#
# Automatically generated file; DO NOT EDIT.
# Linux/x86_64 syzkaller Kernel Configuration
#
CONFIG_CC_VERSION_TEXT="gcc (Debian 14.2.0-19) 14.2.0"
CONFIG_CC_IS_GCC=y
CONFIG_GCC_VERSION=140200
CONFIG_CLANG_VERSION=0
CONFIG_AS_IS_GNU=y
CONFIG_AS_VERSION=24400
CONFIG_LD_IS_BFD=y
CONFIG_LD_VERSION=24400
CONFIG_LLD_VERSION=0
CONFIG_RUSTC_VERSION=109600
CONFIG_RUST_IS_AVAILABLE=y
CONFIG_RUSTC_LLVM_VERSION=220102
CONFIG_RUSTC_LLVM_MAJOR_VERSION=22
CONFIG_CC_CAN_LINK=y
CONFIG_CC_HAS_ASM_GOTO_OUTPUT=y
CONFIG_CC_HAS_ASM_GOTO_TIED_OUTPUT=y
CONFIG_TOOLS_SUPPORT_RELR=y
CONFIG_CC_HAS_ASM_INLINE=y
CONFIG_CC_HAS_ASSUME=y
CONFIG_CC_HAS_NO_PROFILE_FN_ATTR=y
CONFIG_LD_CAN_USE_KEEP_IN_OVERLAY=y
CONFIG_RUSTC_HAS_SPAN_FILE=y
CONFIG_RUSTC_HAS_UNNECESSARY_TRANSMUTES=y
CONFIG_RUSTC_HAS_FILE_WITH_NUL=y
CONFIG_RUSTC_HAS_FILE_AS_C_STR=y
CONFIG_PAHOLE_VERSION=130
CONFIG_CONSTRUCTORS=y
CONFIG_IRQ_WORK=y
CONFIG_BUILDTIME_TABLE_SORT=y
CONFIG_THREAD_INFO_IN_TASK=y

#
# General setup
#
CONFIG_INIT_ENV_ARG_LIMIT=32
# CONFIG_COMPILE_TEST is not set
# CONFIG_WERROR is not set
CONFIG_LOCALVERSION=""
CONFIG_LOCALVERSION_AUTO=y
CONFIG_BUILD_SALT=""
CONFIG_HAVE_KERNEL_GZIP=y
CONFIG_HAVE_KERNEL_BZIP2=y
CONFIG_HAVE_KERNEL_LZMA=y
CONFIG_HAVE_KERNEL_XZ=y
CONFIG_HAVE_KERNEL_LZO=y
CONFIG_HAVE_KERNEL_LZ4=y
CONFIG_HAVE_KERNEL_ZSTD=y
CONFIG_KERNEL_GZIP=y
# CONFIG_KERNEL_BZIP2 is not set
# CONFIG_KERNEL_LZMA is not set
# CONFIG_KERNEL_XZ is not set
# CONFIG_KERNEL_LZO is not set
# CONFIG_KERNEL_LZ4 is not set
# CONFIG_KERNEL_ZSTD is not set
CONFIG_DEFAULT_INIT=""
CONFIG_DEFAULT_HOSTNAME="(none)"
CONFIG_SYSVIPC=y
CONFIG_SYSVIPC_SYSCTL=y
CONFIG_SYSVIPC_COMPAT=y
CONFIG_POSIX_MQUEUE=y
CONFIG_POSIX_MQUEUE_SYSCTL=y
CONFIG_WATCH_QUEUE=y
CONFIG_CROSS_MEMORY_ATTACH=y
CONFIG_AUDIT=y
CONFIG_HAVE_ARCH_AUDITSYSCALL=y
CONFIG_AUDITSYSCALL=y

#
# IRQ subsystem
#
CONFIG_GENERIC_IRQ_PROBE=y
CONFIG_GENERIC_IRQ_SHOW=y
CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y
CONFIG_GENERIC_PENDING_IRQ=y
CONFIG_GENERIC_IRQ_MIGRATION=y
CONFIG_HARDIRQS_SW_RESEND=y
CONFIG_IRQ_DOMAIN=y
CONFIG_IRQ_DOMAIN_HIERARCHY=y
CONFIG_GENERIC_MSI_IRQ=y
CONFIG_GENERIC_IRQ_MATRIX_ALLOCATOR=y
CONFIG_GENERIC_IRQ_RESERVATION_MODE=y
CONFIG_IRQ_FORCED_THREADING=y
CONFIG_SPARSE_IRQ=y
# CONFIG_GENERIC_IRQ_DEBUGFS is not set
# end of IRQ subsystem

CONFIG_CLOCKSOURCE_WATCHDOG=y
CONFIG_ARCH_CLOCKSOURCE_INIT=y
CONFIG_ARCH_WANTS_CLOCKSOURCE_READ_INLINE=y
CONFIG_GENERIC_CLOCKEVENTS=y
CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y
CONFIG_GENERIC_CLOCKEVENTS_BROADCAST_IDLE=y
CONFIG_GENERIC_CLOCKEVENTS_MIN_ADJUST=y
CONFIG_GENERIC_CLOCKEVENTS_COUPLED=y
CONFIG_GENERIC_CLOCKEVENTS_COUPLED_INLINE=y
CONFIG_GENERIC_CMOS_UPDATE=y
CONFIG_HRTIMER_REARM_DEFERRED=y
CONFIG_HAVE_POSIX_CPU_TIMERS_TASK_WORK=y
CONFIG_POSIX_CPU_TIMERS_TASK_WORK=y
CONFIG_CONTEXT_TRACKING=y
CONFIG_CONTEXT_TRACKING_IDLE=y

#
# Timers subsystem
#
CONFIG_TICK_ONESHOT=y
CONFIG_NO_HZ_COMMON=y
# CONFIG_HZ_PERIODIC is not set
CONFIG_NO_HZ_IDLE=y
# CONFIG_NO_HZ_FULL is not set
CONFIG_CONTEXT_TRACKING_USER=y
# CONFIG_CONTEXT_TRACKING_USER_FORCE is not set
CONFIG_NO_HZ=y
CONFIG_HIGH_RES_TIMERS=y
CONFIG_POSIX_AUX_CLOCKS=y
# end of Timers subsystem

CONFIG_BPF=y
CONFIG_HAVE_EBPF_JIT=y
CONFIG_ARCH_WANT_DEFAULT_BPF_JIT=y

#
# BPF subsystem
#
CONFIG_BPF_SYSCALL=y
CONFIG_BPF_JIT=y
# CONFIG_BPF_JIT_ALWAYS_ON is not set
CONFIG_BPF_JIT_DEFAULT_ON=y
# CONFIG_BPF_UNPRIV_DEFAULT_OFF is not set
CONFIG_BPF_PRELOAD=y
CONFIG_BPF_PRELOAD_UMD=y
CONFIG_BPF_LSM=y
# end of BPF subsystem

CONFIG_PREEMPT_BUILD=y
CONFIG_ARCH_HAS_PREEMPT_LAZY=y
CONFIG_PREEMPT=y
# CONFIG_PREEMPT_LAZY is not set
# CONFIG_PREEMPT_RT is not set
CONFIG_PREEMPT_COUNT=y
CONFIG_PREEMPTION=y
CONFIG_PREEMPT_DYNAMIC=y
CONFIG_SCHED_CORE=y

#
# CPU/Task time and stats accounting
#
CONFIG_VIRT_CPU_ACCOUNTING=y
# CONFIG_TICK_CPU_ACCOUNTING is not set
CONFIG_VIRT_CPU_ACCOUNTING_GEN=y
CONFIG_IRQ_TIME_ACCOUNTING=y
CONFIG_HAVE_SCHED_AVG_IRQ=y
CONFIG_BSD_PROCESS_ACCT=y
CONFIG_BSD_PROCESS_ACCT_V3=y
CONFIG_TASKSTATS=y
CONFIG_TASK_DELAY_ACCT=y
CONFIG_TASK_XACCT=y
CONFIG_TASK_IO_ACCOUNTING=y
CONFIG_PSI=y
# CONFIG_PSI_DEFAULT_DISABLED is not set
# end of CPU/Task time and stats accounting

CONFIG_CPU_ISOLATION=y

#
# RCU Subsystem
#
CONFIG_TREE_RCU=y
CONFIG_PREEMPT_RCU=y
# CONFIG_RCU_EXPERT is not set
CONFIG_TREE_SRCU=y
CONFIG_TASKS_RCU_GENERIC=y
CONFIG_NEED_TASKS_RCU=y
CONFIG_TASKS_RCU=y
CONFIG_TASKS_TRACE_RCU=y
CONFIG_RCU_STALL_COMMON=y
CONFIG_RCU_NEED_SEGCBLIST=y
# end of RCU Subsystem

CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
# CONFIG_IKHEADERS is not set
CONFIG_LOG_BUF_SHIFT=18
CONFIG_LOG_CPU_MAX_BUF_SHIFT=12
# CONFIG_PRINTK_INDEX is not set
CONFIG_HAVE_UNSTABLE_SCHED_CLOCK=y

#
# Scheduler features
#
# CONFIG_UCLAMP_TASK is not set
# CONFIG_SCHED_PROXY_EXEC is not set
# end of Scheduler features

CONFIG_ARCH_SUPPORTS_NUMA_BALANCING=y
CONFIG_ARCH_WANT_BATCHED_UNMAP_TLB_FLUSH=y
CONFIG_CC_HAS_INT128=y
CONFIG_CC_IMPLICIT_FALLTHROUGH="-Wimplicit-fallthrough=5"
CONFIG_CC_MS_EXTENSIONS="-fms-extensions"
CONFIG_GCC10_NO_ARRAY_BOUNDS=y
CONFIG_CC_NO_ARRAY_BOUNDS=y
CONFIG_GCC_NO_STRINGOP_OVERFLOW=y
CONFIG_CC_NO_STRINGOP_OVERFLOW=y
CONFIG_ARCH_SUPPORTS_INT128=y
CONFIG_NUMA_BALANCING=y
CONFIG_SCHED_CACHE=y
CONFIG_NUMA_BALANCING_DEFAULT_ENABLED=y
CONFIG_SLAB_OBJ_EXT=y
CONFIG_CGROUPS=y
CONFIG_PAGE_COUNTER=y
# CONFIG_CGROUP_FAVOR_DYNMODS is not set
CONFIG_MEMCG=y
CONFIG_MEMCG_V1=y
CONFIG_BLK_CGROUP=y
CONFIG_CGROUP_WRITEBACK=y
CONFIG_CGROUP_SCHED=y
CONFIG_GROUP_SCHED_WEIGHT=y
CONFIG_GROUP_SCHED_BANDWIDTH=y
CONFIG_FAIR_GROUP_SCHED=y
CONFIG_CFS_BANDWIDTH=y
# CONFIG_RT_GROUP_SCHED is not set
CONFIG_SCHED_MM_CID=y
CONFIG_CGROUP_PIDS=y
CONFIG_CGROUP_RDMA=y
# CONFIG_CGROUP_DMEM is not set
CONFIG_CGROUP_FREEZER=y
CONFIG_CGROUP_HUGETLB=y
CONFIG_CPUSETS=y
# CONFIG_CPUSETS_V1 is not set
CONFIG_CGROUP_DEVICE=y
CONFIG_CGROUP_CPUACCT=y
CONFIG_CGROUP_PERF=y
# CONFIG_CGROUP_BPF is not set
CONFIG_CGROUP_MISC=y
CONFIG_CGROUP_DEBUG=y
CONFIG_SOCK_CGROUP_DATA=y
CONFIG_NAMESPACES=y
CONFIG_UTS_NS=y
CONFIG_TIME_NS=y
CONFIG_TIME_NS_VDSO=y
CONFIG_IPC_NS=y
CONFIG_USER_NS=y
CONFIG_PID_NS=y
CONFIG_NET_NS=y
CONFIG_CHECKPOINT_RESTORE=y
# CONFIG_SCHED_AUTOGROUP is not set
CONFIG_RELAY=y
CONFIG_BLK_DEV_INITRD=y
CONFIG_INITRAMFS_SOURCE=""
CONFIG_RD_GZIP=y
CONFIG_RD_BZIP2=y
CONFIG_RD_LZMA=y
CONFIG_RD_XZ=y
CONFIG_RD_LZO=y
CONFIG_RD_LZ4=y
CONFIG_RD_ZSTD=y
# CONFIG_BOOT_CONFIG is not set
CONFIG_CMDLINE_LOG_WRAP_IDEAL_LEN=1021
CONFIG_INITRAMFS_PRESERVE_MTIME=y
CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE=y
# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
CONFIG_LD_ORPHAN_WARN=y
CONFIG_LD_ORPHAN_WARN_LEVEL="warn"
CONFIG_SYSCTL=y
CONFIG_HAVE_UID16=y
CONFIG_SYSCTL_EXCEPTION_TRACE=y
CONFIG_SYSFS_SYSCALL=y
CONFIG_HAVE_PCSPKR_PLATFORM=y
CONFIG_EXPERT=y
CONFIG_UID16=y
CONFIG_MULTIUSER=y
CONFIG_SGETMASK_SYSCALL=y
CONFIG_FHANDLE=y
CONFIG_POSIX_TIMERS=y
CONFIG_PRINTK=y
CONFIG_BUG=y
CONFIG_ELF_CORE=y
CONFIG_PCSPKR_PLATFORM=y
# CONFIG_BASE_SMALL is not set
CONFIG_FUTEX=y
CONFIG_FUTEX_PI=y
CONFIG_FUTEX_PRIVATE_HASH=y
CONFIG_FUTEX_MPOL=y
CONFIG_HAVE_FUTEX_ROBUST_UNLOCK=y
CONFIG_FUTEX_ROBUST_UNLOCK=y
CONFIG_EPOLL=y
CONFIG_SIGNALFD=y
CONFIG_TIMERFD=y
CONFIG_EVENTFD=y
CONFIG_SHMEM=y
CONFIG_AIO=y
CONFIG_IO_URING=y
CONFIG_IO_URING_MOCK_FILE=y
CONFIG_ADVISE_SYSCALLS=y
CONFIG_MEMBARRIER=y
CONFIG_KCMP=y
CONFIG_RSEQ=y
CONFIG_RSEQ_SLICE_EXTENSION=y
# CONFIG_RSEQ_STATS is not set
# CONFIG_RSEQ_DEBUG_DEFAULT_ENABLE is not set
CONFIG_CACHESTAT_SYSCALL=y
CONFIG_KALLSYMS=y
# CONFIG_KALLSYMS_SELFTEST is not set
CONFIG_KALLSYMS_ALL=y
CONFIG_ARCH_HAS_MEMBARRIER_SYNC_CORE=y
CONFIG_ARCH_SUPPORTS_MSEAL_SYSTEM_MAPPINGS=y
CONFIG_HAVE_PERF_EVENTS=y
CONFIG_GUEST_PERF_EVENTS=y
CONFIG_PERF_GUEST_MEDIATED_PMU=y

#
# Kernel Performance Events And Counters
#
CONFIG_PERF_EVENTS=y
# CONFIG_DEBUG_PERF_USE_VMALLOC is not set
# end of Kernel Performance Events And Counters

CONFIG_SYSTEM_DATA_VERIFICATION=y
CONFIG_PROFILING=y
CONFIG_TRACEPOINTS=y

#
# Kexec and crash features
#
CONFIG_CRASH_RESERVE=y
CONFIG_VMCORE_INFO=y
CONFIG_KEXEC_CORE=y
CONFIG_KEXEC=y
# CONFIG_KEXEC_FILE is not set
# CONFIG_KEXEC_JUMP is not set
CONFIG_CRASH_DUMP=y
CONFIG_CRASH_HOTPLUG=y
CONFIG_CRASH_MAX_MEMORY_RANGES=8192
# end of Kexec and crash features

#
# Live Update and Kexec HandOver
#
# CONFIG_KEXEC_HANDOVER is not set
# end of Live Update and Kexec HandOver
# end of General setup

CONFIG_64BIT=y
CONFIG_X86_64=y
CONFIG_X86=y
CONFIG_INSTRUCTION_DECODER=y
CONFIG_OUTPUT_FORMAT="elf64-x86-64"
CONFIG_LOCKDEP_SUPPORT=y
CONFIG_STACKTRACE_SUPPORT=y
CONFIG_MMU=y
CONFIG_ARCH_MMAP_RND_BITS_MIN=28
CONFIG_ARCH_MMAP_RND_BITS_MAX=32
CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MIN=8
CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MAX=16
CONFIG_GENERIC_ISA_DMA=y
CONFIG_GENERIC_CSUM=y
CONFIG_GENERIC_BUG=y
CONFIG_GENERIC_BUG_RELATIVE_POINTERS=y
CONFIG_ARCH_MAY_HAVE_PC_FDC=y
CONFIG_GENERIC_CALIBRATE_DELAY=y
CONFIG_ARCH_HAS_CPU_RELAX=y
CONFIG_ARCH_HIBERNATION_POSSIBLE=y
CONFIG_ARCH_SUSPEND_POSSIBLE=y
CONFIG_AUDIT_ARCH=y
CONFIG_KASAN_SHADOW_OFFSET=0xdffffc0000000000
CONFIG_HAVE_INTEL_TXT=y
CONFIG_ARCH_SUPPORTS_UPROBES=y
CONFIG_FIX_EARLYCON_MEM=y
CONFIG_PGTABLE_LEVELS=5

#
# Processor type and features
#
CONFIG_SMP=y
CONFIG_X86_X2APIC=y
# CONFIG_X86_POSTED_MSI is not set
CONFIG_X86_MPPARSE=y
# CONFIG_X86_CPU_RESCTRL is not set
CONFIG_X86_FRED=y
CONFIG_X86_EXTENDED_PLATFORM=y
# CONFIG_X86_NUMACHIP is not set
# CONFIG_X86_VSMP is not set
# CONFIG_X86_INTEL_MID is not set
# CONFIG_X86_GOLDFISH is not set
# CONFIG_X86_INTEL_LPSS is not set
# CONFIG_X86_AMD_PLATFORM_DEVICE is not set
CONFIG_IOSF_MBI=y
# CONFIG_IOSF_MBI_DEBUG is not set
CONFIG_X86_SUPPORTS_MEMORY_FAILURE=y
CONFIG_SCHED_OMIT_FRAME_POINTER=y
CONFIG_HYPERVISOR_GUEST=y
CONFIG_PARAVIRT=y
CONFIG_PARAVIRT_SPINLOCKS=y
CONFIG_X86_HV_CALLBACK_VECTOR=y
# CONFIG_XEN is not set
CONFIG_KVM_GUEST=y
CONFIG_ARCH_CPUIDLE_HALTPOLL=y
CONFIG_PVH=y
# CONFIG_PARAVIRT_TIME_ACCOUNTING is not set
CONFIG_PARAVIRT_CLOCK=y
# CONFIG_JAILHOUSE_GUEST is not set
# CONFIG_ACRN_GUEST is not set
# CONFIG_BHYVE_GUEST is not set
CONFIG_CC_HAS_MARCH_NATIVE=y
# CONFIG_X86_NATIVE_CPU is not set
CONFIG_X86_INTERNODE_CACHE_SHIFT=6
CONFIG_X86_L1_CACHE_SHIFT=6
CONFIG_X86_TSC=y
CONFIG_X86_HAVE_PAE=y
CONFIG_X86_CX8=y
CONFIG_X86_CMOV=y
CONFIG_X86_MINIMUM_CPU_FAMILY=64
CONFIG_X86_DEBUGCTLMSR=y
CONFIG_IA32_FEAT_CTL=y
CONFIG_X86_VMX_FEATURE_NAMES=y
CONFIG_PROCESSOR_SELECT=y
CONFIG_CPU_SUP_INTEL=y
CONFIG_CPU_SUP_AMD=y
# CONFIG_CPU_SUP_HYGON is not set
# CONFIG_CPU_SUP_CENTAUR is not set
# CONFIG_CPU_SUP_ZHAOXIN is not set
CONFIG_BROADCAST_TLB_FLUSH=y
CONFIG_HPET_TIMER=y
CONFIG_HPET_EMULATE_RTC=y
CONFIG_DMI=y
# CONFIG_GART_IOMMU is not set
CONFIG_BOOT_VESA_SUPPORT=y
# CONFIG_MAXSMP is not set
CONFIG_NR_CPUS_RANGE_BEGIN=2
CONFIG_NR_CPUS_RANGE_END=512
CONFIG_NR_CPUS_DEFAULT=64
CONFIG_NR_CPUS=8
CONFIG_SCHED_MC_PRIO=y
CONFIG_X86_LOCAL_APIC=y
CONFIG_ACPI_MADT_WAKEUP=y
CONFIG_X86_IO_APIC=y
CONFIG_X86_REROUTE_FOR_BROKEN_BOOT_IRQS=y
CONFIG_X86_MCE=y
# CONFIG_X86_MCELOG_LEGACY is not set
CONFIG_X86_MCE_INTEL=y
CONFIG_X86_MCE_AMD=y
CONFIG_X86_MCE_THRESHOLD=y
# CONFIG_X86_MCE_INJECT is not set

#
# Performance monitoring
#
CONFIG_PERF_EVENTS_INTEL_UNCORE=y
CONFIG_PERF_EVENTS_INTEL_RAPL=y
CONFIG_PERF_EVENTS_INTEL_CSTATE=y
# CONFIG_PERF_EVENTS_AMD_POWER is not set
CONFIG_PERF_EVENTS_AMD_UNCORE=y
# CONFIG_PERF_EVENTS_AMD_BRS is not set
# end of Performance monitoring

CONFIG_X86_16BIT=y
CONFIG_X86_ESPFIX64=y
CONFIG_X86_VSYSCALL_EMULATION=y
CONFIG_X86_IOPL_IOPERM=y
CONFIG_MICROCODE=y
# CONFIG_MICROCODE_LATE_LOADING is not set
# CONFIG_MICROCODE_DBG is not set
CONFIG_X86_MSR=y
CONFIG_X86_CPUID=y
CONFIG_X86_DIRECT_GBPAGES=y
# CONFIG_X86_CPA_STATISTICS is not set
CONFIG_NUMA=y
CONFIG_AMD_NUMA=y
CONFIG_X86_64_ACPI_NUMA=y
CONFIG_NODES_SHIFT=6
CONFIG_ARCH_SPARSEMEM_ENABLE=y
CONFIG_ARCH_SPARSEMEM_DEFAULT=y
# CONFIG_ARCH_MEMORY_PROBE is not set
CONFIG_ARCH_PROC_KCORE_TEXT=y
CONFIG_ILLEGAL_POINTER_VALUE=0xdead000000000000
# CONFIG_X86_PMEM_LEGACY is not set
# CONFIG_X86_CHECK_BIOS_CORRUPTION is not set
CONFIG_MTRR=y
# CONFIG_MTRR_SANITIZER is not set
CONFIG_X86_PAT=y
CONFIG_X86_UMIP=y
CONFIG_CC_HAS_IBT=y
CONFIG_X86_CET=y
CONFIG_X86_KERNEL_IBT=y
CONFIG_X86_INTEL_MEMORY_PROTECTION_KEYS=y
CONFIG_ARCH_PKEY_BITS=4
# CONFIG_X86_INTEL_TSX_MODE_OFF is not set
CONFIG_X86_INTEL_TSX_MODE_ON=y
# CONFIG_X86_INTEL_TSX_MODE_AUTO is not set
CONFIG_X86_SGX=y
CONFIG_X86_USER_SHADOW_STACK=y
# CONFIG_INTEL_TDX_HOST is not set
# CONFIG_EFI is not set
CONFIG_HZ_100=y
# CONFIG_HZ_250 is not set
# CONFIG_HZ_300 is not set
# CONFIG_HZ_1000 is not set
CONFIG_HZ=100
CONFIG_SCHED_HRTICK=y
CONFIG_ARCH_SUPPORTS_KEXEC=y
CONFIG_ARCH_SUPPORTS_KEXEC_FILE=y
CONFIG_ARCH_SUPPORTS_KEXEC_PURGATORY=y
CONFIG_ARCH_SUPPORTS_KEXEC_SIG=y
CONFIG_ARCH_SUPPORTS_KEXEC_SIG_FORCE=y
CONFIG_ARCH_SUPPORTS_KEXEC_BZIMAGE_VERIFY_SIG=y
CONFIG_ARCH_SUPPORTS_KEXEC_JUMP=y
CONFIG_ARCH_SUPPORTS_KEXEC_HANDOVER=y
CONFIG_ARCH_SUPPORTS_CRASH_DUMP=y
CONFIG_ARCH_DEFAULT_CRASH_DUMP=y
CONFIG_ARCH_SUPPORTS_CRASH_HOTPLUG=y
CONFIG_ARCH_HAS_GENERIC_CRASHKERNEL_RESERVATION=y
CONFIG_PHYSICAL_START=0x1000000
# CONFIG_RELOCATABLE is not set
CONFIG_PHYSICAL_ALIGN=0x200000
CONFIG_HOTPLUG_CPU=y
# CONFIG_COMPAT_VDSO is not set
CONFIG_LEGACY_VSYSCALL_XONLY=y
# CONFIG_LEGACY_VSYSCALL_NONE is not set
CONFIG_CMDLINE_BOOL=y
CONFIG_CMDLINE="earlyprintk=serial net.ifnames=0 sysctl.kernel.hung_task_all_cpu_backtrace=1 ima_policy=tcb nf-conntrack-ftp.ports=20000 nf-conntrack-tftp.ports=20000 nf-conntrack-sip.ports=20000 nf-conntrack-irc.ports=20000 nf-conntrack-sane.ports=20000 binder.debug_mask=0 rcupdate.rcu_expedited=1 rcupdate.rcu_cpu_stall_cputime=1 no_hash_pointers page_owner=on sysctl.vm.nr_hugepages=4 sysctl.vm.nr_overcommit_hugepages=4 secretmem.enable=1 sysctl.max_rcu_stall_to_panic=1 msr.allow_writes=off coredump_filter=0xffff root=/dev/sda console=ttyS0 vsyscall=native numa=fake=2 kvm-intel.nested=1 spec_store_bypass_disable=prctl nopcid vivid.n_devs=64 vivid.multiplanar=1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2 netrom.nr_ndevs=32 rose.rose_ndevs=32 smp.csd_lock_timeout=100000 watchdog_thresh=55 workqueue.watchdog_thresh=140 sysctl.net.core.netdev_unregister_timeout_secs=140 dummy_hcd.num=32 max_loop=32 nbds_max=32 comedi.comedi_num_legacy_minors=4 panic_on_warn=1"
# CONFIG_CMDLINE_OVERRIDE is not set
CONFIG_MODIFY_LDT_SYSCALL=y
# CONFIG_STRICT_SIGALTSTACK_SIZE is not set
CONFIG_HAVE_LIVEPATCH=y
CONFIG_HAVE_KLP_BUILD=y
CONFIG_X86_BUS_LOCK_DETECT=y
# end of Processor type and features

CONFIG_CC_HAS_NAMED_AS=y
CONFIG_CC_HAS_NAMED_AS_FIXED_SANITIZERS=y
CONFIG_USE_X86_SEG_SUPPORT=y
CONFIG_CC_HAS_SLS=y
CONFIG_CC_HAS_RETURN_THUNK=y
CONFIG_CC_HAS_ENTRY_PADDING=y
CONFIG_FUNCTION_PADDING_CFI=11
CONFIG_FUNCTION_PADDING_BYTES=16
CONFIG_CALL_PADDING=y
CONFIG_HAVE_CALL_THUNKS=y
CONFIG_CALL_THUNKS=y
CONFIG_CPU_MITIGATIONS=y
CONFIG_MITIGATION_PAGE_TABLE_ISOLATION=y
CONFIG_MITIGATION_RETPOLINE=y
CONFIG_MITIGATION_RETHUNK=y
CONFIG_MITIGATION_UNRET_ENTRY=y
CONFIG_MITIGATION_CALL_DEPTH_TRACKING=y
# CONFIG_CALL_THUNKS_DEBUG is not set
CONFIG_MITIGATION_IBPB_ENTRY=y
CONFIG_MITIGATION_IBRS_ENTRY=y
CONFIG_MITIGATION_SRSO=y
# CONFIG_MITIGATION_SLS is not set
CONFIG_MITIGATION_GDS=y
CONFIG_MITIGATION_RFDS=y
CONFIG_MITIGATION_SPECTRE_BHI=y
CONFIG_MITIGATION_MDS=y
CONFIG_MITIGATION_TAA=y
CONFIG_MITIGATION_MMIO_STALE_DATA=y
CONFIG_MITIGATION_L1TF=y
CONFIG_MITIGATION_RETBLEED=y
CONFIG_MITIGATION_SPECTRE_V1=y
CONFIG_MITIGATION_SPECTRE_V2=y
CONFIG_MITIGATION_SRBDS=y
CONFIG_MITIGATION_SSB=y
CONFIG_MITIGATION_ITS=y
CONFIG_MITIGATION_TSA=y
# CONFIG_MITIGATION_VMSCAPE is not set
CONFIG_ARCH_HAS_ADD_PAGES=y

#
# Power management and ACPI options
#
CONFIG_ARCH_HIBERNATION_HEADER=y
CONFIG_SUSPEND=y
CONFIG_SUSPEND_FREEZER=y
# CONFIG_SUSPEND_SKIP_SYNC is not set
CONFIG_HIBERNATE_CALLBACKS=y
CONFIG_HIBERNATION=y
CONFIG_HIBERNATION_SNAPSHOT_DEV=y
CONFIG_HIBERNATION_COMP_LZO=y
# CONFIG_HIBERNATION_COMP_LZ4 is not set
CONFIG_HIBERNATION_DEF_COMP="lzo"
CONFIG_PM_STD_PARTITION=""
CONFIG_PM_SLEEP=y
CONFIG_PM_SLEEP_SMP=y
# CONFIG_PM_AUTOSLEEP is not set
# CONFIG_PM_USERSPACE_AUTOSLEEP is not set
# CONFIG_PM_WAKELOCKS is not set
# CONFIG_PM_QOS_CPU_SYSTEM_WAKEUP is not set
CONFIG_PM=y
CONFIG_PM_DEBUG=y
# CONFIG_PM_ADVANCED_DEBUG is not set
# CONFIG_PM_TEST_SUSPEND is not set
CONFIG_PM_SLEEP_DEBUG=y
# CONFIG_DPM_WATCHDOG is not set
CONFIG_PM_TRACE=y
CONFIG_PM_TRACE_RTC=y
CONFIG_PM_CLK=y
# CONFIG_WQ_POWER_EFFICIENT_DEFAULT is not set
# CONFIG_ENERGY_MODEL is not set
CONFIG_ARCH_SUPPORTS_ACPI=y
CONFIG_ACPI=y
CONFIG_ACPI_LEGACY_TABLES_LOOKUP=y
CONFIG_ARCH_MIGHT_HAVE_ACPI_PDC=y
CONFIG_ACPI_SYSTEM_POWER_STATES_SUPPORT=y
CONFIG_ACPI_THERMAL_LIB=y
# CONFIG_ACPI_DEBUGGER is not set
CONFIG_ACPI_SPCR_TABLE=y
# CONFIG_ACPI_FPDT is not set
CONFIG_ACPI_LPIT=y
CONFIG_ACPI_SLEEP=y
CONFIG_ACPI_REV_OVERRIDE_POSSIBLE=y
CONFIG_ACPI_EC=y
# CONFIG_ACPI_EC_DEBUGFS is not set
CONFIG_ACPI_AC=y
CONFIG_ACPI_BATTERY=y
CONFIG_ACPI_BUTTON=y
CONFIG_ACPI_VIDEO=y
CONFIG_ACPI_FAN=y
# CONFIG_ACPI_TAD is not set
CONFIG_ACPI_DOCK=y
CONFIG_ACPI_CPU_FREQ_PSS=y
CONFIG_ACPI_PROCESSOR_CSTATE=y
CONFIG_ACPI_PROCESSOR_IDLE=y
CONFIG_ACPI_CPPC_LIB=y
CONFIG_ACPI_PROCESSOR=y
CONFIG_ACPI_HOTPLUG_CPU=y
# CONFIG_ACPI_PROCESSOR_AGGREGATOR is not set
CONFIG_ACPI_THERMAL=y
CONFIG_ACPI_PLATFORM_PROFILE=y
CONFIG_ARCH_HAS_ACPI_TABLE_UPGRADE=y
CONFIG_ACPI_TABLE_UPGRADE=y
CONFIG_ACPI_DEBUG=y
# CONFIG_ACPI_PCI_SLOT is not set
CONFIG_ACPI_CONTAINER=y
# CONFIG_ACPI_HOTPLUG_MEMORY is not set
CONFIG_ACPI_HOTPLUG_IOAPIC=y
# CONFIG_ACPI_SBS is not set
# CONFIG_ACPI_HED is not set
# CONFIG_ACPI_REDUCED_HARDWARE_ONLY is not set
CONFIG_ACPI_NHLT=y
CONFIG_ACPI_NFIT=y
# CONFIG_NFIT_SECURITY_DEBUG is not set
CONFIG_ACPI_NUMA=y
# CONFIG_ACPI_HMAT is not set
CONFIG_HAVE_ACPI_APEI=y
CONFIG_HAVE_ACPI_APEI_NMI=y
# CONFIG_ACPI_APEI is not set
# CONFIG_ACPI_DPTF is not set
# CONFIG_ACPI_EXTLOG is not set
# CONFIG_ACPI_CONFIGFS is not set
# CONFIG_ACPI_PFRUT is not set
CONFIG_ACPI_PCC=y
# CONFIG_ACPI_FFH is not set
CONFIG_ACPI_MRRM=y
CONFIG_PMIC_OPREGION=y
CONFIG_BXT_WC_PMIC_OPREGION=y
# CONFIG_CHT_WC_PMIC_OPREGION is not set
CONFIG_X86_PM_TIMER=y

#
# CPU Frequency scaling
#
CONFIG_CPU_FREQ=y
CONFIG_CPU_FREQ_GOV_ATTR_SET=y
CONFIG_CPU_FREQ_GOV_COMMON=y
# CONFIG_CPU_FREQ_STAT is not set
# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set
# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set
CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y
# CONFIG_CPU_FREQ_DEFAULT_GOV_SCHEDUTIL is not set
CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
# CONFIG_CPU_FREQ_GOV_POWERSAVE is not set
CONFIG_CPU_FREQ_GOV_USERSPACE=y
CONFIG_CPU_FREQ_GOV_ONDEMAND=y
# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set
CONFIG_CPU_FREQ_GOV_SCHEDUTIL=y

#
# CPU frequency scaling drivers
#
# CONFIG_CPUFREQ_DT is not set
# CONFIG_CPUFREQ_DT_PLATDEV is not set
CONFIG_X86_INTEL_PSTATE=y
# CONFIG_X86_PCC_CPUFREQ is not set
CONFIG_X86_AMD_PSTATE=y
CONFIG_X86_AMD_PSTATE_DEFAULT_MODE=3
# CONFIG_X86_AMD_PSTATE_UT is not set
CONFIG_X86_ACPI_CPUFREQ=y
CONFIG_X86_ACPI_CPUFREQ_CPB=y
# CONFIG_X86_POWERNOW_K8 is not set
# CONFIG_X86_AMD_FREQ_SENSITIVITY is not set
# CONFIG_X86_SPEEDSTEP_CENTRINO is not set
# CONFIG_X86_P4_CLOCKMOD is not set

#
# shared options
#
CONFIG_CPUFREQ_ARCH_CUR_FREQ=y
# end of CPU Frequency scaling

#
# CPU Idle
#
CONFIG_CPU_IDLE=y
# CONFIG_CPU_IDLE_GOV_LADDER is not set
CONFIG_CPU_IDLE_GOV_MENU=y
# CONFIG_CPU_IDLE_GOV_TEO is not set
CONFIG_CPU_IDLE_GOV_HALTPOLL=y
CONFIG_HALTPOLL_CPUIDLE=y
# end of CPU Idle

CONFIG_INTEL_IDLE=y
# end of Power management and ACPI options

#
# Bus options (PCI etc.)
#
CONFIG_PCI_DIRECT=y
CONFIG_PCI_MMCONFIG=y
CONFIG_MMCONF_FAM10H=y
CONFIG_ISA_BUS=y
CONFIG_ISA_DMA_API=y
CONFIG_AMD_NB=y
CONFIG_AMD_NODE=y
# end of Bus options (PCI etc.)

#
# Binary Emulations
#
CONFIG_IA32_EMULATION=y
# CONFIG_IA32_EMULATION_DEFAULT_DISABLED is not set
CONFIG_X86_X32_ABI=y
CONFIG_COMPAT_32=y
CONFIG_COMPAT=y
CONFIG_COMPAT_FOR_U64_ALIGNMENT=y
# end of Binary Emulations

CONFIG_KVM_COMMON=y
CONFIG_HAVE_KVM_PFNCACHE=y
CONFIG_HAVE_KVM_IRQCHIP=y
CONFIG_HAVE_KVM_IRQ_ROUTING=y
CONFIG_HAVE_KVM_DIRTY_RING=y
CONFIG_HAVE_KVM_DIRTY_RING_TSO=y
CONFIG_HAVE_KVM_DIRTY_RING_ACQ_REL=y
CONFIG_KVM_MMIO=y
CONFIG_KVM_ASYNC_PF=y
CONFIG_HAVE_KVM_MSI=y
CONFIG_HAVE_KVM_READONLY_MEM=y
CONFIG_HAVE_KVM_CPU_RELAX_INTERCEPT=y
CONFIG_KVM_VFIO=y
CONFIG_KVM_GENERIC_DIRTYLOG_READ_PROTECT=y
CONFIG_KVM_GENERIC_PRE_FAULT_MEMORY=y
CONFIG_KVM_COMPAT=y
CONFIG_HAVE_KVM_IRQ_BYPASS=y
CONFIG_HAVE_KVM_NO_POLL=y
CONFIG_VIRT_XFER_TO_GUEST_WORK=y
CONFIG_HAVE_KVM_PM_NOTIFIER=y
CONFIG_KVM_GENERIC_HARDWARE_ENABLING=y
CONFIG_KVM_ELIDE_TLB_FLUSH_IF_YOUNG=y
CONFIG_KVM_MMU_LOCKLESS_AGING=y
CONFIG_KVM_GENERIC_MEMORY_ATTRIBUTES=y
CONFIG_KVM_GUEST_MEMFD=y
CONFIG_VIRTUALIZATION=y
CONFIG_KVM_X86=y
CONFIG_KVM=y
CONFIG_KVM_SW_PROTECTED_VM=y
CONFIG_KVM_INTEL=y
# CONFIG_KVM_INTEL_PROVE_VE is not set
CONFIG_X86_SGX_KVM=y
CONFIG_KVM_AMD=y
CONFIG_KVM_IOAPIC=y
CONFIG_KVM_SMM=y
CONFIG_KVM_HYPERV=y
CONFIG_KVM_XEN=y
CONFIG_KVM_PROVE_MMU=y
CONFIG_KVM_MAX_NR_VCPUS=1024
CONFIG_X86_REQUIRED_FEATURE_ALWAYS=y
CONFIG_X86_REQUIRED_FEATURE_NOPL=y
CONFIG_X86_REQUIRED_FEATURE_CX8=y
CONFIG_X86_REQUIRED_FEATURE_CMOV=y
CONFIG_X86_REQUIRED_FEATURE_CPUID=y
CONFIG_X86_REQUIRED_FEATURE_FPU=y
CONFIG_X86_REQUIRED_FEATURE_PAE=y
CONFIG_X86_REQUIRED_FEATURE_PSE=y
CONFIG_X86_REQUIRED_FEATURE_PGE=y
CONFIG_X86_REQUIRED_FEATURE_MSR=y
CONFIG_X86_REQUIRED_FEATURE_FXSR=y
CONFIG_X86_REQUIRED_FEATURE_XMM=y
CONFIG_X86_REQUIRED_FEATURE_XMM2=y
CONFIG_X86_REQUIRED_FEATURE_LM=y
CONFIG_X86_DISABLED_FEATURE_VME=y
CONFIG_X86_DISABLED_FEATURE_K6_MTRR=y
CONFIG_X86_DISABLED_FEATURE_CYRIX_ARR=y
CONFIG_X86_DISABLED_FEATURE_CENTAUR_MCR=y
CONFIG_X86_DISABLED_FEATURE_LAM=y
CONFIG_X86_DISABLED_FEATURE_XENPV=y
CONFIG_X86_DISABLED_FEATURE_TDX_GUEST=y
CONFIG_X86_DISABLED_FEATURE_SEV_SNP=y
CONFIG_AS_WRUSS=y
CONFIG_ARCH_CONFIGURES_CPU_MITIGATIONS=y

#
# General architecture-dependent options
#
CONFIG_HOTPLUG_SMT=y
CONFIG_ARCH_SUPPORTS_SCHED_SMT=y
CONFIG_ARCH_SUPPORTS_SCHED_CLUSTER=y
CONFIG_ARCH_SUPPORTS_SCHED_MC=y
CONFIG_SCHED_SMT=y
CONFIG_SCHED_CLUSTER=y
CONFIG_SCHED_MC=y
CONFIG_HOTPLUG_CORE_SYNC=y
CONFIG_HOTPLUG_CORE_SYNC_DEAD=y
CONFIG_HOTPLUG_CORE_SYNC_FULL=y
CONFIG_HOTPLUG_SPLIT_STARTUP=y
CONFIG_HOTPLUG_PARALLEL=y
CONFIG_GENERIC_IRQ_ENTRY=y
CONFIG_GENERIC_SYSCALL=y
CONFIG_GENERIC_ENTRY=y
# CONFIG_KPROBES is not set
CONFIG_JUMP_LABEL=y
# CONFIG_STATIC_KEYS_SELFTEST is not set
# CONFIG_STATIC_CALL_SELFTEST is not set
CONFIG_UPROBES=y
CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y
CONFIG_ARCH_USE_BUILTIN_BSWAP=y
CONFIG_USER_RETURN_NOTIFIER=y
CONFIG_HAVE_IOREMAP_PROT=y
CONFIG_HAVE_KPROBES=y
CONFIG_HAVE_KRETPROBES=y
CONFIG_HAVE_OPTPROBES=y
CONFIG_HAVE_KPROBES_ON_FTRACE=y
CONFIG_ARCH_CORRECT_STACKTRACE_ON_KRETPROBE=y
CONFIG_HAVE_FUNCTION_ERROR_INJECTION=y
CONFIG_HAVE_NMI=y
CONFIG_TRACE_IRQFLAGS_SUPPORT=y
CONFIG_TRACE_IRQFLAGS_NMI_SUPPORT=y
CONFIG_HAVE_ARCH_TRACEHOOK=y
CONFIG_HAVE_DMA_CONTIGUOUS=y
CONFIG_GENERIC_SMP_IDLE_THREAD=y
CONFIG_ARCH_HAS_FORTIFY_SOURCE=y
CONFIG_ARCH_HAS_SET_MEMORY=y
CONFIG_ARCH_HAS_SET_DIRECT_MAP=y
CONFIG_ARCH_HAS_CPU_FINALIZE_INIT=y
CONFIG_ARCH_HAS_CPU_PASID=y
CONFIG_HAVE_ARCH_THREAD_STRUCT_WHITELIST=y
CONFIG_ARCH_WANTS_DYNAMIC_TASK_STRUCT=y
CONFIG_ARCH_WANTS_NO_INSTR=y
CONFIG_ARCH_MEMORY_ORDER_TSO=y
CONFIG_HAVE_ASM_MODVERSIONS=y
CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y
CONFIG_HAVE_RSEQ=y
CONFIG_HAVE_RUST=y
CONFIG_HAVE_FUNCTION_ARG_ACCESS_API=y
CONFIG_HAVE_HW_BREAKPOINT=y
CONFIG_HAVE_MIXED_BREAKPOINTS_REGS=y
CONFIG_HAVE_USER_RETURN_NOTIFIER=y
CONFIG_HAVE_PERF_EVENTS_NMI=y
CONFIG_HAVE_HARDLOCKUP_DETECTOR_PERF=y
CONFIG_UNWIND_USER=y
CONFIG_HAVE_UNWIND_USER_FP=y
CONFIG_HAVE_PERF_REGS=y
CONFIG_HAVE_PERF_USER_STACK_DUMP=y
CONFIG_HAVE_ARCH_JUMP_LABEL=y
CONFIG_HAVE_ARCH_JUMP_LABEL_RELATIVE=y
CONFIG_MMU_GATHER_TABLE_FREE=y
CONFIG_MMU_GATHER_RCU_TABLE_FREE=y
CONFIG_MMU_GATHER_MERGE_VMAS=y
CONFIG_ARCH_WANT_IRQS_OFF_ACTIVATE_MM=y
CONFIG_MMU_LAZY_TLB_REFCOUNT=y
CONFIG_ARCH_HAVE_NMI_SAFE_CMPXCHG=y
CONFIG_ARCH_HAVE_EXTRA_ELF_NOTES=y
CONFIG_ARCH_HAS_NMI_SAFE_THIS_CPU_OPS=y
CONFIG_HAVE_ALIGNED_STRUCT_PAGE=y
CONFIG_HAVE_CMPXCHG_LOCAL=y
CONFIG_HAVE_CMPXCHG_DOUBLE=y
CONFIG_ARCH_WANT_COMPAT_IPC_PARSE_VERSION=y
CONFIG_ARCH_WANT_OLD_COMPAT_IPC=y
CONFIG_HAVE_ARCH_SECCOMP=y
CONFIG_HAVE_ARCH_SECCOMP_FILTER=y
CONFIG_SECCOMP=y
CONFIG_SECCOMP_FILTER=y
# CONFIG_SECCOMP_CACHE_DEBUG is not set
CONFIG_HAVE_ARCH_KSTACK_ERASE=y
CONFIG_HAVE_STACKPROTECTOR=y
CONFIG_STACKPROTECTOR=y
CONFIG_STACKPROTECTOR_STRONG=y
CONFIG_ARCH_SUPPORTS_LTO_CLANG=y
CONFIG_ARCH_SUPPORTS_LTO_CLANG_THIN=y
CONFIG_LTO_NONE=y
CONFIG_ARCH_SUPPORTS_CFI=y
CONFIG_HAVE_ARCH_WITHIN_STACK_FRAMES=y
CONFIG_HAVE_CONTEXT_TRACKING_USER=y
CONFIG_HAVE_CONTEXT_TRACKING_USER_OFFSTACK=y
CONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y
CONFIG_HAVE_IRQ_TIME_ACCOUNTING=y
CONFIG_HAVE_PV_STEAL_CLOCK_GEN=y
CONFIG_HAVE_MOVE_PUD=y
CONFIG_HAVE_MOVE_PMD=y
CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE=y
CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE_PUD=y
CONFIG_HAVE_ARCH_HUGE_VMAP=y
CONFIG_HAVE_ARCH_HUGE_VMALLOC=y
CONFIG_ARCH_WANT_HUGE_PMD_SHARE=y
CONFIG_ARCH_WANT_PMD_MKWRITE=y
CONFIG_HAVE_ARCH_SOFT_DIRTY=y
CONFIG_HAVE_MOD_ARCH_SPECIFIC=y
CONFIG_MODULES_USE_ELF_RELA=y
CONFIG_ARCH_HAS_EXECMEM_ROX=y
CONFIG_HAVE_IRQ_EXIT_ON_IRQ_STACK=y
CONFIG_HAVE_SOFTIRQ_ON_OWN_STACK=y
CONFIG_SOFTIRQ_ON_OWN_STACK=y
CONFIG_ARCH_HAS_ELF_RANDOMIZE=y
CONFIG_HAVE_ARCH_MMAP_RND_BITS=y
CONFIG_HAVE_EXIT_THREAD=y
CONFIG_ARCH_MMAP_RND_BITS=28
CONFIG_HAVE_ARCH_MMAP_RND_COMPAT_BITS=y
CONFIG_ARCH_MMAP_RND_COMPAT_BITS=8
CONFIG_HAVE_ARCH_COMPAT_MMAP_BASES=y
CONFIG_HAVE_PAGE_SIZE_4KB=y
CONFIG_PAGE_SIZE_4KB=y
CONFIG_PAGE_SIZE_LESS_THAN_64KB=y
CONFIG_PAGE_SIZE_LESS_THAN_256KB=y
CONFIG_PAGE_SHIFT=12
CONFIG_HAVE_OBJTOOL=y
CONFIG_HAVE_JUMP_LABEL_HACK=y
CONFIG_HAVE_NOINSTR_HACK=y
CONFIG_HAVE_NOINSTR_VALIDATION=y
CONFIG_HAVE_UACCESS_VALIDATION=y
CONFIG_HAVE_STACK_VALIDATION=y
CONFIG_HAVE_RELIABLE_STACKTRACE=y
CONFIG_OLD_SIGSUSPEND3=y
CONFIG_COMPAT_OLD_SIGACTION=y
CONFIG_COMPAT_32BIT_TIME=y
CONFIG_ARCH_SUPPORTS_RT=y
CONFIG_HAVE_ARCH_VMAP_STACK=y
CONFIG_VMAP_STACK=y
CONFIG_HAVE_ARCH_RANDOMIZE_KSTACK_OFFSET=y
CONFIG_RANDOMIZE_KSTACK_OFFSET=y
# CONFIG_RANDOMIZE_KSTACK_OFFSET_DEFAULT is not set
CONFIG_ARCH_HAS_STRICT_KERNEL_RWX=y
CONFIG_STRICT_KERNEL_RWX=y
CONFIG_ARCH_HAS_STRICT_MODULE_RWX=y
CONFIG_STRICT_MODULE_RWX=y
CONFIG_HAVE_ARCH_PREL32_RELOCATIONS=y
# CONFIG_LOCK_EVENT_COUNTS is not set
CONFIG_ARCH_HAS_MEM_ENCRYPT=y
CONFIG_HAVE_STATIC_CALL=y
CONFIG_HAVE_STATIC_CALL_INLINE=y
CONFIG_HAVE_PREEMPT_DYNAMIC=y
CONFIG_HAVE_PREEMPT_DYNAMIC_CALL=y
CONFIG_ARCH_WANT_LD_ORPHAN_WARN=y
CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y
CONFIG_ARCH_SUPPORTS_PAGE_TABLE_CHECK=y
CONFIG_ARCH_HAS_ELFCORE_COMPAT=y
CONFIG_ARCH_HAS_PARANOID_L1D_FLUSH=y
CONFIG_DYNAMIC_SIGFRAME=y
CONFIG_HAVE_ARCH_NODE_DEV_GROUP=y
CONFIG_ARCH_HAS_HW_PTE_YOUNG=y
CONFIG_ARCH_HAS_NONLEAF_PMD_YOUNG=y
CONFIG_ARCH_HAS_KERNEL_FPU_SUPPORT=y
CONFIG_HAVE_GENERIC_TIF_BITS=y

#
# GCOV-based kernel profiling
#
# CONFIG_GCOV_KERNEL is not set
CONFIG_ARCH_HAS_GCOV_PROFILE_ALL=y
# end of GCOV-based kernel profiling

CONFIG_HAVE_GCC_PLUGINS=y
CONFIG_FUNCTION_ALIGNMENT_4B=y
CONFIG_FUNCTION_ALIGNMENT_16B=y
CONFIG_FUNCTION_ALIGNMENT=16
CONFIG_CC_HAS_MIN_FUNCTION_ALIGNMENT=y
CONFIG_CC_HAS_SANE_FUNCTION_ALIGNMENT=y
CONFIG_ARCH_HAS_CPU_ATTACK_VECTORS=y
# end of General architecture-dependent options

CONFIG_RT_MUTEXES=y
CONFIG_MODULE_SIG_FORMAT=y
CONFIG_MODULES=y
# CONFIG_MODULE_DEBUG is not set
# CONFIG_MODULE_FORCE_LOAD is not set
CONFIG_MODULE_UNLOAD=y
CONFIG_MODULE_FORCE_UNLOAD=y
# CONFIG_MODULE_UNLOAD_TAINT_TRACKING is not set
CONFIG_MODVERSIONS=y
# CONFIG_GENKSYMS is not set
CONFIG_GENDWARFKSYMS=y
CONFIG_ASM_MODVERSIONS=y
# CONFIG_EXTENDED_MODVERSIONS is not set
# CONFIG_BASIC_MODVERSIONS is not set
CONFIG_MODULE_SRCVERSION_ALL=y
CONFIG_MODULE_SIG=y
# CONFIG_MODULE_SIG_FORCE is not set
# CONFIG_MODULE_SIG_ALL is not set
CONFIG_MODULE_SIG_SHA256=y
# CONFIG_MODULE_SIG_SHA384 is not set
# CONFIG_MODULE_SIG_SHA512 is not set
# CONFIG_MODULE_SIG_SHA3_256 is not set
# CONFIG_MODULE_SIG_SHA3_384 is not set
# CONFIG_MODULE_SIG_SHA3_512 is not set
CONFIG_MODULE_SIG_HASH="sha256"
# CONFIG_MODULE_COMPRESS is not set
# CONFIG_MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS is not set
CONFIG_MODPROBE_PATH="/sbin/modprobe"
# CONFIG_TRIM_UNUSED_KSYMS is not set
CONFIG_MODULES_TREE_LOOKUP=y
CONFIG_BLOCK=y
CONFIG_BLOCK_LEGACY_AUTOLOAD=y
CONFIG_BLK_RQ_ALLOC_TIME=y
CONFIG_BLK_CGROUP_RWSTAT=y
CONFIG_BLK_CGROUP_PUNT_BIO=y
CONFIG_BLK_DEV_BSG_COMMON=y
CONFIG_BLK_ICQ=y
CONFIG_BLK_DEV_BSGLIB=y
CONFIG_BLK_DEV_INTEGRITY=y
# CONFIG_BLK_DEV_WRITE_MOUNTED is not set
CONFIG_BLK_DEV_ZONED=y
CONFIG_BLK_DEV_THROTTLING=y
CONFIG_BLK_WBT=y
CONFIG_BLK_WBT_MQ=y
CONFIG_BLK_CGROUP_IOLATENCY=y
# CONFIG_BLK_CGROUP_FC_APPID is not set
CONFIG_BLK_CGROUP_IOCOST=y
CONFIG_BLK_CGROUP_IOPRIO=y
CONFIG_BLK_DEBUG_FS=y
# CONFIG_BLK_SED_OPAL is not set
CONFIG_BLK_INLINE_ENCRYPTION=y
CONFIG_BLK_INLINE_ENCRYPTION_FALLBACK=y

#
# Partition Types
#
CONFIG_PARTITION_ADVANCED=y
CONFIG_ACORN_PARTITION=y
CONFIG_ACORN_PARTITION_CUMANA=y
CONFIG_ACORN_PARTITION_EESOX=y
CONFIG_ACORN_PARTITION_ICS=y
CONFIG_ACORN_PARTITION_ADFS=y
CONFIG_ACORN_PARTITION_POWERTEC=y
CONFIG_ACORN_PARTITION_RISCIX=y
CONFIG_AIX_PARTITION=y
CONFIG_OSF_PARTITION=y
CONFIG_AMIGA_PARTITION=y
CONFIG_ATARI_PARTITION=y
CONFIG_MAC_PARTITION=y
CONFIG_MSDOS_PARTITION=y
CONFIG_BSD_DISKLABEL=y
CONFIG_MINIX_SUBPARTITION=y
CONFIG_SOLARIS_X86_PARTITION=y
CONFIG_UNIXWARE_DISKLABEL=y
CONFIG_LDM_PARTITION=y
# CONFIG_LDM_DEBUG is not set
CONFIG_SGI_PARTITION=y
CONFIG_ULTRIX_PARTITION=y
CONFIG_SUN_PARTITION=y
CONFIG_KARMA_PARTITION=y
CONFIG_EFI_PARTITION=y
CONFIG_SYSV68_PARTITION=y
CONFIG_CMDLINE_PARTITION=y
# CONFIG_OF_PARTITION is not set
# end of Partition Types

CONFIG_BLK_PM=y
CONFIG_BLOCK_HOLDER_DEPRECATED=y
CONFIG_BLK_MQ_STACKING=y
# CONFIG_BLK_ERROR_INJECTION is not set

#
# IO Schedulers
#
CONFIG_MQ_IOSCHED_DEADLINE=y
CONFIG_MQ_IOSCHED_KYBER=y
CONFIG_IOSCHED_BFQ=y
CONFIG_BFQ_GROUP_IOSCHED=y
CONFIG_BFQ_CGROUP_DEBUG=y
# end of IO Schedulers

CONFIG_PREEMPT_NOTIFIERS=y
CONFIG_PADATA=y
CONFIG_ASN1=y
CONFIG_UNINLINE_SPIN_UNLOCK=y
CONFIG_ARCH_SUPPORTS_ATOMIC_RMW=y
CONFIG_MUTEX_SPIN_ON_OWNER=y
CONFIG_RWSEM_SPIN_ON_OWNER=y
CONFIG_LOCK_SPIN_ON_OWNER=y
CONFIG_ARCH_USE_QUEUED_SPINLOCKS=y
CONFIG_QUEUED_SPINLOCKS=y
CONFIG_ARCH_USE_QUEUED_RWLOCKS=y
CONFIG_QUEUED_RWLOCKS=y
CONFIG_ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE=y
CONFIG_ARCH_HAS_SYNC_CORE_BEFORE_USERMODE=y
CONFIG_ARCH_HAS_SYSCALL_WRAPPER=y
CONFIG_FREEZER=y

#
# Executable file formats
#
CONFIG_BINFMT_ELF=y
CONFIG_COMPAT_BINFMT_ELF=y
CONFIG_ELFCORE=y
CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS=y
CONFIG_BINFMT_SCRIPT=y
CONFIG_BINFMT_MISC=y
CONFIG_COREDUMP=y
# end of Executable file formats

#
# Memory Management options
#
CONFIG_SWAP=y
CONFIG_ZSWAP=y
CONFIG_ZSWAP_DEFAULT_ON=y
CONFIG_ZSWAP_SHRINKER_DEFAULT_ON=y
# CONFIG_ZSWAP_COMPRESSOR_DEFAULT_DEFLATE is not set
# CONFIG_ZSWAP_COMPRESSOR_DEFAULT_LZO is not set
CONFIG_ZSWAP_COMPRESSOR_DEFAULT_842=y
# CONFIG_ZSWAP_COMPRESSOR_DEFAULT_LZ4 is not set
# CONFIG_ZSWAP_COMPRESSOR_DEFAULT_LZ4HC is not set
# CONFIG_ZSWAP_COMPRESSOR_DEFAULT_ZSTD is not set
CONFIG_ZSWAP_COMPRESSOR_DEFAULT="842"
CONFIG_ZSMALLOC=y

#
# Zsmalloc allocator options
#

#
# Zsmalloc is a common backend allocator for zswap & zram
#
# CONFIG_ZSMALLOC_STAT is not set
CONFIG_ZSMALLOC_CHAIN_SIZE=8
# end of Zsmalloc allocator options

#
# Slab allocator options
#
CONFIG_SLUB=y
CONFIG_KVFREE_RCU_BATCHED=y
# CONFIG_SLUB_TINY is not set
CONFIG_SLAB_MERGE_DEFAULT=y
# CONFIG_SLAB_FREELIST_RANDOM is not set
# CONFIG_SLAB_FREELIST_HARDENED is not set
# CONFIG_SLAB_BUCKETS is not set
# CONFIG_SLUB_STATS is not set
# CONFIG_KMALLOC_PARTITION_CACHES is not set
# end of Slab allocator options

# CONFIG_SHUFFLE_PAGE_ALLOCATOR is not set
# CONFIG_COMPAT_BRK is not set
CONFIG_SPARSEMEM=y
CONFIG_SPARSEMEM_EXTREME=y
CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y
CONFIG_SPARSEMEM_VMEMMAP=y
CONFIG_SPARSEMEM_VMEMMAP_PREINIT=y
CONFIG_ARCH_WANT_OPTIMIZE_DAX_VMEMMAP=y
CONFIG_ARCH_WANT_OPTIMIZE_HUGETLB_VMEMMAP=y
CONFIG_ARCH_WANT_HUGETLB_VMEMMAP_PREINIT=y
CONFIG_HAVE_GUP_FAST=y
CONFIG_NUMA_KEEP_MEMINFO=y
CONFIG_MEMORY_ISOLATION=y
CONFIG_EXCLUSIVE_SYSTEM_RAM=y
CONFIG_HAVE_BOOTMEM_INFO_NODE=y
CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
CONFIG_MEMORY_HOTPLUG=y
# CONFIG_MHP_DEFAULT_ONLINE_TYPE_OFFLINE is not set
CONFIG_MHP_DEFAULT_ONLINE_TYPE_ONLINE_AUTO=y
# CONFIG_MHP_DEFAULT_ONLINE_TYPE_ONLINE_KERNEL is not set
# CONFIG_MHP_DEFAULT_ONLINE_TYPE_ONLINE_MOVABLE is not set
CONFIG_MEMORY_HOTREMOVE=y
CONFIG_MHP_MEMMAP_ON_MEMORY=y
CONFIG_ARCH_MHP_MEMMAP_ON_MEMORY_ENABLE=y
CONFIG_SPLIT_PTE_PTLOCKS=y
CONFIG_ARCH_ENABLE_SPLIT_PMD_PTLOCK=y
CONFIG_SPLIT_PMD_PTLOCKS=y
CONFIG_BALLOON=y
# CONFIG_BALLOON_MIGRATION is not set
CONFIG_COMPACTION=y
CONFIG_COMPACT_UNEVICTABLE_DEFAULT=1
CONFIG_PAGE_REPORTING=y
CONFIG_NUMA_MIGRATION=y
CONFIG_MIGRATION=y
CONFIG_DEVICE_MIGRATION=y
CONFIG_ARCH_ENABLE_HUGEPAGE_MIGRATION=y
CONFIG_ARCH_ENABLE_THP_MIGRATION=y
CONFIG_CONTIG_ALLOC=y
CONFIG_PCP_BATCH_SCALE_MAX=5
CONFIG_PHYS_ADDR_T_64BIT=y
CONFIG_MMU_NOTIFIER=y
CONFIG_KSM=y
CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
CONFIG_ARCH_SUPPORTS_MEMORY_FAILURE=y
# CONFIG_MEMORY_FAILURE is not set
CONFIG_ARCH_WANT_GENERAL_HUGETLB=y
CONFIG_ARCH_WANTS_THP_SWAP=y
# CONFIG_PERSISTENT_HUGE_ZERO_FOLIO is not set
CONFIG_MM_ID=y
CONFIG_TRANSPARENT_HUGEPAGE=y
# CONFIG_TRANSPARENT_HUGEPAGE_ALWAYS is not set
CONFIG_TRANSPARENT_HUGEPAGE_MADVISE=y
# CONFIG_TRANSPARENT_HUGEPAGE_NEVER is not set
# CONFIG_TRANSPARENT_HUGEPAGE_SHMEM_HUGE_NEVER is not set
# CONFIG_TRANSPARENT_HUGEPAGE_SHMEM_HUGE_ALWAYS is not set
# CONFIG_TRANSPARENT_HUGEPAGE_SHMEM_HUGE_WITHIN_SIZE is not set
CONFIG_TRANSPARENT_HUGEPAGE_SHMEM_HUGE_ADVISE=y
# CONFIG_TRANSPARENT_HUGEPAGE_TMPFS_HUGE_NEVER is not set
# CONFIG_TRANSPARENT_HUGEPAGE_TMPFS_HUGE_ALWAYS is not set
# CONFIG_TRANSPARENT_HUGEPAGE_TMPFS_HUGE_WITHIN_SIZE is not set
CONFIG_TRANSPARENT_HUGEPAGE_TMPFS_HUGE_ADVISE=y
CONFIG_THP_SWAP=y
# CONFIG_NO_PAGE_MAPCOUNT is not set
CONFIG_PAGE_MAPCOUNT=y
CONFIG_PGTABLE_HAS_HUGE_LEAVES=y
CONFIG_HAVE_GIGANTIC_FOLIOS=y
CONFIG_ASYNC_KERNEL_PGTABLE_FREE=y
CONFIG_ARCH_SUPPORTS_HUGE_PFNMAP=y
CONFIG_ARCH_SUPPORTS_PMD_PFNMAP=y
CONFIG_ARCH_SUPPORTS_PUD_PFNMAP=y
CONFIG_NEED_PER_CPU_EMBED_FIRST_CHUNK=y
CONFIG_NEED_PER_CPU_PAGE_FIRST_CHUNK=y
CONFIG_USE_PERCPU_NUMA_NODE_ID=y
CONFIG_HAVE_SETUP_PER_CPU_AREA=y
CONFIG_CMA=y
# CONFIG_CMA_DEBUGFS is not set
# CONFIG_CMA_SYSFS is not set
CONFIG_CMA_AREAS=20
CONFIG_PAGE_BLOCK_MAX_ORDER=10
CONFIG_MEM_SOFT_DIRTY=y
CONFIG_GENERIC_EARLY_IOREMAP=y
# CONFIG_DEFERRED_STRUCT_PAGE_INIT is not set
CONFIG_PAGE_IDLE_FLAG=y
# CONFIG_IDLE_PAGE_TRACKING is not set
CONFIG_ARCH_HAS_CACHE_LINE_SIZE=y
CONFIG_ARCH_HAS_CURRENT_STACK_POINTER=y
CONFIG_ARCH_HAS_ZONE_DMA_SET=y
CONFIG_ZONE_DMA=y
CONFIG_ZONE_DMA32=y
CONFIG_ZONE_DEVICE=y
CONFIG_HMM_MIRROR=y
CONFIG_GET_FREE_REGION=y
CONFIG_DEVICE_PRIVATE=y
CONFIG_VMAP_PFN=y
CONFIG_ARCH_USES_HIGH_VMA_FLAGS=y
CONFIG_ARCH_HAS_PKEYS=y
CONFIG_ARCH_USES_PG_ARCH_2=y
CONFIG_VM_EVENT_COUNTERS=y
CONFIG_PERCPU_STATS=y
# CONFIG_GUP_TEST is not set
# CONFIG_DMAPOOL_TEST is not set
CONFIG_ARCH_HAS_PTE_SPECIAL=y
CONFIG_MAPPING_DIRTY_HELPERS=y
CONFIG_KMAP_LOCAL=y
CONFIG_MEMFD_CREATE=y
CONFIG_SECRETMEM=y
CONFIG_ANON_VMA_NAME=y
CONFIG_HAVE_ARCH_USERFAULTFD_WP=y
CONFIG_HAVE_ARCH_USERFAULTFD_MINOR=y
CONFIG_USERFAULTFD=y
# CONFIG_PTE_MARKER_UFFD_WP is not set
CONFIG_LRU_GEN=y
CONFIG_LRU_GEN_ENABLED=y
# CONFIG_LRU_GEN_STATS is not set
CONFIG_LRU_GEN_WALKS_MMU=y
CONFIG_ARCH_SUPPORTS_PER_VMA_LOCK=y
CONFIG_PER_VMA_LOCK=y
CONFIG_LOCK_MM_AND_FIND_VMA=y
CONFIG_IOMMU_MM_DATA=y
CONFIG_EXECMEM=y
CONFIG_NUMA_MEMBLKS=y
CONFIG_NUMA_EMU=y
CONFIG_ARCH_HAS_USER_SHADOW_STACK=y
CONFIG_PT_RECLAIM=y

#
# Data Access Monitoring
#
CONFIG_DAMON=y
# CONFIG_DAMON_DEBUG_SANITY is not set
CONFIG_DAMON_VADDR=y
CONFIG_DAMON_PADDR=y
# CONFIG_DAMON_SYSFS is not set
CONFIG_DAMON_RECLAIM=y
# CONFIG_DAMON_LRU_SORT is not set
# CONFIG_DAMON_STAT is not set
# end of Data Access Monitoring
# end of Memory Management options

CONFIG_NET=y
CONFIG_WANT_COMPAT_NETLINK_MESSAGES=y
CONFIG_COMPAT_NETLINK_MESSAGES=y
CONFIG_NET_INGRESS=y
CONFIG_NET_EGRESS=y
CONFIG_NET_XGRESS=y
CONFIG_NET_REDIRECT=y
CONFIG_SKB_DECRYPTED=y
CONFIG_SKB_EXTENSIONS=y
CONFIG_NET_DEVMEM=y
CONFIG_NET_SHAPER=y
CONFIG_NET_CRC32C=y

#
# Networking options
#
CONFIG_PACKET=y
CONFIG_PACKET_DIAG=y
CONFIG_INET_PSP=y
CONFIG_UNIX=y
CONFIG_AF_UNIX_OOB=y
CONFIG_UNIX_DIAG=y
CONFIG_TLS=y
CONFIG_TLS_DEVICE=y
CONFIG_XFRM=y
CONFIG_XFRM_OFFLOAD=y
CONFIG_XFRM_ALGO=y
CONFIG_XFRM_USER=y
CONFIG_XFRM_USER_COMPAT=y
CONFIG_XFRM_INTERFACE=y
CONFIG_XFRM_SUB_POLICY=y
CONFIG_XFRM_MIGRATE=y
CONFIG_XFRM_STATISTICS=y
CONFIG_XFRM_AH=y
CONFIG_XFRM_ESP=y
CONFIG_XFRM_IPCOMP=y
CONFIG_NET_KEY=y
CONFIG_NET_KEY_MIGRATE=y
# CONFIG_XFRM_IPTFS is not set
CONFIG_XFRM_ESPINTCP=y
CONFIG_SMC=y
CONFIG_SMC_DIAG=y
# CONFIG_SMC_HS_CTRL_BPF is not set
CONFIG_DIBS=y
CONFIG_DIBS_LO=y
CONFIG_XDP_SOCKETS=y
CONFIG_XDP_SOCKETS_DIAG=y
CONFIG_NET_HANDSHAKE=y
CONFIG_INET=y
CONFIG_IP_MULTICAST=y
CONFIG_IP_ADVANCED_ROUTER=y
CONFIG_IP_FIB_TRIE_STATS=y
CONFIG_IP_MULTIPLE_TABLES=y
CONFIG_IP_ROUTE_MULTIPATH=y
CONFIG_IP_ROUTE_VERBOSE=y
CONFIG_IP_ROUTE_CLASSID=y
CONFIG_IP_PNP=y
CONFIG_IP_PNP_DHCP=y
CONFIG_IP_PNP_BOOTP=y
CONFIG_IP_PNP_RARP=y
CONFIG_NET_IPIP=y
CONFIG_NET_IPGRE_DEMUX=y
CONFIG_NET_IP_TUNNEL=y
CONFIG_NET_IPGRE=y
CONFIG_NET_IPGRE_BROADCAST=y
CONFIG_IP_MROUTE_COMMON=y
CONFIG_IP_MROUTE=y
CONFIG_IP_MROUTE_MULTIPLE_TABLES=y
CONFIG_IP_PIMSM_V1=y
CONFIG_IP_PIMSM_V2=y
CONFIG_SYN_COOKIES=y
CONFIG_NET_IPVTI=y
CONFIG_NET_UDP_TUNNEL=y
CONFIG_NET_FOU=y
CONFIG_NET_FOU_IP_TUNNELS=y
CONFIG_INET_AH=y
CONFIG_INET_ESP=y
CONFIG_INET_ESP_OFFLOAD=y
CONFIG_INET_ESPINTCP=y
CONFIG_INET_IPCOMP=y
CONFIG_INET_TABLE_PERTURB_ORDER=16
CONFIG_INET_XFRM_TUNNEL=y
CONFIG_INET_TUNNEL=y
CONFIG_INET_DIAG=y
CONFIG_INET_TCP_DIAG=y
CONFIG_INET_UDP_DIAG=y
CONFIG_INET_RAW_DIAG=y
CONFIG_INET_DIAG_DESTROY=y
CONFIG_TCP_CONG_ADVANCED=y
CONFIG_TCP_CONG_BIC=y
CONFIG_TCP_CONG_CUBIC=y
CONFIG_TCP_CONG_WESTWOOD=y
CONFIG_TCP_CONG_HTCP=y
CONFIG_TCP_CONG_HSTCP=y
CONFIG_TCP_CONG_HYBLA=y
CONFIG_TCP_CONG_VEGAS=y
CONFIG_TCP_CONG_NV=y
CONFIG_TCP_CONG_SCALABLE=y
CONFIG_TCP_CONG_LP=y
CONFIG_TCP_CONG_VENO=y
CONFIG_TCP_CONG_YEAH=y
CONFIG_TCP_CONG_ILLINOIS=y
CONFIG_TCP_CONG_DCTCP=y
CONFIG_TCP_CONG_CDG=y
CONFIG_TCP_CONG_BBR=y
# CONFIG_DEFAULT_BIC is not set
CONFIG_DEFAULT_CUBIC=y
# CONFIG_DEFAULT_HTCP is not set
# CONFIG_DEFAULT_HYBLA is not set
# CONFIG_DEFAULT_VEGAS is not set
# CONFIG_DEFAULT_VENO is not set
# CONFIG_DEFAULT_WESTWOOD is not set
# CONFIG_DEFAULT_DCTCP is not set
# CONFIG_DEFAULT_CDG is not set
# CONFIG_DEFAULT_BBR is not set
# CONFIG_DEFAULT_RENO is not set
CONFIG_DEFAULT_TCP_CONG="cubic"
# CONFIG_TCP_AO is not set
CONFIG_TCP_MD5SIG=y
CONFIG_IPV6=y
CONFIG_IPV6_ROUTER_PREF=y
CONFIG_IPV6_ROUTE_INFO=y
CONFIG_IPV6_OPTIMISTIC_DAD=y
CONFIG_INET6_AH=y
CONFIG_INET6_ESP=y
CONFIG_INET6_ESP_OFFLOAD=y
CONFIG_INET6_ESPINTCP=y
CONFIG_INET6_IPCOMP=y
CONFIG_IPV6_MIP6=y
CONFIG_IPV6_ILA=y
CONFIG_INET6_XFRM_TUNNEL=y
CONFIG_INET6_TUNNEL=y
CONFIG_IPV6_VTI=y
CONFIG_IPV6_SIT=y
CONFIG_IPV6_SIT_6RD=y
CONFIG_IPV6_NDISC_NODETYPE=y
CONFIG_IPV6_TUNNEL=y
CONFIG_IPV6_GRE=y
CONFIG_IPV6_FOU=y
CONFIG_IPV6_FOU_TUNNEL=y
CONFIG_IPV6_MULTIPLE_TABLES=y
CONFIG_IPV6_SUBTREES=y
CONFIG_IPV6_MROUTE=y
CONFIG_IPV6_MROUTE_MULTIPLE_TABLES=y
CONFIG_IPV6_PIMSM_V2=y
CONFIG_IPV6_SEG6_LWTUNNEL=y
CONFIG_IPV6_SEG6_HMAC=y
CONFIG_IPV6_SEG6_BPF=y
CONFIG_IPV6_RPL_LWTUNNEL=y
# CONFIG_IPV6_IOAM6_LWTUNNEL is not set
CONFIG_NETLABEL=y
CONFIG_MPTCP=y
CONFIG_INET_MPTCP_DIAG=y
CONFIG_MPTCP_IPV6=y
CONFIG_NETWORK_SECMARK=y
CONFIG_NET_PTP_CLASSIFY=y
# CONFIG_NETWORK_PHY_TIMESTAMPING is not set
CONFIG_NETFILTER=y
CONFIG_NETFILTER_ADVANCED=y
CONFIG_BRIDGE_NETFILTER=y

#
# Core Netfilter Configuration
#
CONFIG_NETFILTER_INGRESS=y
CONFIG_NETFILTER_EGRESS=y
CONFIG_NETFILTER_SKIP_EGRESS=y
CONFIG_NETFILTER_NETLINK=y
CONFIG_NETFILTER_FAMILY_BRIDGE=y
CONFIG_NETFILTER_FAMILY_ARP=y
CONFIG_NETFILTER_BPF_LINK=y
# CONFIG_NETFILTER_NETLINK_HOOK is not set
CONFIG_NETFILTER_NETLINK_ACCT=y
CONFIG_NETFILTER_NETLINK_QUEUE=y
CONFIG_NETFILTER_NETLINK_LOG=y
CONFIG_NETFILTER_NETLINK_OSF=y
CONFIG_NF_CONNTRACK=y
CONFIG_NF_LOG_SYSLOG=y
CONFIG_NETFILTER_CONNCOUNT=y
CONFIG_NF_CONNTRACK_MARK=y
CONFIG_NF_CONNTRACK_SECMARK=y
CONFIG_NF_CONNTRACK_ZONES=y
# CONFIG_NF_CONNTRACK_PROCFS is not set
CONFIG_NF_CONNTRACK_EVENTS=y
CONFIG_NF_CONNTRACK_TIMEOUT=y
CONFIG_NF_CONNTRACK_TIMESTAMP=y
CONFIG_NF_CONNTRACK_LABELS=y
CONFIG_NF_CONNTRACK_OVS=y
CONFIG_NF_CT_PROTO_GRE=y
CONFIG_NF_CT_PROTO_SCTP=y
CONFIG_NF_CONNTRACK_AMANDA=y
CONFIG_NF_CONNTRACK_FTP=y
CONFIG_NF_CONNTRACK_H323=y
CONFIG_NF_CONNTRACK_IRC=y
CONFIG_NF_CONNTRACK_BROADCAST=y
CONFIG_NF_CONNTRACK_NETBIOS_NS=y
CONFIG_NF_CONNTRACK_SNMP=y
CONFIG_NF_CONNTRACK_PPTP=y
CONFIG_NF_CONNTRACK_SANE=y
CONFIG_NF_CONNTRACK_SIP=y
CONFIG_NF_CONNTRACK_TFTP=y
CONFIG_NF_CT_NETLINK=y
CONFIG_NF_CT_NETLINK_TIMEOUT=y
CONFIG_NF_CT_NETLINK_HELPER=y
CONFIG_NETFILTER_NETLINK_GLUE_CT=y
CONFIG_NF_NAT=y
CONFIG_NF_NAT_AMANDA=y
CONFIG_NF_NAT_FTP=y
CONFIG_NF_NAT_IRC=y
CONFIG_NF_NAT_SIP=y
CONFIG_NF_NAT_TFTP=y
CONFIG_NF_NAT_REDIRECT=y
CONFIG_NF_NAT_MASQUERADE=y
CONFIG_NF_NAT_OVS=y
CONFIG_NETFILTER_SYNPROXY=y
CONFIG_NF_TABLES=y
CONFIG_NF_TABLES_INET=y
CONFIG_NF_TABLES_NETDEV=y
CONFIG_NFT_NUMGEN=y
CONFIG_NFT_CT=y
CONFIG_NFT_EXTHDR_DCCP=y
CONFIG_NFT_FLOW_OFFLOAD=y
CONFIG_NFT_CONNLIMIT=y
CONFIG_NFT_LOG=y
CONFIG_NFT_LIMIT=y
CONFIG_NFT_MASQ=y
CONFIG_NFT_REDIR=y
CONFIG_NFT_NAT=y
CONFIG_NFT_TUNNEL=y
CONFIG_NFT_QUEUE=y
CONFIG_NFT_QUOTA=y
CONFIG_NFT_REJECT=y
CONFIG_NFT_REJECT_INET=y
CONFIG_NFT_COMPAT=y
CONFIG_NFT_HASH=y
CONFIG_NFT_FIB=y
CONFIG_NFT_FIB_INET=y
CONFIG_NFT_XFRM=y
CONFIG_NFT_SOCKET=y
CONFIG_NFT_OSF=y
CONFIG_NFT_TPROXY=y
CONFIG_NFT_SYNPROXY=y
CONFIG_NF_DUP_NETDEV=y
CONFIG_NFT_DUP_NETDEV=y
CONFIG_NFT_FWD_NETDEV=y
CONFIG_NFT_FIB_NETDEV=y
CONFIG_NFT_REJECT_NETDEV=y
CONFIG_NF_FLOW_TABLE_INET=y
CONFIG_NF_FLOW_TABLE=y
# CONFIG_NF_FLOW_TABLE_PROCFS is not set
CONFIG_NETFILTER_XTABLES=y
CONFIG_NETFILTER_XTABLES_COMPAT=y
CONFIG_NETFILTER_XTABLES_LEGACY=y

#
# Xtables combined modules
#
CONFIG_NETFILTER_XT_MARK=y
CONFIG_NETFILTER_XT_CONNMARK=y
CONFIG_NETFILTER_XT_SET=y

#
# Xtables targets
#
CONFIG_NETFILTER_XT_TARGET_AUDIT=y
CONFIG_NETFILTER_XT_TARGET_CHECKSUM=y
CONFIG_NETFILTER_XT_TARGET_CLASSIFY=y
CONFIG_NETFILTER_XT_TARGET_CONNMARK=y
CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=y
CONFIG_NETFILTER_XT_TARGET_CT=y
CONFIG_NETFILTER_XT_TARGET_DSCP=y
CONFIG_NETFILTER_XT_TARGET_HL=y
CONFIG_NETFILTER_XT_TARGET_HMARK=y
CONFIG_NETFILTER_XT_TARGET_IDLETIMER=y
CONFIG_NETFILTER_XT_TARGET_LED=y
CONFIG_NETFILTER_XT_TARGET_LOG=y
CONFIG_NETFILTER_XT_TARGET_MARK=y
CONFIG_NETFILTER_XT_NAT=y
CONFIG_NETFILTER_XT_TARGET_NETMAP=y
CONFIG_NETFILTER_XT_TARGET_NFLOG=y
CONFIG_NETFILTER_XT_TARGET_NFQUEUE=y
CONFIG_NETFILTER_XT_TARGET_NOTRACK=y
CONFIG_NETFILTER_XT_TARGET_RATEEST=y
CONFIG_NETFILTER_XT_TARGET_REDIRECT=y
CONFIG_NETFILTER_XT_TARGET_MASQUERADE=y
CONFIG_NETFILTER_XT_TARGET_TEE=y
CONFIG_NETFILTER_XT_TARGET_TPROXY=y
CONFIG_NETFILTER_XT_TARGET_TRACE=y
CONFIG_NETFILTER_XT_TARGET_SECMARK=y
CONFIG_NETFILTER_XT_TARGET_TCPMSS=y
CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP=y

#
# Xtables matches
#
CONFIG_NETFILTER_XT_MATCH_ADDRTYPE=y
CONFIG_NETFILTER_XT_MATCH_BPF=y
CONFIG_NETFILTER_XT_MATCH_CGROUP=y
CONFIG_NETFILTER_XT_MATCH_CLUSTER=y
CONFIG_NETFILTER_XT_MATCH_COMMENT=y
CONFIG_NETFILTER_XT_MATCH_CONNBYTES=y
CONFIG_NETFILTER_XT_MATCH_CONNLABEL=y
CONFIG_NETFILTER_XT_MATCH_CONNLIMIT=y
CONFIG_NETFILTER_XT_MATCH_CONNMARK=y
CONFIG_NETFILTER_XT_MATCH_CONNTRACK=y
CONFIG_NETFILTER_XT_MATCH_CPU=y
CONFIG_NETFILTER_XT_MATCH_DCCP=y
CONFIG_NETFILTER_XT_MATCH_DEVGROUP=y
CONFIG_NETFILTER_XT_MATCH_DSCP=y
CONFIG_NETFILTER_XT_MATCH_ECN=y
CONFIG_NETFILTER_XT_MATCH_ESP=y
CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=y
CONFIG_NETFILTER_XT_MATCH_HELPER=y
CONFIG_NETFILTER_XT_MATCH_HL=y
CONFIG_NETFILTER_XT_MATCH_IPCOMP=y
CONFIG_NETFILTER_XT_MATCH_IPRANGE=y
CONFIG_NETFILTER_XT_MATCH_IPVS=y
CONFIG_NETFILTER_XT_MATCH_L2TP=y
CONFIG_NETFILTER_XT_MATCH_LENGTH=y
CONFIG_NETFILTER_XT_MATCH_LIMIT=y
CONFIG_NETFILTER_XT_MATCH_MAC=y
CONFIG_NETFILTER_XT_MATCH_MARK=y
CONFIG_NETFILTER_XT_MATCH_MULTIPORT=y
CONFIG_NETFILTER_XT_MATCH_NFACCT=y
CONFIG_NETFILTER_XT_MATCH_OSF=y
CONFIG_NETFILTER_XT_MATCH_OWNER=y
CONFIG_NETFILTER_XT_MATCH_POLICY=y
CONFIG_NETFILTER_XT_MATCH_PHYSDEV=y
CONFIG_NETFILTER_XT_MATCH_PKTTYPE=y
CONFIG_NETFILTER_XT_MATCH_QUOTA=y
CONFIG_NETFILTER_XT_MATCH_RATEEST=y
CONFIG_NETFILTER_XT_MATCH_REALM=y
CONFIG_NETFILTER_XT_MATCH_RECENT=y
CONFIG_NETFILTER_XT_MATCH_SCTP=y
CONFIG_NETFILTER_XT_MATCH_SOCKET=y
CONFIG_NETFILTER_XT_MATCH_STATE=y
CONFIG_NETFILTER_XT_MATCH_STATISTIC=y
CONFIG_NETFILTER_XT_MATCH_STRING=y
CONFIG_NETFILTER_XT_MATCH_TCPMSS=y
CONFIG_NETFILTER_XT_MATCH_TIME=y
CONFIG_NETFILTER_XT_MATCH_U32=y
# end of Core Netfilter Configuration

CONFIG_IP_SET=y
CONFIG_IP_SET_MAX=256
CONFIG_IP_SET_BITMAP_IP=y
CONFIG_IP_SET_BITMAP_IPMAC=y
CONFIG_IP_SET_BITMAP_PORT=y
CONFIG_IP_SET_HASH_IP=y
CONFIG_IP_SET_HASH_IPMARK=y
CONFIG_IP_SET_HASH_IPPORT=y
CONFIG_IP_SET_HASH_IPPORTIP=y
CONFIG_IP_SET_HASH_IPPORTNET=y
CONFIG_IP_SET_HASH_IPMAC=y
CONFIG_IP_SET_HASH_MAC=y
CONFIG_IP_SET_HASH_NETPORTNET=y
CONFIG_IP_SET_HASH_NET=y
CONFIG_IP_SET_HASH_NETNET=y
CONFIG_IP_SET_HASH_NETPORT=y
CONFIG_IP_SET_HASH_NETIFACE=y
CONFIG_IP_SET_LIST_SET=y
CONFIG_IP_VS=y
CONFIG_IP_VS_IPV6=y
# CONFIG_IP_VS_DEBUG is not set
CONFIG_IP_VS_TAB_BITS=12

#
# IPVS transport protocol load balancing support
#
CONFIG_IP_VS_PROTO_TCP=y
CONFIG_IP_VS_PROTO_UDP=y
CONFIG_IP_VS_PROTO_AH_ESP=y
CONFIG_IP_VS_PROTO_ESP=y
CONFIG_IP_VS_PROTO_AH=y
CONFIG_IP_VS_PROTO_SCTP=y

#
# IPVS scheduler
#
CONFIG_IP_VS_RR=y
CONFIG_IP_VS_WRR=y
CONFIG_IP_VS_LC=y
CONFIG_IP_VS_WLC=y
CONFIG_IP_VS_FO=y
CONFIG_IP_VS_OVF=y
CONFIG_IP_VS_LBLC=y
CONFIG_IP_VS_LBLCR=y
CONFIG_IP_VS_DH=y
CONFIG_IP_VS_SH=y
CONFIG_IP_VS_MH=y
CONFIG_IP_VS_SED=y
CONFIG_IP_VS_NQ=y
CONFIG_IP_VS_TWOS=y

#
# IPVS SH scheduler
#
CONFIG_IP_VS_SH_TAB_BITS=8

#
# IPVS MH scheduler
#
CONFIG_IP_VS_MH_TAB_INDEX=12

#
# IPVS application helper
#
CONFIG_IP_VS_FTP=y
CONFIG_IP_VS_NFCT=y
CONFIG_IP_VS_PE_SIP=y

#
# IP: Netfilter Configuration
#
CONFIG_NF_DEFRAG_IPV4=y
CONFIG_IP_NF_IPTABLES_LEGACY=y
CONFIG_NF_SOCKET_IPV4=y
CONFIG_NF_TPROXY_IPV4=y
CONFIG_NF_TABLES_IPV4=y
CONFIG_NFT_REJECT_IPV4=y
CONFIG_NFT_DUP_IPV4=y
CONFIG_NFT_FIB_IPV4=y
CONFIG_NF_TABLES_ARP=y
CONFIG_NF_DUP_IPV4=y
CONFIG_NF_LOG_ARP=y
CONFIG_NF_LOG_IPV4=y
CONFIG_NF_REJECT_IPV4=y
CONFIG_NF_NAT_SNMP_BASIC=y
CONFIG_NF_NAT_PPTP=y
CONFIG_NF_NAT_H323=y
CONFIG_IP_NF_IPTABLES=y
CONFIG_IP_NF_MATCH_AH=y
CONFIG_IP_NF_MATCH_ECN=y
CONFIG_IP_NF_MATCH_RPFILTER=y
CONFIG_IP_NF_MATCH_TTL=y
CONFIG_IP_NF_FILTER=y
CONFIG_IP_NF_TARGET_REJECT=y
CONFIG_IP_NF_TARGET_SYNPROXY=y
CONFIG_IP_NF_NAT=y
CONFIG_IP_NF_TARGET_MASQUERADE=y
CONFIG_IP_NF_TARGET_NETMAP=y
CONFIG_IP_NF_TARGET_REDIRECT=y
CONFIG_IP_NF_MANGLE=y
CONFIG_IP_NF_TARGET_ECN=y
CONFIG_IP_NF_TARGET_TTL=y
CONFIG_IP_NF_RAW=y
CONFIG_IP_NF_SECURITY=y
CONFIG_IP_NF_ARPTABLES=y
CONFIG_NFT_COMPAT_ARP=y
CONFIG_IP_NF_ARPFILTER=y
CONFIG_IP_NF_ARP_MANGLE=y
# end of IP: Netfilter Configuration

#
# IPv6: Netfilter Configuration
#
CONFIG_IP6_NF_IPTABLES_LEGACY=y
CONFIG_NF_SOCKET_IPV6=y
CONFIG_NF_TPROXY_IPV6=y
CONFIG_NF_TABLES_IPV6=y
CONFIG_NFT_REJECT_IPV6=y
CONFIG_NFT_DUP_IPV6=y
CONFIG_NFT_FIB_IPV6=y
CONFIG_NF_DUP_IPV6=y
CONFIG_NF_REJECT_IPV6=y
CONFIG_NF_LOG_IPV6=y
CONFIG_IP6_NF_IPTABLES=y
CONFIG_IP6_NF_MATCH_AH=y
CONFIG_IP6_NF_MATCH_EUI64=y
CONFIG_IP6_NF_MATCH_FRAG=y
CONFIG_IP6_NF_MATCH_OPTS=y
CONFIG_IP6_NF_MATCH_HL=y
CONFIG_IP6_NF_MATCH_IPV6HEADER=y
CONFIG_IP6_NF_MATCH_MH=y
CONFIG_IP6_NF_MATCH_RPFILTER=y
CONFIG_IP6_NF_MATCH_RT=y
CONFIG_IP6_NF_MATCH_SRH=y
CONFIG_IP6_NF_TARGET_HL=y
CONFIG_IP6_NF_FILTER=y
CONFIG_IP6_NF_TARGET_REJECT=y
CONFIG_IP6_NF_TARGET_SYNPROXY=y
CONFIG_IP6_NF_MANGLE=y
CONFIG_IP6_NF_RAW=y
CONFIG_IP6_NF_SECURITY=y
CONFIG_IP6_NF_NAT=y
CONFIG_IP6_NF_TARGET_MASQUERADE=y
CONFIG_IP6_NF_TARGET_NPT=y
# end of IPv6: Netfilter Configuration

CONFIG_NF_DEFRAG_IPV6=y
CONFIG_NF_TABLES_BRIDGE=y
CONFIG_NFT_BRIDGE_META=y
CONFIG_NFT_BRIDGE_REJECT=y
CONFIG_NF_CONNTRACK_BRIDGE=y
CONFIG_BRIDGE_NF_EBTABLES_LEGACY=y
CONFIG_BRIDGE_NF_EBTABLES=y
CONFIG_BRIDGE_EBT_BROUTE=y
CONFIG_BRIDGE_EBT_T_FILTER=y
CONFIG_BRIDGE_EBT_T_NAT=y
CONFIG_BRIDGE_EBT_802_3=y
CONFIG_BRIDGE_EBT_AMONG=y
CONFIG_BRIDGE_EBT_ARP=y
CONFIG_BRIDGE_EBT_IP=y
CONFIG_BRIDGE_EBT_IP6=y
CONFIG_BRIDGE_EBT_LIMIT=y
CONFIG_BRIDGE_EBT_MARK=y
CONFIG_BRIDGE_EBT_PKTTYPE=y
CONFIG_BRIDGE_EBT_STP=y
CONFIG_BRIDGE_EBT_VLAN=y
CONFIG_BRIDGE_EBT_ARPREPLY=y
CONFIG_BRIDGE_EBT_DNAT=y
CONFIG_BRIDGE_EBT_MARK_T=y
CONFIG_BRIDGE_EBT_REDIRECT=y
CONFIG_BRIDGE_EBT_SNAT=y
CONFIG_BRIDGE_EBT_LOG=y
CONFIG_BRIDGE_EBT_NFLOG=y
CONFIG_IP_SCTP=y
# CONFIG_SCTP_DBG_OBJCNT is not set
CONFIG_SCTP_DEFAULT_COOKIE_HMAC_SHA256=y
# CONFIG_SCTP_DEFAULT_COOKIE_HMAC_NONE is not set
CONFIG_INET_SCTP_DIAG=y
CONFIG_RDS=y
CONFIG_RDS_RDMA=y
CONFIG_RDS_TCP=y
# CONFIG_RDS_DEBUG is not set
CONFIG_TIPC=y
CONFIG_TIPC_MEDIA_IB=y
CONFIG_TIPC_MEDIA_UDP=y
CONFIG_TIPC_CRYPTO=y
CONFIG_TIPC_DIAG=y
CONFIG_ATM=y
CONFIG_ATM_BR2684=y
# CONFIG_ATM_BR2684_IPFILTER is not set
CONFIG_L2TP=y
# CONFIG_L2TP_DEBUGFS is not set
CONFIG_L2TP_V3=y
CONFIG_L2TP_IP=y
CONFIG_L2TP_ETH=y
CONFIG_STP=y
CONFIG_GARP=y
CONFIG_MRP=y
CONFIG_BRIDGE=y
CONFIG_BRIDGE_IGMP_SNOOPING=y
CONFIG_BRIDGE_VLAN_FILTERING=y
CONFIG_BRIDGE_MRP=y
CONFIG_BRIDGE_CFM=y
CONFIG_NET_DSA=y
# CONFIG_NET_DSA_TAG_NONE is not set
# CONFIG_NET_DSA_TAG_AR9331 is not set
CONFIG_NET_DSA_TAG_BRCM_COMMON=y
CONFIG_NET_DSA_TAG_BRCM=y
# CONFIG_NET_DSA_TAG_BRCM_LEGACY is not set
# CONFIG_NET_DSA_TAG_BRCM_LEGACY_FCS is not set
CONFIG_NET_DSA_TAG_BRCM_PREPEND=y
# CONFIG_NET_DSA_TAG_HELLCREEK is not set
# CONFIG_NET_DSA_TAG_GSWIP is not set
# CONFIG_NET_DSA_TAG_DSA is not set
# CONFIG_NET_DSA_TAG_EDSA is not set
CONFIG_NET_DSA_TAG_MTK=y
# CONFIG_NET_DSA_TAG_MXL_862XX is not set
# CONFIG_NET_DSA_TAG_MXL_GSW1XX is not set
# CONFIG_NET_DSA_TAG_KSZ is not set
# CONFIG_NET_DSA_TAG_NETC is not set
# CONFIG_NET_DSA_TAG_OCELOT is not set
# CONFIG_NET_DSA_TAG_OCELOT_8021Q is not set
CONFIG_NET_DSA_TAG_QCA=y
CONFIG_NET_DSA_TAG_RTL4_A=y
# CONFIG_NET_DSA_TAG_RTL8_4 is not set
# CONFIG_NET_DSA_TAG_RZN1_A5PSW is not set
# CONFIG_NET_DSA_TAG_LAN9303 is not set
# CONFIG_NET_DSA_TAG_SJA1105 is not set
# CONFIG_NET_DSA_TAG_TRAILER is not set
# CONFIG_NET_DSA_TAG_VSC73XX_8021Q is not set
# CONFIG_NET_DSA_TAG_XRS700X is not set
# CONFIG_NET_DSA_TAG_YT921X is not set
CONFIG_VLAN_8021Q=y
CONFIG_VLAN_8021Q_GVRP=y
CONFIG_VLAN_8021Q_MVRP=y
CONFIG_LLC=y
CONFIG_LLC2=y
CONFIG_X25=y
CONFIG_LAPB=y
CONFIG_PHONET=y
CONFIG_6LOWPAN=y
# CONFIG_6LOWPAN_DEBUGFS is not set
CONFIG_6LOWPAN_NHC=y
CONFIG_6LOWPAN_NHC_DEST=y
CONFIG_6LOWPAN_NHC_FRAGMENT=y
CONFIG_6LOWPAN_NHC_HOP=y
CONFIG_6LOWPAN_NHC_IPV6=y
CONFIG_6LOWPAN_NHC_MOBILITY=y
CONFIG_6LOWPAN_NHC_ROUTING=y
CONFIG_6LOWPAN_NHC_UDP=y
CONFIG_6LOWPAN_GHC_EXT_HDR_HOP=y
CONFIG_6LOWPAN_GHC_UDP=y
CONFIG_6LOWPAN_GHC_ICMPV6=y
CONFIG_6LOWPAN_GHC_EXT_HDR_DEST=y
CONFIG_6LOWPAN_GHC_EXT_HDR_FRAG=y
CONFIG_6LOWPAN_GHC_EXT_HDR_ROUTE=y
CONFIG_IEEE802154=y
CONFIG_IEEE802154_NL802154_EXPERIMENTAL=y
CONFIG_IEEE802154_SOCKET=y
CONFIG_IEEE802154_6LOWPAN=y
CONFIG_MAC802154=y
CONFIG_NET_SCHED=y

#
# Queueing/Scheduling
#
CONFIG_NET_SCH_HTB=y
CONFIG_NET_SCH_HFSC=y
CONFIG_NET_SCH_PRIO=y
CONFIG_NET_SCH_MULTIQ=y
CONFIG_NET_SCH_RED=y
CONFIG_NET_SCH_SFB=y
CONFIG_NET_SCH_SFQ=y
CONFIG_NET_SCH_TEQL=y
CONFIG_NET_SCH_TBF=y
CONFIG_NET_SCH_CBS=y
CONFIG_NET_SCH_ETF=y
CONFIG_NET_SCH_MQPRIO_LIB=y
CONFIG_NET_SCH_TAPRIO=y
CONFIG_NET_SCH_GRED=y
CONFIG_NET_SCH_NETEM=y
CONFIG_NET_SCH_DRR=y
CONFIG_NET_SCH_MQPRIO=y
CONFIG_NET_SCH_SKBPRIO=y
CONFIG_NET_SCH_CHOKE=y
CONFIG_NET_SCH_QFQ=y
CONFIG_NET_SCH_CODEL=y
CONFIG_NET_SCH_FQ_CODEL=y
CONFIG_NET_SCH_CAKE=y
CONFIG_NET_SCH_FQ=y
CONFIG_NET_SCH_HHF=y
CONFIG_NET_SCH_PIE=y
CONFIG_NET_SCH_FQ_PIE=y
CONFIG_NET_SCH_INGRESS=y
CONFIG_NET_SCH_PLUG=y
CONFIG_NET_SCH_ETS=y
# CONFIG_NET_SCH_DUALPI2 is not set
CONFIG_NET_SCH_DEFAULT=y
# CONFIG_DEFAULT_FQ is not set
CONFIG_DEFAULT_CODEL=y
# CONFIG_DEFAULT_FQ_CODEL is not set
# CONFIG_DEFAULT_FQ_PIE is not set
# CONFIG_DEFAULT_SFQ is not set
# CONFIG_DEFAULT_PFIFO_FAST is not set
CONFIG_DEFAULT_NET_SCH="pfifo_fast"

#
# Classification
#
CONFIG_NET_CLS=y
CONFIG_NET_CLS_BASIC=y
CONFIG_NET_CLS_ROUTE4=y
CONFIG_NET_CLS_FW=y
CONFIG_NET_CLS_U32=y
CONFIG_CLS_U32_PERF=y
CONFIG_CLS_U32_MARK=y
CONFIG_NET_CLS_FLOW=y
CONFIG_NET_CLS_CGROUP=y
CONFIG_NET_CLS_BPF=y
CONFIG_NET_CLS_FLOWER=y
CONFIG_NET_CLS_MATCHALL=y
CONFIG_NET_EMATCH=y
CONFIG_NET_EMATCH_STACK=32
CONFIG_NET_EMATCH_CMP=y
CONFIG_NET_EMATCH_NBYTE=y
CONFIG_NET_EMATCH_U32=y
CONFIG_NET_EMATCH_META=y
CONFIG_NET_EMATCH_TEXT=y
CONFIG_NET_EMATCH_CANID=y
CONFIG_NET_EMATCH_IPSET=y
CONFIG_NET_EMATCH_IPT=y
CONFIG_NET_CLS_ACT=y
CONFIG_NET_ACT_POLICE=y
CONFIG_NET_ACT_GACT=y
CONFIG_GACT_PROB=y
CONFIG_NET_ACT_MIRRED=y
CONFIG_NET_ACT_SAMPLE=y
CONFIG_NET_ACT_NAT=y
CONFIG_NET_ACT_PEDIT=y
CONFIG_NET_ACT_SIMP=y
CONFIG_NET_ACT_SKBEDIT=y
CONFIG_NET_ACT_CSUM=y
CONFIG_NET_ACT_MPLS=y
CONFIG_NET_ACT_VLAN=y
CONFIG_NET_ACT_BPF=y
CONFIG_NET_ACT_CONNMARK=y
CONFIG_NET_ACT_CTINFO=y
CONFIG_NET_ACT_SKBMOD=y
CONFIG_NET_ACT_IFE=y
CONFIG_NET_ACT_TUNNEL_KEY=y
CONFIG_NET_ACT_CT=y
CONFIG_NET_ACT_GATE=y
CONFIG_NET_IFE_SKBMARK=y
CONFIG_NET_IFE_SKBPRIO=y
CONFIG_NET_IFE_SKBTCINDEX=y
CONFIG_NET_TC_SKB_EXT=y
CONFIG_NET_SCH_FIFO=y
CONFIG_DCB=y
CONFIG_DNS_RESOLVER=y
CONFIG_BATMAN_ADV=y
CONFIG_BATMAN_ADV_BATMAN_V=y
CONFIG_BATMAN_ADV_BLA=y
CONFIG_BATMAN_ADV_DAT=y
CONFIG_BATMAN_ADV_MCAST=y
# CONFIG_BATMAN_ADV_DEBUG is not set
# CONFIG_BATMAN_ADV_TRACING is not set
CONFIG_OPENVSWITCH=y
CONFIG_OPENVSWITCH_GRE=y
CONFIG_OPENVSWITCH_VXLAN=y
CONFIG_OPENVSWITCH_GENEVE=y
CONFIG_VSOCKETS=y
CONFIG_VSOCKETS_DIAG=y
CONFIG_VSOCKETS_LOOPBACK=y
# CONFIG_VMWARE_VMCI_VSOCKETS is not set
CONFIG_VIRTIO_VSOCKETS=y
CONFIG_VIRTIO_VSOCKETS_COMMON=y
CONFIG_NETLINK_DIAG=y
CONFIG_MPLS=y
CONFIG_NET_MPLS_GSO=y
CONFIG_MPLS_ROUTING=y
CONFIG_MPLS_IPTUNNEL=y
CONFIG_NET_NSH=y
CONFIG_HSR=y
CONFIG_NET_SWITCHDEV=y
CONFIG_NET_L3_MASTER_DEV=y
CONFIG_QRTR=y
CONFIG_QRTR_TUN=y
# CONFIG_QRTR_MHI is not set
CONFIG_NET_NCSI=y
# CONFIG_NCSI_OEM_CMD_GET_MAC is not set
# CONFIG_NCSI_OEM_CMD_KEEP_PHY is not set
# CONFIG_PCPU_DEV_REFCNT is not set
CONFIG_MAX_SKB_FRAGS=17
CONFIG_RPS=y
CONFIG_RFS_ACCEL=y
CONFIG_SOCK_RX_QUEUE_MAPPING=y
CONFIG_XPS=y
CONFIG_CGROUP_NET_PRIO=y
CONFIG_CGROUP_NET_CLASSID=y
CONFIG_NET_RX_BUSY_POLL=y
CONFIG_BQL=y
CONFIG_NET_FLOW_LIMIT=y

#
# Network testing
#
# CONFIG_NET_PKTGEN is not set
CONFIG_NET_DROP_MONITOR=y
# end of Network testing
# end of Networking options

CONFIG_CAN=y
CONFIG_CAN_RAW=y
CONFIG_CAN_BCM=y
CONFIG_CAN_GW=y
CONFIG_CAN_J1939=y
CONFIG_CAN_ISOTP=y
CONFIG_BT=y
CONFIG_BT_BREDR=y
CONFIG_BT_RFCOMM=y
CONFIG_BT_RFCOMM_TTY=y
CONFIG_BT_BNEP=y
CONFIG_BT_BNEP_MC_FILTER=y
CONFIG_BT_BNEP_PROTO_FILTER=y
CONFIG_BT_HIDP=y
CONFIG_BT_LE=y
CONFIG_BT_LE_L2CAP_ECRED=y
CONFIG_BT_6LOWPAN=y
CONFIG_BT_LEDS=y
CONFIG_BT_MSFTEXT=y
# CONFIG_BT_AOSPEXT is not set
# CONFIG_BT_DEBUGFS is not set
# CONFIG_BT_SELFTEST is not set

#
# Bluetooth device drivers
#
CONFIG_BT_INTEL=y
CONFIG_BT_BCM=y
CONFIG_BT_RTL=y
CONFIG_BT_QCA=y
CONFIG_BT_MTK=y
CONFIG_BT_HCIBTUSB=y
CONFIG_BT_HCIBTUSB_AUTOSUSPEND=y
CONFIG_BT_HCIBTUSB_POLL_SYNC=y
CONFIG_BT_HCIBTUSB_BCM=y
CONFIG_BT_HCIBTUSB_MTK=y
CONFIG_BT_HCIBTUSB_RTL=y
# CONFIG_BT_HCIBTSDIO is not set
CONFIG_BT_HCIUART=y
CONFIG_BT_HCIUART_SERDEV=y
CONFIG_BT_HCIUART_H4=y
# CONFIG_BT_HCIUART_NOKIA is not set
CONFIG_BT_HCIUART_BCSP=y
# CONFIG_BT_HCIUART_ATH3K is not set
CONFIG_BT_HCIUART_LL=y
CONFIG_BT_HCIUART_3WIRE=y
# CONFIG_BT_HCIUART_INTEL is not set
# CONFIG_BT_HCIUART_BCM is not set
# CONFIG_BT_HCIUART_RTL is not set
CONFIG_BT_HCIUART_QCA=y
CONFIG_BT_HCIUART_AG6XX=y
CONFIG_BT_HCIUART_MRVL=y
# CONFIG_BT_HCIUART_AML is not set
CONFIG_BT_HCIBCM203X=y
# CONFIG_BT_HCIBCM4377 is not set
CONFIG_BT_HCIBPA10X=y
CONFIG_BT_HCIBFUSB=y
CONFIG_BT_HCIVHCI=y
CONFIG_BT_MRVL=y
CONFIG_BT_MRVL_SDIO=y
CONFIG_BT_ATH3K=y
CONFIG_BT_MTKSDIO=y
CONFIG_BT_MTKUART=y
# CONFIG_BT_VIRTIO is not set
# CONFIG_BT_NXPUART is not set
# CONFIG_BT_INTEL_PCIE is not set
# end of Bluetooth device drivers

CONFIG_AF_RXRPC=y
CONFIG_AF_RXRPC_IPV6=y
# CONFIG_AF_RXRPC_INJECT_LOSS is not set
# CONFIG_AF_RXRPC_INJECT_RX_DELAY is not set
# CONFIG_AF_RXRPC_DEBUG is not set
CONFIG_RXKAD=y
# CONFIG_RXGK is not set
# CONFIG_RXPERF is not set
CONFIG_AF_KCM=y
CONFIG_STREAM_PARSER=y
CONFIG_MCTP=y
CONFIG_FIB_RULES=y
CONFIG_WIRELESS=y
CONFIG_WEXT_CORE=y
CONFIG_WEXT_PROC=y
CONFIG_CFG80211=y
# CONFIG_NL80211_TESTMODE is not set
# CONFIG_CFG80211_DEVELOPER_WARNINGS is not set
# CONFIG_CFG80211_CERTIFICATION_ONUS is not set
CONFIG_CFG80211_REQUIRE_SIGNED_REGDB=y
CONFIG_CFG80211_USE_KERNEL_REGDB_KEYS=y
CONFIG_CFG80211_DEFAULT_PS=y
CONFIG_CFG80211_DEBUGFS=y
CONFIG_CFG80211_CRDA_SUPPORT=y
CONFIG_CFG80211_WEXT=y
CONFIG_MAC80211=y
CONFIG_MAC80211_HAS_RC=y
CONFIG_MAC80211_RC_MINSTREL=y
CONFIG_MAC80211_RC_DEFAULT_MINSTREL=y
CONFIG_MAC80211_RC_DEFAULT="minstrel_ht"
CONFIG_MAC80211_MESH=y
CONFIG_MAC80211_LEDS=y
CONFIG_MAC80211_DEBUGFS=y
# CONFIG_MAC80211_MESSAGE_TRACING is not set
# CONFIG_MAC80211_DEBUG_MENU is not set
CONFIG_MAC80211_STA_HASH_MAX_SIZE=0
CONFIG_RFKILL=y
CONFIG_RFKILL_LEDS=y
CONFIG_RFKILL_INPUT=y
# CONFIG_RFKILL_GPIO is not set
CONFIG_NET_9P=y
CONFIG_NET_9P_FD=y
CONFIG_NET_9P_VIRTIO=y
# CONFIG_NET_9P_USBG is not set
CONFIG_NET_9P_RDMA=y
# CONFIG_NET_9P_DEBUG is not set
CONFIG_CEPH_LIB=y
# CONFIG_CEPH_LIB_PRETTYDEBUG is not set
CONFIG_CEPH_LIB_USE_DNS_RESOLVER=y
CONFIG_NFC=y
CONFIG_NFC_DIGITAL=y
CONFIG_NFC_NCI=y
# CONFIG_NFC_NCI_SPI is not set
CONFIG_NFC_NCI_UART=y
CONFIG_NFC_HCI=y
CONFIG_NFC_SHDLC=y

#
# Near Field Communication (NFC) devices
#
# CONFIG_NFC_TRF7970A is not set
# CONFIG_NFC_MEI_PHY is not set
CONFIG_NFC_SIM=y
CONFIG_NFC_PORT100=y
CONFIG_NFC_VIRTUAL_NCI=y
CONFIG_NFC_FDP=y
# CONFIG_NFC_FDP_I2C is not set
# CONFIG_NFC_PN544_I2C is not set
CONFIG_NFC_PN533=y
CONFIG_NFC_PN533_USB=y
# CONFIG_NFC_PN533_I2C is not set
# CONFIG_NFC_PN532_UART is not set
# CONFIG_NFC_MICROREAD_I2C is not set
CONFIG_NFC_MRVL=y
CONFIG_NFC_MRVL_USB=y
# CONFIG_NFC_MRVL_UART is not set
# CONFIG_NFC_MRVL_I2C is not set
# CONFIG_NFC_ST21NFCA_I2C is not set
# CONFIG_NFC_ST_NCI_I2C is not set
# CONFIG_NFC_ST_NCI_SPI is not set
# CONFIG_NFC_NXP_NCI is not set
# CONFIG_NFC_S3FWRN5_I2C is not set
# CONFIG_NFC_S3FWRN82_UART is not set
# CONFIG_NFC_ST95HF is not set
# end of Near Field Communication (NFC) devices

CONFIG_PSAMPLE=y
CONFIG_NET_IFE=y
CONFIG_LWTUNNEL=y
CONFIG_LWTUNNEL_BPF=y
CONFIG_DST_CACHE=y
CONFIG_GRO_CELLS=y
CONFIG_SOCK_VALIDATE_XMIT=y
CONFIG_NET_SELFTESTS=y
CONFIG_NET_SOCK_MSG=y
CONFIG_NET_DEVLINK=y
CONFIG_PAGE_POOL=y
# CONFIG_PAGE_POOL_STATS is not set
CONFIG_FAILOVER=y
CONFIG_ETHTOOL_NETLINK=y

#
# Device Drivers
#
CONFIG_HAVE_PCI=y
CONFIG_GENERIC_PCI_IOMAP=y
CONFIG_PCI=y
CONFIG_PCI_DOMAINS=y
CONFIG_PCIEPORTBUS=y
CONFIG_HOTPLUG_PCI_PCIE=y
CONFIG_PCIEAER=y
# CONFIG_PCIEAER_INJECT is not set
# CONFIG_PCIE_ECRC is not set
CONFIG_PCIEASPM=y
CONFIG_PCIEASPM_DEFAULT=y
# CONFIG_PCIEASPM_POWERSAVE is not set
# CONFIG_PCIEASPM_POWER_SUPERSAVE is not set
# CONFIG_PCIEASPM_PERFORMANCE is not set
CONFIG_PCIE_PME=y
# CONFIG_PCIE_DPC is not set
# CONFIG_PCIE_PTM is not set
CONFIG_PCI_MSI=y
CONFIG_PCI_QUIRKS=y
# CONFIG_PCI_DEBUG is not set
# CONFIG_PCI_REALLOC_ENABLE_AUTO is not set
# CONFIG_PCI_STUB is not set
# CONFIG_PCI_PF_STUB is not set
CONFIG_PCI_ATS=y
# CONFIG_PCI_TSM is not set
# CONFIG_PCI_DOE is not set
CONFIG_PCI_ECAM=y
CONFIG_PCI_LOCKLESS_CONFIG=y
CONFIG_PCI_IOV=y
# CONFIG_PCI_NPEM is not set
CONFIG_PCI_PRI=y
CONFIG_PCI_PASID=y
# CONFIG_PCIE_TPH is not set
# CONFIG_PCI_P2PDMA is not set
CONFIG_PCI_LABEL=y
# CONFIG_PCI_DYNAMIC_OF_NODES is not set
CONFIG_VGA_ARB=y
CONFIG_VGA_ARB_MAX_GPUS=16
CONFIG_HOTPLUG_PCI=y
# CONFIG_HOTPLUG_PCI_ACPI is not set
# CONFIG_HOTPLUG_PCI_CPCI is not set
# CONFIG_HOTPLUG_PCI_OCTEONEP is not set
# CONFIG_HOTPLUG_PCI_SHPC is not set

#
# PCI controller drivers
#
CONFIG_PCI_HOST_COMMON=y
# CONFIG_PCI_FTPCI100 is not set
CONFIG_PCI_HOST_GENERIC=y
# CONFIG_VMD is not set
# CONFIG_PCIE_XILINX is not set

#
# Cadence-based PCIe controllers
#
# CONFIG_PCIE_CADENCE_PLAT_HOST is not set
# CONFIG_PCIE_CADENCE_PLAT_EP is not set
# end of Cadence-based PCIe controllers

#
# DesignWare-based PCIe controllers
#
# CONFIG_PCI_MESON is not set
# CONFIG_PCIE_INTEL_GW is not set
# CONFIG_PCIE_DW_PLAT_HOST is not set
# CONFIG_PCIE_DW_PLAT_EP is not set
# end of DesignWare-based PCIe controllers

#
# Mobiveil-based PCIe controllers
#
# end of Mobiveil-based PCIe controllers

#
# PLDA-based PCIe controllers
#
# CONFIG_PCIE_MICROCHIP_HOST is not set
# end of PLDA-based PCIe controllers
# end of PCI controller drivers

#
# PCI Endpoint
#
CONFIG_PCI_ENDPOINT=y
# CONFIG_PCI_ENDPOINT_CONFIGFS is not set
# CONFIG_PCI_ENDPOINT_MSI_DOORBELL is not set
# CONFIG_PCI_EPF_TEST is not set
# CONFIG_PCI_EPF_NTB is not set
# end of PCI Endpoint

#
# PCI switch controller drivers
#
# CONFIG_PCI_SW_SWITCHTEC is not set
# end of PCI switch controller drivers

# CONFIG_PCI_PWRCTRL_GENERIC is not set
# CONFIG_PCI_PWRCTRL_TC9563 is not set
# CONFIG_CXL_BUS is not set
CONFIG_PCCARD=y
CONFIG_PCMCIA=y
CONFIG_PCMCIA_LOAD_CIS=y
CONFIG_CARDBUS=y

#
# PC-card bridges
#
CONFIG_YENTA=y
CONFIG_YENTA_O2=y
CONFIG_YENTA_RICOH=y
CONFIG_YENTA_TI=y
CONFIG_YENTA_ENE_TUNE=y
CONFIG_YENTA_TOSHIBA=y
# CONFIG_PD6729 is not set
CONFIG_PCCARD_NONSTATIC=y
# CONFIG_RAPIDIO is not set
# CONFIG_PC104 is not set

#
# Generic Driver Options
#
CONFIG_AUXILIARY_BUS=y
CONFIG_UEVENT_HELPER=y
CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
CONFIG_DEVTMPFS=y
CONFIG_DEVTMPFS_MOUNT=y
# CONFIG_DEVTMPFS_SAFE is not set
CONFIG_DRIVER_DEFERRED_PROBE_TIMEOUT=10
CONFIG_STANDALONE=y
CONFIG_PREVENT_FIRMWARE_BUILD=y

#
# Firmware loader
#
CONFIG_FW_LOADER=y
# CONFIG_FW_LOADER_DEBUG is not set
CONFIG_FW_LOADER_PAGED_BUF=y
CONFIG_FW_LOADER_SYSFS=y
CONFIG_EXTRA_FIRMWARE=""
CONFIG_FW_LOADER_USER_HELPER=y
CONFIG_FW_LOADER_USER_HELPER_FALLBACK=y
CONFIG_FW_LOADER_COMPRESS=y
# CONFIG_FW_LOADER_COMPRESS_XZ is not set
# CONFIG_FW_LOADER_COMPRESS_ZSTD is not set
CONFIG_FW_CACHE=y
# CONFIG_FW_UPLOAD is not set
# end of Firmware loader

CONFIG_WANT_DEV_COREDUMP=y
CONFIG_ALLOW_DEV_COREDUMP=y
CONFIG_DEV_COREDUMP=y
# CONFIG_DEBUG_DRIVER is not set
CONFIG_DEBUG_DEVRES=y
# CONFIG_DEBUG_TEST_DRIVER_REMOVE is not set
# CONFIG_TEST_ASYNC_DRIVER_PROBE is not set
CONFIG_GENERIC_CPU_DEVICES=y
CONFIG_GENERIC_CPU_AUTOPROBE=y
CONFIG_GENERIC_CPU_VULNERABILITIES=y
CONFIG_REGMAP=y
CONFIG_REGMAP_I2C=y
CONFIG_REGMAP_SPI=y
CONFIG_REGMAP_MMIO=y
CONFIG_REGMAP_IRQ=y
CONFIG_DMA_SHARED_BUFFER=y
# CONFIG_DMA_FENCE_TRACE is not set
# CONFIG_FW_DEVLINK_SYNC_STATE_TIMEOUT is not set
# end of Generic Driver Options

#
# Bus devices
#
# CONFIG_MOXTET is not set
CONFIG_MHI_BUS=y
# CONFIG_MHI_BUS_DEBUG is not set
# CONFIG_MHI_BUS_PCI_GENERIC is not set
# CONFIG_MHI_BUS_EP is not set
# end of Bus devices

CONFIG_CONNECTOR=y
CONFIG_PROC_EVENTS=y

#
# Firmware Drivers
#

#
# ARM System Control and Management Interface Protocol
#
# end of ARM System Control and Management Interface Protocol

# CONFIG_EDD is not set
CONFIG_FIRMWARE_MEMMAP=y
CONFIG_DMIID=y
# CONFIG_DMI_SYSFS is not set
CONFIG_DMI_SCAN_MACHINE_NON_EFI_FALLBACK=y
# CONFIG_ISCSI_IBFT is not set
# CONFIG_FW_CFG_SYSFS is not set
CONFIG_SYSFB=y
# CONFIG_SYSFB_SIMPLEFB is not set
CONFIG_GOOGLE_FIRMWARE=y
# CONFIG_GOOGLE_SMI is not set
# CONFIG_GOOGLE_CBMEM is not set
CONFIG_GOOGLE_COREBOOT_TABLE=y
CONFIG_GOOGLE_MEMCONSOLE=y
# CONFIG_GOOGLE_MEMCONSOLE_X86_LEGACY is not set
# CONFIG_GOOGLE_FRAMEBUFFER_COREBOOT is not set
CONFIG_GOOGLE_MEMCONSOLE_COREBOOT=y
CONFIG_GOOGLE_VPD=y

#
# Qualcomm firmware drivers
#
# end of Qualcomm firmware drivers

#
# Tegra firmware driver
#
# end of Tegra firmware driver
# end of Firmware Drivers

# CONFIG_FWCTL is not set
CONFIG_GNSS=y
# CONFIG_GNSS_MTK_SERIAL is not set
# CONFIG_GNSS_SIRF_SERIAL is not set
# CONFIG_GNSS_UBX_SERIAL is not set
CONFIG_GNSS_USB=y
CONFIG_MTD=y
# CONFIG_MTD_TESTS is not set

#
# Partition parsers
#
# CONFIG_MTD_CMDLINE_PARTS is not set
# CONFIG_MTD_OF_PARTS is not set
# CONFIG_MTD_REDBOOT_PARTS is not set
# end of Partition parsers

#
# User Modules And Translation Layers
#
CONFIG_MTD_BLKDEVS=y
CONFIG_MTD_BLOCK=y

#
# Note that in some cases UBI block is preferred. See MTD_UBI_BLOCK.
#
CONFIG_FTL=y
# CONFIG_NFTL is not set
# CONFIG_INFTL is not set
# CONFIG_RFD_FTL is not set
# CONFIG_SSFDC is not set
# CONFIG_SM_FTL is not set
# CONFIG_MTD_OOPS is not set
# CONFIG_MTD_SWAP is not set
# CONFIG_MTD_PARTITIONED_MASTER is not set

#
# RAM/ROM/Flash chip drivers
#
# CONFIG_MTD_CFI is not set
# CONFIG_MTD_JEDECPROBE is not set
CONFIG_MTD_MAP_BANK_WIDTH_1=y
CONFIG_MTD_MAP_BANK_WIDTH_2=y
CONFIG_MTD_MAP_BANK_WIDTH_4=y
CONFIG_MTD_CFI_I1=y
CONFIG_MTD_CFI_I2=y
# CONFIG_MTD_RAM is not set
# CONFIG_MTD_ROM is not set
# CONFIG_MTD_ABSENT is not set
# end of RAM/ROM/Flash chip drivers

#
# Mapping drivers for chip access
#
# CONFIG_MTD_COMPLEX_MAPPINGS is not set
# CONFIG_MTD_PLATRAM is not set
# end of Mapping drivers for chip access

#
# Self-contained MTD device drivers
#
# CONFIG_MTD_PMC551 is not set
# CONFIG_MTD_DATAFLASH is not set
# CONFIG_MTD_MCHP23K256 is not set
# CONFIG_MTD_MCHP48L640 is not set
# CONFIG_MTD_SST25L is not set
CONFIG_MTD_SLRAM=y
CONFIG_MTD_PHRAM=y
CONFIG_MTD_MTDRAM=y
CONFIG_MTDRAM_TOTAL_SIZE=128
CONFIG_MTDRAM_ERASE_SIZE=4
CONFIG_MTD_BLOCK2MTD=y
# CONFIG_MTD_INTEL_DG is not set

#
# Disk-On-Chip Device Drivers
#
# CONFIG_MTD_DOCG3 is not set
# end of Self-contained MTD device drivers

#
# NAND
#
# CONFIG_MTD_ONENAND is not set
# CONFIG_MTD_RAW_NAND is not set
# CONFIG_MTD_SPI_NAND is not set

#
# ECC engine support
#
# CONFIG_MTD_NAND_ECC_SW_HAMMING is not set
# CONFIG_MTD_NAND_ECC_SW_BCH is not set
# CONFIG_MTD_NAND_ECC_MXIC is not set
# end of ECC engine support
# end of NAND

#
# LPDDR & LPDDR2 PCM memory drivers
#
# CONFIG_MTD_LPDDR is not set
# end of LPDDR & LPDDR2 PCM memory drivers

# CONFIG_MTD_SPI_NOR is not set
CONFIG_MTD_UBI=y
CONFIG_MTD_UBI_WL_THRESHOLD=4096
CONFIG_MTD_UBI_BEB_LIMIT=20
# CONFIG_MTD_UBI_FASTMAP is not set
# CONFIG_MTD_UBI_GLUEBI is not set
# CONFIG_MTD_UBI_BLOCK is not set
# CONFIG_MTD_UBI_FAULT_INJECTION is not set
# CONFIG_MTD_UBI_NVMEM is not set
# CONFIG_MTD_HYPERBUS is not set
CONFIG_DTC=y
CONFIG_OF=y
# CONFIG_OF_UNITTEST is not set
CONFIG_OF_FLATTREE=y
CONFIG_OF_EARLY_FLATTREE=y
CONFIG_OF_KOBJ=y
CONFIG_OF_ADDRESS=y
CONFIG_OF_IRQ=y
CONFIG_OF_RESERVED_MEM=y
# CONFIG_OF_OVERLAY is not set
CONFIG_OF_NUMA=y
CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y
CONFIG_PARPORT=y
# CONFIG_PARPORT_PC is not set
# CONFIG_PARPORT_1284 is not set
CONFIG_PARPORT_NOT_PC=y
CONFIG_PNP=y
CONFIG_PNP_DEBUG_MESSAGES=y

#
# Protocols
#
CONFIG_PNPACPI=y
CONFIG_BLK_DEV=y
CONFIG_BLK_DEV_NULL_BLK=y
CONFIG_BLK_DEV_NULL_BLK_FAULT_INJECTION=y
# CONFIG_BLK_DEV_FD is not set
CONFIG_CDROM=y
# CONFIG_BLK_DEV_PCIESSD_MTIP32XX is not set
CONFIG_ZRAM=y
# CONFIG_ZRAM_BACKEND_LZ4 is not set
# CONFIG_ZRAM_BACKEND_LZ4HC is not set
# CONFIG_ZRAM_BACKEND_ZSTD is not set
# CONFIG_ZRAM_BACKEND_DEFLATE is not set
# CONFIG_ZRAM_BACKEND_842 is not set
CONFIG_ZRAM_BACKEND_FORCE_LZO=y
CONFIG_ZRAM_BACKEND_LZO=y
# CONFIG_ZRAM_DEF_COMP_LZORLE is not set
CONFIG_ZRAM_DEF_COMP_LZO=y
CONFIG_ZRAM_DEF_COMP="lzo"
# CONFIG_ZRAM_WRITEBACK is not set
# CONFIG_ZRAM_TRACK_ENTRY_ACTIME is not set
# CONFIG_ZRAM_MEMORY_TRACKING is not set
# CONFIG_ZRAM_MULTI_COMP is not set
CONFIG_BLK_DEV_LOOP=y
CONFIG_BLK_DEV_LOOP_MIN_COUNT=16
# CONFIG_BLK_DEV_DRBD is not set
CONFIG_BLK_DEV_NBD=y
CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_RAM_COUNT=16
CONFIG_BLK_DEV_RAM_SIZE=4096
CONFIG_ATA_OVER_ETH=y
CONFIG_VIRTIO_BLK=y
# CONFIG_BLK_DEV_RBD is not set
CONFIG_BLK_DEV_UBLK=y
CONFIG_BLKDEV_UBLK_LEGACY_OPCODES=y
CONFIG_BLK_DEV_RNBD=y
CONFIG_BLK_DEV_RNBD_CLIENT=y
# CONFIG_BLK_DEV_ZONED_LOOP is not set

#
# NVME Support
#
CONFIG_NVME_CORE=y
CONFIG_BLK_DEV_NVME=y
CONFIG_NVME_MULTIPATH=y
# CONFIG_NVME_VERBOSE_ERRORS is not set
# CONFIG_NVME_HWMON is not set
CONFIG_NVME_FABRICS=y
CONFIG_NVME_RDMA=y
CONFIG_NVME_FC=y
CONFIG_NVME_TCP=y
# CONFIG_NVME_TCP_TLS is not set
# CONFIG_NVME_HOST_AUTH is not set
CONFIG_NVME_TARGET=y
# CONFIG_NVME_TARGET_DEBUGFS is not set
# CONFIG_NVME_TARGET_PASSTHRU is not set
CONFIG_NVME_TARGET_LOOP=y
CONFIG_NVME_TARGET_RDMA=y
CONFIG_NVME_TARGET_FC=y
CONFIG_NVME_TARGET_FCLOOP=y
CONFIG_NVME_TARGET_TCP=y
# CONFIG_NVME_TARGET_TCP_TLS is not set
# CONFIG_NVME_TARGET_AUTH is not set
# CONFIG_NVME_TARGET_PCI_EPF is not set
# end of NVME Support

#
# Misc devices
#
# CONFIG_AD525X_DPOT is not set
# CONFIG_DUMMY_IRQ is not set
# CONFIG_IBM_ASM is not set
# CONFIG_PHANTOM is not set
# CONFIG_RPMB is not set
# CONFIG_TI_FPC202 is not set
# CONFIG_TIFM_CORE is not set
# CONFIG_ICS932S401 is not set
# CONFIG_ENCLOSURE_SERVICES is not set
# CONFIG_HP_ILO is not set
# CONFIG_APDS9802ALS is not set
# CONFIG_ISL29003 is not set
# CONFIG_ISL29020 is not set
# CONFIG_SENSORS_TSL2550 is not set
# CONFIG_SENSORS_BH1770 is not set
# CONFIG_HMC6352 is not set
# CONFIG_DS1682 is not set
# CONFIG_VMWARE_BALLOON is not set
# CONFIG_LATTICE_ECP3_CONFIG is not set
# CONFIG_SRAM is not set
# CONFIG_DW_XDATA_PCIE is not set
# CONFIG_PCI_ENDPOINT_TEST is not set
# CONFIG_XILINX_SDFEC is not set
CONFIG_MISC_RTSX=y
# CONFIG_HISI_HIKEY_USB is not set
# CONFIG_OPEN_DICE is not set
# CONFIG_NTSYNC is not set
# CONFIG_VCPU_STALL_DETECTOR is not set
# CONFIG_NSM is not set
# CONFIG_C2PORT is not set

#
# EEPROM support
#
# CONFIG_EEPROM_AT24 is not set
# CONFIG_EEPROM_AT25 is not set
# CONFIG_EEPROM_MAX6875 is not set
CONFIG_EEPROM_93CX6=y
# CONFIG_EEPROM_93XX46 is not set
# CONFIG_EEPROM_IDT_89HPESX is not set
# CONFIG_EEPROM_EE1004 is not set
# CONFIG_EEPROM_M24LR is not set
# end of EEPROM support

# CONFIG_CB710_CORE is not set
# CONFIG_SENSORS_LIS3_I2C is not set
# CONFIG_ALTERA_STAPL is not set
CONFIG_INTEL_MEI=y
CONFIG_INTEL_MEI_ME=y
# CONFIG_INTEL_MEI_TXE is not set
# CONFIG_INTEL_MEI_GSC is not set
# CONFIG_INTEL_MEI_CSC is not set
# CONFIG_INTEL_MEI_VSC_HW is not set
# CONFIG_INTEL_MEI_HDCP is not set
# CONFIG_INTEL_MEI_PXP is not set
# CONFIG_INTEL_MEI_GSC_PROXY is not set
CONFIG_VMWARE_VMCI=y
# CONFIG_GENWQE is not set
# CONFIG_BCM_VK is not set
# CONFIG_MISC_ALCOR_PCI is not set
# CONFIG_MISC_RTSX_PCI is not set
CONFIG_MISC_RTSX_USB=y
# CONFIG_UACCE is not set
# CONFIG_PVPANIC is not set
# CONFIG_GP_PCI1XXXX is not set
# CONFIG_KEBA_CP500 is not set
# CONFIG_MISC_RP1 is not set
# end of Misc devices

#
# SCSI device support
#
CONFIG_SCSI_MOD=y
CONFIG_RAID_ATTRS=y
CONFIG_SCSI_COMMON=y
CONFIG_SCSI=y
CONFIG_SCSI_DMA=y
CONFIG_SCSI_NETLINK=y
CONFIG_SCSI_PROC_FS=y

#
# SCSI support type (disk, tape, CD-ROM)
#
CONFIG_BLK_DEV_SD=y
CONFIG_CHR_DEV_ST=y
CONFIG_BLK_DEV_SR=y
CONFIG_CHR_DEV_SG=y
CONFIG_BLK_DEV_BSG=y
# CONFIG_CHR_DEV_SCH is not set
CONFIG_SCSI_CONSTANTS=y
CONFIG_SCSI_LOGGING=y
CONFIG_SCSI_SCAN_ASYNC=y

#
# SCSI Transports
#
CONFIG_SCSI_SPI_ATTRS=y
CONFIG_SCSI_FC_ATTRS=y
CONFIG_SCSI_ISCSI_ATTRS=y
CONFIG_SCSI_SAS_ATTRS=y
CONFIG_SCSI_SAS_LIBSAS=y
CONFIG_SCSI_SAS_ATA=y
# CONFIG_SCSI_SAS_HOST_SMP is not set
CONFIG_SCSI_SRP_ATTRS=y
# end of SCSI Transports

CONFIG_SCSI_LOWLEVEL=y
# CONFIG_ISCSI_TCP is not set
# CONFIG_ISCSI_BOOT_SYSFS is not set
# CONFIG_SCSI_CXGB3_ISCSI is not set
# CONFIG_SCSI_CXGB4_ISCSI is not set
# CONFIG_SCSI_BNX2_ISCSI is not set
# CONFIG_BE2ISCSI is not set
# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
CONFIG_SCSI_HPSA=y
# CONFIG_SCSI_3W_9XXX is not set
# CONFIG_SCSI_3W_SAS is not set
# CONFIG_SCSI_ACARD is not set
# CONFIG_SCSI_AACRAID is not set
# CONFIG_SCSI_AIC7XXX is not set
# CONFIG_SCSI_AIC79XX is not set
# CONFIG_SCSI_AIC94XX is not set
# CONFIG_SCSI_MVSAS is not set
# CONFIG_SCSI_MVUMI is not set
# CONFIG_SCSI_ADVANSYS is not set
# CONFIG_SCSI_ARCMSR is not set
# CONFIG_SCSI_ESAS2R is not set
# CONFIG_MEGARAID_NEWGEN is not set
# CONFIG_MEGARAID_LEGACY is not set
# CONFIG_MEGARAID_SAS is not set
# CONFIG_SCSI_MPT3SAS is not set
# CONFIG_SCSI_MPT2SAS is not set
# CONFIG_SCSI_MPI3MR is not set
# CONFIG_SCSI_SMARTPQI is not set
# CONFIG_SCSI_HPTIOP is not set
# CONFIG_SCSI_BUSLOGIC is not set
# CONFIG_SCSI_MYRB is not set
# CONFIG_SCSI_MYRS is not set
# CONFIG_VMWARE_PVSCSI is not set
# CONFIG_LIBFC is not set
# CONFIG_SCSI_SNIC is not set
# CONFIG_SCSI_DMX3191D is not set
# CONFIG_SCSI_FDOMAIN_PCI is not set
# CONFIG_SCSI_ISCI is not set
# CONFIG_SCSI_IPS is not set
# CONFIG_SCSI_INITIO is not set
# CONFIG_SCSI_INIA100 is not set
# CONFIG_SCSI_STEX is not set
# CONFIG_SCSI_SYM53C8XX_2 is not set
# CONFIG_SCSI_IPR is not set
# CONFIG_SCSI_QLOGIC_1280 is not set
# CONFIG_SCSI_QLA_FC is not set
# CONFIG_SCSI_QLA_ISCSI is not set
# CONFIG_SCSI_LPFC is not set
# CONFIG_SCSI_EFCT is not set
# CONFIG_SCSI_DC395x is not set
# CONFIG_SCSI_AM53C974 is not set
# CONFIG_SCSI_WD719X is not set
# CONFIG_SCSI_DEBUG is not set
# CONFIG_SCSI_PMCRAID is not set
# CONFIG_SCSI_PM8001 is not set
# CONFIG_SCSI_BFA_FC is not set
CONFIG_SCSI_VIRTIO=y
# CONFIG_SCSI_CHELSIO_FCOE is not set
# CONFIG_SCSI_LOWLEVEL_PCMCIA is not set
# CONFIG_SCSI_DH is not set
# end of SCSI device support

CONFIG_ATA=y
CONFIG_SATA_HOST=y
CONFIG_PATA_TIMINGS=y
CONFIG_ATA_VERBOSE_ERROR=y
CONFIG_ATA_FORCE=y
CONFIG_ATA_ACPI=y
# CONFIG_SATA_ZPODD is not set
CONFIG_SATA_PMP=y

#
# Controllers with non-SFF native interface
#
CONFIG_SATA_AHCI=y
CONFIG_SATA_MOBILE_LPM_POLICY=3
# CONFIG_SATA_AHCI_PLATFORM is not set
# CONFIG_AHCI_DWC is not set
# CONFIG_AHCI_CEVA is not set
# CONFIG_SATA_INIC162X is not set
# CONFIG_SATA_ACARD_AHCI is not set
# CONFIG_SATA_SIL24 is not set
CONFIG_ATA_SFF=y

#
# SFF controllers with custom DMA interface
#
# CONFIG_PDC_ADMA is not set
# CONFIG_SATA_QSTOR is not set
# CONFIG_SATA_SX4 is not set
CONFIG_ATA_BMDMA=y

#
# SATA SFF controllers with BMDMA
#
CONFIG_ATA_PIIX=y
# CONFIG_SATA_DWC is not set
# CONFIG_SATA_MV is not set
# CONFIG_SATA_NV is not set
# CONFIG_SATA_PROMISE is not set
# CONFIG_SATA_SIL is not set
# CONFIG_SATA_SIS is not set
# CONFIG_SATA_SVW is not set
# CONFIG_SATA_ULI is not set
# CONFIG_SATA_VIA is not set
# CONFIG_SATA_VITESSE is not set

#
# PATA SFF controllers with BMDMA
#
# CONFIG_PATA_ALI is not set
CONFIG_PATA_AMD=y
# CONFIG_PATA_ARTOP is not set
# CONFIG_PATA_ATIIXP is not set
# CONFIG_PATA_ATP867X is not set
# CONFIG_PATA_CMD64X is not set
# CONFIG_PATA_CYPRESS is not set
# CONFIG_PATA_EFAR is not set
# CONFIG_PATA_HPT366 is not set
# CONFIG_PATA_HPT37X is not set
# CONFIG_PATA_HPT3X2N is not set
# CONFIG_PATA_HPT3X3 is not set
# CONFIG_PATA_IT8213 is not set
# CONFIG_PATA_IT821X is not set
# CONFIG_PATA_JMICRON is not set
# CONFIG_PATA_MARVELL is not set
# CONFIG_PATA_NETCELL is not set
# CONFIG_PATA_NINJA32 is not set
# CONFIG_PATA_NS87415 is not set
CONFIG_PATA_OLDPIIX=y
# CONFIG_PATA_OPTIDMA is not set
# CONFIG_PATA_PDC2027X is not set
# CONFIG_PATA_PDC_OLD is not set
# CONFIG_PATA_RADISYS is not set
# CONFIG_PATA_RDC is not set
CONFIG_PATA_SCH=y
# CONFIG_PATA_SERVERWORKS is not set
# CONFIG_PATA_SIL680 is not set
# CONFIG_PATA_SIS is not set
# CONFIG_PATA_TOSHIBA is not set
# CONFIG_PATA_TRIFLEX is not set
# CONFIG_PATA_VIA is not set
# CONFIG_PATA_WINBOND is not set

#
# PIO-only SFF controllers
#
# CONFIG_PATA_CMD640_PCI is not set
# CONFIG_PATA_MPIIX is not set
# CONFIG_PATA_NS87410 is not set
# CONFIG_PATA_OPTI is not set
# CONFIG_PATA_PCMCIA is not set
# CONFIG_PATA_OF_PLATFORM is not set
# CONFIG_PATA_RZ1000 is not set

#
# Generic fallback / legacy drivers
#
# CONFIG_PATA_ACPI is not set
CONFIG_ATA_GENERIC=y
# CONFIG_PATA_LEGACY is not set
CONFIG_MD=y
CONFIG_BLK_DEV_MD=y
CONFIG_MD_BITMAP=y
# CONFIG_MD_LLBITMAP is not set
CONFIG_MD_AUTODETECT=y
CONFIG_MD_BITMAP_FILE=y
# CONFIG_MD_LINEAR is not set
CONFIG_MD_RAID0=y
CONFIG_MD_RAID1=y
CONFIG_MD_RAID10=y
CONFIG_MD_RAID456=y
# CONFIG_MD_CLUSTER is not set
CONFIG_BCACHE=y
# CONFIG_BCACHE_DEBUG is not set
# CONFIG_BCACHE_ASYNC_REGISTRATION is not set
CONFIG_BLK_DEV_DM_BUILTIN=y
CONFIG_BLK_DEV_DM=y
# CONFIG_DM_DEBUG is not set
CONFIG_DM_BUFIO=y
# CONFIG_DM_DEBUG_BLOCK_MANAGER_LOCKING is not set
CONFIG_DM_BIO_PRISON=y
CONFIG_DM_PERSISTENT_DATA=y
# CONFIG_DM_UNSTRIPED is not set
CONFIG_DM_CRYPT=y
# CONFIG_DM_INLINECRYPT is not set
CONFIG_DM_SNAPSHOT=y
CONFIG_DM_THIN_PROVISIONING=y
CONFIG_DM_CACHE=y
CONFIG_DM_CACHE_SMQ=y
CONFIG_DM_WRITECACHE=y
# CONFIG_DM_EBS is not set
# CONFIG_DM_ERA is not set
CONFIG_DM_CLONE=y
CONFIG_DM_MIRROR=y
# CONFIG_DM_LOG_USERSPACE is not set
CONFIG_DM_RAID=y
CONFIG_DM_ZERO=y
CONFIG_DM_MULTIPATH=y
CONFIG_DM_MULTIPATH_QL=y
CONFIG_DM_MULTIPATH_ST=y
# CONFIG_DM_MULTIPATH_HST is not set
# CONFIG_DM_MULTIPATH_IOA is not set
# CONFIG_DM_DELAY is not set
# CONFIG_DM_DUST is not set
# CONFIG_DM_INIT is not set
CONFIG_DM_UEVENT=y
CONFIG_DM_FLAKEY=y
CONFIG_DM_VERITY=y
# CONFIG_DM_VERITY_VERIFY_ROOTHASH_SIG is not set
CONFIG_DM_VERITY_FEC=y
# CONFIG_DM_SWITCH is not set
# CONFIG_DM_LOG_WRITES is not set
CONFIG_DM_INTEGRITY=y
CONFIG_DM_ZONED=y
CONFIG_DM_AUDIT=y
# CONFIG_DM_VDO is not set
# CONFIG_DM_PCACHE is not set
CONFIG_TARGET_CORE=y
# CONFIG_TCM_IBLOCK is not set
# CONFIG_TCM_FILEIO is not set
# CONFIG_TCM_PSCSI is not set
# CONFIG_LOOPBACK_TARGET is not set
# CONFIG_ISCSI_TARGET is not set
# CONFIG_SBP_TARGET is not set
# CONFIG_REMOTE_TARGET is not set
# CONFIG_FUSION is not set

#
# IEEE 1394 (FireWire) support
#
CONFIG_FIREWIRE=y
CONFIG_FIREWIRE_OHCI=y
CONFIG_FIREWIRE_SBP2=y
CONFIG_FIREWIRE_NET=y
# CONFIG_FIREWIRE_NOSY is not set
# end of IEEE 1394 (FireWire) support

# CONFIG_MACINTOSH_DRIVERS is not set
CONFIG_NETDEVICES=y
CONFIG_MII=y
CONFIG_NET_CORE=y
CONFIG_BONDING=y
CONFIG_DUMMY=y
CONFIG_WIREGUARD=y
# CONFIG_WIREGUARD_DEBUG is not set
# CONFIG_OVPN is not set
CONFIG_EQUALIZER=y
CONFIG_NET_FC=y
CONFIG_IFB=y
CONFIG_NET_TEAM=y
CONFIG_NET_TEAM_MODE_BROADCAST=y
CONFIG_NET_TEAM_MODE_ROUNDROBIN=y
CONFIG_NET_TEAM_MODE_RANDOM=y
CONFIG_NET_TEAM_MODE_ACTIVEBACKUP=y
CONFIG_NET_TEAM_MODE_LOADBALANCE=y
CONFIG_MACVLAN=y
CONFIG_MACVTAP=y
CONFIG_IPVLAN_L3S=y
CONFIG_IPVLAN=y
CONFIG_IPVTAP=y
CONFIG_VXLAN=y
CONFIG_GENEVE=y
CONFIG_BAREUDP=y
CONFIG_GTP=y
# CONFIG_PFCP is not set
# CONFIG_AMT is not set
CONFIG_MACSEC=y
CONFIG_NETCONSOLE=y
# CONFIG_NETCONSOLE_DYNAMIC is not set
# CONFIG_NETCONSOLE_EXTENDED_LOG is not set
CONFIG_NETPOLL=y
CONFIG_NET_POLL_CONTROLLER=y
CONFIG_TUN=y
CONFIG_TAP=y
CONFIG_TUN_VNET_CROSS_LE=y
CONFIG_VETH=y
CONFIG_VIRTIO_NET=y
CONFIG_NLMON=y
# CONFIG_NETKIT is not set
CONFIG_NET_VRF=y
CONFIG_VSOCKMON=y
# CONFIG_MHI_NET is not set
# CONFIG_ARCNET is not set
CONFIG_ATM_DRIVERS=y
# CONFIG_ATM_SOLOS is not set

#
# Distributed Switch Architecture drivers
#
# CONFIG_B53 is not set
# CONFIG_NET_DSA_BCM_SF2 is not set
# CONFIG_NET_DSA_LOOP is not set
# CONFIG_NET_DSA_HIRSCHMANN_HELLCREEK is not set
# CONFIG_NET_DSA_LANTIQ_GSWIP is not set
# CONFIG_NET_DSA_MXL_GSW1XX is not set
# CONFIG_NET_DSA_MT7530 is not set
# CONFIG_NET_DSA_MV88E6060 is not set
# CONFIG_NET_DSA_MICROCHIP_KSZ_COMMON is not set
# CONFIG_NET_DSA_MV88E6XXX is not set
# CONFIG_NET_DSA_MXL862 is not set
# CONFIG_NET_DSA_AR9331 is not set
# CONFIG_NET_DSA_QCA8K is not set
# CONFIG_NET_DSA_SJA1105 is not set
# CONFIG_NET_DSA_XRS700X_I2C is not set
# CONFIG_NET_DSA_XRS700X_MDIO is not set
# CONFIG_NET_DSA_REALTEK is not set
# CONFIG_NET_DSA_KS8995 is not set
# CONFIG_NET_DSA_SMSC_LAN9303_I2C is not set
# CONFIG_NET_DSA_SMSC_LAN9303_MDIO is not set
# CONFIG_NET_DSA_VITESSE_VSC73XX_SPI is not set
# CONFIG_NET_DSA_VITESSE_VSC73XX_PLATFORM is not set
# CONFIG_NET_DSA_YT921X is not set
# end of Distributed Switch Architecture drivers

CONFIG_ETHERNET=y
# CONFIG_NET_VENDOR_3COM is not set
# CONFIG_NET_VENDOR_ADAPTEC is not set
# CONFIG_NET_VENDOR_AGERE is not set
# CONFIG_NET_VENDOR_ALACRITECH is not set
CONFIG_NET_VENDOR_ALIBABA=y
# CONFIG_ALIBABA_EEA is not set
# CONFIG_ALTERA_TSE is not set
CONFIG_NET_VENDOR_AMAZON=y
# CONFIG_ENA_ETHERNET is not set
# CONFIG_NET_VENDOR_AMD is not set
# CONFIG_NET_VENDOR_AQUANTIA is not set
# CONFIG_NET_VENDOR_ARC is not set
CONFIG_NET_VENDOR_ASIX=y
# CONFIG_SPI_AX88796C is not set
# CONFIG_NET_VENDOR_ATHEROS is not set
# CONFIG_CX_ECAT is not set
# CONFIG_NET_VENDOR_BROADCOM is not set
# CONFIG_NET_VENDOR_CADENCE is not set
# CONFIG_NET_VENDOR_CAVIUM is not set
# CONFIG_NET_VENDOR_CHELSIO is not set
CONFIG_NET_VENDOR_CISCO=y
# CONFIG_ENIC is not set
# CONFIG_NET_VENDOR_CORTINA is not set
CONFIG_NET_VENDOR_DAVICOM=y
# CONFIG_DM9051 is not set
# CONFIG_NET_VENDOR_DEC is not set
# CONFIG_NET_VENDOR_DLINK is not set
# CONFIG_NET_VENDOR_EMULEX is not set
CONFIG_NET_VENDOR_ENGLEDER=y
# CONFIG_TSNEP is not set
# CONFIG_NET_VENDOR_EZCHIP is not set
CONFIG_NET_VENDOR_FUNGIBLE=y
# CONFIG_FUN_ETH is not set
CONFIG_NET_VENDOR_GOOGLE=y
CONFIG_GVE=y
CONFIG_NET_VENDOR_HISILICON=y
# CONFIG_HIBMCGE is not set
# CONFIG_NET_VENDOR_HUAWEI is not set
CONFIG_NET_VENDOR_I825XX=y
CONFIG_NET_VENDOR_INTEL=y
CONFIG_E100=y
CONFIG_E1000=y
CONFIG_E1000E=y
CONFIG_E1000E_HWTS=y
# CONFIG_IGB is not set
# CONFIG_IGBVF is not set
# CONFIG_IXGBE is not set
# CONFIG_IXGBEVF is not set
# CONFIG_I40E is not set
# CONFIG_I40EVF is not set
# CONFIG_ICE is not set
# CONFIG_FM10K is not set
# CONFIG_IGC is not set
# CONFIG_IDPF is not set
# CONFIG_JME is not set
# CONFIG_NET_VENDOR_ADI is not set
CONFIG_NET_VENDOR_LITEX=y
# CONFIG_LITEX_LITEETH is not set
# CONFIG_NET_VENDOR_MARVELL is not set
CONFIG_NET_VENDOR_MELLANOX=y
# CONFIG_MLX4_EN is not set
CONFIG_MLX4_CORE=y
# CONFIG_MLX4_DEBUG is not set
# CONFIG_MLX4_CORE_GEN2 is not set
# CONFIG_MLX5_CORE is not set
# CONFIG_MLXSW_CORE is not set
# CONFIG_MLXFW is not set
CONFIG_NET_VENDOR_META=y
# CONFIG_FBNIC is not set
# CONFIG_NET_VENDOR_MICREL is not set
# CONFIG_NET_VENDOR_MICROCHIP is not set
# CONFIG_NET_VENDOR_MICROSEMI is not set
CONFIG_NET_VENDOR_MICROSOFT=y
CONFIG_NET_VENDOR_MUCSE=y
# CONFIG_MGBE is not set
# CONFIG_NET_VENDOR_MYRI is not set
# CONFIG_FEALNX is not set
# CONFIG_NET_VENDOR_NI is not set
# CONFIG_NET_VENDOR_NATSEMI is not set
# CONFIG_NET_VENDOR_NETRONOME is not set
# CONFIG_NET_VENDOR_NVIDIA is not set
# CONFIG_NET_VENDOR_OKI is not set
# CONFIG_ETHOC is not set
# CONFIG_NET_VENDOR_PENSANDO is not set
# CONFIG_NET_VENDOR_QLOGIC is not set
# CONFIG_NET_VENDOR_BROCADE is not set
# CONFIG_NET_VENDOR_QUALCOMM is not set
# CONFIG_NET_VENDOR_RDC is not set
# CONFIG_NET_VENDOR_REALTEK is not set
# CONFIG_NET_VENDOR_RENESAS is not set
# CONFIG_NET_VENDOR_ROCKER is not set
# CONFIG_NET_VENDOR_SAMSUNG is not set
# CONFIG_NET_VENDOR_SEEQ is not set
# CONFIG_NET_VENDOR_SILAN is not set
# CONFIG_NET_VENDOR_SIS is not set
# CONFIG_NET_VENDOR_SOLARFLARE is not set
# CONFIG_NET_VENDOR_SMSC is not set
# CONFIG_NET_VENDOR_SOCIONEXT is not set
# CONFIG_NET_VENDOR_STMICRO is not set
# CONFIG_NET_VENDOR_SUN is not set
# CONFIG_NET_VENDOR_SYNOPSYS is not set
# CONFIG_NET_VENDOR_TEHUTI is not set
# CONFIG_NET_VENDOR_TI is not set
CONFIG_NET_VENDOR_VERTEXCOM=y
# CONFIG_MSE102X is not set
# CONFIG_NET_VENDOR_VIA is not set
CONFIG_NET_VENDOR_WANGXUN=y
# CONFIG_NGBE is not set
# CONFIG_TXGBE is not set
# CONFIG_TXGBEVF is not set
# CONFIG_NGBEVF is not set
# CONFIG_NET_VENDOR_WIZNET is not set
# CONFIG_NET_VENDOR_XILINX is not set
# CONFIG_NET_VENDOR_XIRCOM is not set
CONFIG_FDDI=y
# CONFIG_DEFXX is not set
# CONFIG_SKFP is not set
CONFIG_PHYLINK=y
CONFIG_PHYLIB=y
CONFIG_SWPHY=y
CONFIG_PHY_PACKAGE=y
# CONFIG_LED_TRIGGER_PHY is not set
CONFIG_PHYLIB_LEDS=y
CONFIG_FIXED_PHY=y
# CONFIG_SFP is not set

#
# MII PHY device drivers
#
# CONFIG_AS21XXX_PHY is not set
# CONFIG_AIR_AN8801_PHY is not set
# CONFIG_AIR_EN8811H_PHY is not set
# CONFIG_AMD_PHY is not set
# CONFIG_ADIN_PHY is not set
# CONFIG_ADIN1100_PHY is not set
# CONFIG_AQUANTIA_PHY is not set
CONFIG_AX88796B_PHY=y
# CONFIG_BROADCOM_PHY is not set
# CONFIG_BCM54140_PHY is not set
# CONFIG_BCM7XXX_PHY is not set
# CONFIG_BCM84881_PHY is not set
# CONFIG_BCM87XX_PHY is not set
# CONFIG_CICADA_PHY is not set
# CONFIG_CORTINA_PHY is not set
# CONFIG_DAVICOM_PHY is not set
# CONFIG_ICPLUS_PHY is not set
# CONFIG_LXT_PHY is not set
# CONFIG_INTEL_XWAY_PHY is not set
# CONFIG_LSI_ET1011C_PHY is not set
# CONFIG_MARVELL_PHY is not set
# CONFIG_MARVELL_10G_PHY is not set
# CONFIG_MARVELL_88Q2XXX_PHY is not set
# CONFIG_MARVELL_88X2222_PHY is not set
# CONFIG_MAXLINEAR_GPHY is not set
# CONFIG_MAXLINEAR_86110_PHY is not set
# CONFIG_MEDIATEK_GE_PHY is not set
# CONFIG_MICREL_PHY is not set
# CONFIG_MICROCHIP_T1S_PHY is not set
CONFIG_MICROCHIP_PHY=y
# CONFIG_MICROCHIP_T1_PHY is not set
# CONFIG_MICROSEMI_PHY is not set
# CONFIG_MOTORCOMM_PHY is not set
# CONFIG_NATIONAL_PHY is not set
# CONFIG_NXP_CBTX_PHY is not set
# CONFIG_NXP_C45_TJA11XX_PHY is not set
# CONFIG_NXP_TJA11XX_PHY is not set
# CONFIG_NCN26000_PHY is not set
# CONFIG_AT803X_PHY is not set
# CONFIG_QCA83XX_PHY is not set
# CONFIG_QCA808X_PHY is not set
# CONFIG_QCA807X_PHY is not set
# CONFIG_QSEMI_PHY is not set
CONFIG_REALTEK_PHY=y
# CONFIG_REALTEK_PHY_HWMON is not set
# CONFIG_RENESAS_PHY is not set
# CONFIG_ROCKCHIP_PHY is not set
CONFIG_SMSC_PHY=y
# CONFIG_STE10XP is not set
# CONFIG_TERANETICS_PHY is not set
# CONFIG_DP83822_PHY is not set
# CONFIG_DP83TC811_PHY is not set
# CONFIG_DP83848_PHY is not set
# CONFIG_DP83867_PHY is not set
# CONFIG_DP83869_PHY is not set
# CONFIG_DP83TD510_PHY is not set
# CONFIG_DP83TG720_PHY is not set
# CONFIG_VITESSE_PHY is not set
# CONFIG_XILINX_GMII2RGMII is not set
# CONFIG_PSE_CONTROLLER is not set
CONFIG_CAN_DEV=y
CONFIG_CAN_VCAN=y
CONFIG_CAN_VXCAN=y
CONFIG_CAN_NETLINK=y
CONFIG_CAN_CALC_BITTIMING=y
CONFIG_CAN_RX_OFFLOAD=y
# CONFIG_CAN_CAN327 is not set
# CONFIG_CAN_DUMMY is not set
# CONFIG_CAN_FLEXCAN is not set
# CONFIG_CAN_GRCAN is not set
# CONFIG_CAN_KVASER_PCIEFD is not set
CONFIG_CAN_SLCAN=y
# CONFIG_CAN_VIRTIO_CAN is not set
# CONFIG_CAN_C_CAN is not set
# CONFIG_CAN_CC770 is not set
# CONFIG_CAN_CTUCANFD_PCI is not set
# CONFIG_CAN_CTUCANFD_PLATFORM is not set
# CONFIG_CAN_ESD_402_PCI is not set
CONFIG_CAN_IFI_CANFD=y
# CONFIG_CAN_M_CAN is not set
# CONFIG_CAN_PEAK_PCIEFD is not set
# CONFIG_CAN_SJA1000 is not set
# CONFIG_CAN_SOFTING is not set

#
# CAN SPI interfaces
#
# CONFIG_CAN_HI311X is not set
# CONFIG_CAN_MCP251X is not set
# CONFIG_CAN_MCP251XFD is not set
# end of CAN SPI interfaces

#
# CAN USB interfaces
#
CONFIG_CAN_8DEV_USB=y
CONFIG_CAN_EMS_USB=y
CONFIG_CAN_ESD_USB=y
CONFIG_CAN_ETAS_ES58X=y
CONFIG_CAN_F81604=y
CONFIG_CAN_GS_USB=y
CONFIG_CAN_KVASER_USB=y
CONFIG_CAN_MCBA_USB=y
CONFIG_CAN_PEAK_USB=y
CONFIG_CAN_UCAN=y
# end of CAN USB interfaces

# CONFIG_CAN_DEBUG_DEVICES is not set

#
# MCTP Device Drivers
#
# CONFIG_MCTP_SERIAL is not set
# CONFIG_MCTP_TRANSPORT_I2C is not set
# CONFIG_MCTP_TRANSPORT_USB is not set
# end of MCTP Device Drivers

CONFIG_FWNODE_MDIO=y
CONFIG_OF_MDIO=y
CONFIG_ACPI_MDIO=y
# CONFIG_MDIO_BITBANG is not set
# CONFIG_MDIO_BCM_UNIMAC is not set
# CONFIG_MDIO_HISI_FEMAC is not set
CONFIG_MDIO_MVUSB=y
# CONFIG_MDIO_MSCC_MIIM is not set
# CONFIG_MDIO_OCTEON is not set
# CONFIG_MDIO_IPQ4019 is not set
# CONFIG_MDIO_IPQ8064 is not set
# CONFIG_MDIO_THUNDER is not set

#
# MDIO Multiplexers
#
# CONFIG_MDIO_BUS_MUX_GPIO is not set
# CONFIG_MDIO_BUS_MUX_MULTIPLEXER is not set
# CONFIG_MDIO_BUS_MUX_MMIOREG is not set

#
# PCS device drivers
#
# CONFIG_PCS_XPCS is not set
# end of PCS device drivers

# CONFIG_PLIP is not set
CONFIG_PPP=y
CONFIG_PPP_BSDCOMP=y
CONFIG_PPP_DEFLATE=y
CONFIG_PPP_FILTER=y
CONFIG_PPP_MPPE=y
CONFIG_PPP_MULTILINK=y
CONFIG_PPPOATM=y
CONFIG_PPPOX=y
CONFIG_PPPOE=y
CONFIG_PPPOE_HASH_BITS_1=y
# CONFIG_PPPOE_HASH_BITS_2 is not set
# CONFIG_PPPOE_HASH_BITS_4 is not set
# CONFIG_PPPOE_HASH_BITS_8 is not set
CONFIG_PPPOE_HASH_BITS=1
CONFIG_PPTP=y
CONFIG_PPPOL2TP=y
CONFIG_PPP_ASYNC=y
CONFIG_PPP_SYNC_TTY=y
CONFIG_SLIP=y
CONFIG_SLHC=y
CONFIG_SLIP_COMPRESSED=y
CONFIG_SLIP_SMART=y
CONFIG_SLIP_MODE_SLIP6=y
CONFIG_USB_NET_DRIVERS=y
CONFIG_USB_CATC=y
CONFIG_USB_KAWETH=y
CONFIG_USB_PEGASUS=y
CONFIG_USB_RTL8150=y
CONFIG_USB_RTL8152=y
CONFIG_USB_LAN78XX=y
CONFIG_USB_USBNET=y
CONFIG_USB_NET_AX8817X=y
CONFIG_USB_NET_AX88179_178A=y
CONFIG_USB_NET_CDCETHER=y
CONFIG_USB_NET_CDC_EEM=y
CONFIG_USB_NET_CDC_NCM=y
CONFIG_USB_NET_HUAWEI_CDC_NCM=y
CONFIG_USB_NET_CDC_MBIM=y
CONFIG_USB_NET_DM9601=y
CONFIG_USB_NET_SR9700=y
CONFIG_USB_NET_SR9800=y
CONFIG_USB_NET_SMSC75XX=y
CONFIG_USB_NET_SMSC95XX=y
CONFIG_USB_NET_GL620A=y
CONFIG_USB_NET_NET1080=y
CONFIG_USB_NET_PLUSB=y
CONFIG_USB_NET_MCS7830=y
CONFIG_USB_NET_RNDIS_HOST=y
CONFIG_USB_NET_CDC_SUBSET_ENABLE=y
CONFIG_USB_NET_CDC_SUBSET=y
CONFIG_USB_ALI_M5632=y
CONFIG_USB_AN2720=y
CONFIG_USB_BELKIN=y
CONFIG_USB_ARMLINUX=y
CONFIG_USB_EPSON2888=y
CONFIG_USB_KC2190=y
CONFIG_USB_NET_ZAURUS=y
CONFIG_USB_NET_CX82310_ETH=y
CONFIG_USB_NET_KALMIA=y
CONFIG_USB_NET_QMI_WWAN=y
CONFIG_USB_HSO=y
CONFIG_USB_NET_INT51X1=y
CONFIG_USB_CDC_PHONET=y
CONFIG_USB_IPHETH=y
CONFIG_USB_SIERRA_NET=y
CONFIG_USB_VL600=y
CONFIG_USB_NET_CH9200=y
CONFIG_USB_NET_AQC111=y
CONFIG_USB_RTL8153_ECM=y
CONFIG_WLAN=y
CONFIG_WLAN_VENDOR_ADMTEK=y
# CONFIG_ADM8211 is not set
CONFIG_ATH_COMMON=y
CONFIG_WLAN_VENDOR_ATH=y
# CONFIG_ATH_DEBUG is not set
# CONFIG_ATH5K is not set
# CONFIG_ATH5K_PCI is not set
CONFIG_ATH9K_HW=y
CONFIG_ATH9K_COMMON=y
CONFIG_ATH9K_COMMON_DEBUG=y
CONFIG_ATH9K_BTCOEX_SUPPORT=y
CONFIG_ATH9K=y
CONFIG_ATH9K_PCI=y
CONFIG_ATH9K_AHB=y
CONFIG_ATH9K_DEBUGFS=y
# CONFIG_ATH9K_STATION_STATISTICS is not set
CONFIG_ATH9K_DYNACK=y
# CONFIG_ATH9K_WOW is not set
CONFIG_ATH9K_RFKILL=y
CONFIG_ATH9K_CHANNEL_CONTEXT=y
CONFIG_ATH9K_PCOEM=y
# CONFIG_ATH9K_PCI_NO_EEPROM is not set
CONFIG_ATH9K_HTC=y
CONFIG_ATH9K_HTC_DEBUGFS=y
# CONFIG_ATH9K_HWRNG is not set
CONFIG_ATH9K_COMMON_SPECTRAL=y
CONFIG_CARL9170=y
CONFIG_CARL9170_LEDS=y
# CONFIG_CARL9170_DEBUGFS is not set
CONFIG_CARL9170_WPC=y
CONFIG_CARL9170_HWRNG=y
CONFIG_ATH6KL=y
# CONFIG_ATH6KL_SDIO is not set
CONFIG_ATH6KL_USB=y
# CONFIG_ATH6KL_DEBUG is not set
# CONFIG_ATH6KL_TRACING is not set
CONFIG_AR5523=y
# CONFIG_WIL6210 is not set
CONFIG_ATH10K=y
CONFIG_ATH10K_CE=y
CONFIG_ATH10K_PCI=y
# CONFIG_ATH10K_AHB is not set
# CONFIG_ATH10K_SDIO is not set
CONFIG_ATH10K_USB=y
# CONFIG_ATH10K_DEBUG is not set
# CONFIG_ATH10K_DEBUGFS is not set
CONFIG_ATH10K_LEDS=y
# CONFIG_ATH10K_TRACING is not set
# CONFIG_WCN36XX is not set
CONFIG_ATH11K=y
# CONFIG_ATH11K_PCI is not set
# CONFIG_ATH11K_DEBUG is not set
# CONFIG_ATH11K_DEBUGFS is not set
# CONFIG_ATH11K_TRACING is not set
# CONFIG_ATH12K is not set
# CONFIG_WLAN_VENDOR_ATMEL is not set
# CONFIG_WLAN_VENDOR_BROADCOM is not set
# CONFIG_WLAN_VENDOR_INTEL is not set
# CONFIG_WLAN_VENDOR_INTERSIL is not set
# CONFIG_WLAN_VENDOR_MARVELL is not set
# CONFIG_WLAN_VENDOR_MEDIATEK is not set
# CONFIG_WLAN_VENDOR_MICROCHIP is not set
CONFIG_WLAN_VENDOR_PURELIFI=y
CONFIG_PLFXLC=y
# CONFIG_WLAN_VENDOR_RALINK is not set
# CONFIG_WLAN_VENDOR_REALTEK is not set
# CONFIG_WLAN_VENDOR_RSI is not set
CONFIG_WLAN_VENDOR_SILABS=y
# CONFIG_WFX is not set
# CONFIG_WLAN_VENDOR_ST is not set
# CONFIG_WLAN_VENDOR_TI is not set
# CONFIG_WLAN_VENDOR_ZYDAS is not set
# CONFIG_WLAN_VENDOR_QUANTENNA is not set
CONFIG_MAC80211_HWSIM=y
CONFIG_VIRT_WIFI=y
CONFIG_WAN=y
CONFIG_HDLC=y
CONFIG_HDLC_RAW=y
CONFIG_HDLC_RAW_ETH=y
CONFIG_HDLC_CISCO=y
CONFIG_HDLC_FR=y
CONFIG_HDLC_PPP=y
CONFIG_HDLC_X25=y
# CONFIG_FRAMER is not set
# CONFIG_PCI200SYN is not set
# CONFIG_WANXL is not set
# CONFIG_PC300TOO is not set
# CONFIG_FARSYNC is not set
CONFIG_LAPBETHER=y
CONFIG_IEEE802154_DRIVERS=y
# CONFIG_IEEE802154_FAKELB is not set
# CONFIG_IEEE802154_AT86RF230 is not set
# CONFIG_IEEE802154_MRF24J40 is not set
# CONFIG_IEEE802154_CC2520 is not set
CONFIG_IEEE802154_ATUSB=y
# CONFIG_IEEE802154_ADF7242 is not set
# CONFIG_IEEE802154_CA8210 is not set
# CONFIG_IEEE802154_MCR20A is not set
CONFIG_IEEE802154_HWSIM=y

#
# Wireless WAN
#
CONFIG_WWAN=y
# CONFIG_WWAN_DEBUGFS is not set
# CONFIG_WWAN_HWSIM is not set
CONFIG_MHI_WWAN_CTRL=y
# CONFIG_MHI_WWAN_MBIM is not set
# CONFIG_IOSM is not set
# CONFIG_MTK_T7XX is not set
# end of Wireless WAN

CONFIG_VMXNET3=y
# CONFIG_FUJITSU_ES is not set
CONFIG_USB4_NET=y
CONFIG_NETDEVSIM=y
CONFIG_NET_FAILOVER=y

#
# Input device support
#
CONFIG_INPUT=y
CONFIG_INPUT_LEDS=y
CONFIG_INPUT_FF_MEMLESS=y
CONFIG_INPUT_SPARSEKMAP=y
# CONFIG_INPUT_MATRIXKMAP is not set
CONFIG_INPUT_VIVALDIFMAP=y

#
# Userland interfaces
#
CONFIG_INPUT_MOUSEDEV=y
CONFIG_INPUT_MOUSEDEV_PSAUX=y
CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
CONFIG_INPUT_JOYDEV=y
CONFIG_INPUT_EVDEV=y

#
# Input Device Drivers
#
CONFIG_INPUT_KEYBOARD=y
# CONFIG_KEYBOARD_ADC is not set
# CONFIG_KEYBOARD_ADP5588 is not set
CONFIG_KEYBOARD_ATKBD=y
# CONFIG_KEYBOARD_QT1050 is not set
# CONFIG_KEYBOARD_QT1070 is not set
# CONFIG_KEYBOARD_QT2160 is not set
# CONFIG_KEYBOARD_DLINK_DIR685 is not set
# CONFIG_KEYBOARD_LKKBD is not set
# CONFIG_KEYBOARD_GPIO is not set
# CONFIG_KEYBOARD_GPIO_POLLED is not set
# CONFIG_KEYBOARD_TCA8418 is not set
# CONFIG_KEYBOARD_MATRIX is not set
# CONFIG_KEYBOARD_CHARLIEPLEX is not set
# CONFIG_KEYBOARD_LM8323 is not set
# CONFIG_KEYBOARD_LM8333 is not set
# CONFIG_KEYBOARD_MAX7359 is not set
# CONFIG_KEYBOARD_MPR121 is not set
# CONFIG_KEYBOARD_NEWTON is not set
# CONFIG_KEYBOARD_OPENCORES is not set
# CONFIG_KEYBOARD_PINEPHONE is not set
# CONFIG_KEYBOARD_SAMSUNG is not set
# CONFIG_KEYBOARD_STOWAWAY is not set
# CONFIG_KEYBOARD_SUNKBD is not set
# CONFIG_KEYBOARD_OMAP4 is not set
# CONFIG_KEYBOARD_TM2_TOUCHKEY is not set
# CONFIG_KEYBOARD_TWL4030 is not set
# CONFIG_KEYBOARD_XTKBD is not set
# CONFIG_KEYBOARD_CAP11XX is not set
# CONFIG_KEYBOARD_BCM is not set
# CONFIG_KEYBOARD_CYPRESS_SF is not set
CONFIG_INPUT_MOUSE=y
CONFIG_MOUSE_PS2=y
CONFIG_MOUSE_PS2_ALPS=y
CONFIG_MOUSE_PS2_BYD=y
CONFIG_MOUSE_PS2_LOGIPS2PP=y
CONFIG_MOUSE_PS2_SYNAPTICS=y
CONFIG_MOUSE_PS2_SYNAPTICS_SMBUS=y
CONFIG_MOUSE_PS2_CYPRESS=y
CONFIG_MOUSE_PS2_LIFEBOOK=y
CONFIG_MOUSE_PS2_TRACKPOINT=y
# CONFIG_MOUSE_PS2_ELANTECH is not set
# CONFIG_MOUSE_PS2_SENTELIC is not set
# CONFIG_MOUSE_PS2_TOUCHKIT is not set
CONFIG_MOUSE_PS2_FOCALTECH=y
# CONFIG_MOUSE_PS2_VMMOUSE is not set
CONFIG_MOUSE_PS2_SMBUS=y
# CONFIG_MOUSE_SERIAL is not set
CONFIG_MOUSE_APPLETOUCH=y
CONFIG_MOUSE_BCM5974=y
# CONFIG_MOUSE_CYAPA is not set
# CONFIG_MOUSE_ELAN_I2C is not set
# CONFIG_MOUSE_VSXXXAA is not set
# CONFIG_MOUSE_GPIO is not set
# CONFIG_MOUSE_SYNAPTICS_I2C is not set
CONFIG_MOUSE_SYNAPTICS_USB=y
CONFIG_INPUT_JOYSTICK=y
# CONFIG_JOYSTICK_ANALOG is not set
# CONFIG_JOYSTICK_A3D is not set
# CONFIG_JOYSTICK_ADC is not set
# CONFIG_JOYSTICK_ADI is not set
# CONFIG_JOYSTICK_COBRA is not set
# CONFIG_JOYSTICK_GF2K is not set
# CONFIG_JOYSTICK_GRIP is not set
# CONFIG_JOYSTICK_GRIP_MP is not set
# CONFIG_JOYSTICK_GUILLEMOT is not set
# CONFIG_JOYSTICK_INTERACT is not set
# CONFIG_JOYSTICK_SIDEWINDER is not set
# CONFIG_JOYSTICK_TMDC is not set
CONFIG_JOYSTICK_IFORCE=y
CONFIG_JOYSTICK_IFORCE_USB=y
# CONFIG_JOYSTICK_IFORCE_232 is not set
# CONFIG_JOYSTICK_WARRIOR is not set
# CONFIG_JOYSTICK_MAGELLAN is not set
# CONFIG_JOYSTICK_SPACEORB is not set
# CONFIG_JOYSTICK_SPACEBALL is not set
# CONFIG_JOYSTICK_STINGER is not set
# CONFIG_JOYSTICK_TWIDJOY is not set
# CONFIG_JOYSTICK_ZHENHUA is not set
# CONFIG_JOYSTICK_DB9 is not set
# CONFIG_JOYSTICK_GAMECON is not set
# CONFIG_JOYSTICK_TURBOGRAFX is not set
# CONFIG_JOYSTICK_AS5011 is not set
# CONFIG_JOYSTICK_JOYDUMP is not set
CONFIG_JOYSTICK_XPAD=y
CONFIG_JOYSTICK_XPAD_FF=y
CONFIG_JOYSTICK_XPAD_LEDS=y
# CONFIG_JOYSTICK_WALKERA0701 is not set
# CONFIG_JOYSTICK_PSXPAD_SPI is not set
CONFIG_JOYSTICK_PXRC=y
# CONFIG_JOYSTICK_QWIIC is not set
# CONFIG_JOYSTICK_FSIA6B is not set
# CONFIG_JOYSTICK_SENSEHAT is not set
# CONFIG_JOYSTICK_SEESAW is not set
CONFIG_INPUT_TABLET=y
CONFIG_TABLET_USB_ACECAD=y
CONFIG_TABLET_USB_AIPTEK=y
CONFIG_TABLET_USB_HANWANG=y
CONFIG_TABLET_USB_KBTAB=y
CONFIG_TABLET_USB_PEGASUS=y
# CONFIG_TABLET_SERIAL_WACOM4 is not set
CONFIG_INPUT_TOUCHSCREEN=y
# CONFIG_TOUCHSCREEN_ADS7846 is not set
# CONFIG_TOUCHSCREEN_AD7877 is not set
# CONFIG_TOUCHSCREEN_AD7879 is not set
# CONFIG_TOUCHSCREEN_ADC is not set
# CONFIG_TOUCHSCREEN_AR1021_I2C is not set
# CONFIG_TOUCHSCREEN_ATMEL_MXT is not set
# CONFIG_TOUCHSCREEN_AUO_PIXCIR is not set
# CONFIG_TOUCHSCREEN_BU21013 is not set
# CONFIG_TOUCHSCREEN_BU21029 is not set
# CONFIG_TOUCHSCREEN_CHIPONE_ICN8318 is not set
# CONFIG_TOUCHSCREEN_CHIPONE_ICN8505 is not set
# CONFIG_TOUCHSCREEN_CY8CTMA140 is not set
# CONFIG_TOUCHSCREEN_CY8CTMG110 is not set
# CONFIG_TOUCHSCREEN_CYTTSP_CORE is not set
# CONFIG_TOUCHSCREEN_CYTTSP5 is not set
# CONFIG_TOUCHSCREEN_DYNAPRO is not set
# CONFIG_TOUCHSCREEN_HAMPSHIRE is not set
# CONFIG_TOUCHSCREEN_EETI is not set
# CONFIG_TOUCHSCREEN_EGALAX is not set
# CONFIG_TOUCHSCREEN_EGALAX_SERIAL is not set
# CONFIG_TOUCHSCREEN_EXC3000 is not set
# CONFIG_TOUCHSCREEN_FUJITSU is not set
# CONFIG_TOUCHSCREEN_GOODIX is not set
# CONFIG_TOUCHSCREEN_GOODIX_BERLIN_I2C is not set
# CONFIG_TOUCHSCREEN_GOODIX_BERLIN_SPI is not set
# CONFIG_TOUCHSCREEN_HIDEEP is not set
# CONFIG_TOUCHSCREEN_HIMAX_HX852X is not set
# CONFIG_TOUCHSCREEN_HYCON_HY46XX is not set
# CONFIG_TOUCHSCREEN_HYNITRON_CSTXXX is not set
# CONFIG_TOUCHSCREEN_HYNITRON_CST816X is not set
# CONFIG_TOUCHSCREEN_ILI210X is not set
# CONFIG_TOUCHSCREEN_ILITEK is not set
# CONFIG_TOUCHSCREEN_S6SY761 is not set
# CONFIG_TOUCHSCREEN_GUNZE is not set
# CONFIG_TOUCHSCREEN_EKTF2127 is not set
# CONFIG_TOUCHSCREEN_ELAN is not set
# CONFIG_TOUCHSCREEN_ELO is not set
# CONFIG_TOUCHSCREEN_WACOM_W8001 is not set
# CONFIG_TOUCHSCREEN_WACOM_I2C is not set
# CONFIG_TOUCHSCREEN_WACOM_W9000 is not set
# CONFIG_TOUCHSCREEN_MAX11801 is not set
# CONFIG_TOUCHSCREEN_MMS114 is not set
# CONFIG_TOUCHSCREEN_MELFAS_MIP4 is not set
# CONFIG_TOUCHSCREEN_MSG2638 is not set
# CONFIG_TOUCHSCREEN_MTOUCH is not set
# CONFIG_TOUCHSCREEN_NOVATEK_NVT_TS is not set
# CONFIG_TOUCHSCREEN_IMAGIS is not set
# CONFIG_TOUCHSCREEN_IMX6UL_TSC is not set
# CONFIG_TOUCHSCREEN_INEXIO is not set
# CONFIG_TOUCHSCREEN_PENMOUNT is not set
# CONFIG_TOUCHSCREEN_EDT_FT5X06 is not set
# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set
# CONFIG_TOUCHSCREEN_TOUCHWIN is not set
# CONFIG_TOUCHSCREEN_PIXCIR is not set
# CONFIG_TOUCHSCREEN_WDT87XX_I2C is not set
CONFIG_TOUCHSCREEN_USB_COMPOSITE=y
CONFIG_TOUCHSCREEN_USB_EGALAX=y
CONFIG_TOUCHSCREEN_USB_PANJIT=y
CONFIG_TOUCHSCREEN_USB_3M=y
CONFIG_TOUCHSCREEN_USB_ITM=y
CONFIG_TOUCHSCREEN_USB_ETURBO=y
CONFIG_TOUCHSCREEN_USB_GUNZE=y
CONFIG_TOUCHSCREEN_USB_DMC_TSC10=y
CONFIG_TOUCHSCREEN_USB_IRTOUCH=y
CONFIG_TOUCHSCREEN_USB_IDEALTEK=y
CONFIG_TOUCHSCREEN_USB_GENERAL_TOUCH=y
CONFIG_TOUCHSCREEN_USB_GOTOP=y
CONFIG_TOUCHSCREEN_USB_JASTEC=y
CONFIG_TOUCHSCREEN_USB_ELO=y
CONFIG_TOUCHSCREEN_USB_E2I=y
CONFIG_TOUCHSCREEN_USB_ZYTRONIC=y
CONFIG_TOUCHSCREEN_USB_ETT_TC45USB=y
CONFIG_TOUCHSCREEN_USB_NEXIO=y
CONFIG_TOUCHSCREEN_USB_EASYTOUCH=y
# CONFIG_TOUCHSCREEN_TOUCHIT213 is not set
# CONFIG_TOUCHSCREEN_TSC_SERIO is not set
# CONFIG_TOUCHSCREEN_TSC2004 is not set
# CONFIG_TOUCHSCREEN_TSC2005 is not set
# CONFIG_TOUCHSCREEN_TSC2007 is not set
# CONFIG_TOUCHSCREEN_RM_TS is not set
# CONFIG_TOUCHSCREEN_SILEAD is not set
# CONFIG_TOUCHSCREEN_SIS_I2C is not set
# CONFIG_TOUCHSCREEN_ST1232 is not set
# CONFIG_TOUCHSCREEN_STMFTS is not set
CONFIG_TOUCHSCREEN_SUR40=y
# CONFIG_TOUCHSCREEN_SURFACE3_SPI is not set
# CONFIG_TOUCHSCREEN_SX8654 is not set
# CONFIG_TOUCHSCREEN_TPS6507X is not set
# CONFIG_TOUCHSCREEN_ZET6223 is not set
# CONFIG_TOUCHSCREEN_ZFORCE is not set
# CONFIG_TOUCHSCREEN_COLIBRI_VF50 is not set
# CONFIG_TOUCHSCREEN_ROHM_BU21023 is not set
# CONFIG_TOUCHSCREEN_IQS5XX is not set
# CONFIG_TOUCHSCREEN_IQS7211 is not set
# CONFIG_TOUCHSCREEN_ZINITIX is not set
# CONFIG_TOUCHSCREEN_HIMAX_HX83112B is not set
CONFIG_INPUT_MISC=y
# CONFIG_INPUT_AD714X is not set
# CONFIG_INPUT_ATMEL_CAPTOUCH is not set
# CONFIG_INPUT_AW86927 is not set
# CONFIG_INPUT_BMA150 is not set
# CONFIG_INPUT_E3X0_BUTTON is not set
# CONFIG_INPUT_PCSPKR is not set
# CONFIG_INPUT_MMA8450 is not set
# CONFIG_INPUT_APANEL is not set
# CONFIG_INPUT_GPIO_BEEPER is not set
# CONFIG_INPUT_GPIO_DECODER is not set
# CONFIG_INPUT_GPIO_VIBRA is not set
# CONFIG_INPUT_ATLAS_BTNS is not set
CONFIG_INPUT_ATI_REMOTE2=y
CONFIG_INPUT_KEYSPAN_REMOTE=y
# CONFIG_INPUT_KXTJ9 is not set
CONFIG_INPUT_POWERMATE=y
CONFIG_INPUT_YEALINK=y
CONFIG_INPUT_CM109=y
# CONFIG_INPUT_REGULATOR_HAPTIC is not set
# CONFIG_INPUT_RETU_PWRBUTTON is not set
# CONFIG_INPUT_TWL4030_PWRBUTTON is not set
# CONFIG_INPUT_TWL4030_VIBRA is not set
CONFIG_INPUT_UINPUT=y
# CONFIG_INPUT_PCF8574 is not set
# CONFIG_INPUT_GPIO_ROTARY_ENCODER is not set
# CONFIG_INPUT_DA7280_HAPTICS is not set
# CONFIG_INPUT_ADXL34X is not set
# CONFIG_INPUT_IBM_PANEL is not set
CONFIG_INPUT_IMS_PCU=y
# CONFIG_INPUT_IQS269A is not set
# CONFIG_INPUT_IQS626A is not set
# CONFIG_INPUT_IQS7222 is not set
# CONFIG_INPUT_CMA3000 is not set
# CONFIG_INPUT_IDEAPAD_SLIDEBAR is not set
# CONFIG_INPUT_DRV260X_HAPTICS is not set
# CONFIG_INPUT_DRV2665_HAPTICS is not set
# CONFIG_INPUT_DRV2667_HAPTICS is not set
CONFIG_RMI4_CORE=y
# CONFIG_RMI4_I2C is not set
# CONFIG_RMI4_SPI is not set
# CONFIG_RMI4_SMB is not set
CONFIG_RMI4_F03=y
CONFIG_RMI4_F03_SERIO=y
CONFIG_RMI4_2D_SENSOR=y
CONFIG_RMI4_F11=y
CONFIG_RMI4_F12=y
# CONFIG_RMI4_F1A is not set
# CONFIG_RMI4_F21 is not set
CONFIG_RMI4_F30=y
# CONFIG_RMI4_F34 is not set
CONFIG_RMI4_F3A=y
# CONFIG_RMI4_F54 is not set
# CONFIG_RMI4_F55 is not set

#
# Hardware I/O ports
#
CONFIG_SERIO=y
CONFIG_ARCH_MIGHT_HAVE_PC_SERIO=y
CONFIG_SERIO_I8042=y
CONFIG_SERIO_SERPORT=y
# CONFIG_SERIO_PARKBD is not set
# CONFIG_SERIO_PCIPS2 is not set
CONFIG_SERIO_LIBPS2=y
# CONFIG_SERIO_RAW is not set
# CONFIG_SERIO_ALTERA_PS2 is not set
# CONFIG_SERIO_PS2MULT is not set
# CONFIG_SERIO_ARC_PS2 is not set
# CONFIG_SERIO_APBPS2 is not set
# CONFIG_SERIO_GPIO_PS2 is not set
CONFIG_USERIO=y
# CONFIG_GAMEPORT is not set
# end of Hardware I/O ports
# end of Input device support

#
# Character devices
#
CONFIG_TTY=y
CONFIG_VT=y
CONFIG_CONSOLE_TRANSLATIONS=y
CONFIG_VT_CONSOLE=y
CONFIG_VT_CONSOLE_SLEEP=y
CONFIG_VT_HW_CONSOLE_BINDING=y
CONFIG_UNIX98_PTYS=y
CONFIG_LEGACY_PTYS=y
CONFIG_LEGACY_PTY_COUNT=256
CONFIG_LEGACY_TIOCSTI=y
CONFIG_LDISC_AUTOLOAD=y

#
# Serial drivers
#
CONFIG_SERIAL_EARLYCON=y
CONFIG_SERIAL_8250=y
CONFIG_SERIAL_8250_PNP=y
# CONFIG_SERIAL_8250_16550A_VARIANTS is not set
# CONFIG_SERIAL_8250_FINTEK is not set
CONFIG_SERIAL_8250_CONSOLE=y
CONFIG_SERIAL_8250_DMA=y
CONFIG_SERIAL_8250_PCILIB=y
CONFIG_SERIAL_8250_PCI=y
# CONFIG_SERIAL_8250_EXAR is not set
# CONFIG_SERIAL_8250_CS is not set
CONFIG_SERIAL_8250_NR_UARTS=32
CONFIG_SERIAL_8250_RUNTIME_UARTS=4
CONFIG_SERIAL_8250_EXTENDED=y
CONFIG_SERIAL_8250_SHARE_IRQ=y
CONFIG_SERIAL_8250_DETECT_IRQ=y
CONFIG_SERIAL_8250_RSA=y
CONFIG_SERIAL_8250_MANY_PORTS=y
# CONFIG_SERIAL_8250_PCI1XXXX is not set
# CONFIG_SERIAL_8250_DW is not set
# CONFIG_SERIAL_8250_RT288X is not set
CONFIG_SERIAL_8250_LPSS=y
CONFIG_SERIAL_8250_MID=y
CONFIG_SERIAL_8250_PERICOM=y
# CONFIG_SERIAL_8250_NI is not set
# CONFIG_SERIAL_OF_PLATFORM is not set
CONFIG_SERIAL_8250_DWLIB=y

#
# Non-8250 serial port support
#
# CONFIG_SERIAL_MAX3100 is not set
# CONFIG_SERIAL_MAX310X is not set
# CONFIG_SERIAL_UARTLITE is not set
CONFIG_SERIAL_CORE=y
CONFIG_SERIAL_CORE_CONSOLE=y
# CONFIG_SERIAL_JSM is not set
# CONFIG_SERIAL_SIFIVE is not set
# CONFIG_SERIAL_LANTIQ is not set
# CONFIG_SERIAL_SCCNXP is not set
# CONFIG_SERIAL_SC16IS7XX is not set
# CONFIG_SERIAL_ALTERA_JTAGUART is not set
# CONFIG_SERIAL_ALTERA_UART is not set
# CONFIG_SERIAL_XILINX_PS_UART is not set
# CONFIG_SERIAL_ARC is not set
# CONFIG_SERIAL_RP2 is not set
# CONFIG_SERIAL_FSL_LPUART is not set
# CONFIG_SERIAL_FSL_LINFLEXUART is not set
# CONFIG_SERIAL_CONEXANT_DIGICOLOR is not set
# CONFIG_SERIAL_SPRD is not set
# end of Serial drivers

CONFIG_SERIAL_MCTRL_GPIO=y
CONFIG_SERIAL_NONSTANDARD=y
# CONFIG_MOXA_INTELLIO is not set
# CONFIG_MOXA_SMARTIO is not set
CONFIG_N_HDLC=y
# CONFIG_IPWIRELESS is not set
CONFIG_N_GSM=y
CONFIG_NOZOMI=y
CONFIG_NULL_TTY=y
CONFIG_HVC_DRIVER=y
CONFIG_SERIAL_DEV_BUS=y
CONFIG_SERIAL_DEV_CTRL_TTYPORT=y
CONFIG_TTY_PRINTK=y
CONFIG_TTY_PRINTK_LEVEL=6
# CONFIG_PRINTER is not set
# CONFIG_PPDEV is not set
CONFIG_VIRTIO_CONSOLE=y
# CONFIG_IPMI_HANDLER is not set
# CONFIG_SSIF_IPMI_BMC is not set
# CONFIG_IPMB_DEVICE_INTERFACE is not set
CONFIG_HW_RANDOM=y
# CONFIG_HW_RANDOM_TIMERIOMEM is not set
# CONFIG_HW_RANDOM_INTEL is not set
# CONFIG_HW_RANDOM_AMD is not set
# CONFIG_HW_RANDOM_BA431 is not set
# CONFIG_HW_RANDOM_VIA is not set
CONFIG_HW_RANDOM_VIRTIO=y
# CONFIG_HW_RANDOM_CCTRNG is not set
# CONFIG_HW_RANDOM_XIPHERA is not set
# CONFIG_DEVMEM is not set
CONFIG_NVRAM=y
# CONFIG_DEVPORT is not set
CONFIG_HPET=y
CONFIG_HPET_MMAP=y
CONFIG_HPET_MMAP_DEFAULT=y
# CONFIG_HANGCHECK_TIMER is not set
CONFIG_TCG_TPM=y
# CONFIG_TCG_TPM2_HMAC is not set
# CONFIG_HW_RANDOM_TPM is not set
CONFIG_TCG_TIS_CORE=y
CONFIG_TCG_TIS=y
# CONFIG_TCG_TIS_SPI is not set
# CONFIG_TCG_TIS_I2C is not set
# CONFIG_TCG_TIS_I2C_CR50 is not set
# CONFIG_TCG_TIS_I2C_ATMEL is not set
# CONFIG_TCG_TIS_I2C_INFINEON is not set
# CONFIG_TCG_TIS_I2C_NUVOTON is not set
# CONFIG_TCG_NSC is not set
# CONFIG_TCG_ATMEL is not set
# CONFIG_TCG_INFINEON is not set
CONFIG_TCG_CRB=y
# CONFIG_TCG_VTPM_PROXY is not set
# CONFIG_TCG_TIS_ST33ZP24_I2C is not set
# CONFIG_TCG_TIS_ST33ZP24_SPI is not set
# CONFIG_TELCLOCK is not set
CONFIG_XILLYBUS_CLASS=y
# CONFIG_XILLYBUS is not set
CONFIG_XILLYUSB=y
# end of Character devices

#
# I2C support
#
CONFIG_I2C=y
CONFIG_ACPI_I2C_OPREGION=y
CONFIG_I2C_BOARDINFO=y
CONFIG_I2C_CHARDEV=y
CONFIG_I2C_MUX=y

#
# Multiplexer I2C Chip support
#
# CONFIG_I2C_ARB_GPIO_CHALLENGE is not set
# CONFIG_I2C_MUX_GPIO is not set
# CONFIG_I2C_MUX_GPMUX is not set
# CONFIG_I2C_MUX_LTC4306 is not set
# CONFIG_I2C_MUX_PCA9541 is not set
# CONFIG_I2C_MUX_PCA954x is not set
CONFIG_I2C_MUX_REG=y
# CONFIG_I2C_MUX_MLXCPLD is not set
# end of Multiplexer I2C Chip support

CONFIG_I2C_HELPER_AUTO=y
CONFIG_I2C_SMBUS=y
CONFIG_I2C_ALGOBIT=y

#
# I2C Hardware Bus support
#

#
# PC SMBus host controller drivers
#
# CONFIG_I2C_ALI1535 is not set
# CONFIG_I2C_ALI1563 is not set
# CONFIG_I2C_ALI15X3 is not set
# CONFIG_I2C_AMD756 is not set
# CONFIG_I2C_AMD8111 is not set
# CONFIG_I2C_AMD_MP2 is not set
CONFIG_I2C_I801=y
# CONFIG_I2C_ISCH is not set
# CONFIG_I2C_ISMT is not set
# CONFIG_I2C_PIIX4 is not set
# CONFIG_I2C_CHT_WC is not set
# CONFIG_I2C_NFORCE2 is not set
# CONFIG_I2C_NVIDIA_GPU is not set
# CONFIG_I2C_SIS5595 is not set
# CONFIG_I2C_SIS630 is not set
# CONFIG_I2C_SIS96X is not set
# CONFIG_I2C_VIA is not set
# CONFIG_I2C_VIAPRO is not set
# CONFIG_I2C_ZHAOXIN is not set

#
# ACPI drivers
#
# CONFIG_I2C_SCMI is not set

#
# I2C system bus drivers (mostly embedded / system-on-chip)
#
# CONFIG_I2C_CBUS_GPIO is not set
CONFIG_I2C_DESIGNWARE_CORE=y
CONFIG_I2C_DESIGNWARE_PLATFORM=y
# CONFIG_I2C_DESIGNWARE_BAYTRAIL is not set
# CONFIG_I2C_DESIGNWARE_PCI is not set
# CONFIG_I2C_EMEV2 is not set
# CONFIG_I2C_GPIO is not set
# CONFIG_I2C_OCORES is not set
# CONFIG_I2C_PCA_PLATFORM is not set
# CONFIG_I2C_RK3X is not set
# CONFIG_I2C_SIMTEC is not set
# CONFIG_I2C_XILINX is not set

#
# External I2C/SMBus adapter drivers
#
CONFIG_I2C_DIOLAN_U2C=y
CONFIG_I2C_DLN2=y
CONFIG_I2C_LJCA=y
CONFIG_I2C_CP2615=y
# CONFIG_I2C_PARPORT is not set
# CONFIG_I2C_PCI1XXXX is not set
CONFIG_I2C_ROBOTFUZZ_OSIF=y
# CONFIG_I2C_TAOS_EVM is not set
CONFIG_I2C_TINY_USB=y
CONFIG_I2C_VIPERBOARD=y

#
# Other I2C/SMBus bus drivers
#
# CONFIG_I2C_MLXCPLD is not set
# CONFIG_I2C_VIRTIO is not set
# end of I2C Hardware Bus support

# CONFIG_I2C_STUB is not set
CONFIG_I2C_SLAVE=y
CONFIG_I2C_SLAVE_EEPROM=y
# CONFIG_I2C_SLAVE_TESTUNIT is not set
# CONFIG_I2C_DEBUG_CORE is not set
# CONFIG_I2C_DEBUG_ALGO is not set
# CONFIG_I2C_DEBUG_BUS is not set
# end of I2C support

# CONFIG_I3C is not set
CONFIG_I3C_OR_I2C=y
CONFIG_SPI=y
# CONFIG_SPI_DEBUG is not set
CONFIG_SPI_MASTER=y
# CONFIG_SPI_MEM is not set

#
# SPI Master Controller Drivers
#
# CONFIG_SPI_ALTERA is not set
# CONFIG_SPI_AXI_SPI_ENGINE is not set
# CONFIG_SPI_BITBANG is not set
# CONFIG_SPI_BUTTERFLY is not set
# CONFIG_SPI_CADENCE is not set
# CONFIG_SPI_CADENCE_QUADSPI is not set
# CONFIG_SPI_CH341 is not set
# CONFIG_SPI_DESIGNWARE is not set
CONFIG_SPI_DLN2=y
# CONFIG_SPI_GPIO is not set
# CONFIG_SPI_LM70_LLP is not set
# CONFIG_SPI_FSL_SPI is not set
CONFIG_SPI_LJCA=y
# CONFIG_SPI_MICROCHIP_CORE_QSPI is not set
# CONFIG_SPI_MICROCHIP_CORE_SPI is not set
# CONFIG_SPI_LANTIQ_SSC is not set
# CONFIG_SPI_OC_TINY is not set
# CONFIG_SPI_PCI1XXXX is not set
# CONFIG_SPI_PXA2XX is not set
# CONFIG_SPI_SC18IS602 is not set
# CONFIG_SPI_SIFIVE is not set
# CONFIG_SPI_MXIC is not set
# CONFIG_SPI_VIRTIO is not set
# CONFIG_SPI_XCOMM is not set
# CONFIG_SPI_XILINX is not set

#
# SPI Multiplexer support
#
# CONFIG_SPI_MUX is not set

#
# SPI Protocol Masters
#
# CONFIG_SPI_SPIDEV is not set
# CONFIG_SPI_LOOPBACK_TEST is not set
# CONFIG_SPI_TLE62X0 is not set
# CONFIG_SPI_SLAVE is not set
CONFIG_SPI_DYNAMIC=y
# CONFIG_SPMI is not set
# CONFIG_HSI is not set
CONFIG_PPS=y
# CONFIG_PPS_DEBUG is not set

#
# PPS clients support
#
# CONFIG_PPS_CLIENT_KTIMER is not set
# CONFIG_PPS_CLIENT_LDISC is not set
# CONFIG_PPS_CLIENT_PARPORT is not set
# CONFIG_PPS_CLIENT_GPIO is not set
# CONFIG_PPS_GENERATOR is not set

#
# PTP clock support
#
CONFIG_PTP_1588_CLOCK=y
CONFIG_PTP_1588_CLOCK_OPTIONAL=y

#
# Enable PHYLIB and NETWORK_PHY_TIMESTAMPING to see the additional clocks.
#
CONFIG_PTP_1588_CLOCK_KVM=y
CONFIG_PTP_1588_CLOCK_VMCLOCK=y
# CONFIG_PTP_1588_CLOCK_IDT82P33 is not set
# CONFIG_PTP_1588_CLOCK_IDTCM is not set
# CONFIG_PTP_1588_CLOCK_FC3W is not set
# CONFIG_PTP_1588_CLOCK_MOCK is not set
# CONFIG_PTP_1588_CLOCK_VMW is not set
# CONFIG_PTP_1588_CLOCK_OCP is not set
# CONFIG_PTP_NETC_V4_TIMER is not set
# end of PTP clock support

#
# DPLL device support
#
# CONFIG_ZL3073X_I2C is not set
# CONFIG_ZL3073X_SPI is not set
# end of DPLL device support

# CONFIG_PINCTRL is not set
CONFIG_GPIOLIB_LEGACY=y
CONFIG_GPIOLIB=y
CONFIG_GPIOLIB_FASTPATH_LIMIT=512
CONFIG_OF_GPIO=y
CONFIG_GPIO_ACPI=y
CONFIG_GPIOLIB_IRQCHIP=y
# CONFIG_DEBUG_GPIO is not set
# CONFIG_GPIO_SYSFS is not set
# CONFIG_GPIO_CDEV is not set

#
# Memory mapped GPIO drivers
#
# CONFIG_GPIO_74XX_MMIO is not set
# CONFIG_GPIO_ALTERA is not set
# CONFIG_GPIO_AMDPT is not set
# CONFIG_GPIO_BY_PINCTRL is not set
# CONFIG_GPIO_CADENCE is not set
# CONFIG_GPIO_DWAPB is not set
# CONFIG_GPIO_FTGPIO010 is not set
# CONFIG_GPIO_GENERIC_PLATFORM is not set
# CONFIG_GPIO_GRANITERAPIDS is not set
# CONFIG_GPIO_GRGPIO is not set
# CONFIG_GPIO_HLWD is not set
# CONFIG_GPIO_ICH is not set
# CONFIG_GPIO_LOGICVC is not set
# CONFIG_GPIO_MB86S7X is not set
# CONFIG_GPIO_POLARFIRE_SOC is not set
# CONFIG_GPIO_SIFIVE is not set
# CONFIG_GPIO_SYSCON is not set
# CONFIG_GPIO_WAVESHARE_DSI_TOUCH is not set
# CONFIG_GPIO_XILINX is not set
# CONFIG_GPIO_AMD_FCH is not set
# end of Memory mapped GPIO drivers

#
# Port-mapped I/O GPIO drivers
#
# CONFIG_GPIO_VX855 is not set
# CONFIG_GPIO_F7188X is not set
# CONFIG_GPIO_IT87 is not set
# CONFIG_GPIO_NOVALAKE is not set
# CONFIG_GPIO_SCH311X is not set
# CONFIG_GPIO_WINBOND is not set
# CONFIG_GPIO_WS16C48 is not set
# end of Port-mapped I/O GPIO drivers

#
# I2C GPIO expanders
#
# CONFIG_GPIO_ADNP is not set
# CONFIG_GPIO_FXL6408 is not set
# CONFIG_GPIO_DS4520 is not set
# CONFIG_GPIO_GW_PLD is not set
# CONFIG_GPIO_MAX7300 is not set
# CONFIG_GPIO_MAX732X is not set
# CONFIG_GPIO_PCA953X is not set
# CONFIG_GPIO_PCA9570 is not set
# CONFIG_GPIO_PCF857X is not set
# CONFIG_GPIO_TPIC2810 is not set
# end of I2C GPIO expanders

#
# MFD GPIO expanders
#
CONFIG_GPIO_DLN2=y
CONFIG_GPIO_LJCA=y
# CONFIG_GPIO_TWL4030 is not set
# CONFIG_GPIO_WHISKEY_COVE is not set
# end of MFD GPIO expanders

#
# Auxiliary Bus GPIO drivers
#
# end of Auxiliary Bus GPIO drivers

#
# PCI GPIO expanders
#
# CONFIG_GPIO_AMD8111 is not set
# CONFIG_GPIO_BT8XX is not set
# CONFIG_GPIO_ML_IOH is not set
# CONFIG_GPIO_PCI_IDIO_16 is not set
# CONFIG_GPIO_PCIE_IDIO_24 is not set
# CONFIG_GPIO_RDC321X is not set
# CONFIG_GPIO_SODAVILLE is not set
# end of PCI GPIO expanders

#
# SPI GPIO expanders
#
# CONFIG_GPIO_74X164 is not set
# CONFIG_GPIO_MAX3191X is not set
# CONFIG_GPIO_MAX7301 is not set
# CONFIG_GPIO_MC33880 is not set
# CONFIG_GPIO_PISOSR is not set
# CONFIG_GPIO_XRA1403 is not set
# end of SPI GPIO expanders

#
# USB GPIO expanders
#
CONFIG_GPIO_VIPERBOARD=y
# CONFIG_GPIO_MPSSE is not set
# end of USB GPIO expanders

#
# Virtual GPIO drivers
#
# CONFIG_GPIO_AGGREGATOR is not set
# CONFIG_GPIO_LATCH is not set
# CONFIG_GPIO_LINE_MUX is not set
# CONFIG_GPIO_MOCKUP is not set
# CONFIG_GPIO_VIRTIO is not set
# CONFIG_GPIO_SIM is not set
# end of Virtual GPIO drivers

#
# GPIO Debugging utilities
#
# CONFIG_GPIO_SLOPPY_LOGIC_ANALYZER is not set
# CONFIG_GPIO_VIRTUSER is not set
# end of GPIO Debugging utilities

# CONFIG_W1 is not set
# CONFIG_POWER_RESET is not set
# CONFIG_POWER_SEQUENCING is not set
CONFIG_POWER_SUPPLY=y
# CONFIG_POWER_SUPPLY_DEBUG is not set
CONFIG_POWER_SUPPLY_HWMON=y
# CONFIG_GENERIC_ADC_BATTERY is not set
# CONFIG_IP5XXX_POWER is not set
# CONFIG_TEST_POWER is not set
# CONFIG_CHARGER_ADP5061 is not set
# CONFIG_BATTERY_CHAGALL is not set
# CONFIG_BATTERY_CW2015 is not set
# CONFIG_BATTERY_DS2780 is not set
# CONFIG_BATTERY_DS2781 is not set
# CONFIG_BATTERY_DS2782 is not set
# CONFIG_BATTERY_SAMSUNG_SDI is not set
# CONFIG_BATTERY_S2MU005 is not set
# CONFIG_BATTERY_SBS is not set
# CONFIG_CHARGER_SBS is not set
# CONFIG_MANAGER_SBS is not set
# CONFIG_BATTERY_BQ27XXX is not set
# CONFIG_BATTERY_MAX17040 is not set
# CONFIG_BATTERY_MAX17042 is not set
# CONFIG_BATTERY_MAX1720X is not set
CONFIG_CHARGER_ISP1704=y
# CONFIG_CHARGER_MAX8903 is not set
# CONFIG_CHARGER_TWL4030 is not set
# CONFIG_CHARGER_TWL6030 is not set
# CONFIG_CHARGER_LP8727 is not set
# CONFIG_CHARGER_GPIO is not set
# CONFIG_CHARGER_MANAGER is not set
# CONFIG_CHARGER_LT3651 is not set
# CONFIG_CHARGER_LTC4162L is not set
# CONFIG_CHARGER_DETECTOR_MAX14656 is not set
# CONFIG_CHARGER_MAX77976 is not set
# CONFIG_CHARGER_MAX8971 is not set
# CONFIG_CHARGER_MT6360 is not set
# CONFIG_CHARGER_MT6370 is not set
# CONFIG_CHARGER_BQ2415X is not set
CONFIG_CHARGER_BQ24190=y
# CONFIG_CHARGER_BQ24257 is not set
# CONFIG_CHARGER_BQ24735 is not set
# CONFIG_CHARGER_BQ2515X is not set
# CONFIG_CHARGER_BQ25890 is not set
# CONFIG_CHARGER_BQ25980 is not set
# CONFIG_CHARGER_BQ256XX is not set
# CONFIG_CHARGER_SMB347 is not set
# CONFIG_BATTERY_GAUGE_LTC2941 is not set
# CONFIG_BATTERY_GOLDFISH is not set
# CONFIG_BATTERY_RT5033 is not set
# CONFIG_CHARGER_RT9455 is not set
# CONFIG_CHARGER_RT9467 is not set
# CONFIG_CHARGER_RT9471 is not set
# CONFIG_CHARGER_RT9756 is not set
# CONFIG_FUEL_GAUGE_STC3117 is not set
# CONFIG_CHARGER_UCS1002 is not set
# CONFIG_CHARGER_BD99954 is not set
# CONFIG_BATTERY_SURFACE is not set
# CONFIG_CHARGER_SURFACE is not set
# CONFIG_BATTERY_UG3105 is not set
# CONFIG_BATTERY_CHARGER_SURFACE_RT is not set
# CONFIG_FUEL_GAUGE_MM8013 is not set
CONFIG_HWMON=y
# CONFIG_HWMON_DEBUG_CHIP is not set

#
# Native drivers
#
# CONFIG_SENSORS_ABITUGURU is not set
# CONFIG_SENSORS_ABITUGURU3 is not set
# CONFIG_SENSORS_AD7314 is not set
# CONFIG_SENSORS_AD7414 is not set
# CONFIG_SENSORS_AD7418 is not set
# CONFIG_SENSORS_ADM1025 is not set
# CONFIG_SENSORS_ADM1026 is not set
# CONFIG_SENSORS_ADM1029 is not set
# CONFIG_SENSORS_ADM1031 is not set
# CONFIG_SENSORS_ADM1177 is not set
# CONFIG_SENSORS_ADM9240 is not set
# CONFIG_SENSORS_ADT7310 is not set
# CONFIG_SENSORS_ADT7410 is not set
# CONFIG_SENSORS_ADT7411 is not set
# CONFIG_SENSORS_ADT7462 is not set
# CONFIG_SENSORS_ADT7470 is not set
# CONFIG_SENSORS_ADT7475 is not set
# CONFIG_SENSORS_AHT10 is not set
CONFIG_SENSORS_AQUACOMPUTER_D5NEXT=y
# CONFIG_SENSORS_AS370 is not set
# CONFIG_SENSORS_ASC7621 is not set
# CONFIG_SENSORS_ASUS_ROG_RYUJIN is not set
# CONFIG_SENSORS_AXI_FAN_CONTROL is not set
# CONFIG_SENSORS_K8TEMP is not set
# CONFIG_SENSORS_K10TEMP is not set
# CONFIG_SENSORS_FAM15H_POWER is not set
# CONFIG_SENSORS_APPLESMC is not set
# CONFIG_SENSORS_ARCTIC_FAN_CONTROLLER is not set
# CONFIG_SENSORS_ASB100 is not set
# CONFIG_SENSORS_ATXP1 is not set
# CONFIG_SENSORS_CHIPCAP2 is not set
CONFIG_SENSORS_CORSAIR_CPRO=y
CONFIG_SENSORS_CORSAIR_PSU=y
# CONFIG_SENSORS_DRIVETEMP is not set
# CONFIG_SENSORS_DS620 is not set
# CONFIG_SENSORS_DS1621 is not set
# CONFIG_SENSORS_DELL_SMM is not set
# CONFIG_SENSORS_I5K_AMB is not set
# CONFIG_SENSORS_F71805F is not set
# CONFIG_SENSORS_F71882FG is not set
# CONFIG_SENSORS_F75375S is not set
# CONFIG_SENSORS_FSCHMD is not set
# CONFIG_SENSORS_FTSTEUTATES is not set
CONFIG_SENSORS_GIGABYTE_WATERFORCE=y
# CONFIG_SENSORS_GL518SM is not set
# CONFIG_SENSORS_GL520SM is not set
# CONFIG_SENSORS_GPD is not set
# CONFIG_SENSORS_G760A is not set
# CONFIG_SENSORS_G762 is not set
# CONFIG_SENSORS_GPIO_FAN is not set
# CONFIG_SENSORS_HIH6130 is not set
# CONFIG_SENSORS_HS3001 is not set
# CONFIG_SENSORS_HTU31 is not set
# CONFIG_SENSORS_IIO_HWMON is not set
# CONFIG_SENSORS_I5500 is not set
# CONFIG_SENSORS_CORETEMP is not set
# CONFIG_SENSORS_ISL28022 is not set
# CONFIG_SENSORS_IT87 is not set
# CONFIG_SENSORS_JC42 is not set
CONFIG_SENSORS_POWERZ=y
# CONFIG_SENSORS_POWR1220 is not set
# CONFIG_SENSORS_PROM21_XHCI is not set
# CONFIG_SENSORS_LATTEPANDA_SIGMA_EC is not set
# CONFIG_SENSORS_LENOVO_EC is not set
# CONFIG_SENSORS_LINEAGE is not set
# CONFIG_SENSORS_LTC2945 is not set
# CONFIG_SENSORS_LTC2947_I2C is not set
# CONFIG_SENSORS_LTC2947_SPI is not set
# CONFIG_SENSORS_LTC2990 is not set
# CONFIG_SENSORS_LTC2991 is not set
# CONFIG_SENSORS_LTC2992 is not set
# CONFIG_SENSORS_LTC4151 is not set
# CONFIG_SENSORS_LTC4215 is not set
# CONFIG_SENSORS_LTC4222 is not set
# CONFIG_SENSORS_LTC4245 is not set
# CONFIG_SENSORS_LTC4260 is not set
# CONFIG_SENSORS_LTC4261 is not set
# CONFIG_SENSORS_LTC4282 is not set
# CONFIG_SENSORS_LTC4283 is not set
# CONFIG_SENSORS_MAX1111 is not set
# CONFIG_SENSORS_MAX127 is not set
# CONFIG_SENSORS_MAX16065 is not set
# CONFIG_SENSORS_MAX1619 is not set
# CONFIG_SENSORS_MAX1668 is not set
# CONFIG_SENSORS_MAX197 is not set
# CONFIG_SENSORS_MAX31722 is not set
# CONFIG_SENSORS_MAX31730 is not set
# CONFIG_SENSORS_MAX31760 is not set
# CONFIG_MAX31827 is not set
# CONFIG_SENSORS_MAX6620 is not set
# CONFIG_SENSORS_MAX6621 is not set
# CONFIG_SENSORS_MAX6639 is not set
# CONFIG_SENSORS_MAX6650 is not set
# CONFIG_SENSORS_MAX6697 is not set
# CONFIG_SENSORS_MAX31790 is not set
# CONFIG_SENSORS_MC34VR500 is not set
# CONFIG_SENSORS_MCP3021 is not set
# CONFIG_SENSORS_MCP9982 is not set
# CONFIG_SENSORS_TC654 is not set
# CONFIG_SENSORS_TPS23861 is not set
# CONFIG_SENSORS_MR75203 is not set
# CONFIG_SENSORS_ADCXX is not set
# CONFIG_SENSORS_LM63 is not set
# CONFIG_SENSORS_LM70 is not set
# CONFIG_SENSORS_LM73 is not set
# CONFIG_SENSORS_LM75 is not set
# CONFIG_SENSORS_LM77 is not set
# CONFIG_SENSORS_LM78 is not set
# CONFIG_SENSORS_LM80 is not set
# CONFIG_SENSORS_LM83 is not set
# CONFIG_SENSORS_LM85 is not set
# CONFIG_SENSORS_LM87 is not set
# CONFIG_SENSORS_LM90 is not set
# CONFIG_SENSORS_LM92 is not set
# CONFIG_SENSORS_LM93 is not set
# CONFIG_SENSORS_LM95234 is not set
# CONFIG_SENSORS_LM95241 is not set
# CONFIG_SENSORS_LM95245 is not set
# CONFIG_SENSORS_PC87360 is not set
# CONFIG_SENSORS_PC87427 is not set
# CONFIG_SENSORS_NTC_THERMISTOR is not set
# CONFIG_SENSORS_NCT6683 is not set
# CONFIG_SENSORS_NCT6775 is not set
# CONFIG_SENSORS_NCT6775_I2C is not set
# CONFIG_SENSORS_NCT7363 is not set
# CONFIG_SENSORS_NCT7802 is not set
# CONFIG_SENSORS_NCT7904 is not set
# CONFIG_SENSORS_NPCM7XX is not set
CONFIG_SENSORS_NZXT_KRAKEN2=y
# CONFIG_SENSORS_NZXT_KRAKEN3 is not set
CONFIG_SENSORS_NZXT_SMART2=y
# CONFIG_SENSORS_OCC_P8_I2C is not set
# CONFIG_SENSORS_PCF8591 is not set
# CONFIG_PMBUS is not set
# CONFIG_SENSORS_PT5161L is not set
# CONFIG_SENSORS_SBTSI is not set
# CONFIG_SENSORS_SHT15 is not set
# CONFIG_SENSORS_SHT21 is not set
# CONFIG_SENSORS_SHT3x is not set
# CONFIG_SENSORS_SHT4x is not set
# CONFIG_SENSORS_SHTC1 is not set
# CONFIG_SENSORS_SIS5595 is not set
# CONFIG_SENSORS_DME1737 is not set
# CONFIG_SENSORS_EMC1403 is not set
# CONFIG_SENSORS_EMC1812 is not set
# CONFIG_SENSORS_EMC2103 is not set
# CONFIG_SENSORS_EMC2305 is not set
# CONFIG_SENSORS_EMC6W201 is not set
# CONFIG_SENSORS_SMSC47M1 is not set
# CONFIG_SENSORS_SMSC47M192 is not set
# CONFIG_SENSORS_SMSC47B397 is not set
# CONFIG_SENSORS_SCH5627 is not set
# CONFIG_SENSORS_SCH5636 is not set
# CONFIG_SENSORS_STTS751 is not set
# CONFIG_SENSORS_SURFACE_FAN is not set
# CONFIG_SENSORS_SURFACE_TEMP is not set
# CONFIG_SENSORS_ADC128D818 is not set
# CONFIG_SENSORS_ADS7828 is not set
# CONFIG_SENSORS_ADS7871 is not set
# CONFIG_SENSORS_AMC6821 is not set
# CONFIG_SENSORS_INA209 is not set
# CONFIG_SENSORS_INA2XX is not set
# CONFIG_SENSORS_INA238 is not set
# CONFIG_SENSORS_INA3221 is not set
# CONFIG_SENSORS_SPD5118 is not set
# CONFIG_SENSORS_TC74 is not set
# CONFIG_SENSORS_THMC50 is not set
# CONFIG_SENSORS_TMP102 is not set
# CONFIG_SENSORS_TMP103 is not set
# CONFIG_SENSORS_TMP108 is not set
# CONFIG_SENSORS_TMP401 is not set
# CONFIG_SENSORS_TMP421 is not set
# CONFIG_SENSORS_TMP464 is not set
# CONFIG_SENSORS_TMP513 is not set
# CONFIG_SENSORS_TSC1641 is not set
# CONFIG_SENSORS_VIA_CPUTEMP is not set
# CONFIG_SENSORS_VIA686A is not set
# CONFIG_SENSORS_VT1211 is not set
# CONFIG_SENSORS_VT8231 is not set
# CONFIG_SENSORS_W83773G is not set
# CONFIG_SENSORS_W83781D is not set
# CONFIG_SENSORS_W83791D is not set
# CONFIG_SENSORS_W83792D is not set
# CONFIG_SENSORS_W83793 is not set
# CONFIG_SENSORS_W83795 is not set
# CONFIG_SENSORS_W83L785TS is not set
# CONFIG_SENSORS_W83L786NG is not set
# CONFIG_SENSORS_W83627HF is not set
# CONFIG_SENSORS_W83627EHF is not set
# CONFIG_SENSORS_XGENE is not set
# CONFIG_SENSORS_YOGAFAN is not set

#
# ACPI drivers
#
# CONFIG_SENSORS_ACPI_POWER is not set
# CONFIG_SENSORS_ATK0110 is not set
# CONFIG_SENSORS_ASUS_WMI is not set
# CONFIG_SENSORS_ASUS_EC is not set
# CONFIG_SENSORS_HP_WMI is not set
CONFIG_THERMAL=y
CONFIG_THERMAL_NETLINK=y
# CONFIG_THERMAL_STATISTICS is not set
# CONFIG_THERMAL_DEBUGFS is not set
# CONFIG_THERMAL_CORE_TESTING is not set
CONFIG_THERMAL_EMERGENCY_POWEROFF_DELAY_MS=0
CONFIG_THERMAL_HWMON=y
# CONFIG_THERMAL_OF is not set
CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE=y
# CONFIG_THERMAL_DEFAULT_GOV_FAIR_SHARE is not set
# CONFIG_THERMAL_DEFAULT_GOV_USER_SPACE is not set
# CONFIG_THERMAL_GOV_FAIR_SHARE is not set
CONFIG_THERMAL_GOV_STEP_WISE=y
# CONFIG_THERMAL_GOV_BANG_BANG is not set
# CONFIG_THERMAL_GOV_USER_SPACE is not set
# CONFIG_PCIE_THERMAL is not set
# CONFIG_THERMAL_EMULATION is not set
# CONFIG_THERMAL_MMIO is not set

#
# Intel thermal drivers
#
# CONFIG_INTEL_POWERCLAMP is not set
CONFIG_X86_THERMAL_VECTOR=y
# CONFIG_X86_PKG_TEMP_THERMAL is not set
# CONFIG_INTEL_SOC_DTS_THERMAL is not set

#
# ACPI INT340X thermal drivers
#
# CONFIG_INT340X_THERMAL is not set
# end of ACPI INT340X thermal drivers

# CONFIG_INTEL_BXT_PMIC_THERMAL is not set
# CONFIG_INTEL_PCH_THERMAL is not set
# CONFIG_INTEL_TCC_COOLING is not set
# CONFIG_INTEL_HFI_THERMAL is not set
# end of Intel thermal drivers

# CONFIG_GENERIC_ADC_THERMAL is not set
CONFIG_WATCHDOG=y
# CONFIG_WATCHDOG_CORE is not set
# CONFIG_WATCHDOG_NOWAYOUT is not set
CONFIG_WATCHDOG_HANDLE_BOOT_ENABLED=y
CONFIG_WATCHDOG_OPEN_TIMEOUT=0
# CONFIG_WATCHDOG_SYSFS is not set
# CONFIG_WATCHDOG_HRTIMER_PRETIMEOUT is not set

#
# Watchdog Pretimeout Governors
#

#
# Watchdog Device Drivers
#
# CONFIG_SOFT_WATCHDOG is not set
# CONFIG_GPIO_WATCHDOG is not set
# CONFIG_LENOVO_SE10_WDT is not set
# CONFIG_LENOVO_SE30_WDT is not set
# CONFIG_WDAT_WDT is not set
# CONFIG_XILINX_WATCHDOG is not set
# CONFIG_ZIIRAVE_WATCHDOG is not set
# CONFIG_CADENCE_WATCHDOG is not set
# CONFIG_DW_WATCHDOG is not set
# CONFIG_TWL4030_WATCHDOG is not set
# CONFIG_MAX63XX_WATCHDOG is not set
# CONFIG_RETU_WATCHDOG is not set
# CONFIG_ACQUIRE_WDT is not set
# CONFIG_ADVANTECH_WDT is not set
# CONFIG_ADVANTECH_EC_WDT is not set
# CONFIG_ALIM1535_WDT is not set
# CONFIG_ALIM7101_WDT is not set
# CONFIG_EBC_C384_WDT is not set
# CONFIG_EXAR_WDT is not set
# CONFIG_F71808E_WDT is not set
# CONFIG_SP5100_TCO is not set
# CONFIG_SBC_FITPC2_WATCHDOG is not set
# CONFIG_EUROTECH_WDT is not set
# CONFIG_IB700_WDT is not set
# CONFIG_IBMASR is not set
# CONFIG_WAFER_WDT is not set
# CONFIG_I6300ESB_WDT is not set
# CONFIG_IE6XX_WDT is not set
# CONFIG_INTEL_OC_WATCHDOG is not set
# CONFIG_ITCO_WDT is not set
# CONFIG_IT8712F_WDT is not set
# CONFIG_IT87_WDT is not set
# CONFIG_HP_WATCHDOG is not set
# CONFIG_SC1200_WDT is not set
# CONFIG_PC87413_WDT is not set
# CONFIG_NV_TCO is not set
# CONFIG_60XX_WDT is not set
# CONFIG_SMSC_SCH311X_WDT is not set
# CONFIG_SMSC37B787_WDT is not set
# CONFIG_TQMX86_WDT is not set
# CONFIG_VIA_WDT is not set
# CONFIG_W83627HF_WDT is not set
# CONFIG_W83877F_WDT is not set
# CONFIG_W83977F_WDT is not set
# CONFIG_SBC_EPX_C3_WATCHDOG is not set
# CONFIG_INTEL_MEI_WDT is not set
# CONFIG_NI903X_WDT is not set
# CONFIG_NIC7018_WDT is not set
# CONFIG_MEN_A21_WDT is not set

#
# PCI-based Watchdog Cards
#
# CONFIG_PCIPCWATCHDOG is not set
# CONFIG_WDTPCI is not set

#
# USB-based Watchdog Cards
#
CONFIG_USBPCWATCHDOG=y
CONFIG_SSB_POSSIBLE=y
CONFIG_SSB=y
CONFIG_SSB_PCIHOST_POSSIBLE=y
# CONFIG_SSB_PCIHOST is not set
CONFIG_SSB_PCMCIAHOST_POSSIBLE=y
# CONFIG_SSB_PCMCIAHOST is not set
CONFIG_SSB_SDIOHOST_POSSIBLE=y
# CONFIG_SSB_SDIOHOST is not set
# CONFIG_SSB_DRIVER_GPIO is not set
CONFIG_BCMA_POSSIBLE=y
CONFIG_BCMA=y
CONFIG_BCMA_HOST_PCI_POSSIBLE=y
# CONFIG_BCMA_HOST_PCI is not set
# CONFIG_BCMA_HOST_SOC is not set
# CONFIG_BCMA_DRIVER_PCI is not set
# CONFIG_BCMA_DRIVER_GMAC_CMN is not set
# CONFIG_BCMA_DRIVER_GPIO is not set
# CONFIG_BCMA_DEBUG is not set

#
# Multifunction device drivers
#
CONFIG_MFD_CORE=y
# CONFIG_MFD_ADP5585 is not set
# CONFIG_MFD_ACT8945A is not set
# CONFIG_MFD_AS3711 is not set
# CONFIG_MFD_SMPRO is not set
# CONFIG_MFD_AS3722 is not set
# CONFIG_PMIC_ADP5520 is not set
# CONFIG_MFD_AAT2870_CORE is not set
# CONFIG_MFD_ATMEL_FLEXCOM is not set
# CONFIG_MFD_ATMEL_HLCDC is not set
# CONFIG_MFD_BCM590XX is not set
# CONFIG_MFD_BD9571MWV is not set
# CONFIG_MFD_AXP20X_I2C is not set
# CONFIG_MFD_CGBC is not set
# CONFIG_MFD_CS40L50_I2C is not set
# CONFIG_MFD_CS40L50_SPI is not set
# CONFIG_MFD_CS42L43_I2C is not set
# CONFIG_MFD_CS42L43_SDW is not set
# CONFIG_MFD_LOCHNAGAR is not set
# CONFIG_MFD_MADERA is not set
# CONFIG_PMIC_DA903X is not set
# CONFIG_MFD_DA9052_SPI is not set
# CONFIG_MFD_DA9052_I2C is not set
# CONFIG_MFD_DA9055 is not set
# CONFIG_MFD_DA9062 is not set
# CONFIG_MFD_DA9063 is not set
# CONFIG_MFD_DA9150 is not set
CONFIG_MFD_DLN2=y
# CONFIG_MFD_GATEWORKS_GSC is not set
# CONFIG_MFD_MC13XXX_SPI is not set
# CONFIG_MFD_MC13XXX_I2C is not set
# CONFIG_MFD_MP2629 is not set
# CONFIG_MFD_PF1550 is not set
# CONFIG_MFD_HI6421_PMIC is not set
# CONFIG_MFD_INTEL_QUARK_I2C_GPIO is not set
CONFIG_LPC_ICH=y
# CONFIG_LPC_SCH is not set
# CONFIG_INTEL_SOC_PMIC is not set
CONFIG_INTEL_SOC_PMIC_BXTWC=y
CONFIG_INTEL_SOC_PMIC_CHTWC=y
# CONFIG_INTEL_SOC_PMIC_CHTDC_TI is not set
# CONFIG_MFD_INTEL_LPSS_ACPI is not set
# CONFIG_MFD_INTEL_LPSS_PCI is not set
CONFIG_MFD_INTEL_PMC_BXT=y
# CONFIG_MFD_IQS62X is not set
# CONFIG_MFD_JANZ_CMODIO is not set
# CONFIG_MFD_KEMPLD is not set
# CONFIG_MFD_88PM800 is not set
# CONFIG_MFD_88PM805 is not set
# CONFIG_MFD_88PM860X is not set
# CONFIG_MFD_88PM886_PMIC is not set
# CONFIG_MFD_MAX5970 is not set
# CONFIG_MFD_MAX14577 is not set
# CONFIG_MFD_MAX77541 is not set
# CONFIG_MFD_MAX77620 is not set
# CONFIG_MFD_MAX77650 is not set
# CONFIG_MFD_MAX77686 is not set
# CONFIG_MFD_MAX77693 is not set
# CONFIG_MFD_MAX77705 is not set
# CONFIG_MFD_MAX77714 is not set
# CONFIG_MFD_MAX77759 is not set
# CONFIG_MFD_MAX77843 is not set
# CONFIG_MFD_MAX8907 is not set
# CONFIG_MFD_MAX8925 is not set
# CONFIG_MFD_MAX8997 is not set
# CONFIG_MFD_MAX8998 is not set
CONFIG_MFD_MT6360=y
CONFIG_MFD_MT6370=y
# CONFIG_MFD_MT6397 is not set
# CONFIG_MFD_MENF21BMC is not set
# CONFIG_MFD_NCT6694 is not set
# CONFIG_MFD_OCELOT is not set
# CONFIG_MFD_CPCAP is not set
CONFIG_MFD_VIPERBOARD=y
# CONFIG_MFD_NTXEC is not set
CONFIG_MFD_RETU=y
# CONFIG_MFD_SY7636A is not set
# CONFIG_MFD_RDC321X is not set
# CONFIG_MFD_RT4831 is not set
# CONFIG_MFD_RT5033 is not set
# CONFIG_MFD_RT5120 is not set
# CONFIG_MFD_RC5T583 is not set
# CONFIG_MFD_RK8XX_I2C is not set
# CONFIG_MFD_RK8XX_SPI is not set
# CONFIG_MFD_RN5T618 is not set
# CONFIG_MFD_SEC_I2C is not set
# CONFIG_MFD_SI476X_CORE is not set
# CONFIG_MFD_SM501 is not set
# CONFIG_MFD_SKY81452 is not set
# CONFIG_MFD_STMPE is not set
CONFIG_MFD_SYSCON=y
# CONFIG_MFD_LP3943 is not set
# CONFIG_MFD_LP8788 is not set
# CONFIG_MFD_TI_LMU is not set
# CONFIG_MFD_BQ257XX is not set
# CONFIG_MFD_PALMAS is not set
# CONFIG_TPS6105X is not set
# CONFIG_TPS65010 is not set
# CONFIG_TPS6507X is not set
# CONFIG_MFD_TPS65086 is not set
# CONFIG_MFD_TPS65090 is not set
# CONFIG_MFD_TPS65217 is not set
# CONFIG_MFD_TI_LP873X is not set
# CONFIG_MFD_TI_LP87565 is not set
# CONFIG_MFD_TPS65218 is not set
# CONFIG_MFD_TPS65219 is not set
# CONFIG_MFD_TPS6586X is not set
# CONFIG_MFD_TPS65910 is not set
# CONFIG_MFD_TPS65912_I2C is not set
# CONFIG_MFD_TPS65912_SPI is not set
# CONFIG_MFD_TPS6594_I2C is not set
# CONFIG_MFD_TPS6594_SPI is not set
CONFIG_TWL4030_CORE=y
# CONFIG_MFD_TWL4030_AUDIO is not set
# CONFIG_TWL6040_CORE is not set
# CONFIG_MFD_LM3533 is not set
# CONFIG_MFD_TC3589X is not set
# CONFIG_MFD_TQMX86 is not set
# CONFIG_MFD_VX855 is not set
# CONFIG_MFD_ARIZONA_I2C is not set
# CONFIG_MFD_ARIZONA_SPI is not set
# CONFIG_MFD_WM8400 is not set
# CONFIG_MFD_WM831X_I2C is not set
# CONFIG_MFD_WM831X_SPI is not set
# CONFIG_MFD_WM8350_I2C is not set
# CONFIG_MFD_WM8994 is not set
# CONFIG_MFD_ROHM_BD718XX is not set
# CONFIG_MFD_ROHM_BD71828 is not set
# CONFIG_MFD_ROHM_BD957XMUF is not set
# CONFIG_MFD_ROHM_BD96801 is not set
# CONFIG_MFD_STPMIC1 is not set
# CONFIG_MFD_STMFX is not set
# CONFIG_MFD_ATC260X_I2C is not set
# CONFIG_MFD_QCOM_PM8008 is not set
# CONFIG_RAVE_SP_CORE is not set
# CONFIG_MFD_INTEL_M10_BMC_SPI is not set
# CONFIG_MFD_QNAP_MCU is not set
# CONFIG_MFD_RSMU_I2C is not set
# CONFIG_MFD_RSMU_SPI is not set
# CONFIG_MFD_UPBOARD_FPGA is not set
# CONFIG_MFD_MAX7360 is not set
# end of Multifunction device drivers

CONFIG_REGULATOR=y
# CONFIG_REGULATOR_DEBUG is not set
CONFIG_REGULATOR_FIXED_VOLTAGE=y
# CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set
# CONFIG_REGULATOR_USERSPACE_CONSUMER is not set
# CONFIG_REGULATOR_NETLINK_EVENTS is not set
# CONFIG_REGULATOR_88PG86X is not set
# CONFIG_REGULATOR_ACT8865 is not set
# CONFIG_REGULATOR_AD5398 is not set
# CONFIG_REGULATOR_ADP5055 is not set
# CONFIG_REGULATOR_AW37503 is not set
# CONFIG_REGULATOR_DA9121 is not set
# CONFIG_REGULATOR_DA9210 is not set
# CONFIG_REGULATOR_DA9211 is not set
# CONFIG_REGULATOR_FAN53555 is not set
# CONFIG_REGULATOR_FAN53880 is not set
# CONFIG_REGULATOR_GPIO is not set
# CONFIG_REGULATOR_ISL9305 is not set
# CONFIG_REGULATOR_ISL6271A is not set
# CONFIG_REGULATOR_FP9931 is not set
# CONFIG_REGULATOR_LP3971 is not set
# CONFIG_REGULATOR_LP3972 is not set
# CONFIG_REGULATOR_LP872X is not set
# CONFIG_REGULATOR_LP8755 is not set
# CONFIG_REGULATOR_LTC3589 is not set
# CONFIG_REGULATOR_LTC3676 is not set
# CONFIG_REGULATOR_MAX1586 is not set
# CONFIG_REGULATOR_MAX77503 is not set
# CONFIG_REGULATOR_MAX77675 is not set
# CONFIG_REGULATOR_MAX77857 is not set
# CONFIG_REGULATOR_MAX8649 is not set
# CONFIG_REGULATOR_MAX8660 is not set
# CONFIG_REGULATOR_MAX8893 is not set
# CONFIG_REGULATOR_MAX8952 is not set
# CONFIG_REGULATOR_MAX20086 is not set
# CONFIG_REGULATOR_MAX20411 is not set
# CONFIG_REGULATOR_MAX77826 is not set
# CONFIG_REGULATOR_MAX77838 is not set
# CONFIG_REGULATOR_MCP16502 is not set
# CONFIG_REGULATOR_MP5416 is not set
# CONFIG_REGULATOR_MP8859 is not set
# CONFIG_REGULATOR_MP886X is not set
# CONFIG_REGULATOR_MPQ7920 is not set
# CONFIG_REGULATOR_MT6311 is not set
# CONFIG_REGULATOR_MT6360 is not set
# CONFIG_REGULATOR_MT6370 is not set
# CONFIG_REGULATOR_PCA9450 is not set
# CONFIG_REGULATOR_PF9453 is not set
# CONFIG_REGULATOR_PF0900 is not set
# CONFIG_REGULATOR_PF530X is not set
# CONFIG_REGULATOR_PF8X00 is not set
# CONFIG_REGULATOR_PFUZE100 is not set
# CONFIG_REGULATOR_PV88060 is not set
# CONFIG_REGULATOR_PV88080 is not set
# CONFIG_REGULATOR_PV88090 is not set
# CONFIG_REGULATOR_RAA215300 is not set
# CONFIG_REGULATOR_RT4801 is not set
# CONFIG_REGULATOR_RT4803 is not set
# CONFIG_REGULATOR_RT5133 is not set
# CONFIG_REGULATOR_RT5190A is not set
# CONFIG_REGULATOR_RT5739 is not set
# CONFIG_REGULATOR_RT5759 is not set
# CONFIG_REGULATOR_RT6160 is not set
# CONFIG_REGULATOR_RT6190 is not set
# CONFIG_REGULATOR_RT6245 is not set
# CONFIG_REGULATOR_RT8092 is not set
# CONFIG_REGULATOR_RTQ2134 is not set
# CONFIG_REGULATOR_RTMV20 is not set
# CONFIG_REGULATOR_RTQ6752 is not set
# CONFIG_REGULATOR_RTQ2208 is not set
# CONFIG_REGULATOR_SGM3804 is not set
# CONFIG_REGULATOR_SLG51000 is not set
# CONFIG_REGULATOR_SY8106A is not set
# CONFIG_REGULATOR_SY8824X is not set
# CONFIG_REGULATOR_SY8827N is not set
# CONFIG_REGULATOR_TPS51632 is not set
# CONFIG_REGULATOR_TPS62360 is not set
# CONFIG_REGULATOR_TPS6286X is not set
# CONFIG_REGULATOR_TPS6287X is not set
# CONFIG_REGULATOR_TPS65023 is not set
# CONFIG_REGULATOR_TPS6507X is not set
# CONFIG_REGULATOR_TPS65132 is not set
# CONFIG_REGULATOR_TPS65185 is not set
# CONFIG_REGULATOR_TPS6524X is not set
CONFIG_REGULATOR_TWL4030=y
# CONFIG_REGULATOR_VCTRL is not set
CONFIG_RC_CORE=y
# CONFIG_LIRC is not set
# CONFIG_RC_MAP is not set
# CONFIG_RC_DECODERS is not set
CONFIG_RC_DEVICES=y
# CONFIG_IR_ENE is not set
# CONFIG_IR_FINTEK is not set
# CONFIG_IR_GPIO_CIR is not set
# CONFIG_IR_HIX5HD2 is not set
CONFIG_IR_IGORPLUGUSB=y
CONFIG_IR_IGUANA=y
CONFIG_IR_IMON=y
CONFIG_IR_IMON_RAW=y
# CONFIG_IR_ITE_CIR is not set
CONFIG_IR_MCEUSB=y
# CONFIG_IR_NUVOTON is not set
CONFIG_IR_REDRAT3=y
# CONFIG_IR_SERIAL is not set
CONFIG_IR_STREAMZAP=y
CONFIG_IR_TOY=y
CONFIG_IR_TTUSBIR=y
# CONFIG_IR_WINBOND_CIR is not set
CONFIG_RC_ATI_REMOTE=y
# CONFIG_RC_LOOPBACK is not set
CONFIG_RC_XBOX_DVD=y
CONFIG_CEC_CORE=y

#
# CEC support
#
# CONFIG_MEDIA_CEC_RC is not set
CONFIG_MEDIA_CEC_SUPPORT=y
# CONFIG_CEC_CH7322 is not set
# CONFIG_CEC_NXP_TDA9950 is not set
# CONFIG_CEC_GPIO is not set
# CONFIG_CEC_SECO is not set
# CONFIG_USB_EXTRON_DA_HD_4K_PLUS_CEC is not set
CONFIG_USB_PULSE8_CEC=y
CONFIG_USB_RAINSHADOW_CEC=y
# end of CEC support

CONFIG_MEDIA_SUPPORT=y
CONFIG_MEDIA_SUPPORT_FILTER=y
# CONFIG_MEDIA_SUBDRV_AUTOSELECT is not set

#
# Media device types
#
CONFIG_MEDIA_CAMERA_SUPPORT=y
CONFIG_MEDIA_ANALOG_TV_SUPPORT=y
CONFIG_MEDIA_DIGITAL_TV_SUPPORT=y
CONFIG_MEDIA_RADIO_SUPPORT=y
CONFIG_MEDIA_SDR_SUPPORT=y
CONFIG_MEDIA_PLATFORM_SUPPORT=y
CONFIG_MEDIA_TEST_SUPPORT=y
# end of Media device types

CONFIG_VIDEO_DEV=y
CONFIG_MEDIA_CONTROLLER=y
CONFIG_DVB_CORE=y

#
# Video4Linux options
#
CONFIG_VIDEO_V4L2_I2C=y
CONFIG_VIDEO_V4L2_SUBDEV_API=y
# CONFIG_VIDEO_ADV_DEBUG is not set
# CONFIG_VIDEO_FIXED_MINOR_RANGES is not set
CONFIG_VIDEO_TUNER=y
CONFIG_V4L2_MEM2MEM_DEV=y
# end of Video4Linux options

#
# Media controller options
#
CONFIG_MEDIA_CONTROLLER_DVB=y
# end of Media controller options

#
# Digital TV options
#
# CONFIG_DVB_MMAP is not set
# CONFIG_DVB_NET is not set
CONFIG_DVB_MAX_ADAPTERS=16
# CONFIG_DVB_DYNAMIC_MINORS is not set
# CONFIG_DVB_DEMUX_SECTION_LOSS_LOG is not set
# CONFIG_DVB_ULE_DEBUG is not set
# end of Digital TV options

#
# Media drivers
#

#
# Drivers filtered as selected at 'Filter media drivers'
#

#
# Media drivers
#
CONFIG_MEDIA_USB_SUPPORT=y

#
# Webcam devices
#
CONFIG_USB_GSPCA=y
CONFIG_USB_GSPCA_BENQ=y
CONFIG_USB_GSPCA_CONEX=y
CONFIG_USB_GSPCA_CPIA1=y
CONFIG_USB_GSPCA_DTCS033=y
CONFIG_USB_GSPCA_ETOMS=y
CONFIG_USB_GSPCA_FINEPIX=y
CONFIG_USB_GSPCA_JEILINJ=y
CONFIG_USB_GSPCA_JL2005BCD=y
CONFIG_USB_GSPCA_KINECT=y
CONFIG_USB_GSPCA_KONICA=y
CONFIG_USB_GSPCA_MARS=y
CONFIG_USB_GSPCA_MR97310A=y
CONFIG_USB_GSPCA_NW80X=y
CONFIG_USB_GSPCA_OV519=y
CONFIG_USB_GSPCA_OV534=y
CONFIG_USB_GSPCA_OV534_9=y
CONFIG_USB_GSPCA_PAC207=y
CONFIG_USB_GSPCA_PAC7302=y
CONFIG_USB_GSPCA_PAC7311=y
CONFIG_USB_GSPCA_SE401=y
CONFIG_USB_GSPCA_SN9C2028=y
CONFIG_USB_GSPCA_SN9C20X=y
CONFIG_USB_GSPCA_SONIXB=y
CONFIG_USB_GSPCA_SONIXJ=y
CONFIG_USB_GSPCA_SPCA1528=y
CONFIG_USB_GSPCA_SPCA500=y
CONFIG_USB_GSPCA_SPCA501=y
CONFIG_USB_GSPCA_SPCA505=y
CONFIG_USB_GSPCA_SPCA506=y
CONFIG_USB_GSPCA_SPCA508=y
CONFIG_USB_GSPCA_SPCA561=y
CONFIG_USB_GSPCA_SQ905=y
CONFIG_USB_GSPCA_SQ905C=y
CONFIG_USB_GSPCA_SQ930X=y
CONFIG_USB_GSPCA_STK014=y
CONFIG_USB_GSPCA_STK1135=y
CONFIG_USB_GSPCA_STV0680=y
CONFIG_USB_GSPCA_SUNPLUS=y
CONFIG_USB_GSPCA_T613=y
CONFIG_USB_GSPCA_TOPRO=y
CONFIG_USB_GSPCA_TOUPTEK=y
CONFIG_USB_GSPCA_TV8532=y
CONFIG_USB_GSPCA_VC032X=y
CONFIG_USB_GSPCA_VICAM=y
CONFIG_USB_GSPCA_XIRLINK_CIT=y
CONFIG_USB_GSPCA_ZC3XX=y
CONFIG_USB_GL860=y
CONFIG_USB_M5602=y
CONFIG_USB_STV06XX=y
CONFIG_USB_PWC=y
# CONFIG_USB_PWC_DEBUG is not set
CONFIG_USB_PWC_INPUT_EVDEV=y
CONFIG_USB_S2255=y
CONFIG_VIDEO_USBTV=y
CONFIG_USB_VIDEO_CLASS=y
CONFIG_USB_VIDEO_CLASS_INPUT_EVDEV=y

#
# Analog TV USB devices
#
CONFIG_VIDEO_GO7007=y
CONFIG_VIDEO_GO7007_USB=y
CONFIG_VIDEO_GO7007_LOADER=y
CONFIG_VIDEO_GO7007_USB_S2250_BOARD=y
CONFIG_VIDEO_HDPVR=y
CONFIG_VIDEO_PVRUSB2=y
CONFIG_VIDEO_PVRUSB2_SYSFS=y
CONFIG_VIDEO_PVRUSB2_DVB=y
# CONFIG_VIDEO_PVRUSB2_DEBUGIFC is not set
CONFIG_VIDEO_STK1160=y

#
# Analog/digital TV USB devices
#
CONFIG_VIDEO_AU0828=y
CONFIG_VIDEO_AU0828_V4L2=y
CONFIG_VIDEO_AU0828_RC=y
CONFIG_VIDEO_CX231XX=y
CONFIG_VIDEO_CX231XX_RC=y
CONFIG_VIDEO_CX231XX_ALSA=y
CONFIG_VIDEO_CX231XX_DVB=y

#
# Digital TV USB devices
#
CONFIG_DVB_AS102=y
CONFIG_DVB_B2C2_FLEXCOP_USB=y
# CONFIG_DVB_B2C2_FLEXCOP_USB_DEBUG is not set
CONFIG_DVB_USB_V2=y
CONFIG_DVB_USB_AF9015=y
CONFIG_DVB_USB_AF9035=y
CONFIG_DVB_USB_ANYSEE=y
CONFIG_DVB_USB_AU6610=y
CONFIG_DVB_USB_AZ6007=y
CONFIG_DVB_USB_CE6230=y
CONFIG_DVB_USB_DVBSKY=y
CONFIG_DVB_USB_EC168=y
CONFIG_DVB_USB_GL861=y
CONFIG_DVB_USB_LME2510=y
CONFIG_DVB_USB_MXL111SF=y
CONFIG_DVB_USB_RTL28XXU=y
CONFIG_DVB_USB_ZD1301=y
CONFIG_DVB_USB=y
# CONFIG_DVB_USB_DEBUG is not set
CONFIG_DVB_USB_A800=y
CONFIG_DVB_USB_AF9005=y
CONFIG_DVB_USB_AF9005_REMOTE=y
CONFIG_DVB_USB_AZ6027=y
CONFIG_DVB_USB_CINERGY_T2=y
CONFIG_DVB_USB_CXUSB=y
CONFIG_DVB_USB_CXUSB_ANALOG=y
CONFIG_DVB_USB_DIB0700=y
CONFIG_DVB_USB_DIB3000MC=y
CONFIG_DVB_USB_DIBUSB_MB=y
# CONFIG_DVB_USB_DIBUSB_MB_FAULTY is not set
CONFIG_DVB_USB_DIBUSB_MC=y
CONFIG_DVB_USB_DIGITV=y
CONFIG_DVB_USB_DTT200U=y
CONFIG_DVB_USB_DTV5100=y
CONFIG_DVB_USB_DW2102=y
CONFIG_DVB_USB_GP8PSK=y
CONFIG_DVB_USB_M920X=y
CONFIG_DVB_USB_NOVA_T_USB2=y
CONFIG_DVB_USB_OPERA1=y
CONFIG_DVB_USB_PCTV452E=y
CONFIG_DVB_USB_TECHNISAT_USB2=y
CONFIG_DVB_USB_TTUSB2=y
CONFIG_DVB_USB_UMT_010=y
CONFIG_DVB_USB_VP702X=y
CONFIG_DVB_USB_VP7045=y
CONFIG_SMS_USB_DRV=y
CONFIG_DVB_TTUSB_BUDGET=y
CONFIG_DVB_TTUSB_DEC=y

#
# Webcam, TV (analog/digital) USB devices
#
CONFIG_VIDEO_EM28XX=y
CONFIG_VIDEO_EM28XX_V4L2=y
CONFIG_VIDEO_EM28XX_ALSA=y
CONFIG_VIDEO_EM28XX_DVB=y
CONFIG_VIDEO_EM28XX_RC=y

#
# Software defined radio USB devices
#
CONFIG_USB_AIRSPY=y
CONFIG_USB_HACKRF=y
CONFIG_USB_MSI2500=y
# CONFIG_MEDIA_PCI_SUPPORT is not set
CONFIG_RADIO_ADAPTERS=y
# CONFIG_RADIO_MAXIRADIO is not set
# CONFIG_RADIO_SAA7706H is not set
CONFIG_RADIO_SHARK=y
CONFIG_RADIO_SHARK2=y
CONFIG_RADIO_SI4713=y
CONFIG_RADIO_TEA575X=y
# CONFIG_RADIO_TEA5764 is not set
# CONFIG_RADIO_TEF6862 is not set
CONFIG_USB_DSBR=y
CONFIG_USB_KEENE=y
CONFIG_USB_MA901=y
CONFIG_USB_MR800=y
CONFIG_USB_RAREMONO=y
CONFIG_RADIO_SI470X=y
CONFIG_USB_SI470X=y
# CONFIG_I2C_SI470X is not set
CONFIG_USB_SI4713=y
# CONFIG_PLATFORM_SI4713 is not set
CONFIG_I2C_SI4713=y
# CONFIG_MEDIA_PLATFORM_DRIVERS is not set

#
# MMC/SDIO DVB adapters
#
CONFIG_SMS_SDIO_DRV=y
CONFIG_V4L_TEST_DRIVERS=y
CONFIG_VIDEO_VIM2M=y
CONFIG_VIDEO_VICODEC=y
CONFIG_VIDEO_VIMC=y
CONFIG_VIDEO_VIVID=y
CONFIG_VIDEO_VIVID_CEC=y
# CONFIG_VIDEO_VIVID_OSD is not set
CONFIG_VIDEO_VIVID_MAX_DEVS=64
# CONFIG_VIDEO_VISL is not set
CONFIG_DVB_TEST_DRIVERS=y
CONFIG_DVB_VIDTV=y

#
# FireWire (IEEE 1394) Adapters
#
# CONFIG_DVB_FIREDTV is not set
CONFIG_MEDIA_COMMON_OPTIONS=y

#
# common driver options
#
CONFIG_CYPRESS_FIRMWARE=y
CONFIG_TTPCI_EEPROM=y
CONFIG_UVC_COMMON=y
CONFIG_VIDEO_CX2341X=y
CONFIG_VIDEO_TVEEPROM=y
CONFIG_DVB_B2C2_FLEXCOP=y
CONFIG_SMS_SIANO_MDTV=y
CONFIG_SMS_SIANO_RC=y
CONFIG_SMS_SIANO_DEBUGFS=y
CONFIG_VIDEO_V4L2_TPG=y
CONFIG_VIDEOBUF2_CORE=y
CONFIG_VIDEOBUF2_V4L2=y
CONFIG_VIDEOBUF2_MEMOPS=y
CONFIG_VIDEOBUF2_DMA_CONTIG=y
CONFIG_VIDEOBUF2_VMALLOC=y
CONFIG_VIDEOBUF2_DMA_SG=y
# end of Media drivers

#
# Media ancillary drivers
#
CONFIG_MEDIA_ATTACH=y
# CONFIG_VIDEO_IR_I2C is not set
# CONFIG_VIDEO_CAMERA_SENSOR is not set

#
# Camera ISPs
#
# CONFIG_VIDEO_THP7312 is not set
# end of Camera ISPs

# CONFIG_VIDEO_CAMERA_LENS is not set

#
# Flash devices
#
# CONFIG_VIDEO_ADP1653 is not set
# CONFIG_VIDEO_LM3560 is not set
# CONFIG_VIDEO_LM3646 is not set
# end of Flash devices

#
# Audio decoders, processors and mixers
#
# CONFIG_VIDEO_CS3308 is not set
# CONFIG_VIDEO_CS5345 is not set
CONFIG_VIDEO_CS53L32A=y
CONFIG_VIDEO_MSP3400=y
# CONFIG_VIDEO_SONY_BTF_MPX is not set
# CONFIG_VIDEO_TDA1997X is not set
# CONFIG_VIDEO_TDA7432 is not set
# CONFIG_VIDEO_TDA9840 is not set
# CONFIG_VIDEO_TEA6415C is not set
# CONFIG_VIDEO_TEA6420 is not set
# CONFIG_VIDEO_TLV320AIC23B is not set
# CONFIG_VIDEO_TVAUDIO is not set
# CONFIG_VIDEO_UDA1342 is not set
# CONFIG_VIDEO_VP27SMPX is not set
# CONFIG_VIDEO_WM8739 is not set
CONFIG_VIDEO_WM8775=y
# end of Audio decoders, processors and mixers

#
# RDS decoders
#
# CONFIG_VIDEO_SAA6588 is not set
# end of RDS decoders

#
# Video decoders
#
# CONFIG_VIDEO_ADV7180 is not set
# CONFIG_VIDEO_ADV7183 is not set
# CONFIG_VIDEO_ADV748X is not set
# CONFIG_VIDEO_ADV7604 is not set
# CONFIG_VIDEO_ADV7842 is not set
# CONFIG_VIDEO_BT819 is not set
# CONFIG_VIDEO_BT856 is not set
# CONFIG_VIDEO_BT866 is not set
# CONFIG_VIDEO_ISL7998X is not set
# CONFIG_VIDEO_LT6911UXE is not set
# CONFIG_VIDEO_KS0127 is not set
# CONFIG_VIDEO_MAX9286 is not set
# CONFIG_VIDEO_ML86V7667 is not set
# CONFIG_VIDEO_SAA7110 is not set
CONFIG_VIDEO_SAA711X=y
# CONFIG_VIDEO_TC358743 is not set
# CONFIG_VIDEO_TC358746 is not set
# CONFIG_VIDEO_TVP514X is not set
# CONFIG_VIDEO_TVP5150 is not set
# CONFIG_VIDEO_TVP7002 is not set
# CONFIG_VIDEO_TW2804 is not set
# CONFIG_VIDEO_TW9900 is not set
# CONFIG_VIDEO_TW9903 is not set
# CONFIG_VIDEO_TW9906 is not set
# CONFIG_VIDEO_TW9910 is not set
# CONFIG_VIDEO_VPX3220 is not set

#
# Video and audio decoders
#
# CONFIG_VIDEO_SAA717X is not set
CONFIG_VIDEO_CX25840=y
# end of Video decoders

#
# Video encoders
#
# CONFIG_VIDEO_ADV7170 is not set
# CONFIG_VIDEO_ADV7175 is not set
# CONFIG_VIDEO_ADV7343 is not set
# CONFIG_VIDEO_ADV7393 is not set
# CONFIG_VIDEO_ADV7511 is not set
# CONFIG_VIDEO_AK881X is not set
# CONFIG_VIDEO_SAA7127 is not set
# CONFIG_VIDEO_SAA7185 is not set
# CONFIG_VIDEO_THS8200 is not set
# end of Video encoders

#
# Video improvement chips
#
# CONFIG_VIDEO_UPD64031A is not set
# CONFIG_VIDEO_UPD64083 is not set
# end of Video improvement chips

#
# Audio/Video compression chips
#
# CONFIG_VIDEO_SAA6752HS is not set
# end of Audio/Video compression chips

#
# SDR tuner chips
#
# CONFIG_SDR_MAX2175 is not set
# end of SDR tuner chips

#
# Miscellaneous helper chips
#
# CONFIG_VIDEO_INTEL_CVS is not set
# CONFIG_VIDEO_I2C is not set
# CONFIG_VIDEO_M52790 is not set
# CONFIG_VIDEO_ST_MIPID02 is not set
# CONFIG_VIDEO_THS7303 is not set
# end of Miscellaneous helper chips

#
# Video serializers and deserializers
#
# CONFIG_VIDEO_DS90UB913 is not set
# CONFIG_VIDEO_DS90UB953 is not set
# CONFIG_VIDEO_DS90UB960 is not set
# CONFIG_VIDEO_MAX96714 is not set
# CONFIG_VIDEO_MAX96717 is not set
# end of Video serializers and deserializers

#
# Media SPI Adapters
#
# CONFIG_CXD2880_SPI_DRV is not set
# CONFIG_VIDEO_GS1662 is not set
# end of Media SPI Adapters

CONFIG_MEDIA_TUNER=y

#
# Customize TV tuners
#
# CONFIG_MEDIA_TUNER_E4000 is not set
# CONFIG_MEDIA_TUNER_FC0011 is not set
# CONFIG_MEDIA_TUNER_FC0012 is not set
# CONFIG_MEDIA_TUNER_FC0013 is not set
# CONFIG_MEDIA_TUNER_FC2580 is not set
# CONFIG_MEDIA_TUNER_IT913X is not set
# CONFIG_MEDIA_TUNER_M88RS6000T is not set
# CONFIG_MEDIA_TUNER_MAX2165 is not set
# CONFIG_MEDIA_TUNER_MC44S803 is not set
CONFIG_MEDIA_TUNER_MSI001=y
# CONFIG_MEDIA_TUNER_MT2060 is not set
# CONFIG_MEDIA_TUNER_MT2063 is not set
# CONFIG_MEDIA_TUNER_MT20XX is not set
# CONFIG_MEDIA_TUNER_MT2131 is not set
# CONFIG_MEDIA_TUNER_MT2266 is not set
# CONFIG_MEDIA_TUNER_MXL301RF is not set
# CONFIG_MEDIA_TUNER_MXL5005S is not set
# CONFIG_MEDIA_TUNER_MXL5007T is not set
# CONFIG_MEDIA_TUNER_QM1D1B0004 is not set
# CONFIG_MEDIA_TUNER_QM1D1C0042 is not set
# CONFIG_MEDIA_TUNER_QT1010 is not set
# CONFIG_MEDIA_TUNER_R820T is not set
# CONFIG_MEDIA_TUNER_SI2157 is not set
# CONFIG_MEDIA_TUNER_SIMPLE is not set
# CONFIG_MEDIA_TUNER_TDA18212 is not set
# CONFIG_MEDIA_TUNER_TDA18218 is not set
# CONFIG_MEDIA_TUNER_TDA18250 is not set
# CONFIG_MEDIA_TUNER_TDA18271 is not set
# CONFIG_MEDIA_TUNER_TDA827X is not set
# CONFIG_MEDIA_TUNER_TDA8290 is not set
# CONFIG_MEDIA_TUNER_TDA9887 is not set
# CONFIG_MEDIA_TUNER_TEA5761 is not set
# CONFIG_MEDIA_TUNER_TEA5767 is not set
# CONFIG_MEDIA_TUNER_TUA9001 is not set
# CONFIG_MEDIA_TUNER_XC2028 is not set
# CONFIG_MEDIA_TUNER_XC4000 is not set
# CONFIG_MEDIA_TUNER_XC5000 is not set
# end of Customize TV tuners

#
# Customise DVB Frontends
#

#
# Multistandard (satellite) frontends
#
# CONFIG_DVB_M88DS3103 is not set
# CONFIG_DVB_MXL5XX is not set
# CONFIG_DVB_STB0899 is not set
# CONFIG_DVB_STB6100 is not set
# CONFIG_DVB_STV090x is not set
# CONFIG_DVB_STV0910 is not set
# CONFIG_DVB_STV6110x is not set
# CONFIG_DVB_STV6111 is not set

#
# Multistandard (cable + terrestrial) frontends
#
# CONFIG_DVB_DRXK is not set
# CONFIG_DVB_MN88472 is not set
# CONFIG_DVB_MN88473 is not set
# CONFIG_DVB_SI2165 is not set
# CONFIG_DVB_TDA18271C2DD is not set

#
# DVB-S (satellite) frontends
#
# CONFIG_DVB_CX24110 is not set
# CONFIG_DVB_CX24116 is not set
# CONFIG_DVB_CX24117 is not set
# CONFIG_DVB_CX24120 is not set
# CONFIG_DVB_CX24123 is not set
# CONFIG_DVB_DS3000 is not set
# CONFIG_DVB_MB86A16 is not set
# CONFIG_DVB_MT312 is not set
# CONFIG_DVB_S5H1420 is not set
# CONFIG_DVB_SI21XX is not set
# CONFIG_DVB_STB6000 is not set
# CONFIG_DVB_STV0288 is not set
# CONFIG_DVB_STV0299 is not set
# CONFIG_DVB_STV0900 is not set
# CONFIG_DVB_STV6110 is not set
# CONFIG_DVB_TDA10071 is not set
# CONFIG_DVB_TDA10086 is not set
# CONFIG_DVB_TDA8083 is not set
# CONFIG_DVB_TDA8261 is not set
# CONFIG_DVB_TDA826X is not set
# CONFIG_DVB_TS2020 is not set
# CONFIG_DVB_TUA6100 is not set
# CONFIG_DVB_TUNER_CX24113 is not set
# CONFIG_DVB_TUNER_ITD1000 is not set
# CONFIG_DVB_VES1X93 is not set
# CONFIG_DVB_ZL10036 is not set
# CONFIG_DVB_ZL10039 is not set

#
# DVB-T (terrestrial) frontends
#
CONFIG_DVB_AF9013=y
CONFIG_DVB_AS102_FE=y
# CONFIG_DVB_CX22700 is not set
# CONFIG_DVB_CX22702 is not set
# CONFIG_DVB_CXD2820R is not set
# CONFIG_DVB_CXD2841ER is not set
CONFIG_DVB_DIB3000MB=y
CONFIG_DVB_DIB3000MC=y
# CONFIG_DVB_DIB7000M is not set
# CONFIG_DVB_DIB7000P is not set
# CONFIG_DVB_DIB9000 is not set
# CONFIG_DVB_DRXD is not set
CONFIG_DVB_EC100=y
CONFIG_DVB_GP8PSK_FE=y
# CONFIG_DVB_L64781 is not set
# CONFIG_DVB_MT352 is not set
# CONFIG_DVB_NXT6000 is not set
CONFIG_DVB_RTL2830=y
CONFIG_DVB_RTL2832=y
CONFIG_DVB_RTL2832_SDR=y
# CONFIG_DVB_S5H1432 is not set
# CONFIG_DVB_SI2168 is not set
# CONFIG_DVB_SP887X is not set
# CONFIG_DVB_STV0367 is not set
# CONFIG_DVB_TDA10048 is not set
# CONFIG_DVB_TDA1004X is not set
# CONFIG_DVB_ZD1301_DEMOD is not set
CONFIG_DVB_ZL10353=y
# CONFIG_DVB_CXD2880 is not set

#
# DVB-C (cable) frontends
#
# CONFIG_DVB_STV0297 is not set
# CONFIG_DVB_TDA10021 is not set
# CONFIG_DVB_TDA10023 is not set
# CONFIG_DVB_VES1820 is not set

#
# ATSC (North American/Korean Terrestrial/Cable DTV) frontends
#
# CONFIG_DVB_AU8522_DTV is not set
# CONFIG_DVB_AU8522_V4L is not set
# CONFIG_DVB_BCM3510 is not set
# CONFIG_DVB_LG2160 is not set
# CONFIG_DVB_LGDT3305 is not set
# CONFIG_DVB_LGDT3306A is not set
# CONFIG_DVB_LGDT330X is not set
# CONFIG_DVB_MXL692 is not set
# CONFIG_DVB_NXT200X is not set
# CONFIG_DVB_OR51132 is not set
# CONFIG_DVB_OR51211 is not set
# CONFIG_DVB_S5H1409 is not set
# CONFIG_DVB_S5H1411 is not set

#
# ISDB-T (terrestrial) frontends
#
# CONFIG_DVB_DIB8000 is not set
# CONFIG_DVB_MB86A20S is not set
# CONFIG_DVB_S921 is not set

#
# ISDB-S (satellite) & ISDB-T (terrestrial) frontends
#
# CONFIG_DVB_MN88443X is not set
# CONFIG_DVB_TC90522 is not set

#
# Digital terrestrial only tuners/PLL
#
# CONFIG_DVB_PLL is not set
# CONFIG_DVB_TUNER_DIB0070 is not set
# CONFIG_DVB_TUNER_DIB0090 is not set

#
# SEC control devices for DVB-S
#
# CONFIG_DVB_A8293 is not set
CONFIG_DVB_AF9033=y
# CONFIG_DVB_ASCOT2E is not set
# CONFIG_DVB_ATBM8830 is not set
# CONFIG_DVB_HELENE is not set
# CONFIG_DVB_HORUS3A is not set
# CONFIG_DVB_ISL6405 is not set
# CONFIG_DVB_ISL6421 is not set
# CONFIG_DVB_ISL6423 is not set
# CONFIG_DVB_IX2505V is not set
# CONFIG_DVB_LGS8GL5 is not set
# CONFIG_DVB_LGS8GXX is not set
# CONFIG_DVB_LNBH25 is not set
# CONFIG_DVB_LNBH29 is not set
# CONFIG_DVB_LNBP21 is not set
# CONFIG_DVB_LNBP22 is not set
# CONFIG_DVB_M88RS2000 is not set
# CONFIG_DVB_TDA665x is not set
# CONFIG_DVB_DRX39XYJ is not set

#
# Common Interface (EN50221) controller drivers
#
# CONFIG_DVB_CXD2099 is not set
# CONFIG_DVB_SP2 is not set
# end of Customise DVB Frontends

#
# Tools to develop new frontends
#
# CONFIG_DVB_DUMMY_FE is not set
# end of Media ancillary drivers

#
# Graphics support
#
CONFIG_APERTURE_HELPERS=y
CONFIG_SCREEN_INFO=y
CONFIG_VIDEO=y
# CONFIG_AUXDISPLAY is not set
# CONFIG_PANEL is not set
CONFIG_AGP=y
CONFIG_AGP_AMD64=y
CONFIG_AGP_INTEL=y
# CONFIG_AGP_SIS is not set
# CONFIG_AGP_VIA is not set
CONFIG_INTEL_GTT=y
# CONFIG_VGA_SWITCHEROO is not set
CONFIG_GPU_BUDDY=y
CONFIG_DRM=y

#
# DRM debugging options
#
# CONFIG_DRM_WERROR is not set
CONFIG_DRM_DEBUG_MM=y
# end of DRM debugging options

CONFIG_DRM_MIPI_DSI=y
CONFIG_DRM_KMS_HELPER=y
# CONFIG_DRM_PANIC is not set
# CONFIG_DRM_RAS is not set
# CONFIG_DRM_DEBUG_DP_MST_TOPOLOGY_REFS is not set
# CONFIG_DRM_DEBUG_MODESET_LOCK is not set
CONFIG_DRM_CLIENT=y
CONFIG_DRM_CLIENT_LIB=y
CONFIG_DRM_CLIENT_SELECTION=y
CONFIG_DRM_CLIENT_SETUP=y

#
# Supported DRM clients
#
CONFIG_DRM_FBDEV_EMULATION=y
CONFIG_DRM_FBDEV_OVERALLOC=100
# CONFIG_DRM_FBDEV_LEAK_PHYS_SMEM is not set
# CONFIG_DRM_CLIENT_LOG is not set
CONFIG_DRM_CLIENT_DEFAULT_FBDEV=y
CONFIG_DRM_CLIENT_DEFAULT="fbdev"
# end of Supported DRM clients

# CONFIG_DRM_LOAD_EDID_FIRMWARE is not set
CONFIG_DRM_DISPLAY_DP_AUX_BUS=y
CONFIG_DRM_DISPLAY_HELPER=y
# CONFIG_DRM_DISPLAY_DP_AUX_CEC is not set
# CONFIG_DRM_DISPLAY_DP_AUX_CHARDEV is not set
CONFIG_DRM_DISPLAY_DP_HELPER=y
CONFIG_DRM_DISPLAY_DSC_HELPER=y
CONFIG_DRM_DISPLAY_HDCP_HELPER=y
CONFIG_DRM_DISPLAY_HDMI_HELPER=y
CONFIG_DRM_TTM=y
CONFIG_DRM_BUDDY=y
CONFIG_DRM_TTM_HELPER=y
CONFIG_DRM_GEM_SHMEM_HELPER=y
# CONFIG_DRM_AMDGPU is not set

#
# ARM devices
#
# CONFIG_DRM_KOMEDA is not set
# end of ARM devices

# CONFIG_DRM_AST is not set
CONFIG_DRM_BRIDGE=y
CONFIG_DRM_PANEL_BRIDGE=y
CONFIG_DRM_AUX_BRIDGE=y
CONFIG_DRM_AUX_HPD_BRIDGE=y

#
# Display Interface Bridges
#
# CONFIG_DRM_CHIPONE_ICN6211 is not set
# CONFIG_DRM_CHRONTEL_CH7033 is not set
# CONFIG_DRM_DISPLAY_CONNECTOR is not set
# CONFIG_DRM_I2C_NXP_TDA998X is not set
# CONFIG_DRM_ITE_IT6263 is not set
# CONFIG_DRM_ITE_IT6505 is not set
# CONFIG_DRM_LONTIUM_LT8912B is not set
# CONFIG_DRM_LONTIUM_LT9211 is not set
# CONFIG_DRM_LONTIUM_LT9611 is not set
# CONFIG_DRM_LONTIUM_LT9611UXC is not set
# CONFIG_DRM_LONTIUM_LT8713SX is not set
# CONFIG_DRM_ITE_IT66121 is not set
# CONFIG_DRM_LVDS_CODEC is not set
# CONFIG_DRM_MEGACHIPS_STDPXXXX_GE_B850V3_FW is not set
# CONFIG_DRM_NWL_MIPI_DSI is not set
# CONFIG_DRM_NXP_PTN3460 is not set
# CONFIG_DRM_PARADE_PS8622 is not set
# CONFIG_DRM_PARADE_PS8640 is not set
# CONFIG_DRM_SAMSUNG_DSIM is not set
# CONFIG_DRM_SIL_SII8620 is not set
# CONFIG_DRM_SII902X is not set
# CONFIG_DRM_SII9234 is not set
# CONFIG_DRM_SIMPLE_BRIDGE is not set
# CONFIG_DRM_SOLOMON_SSD2825 is not set
# CONFIG_DRM_THINE_THC63LVD1024 is not set
# CONFIG_DRM_TOSHIBA_TC358762 is not set
# CONFIG_DRM_TOSHIBA_TC358764 is not set
# CONFIG_DRM_TOSHIBA_TC358767 is not set
# CONFIG_DRM_TOSHIBA_TC358768 is not set
# CONFIG_DRM_TOSHIBA_TC358775 is not set
# CONFIG_DRM_TI_DLPC3433 is not set
# CONFIG_DRM_TI_TDP158 is not set
# CONFIG_DRM_TI_TFP410 is not set
# CONFIG_DRM_TI_SN65DSI83 is not set
# CONFIG_DRM_TI_SN65DSI86 is not set
# CONFIG_DRM_TI_TPD12S015 is not set
# CONFIG_DRM_WAVESHARE_BRIDGE is not set
# CONFIG_DRM_ANALOGIX_ANX6345 is not set
# CONFIG_DRM_ANALOGIX_ANX78XX is not set
# CONFIG_DRM_ANALOGIX_ANX7625 is not set
# CONFIG_DRM_I2C_ADV7511 is not set
# CONFIG_DRM_CDNS_DSI is not set
# CONFIG_DRM_CDNS_MHDP8546 is not set
# end of Display Interface Bridges

# CONFIG_DRM_ETNAVIV is not set
# CONFIG_DRM_GMA500 is not set
CONFIG_DRM_GUD=y
# CONFIG_DRM_HISI_HIBMC is not set
CONFIG_DRM_I915=y
CONFIG_DRM_I915_FORCE_PROBE=""
CONFIG_DRM_I915_CAPTURE_ERROR=y
CONFIG_DRM_I915_COMPRESS_ERROR=y
CONFIG_DRM_I915_USERPTR=y
# CONFIG_DRM_I915_GVT_KVMGT is not set
# CONFIG_DRM_I915_DP_TUNNEL is not set

#
# drm/i915 Debugging
#
# CONFIG_DRM_I915_WERROR is not set
# CONFIG_DRM_I915_REPLAY_GPU_HANGS_API is not set
# CONFIG_DRM_I915_DEBUG is not set
# CONFIG_DRM_I915_DEBUG_MMIO is not set
# CONFIG_DRM_I915_SW_FENCE_DEBUG_OBJECTS is not set
# CONFIG_DRM_I915_SW_FENCE_CHECK_DAG is not set
# CONFIG_DRM_I915_DEBUG_GUC is not set
# CONFIG_DRM_I915_SELFTEST is not set
# CONFIG_DRM_I915_LOW_LEVEL_TRACEPOINTS is not set
# CONFIG_DRM_I915_DEBUG_VBLANK_EVADE is not set
# CONFIG_DRM_I915_DEBUG_RUNTIME_PM is not set
# CONFIG_DRM_I915_DEBUG_WAKEREF is not set
# end of drm/i915 Debugging

#
# drm/i915 Profile Guided Optimisation
#
CONFIG_DRM_I915_REQUEST_TIMEOUT=20000
CONFIG_DRM_I915_FENCE_TIMEOUT=10000
CONFIG_DRM_I915_USERFAULT_AUTOSUSPEND=250
CONFIG_DRM_I915_HEARTBEAT_INTERVAL=2500
CONFIG_DRM_I915_PREEMPT_TIMEOUT=640
CONFIG_DRM_I915_PREEMPT_TIMEOUT_COMPUTE=7500
CONFIG_DRM_I915_MAX_REQUEST_BUSYWAIT=8000
CONFIG_DRM_I915_STOP_TIMEOUT=100
CONFIG_DRM_I915_TIMESLICE_DURATION=1
# end of drm/i915 Profile Guided Optimisation

# CONFIG_DRM_LOGICVC is not set
# CONFIG_DRM_MGAG200 is not set
# CONFIG_DRM_NOUVEAU is not set
CONFIG_DRM_PANEL=y

#
# Display Panels
#
# CONFIG_DRM_PANEL_ABT_Y030XX067A is not set
# CONFIG_DRM_PANEL_ARM_VERSATILE is not set
# CONFIG_DRM_PANEL_ASUS_Z00T_TM5P5_NT35596 is not set
# CONFIG_DRM_PANEL_AUO_A030JTN01 is not set
# CONFIG_DRM_PANEL_BOE_BF060Y8M_AJ0 is not set
# CONFIG_DRM_PANEL_BOE_HIMAX8279D is not set
# CONFIG_DRM_PANEL_BOE_TD4320 is not set
# CONFIG_DRM_PANEL_BOE_TH101MB31UIG002_28A is not set
# CONFIG_DRM_PANEL_BOE_TV101WUM_NL6 is not set
# CONFIG_DRM_PANEL_BOE_TV101WUM_LL2 is not set
# CONFIG_DRM_PANEL_CHIPWEALTH_CH13726A is not set
# CONFIG_DRM_PANEL_EBBG_FT8719 is not set
# CONFIG_DRM_PANEL_ELIDA_KD35T133 is not set
# CONFIG_DRM_PANEL_FEIXIN_K101_IM2BA02 is not set
# CONFIG_DRM_PANEL_FEIYANG_FY07024DI26A30D is not set
# CONFIG_DRM_PANEL_FOCALTECH_OTA7290B is not set
# CONFIG_DRM_PANEL_DSI_CM is not set
# CONFIG_DRM_PANEL_LVDS is not set
# CONFIG_DRM_PANEL_HIMAX_HX8279 is not set
# CONFIG_DRM_PANEL_HIMAX_HX83102 is not set
# CONFIG_DRM_PANEL_HIMAX_HX83112A is not set
# CONFIG_DRM_PANEL_HIMAX_HX83112B is not set
# CONFIG_DRM_PANEL_HIMAX_HX83121A is not set
# CONFIG_DRM_PANEL_HIMAX_HX8394 is not set
# CONFIG_DRM_PANEL_HYDIS_HV101HD1 is not set
# CONFIG_DRM_PANEL_ILITEK_IL9322 is not set
# CONFIG_DRM_PANEL_ILITEK_ILI9341 is not set
# CONFIG_DRM_PANEL_ILITEK_ILI9805 is not set
# CONFIG_DRM_PANEL_ILITEK_ILI9806E_DSI is not set
# CONFIG_DRM_PANEL_ILITEK_ILI9806E_SPI is not set
# CONFIG_DRM_PANEL_ILITEK_ILI9881C is not set
# CONFIG_DRM_PANEL_ILITEK_ILI9882T is not set
# CONFIG_DRM_PANEL_INNOLUX_EJ030NA is not set
# CONFIG_DRM_PANEL_INNOLUX_P079ZCA is not set
# CONFIG_DRM_PANEL_JADARD_JD9365DA_H3 is not set
# CONFIG_DRM_PANEL_JDI_LPM102A188A is not set
# CONFIG_DRM_PANEL_JDI_LT070ME05000 is not set
# CONFIG_DRM_PANEL_JDI_R63452 is not set
# CONFIG_DRM_PANEL_KHADAS_TS050 is not set
# CONFIG_DRM_PANEL_KINGDISPLAY_KD097D04 is not set
# CONFIG_DRM_PANEL_LEADTEK_LTK050H3146W is not set
# CONFIG_DRM_PANEL_LEADTEK_LTK500HD1829 is not set
# CONFIG_DRM_PANEL_LINCOLNTECH_LCD197 is not set
# CONFIG_DRM_PANEL_LG_LB035Q02 is not set
# CONFIG_DRM_PANEL_LG_LD070WX3 is not set
# CONFIG_DRM_PANEL_LG_LG4573 is not set
# CONFIG_DRM_PANEL_LG_SW43408 is not set
# CONFIG_DRM_PANEL_LXD_M9189A is not set
# CONFIG_DRM_PANEL_MAGNACHIP_D53E6EA8966 is not set
# CONFIG_DRM_PANEL_MANTIX_MLAF057WE51 is not set
# CONFIG_DRM_PANEL_MOTOROLA_MOT is not set
# CONFIG_DRM_PANEL_NEC_NL8048HL11 is not set
# CONFIG_DRM_PANEL_NEWVISION_NV3051D is not set
# CONFIG_DRM_PANEL_NEWVISION_NV3052C is not set
# CONFIG_DRM_PANEL_NOVATEK_NT35510 is not set
# CONFIG_DRM_PANEL_NOVATEK_NT35532 is not set
# CONFIG_DRM_PANEL_NOVATEK_NT35560 is not set
# CONFIG_DRM_PANEL_NOVATEK_NT35950 is not set
# CONFIG_DRM_PANEL_NOVATEK_NT36523 is not set
# CONFIG_DRM_PANEL_NOVATEK_NT36672A is not set
# CONFIG_DRM_PANEL_NOVATEK_NT36672E is not set
# CONFIG_DRM_PANEL_NOVATEK_NT37700F is not set
# CONFIG_DRM_PANEL_NOVATEK_NT37801 is not set
# CONFIG_DRM_PANEL_NOVATEK_NT39016 is not set
# CONFIG_DRM_PANEL_OLIMEX_LCD_OLINUXINO is not set
# CONFIG_DRM_PANEL_ORISETECH_OTA5601A is not set
# CONFIG_DRM_PANEL_ORISETECH_OTM8009A is not set
# CONFIG_DRM_PANEL_OSD_OSD101T2587_53TS is not set
# CONFIG_DRM_PANEL_PANASONIC_VVX10F034N00 is not set
# CONFIG_DRM_PANEL_RASPBERRYPI_TOUCHSCREEN is not set
# CONFIG_DRM_PANEL_RAYDIUM_RM67191 is not set
# CONFIG_DRM_PANEL_RAYDIUM_RM67200 is not set
# CONFIG_DRM_PANEL_RAYDIUM_RM68200 is not set
# CONFIG_DRM_PANEL_RAYDIUM_RM692E5 is not set
# CONFIG_DRM_PANEL_RAYDIUM_RM69380 is not set
# CONFIG_DRM_PANEL_RENESAS_R61307 is not set
# CONFIG_DRM_PANEL_RENESAS_R69328 is not set
# CONFIG_DRM_PANEL_RONBO_RB070D30 is not set
# CONFIG_DRM_PANEL_SAMSUNG_AMS581VF01 is not set
# CONFIG_DRM_PANEL_SAMSUNG_AMS639RQ08 is not set
# CONFIG_DRM_PANEL_SAMSUNG_S6E88A0_AMS427AP24 is not set
# CONFIG_DRM_PANEL_SAMSUNG_S6E88A0_AMS452EF01 is not set
# CONFIG_DRM_PANEL_SAMSUNG_ATNA33XC20 is not set
# CONFIG_DRM_PANEL_SAMSUNG_DB7430 is not set
# CONFIG_DRM_PANEL_SAMSUNG_LD9040 is not set
# CONFIG_DRM_PANEL_SAMSUNG_LTL106HL02 is not set
# CONFIG_DRM_PANEL_SAMSUNG_S6E3FA7 is not set
# CONFIG_DRM_PANEL_SAMSUNG_S6D16D0 is not set
# CONFIG_DRM_PANEL_SAMSUNG_S6D27A1 is not set
# CONFIG_DRM_PANEL_SAMSUNG_S6D7AA0 is not set
# CONFIG_DRM_PANEL_SAMSUNG_S6E3FC2X01 is not set
# CONFIG_DRM_PANEL_SAMSUNG_S6E3HA2 is not set
# CONFIG_DRM_PANEL_SAMSUNG_S6E3HA8 is not set
# CONFIG_DRM_PANEL_SAMSUNG_S6E63J0X03 is not set
# CONFIG_DRM_PANEL_SAMSUNG_S6E63M0 is not set
# CONFIG_DRM_PANEL_SAMSUNG_S6E8AA0 is not set
# CONFIG_DRM_PANEL_SAMSUNG_S6E8AA5X01_AMS561RA01 is not set
# CONFIG_DRM_PANEL_SAMSUNG_S6E8FC0 is not set
# CONFIG_DRM_PANEL_SAMSUNG_SOFEF00 is not set
# CONFIG_DRM_PANEL_SEIKO_43WVF1G is not set
# CONFIG_DRM_PANEL_SHARP_LQ079L1SX01 is not set
# CONFIG_DRM_PANEL_SHARP_LQ101R1SX01 is not set
# CONFIG_DRM_PANEL_SHARP_LS037V7DW01 is not set
# CONFIG_DRM_PANEL_SHARP_LS043T1LE01 is not set
# CONFIG_DRM_PANEL_SHARP_LS060T1SX01 is not set
# CONFIG_DRM_PANEL_SITRONIX_ST7701 is not set
# CONFIG_DRM_PANEL_SITRONIX_ST7703 is not set
# CONFIG_DRM_PANEL_SITRONIX_ST7789V is not set
# CONFIG_DRM_PANEL_SONY_ACX565AKM is not set
# CONFIG_DRM_PANEL_SONY_TD4353_JDI is not set
# CONFIG_DRM_PANEL_SONY_TULIP_TRULY_NT35521 is not set
# CONFIG_DRM_PANEL_STARTEK_KD070FHFID015 is not set
CONFIG_DRM_PANEL_EDP=y
# CONFIG_DRM_PANEL_SIMPLE is not set
# CONFIG_DRM_PANEL_SUMMIT is not set
# CONFIG_DRM_PANEL_SYNAPTICS_R63353 is not set
# CONFIG_DRM_PANEL_SYNAPTICS_TDDI is not set
# CONFIG_DRM_PANEL_TDO_TL070WSH30 is not set
# CONFIG_DRM_PANEL_TPO_TD028TTEC1 is not set
# CONFIG_DRM_PANEL_TPO_TD043MTEA1 is not set
# CONFIG_DRM_PANEL_TPO_TPG110 is not set
# CONFIG_DRM_PANEL_TRULY_NT35597_WQXGA is not set
# CONFIG_DRM_PANEL_VISIONOX_G2647FB105 is not set
# CONFIG_DRM_PANEL_VISIONOX_R66451 is not set
# CONFIG_DRM_PANEL_VISIONOX_RM69299 is not set
# CONFIG_DRM_PANEL_VISIONOX_RM692E5 is not set
# CONFIG_DRM_PANEL_VISIONOX_VTDR6130 is not set
# CONFIG_DRM_PANEL_WIDECHIPS_WS2401 is not set
# CONFIG_DRM_PANEL_XINPENG_XPP055C272 is not set
# end of Display Panels

# CONFIG_DRM_QXL is not set
# CONFIG_DRM_RADEON is not set
# CONFIG_DRM_ST7571 is not set
# CONFIG_DRM_ST7586 is not set
# CONFIG_DRM_ST7735R is not set
# CONFIG_DRM_ST7920 is not set
# CONFIG_DRM_SSD130X is not set

#
# Drivers for system framebuffers
#
CONFIG_DRM_SYSFB_HELPER=y
CONFIG_DRM_SIMPLEDRM=y
# CONFIG_DRM_VESADRM is not set
# end of Drivers for system framebuffers

# CONFIG_DRM_APPLETBDRM is not set
# CONFIG_DRM_ARCPGU is not set
CONFIG_DRM_BOCHS=y
CONFIG_DRM_CIRRUS_QEMU=y
CONFIG_DRM_GM12U320=y
# CONFIG_DRM_PANEL_MIPI_DBI is not set
# CONFIG_DRM_PIXPAPER is not set
# CONFIG_TINYDRM_HX8357D is not set
# CONFIG_TINYDRM_ILI9163 is not set
# CONFIG_TINYDRM_ILI9225 is not set
# CONFIG_TINYDRM_ILI9341 is not set
# CONFIG_TINYDRM_ILI9486 is not set
# CONFIG_TINYDRM_MI0283QT is not set
# CONFIG_TINYDRM_REPAPER is not set
# CONFIG_TINYDRM_SHARP_MEMORY is not set
CONFIG_DRM_UDL=y
# CONFIG_DRM_VBOXVIDEO is not set
CONFIG_DRM_VGEM=y
CONFIG_DRM_VIRTIO_GPU=y
CONFIG_DRM_VIRTIO_GPU_KMS=y
# CONFIG_DRM_VKMS is not set
CONFIG_DRM_VMWGFX=y
# CONFIG_DRM_VMWGFX_MKSSTATS is not set
# CONFIG_DRM_XE is not set
CONFIG_DRM_PANEL_ORIENTATION_QUIRKS=y

#
# Frame buffer Devices
#
CONFIG_FB=y
# CONFIG_FB_CIRRUS is not set
# CONFIG_FB_PM2 is not set
# CONFIG_FB_CYBER2000 is not set
# CONFIG_FB_ARC is not set
# CONFIG_FB_ASILIANT is not set
# CONFIG_FB_IMSTT is not set
CONFIG_FB_VGA16=y
# CONFIG_FB_UVESA is not set
CONFIG_FB_VESA=y
# CONFIG_FB_N411 is not set
# CONFIG_FB_OPENCORES is not set
# CONFIG_FB_S1D13XXX is not set
# CONFIG_FB_NVIDIA is not set
# CONFIG_FB_RIVA is not set
# CONFIG_FB_I740 is not set
# CONFIG_FB_MATROX is not set
# CONFIG_FB_RADEON is not set
# CONFIG_FB_ATY128 is not set
# CONFIG_FB_ATY is not set
# CONFIG_FB_S3 is not set
# CONFIG_FB_SAVAGE is not set
# CONFIG_FB_SIS is not set
# CONFIG_FB_VIA is not set
# CONFIG_FB_NEOMAGIC is not set
# CONFIG_FB_KYRO is not set
# CONFIG_FB_3DFX is not set
# CONFIG_FB_VOODOO1 is not set
# CONFIG_FB_VT8623 is not set
# CONFIG_FB_TRIDENT is not set
# CONFIG_FB_ARK is not set
# CONFIG_FB_PM3 is not set
# CONFIG_FB_CARMINE is not set
# CONFIG_FB_SMSCUFX is not set
# CONFIG_FB_UDL is not set
# CONFIG_FB_IBM_GXT4500 is not set
CONFIG_FB_VIRTUAL=y
# CONFIG_FB_METRONOME is not set
# CONFIG_FB_MB862XX is not set
# CONFIG_FB_SSD1307 is not set
# CONFIG_FB_SM712 is not set
CONFIG_FB_CORE=y
CONFIG_FB_NOTIFY=y
CONFIG_FB_DEVICE=y
CONFIG_FB_CFB_FILLRECT=y
CONFIG_FB_CFB_COPYAREA=y
CONFIG_FB_CFB_IMAGEBLIT=y
CONFIG_FB_SYS_FILLRECT=y
CONFIG_FB_SYS_COPYAREA=y
CONFIG_FB_SYS_IMAGEBLIT=y
# CONFIG_FB_FOREIGN_ENDIAN is not set
CONFIG_FB_SYSMEM_FOPS=y
CONFIG_FB_DEFERRED_IO=y
CONFIG_FB_IOMEM_FOPS=y
CONFIG_FB_IOMEM_HELPERS=y
CONFIG_FB_SYSMEM_HELPERS=y
CONFIG_FB_SYSMEM_HELPERS_DEFERRED=y
CONFIG_FB_TILEBLITTING=y
# end of Frame buffer Devices

#
# Backlight & LCD device support
#
CONFIG_LCD_CLASS_DEVICE=y
# CONFIG_LCD_L4F00242T03 is not set
# CONFIG_LCD_LMS283GF05 is not set
# CONFIG_LCD_LTV350QV is not set
# CONFIG_LCD_ILI922X is not set
# CONFIG_LCD_ILI9320 is not set
# CONFIG_LCD_TDO24M is not set
# CONFIG_LCD_VGG2432A4 is not set
# CONFIG_LCD_PLATFORM is not set
# CONFIG_LCD_AMS369FG06 is not set
# CONFIG_LCD_LMS501KF03 is not set
# CONFIG_LCD_HX8357 is not set
# CONFIG_LCD_OTM3225A is not set
CONFIG_BACKLIGHT_CLASS_DEVICE=y
# CONFIG_BACKLIGHT_AW99706 is not set
# CONFIG_BACKLIGHT_KTD253 is not set
# CONFIG_BACKLIGHT_KTD2801 is not set
# CONFIG_BACKLIGHT_KTZ8866 is not set
# CONFIG_BACKLIGHT_MAX25014 is not set
# CONFIG_BACKLIGHT_MT6370 is not set
# CONFIG_BACKLIGHT_APPLE is not set
# CONFIG_BACKLIGHT_QCOM_WLED is not set
# CONFIG_BACKLIGHT_SAHARA is not set
# CONFIG_BACKLIGHT_ADP8860 is not set
# CONFIG_BACKLIGHT_ADP8870 is not set
# CONFIG_BACKLIGHT_LM3509 is not set
# CONFIG_BACKLIGHT_LM3639 is not set
# CONFIG_BACKLIGHT_PANDORA is not set
# CONFIG_BACKLIGHT_GPIO is not set
# CONFIG_BACKLIGHT_LV5207LP is not set
# CONFIG_BACKLIGHT_BD6107 is not set
# CONFIG_BACKLIGHT_ARCXCNN is not set
# CONFIG_BACKLIGHT_LED is not set
# end of Backlight & LCD device support

CONFIG_VGASTATE=y
CONFIG_VIDEOMODE_HELPERS=y
CONFIG_HDMI=y
# CONFIG_FIRMWARE_EDID is not set

#
# Console display driver support
#
CONFIG_VGA_CONSOLE=y
CONFIG_DUMMY_CONSOLE=y
CONFIG_DUMMY_CONSOLE_COLUMNS=80
CONFIG_DUMMY_CONSOLE_ROWS=25
CONFIG_FRAMEBUFFER_CONSOLE=y
# CONFIG_FRAMEBUFFER_CONSOLE_LEGACY_ACCELERATION is not set
CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
# CONFIG_FRAMEBUFFER_CONSOLE_DEFERRED_TAKEOVER is not set
# end of Console display driver support

CONFIG_LOGO=y
CONFIG_LOGO_LINUX_MONO=y
CONFIG_LOGO_LINUX_MONO_FILE="drivers/video/logo/logo_linux_mono.pbm"
CONFIG_LOGO_LINUX_VGA16=y
CONFIG_LOGO_LINUX_VGA16_FILE="drivers/video/logo/logo_linux_vga16.ppm"
# CONFIG_LOGO_LINUX_CLUT224 is not set
# CONFIG_TRACE_GPU_MEM is not set
# end of Graphics support

# CONFIG_DRM_ACCEL is not set
CONFIG_SOUND=y
CONFIG_SOUND_OSS_CORE=y
CONFIG_SOUND_OSS_CORE_PRECLAIM=y
CONFIG_SND=y
CONFIG_SND_TIMER=y
CONFIG_SND_PCM=y
CONFIG_SND_HWDEP=y
CONFIG_SND_SEQ_DEVICE=y
CONFIG_SND_RAWMIDI=y
CONFIG_SND_UMP=y
CONFIG_SND_UMP_LEGACY_RAWMIDI=y
CONFIG_SND_JACK=y
CONFIG_SND_JACK_INPUT_DEV=y
CONFIG_SND_OSSEMUL=y
CONFIG_SND_MIXER_OSS=y
CONFIG_SND_PCM_OSS=y
CONFIG_SND_PCM_OSS_PLUGINS=y
CONFIG_SND_PCM_TIMER=y
CONFIG_SND_HRTIMER=y
# CONFIG_SND_DYNAMIC_MINORS is not set
# CONFIG_SND_SUPPORT_OLD_API is not set
CONFIG_SND_PROC_FS=y
CONFIG_SND_VERBOSE_PROCFS=y
CONFIG_SND_CTL_FAST_LOOKUP=y
CONFIG_SND_DEBUG=y
# CONFIG_SND_DEBUG_VERBOSE is not set
CONFIG_SND_PCM_XRUN_DEBUG=y
# CONFIG_SND_CTL_INPUT_VALIDATION is not set
# CONFIG_SND_CTL_DEBUG is not set
# CONFIG_SND_JACK_INJECTION_DEBUG is not set
# CONFIG_SND_UTIMER is not set
CONFIG_SND_VMASTER=y
CONFIG_SND_DMA_SGBUF=y
CONFIG_SND_CTL_LED=y
CONFIG_SND_SEQUENCER=y
CONFIG_SND_SEQ_DUMMY=y
CONFIG_SND_SEQUENCER_OSS=y
CONFIG_SND_SEQ_HRTIMER_DEFAULT=y
CONFIG_SND_SEQ_MIDI_EVENT=y
CONFIG_SND_SEQ_MIDI=y
CONFIG_SND_SEQ_VIRMIDI=y
# CONFIG_SND_SEQ_UMP is not set
CONFIG_SND_DRIVERS=y
# CONFIG_SND_PCSP is not set
CONFIG_SND_DUMMY=y
CONFIG_SND_ALOOP=y
# CONFIG_SND_PCMTEST is not set
CONFIG_SND_VIRMIDI=y
# CONFIG_SND_MTPAV is not set
# CONFIG_SND_MTS64 is not set
# CONFIG_SND_SERIAL_U16550 is not set
# CONFIG_SND_SERIAL_GENERIC is not set
# CONFIG_SND_MPU401 is not set
# CONFIG_SND_PORTMAN2X4 is not set
CONFIG_SND_PCI=y
# CONFIG_SND_AD1889 is not set
# CONFIG_SND_ALS300 is not set
# CONFIG_SND_ALS4000 is not set
# CONFIG_SND_ALI5451 is not set
# CONFIG_SND_ASIHPI is not set
# CONFIG_SND_ATIIXP is not set
# CONFIG_SND_ATIIXP_MODEM is not set
# CONFIG_SND_AU8810 is not set
# CONFIG_SND_AU8820 is not set
# CONFIG_SND_AU8830 is not set
# CONFIG_SND_AW2 is not set
# CONFIG_SND_AZT3328 is not set
# CONFIG_SND_BT87X is not set
# CONFIG_SND_CA0106 is not set
# CONFIG_SND_CMIPCI is not set
# CONFIG_SND_OXYGEN is not set
# CONFIG_SND_CS4281 is not set
# CONFIG_SND_CS46XX is not set
# CONFIG_SND_CTXFI is not set
# CONFIG_SND_DARLA20 is not set
# CONFIG_SND_GINA20 is not set
# CONFIG_SND_LAYLA20 is not set
# CONFIG_SND_DARLA24 is not set
# CONFIG_SND_GINA24 is not set
# CONFIG_SND_LAYLA24 is not set
# CONFIG_SND_MONA is not set
# CONFIG_SND_MIA is not set
# CONFIG_SND_ECHO3G is not set
# CONFIG_SND_INDIGO is not set
# CONFIG_SND_INDIGOIO is not set
# CONFIG_SND_INDIGODJ is not set
# CONFIG_SND_INDIGOIOX is not set
# CONFIG_SND_INDIGODJX is not set
# CONFIG_SND_EMU10K1 is not set
# CONFIG_SND_EMU10K1X is not set
# CONFIG_SND_ENS1370 is not set
# CONFIG_SND_ENS1371 is not set
# CONFIG_SND_ES1938 is not set
# CONFIG_SND_ES1968 is not set
# CONFIG_SND_FM801 is not set
# CONFIG_SND_HDSP is not set
# CONFIG_SND_HDSPM is not set
# CONFIG_SND_ICE1712 is not set
# CONFIG_SND_ICE1724 is not set
# CONFIG_SND_INTEL8X0 is not set
# CONFIG_SND_INTEL8X0M is not set
# CONFIG_SND_KORG1212 is not set
# CONFIG_SND_LOLA is not set
# CONFIG_SND_LX6464ES is not set
# CONFIG_SND_MAESTRO3 is not set
# CONFIG_SND_MIXART is not set
# CONFIG_SND_NM256 is not set
# CONFIG_SND_PCXHR is not set
# CONFIG_SND_RIPTIDE is not set
# CONFIG_SND_RME32 is not set
# CONFIG_SND_RME96 is not set
# CONFIG_SND_RME9652 is not set
# CONFIG_SND_SE6X is not set
# CONFIG_SND_SONICVIBES is not set
# CONFIG_SND_TRIDENT is not set
# CONFIG_SND_VIA82XX is not set
# CONFIG_SND_VIA82XX_MODEM is not set
# CONFIG_SND_VIRTUOSO is not set
# CONFIG_SND_VX222 is not set
# CONFIG_SND_YMFPCI is not set

#
# HD-Audio
#
CONFIG_SND_HDA=y
CONFIG_SND_HDA_HWDEP=y
CONFIG_SND_HDA_RECONFIG=y
CONFIG_SND_HDA_INPUT_BEEP=y
CONFIG_SND_HDA_INPUT_BEEP_MODE=1
CONFIG_SND_HDA_PATCH_LOADER=y
CONFIG_SND_HDA_POWER_SAVE_DEFAULT=0
# CONFIG_SND_HDA_CTL_DEV_ID is not set
CONFIG_SND_HDA_PREALLOC_SIZE=0
CONFIG_SND_HDA_INTEL=y
# CONFIG_SND_HDA_ACPI is not set
CONFIG_SND_HDA_GENERIC_LEDS=y
CONFIG_SND_HDA_CODEC_ANALOG=y
CONFIG_SND_HDA_CODEC_SIGMATEL=y
CONFIG_SND_HDA_CODEC_VIA=y
CONFIG_SND_HDA_CODEC_CONEXANT=y
# CONFIG_SND_HDA_CODEC_SENARYTECH is not set
CONFIG_SND_HDA_CODEC_CA0110=y
CONFIG_SND_HDA_CODEC_CA0132=y
# CONFIG_SND_HDA_CODEC_CA0132_DSP is not set
CONFIG_SND_HDA_CODEC_CMEDIA=y
# CONFIG_SND_HDA_CODEC_CM9825 is not set
CONFIG_SND_HDA_CODEC_SI3054=y
CONFIG_SND_HDA_GENERIC=y
CONFIG_SND_HDA_CODEC_REALTEK=y
# CONFIG_SND_HDA_CODEC_ALC260 is not set
# CONFIG_SND_HDA_CODEC_ALC262 is not set
# CONFIG_SND_HDA_CODEC_ALC268 is not set
# CONFIG_SND_HDA_CODEC_ALC269 is not set
# CONFIG_SND_HDA_CODEC_ALC662 is not set
# CONFIG_SND_HDA_CODEC_ALC680 is not set
# CONFIG_SND_HDA_CODEC_ALC861 is not set
# CONFIG_SND_HDA_CODEC_ALC861VD is not set
# CONFIG_SND_HDA_CODEC_ALC880 is not set
# CONFIG_SND_HDA_CODEC_ALC882 is not set
CONFIG_SND_HDA_CODEC_CIRRUS=y
# CONFIG_SND_HDA_CODEC_CS420X is not set
# CONFIG_SND_HDA_CODEC_CS421X is not set
# CONFIG_SND_HDA_CODEC_CS8409 is not set
CONFIG_SND_HDA_CODEC_HDMI=y
# CONFIG_SND_HDA_CODEC_HDMI_GENERIC is not set
# CONFIG_SND_HDA_CODEC_HDMI_SIMPLE is not set
# CONFIG_SND_HDA_CODEC_HDMI_INTEL is not set
# CONFIG_SND_HDA_CODEC_HDMI_ATI is not set
# CONFIG_SND_HDA_CODEC_HDMI_NVIDIA is not set
# CONFIG_SND_HDA_CODEC_HDMI_NVIDIA_MCP is not set
# CONFIG_SND_HDA_CODEC_HDMI_TEGRA is not set
# CONFIG_SND_HDA_SCODEC_CS35L56_I2C is not set
# CONFIG_SND_HDA_SCODEC_CS35L56_SPI is not set
CONFIG_SND_HDA_CORE=y
CONFIG_SND_HDA_COMPONENT=y
CONFIG_SND_HDA_I915=y
CONFIG_SND_INTEL_NHLT=y
CONFIG_SND_INTEL_DSP_CONFIG=y
CONFIG_SND_INTEL_SOUNDWIRE_ACPI=y
# end of HD-Audio

# CONFIG_SND_SPI is not set
CONFIG_SND_USB=y
CONFIG_SND_USB_AUDIO=y
CONFIG_SND_USB_AUDIO_MIDI_V2=y
CONFIG_SND_USB_AUDIO_USE_MEDIA_CONTROLLER=y
CONFIG_SND_USB_UA101=y
CONFIG_SND_USB_USX2Y=y
CONFIG_SND_USB_CAIAQ=y
CONFIG_SND_USB_CAIAQ_INPUT=y
CONFIG_SND_USB_US122L=y
# CONFIG_SND_USB_US144MKII is not set
CONFIG_SND_USB_6FIRE=y
CONFIG_SND_USB_HIFACE=y
CONFIG_SND_BCD2000=y
CONFIG_SND_USB_LINE6=y
CONFIG_SND_USB_POD=y
CONFIG_SND_USB_PODHD=y
CONFIG_SND_USB_TONEPORT=y
CONFIG_SND_USB_VARIAX=y
# CONFIG_SND_FIREWIRE is not set
CONFIG_SND_PCMCIA=y
# CONFIG_SND_VXPOCKET is not set
# CONFIG_SND_PDAUDIOCF is not set
CONFIG_SND_SOC=y
# CONFIG_SND_SOC_USB is not set

#
# Analog Devices
#
# CONFIG_SND_SOC_ADI_AXI_I2S is not set
# CONFIG_SND_SOC_ADI_AXI_SPDIF is not set
# end of Analog Devices

#
# AMD
#
# CONFIG_SND_SOC_AMD_ACP is not set
# CONFIG_SND_SOC_AMD_ACP3x is not set
# CONFIG_SND_SOC_AMD_RENOIR is not set
# CONFIG_SND_SOC_AMD_ACP5x is not set
# CONFIG_SND_SOC_AMD_ACP6x is not set
# CONFIG_SND_AMD_ACP_CONFIG is not set
# CONFIG_SND_SOC_AMD_ACP_COMMON is not set
# end of AMD

#
# Apple
#
# end of Apple

#
# Atmel
#
# CONFIG_SND_SOC_MIKROE_PROTO is not set
# end of Atmel

#
# Au1x
#
# end of Au1x

#
# Broadcom
#
# CONFIG_SND_BCM63XX_I2S_WHISTLER is not set
# end of Broadcom

#
# Cirrus Logic
#
# end of Cirrus Logic

#
# DesignWare
#
# CONFIG_SND_DESIGNWARE_I2S is not set
# end of DesignWare

#
# Freescale
#

#
# Common SoC Audio options for Freescale CPUs:
#
# CONFIG_SND_SOC_FSL_ASRC is not set
# CONFIG_SND_SOC_FSL_SAI is not set
# CONFIG_SND_SOC_FSL_AUDMIX is not set
# CONFIG_SND_SOC_FSL_SSI is not set
# CONFIG_SND_SOC_FSL_SPDIF is not set
# CONFIG_SND_SOC_FSL_ESAI is not set
# CONFIG_SND_SOC_FSL_MICFIL is not set
# CONFIG_SND_SOC_FSL_XCVR is not set
# CONFIG_SND_SOC_IMX_AUDMUX is not set
# end of Freescale

#
# Google
#
# CONFIG_SND_SOC_CHV3_I2S is not set
# end of Google

#
# Hisilicon
#
# CONFIG_SND_I2S_HI6210_I2S is not set
# end of Hisilicon

#
# JZ4740
#
# end of JZ4740

#
# Kirkwood
#
# end of Kirkwood

#
# Loongson
#
# end of Loongson

#
# Intel
#
# CONFIG_SND_SOC_INTEL_SST_TOPLEVEL is not set
# CONFIG_SND_SOC_INTEL_AVS is not set
# end of Intel

#
# Mediatek
#
# CONFIG_SND_SOC_MTK_BTCVSD is not set
# end of Mediatek

#
# PXA
#
# end of PXA

#
# SoundWire (SDCA)
#
# CONFIG_SND_SOC_SDCA is not set
CONFIG_SND_SOC_SDCA_OPTIONAL=y
# end of SoundWire (SDCA)

#
# ST SPEAr
#
# end of ST SPEAr

#
# Spreadtrum
#
# end of Spreadtrum

#
# STMicroelectronics STM32
#
# end of STMicroelectronics STM32

#
# Tegra
#
# end of Tegra

#
# Xilinx
#
# CONFIG_SND_SOC_XILINX_I2S is not set
# CONFIG_SND_SOC_XILINX_AUDIO_FORMATTER is not set
# CONFIG_SND_SOC_XILINX_SPDIF is not set
# end of Xilinx

#
# Xtensa
#
# CONFIG_SND_SOC_XTFPGA_I2S is not set
# end of Xtensa

# CONFIG_SND_SOC_SOF_TOPLEVEL is not set
CONFIG_SND_SOC_I2C_AND_SPI=y

#
# CODEC drivers
#
# CONFIG_SND_SOC_AC97_CODEC is not set
# CONFIG_SND_SOC_ADAU1372_I2C is not set
# CONFIG_SND_SOC_ADAU1372_SPI is not set
# CONFIG_SND_SOC_ADAU1373 is not set
# CONFIG_SND_SOC_ADAU1701 is not set
# CONFIG_SND_SOC_ADAU1761_I2C is not set
# CONFIG_SND_SOC_ADAU1761_SPI is not set
# CONFIG_SND_SOC_ADAU7002 is not set
# CONFIG_SND_SOC_ADAU7118_HW is not set
# CONFIG_SND_SOC_ADAU7118_I2C is not set
# CONFIG_SND_SOC_AK4104 is not set
# CONFIG_SND_SOC_AK4118 is not set
# CONFIG_SND_SOC_AK4375 is not set
# CONFIG_SND_SOC_AK4458 is not set
# CONFIG_SND_SOC_AK4554 is not set
# CONFIG_SND_SOC_AK4613 is not set
# CONFIG_SND_SOC_AK4619 is not set
# CONFIG_SND_SOC_AK4642 is not set
# CONFIG_SND_SOC_AK5386 is not set
# CONFIG_SND_SOC_AK5558 is not set
# CONFIG_SND_SOC_ALC5623 is not set
# CONFIG_SND_SOC_AUDIO_IIO_AUX is not set
# CONFIG_SND_SOC_AW8738 is not set
# CONFIG_SND_SOC_AW88395 is not set
# CONFIG_SND_SOC_AW88166 is not set
# CONFIG_SND_SOC_AW88261 is not set
# CONFIG_SND_SOC_AW88081 is not set
# CONFIG_SND_SOC_AW87390 is not set
# CONFIG_SND_SOC_AW88399 is not set
# CONFIG_SND_SOC_BD28623 is not set
# CONFIG_SND_SOC_BT_SCO is not set
# CONFIG_SND_SOC_CHV3_CODEC is not set
# CONFIG_SND_SOC_CS35L32 is not set
# CONFIG_SND_SOC_CS35L33 is not set
# CONFIG_SND_SOC_CS35L34 is not set
# CONFIG_SND_SOC_CS35L35 is not set
# CONFIG_SND_SOC_CS35L36 is not set
# CONFIG_SND_SOC_CS35L41_SPI is not set
# CONFIG_SND_SOC_CS35L41_I2C is not set
# CONFIG_SND_SOC_CS35L45_SPI is not set
# CONFIG_SND_SOC_CS35L45_I2C is not set
# CONFIG_SND_SOC_CS35L56_I2C is not set
# CONFIG_SND_SOC_CS35L56_SPI is not set
# CONFIG_SND_SOC_CS35L56_SDW is not set
# CONFIG_SND_SOC_CS42L42 is not set
# CONFIG_SND_SOC_CS42L42_SDW is not set
# CONFIG_SND_SOC_CS42L51_I2C is not set
# CONFIG_SND_SOC_CS42L52 is not set
# CONFIG_SND_SOC_CS42L56 is not set
# CONFIG_SND_SOC_CS42L73 is not set
# CONFIG_SND_SOC_CS42L83 is not set
# CONFIG_SND_SOC_CS42L84 is not set
# CONFIG_SND_SOC_CS4234 is not set
# CONFIG_SND_SOC_CS4265 is not set
# CONFIG_SND_SOC_CS4270 is not set
# CONFIG_SND_SOC_CS4271_I2C is not set
# CONFIG_SND_SOC_CS4271_SPI is not set
# CONFIG_SND_SOC_CS42XX8_SPI is not set
# CONFIG_SND_SOC_CS42XX8_I2C is not set
# CONFIG_SND_SOC_CS43130 is not set
# CONFIG_SND_SOC_CS4341 is not set
# CONFIG_SND_SOC_CS4349 is not set
# CONFIG_SND_SOC_CS48L32 is not set
# CONFIG_SND_SOC_CS53L30 is not set
# CONFIG_SND_SOC_CS530X_I2C is not set
# CONFIG_SND_SOC_CS530X_SPI is not set
# CONFIG_SND_SOC_CX2072X is not set
# CONFIG_SND_SOC_DA7213 is not set
# CONFIG_SND_SOC_DMIC is not set
# CONFIG_SND_SOC_ES7134 is not set
# CONFIG_SND_SOC_ES7241 is not set
# CONFIG_SND_SOC_ES8311 is not set
# CONFIG_SND_SOC_ES8316 is not set
# CONFIG_SND_SOC_ES8323 is not set
# CONFIG_SND_SOC_ES8326 is not set
# CONFIG_SND_SOC_ES8328_I2C is not set
# CONFIG_SND_SOC_ES8328_SPI is not set
# CONFIG_SND_SOC_ES8375 is not set
# CONFIG_SND_SOC_ES8389 is not set
# CONFIG_SND_SOC_FS210X is not set
# CONFIG_SND_SOC_GTM601 is not set
# CONFIG_SND_SOC_HDA is not set
# CONFIG_SND_SOC_ICS43432 is not set
# CONFIG_SND_SOC_IDT821034 is not set
# CONFIG_SND_SOC_MAX98088 is not set
# CONFIG_SND_SOC_MAX98090 is not set
# CONFIG_SND_SOC_MAX98357A is not set
# CONFIG_SND_SOC_MAX98504 is not set
# CONFIG_SND_SOC_MAX9867 is not set
# CONFIG_SND_SOC_MAX98927 is not set
# CONFIG_SND_SOC_MAX98520 is not set
# CONFIG_SND_SOC_MAX98363 is not set
# CONFIG_SND_SOC_MAX98373_I2C is not set
# CONFIG_SND_SOC_MAX98373_SDW is not set
# CONFIG_SND_SOC_MAX98388 is not set
# CONFIG_SND_SOC_MAX98390 is not set
# CONFIG_SND_SOC_MAX98396 is not set
# CONFIG_SND_SOC_MAX9860 is not set
# CONFIG_SND_SOC_MSM8916_WCD_DIGITAL is not set
# CONFIG_SND_SOC_PCM1681 is not set
# CONFIG_SND_SOC_PCM1754 is not set
# CONFIG_SND_SOC_PCM1789_I2C is not set
# CONFIG_SND_SOC_PCM179X_I2C is not set
# CONFIG_SND_SOC_PCM179X_SPI is not set
# CONFIG_SND_SOC_PCM186X_I2C is not set
# CONFIG_SND_SOC_PCM186X_SPI is not set
# CONFIG_SND_SOC_PCM3060_I2C is not set
# CONFIG_SND_SOC_PCM3060_SPI is not set
# CONFIG_SND_SOC_PCM3168A_I2C is not set
# CONFIG_SND_SOC_PCM3168A_SPI is not set
# CONFIG_SND_SOC_PCM5102A is not set
# CONFIG_SND_SOC_PCM512x_I2C is not set
# CONFIG_SND_SOC_PCM512x_SPI is not set
# CONFIG_SND_SOC_PCM6240 is not set
# CONFIG_SND_SOC_PEB2466 is not set
# CONFIG_SND_SOC_PM4125_SDW is not set
# CONFIG_SND_SOC_RT1017_SDCA_SDW is not set
# CONFIG_SND_SOC_RT1308_SDW is not set
# CONFIG_SND_SOC_RT1316_SDW is not set
# CONFIG_SND_SOC_RT1318_SDW is not set
# CONFIG_SND_SOC_RT1320_SDW is not set
# CONFIG_SND_SOC_RT5575 is not set
# CONFIG_SND_SOC_RT5616 is not set
# CONFIG_SND_SOC_RT5631 is not set
# CONFIG_SND_SOC_RT5640 is not set
# CONFIG_SND_SOC_RT5659 is not set
# CONFIG_SND_SOC_RT5682_SDW is not set
# CONFIG_SND_SOC_RT700_SDW is not set
# CONFIG_SND_SOC_RT711_SDW is not set
# CONFIG_SND_SOC_RT711_SDCA_SDW is not set
# CONFIG_SND_SOC_RT712_SDCA_SDW is not set
# CONFIG_SND_SOC_RT712_SDCA_DMIC_SDW is not set
# CONFIG_SND_SOC_RT721_SDCA_SDW is not set
# CONFIG_SND_SOC_RT722_SDCA_SDW is not set
# CONFIG_SND_SOC_RT715_SDW is not set
# CONFIG_SND_SOC_RT715_SDCA_SDW is not set
# CONFIG_SND_SOC_RT9120 is not set
# CONFIG_SND_SOC_RT9123 is not set
# CONFIG_SND_SOC_RT9123P is not set
# CONFIG_SND_SOC_RTQ9124 is not set
# CONFIG_SND_SOC_RTQ9128 is not set
# CONFIG_SND_SOC_SDW_MOCKUP is not set
# CONFIG_SND_SOC_SGTL5000 is not set
# CONFIG_SND_SOC_SIMPLE_AMPLIFIER is not set
# CONFIG_SND_SOC_SIMPLE_MUX is not set
# CONFIG_SND_SOC_SMA1303 is not set
# CONFIG_SND_SOC_SMA1307 is not set
# CONFIG_SND_SOC_SPDIF is not set
# CONFIG_SND_SOC_SRC4XXX_I2C is not set
# CONFIG_SND_SOC_SSM2305 is not set
# CONFIG_SND_SOC_SSM2518 is not set
# CONFIG_SND_SOC_SSM2602_SPI is not set
# CONFIG_SND_SOC_SSM2602_I2C is not set
# CONFIG_SND_SOC_SSM3515 is not set
# CONFIG_SND_SOC_SSM4567 is not set
# CONFIG_SND_SOC_STA32X is not set
# CONFIG_SND_SOC_STA350 is not set
# CONFIG_SND_SOC_STI_SAS is not set
# CONFIG_SND_SOC_TAS2552 is not set
# CONFIG_SND_SOC_TAS2562 is not set
# CONFIG_SND_SOC_TAS2764 is not set
# CONFIG_SND_SOC_TAS2770 is not set
# CONFIG_SND_SOC_TAS2780 is not set
# CONFIG_SND_SOC_TAS2781_I2C is not set
# CONFIG_SND_SOC_TAS5086 is not set
# CONFIG_SND_SOC_TAS571X is not set
# CONFIG_SND_SOC_TAS5720 is not set
# CONFIG_SND_SOC_TAS5805M is not set
# CONFIG_SND_SOC_TAS6424 is not set
# CONFIG_SND_SOC_TAS675X is not set
# CONFIG_SND_SOC_TDA7419 is not set
# CONFIG_SND_SOC_TFA9879 is not set
# CONFIG_SND_SOC_TFA989X is not set
# CONFIG_SND_SOC_TLV320ADC3XXX is not set
# CONFIG_SND_SOC_TLV320AIC23_I2C is not set
# CONFIG_SND_SOC_TLV320AIC23_SPI is not set
# CONFIG_SND_SOC_TLV320AIC31XX is not set
# CONFIG_SND_SOC_TLV320AIC32X4_I2C is not set
# CONFIG_SND_SOC_TLV320AIC32X4_SPI is not set
# CONFIG_SND_SOC_TLV320AIC3X_I2C is not set
# CONFIG_SND_SOC_TLV320AIC3X_SPI is not set
# CONFIG_SND_SOC_TLV320ADCX140 is not set
# CONFIG_SND_SOC_TS3A227E is not set
# CONFIG_SND_SOC_TSCS42XX is not set
# CONFIG_SND_SOC_TSCS454 is not set
# CONFIG_SND_SOC_UDA1334 is not set
# CONFIG_SND_SOC_UDA1342 is not set
# CONFIG_SND_SOC_UDA1380 is not set
# CONFIG_SND_SOC_WCD937X_SDW is not set
# CONFIG_SND_SOC_WCD938X_SDW is not set
# CONFIG_SND_SOC_WCD939X_SDW is not set
# CONFIG_SND_SOC_WM8510 is not set
# CONFIG_SND_SOC_WM8523 is not set
# CONFIG_SND_SOC_WM8524 is not set
# CONFIG_SND_SOC_WM8580 is not set
# CONFIG_SND_SOC_WM8711 is not set
# CONFIG_SND_SOC_WM8728 is not set
# CONFIG_SND_SOC_WM8731_I2C is not set
# CONFIG_SND_SOC_WM8731_SPI is not set
# CONFIG_SND_SOC_WM8737 is not set
# CONFIG_SND_SOC_WM8741 is not set
# CONFIG_SND_SOC_WM8750 is not set
# CONFIG_SND_SOC_WM8753 is not set
# CONFIG_SND_SOC_WM8770 is not set
# CONFIG_SND_SOC_WM8776 is not set
# CONFIG_SND_SOC_WM8782 is not set
# CONFIG_SND_SOC_WM8804_I2C is not set
# CONFIG_SND_SOC_WM8804_SPI is not set
# CONFIG_SND_SOC_WM8903 is not set
# CONFIG_SND_SOC_WM8904 is not set
# CONFIG_SND_SOC_WM8940 is not set
# CONFIG_SND_SOC_WM8960 is not set
# CONFIG_SND_SOC_WM8961 is not set
# CONFIG_SND_SOC_WM8962 is not set
# CONFIG_SND_SOC_WM8974 is not set
# CONFIG_SND_SOC_WM8978 is not set
# CONFIG_SND_SOC_WM8985 is not set
# CONFIG_SND_SOC_WSA881X is not set
# CONFIG_SND_SOC_WSA883X is not set
# CONFIG_SND_SOC_WSA884X is not set
# CONFIG_SND_SOC_ZL38060 is not set
# CONFIG_SND_SOC_MAX9759 is not set
# CONFIG_SND_SOC_MT6351 is not set
# CONFIG_SND_SOC_MT6357 is not set
# CONFIG_SND_SOC_MT6358 is not set
# CONFIG_SND_SOC_MT6660 is not set
# CONFIG_SND_SOC_NAU8315 is not set
# CONFIG_SND_SOC_NAU8325 is not set
# CONFIG_SND_SOC_NAU8540 is not set
# CONFIG_SND_SOC_NAU8810 is not set
# CONFIG_SND_SOC_NAU8821 is not set
# CONFIG_SND_SOC_NAU8822 is not set
# CONFIG_SND_SOC_NAU8824 is not set
# CONFIG_SND_SOC_NTP8918 is not set
# CONFIG_SND_SOC_NTP8835 is not set
# CONFIG_SND_SOC_TPA6130A2 is not set
# CONFIG_SND_SOC_LPASS_WSA_MACRO is not set
# CONFIG_SND_SOC_LPASS_VA_MACRO is not set
# CONFIG_SND_SOC_LPASS_RX_MACRO is not set
# CONFIG_SND_SOC_LPASS_TX_MACRO is not set
# end of CODEC drivers

#
# Generic drivers
#
# CONFIG_SND_SIMPLE_CARD is not set
# CONFIG_SND_AUDIO_GRAPH_CARD is not set
# CONFIG_SND_AUDIO_GRAPH_CARD2 is not set
# CONFIG_SND_TEST_COMPONENT is not set
# end of Generic drivers

CONFIG_SND_X86=y
# CONFIG_HDMI_LPE_AUDIO is not set
CONFIG_SND_VIRTIO=y
CONFIG_HID_SUPPORT=y
CONFIG_HID=y
CONFIG_HID_BATTERY_STRENGTH=y
CONFIG_HIDRAW=y
CONFIG_UHID=y
CONFIG_HID_GENERIC=y
CONFIG_HID_HAPTIC=y

#
# Special HID drivers
#
CONFIG_HID_A4TECH=y
CONFIG_HID_ACCUTOUCH=y
CONFIG_HID_ACRUX=y
CONFIG_HID_ACRUX_FF=y
CONFIG_HID_APPLE=y
CONFIG_HID_APPLEIR=y
# CONFIG_HID_APPLETB_BL is not set
# CONFIG_HID_APPLETB_KBD is not set
CONFIG_HID_ASUS=y
CONFIG_HID_AUREAL=y
CONFIG_HID_BELKIN=y
CONFIG_HID_BETOP_FF=y
CONFIG_HID_BIGBEN_FF=y
CONFIG_HID_CHERRY=y
CONFIG_HID_CHICONY=y
CONFIG_HID_CORSAIR=y
CONFIG_HID_COUGAR=y
CONFIG_HID_MACALLY=y
CONFIG_HID_PRODIKEYS=y
CONFIG_HID_CMEDIA=y
CONFIG_HID_CP2112=y
CONFIG_HID_CREATIVE_SB0540=y
CONFIG_HID_CYPRESS=y
CONFIG_HID_DRAGONRISE=y
CONFIG_DRAGONRISE_FF=y
CONFIG_HID_EMS_FF=y
CONFIG_HID_ELAN=y
CONFIG_HID_ELECOM=y
CONFIG_HID_ELO=y
CONFIG_HID_EVISION=y
CONFIG_HID_EZKEY=y
CONFIG_HID_FT260=y
CONFIG_HID_GEMBIRD=y
CONFIG_HID_GFRM=y
CONFIG_HID_GLORIOUS=y
CONFIG_HID_HOLTEK=y
CONFIG_HOLTEK_FF=y
CONFIG_HID_VIVALDI_COMMON=y
# CONFIG_HID_GOODIX_SPI is not set
CONFIG_HID_GOOGLE_STADIA_FF=y
CONFIG_HID_VIVALDI=y
CONFIG_HID_GT683R=y
CONFIG_HID_KEYTOUCH=y
CONFIG_HID_KYE=y
# CONFIG_HID_KYSONA is not set
CONFIG_HID_UCLOGIC=y
CONFIG_HID_WALTOP=y
CONFIG_HID_VIEWSONIC=y
CONFIG_HID_VRC2=y
CONFIG_HID_XIAOMI=y
CONFIG_HID_GYRATION=y
CONFIG_HID_ICADE=y
CONFIG_HID_ITE=y
CONFIG_HID_JABRA=y
CONFIG_HID_TWINHAN=y
CONFIG_HID_KENSINGTON=y
CONFIG_HID_LCPOWER=y
CONFIG_HID_LED=y
CONFIG_HID_LENOVO=y
# CONFIG_HID_LENOVO_GO is not set
# CONFIG_HID_LENOVO_GO_S is not set
CONFIG_HID_LETSKETCH=y
CONFIG_HID_LOGITECH=y
CONFIG_HID_LOGITECH_DJ=y
CONFIG_HID_LOGITECH_HIDPP=y
CONFIG_LOGITECH_FF=y
CONFIG_LOGIRUMBLEPAD2_FF=y
CONFIG_LOGIG940_FF=y
CONFIG_LOGIWHEELS_FF=y
CONFIG_HID_MAGICMOUSE=y
CONFIG_HID_MALTRON=y
CONFIG_HID_MAYFLASH=y
CONFIG_HID_MEGAWORLD_FF=y
# CONFIG_HID_RAKK is not set
CONFIG_HID_REDRAGON=y
CONFIG_HID_MICROSOFT=y
CONFIG_HID_MONTEREY=y
CONFIG_HID_MULTITOUCH=y
CONFIG_HID_NINTENDO=y
CONFIG_NINTENDO_FF=y
CONFIG_HID_NTI=y
CONFIG_HID_NTRIG=y
CONFIG_HID_NVIDIA_SHIELD=y
CONFIG_NVIDIA_SHIELD_FF=y
CONFIG_HID_ORTEK=y
# CONFIG_HID_OXP is not set
CONFIG_HID_PANTHERLORD=y
CONFIG_PANTHERLORD_FF=y
CONFIG_HID_PENMOUNT=y
CONFIG_HID_PETALYNX=y
CONFIG_HID_PICOLCD=y
CONFIG_HID_PICOLCD_FB=y
CONFIG_HID_PICOLCD_BACKLIGHT=y
CONFIG_HID_PICOLCD_LCD=y
CONFIG_HID_PICOLCD_LEDS=y
CONFIG_HID_PICOLCD_CIR=y
CONFIG_HID_PLANTRONICS=y
CONFIG_HID_PLAYSTATION=y
CONFIG_PLAYSTATION_FF=y
CONFIG_HID_PXRC=y
# CONFIG_HID_RAPOO is not set
CONFIG_HID_RAZER=y
CONFIG_HID_PRIMAX=y
CONFIG_HID_RETRODE=y
CONFIG_HID_ROCCAT=y
CONFIG_HID_SAITEK=y
CONFIG_HID_SAMSUNG=y
CONFIG_HID_SEMITEK=y
CONFIG_HID_SIGMAMICRO=y
CONFIG_HID_SONY=y
CONFIG_SONY_FF=y
CONFIG_HID_SPEEDLINK=y
CONFIG_HID_STEAM=y
CONFIG_STEAM_FF=y
CONFIG_HID_STEELSERIES=y
CONFIG_HID_SUNPLUS=y
CONFIG_HID_RMI=y
CONFIG_HID_GREENASIA=y
CONFIG_GREENASIA_FF=y
CONFIG_HID_SMARTJOYPLUS=y
CONFIG_SMARTJOYPLUS_FF=y
CONFIG_HID_TIVO=y
CONFIG_HID_TOPSEED=y
CONFIG_HID_TOPRE=y
CONFIG_HID_THINGM=y
CONFIG_HID_THRUSTMASTER=y
CONFIG_THRUSTMASTER_FF=y
CONFIG_HID_UDRAW_PS3=y
CONFIG_HID_U2FZERO=y
# CONFIG_HID_UNIVERSAL_PIDFF is not set
CONFIG_HID_WACOM=y
CONFIG_HID_WIIMOTE=y
# CONFIG_HID_WINWING is not set
CONFIG_HID_XINMO=y
CONFIG_HID_ZEROPLUS=y
CONFIG_ZEROPLUS_FF=y
CONFIG_HID_ZYDACRON=y
CONFIG_HID_SENSOR_HUB=y
CONFIG_HID_SENSOR_CUSTOM_SENSOR=y
CONFIG_HID_ALPS=y
CONFIG_HID_MCP2200=y
CONFIG_HID_MCP2221=y
CONFIG_HID_HUAWEI=y
# end of Special HID drivers

#
# HID-BPF support
#
# end of HID-BPF support

CONFIG_I2C_HID=y
CONFIG_I2C_HID_ACPI=y
CONFIG_I2C_HID_OF=y
# CONFIG_I2C_HID_OF_ELAN is not set
# CONFIG_I2C_HID_OF_GOODIX is not set
CONFIG_I2C_HID_CORE=y

#
# Intel ISH HID support
#
CONFIG_INTEL_ISH_HID=y
CONFIG_INTEL_ISH_FIRMWARE_DOWNLOADER=y
# end of Intel ISH HID support

#
# AMD SFH HID Support
#
CONFIG_AMD_SFH_HID=y
# end of AMD SFH HID Support

#
# Surface System Aggregator Module HID support
#
CONFIG_SURFACE_HID=y
CONFIG_SURFACE_KBD=y
# end of Surface System Aggregator Module HID support

CONFIG_SURFACE_HID_CORE=y

#
# Intel THC HID Support
#
# CONFIG_INTEL_THC_HID is not set
# end of Intel THC HID Support

#
# USB HID support
#
CONFIG_USB_HID=y
CONFIG_HID_PID=y
CONFIG_USB_HIDDEV=y
# end of USB HID support

CONFIG_USB_OHCI_LITTLE_ENDIAN=y
CONFIG_USB_SUPPORT=y
CONFIG_USB_COMMON=y
CONFIG_USB_LED_TRIG=y
CONFIG_USB_ULPI_BUS=y
CONFIG_USB_CONN_GPIO=y
CONFIG_USB_ARCH_HAS_HCD=y
CONFIG_USB=y
CONFIG_USB_PCI=y
CONFIG_USB_PCI_AMD=y
CONFIG_USB_ANNOUNCE_NEW_DEVICES=y

#
# Miscellaneous USB options
#
CONFIG_USB_DEFAULT_PERSIST=y
CONFIG_USB_FEW_INIT_RETRIES=y
CONFIG_USB_DYNAMIC_MINORS=y
CONFIG_USB_OTG=y
# CONFIG_USB_OTG_PRODUCTLIST is not set
# CONFIG_USB_OTG_DISABLE_EXTERNAL_HUB is not set
CONFIG_USB_OTG_FSM=y
CONFIG_USB_LEDS_TRIGGER_USBPORT=y
CONFIG_USB_AUTOSUSPEND_DELAY=2
CONFIG_USB_DEFAULT_AUTHORIZATION_MODE=1
CONFIG_USB_MON=y

#
# USB Host Controller Drivers
#
CONFIG_USB_C67X00_HCD=y
CONFIG_USB_XHCI_HCD=y
CONFIG_USB_XHCI_DBGCAP=y
CONFIG_USB_XHCI_PCI=y
CONFIG_USB_XHCI_PCI_RENESAS=y
CONFIG_USB_XHCI_PLATFORM=y
# CONFIG_USB_XHCI_SIDEBAND is not set
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_EHCI_ROOT_HUB_TT=y
CONFIG_USB_EHCI_TT_NEWSCHED=y
CONFIG_USB_EHCI_PCI=y
CONFIG_USB_EHCI_FSL=y
CONFIG_USB_EHCI_HCD_PLATFORM=y
CONFIG_USB_OXU210HP_HCD=y
CONFIG_USB_ISP116X_HCD=y
CONFIG_USB_MAX3421_HCD=y
CONFIG_USB_OHCI_HCD=y
CONFIG_USB_OHCI_HCD_PCI=y
# CONFIG_USB_OHCI_HCD_SSB is not set
CONFIG_USB_OHCI_HCD_PLATFORM=y
CONFIG_USB_UHCI_HCD=y
CONFIG_USB_SL811_HCD=y
CONFIG_USB_SL811_HCD_ISO=y
CONFIG_USB_SL811_CS=y
CONFIG_USB_R8A66597_HCD=y
CONFIG_USB_HCD_BCMA=y
CONFIG_USB_HCD_SSB=y
# CONFIG_USB_HCD_TEST_MODE is not set

#
# USB Device Class drivers
#
CONFIG_USB_ACM=y
CONFIG_USB_PRINTER=y
CONFIG_USB_WDM=y
CONFIG_USB_TMC=y

#
# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may also be needed; see USB_STORAGE Help for more info
#
CONFIG_USB_STORAGE=y
# CONFIG_USB_STORAGE_DEBUG is not set
CONFIG_USB_STORAGE_REALTEK=y
CONFIG_REALTEK_AUTOPM=y
CONFIG_USB_STORAGE_DATAFAB=y
CONFIG_USB_STORAGE_FREECOM=y
CONFIG_USB_STORAGE_ISD200=y
CONFIG_USB_STORAGE_USBAT=y
CONFIG_USB_STORAGE_SDDR09=y
CONFIG_USB_STORAGE_SDDR55=y
CONFIG_USB_STORAGE_JUMPSHOT=y
CONFIG_USB_STORAGE_ALAUDA=y
CONFIG_USB_STORAGE_ONETOUCH=y
CONFIG_USB_STORAGE_KARMA=y
CONFIG_USB_STORAGE_CYPRESS_ATACB=y
CONFIG_USB_STORAGE_ENE_UB6250=y
CONFIG_USB_UAS=y

#
# USB Imaging devices
#
CONFIG_USB_MDC800=y
CONFIG_USB_MICROTEK=y
CONFIG_USBIP_CORE=y
CONFIG_USBIP_VHCI_HCD=y
CONFIG_USBIP_VHCI_HC_PORTS=8
CONFIG_USBIP_VHCI_NR_HCS=16
CONFIG_USBIP_HOST=y
CONFIG_USBIP_VUDC=y
# CONFIG_USBIP_DEBUG is not set

#
# USB dual-mode controller drivers
#
CONFIG_USB_CDNS_SUPPORT=y
CONFIG_USB_CDNS3=y
CONFIG_USB_CDNS3_HOST=y
CONFIG_USB_CDNS3_GADGET=y

#
# Platform glue driver support
#
CONFIG_USB_CDNS3_PCI_WRAP=y
CONFIG_USB_CDNSP_PCI=y
CONFIG_USB_MUSB_HDRC=y
# CONFIG_USB_MUSB_HOST is not set
# CONFIG_USB_MUSB_GADGET is not set
CONFIG_USB_MUSB_DUAL_ROLE=y

#
# Platform Glue Layer
#

#
# MUSB DMA mode
#
CONFIG_MUSB_PIO_ONLY=y
CONFIG_USB_DWC3=y
CONFIG_USB_DWC3_ULPI=y
# CONFIG_USB_DWC3_HOST is not set
CONFIG_USB_DWC3_GADGET=y
# CONFIG_USB_DWC3_DUAL_ROLE is not set

#
# Platform Glue Driver Support
#
CONFIG_USB_DWC3_PCI=y
CONFIG_USB_DWC3_HAPS=y
CONFIG_USB_DWC3_OF_SIMPLE=y
CONFIG_USB_DWC3_GENERIC_PLAT=y
# CONFIG_USB_DWC3_GOOGLE is not set
CONFIG_USB_DWC2=y
CONFIG_USB_DWC2_HOST=y

#
# Gadget/Dual-role mode requires USB Gadget support to be enabled
#
# CONFIG_USB_DWC2_PERIPHERAL is not set
# CONFIG_USB_DWC2_DUAL_ROLE is not set
CONFIG_USB_DWC2_PCI=y
# CONFIG_USB_DWC2_DEBUG is not set
# CONFIG_USB_DWC2_TRACK_MISSED_SOFS is not set
CONFIG_USB_CHIPIDEA=y
CONFIG_USB_CHIPIDEA_UDC=y
CONFIG_USB_CHIPIDEA_HOST=y
CONFIG_USB_CHIPIDEA_PCI=y
CONFIG_USB_CHIPIDEA_MSM=y
CONFIG_USB_CHIPIDEA_NPCM=y
# CONFIG_USB_CHIPIDEA_IMX is not set
CONFIG_USB_CHIPIDEA_GENERIC=y
# CONFIG_USB_CHIPIDEA_TEGRA is not set
CONFIG_USB_ISP1760=y
CONFIG_USB_ISP1760_HCD=y
CONFIG_USB_ISP1761_UDC=y
# CONFIG_USB_ISP1760_HOST_ROLE is not set
# CONFIG_USB_ISP1760_GADGET_ROLE is not set
CONFIG_USB_ISP1760_DUAL_ROLE=y

#
# USB port drivers
#
CONFIG_USB_SERIAL=y
CONFIG_USB_SERIAL_CONSOLE=y
CONFIG_USB_SERIAL_GENERIC=y
CONFIG_USB_SERIAL_SIMPLE=y
CONFIG_USB_SERIAL_AIRCABLE=y
CONFIG_USB_SERIAL_ARK3116=y
CONFIG_USB_SERIAL_BELKIN=y
CONFIG_USB_SERIAL_CH341=y
CONFIG_USB_SERIAL_WHITEHEAT=y
CONFIG_USB_SERIAL_DIGI_ACCELEPORT=y
CONFIG_USB_SERIAL_CP210X=y
CONFIG_USB_SERIAL_CYPRESS_M8=y
CONFIG_USB_SERIAL_EMPEG=y
CONFIG_USB_SERIAL_FTDI_SIO=y
CONFIG_USB_SERIAL_VISOR=y
CONFIG_USB_SERIAL_IPAQ=y
CONFIG_USB_SERIAL_IR=y
CONFIG_USB_SERIAL_EDGEPORT=y
CONFIG_USB_SERIAL_EDGEPORT_TI=y
CONFIG_USB_SERIAL_F81232=y
CONFIG_USB_SERIAL_F8153X=y
CONFIG_USB_SERIAL_GARMIN=y
CONFIG_USB_SERIAL_IPW=y
CONFIG_USB_SERIAL_IUU=y
CONFIG_USB_SERIAL_KEYSPAN_PDA=y
CONFIG_USB_SERIAL_KEYSPAN=y
CONFIG_USB_SERIAL_KLSI=y
CONFIG_USB_SERIAL_KOBIL_SCT=y
CONFIG_USB_SERIAL_MCT_U232=y
CONFIG_USB_SERIAL_METRO=y
CONFIG_USB_SERIAL_MOS7720=y
CONFIG_USB_SERIAL_MOS7715_PARPORT=y
CONFIG_USB_SERIAL_MOS7840=y
CONFIG_USB_SERIAL_MXUPORT=y
CONFIG_USB_SERIAL_NAVMAN=y
CONFIG_USB_SERIAL_PL2303=y
CONFIG_USB_SERIAL_OTI6858=y
CONFIG_USB_SERIAL_QCAUX=y
CONFIG_USB_SERIAL_QUALCOMM=y
CONFIG_USB_SERIAL_SPCP8X5=y
CONFIG_USB_SERIAL_SAFE=y
# CONFIG_USB_SERIAL_SAFE_PADDED is not set
CONFIG_USB_SERIAL_SIERRAWIRELESS=y
CONFIG_USB_SERIAL_SYMBOL=y
CONFIG_USB_SERIAL_TI=y
CONFIG_USB_SERIAL_CYBERJACK=y
CONFIG_USB_SERIAL_WWAN=y
CONFIG_USB_SERIAL_OPTION=y
CONFIG_USB_SERIAL_OMNINET=y
CONFIG_USB_SERIAL_OPTICON=y
CONFIG_USB_SERIAL_XSENS_MT=y
CONFIG_USB_SERIAL_WISHBONE=y
CONFIG_USB_SERIAL_SSU100=y
CONFIG_USB_SERIAL_QT2=y
CONFIG_USB_SERIAL_UPD78F0730=y
CONFIG_USB_SERIAL_XR=y
CONFIG_USB_SERIAL_DEBUG=y

#
# USB Miscellaneous drivers
#
CONFIG_USB_USS720=y
CONFIG_USB_EMI62=y
CONFIG_USB_EMI26=y
CONFIG_USB_ADUTUX=y
CONFIG_USB_SEVSEG=y
CONFIG_USB_LEGOTOWER=y
CONFIG_USB_LCD=y
CONFIG_USB_CYPRESS_CY7C63=y
CONFIG_USB_CYTHERM=y
CONFIG_USB_IDMOUSE=y
CONFIG_USB_APPLEDISPLAY=y
CONFIG_APPLE_MFI_FASTCHARGE=y
CONFIG_USB_LJCA=y
# CONFIG_USB_USBIO is not set
CONFIG_USB_SISUSBVGA=y
CONFIG_USB_LD=y
CONFIG_USB_TRANCEVIBRATOR=y
CONFIG_USB_IOWARRIOR=y
CONFIG_USB_TEST=y
CONFIG_USB_EHSET_TEST_FIXTURE=y
CONFIG_USB_ISIGHTFW=y
CONFIG_USB_YUREX=y
CONFIG_USB_EZUSB_FX2=y
CONFIG_USB_HUB_USB251XB=y
CONFIG_USB_HSIC_USB3503=y
CONFIG_USB_HSIC_USB4604=y
CONFIG_USB_LINK_LAYER_TEST=y
CONFIG_USB_CHAOSKEY=y
# CONFIG_USB_ONBOARD_DEV is not set
CONFIG_USB_ATM=y
CONFIG_USB_SPEEDTOUCH=y
CONFIG_USB_CXACRU=y
CONFIG_USB_UEAGLEATM=y
CONFIG_USB_XUSBATM=y

#
# USB Physical Layer drivers
#
CONFIG_USB_PHY=y
CONFIG_NOP_USB_XCEIV=y
CONFIG_TAHVO_USB=y
CONFIG_TAHVO_USB_HOST_BY_DEFAULT=y
CONFIG_USB_ISP1301=y
# end of USB Physical Layer drivers

CONFIG_USB_GADGET=y
# CONFIG_USB_GADGET_DEBUG is not set
CONFIG_USB_GADGET_DEBUG_FILES=y
CONFIG_USB_GADGET_DEBUG_FS=y
CONFIG_USB_GADGET_VBUS_DRAW=2
CONFIG_USB_GADGET_STORAGE_NUM_BUFFERS=2
CONFIG_U_SERIAL_CONSOLE=y

#
# USB Peripheral Controller
#
CONFIG_USB_GR_UDC=y
CONFIG_USB_R8A66597=y
CONFIG_USB_PXA27X=y
CONFIG_USB_SNP_CORE=y
# CONFIG_USB_SNP_UDC_PLAT is not set
# CONFIG_USB_M66592 is not set
CONFIG_USB_BDC_UDC=y
CONFIG_USB_AMD5536UDC=y
CONFIG_USB_NET2280=y
CONFIG_USB_GOKU=y
CONFIG_USB_EG20T=y
# CONFIG_USB_GADGET_XILINX is not set
CONFIG_USB_MAX3420_UDC=y
CONFIG_USB_CDNS2_UDC=y
CONFIG_USB_DUMMY_HCD=y
# end of USB Peripheral Controller

CONFIG_USB_LIBCOMPOSITE=y
CONFIG_USB_F_ACM=y
CONFIG_USB_F_SS_LB=y
CONFIG_USB_U_SERIAL=y
CONFIG_USB_U_ETHER=y
CONFIG_USB_U_AUDIO=y
CONFIG_USB_F_SERIAL=y
CONFIG_USB_F_OBEX=y
CONFIG_USB_F_NCM=y
CONFIG_USB_F_ECM=y
CONFIG_USB_F_PHONET=y
CONFIG_USB_F_EEM=y
CONFIG_USB_F_SUBSET=y
CONFIG_USB_F_RNDIS=y
CONFIG_USB_F_MASS_STORAGE=y
CONFIG_USB_F_FS=y
CONFIG_USB_F_UAC1=y
CONFIG_USB_F_UAC1_LEGACY=y
CONFIG_USB_F_UAC2=y
CONFIG_USB_F_UVC=y
CONFIG_USB_F_MIDI=y
CONFIG_USB_F_MIDI2=y
CONFIG_USB_F_HID=y
CONFIG_USB_F_PRINTER=y
CONFIG_USB_F_TCM=y
CONFIG_USB_CONFIGFS=y
CONFIG_USB_CONFIGFS_SERIAL=y
CONFIG_USB_CONFIGFS_ACM=y
CONFIG_USB_CONFIGFS_OBEX=y
CONFIG_USB_CONFIGFS_NCM=y
CONFIG_USB_CONFIGFS_ECM=y
CONFIG_USB_CONFIGFS_ECM_SUBSET=y
CONFIG_USB_CONFIGFS_RNDIS=y
CONFIG_USB_CONFIGFS_EEM=y
CONFIG_USB_CONFIGFS_PHONET=y
CONFIG_USB_CONFIGFS_MASS_STORAGE=y
CONFIG_USB_CONFIGFS_F_LB_SS=y
CONFIG_USB_CONFIGFS_F_FS=y
CONFIG_USB_CONFIGFS_F_UAC1=y
CONFIG_USB_CONFIGFS_F_UAC1_LEGACY=y
CONFIG_USB_CONFIGFS_F_UAC2=y
CONFIG_USB_CONFIGFS_F_MIDI=y
CONFIG_USB_CONFIGFS_F_MIDI2=y
CONFIG_USB_CONFIGFS_F_HID=y
CONFIG_USB_CONFIGFS_F_UVC=y
CONFIG_USB_CONFIGFS_F_PRINTER=y
CONFIG_USB_CONFIGFS_F_TCM=y

#
# USB Gadget precomposed configurations
#
# CONFIG_USB_ZERO is not set
# CONFIG_USB_AUDIO is not set
# CONFIG_USB_ETH is not set
# CONFIG_USB_G_NCM is not set
CONFIG_USB_GADGETFS=y
# CONFIG_USB_FUNCTIONFS is not set
# CONFIG_USB_MASS_STORAGE is not set
# CONFIG_USB_GADGET_TARGET is not set
# CONFIG_USB_G_SERIAL is not set
# CONFIG_USB_MIDI_GADGET is not set
# CONFIG_USB_G_PRINTER is not set
# CONFIG_USB_CDC_COMPOSITE is not set
# CONFIG_USB_G_NOKIA is not set
# CONFIG_USB_G_ACM_MS is not set
# CONFIG_USB_G_MULTI is not set
# CONFIG_USB_G_HID is not set
# CONFIG_USB_G_DBGP is not set
# CONFIG_USB_G_WEBCAM is not set
CONFIG_USB_RAW_GADGET=y
# end of USB Gadget precomposed configurations

CONFIG_TYPEC=y
CONFIG_TYPEC_TCPM=y
CONFIG_TYPEC_TCPCI=y
CONFIG_TYPEC_RT1711H=y
CONFIG_TYPEC_MT6360=y
CONFIG_TYPEC_TCPCI_MT6370=y
CONFIG_TYPEC_TCPCI_MAXIM=y
CONFIG_TYPEC_FUSB302=y
CONFIG_TYPEC_WCOVE=y
CONFIG_TYPEC_UCSI=y
CONFIG_UCSI_CCG=y
CONFIG_UCSI_ACPI=y
CONFIG_UCSI_STM32G0=y
CONFIG_TYPEC_TPS6598X=y
CONFIG_TYPEC_ANX7411=y
CONFIG_TYPEC_RT1719=y
CONFIG_TYPEC_HD3SS3220=y
CONFIG_TYPEC_STUSB160X=y
CONFIG_TYPEC_WUSB3801=y

#
# USB Type-C Multiplexer/DeMultiplexer Switch support
#
CONFIG_TYPEC_MUX_FSA4480=y
CONFIG_TYPEC_MUX_GPIO_SBU=y
CONFIG_TYPEC_MUX_PI3USB30532=y
CONFIG_TYPEC_MUX_INTEL_PMC=y
# CONFIG_TYPEC_MUX_IT5205 is not set
CONFIG_TYPEC_MUX_NB7VPQ904M=y
# CONFIG_TYPEC_MUX_PS883X is not set
CONFIG_TYPEC_MUX_PTN36502=y
# CONFIG_TYPEC_MUX_TUSB1046 is not set
CONFIG_TYPEC_MUX_WCD939X_USBSS=y
# end of USB Type-C Multiplexer/DeMultiplexer Switch support

#
# USB Type-C Alternate Mode drivers
#
CONFIG_TYPEC_DP_ALTMODE=y
CONFIG_TYPEC_NVIDIA_ALTMODE=y
# CONFIG_TYPEC_TBT_ALTMODE is not set
# end of USB Type-C Alternate Mode drivers

CONFIG_USB_ROLE_SWITCH=y
CONFIG_USB_ROLES_INTEL_XHCI=y
CONFIG_MMC=y
# CONFIG_PWRSEQ_EMMC is not set
# CONFIG_PWRSEQ_SD8787 is not set
# CONFIG_PWRSEQ_SIMPLE is not set
# CONFIG_MMC_BLOCK is not set
# CONFIG_SDIO_UART is not set
# CONFIG_MMC_TEST is not set
# CONFIG_MMC_CRYPTO is not set

#
# MMC/SD/SDIO Host Controller Drivers
#
# CONFIG_MMC_DEBUG is not set
# CONFIG_MMC_SDHCI is not set
# CONFIG_MMC_WBSD is not set
# CONFIG_MMC_TIFM_SD is not set
# CONFIG_MMC_SPI is not set
# CONFIG_MMC_SDRICOH_CS is not set
# CONFIG_MMC_CB710 is not set
# CONFIG_MMC_VIA_SDMMC is not set
CONFIG_MMC_VUB300=y
CONFIG_MMC_USHC=y
# CONFIG_MMC_USDHI6ROL0 is not set
CONFIG_MMC_REALTEK_USB=y
# CONFIG_MMC_CQHCI is not set
# CONFIG_MMC_HSQ is not set
# CONFIG_MMC_TOSHIBA_PCI is not set
# CONFIG_MMC_MTK is not set
# CONFIG_SCSI_UFSHCD is not set
CONFIG_MEMSTICK=y
# CONFIG_MEMSTICK_DEBUG is not set

#
# MemoryStick drivers
#
# CONFIG_MEMSTICK_UNSAFE_RESUME is not set
# CONFIG_MSPRO_BLOCK is not set
# CONFIG_MS_BLOCK is not set

#
# MemoryStick Host Controller Drivers
#
# CONFIG_MEMSTICK_TIFM_MS is not set
# CONFIG_MEMSTICK_JMICRON_38X is not set
# CONFIG_MEMSTICK_R592 is not set
CONFIG_MEMSTICK_REALTEK_USB=y
CONFIG_NEW_LEDS=y
CONFIG_LEDS_CLASS=y
# CONFIG_LEDS_CLASS_FLASH is not set
CONFIG_LEDS_CLASS_MULTICOLOR=y
# CONFIG_LEDS_BRIGHTNESS_HW_CHANGED is not set

#
# LED drivers
#
# CONFIG_LEDS_AN30259A is not set
# CONFIG_LEDS_APU is not set
# CONFIG_LEDS_OSRAM_AMS_AS3668 is not set
# CONFIG_LEDS_AW200XX is not set
# CONFIG_LEDS_AW2013 is not set
# CONFIG_LEDS_BCM6328 is not set
# CONFIG_LEDS_BCM6358 is not set
# CONFIG_LEDS_CHT_WCOVE is not set
# CONFIG_LEDS_CR0014114 is not set
# CONFIG_LEDS_EL15203000 is not set
# CONFIG_LEDS_LM3530 is not set
# CONFIG_LEDS_LM3532 is not set
# CONFIG_LEDS_LM3642 is not set
# CONFIG_LEDS_LM3692X is not set
# CONFIG_LEDS_PCA9532 is not set
# CONFIG_LEDS_GPIO is not set
# CONFIG_LEDS_LP3944 is not set
# CONFIG_LEDS_LP3952 is not set
# CONFIG_LEDS_LP50XX is not set
# CONFIG_LEDS_LP55XX_COMMON is not set
# CONFIG_LEDS_LP8860 is not set
# CONFIG_LEDS_LP8864 is not set
# CONFIG_LEDS_PCA955X is not set
# CONFIG_LEDS_PCA963X is not set
# CONFIG_LEDS_PCA995X is not set
# CONFIG_LEDS_DAC124S085 is not set
# CONFIG_LEDS_REGULATOR is not set
# CONFIG_LEDS_BD2606MVV is not set
# CONFIG_LEDS_BD2802 is not set
# CONFIG_LEDS_INTEL_SS4200 is not set
# CONFIG_LEDS_LT3593 is not set
# CONFIG_LEDS_TCA6507 is not set
# CONFIG_LEDS_TLC591XX is not set
# CONFIG_LEDS_LM355x is not set
# CONFIG_LEDS_IS31FL319X is not set
# CONFIG_LEDS_IS31FL32XX is not set

#
# LED driver for blink(1) USB RGB LED is under Special HID drivers (HID_THINGM)
#
# CONFIG_LEDS_BLINKM is not set
# CONFIG_LEDS_SYSCON is not set
# CONFIG_LEDS_MLXCPLD is not set
# CONFIG_LEDS_MLXREG is not set
# CONFIG_LEDS_USER is not set
# CONFIG_LEDS_NIC78BX is not set
# CONFIG_LEDS_SPI_BYTE is not set
# CONFIG_LEDS_LM3697 is not set
# CONFIG_LEDS_ST1202 is not set
# CONFIG_LEDS_LGM is not set

#
# Flash and Torch LED drivers
#

#
# RGB LED drivers
#
# CONFIG_LEDS_GROUP_MULTICOLOR is not set
# CONFIG_LEDS_KTD202X is not set
# CONFIG_LEDS_LP5812 is not set
# CONFIG_LEDS_LP5860_CORE is not set
# CONFIG_LEDS_LP5860_SPI is not set
# CONFIG_LEDS_NCP5623 is not set
# CONFIG_LEDS_MT6370_RGB is not set

#
# LED Triggers
#
CONFIG_LEDS_TRIGGERS=y
# CONFIG_LEDS_TRIGGER_TIMER is not set
# CONFIG_LEDS_TRIGGER_ONESHOT is not set
# CONFIG_LEDS_TRIGGER_DISK is not set
# CONFIG_LEDS_TRIGGER_MTD is not set
# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set
# CONFIG_LEDS_TRIGGER_BACKLIGHT is not set
# CONFIG_LEDS_TRIGGER_CPU is not set
# CONFIG_LEDS_TRIGGER_ACTIVITY is not set
# CONFIG_LEDS_TRIGGER_GPIO is not set
# CONFIG_LEDS_TRIGGER_DEFAULT_ON is not set

#
# iptables trigger is under Netfilter config (LED target)
#
# CONFIG_LEDS_TRIGGER_TRANSIENT is not set
# CONFIG_LEDS_TRIGGER_CAMERA is not set
# CONFIG_LEDS_TRIGGER_PANIC is not set
# CONFIG_LEDS_TRIGGER_NETDEV is not set
# CONFIG_LEDS_TRIGGER_PATTERN is not set
# CONFIG_LEDS_TRIGGER_TTY is not set
# CONFIG_LEDS_TRIGGER_INPUT_EVENTS is not set

#
# Simatic LED drivers
#
# CONFIG_ACCESSIBILITY is not set
CONFIG_INFINIBAND=y
CONFIG_INFINIBAND_USER_MAD=y
CONFIG_INFINIBAND_USER_ACCESS=y
CONFIG_INFINIBAND_USER_ACCESS_CORE=y
CONFIG_INFINIBAND_USER_MEM=y
CONFIG_INFINIBAND_ON_DEMAND_PAGING=y
CONFIG_INFINIBAND_ADDR_TRANS=y
CONFIG_INFINIBAND_ADDR_TRANS_CONFIGFS=y
CONFIG_INFINIBAND_VIRT_DMA=y
# CONFIG_INFINIBAND_EFA is not set
# CONFIG_INFINIBAND_ERDMA is not set
CONFIG_MLX4_INFINIBAND=y
# CONFIG_INFINIBAND_MTHCA is not set
# CONFIG_INFINIBAND_OCRDMA is not set
# CONFIG_INFINIBAND_USNIC is not set
# CONFIG_INFINIBAND_VMWARE_PVRDMA is not set
# CONFIG_INFINIBAND_RDMAVT is not set
CONFIG_RDMA_RXE=y
CONFIG_RDMA_SIW=y
CONFIG_INFINIBAND_IPOIB=y
CONFIG_INFINIBAND_IPOIB_CM=y
CONFIG_INFINIBAND_IPOIB_DEBUG=y
# CONFIG_INFINIBAND_IPOIB_DEBUG_DATA is not set
CONFIG_INFINIBAND_SRP=y
# CONFIG_INFINIBAND_SRPT is not set
CONFIG_INFINIBAND_ISER=y
CONFIG_INFINIBAND_RTRS=y
CONFIG_INFINIBAND_RTRS_CLIENT=y
# CONFIG_INFINIBAND_RTRS_SERVER is not set
CONFIG_EDAC_ATOMIC_SCRUB=y
CONFIG_EDAC_SUPPORT=y
CONFIG_EDAC=y
# CONFIG_EDAC_DEBUG is not set
# CONFIG_EDAC_DECODE_MCE is not set
# CONFIG_EDAC_SCRUB is not set
# CONFIG_EDAC_ECS is not set
# CONFIG_EDAC_MEM_REPAIR is not set
# CONFIG_EDAC_E752X is not set
# CONFIG_EDAC_I82975X is not set
# CONFIG_EDAC_I3000 is not set
# CONFIG_EDAC_I3200 is not set
# CONFIG_EDAC_IE31200 is not set
# CONFIG_EDAC_X38 is not set
# CONFIG_EDAC_I5400 is not set
# CONFIG_EDAC_I7CORE is not set
# CONFIG_EDAC_I5100 is not set
# CONFIG_EDAC_I7300 is not set
# CONFIG_EDAC_SBRIDGE is not set
# CONFIG_EDAC_SKX is not set
# CONFIG_EDAC_I10NM is not set
# CONFIG_EDAC_IMH is not set
# CONFIG_EDAC_PND2 is not set
# CONFIG_EDAC_IGEN6 is not set
CONFIG_RTC_LIB=y
CONFIG_RTC_MC146818_LIB=y
CONFIG_RTC_CLASS=y
# CONFIG_RTC_HCTOSYS is not set
CONFIG_RTC_SYSTOHC=y
CONFIG_RTC_SYSTOHC_DEVICE="rtc0"
# CONFIG_RTC_DEBUG is not set
# CONFIG_RTC_NVMEM is not set

#
# RTC interfaces
#
CONFIG_RTC_INTF_SYSFS=y
CONFIG_RTC_INTF_PROC=y
CONFIG_RTC_INTF_DEV=y
# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
# CONFIG_RTC_DRV_TEST is not set

#
# I2C RTC drivers
#
# CONFIG_RTC_DRV_ABB5ZES3 is not set
# CONFIG_RTC_DRV_ABEOZ9 is not set
# CONFIG_RTC_DRV_ABX80X is not set
# CONFIG_RTC_DRV_DS1307 is not set
# CONFIG_RTC_DRV_DS1374 is not set
# CONFIG_RTC_DRV_DS1672 is not set
# CONFIG_RTC_DRV_HYM8563 is not set
# CONFIG_RTC_DRV_MAX6900 is not set
# CONFIG_RTC_DRV_MAX31335 is not set
# CONFIG_RTC_DRV_NCT3018Y is not set
# CONFIG_RTC_DRV_RS5C372 is not set
# CONFIG_RTC_DRV_ISL1208 is not set
# CONFIG_RTC_DRV_ISL12022 is not set
# CONFIG_RTC_DRV_ISL12026 is not set
# CONFIG_RTC_DRV_X1205 is not set
# CONFIG_RTC_DRV_PCF8523 is not set
# CONFIG_RTC_DRV_PCF85363 is not set
# CONFIG_RTC_DRV_PCF8563 is not set
# CONFIG_RTC_DRV_PCF8583 is not set
# CONFIG_RTC_DRV_M41T80 is not set
# CONFIG_RTC_DRV_BQ32K is not set
# CONFIG_RTC_DRV_TWL4030 is not set
# CONFIG_RTC_DRV_S35390A is not set
# CONFIG_RTC_DRV_FM3130 is not set
# CONFIG_RTC_DRV_RX8010 is not set
# CONFIG_RTC_DRV_RX8111 is not set
# CONFIG_RTC_DRV_RX8581 is not set
# CONFIG_RTC_DRV_RX8025 is not set
# CONFIG_RTC_DRV_EM3027 is not set
# CONFIG_RTC_DRV_RV3028 is not set
# CONFIG_RTC_DRV_RV3032 is not set
# CONFIG_RTC_DRV_RV8803 is not set
# CONFIG_RTC_DRV_SD2405AL is not set
# CONFIG_RTC_DRV_SD3078 is not set

#
# SPI RTC drivers
#
# CONFIG_RTC_DRV_M41T93 is not set
# CONFIG_RTC_DRV_M41T94 is not set
# CONFIG_RTC_DRV_DS1302 is not set
# CONFIG_RTC_DRV_DS1305 is not set
# CONFIG_RTC_DRV_DS1343 is not set
# CONFIG_RTC_DRV_DS1347 is not set
# CONFIG_RTC_DRV_DS1390 is not set
# CONFIG_RTC_DRV_MAX6916 is not set
# CONFIG_RTC_DRV_R9701 is not set
# CONFIG_RTC_DRV_RX4581 is not set
# CONFIG_RTC_DRV_RS5C348 is not set
# CONFIG_RTC_DRV_MAX6902 is not set
# CONFIG_RTC_DRV_PCF2123 is not set
# CONFIG_RTC_DRV_MCP795 is not set
CONFIG_RTC_I2C_AND_SPI=y

#
# SPI and I2C RTC drivers
#
# CONFIG_RTC_DRV_DS3232 is not set
# CONFIG_RTC_DRV_PCF2127 is not set
# CONFIG_RTC_DRV_PCF85063 is not set
# CONFIG_RTC_DRV_RV3029C2 is not set
# CONFIG_RTC_DRV_RX6110 is not set

#
# Platform RTC drivers
#
CONFIG_RTC_DRV_CMOS=y
# CONFIG_RTC_DRV_DS1286 is not set
# CONFIG_RTC_DRV_DS1511 is not set
# CONFIG_RTC_DRV_DS1553 is not set
# CONFIG_RTC_DRV_DS1685_FAMILY is not set
# CONFIG_RTC_DRV_DS1742 is not set
# CONFIG_RTC_DRV_DS2404 is not set
# CONFIG_RTC_DRV_STK17TA8 is not set
# CONFIG_RTC_DRV_M48T86 is not set
# CONFIG_RTC_DRV_M48T35 is not set
# CONFIG_RTC_DRV_M48T59 is not set
# CONFIG_RTC_DRV_MSM6242 is not set
# CONFIG_RTC_DRV_RP5C01 is not set
# CONFIG_RTC_DRV_ZYNQMP is not set

#
# on-CPU RTC drivers
#
# CONFIG_RTC_DRV_CADENCE is not set
# CONFIG_RTC_DRV_FTRTC010 is not set
# CONFIG_RTC_DRV_R7301 is not set
# CONFIG_RTC_DRV_GOLDFISH is not set

#
# HID Sensor RTC drivers
#
CONFIG_RTC_DRV_HID_SENSOR_TIME=y
CONFIG_DMADEVICES=y
# CONFIG_DMADEVICES_DEBUG is not set

#
# DMA Devices
#
CONFIG_DMA_ENGINE=y
CONFIG_DMA_VIRTUAL_CHANNELS=y
CONFIG_DMA_ACPI=y
CONFIG_DMA_OF=y
# CONFIG_ALTERA_MSGDMA is not set
# CONFIG_DW_AXI_DMAC is not set
# CONFIG_FSL_EDMA is not set
CONFIG_INTEL_IDMA64=y
# CONFIG_INTEL_IDXD is not set
# CONFIG_INTEL_IDXD_COMPAT is not set
CONFIG_INTEL_IOATDMA=y
# CONFIG_PLX_DMA is not set
# CONFIG_SWITCHTEC_DMA is not set
# CONFIG_XILINX_DMA is not set
# CONFIG_XILINX_XDMA is not set
# CONFIG_XILINX_ZYNQMP_DPDMA is not set
# CONFIG_AMD_PTDMA is not set
# CONFIG_AMD_QDMA is not set
# CONFIG_QCOM_HIDMA_MGMT is not set
# CONFIG_QCOM_HIDMA is not set
CONFIG_DW_DMAC_CORE=y
# CONFIG_DW_DMAC is not set
# CONFIG_DW_DMAC_PCI is not set
# CONFIG_DW_EDMA is not set
CONFIG_HSU_DMA=y
# CONFIG_SF_PDMA is not set
# CONFIG_INTEL_LDMA is not set

#
# DMA Clients
#
CONFIG_ASYNC_TX_DMA=y
# CONFIG_DMATEST is not set
CONFIG_DMA_ENGINE_RAID=y

#
# DMABUF options
#
CONFIG_SYNC_FILE=y
CONFIG_SW_SYNC=y
CONFIG_UDMABUF=y
# CONFIG_DMABUF_DEBUG is not set
CONFIG_DMABUF_HEAPS=y
CONFIG_DMABUF_HEAPS_SYSTEM=y
# CONFIG_DMABUF_HEAPS_SYSTEM_CC_SHARED is not set
CONFIG_DMABUF_HEAPS_CMA=y
# end of DMABUF options

CONFIG_DCA=y
# CONFIG_UIO is not set
CONFIG_VFIO=y
CONFIG_VFIO_DEVICE_CDEV=y
# CONFIG_VFIO_GROUP is not set
CONFIG_VFIO_VIRQFD=y
# CONFIG_VFIO_DEBUGFS is not set

#
# VFIO support for PCI devices
#
CONFIG_VFIO_PCI_CORE=y
CONFIG_VFIO_PCI_INTX=y
CONFIG_VFIO_PCI=y
# CONFIG_VFIO_PCI_VGA is not set
# CONFIG_VFIO_PCI_IGD is not set
# CONFIG_VIRTIO_VFIO_PCI is not set
# end of VFIO support for PCI devices

CONFIG_IRQ_BYPASS_MANAGER=y
# CONFIG_VIRT_DRIVERS is not set
CONFIG_VIRTIO_ANCHOR=y
CONFIG_VIRTIO=y
CONFIG_VIRTIO_PCI_LIB=y
CONFIG_VIRTIO_PCI_LIB_LEGACY=y
CONFIG_VIRTIO_MENU=y
CONFIG_VIRTIO_PCI=y
CONFIG_VIRTIO_PCI_ADMIN_LEGACY=y
CONFIG_VIRTIO_PCI_LEGACY=y
CONFIG_VIRTIO_VDPA=y
CONFIG_VIRTIO_PMEM=y
CONFIG_VIRTIO_BALLOON=y
CONFIG_VIRTIO_MEM=y
CONFIG_VIRTIO_INPUT=y
CONFIG_VIRTIO_MMIO=y
CONFIG_VIRTIO_MMIO_CMDLINE_DEVICES=y
CONFIG_VIRTIO_DMA_SHARED_BUFFER=y
# CONFIG_VIRTIO_DEBUG is not set
# CONFIG_VIRTIO_RTC is not set
CONFIG_VDPA=y
CONFIG_VDPA_SIM=y
CONFIG_VDPA_SIM_NET=y
CONFIG_VDPA_SIM_BLOCK=y
# CONFIG_VDPA_USER is not set
# CONFIG_IFCVF is not set
# CONFIG_MLX5_VDPA_STEERING_DEBUG is not set
CONFIG_VP_VDPA=y
# CONFIG_ALIBABA_ENI_VDPA is not set
# CONFIG_SNET_VDPA is not set
# CONFIG_OCTEONEP_VDPA is not set
CONFIG_VHOST_IOTLB=y
CONFIG_VHOST_RING=y
CONFIG_VHOST_TASK=y
CONFIG_VHOST=y
CONFIG_VHOST_MENU=y
CONFIG_VHOST_NET=y
# CONFIG_VHOST_SCSI is not set
CONFIG_VHOST_VSOCK=y
CONFIG_VHOST_VDPA=y
CONFIG_VHOST_CROSS_ENDIAN_LEGACY=y
CONFIG_VHOST_ENABLE_FORK_OWNER_CONTROL=y

#
# Microsoft Hyper-V guest support
#
# CONFIG_HYPERV is not set
# end of Microsoft Hyper-V guest support

CONFIG_GREYBUS=y
# CONFIG_GREYBUS_BEAGLEPLAY is not set
CONFIG_GREYBUS_ES2=y
CONFIG_COMEDI=y
# CONFIG_COMEDI_DEBUG is not set
CONFIG_COMEDI_DEFAULT_BUF_SIZE_KB=2048
CONFIG_COMEDI_DEFAULT_BUF_MAXSIZE_KB=20480
CONFIG_COMEDI_MISC_DRIVERS=y
CONFIG_COMEDI_BOND=y
CONFIG_COMEDI_TEST=y
CONFIG_COMEDI_PARPORT=y
CONFIG_COMEDI_ISA_DRIVERS=y
CONFIG_COMEDI_PCL711=y
CONFIG_COMEDI_PCL724=y
CONFIG_COMEDI_PCL726=y
CONFIG_COMEDI_PCL730=y
CONFIG_COMEDI_PCL812=y
CONFIG_COMEDI_PCL816=y
CONFIG_COMEDI_PCL818=y
CONFIG_COMEDI_PCM3724=y
CONFIG_COMEDI_AMPLC_DIO200_ISA=y
CONFIG_COMEDI_AMPLC_PC236_ISA=y
CONFIG_COMEDI_AMPLC_PC263_ISA=y
CONFIG_COMEDI_RTI800=y
CONFIG_COMEDI_RTI802=y
CONFIG_COMEDI_DAC02=y
CONFIG_COMEDI_DAS16M1=y
CONFIG_COMEDI_DAS08_ISA=y
# CONFIG_COMEDI_DAS16 is not set
CONFIG_COMEDI_DAS800=y
CONFIG_COMEDI_DAS1800=y
CONFIG_COMEDI_DAS6402=y
CONFIG_COMEDI_DT2801=y
CONFIG_COMEDI_DT2811=y
CONFIG_COMEDI_DT2814=y
CONFIG_COMEDI_DT2815=y
CONFIG_COMEDI_DT2817=y
CONFIG_COMEDI_DT282X=y
CONFIG_COMEDI_DMM32AT=y
CONFIG_COMEDI_FL512=y
CONFIG_COMEDI_AIO_AIO12_8=y
CONFIG_COMEDI_AIO_IIRO_16=y
# CONFIG_COMEDI_II_PCI20KC is not set
CONFIG_COMEDI_C6XDIGIO=y
CONFIG_COMEDI_MPC624=y
CONFIG_COMEDI_ADQ12B=y
CONFIG_COMEDI_NI_AT_A2150=y
CONFIG_COMEDI_NI_AT_AO=y
# CONFIG_COMEDI_NI_ATMIO is not set
CONFIG_COMEDI_NI_ATMIO16D=y
CONFIG_COMEDI_NI_LABPC_ISA=y
CONFIG_COMEDI_PCMAD=y
CONFIG_COMEDI_PCMDA12=y
CONFIG_COMEDI_PCMMIO=y
CONFIG_COMEDI_PCMUIO=y
CONFIG_COMEDI_MULTIQ3=y
CONFIG_COMEDI_S526=y
CONFIG_COMEDI_PCI_DRIVERS=y
CONFIG_COMEDI_8255_PCI=y
# CONFIG_COMEDI_ADDI_APCI_1032 is not set
# CONFIG_COMEDI_ADDI_APCI_1500 is not set
# CONFIG_COMEDI_ADDI_APCI_1516 is not set
# CONFIG_COMEDI_ADDI_APCI_1564 is not set
# CONFIG_COMEDI_ADDI_APCI_16XX is not set
# CONFIG_COMEDI_ADDI_APCI_2032 is not set
# CONFIG_COMEDI_ADDI_APCI_2200 is not set
# CONFIG_COMEDI_ADDI_APCI_3120 is not set
# CONFIG_COMEDI_ADDI_APCI_3501 is not set
# CONFIG_COMEDI_ADDI_APCI_3XXX is not set
# CONFIG_COMEDI_ADL_PCI6208 is not set
# CONFIG_COMEDI_ADL_PCI7250 is not set
# CONFIG_COMEDI_ADL_PCI7X3X is not set
# CONFIG_COMEDI_ADL_PCI8164 is not set
# CONFIG_COMEDI_ADL_PCI9111 is not set
CONFIG_COMEDI_ADL_PCI9118=y
# CONFIG_COMEDI_ADV_PCI1710 is not set
# CONFIG_COMEDI_ADV_PCI1720 is not set
# CONFIG_COMEDI_ADV_PCI1723 is not set
# CONFIG_COMEDI_ADV_PCI1724 is not set
# CONFIG_COMEDI_ADV_PCI1760 is not set
# CONFIG_COMEDI_ADV_PCI_DIO is not set
# CONFIG_COMEDI_AMPLC_DIO200_PCI is not set
# CONFIG_COMEDI_AMPLC_PC236_PCI is not set
# CONFIG_COMEDI_AMPLC_PC263_PCI is not set
# CONFIG_COMEDI_AMPLC_PCI224 is not set
# CONFIG_COMEDI_AMPLC_PCI230 is not set
# CONFIG_COMEDI_CONTEC_PCI_DIO is not set
# CONFIG_COMEDI_DAS08_PCI is not set
# CONFIG_COMEDI_DT3000 is not set
# CONFIG_COMEDI_DYNA_PCI10XX is not set
# CONFIG_COMEDI_GSC_HPDI is not set
# CONFIG_COMEDI_MF6X4 is not set
# CONFIG_COMEDI_ICP_MULTI is not set
# CONFIG_COMEDI_DAQBOARD2000 is not set
# CONFIG_COMEDI_JR3_PCI is not set
# CONFIG_COMEDI_KE_COUNTER is not set
# CONFIG_COMEDI_CB_PCIDAS64 is not set
# CONFIG_COMEDI_CB_PCIDAS is not set
# CONFIG_COMEDI_CB_PCIDDA is not set
# CONFIG_COMEDI_CB_PCIMDAS is not set
# CONFIG_COMEDI_CB_PCIMDDA is not set
# CONFIG_COMEDI_ME4000 is not set
# CONFIG_COMEDI_ME_DAQ is not set
# CONFIG_COMEDI_NI_6527 is not set
# CONFIG_COMEDI_NI_65XX is not set
# CONFIG_COMEDI_NI_660X is not set
# CONFIG_COMEDI_NI_670X is not set
CONFIG_COMEDI_NI_LABPC_PCI=y
# CONFIG_COMEDI_NI_PCIDIO is not set
# CONFIG_COMEDI_NI_PCIMIO is not set
# CONFIG_COMEDI_RTD520 is not set
# CONFIG_COMEDI_S626 is not set
CONFIG_COMEDI_PCMCIA_DRIVERS=y
# CONFIG_COMEDI_CB_DAS16_CS is not set
# CONFIG_COMEDI_DAS08_CS is not set
CONFIG_COMEDI_NI_DAQ_700_CS=y
# CONFIG_COMEDI_NI_DAQ_DIO24_CS is not set
CONFIG_COMEDI_NI_LABPC_CS=y
# CONFIG_COMEDI_NI_MIO_CS is not set
# CONFIG_COMEDI_QUATECH_DAQP_CS is not set
CONFIG_COMEDI_USB_DRIVERS=y
CONFIG_COMEDI_DT9812=y
CONFIG_COMEDI_NI_USB6501=y
CONFIG_COMEDI_USBDUX=y
CONFIG_COMEDI_USBDUXFAST=y
CONFIG_COMEDI_USBDUXSIGMA=y
CONFIG_COMEDI_VMK80XX=y
CONFIG_COMEDI_8254=y
CONFIG_COMEDI_8255=y
CONFIG_COMEDI_8255_SA=y
CONFIG_COMEDI_KCOMEDILIB=y
CONFIG_COMEDI_AMPLC_DIO200=y
CONFIG_COMEDI_AMPLC_PC236=y
CONFIG_COMEDI_DAS08=y
CONFIG_COMEDI_ISADMA=y
CONFIG_COMEDI_NI_LABPC=y
CONFIG_COMEDI_NI_LABPC_ISADMA=y
# CONFIG_COMEDI_TESTS is not set
# CONFIG_GPIB is not set
CONFIG_STAGING=y
# CONFIG_RTL8723BS is not set

#
# IIO staging drivers
#

#
# Accelerometers
#
# CONFIG_ADIS16203 is not set
# end of Accelerometers

#
# Analog to digital converters
#
# CONFIG_AD7816 is not set
# end of Analog to digital converters

#
# Analog digital bi-direction converters
#
# CONFIG_ADT7316 is not set
# end of Analog digital bi-direction converters

#
# Direct Digital Synthesis
#
# CONFIG_AD9832 is not set
# CONFIG_AD9834 is not set
# end of Direct Digital Synthesis

#
# Network Analyzer, Impedance Converters
#
# CONFIG_AD5933 is not set
# end of Network Analyzer, Impedance Converters
# end of IIO staging drivers

# CONFIG_FB_SM750 is not set
# CONFIG_STAGING_MEDIA is not set
# CONFIG_FB_TFT is not set
# CONFIG_MOST_COMPONENTS is not set
# CONFIG_GREYBUS_AUDIO is not set
# CONFIG_GREYBUS_BOOTROM is not set
# CONFIG_GREYBUS_FIRMWARE is not set
CONFIG_GREYBUS_HID=y
# CONFIG_GREYBUS_LOG is not set
# CONFIG_GREYBUS_LOOPBACK is not set
# CONFIG_GREYBUS_POWER is not set
# CONFIG_GREYBUS_RAW is not set
# CONFIG_GREYBUS_VIBRATOR is not set
CONFIG_GREYBUS_BRIDGED_PHY=y
# CONFIG_GREYBUS_GPIO is not set
# CONFIG_GREYBUS_I2C is not set
# CONFIG_GREYBUS_SDIO is not set
# CONFIG_GREYBUS_SPI is not set
# CONFIG_GREYBUS_UART is not set
CONFIG_GREYBUS_USB=y
# CONFIG_XIL_AXIS_FIFO is not set
# CONFIG_VME_BUS is not set
# CONFIG_GOLDFISH is not set
# CONFIG_CHROME_PLATFORMS is not set
# CONFIG_MELLANOX_PLATFORM is not set
CONFIG_SURFACE_PLATFORMS=y
# CONFIG_SURFACE3_WMI is not set
# CONFIG_SURFACE_3_POWER_OPREGION is not set
# CONFIG_SURFACE_ACPI_NOTIFY is not set
# CONFIG_SURFACE_AGGREGATOR_CDEV is not set
# CONFIG_SURFACE_AGGREGATOR_HUB is not set
CONFIG_SURFACE_AGGREGATOR_REGISTRY=y
# CONFIG_SURFACE_AGGREGATOR_TABLET_SWITCH is not set
# CONFIG_SURFACE_DTX is not set
# CONFIG_SURFACE_GPE is not set
# CONFIG_SURFACE_HOTPLUG is not set
# CONFIG_SURFACE_PLATFORM_PROFILE is not set
# CONFIG_SURFACE_PRO3_BUTTON is not set
CONFIG_SURFACE_AGGREGATOR=y
CONFIG_SURFACE_AGGREGATOR_BUS=y
CONFIG_X86_PLATFORM_DEVICES=y
CONFIG_WMI_BMOF=y
# CONFIG_HUAWEI_WMI is not set
# CONFIG_X86_PLATFORM_DRIVERS_UNIWILL is not set
# CONFIG_MXM_WMI is not set
# CONFIG_NVIDIA_WMI_EC_BACKLIGHT is not set
# CONFIG_XIAOMI_WMI is not set
# CONFIG_REDMI_WMI is not set
# CONFIG_GIGABYTE_WMI is not set
# CONFIG_BITLAND_MIFS_WMI is not set
# CONFIG_ACERHDF is not set
# CONFIG_ACER_WIRELESS is not set
# CONFIG_ACER_WMI is not set

#
# AMD HSMP Driver
#
# CONFIG_AMD_HSMP_ACPI is not set
# CONFIG_AMD_HSMP_PLAT is not set
# end of AMD HSMP Driver

# CONFIG_AMD_PMC is not set
# CONFIG_AMD_HFI is not set
# CONFIG_AMD_3D_VCACHE is not set
# CONFIG_AMD_WBRF is not set
# CONFIG_AMD_ISP_PLATFORM is not set
# CONFIG_ADV_SWBUTTON is not set
# CONFIG_APPLE_GMUX is not set
# CONFIG_ASUS_LAPTOP is not set
# CONFIG_ASUS_WIRELESS is not set
# CONFIG_ASUS_ARMOURY is not set
CONFIG_ASUS_WMI=y
# CONFIG_ASUS_WMI_DEPRECATED_ATTRS is not set
# CONFIG_ASUS_NB_WMI is not set
CONFIG_ASUS_TF103C_DOCK=y
# CONFIG_AYANEO_EC is not set
CONFIG_EEEPC_LAPTOP=y
# CONFIG_EEEPC_WMI is not set
# CONFIG_X86_PLATFORM_DRIVERS_DELL is not set
# CONFIG_AMILO_RFKILL is not set
# CONFIG_FUJITSU_LAPTOP is not set
# CONFIG_FUJITSU_TABLET is not set
# CONFIG_GPD_POCKET_FAN is not set
# CONFIG_X86_PLATFORM_DRIVERS_HP is not set
# CONFIG_WIRELESS_HOTKEY is not set
# CONFIG_IBM_RTL is not set
# CONFIG_SENSORS_HDAPS is not set
# CONFIG_INTEL_ATOMISP2_PM is not set
# CONFIG_INTEL_IFS is not set
# CONFIG_INTEL_SAR_INT1092 is not set
# CONFIG_INTEL_SKL_INT3472 is not set

#
# Intel Speed Select Technology interface support
#
# CONFIG_INTEL_SPEED_SELECT_INTERFACE is not set
# end of Intel Speed Select Technology interface support

# CONFIG_INTEL_WMI_SBL_FW_UPDATE is not set
# CONFIG_INTEL_WMI_THUNDERBOLT is not set

#
# Intel Uncore Frequency Control
#
# CONFIG_INTEL_UNCORE_FREQ_CONTROL is not set
# end of Intel Uncore Frequency Control

# CONFIG_INTEL_HID_EVENT is not set
# CONFIG_INTEL_VBTN is not set
# CONFIG_INTEL_EHL_PSE_IO is not set
# CONFIG_INTEL_INT0002_VGPIO is not set
# CONFIG_INTEL_OAKTRAIL is not set
# CONFIG_INTEL_BXTWC_PMIC_TMU is not set
CONFIG_INTEL_CHTWC_INT33FE=y
CONFIG_INTEL_ISHTP_ECLITE=y
# CONFIG_INTEL_PUNIT_IPC is not set
# CONFIG_INTEL_RST is not set
# CONFIG_INTEL_SMARTCONNECT is not set
# CONFIG_INTEL_TURBO_MAX_3 is not set
# CONFIG_INTEL_VSEC is not set
# CONFIG_IDEAPAD_LAPTOP is not set
# CONFIG_LENOVO_WMI_HOTKEY_UTILITIES is not set
# CONFIG_LENOVO_WMI_CAMERA is not set
# CONFIG_THINKPAD_ACPI is not set
# CONFIG_THINKPAD_LMI is not set
# CONFIG_YOGABOOK is not set
# CONFIG_YT2_1380 is not set
# CONFIG_LENOVO_WMI_GAMEZONE is not set
# CONFIG_LENOVO_WMI_TUNING is not set
# CONFIG_ACPI_QUICKSTART is not set
# CONFIG_MEEGOPAD_ANX7428 is not set
# CONFIG_MSI_EC is not set
# CONFIG_MSI_LAPTOP is not set
# CONFIG_MSI_WMI is not set
# CONFIG_MSI_WMI_PLATFORM is not set
# CONFIG_PCENGINES_APU2 is not set
# CONFIG_PORTWELL_EC is not set
# CONFIG_BARCO_P50_GPIO is not set
# CONFIG_SAMSUNG_GALAXYBOOK is not set
# CONFIG_SAMSUNG_LAPTOP is not set
# CONFIG_SAMSUNG_Q10 is not set
# CONFIG_ACPI_TOSHIBA is not set
# CONFIG_TOSHIBA_BT_RFKILL is not set
# CONFIG_TOSHIBA_HAPS is not set
# CONFIG_TOSHIBA_WMI is not set
# CONFIG_ACPI_CMPC is not set
# CONFIG_COMPAL_LAPTOP is not set
# CONFIG_LG_LAPTOP is not set
# CONFIG_PANASONIC_LAPTOP is not set
# CONFIG_SONY_LAPTOP is not set
# CONFIG_SYSTEM76_ACPI is not set
# CONFIG_TOPSTAR_LAPTOP is not set
# CONFIG_SERIAL_MULTI_INSTANTIATE is not set
# CONFIG_INSPUR_PLATFORM_PROFILE is not set
# CONFIG_DASHARO_ACPI is not set
# CONFIG_INTEL_IPS is not set
CONFIG_INTEL_SCU_IPC=y
# CONFIG_INTEL_SCU_PCI is not set
# CONFIG_INTEL_SCU_PLATFORM is not set
# CONFIG_SIEMENS_SIMATIC_IPC is not set
# CONFIG_SILICOM_PLATFORM is not set
# CONFIG_WINMATE_FM07_KEYS is not set
# CONFIG_OXP_EC is not set
# CONFIG_TUXEDO_NB04_WMI_AB is not set
CONFIG_P2SB=y
CONFIG_ACPI_WMI=y
# CONFIG_ACPI_WMI_LEGACY_DEVICE_NAMES is not set
CONFIG_HAVE_CLK=y
CONFIG_HAVE_CLK_PREPARE=y
CONFIG_COMMON_CLK=y
# CONFIG_LMK04832 is not set
# CONFIG_COMMON_CLK_MAX9485 is not set
# CONFIG_COMMON_CLK_SI5341 is not set
# CONFIG_COMMON_CLK_SI5351 is not set
# CONFIG_COMMON_CLK_SI514 is not set
# CONFIG_COMMON_CLK_SI544 is not set
# CONFIG_COMMON_CLK_SI570 is not set
# CONFIG_COMMON_CLK_CDCE706 is not set
# CONFIG_COMMON_CLK_CDCE925 is not set
# CONFIG_COMMON_CLK_CS2000_CP is not set
# CONFIG_CLK_TWL is not set
# CONFIG_COMMON_CLK_AXI_CLKGEN is not set
# CONFIG_COMMON_CLK_RS9_PCIE is not set
# CONFIG_COMMON_CLK_SI521XX is not set
# CONFIG_COMMON_CLK_VC3 is not set
# CONFIG_COMMON_CLK_VC5 is not set
# CONFIG_COMMON_CLK_VC7 is not set
# CONFIG_COMMON_CLK_FIXED_MMIO is not set
# CONFIG_CLK_LGM_CGU is not set
# CONFIG_XILINX_VCU is not set
# CONFIG_COMMON_CLK_XLNX_CLKWZRD is not set
# CONFIG_HWSPINLOCK is not set

#
# Clock Source drivers
#
CONFIG_CLKEVT_I8253=y
CONFIG_I8253_LOCK=y
CONFIG_CLKBLD_I8253=y
# end of Clock Source drivers

CONFIG_MAILBOX=y
# CONFIG_PLATFORM_MHU is not set
CONFIG_PCC=y
# CONFIG_ALTERA_MBOX is not set
# CONFIG_MAILBOX_TEST is not set
CONFIG_IOMMU_IOVA=y
CONFIG_IOMMU_API=y
CONFIG_IOMMUFD_DRIVER=y
CONFIG_IOMMU_SUPPORT=y

#
# Generic IOMMU Pagetable Support
#
# end of Generic IOMMU Pagetable Support

# CONFIG_IOMMU_DEBUGFS is not set
# CONFIG_IOMMU_DEFAULT_DMA_STRICT is not set
CONFIG_IOMMU_DEFAULT_DMA_LAZY=y
# CONFIG_IOMMU_DEFAULT_PASSTHROUGH is not set
CONFIG_OF_IOMMU=y
CONFIG_IOMMU_DMA=y
CONFIG_IOMMU_SVA=y
CONFIG_IOMMU_IOPF=y
CONFIG_AMD_IOMMU=y
# CONFIG_AMD_IOMMU_IOMMUFD is not set
CONFIG_DMAR_TABLE=y
CONFIG_INTEL_IOMMU=y
CONFIG_INTEL_IOMMU_SVM=y
CONFIG_INTEL_IOMMU_DEFAULT_ON=y
CONFIG_INTEL_IOMMU_SCALABLE_MODE_DEFAULT_ON=y
CONFIG_INTEL_IOMMU_PERF_EVENTS=y
CONFIG_IOMMUFD_DRIVER_CORE=y
CONFIG_IOMMUFD=y
CONFIG_IOMMUFD_TEST=y
CONFIG_IRQ_REMAP=y
# CONFIG_VIRTIO_IOMMU is not set
CONFIG_GENERIC_PT=y
CONFIG_DEBUG_GENERIC_PT=y
CONFIG_IOMMU_PT=y
CONFIG_IOMMU_PT_AMDV1=y
CONFIG_IOMMU_PT_VTDSS=y
# CONFIG_IOMMU_PT_RISCV64 is not set
CONFIG_IOMMU_PT_X86_64=y

#
# Remoteproc drivers
#
# CONFIG_REMOTEPROC is not set
# end of Remoteproc drivers

#
# Rpmsg drivers
#
# CONFIG_RPMSG_QCOM_GLINK_RPM is not set
# CONFIG_RPMSG_VIRTIO is not set
# end of Rpmsg drivers

CONFIG_SOUNDWIRE=y

#
# SoundWire Devices
#
# CONFIG_SOUNDWIRE_AMD is not set
# CONFIG_SOUNDWIRE_INTEL is not set
# CONFIG_SOUNDWIRE_QCOM is not set

#
# SOC (System On Chip) specific Drivers
#

#
# Amlogic SoC drivers
#
# end of Amlogic SoC drivers

#
# Broadcom SoC drivers
#
# end of Broadcom SoC drivers

#
# NXP/Freescale QorIQ SoC drivers
#
# end of NXP/Freescale QorIQ SoC drivers

#
# fujitsu SoC drivers
#
# end of fujitsu SoC drivers

#
# i.MX SoC drivers
#
# end of i.MX SoC drivers

#
# Enable LiteX SoC Builder specific drivers
#
# CONFIG_LITEX_SOC_CONTROLLER is not set
# end of Enable LiteX SoC Builder specific drivers

# CONFIG_WPCM450_SOC is not set

#
# Qualcomm SoC drivers
#
CONFIG_QCOM_QMI_HELPERS=y
# end of Qualcomm SoC drivers

# CONFIG_SOC_TI is not set

#
# Xilinx SoC drivers
#
# end of Xilinx SoC drivers
# end of SOC (System On Chip) specific Drivers

#
# PM Domains
#

#
# Amlogic PM Domains
#
# end of Amlogic PM Domains

#
# Broadcom PM Domains
#
# end of Broadcom PM Domains

#
# i.MX PM Domains
#
# end of i.MX PM Domains

#
# Qualcomm PM Domains
#
# end of Qualcomm PM Domains
# end of PM Domains

# CONFIG_PM_DEVFREQ is not set
CONFIG_EXTCON=y

#
# Extcon Device Drivers
#
# CONFIG_EXTCON_ADC_JACK is not set
# CONFIG_EXTCON_FSA9480 is not set
# CONFIG_EXTCON_GPIO is not set
# CONFIG_EXTCON_INTEL_INT3496 is not set
CONFIG_EXTCON_INTEL_CHT_WC=y
# CONFIG_EXTCON_LC824206XA is not set
# CONFIG_EXTCON_MAX3355 is not set
# CONFIG_EXTCON_MAX14526 is not set
CONFIG_EXTCON_PTN5150=y
# CONFIG_EXTCON_RT8973A is not set
# CONFIG_EXTCON_SM5502 is not set
# CONFIG_EXTCON_USB_GPIO is not set
CONFIG_EXTCON_USBC_TUSB320=y
# CONFIG_MEMORY is not set
CONFIG_IIO=y
CONFIG_IIO_BUFFER=y
# CONFIG_IIO_BUFFER_CB is not set
# CONFIG_IIO_BUFFER_DMA is not set
# CONFIG_IIO_BUFFER_DMAENGINE is not set
# CONFIG_IIO_BUFFER_HW_CONSUMER is not set
CONFIG_IIO_KFIFO_BUF=y
CONFIG_IIO_TRIGGERED_BUFFER=y
# CONFIG_IIO_CONFIGFS is not set
CONFIG_IIO_TRIGGER=y
CONFIG_IIO_CONSUMERS_PER_TRIGGER=2
# CONFIG_IIO_SW_DEVICE is not set
# CONFIG_IIO_SW_TRIGGER is not set
# CONFIG_IIO_TRIGGERED_EVENT is not set

#
# Accelerometers
#
# CONFIG_ADIS16201 is not set
# CONFIG_ADIS16209 is not set
# CONFIG_ADXL313_I2C is not set
# CONFIG_ADXL313_SPI is not set
# CONFIG_ADXL345_I2C is not set
# CONFIG_ADXL345_SPI is not set
# CONFIG_ADXL355_I2C is not set
# CONFIG_ADXL355_SPI is not set
# CONFIG_ADXL367_SPI is not set
# CONFIG_ADXL367_I2C is not set
# CONFIG_ADXL372_SPI is not set
# CONFIG_ADXL372_I2C is not set
# CONFIG_ADXL380_SPI is not set
# CONFIG_ADXL380_I2C is not set
# CONFIG_BMA180 is not set
# CONFIG_BMA220 is not set
# CONFIG_BMA400 is not set
# CONFIG_BMC150_ACCEL is not set
# CONFIG_BMI088_ACCEL is not set
# CONFIG_DA280 is not set
# CONFIG_DA311 is not set
# CONFIG_DMARD06 is not set
# CONFIG_DMARD09 is not set
# CONFIG_DMARD10 is not set
# CONFIG_FXLS8962AF_I2C is not set
# CONFIG_FXLS8962AF_SPI is not set
CONFIG_HID_SENSOR_ACCEL_3D=y
# CONFIG_IIO_ST_ACCEL_3AXIS is not set
# CONFIG_IIO_KX022A_SPI is not set
# CONFIG_IIO_KX022A_I2C is not set
# CONFIG_KXSD9 is not set
# CONFIG_KXCJK1013 is not set
# CONFIG_MC3230 is not set
# CONFIG_MMA7455_I2C is not set
# CONFIG_MMA7455_SPI is not set
# CONFIG_MMA7660 is not set
# CONFIG_MMA8452 is not set
# CONFIG_MMA9551 is not set
# CONFIG_MMA9553 is not set
# CONFIG_MSA311 is not set
# CONFIG_MXC4005 is not set
# CONFIG_MXC6255 is not set
# CONFIG_SCA3000 is not set
# CONFIG_SCA3300 is not set
# CONFIG_STK8312 is not set
# CONFIG_STK8BA50 is not set
# end of Accelerometers

#
# Analog to digital converters
#
# CONFIG_AD4000 is not set
# CONFIG_AD4080 is not set
# CONFIG_AD4130 is not set
# CONFIG_AD4134 is not set
# CONFIG_AD4170_4 is not set
# CONFIG_AD4691 is not set
# CONFIG_AD4695 is not set
# CONFIG_AD7091R5 is not set
# CONFIG_AD7091R8 is not set
# CONFIG_AD7124 is not set
# CONFIG_AD7173 is not set
# CONFIG_AD7191 is not set
# CONFIG_AD7192 is not set
# CONFIG_AD7266 is not set
# CONFIG_AD7280 is not set
# CONFIG_AD7291 is not set
# CONFIG_AD7292 is not set
# CONFIG_AD7298 is not set
# CONFIG_AD7380 is not set
# CONFIG_AD7476 is not set
# CONFIG_AD7606_IFACE_PARALLEL is not set
# CONFIG_AD7606_IFACE_SPI is not set
# CONFIG_AD7766 is not set
# CONFIG_AD7768_1 is not set
# CONFIG_AD7779 is not set
# CONFIG_AD7780 is not set
# CONFIG_AD7791 is not set
# CONFIG_AD7793 is not set
# CONFIG_AD7887 is not set
# CONFIG_AD7923 is not set
# CONFIG_AD7944 is not set
# CONFIG_AD7949 is not set
# CONFIG_AD799X is not set
# CONFIG_AD9467 is not set
# CONFIG_ADE9000 is not set
# CONFIG_CC10001_ADC is not set
CONFIG_DLN2_ADC=y
# CONFIG_ENVELOPE_DETECTOR is not set
# CONFIG_GEHC_PMC_ADC is not set
# CONFIG_HI8435 is not set
# CONFIG_HX711 is not set
# CONFIG_INA2XX_ADC is not set
# CONFIG_LTC2309 is not set
# CONFIG_LTC2471 is not set
# CONFIG_LTC2485 is not set
# CONFIG_LTC2496 is not set
# CONFIG_LTC2497 is not set
# CONFIG_MAX1027 is not set
# CONFIG_MAX11100 is not set
# CONFIG_MAX1118 is not set
# CONFIG_MAX11205 is not set
# CONFIG_MAX11410 is not set
# CONFIG_MAX1241 is not set
# CONFIG_MAX1363 is not set
# CONFIG_MAX14001 is not set
# CONFIG_MAX34408 is not set
# CONFIG_MAX9611 is not set
# CONFIG_MCP320X is not set
# CONFIG_MCP3422 is not set
# CONFIG_MCP3564 is not set
# CONFIG_MCP3911 is not set
# CONFIG_MEDIATEK_MT6360_ADC is not set
# CONFIG_MEDIATEK_MT6370_ADC is not set
# CONFIG_NAU7802 is not set
# CONFIG_NCT7201 is not set
# CONFIG_PAC1921 is not set
# CONFIG_PAC1934 is not set
# CONFIG_ROHM_BD79112 is not set
# CONFIG_ROHM_BD79124 is not set
# CONFIG_RICHTEK_RTQ6056 is not set
# CONFIG_SD_ADC_MODULATOR is not set
# CONFIG_TI_ADC081C is not set
# CONFIG_TI_ADC0832 is not set
# CONFIG_TI_ADC084S021 is not set
# CONFIG_TI_ADC108S102 is not set
# CONFIG_TI_ADC12138 is not set
# CONFIG_TI_ADC128S052 is not set
# CONFIG_TI_ADC161S626 is not set
# CONFIG_TI_ADS1015 is not set
# CONFIG_TI_ADS1018 is not set
# CONFIG_TI_ADS1100 is not set
# CONFIG_TI_ADS1119 is not set
# CONFIG_TI_ADS124S08 is not set
# CONFIG_TI_ADS1298 is not set
# CONFIG_TI_ADS131E08 is not set
# CONFIG_TI_ADS131M02 is not set
# CONFIG_TI_ADS7138 is not set
# CONFIG_TI_ADS7924 is not set
# CONFIG_TI_ADS7950 is not set
# CONFIG_TI_ADS8344 is not set
# CONFIG_TI_ADS8688 is not set
# CONFIG_TI_LMP92064 is not set
# CONFIG_TI_TLC4541 is not set
# CONFIG_TI_TSC2046 is not set
# CONFIG_TWL4030_MADC is not set
# CONFIG_TWL6030_GPADC is not set
# CONFIG_VF610_ADC is not set
CONFIG_VIPERBOARD_ADC=y
# CONFIG_XILINX_XADC is not set
# end of Analog to digital converters

#
# Analog to digital and digital to analog converters
#
# CONFIG_AD74115 is not set
# CONFIG_AD74413R is not set
# end of Analog to digital and digital to analog converters

#
# Analog Front Ends
#
# CONFIG_IIO_RESCALE is not set
# end of Analog Front Ends

#
# Amplifiers
#
# CONFIG_AD8366 is not set
# CONFIG_ADA4250 is not set
# CONFIG_ADL8113 is not set
# CONFIG_HMC425 is not set
# end of Amplifiers

#
# Capacitance to digital converters
#
# CONFIG_AD7150 is not set
# CONFIG_AD7746 is not set
# end of Capacitance to digital converters

#
# Chemical Sensors
#
# CONFIG_AOSONG_AGS02MA is not set
# CONFIG_ATLAS_PH_SENSOR is not set
# CONFIG_ATLAS_EZO_SENSOR is not set
# CONFIG_BME680 is not set
# CONFIG_CCS811 is not set
# CONFIG_ENS160 is not set
# CONFIG_IAQCORE is not set
# CONFIG_MHZ19B is not set
# CONFIG_PMS7003 is not set
# CONFIG_SCD30_CORE is not set
# CONFIG_SCD4X is not set
# CONFIG_SEN0322 is not set
# CONFIG_SENSIRION_SGP30 is not set
# CONFIG_SENSIRION_SGP40 is not set
# CONFIG_SPS30_I2C is not set
# CONFIG_SPS30_SERIAL is not set
# CONFIG_SENSEAIR_SUNRISE_CO2 is not set
# CONFIG_VZ89X is not set
# end of Chemical Sensors

#
# Hid Sensor IIO Common
#
CONFIG_HID_SENSOR_IIO_COMMON=y
CONFIG_HID_SENSOR_IIO_TRIGGER=y
# end of Hid Sensor IIO Common

#
# IIO SCMI Sensors
#
# end of IIO SCMI Sensors

#
# SSP Sensor Common
#
# CONFIG_IIO_SSP_SENSORHUB is not set
# end of SSP Sensor Common

#
# Digital to analog converters
#
# CONFIG_AD3530R is not set
# CONFIG_AD3552R_HS is not set
# CONFIG_AD3552R is not set
# CONFIG_AD5064 is not set
# CONFIG_AD5360 is not set
# CONFIG_AD5380 is not set
# CONFIG_AD5421 is not set
# CONFIG_AD5446_SPI is not set
# CONFIG_AD5446_I2C is not set
# CONFIG_AD5449 is not set
# CONFIG_AD5592R is not set
# CONFIG_AD5593R is not set
# CONFIG_AD5504 is not set
# CONFIG_AD5624R_SPI is not set
# CONFIG_AD5706R is not set
# CONFIG_AD9739A is not set
# CONFIG_LTC2688 is not set
# CONFIG_AD5686_SPI is not set
# CONFIG_AD5696_I2C is not set
# CONFIG_AD5755 is not set
# CONFIG_AD5758 is not set
# CONFIG_AD5761 is not set
# CONFIG_AD5764 is not set
# CONFIG_AD5766 is not set
# CONFIG_AD5770R is not set
# CONFIG_AD5791 is not set
# CONFIG_AD7293 is not set
# CONFIG_AD7303 is not set
# CONFIG_AD8460 is not set
# CONFIG_AD8801 is not set
# CONFIG_BD79703 is not set
# CONFIG_CIO_DAC is not set
# CONFIG_DPOT_DAC is not set
# CONFIG_DS4424 is not set
# CONFIG_LTC1660 is not set
# CONFIG_LTC2632 is not set
# CONFIG_LTC2664 is not set
# CONFIG_M62332 is not set
# CONFIG_MAX517 is not set
# CONFIG_MAX22007 is not set
# CONFIG_MAX5522 is not set
# CONFIG_MAX5821 is not set
# CONFIG_MCP4725 is not set
# CONFIG_MCP4728 is not set
# CONFIG_MCP47FEB02 is not set
# CONFIG_MCP4821 is not set
# CONFIG_MCP4922 is not set
# CONFIG_TI_DAC082S085 is not set
# CONFIG_TI_DAC5571 is not set
# CONFIG_TI_DAC7311 is not set
# CONFIG_TI_DAC7612 is not set
# CONFIG_VF610_DAC is not set
# end of Digital to analog converters

#
# IIO dummy driver
#
# end of IIO dummy driver

#
# Filters
#
# CONFIG_ADMV8818 is not set
# end of Filters

#
# Frequency Synthesizers DDS/PLL
#

#
# Clock Generator/Distribution
#
# CONFIG_AD9523 is not set
# end of Clock Generator/Distribution

#
# Phase-Locked Loop (PLL) frequency synthesizers
#
# CONFIG_ADF4350 is not set
# CONFIG_ADF4371 is not set
# CONFIG_ADF4377 is not set
# CONFIG_ADMFM2000 is not set
# CONFIG_ADMV1013 is not set
# CONFIG_ADMV1014 is not set
# CONFIG_ADMV4420 is not set
# CONFIG_ADRF6780 is not set
# end of Phase-Locked Loop (PLL) frequency synthesizers
# end of Frequency Synthesizers DDS/PLL

#
# Digital gyroscope sensors
#
# CONFIG_ADIS16080 is not set
# CONFIG_ADIS16130 is not set
# CONFIG_ADIS16136 is not set
# CONFIG_ADIS16260 is not set
# CONFIG_ADXRS290 is not set
# CONFIG_ADXRS450 is not set
# CONFIG_BMG160 is not set
# CONFIG_FXAS21002C is not set
CONFIG_HID_SENSOR_GYRO_3D=y
# CONFIG_MPU3050_I2C is not set
# CONFIG_IIO_ST_GYRO_3AXIS is not set
# CONFIG_ITG3200 is not set
# end of Digital gyroscope sensors

#
# Health Sensors
#

#
# Heart Rate Monitors
#
# CONFIG_AFE4403 is not set
# CONFIG_AFE4404 is not set
# CONFIG_MAX30100 is not set
# CONFIG_MAX30102 is not set
# end of Heart Rate Monitors
# end of Health Sensors

#
# Humidity sensors
#
# CONFIG_AM2315 is not set
# CONFIG_DHT11 is not set
# CONFIG_ENS210 is not set
# CONFIG_HDC100X is not set
# CONFIG_HDC2010 is not set
# CONFIG_HDC3020 is not set
CONFIG_HID_SENSOR_HUMIDITY=y
# CONFIG_HTS221 is not set
# CONFIG_HTU21 is not set
# CONFIG_SI7005 is not set
# CONFIG_SI7020 is not set
# end of Humidity sensors

#
# Inertial measurement units
#
# CONFIG_ADIS16400 is not set
# CONFIG_ADIS16460 is not set
# CONFIG_ADIS16475 is not set
# CONFIG_ADIS16480 is not set
# CONFIG_ADIS16550 is not set
# CONFIG_BMI160_I2C is not set
# CONFIG_BMI160_SPI is not set
# CONFIG_BMI270_I2C is not set
# CONFIG_BMI270_SPI is not set
# CONFIG_BMI323_I2C is not set
# CONFIG_BMI323_SPI is not set
# CONFIG_BOSCH_BNO055_SERIAL is not set
# CONFIG_BOSCH_BNO055_I2C is not set
# CONFIG_FXOS8700_I2C is not set
# CONFIG_FXOS8700_SPI is not set
# CONFIG_KMX61 is not set
# CONFIG_INV_ICM42600_I2C is not set
# CONFIG_INV_ICM42600_SPI is not set
# CONFIG_INV_ICM45600_I2C is not set
# CONFIG_INV_ICM45600_SPI is not set
# CONFIG_INV_MPU6050_I2C is not set
# CONFIG_INV_MPU6050_SPI is not set
# CONFIG_SMI240 is not set
# CONFIG_SMI330_I2C is not set
# CONFIG_SMI330_SPI is not set
# CONFIG_IIO_ST_LSM6DSX is not set
# CONFIG_IIO_ST_LSM9DS0 is not set
# end of Inertial measurement units

#
# Light sensors
#
# CONFIG_ACPI_ALS is not set
# CONFIG_ADJD_S311 is not set
# CONFIG_ADUX1020 is not set
# CONFIG_AL3000A is not set
# CONFIG_AL3010 is not set
# CONFIG_AL3320A is not set
# CONFIG_APDS9160 is not set
# CONFIG_APDS9300 is not set
# CONFIG_APDS9306 is not set
# CONFIG_APDS9960 is not set
# CONFIG_APDS9999 is not set
# CONFIG_AS73211 is not set
# CONFIG_BH1745 is not set
# CONFIG_BH1750 is not set
# CONFIG_BH1780 is not set
# CONFIG_CM32181 is not set
# CONFIG_CM3232 is not set
# CONFIG_CM3323 is not set
# CONFIG_CM3605 is not set
# CONFIG_CM36651 is not set
# CONFIG_GP2AP002 is not set
# CONFIG_GP2AP020A00F is not set
# CONFIG_SENSORS_ISL29018 is not set
# CONFIG_SENSORS_ISL29028 is not set
# CONFIG_ISL29125 is not set
# CONFIG_ISL76682 is not set
CONFIG_HID_SENSOR_ALS=y
CONFIG_HID_SENSOR_PROX=y
# CONFIG_JSA1212 is not set
# CONFIG_ROHM_BU27034 is not set
# CONFIG_RPR0521 is not set
# CONFIG_LTR390 is not set
# CONFIG_LTR501 is not set
# CONFIG_LTRF216A is not set
# CONFIG_LV0104CS is not set
# CONFIG_MAX44000 is not set
# CONFIG_MAX44009 is not set
# CONFIG_NOA1305 is not set
# CONFIG_OPT3001 is not set
# CONFIG_OPT4001 is not set
# CONFIG_OPT4060 is not set
# CONFIG_PA12203001 is not set
# CONFIG_SI1133 is not set
# CONFIG_SI1145 is not set
# CONFIG_STK3310 is not set
# CONFIG_ST_UVIS25 is not set
# CONFIG_TCS3414 is not set
# CONFIG_TCS3472 is not set
# CONFIG_SENSORS_TSL2563 is not set
# CONFIG_TSL2583 is not set
# CONFIG_TSL2591 is not set
# CONFIG_TSL2772 is not set
# CONFIG_TSL4531 is not set
# CONFIG_US5182D is not set
# CONFIG_VCNL4000 is not set
# CONFIG_VCNL4035 is not set
# CONFIG_VEML3235 is not set
# CONFIG_VEML3328 is not set
# CONFIG_VEML6030 is not set
# CONFIG_VEML6040 is not set
# CONFIG_VEML6046X00 is not set
# CONFIG_VEML6070 is not set
# CONFIG_VEML6075 is not set
# CONFIG_VL6180 is not set
# CONFIG_ZOPT2201 is not set
# end of Light sensors

#
# Magnetometer sensors
#
# CONFIG_AF8133J is not set
# CONFIG_AK8974 is not set
# CONFIG_AK8975 is not set
# CONFIG_AK09911 is not set
# CONFIG_ALS31300 is not set
# CONFIG_BMC150_MAGN_I2C is not set
# CONFIG_BMC150_MAGN_SPI is not set
# CONFIG_MAG3110 is not set
CONFIG_HID_SENSOR_MAGNETOMETER_3D=y
# CONFIG_MMC35240 is not set
# CONFIG_MMC5633 is not set
# CONFIG_MMC5983 is not set
# CONFIG_IIO_ST_MAGN_3AXIS is not set
# CONFIG_INFINEON_TLV493D is not set
# CONFIG_SENSORS_HMC5843_I2C is not set
# CONFIG_SENSORS_HMC5843_SPI is not set
# CONFIG_SENSORS_RM3100_I2C is not set
# CONFIG_SENSORS_RM3100_SPI is not set
# CONFIG_SI7210 is not set
# CONFIG_TI_TMAG5273 is not set
# CONFIG_YAMAHA_YAS530 is not set
# end of Magnetometer sensors

#
# Multiplexers
#
# CONFIG_IIO_MUX is not set
# end of Multiplexers

#
# Inclinometer sensors
#
CONFIG_HID_SENSOR_INCLINOMETER_3D=y
CONFIG_HID_SENSOR_DEVICE_ROTATION=y
# end of Inclinometer sensors

#
# Triggers - standalone
#
# CONFIG_IIO_SYSFS_TRIGGER is not set
# end of Triggers - standalone

#
# Linear and angular position sensors
#
CONFIG_HID_SENSOR_CUSTOM_INTEL_HINGE=y
# end of Linear and angular position sensors

#
# Digital potentiometers
#
# CONFIG_AD5110 is not set
# CONFIG_AD5272 is not set
# CONFIG_DS1803 is not set
# CONFIG_MAX5432 is not set
# CONFIG_MAX5481 is not set
# CONFIG_MAX5487 is not set
# CONFIG_MCP4018 is not set
# CONFIG_MCP4131 is not set
# CONFIG_MCP4531 is not set
# CONFIG_MCP41010 is not set
# CONFIG_TPL0102 is not set
# CONFIG_X9250 is not set
# end of Digital potentiometers

#
# Digital potentiostats
#
# CONFIG_LMP91000 is not set
# end of Digital potentiostats

#
# Pressure sensors
#
# CONFIG_ABP060MG is not set
# CONFIG_ABP2030PA_I2C is not set
# CONFIG_ABP2030PA_SPI is not set
# CONFIG_ROHM_BM1390 is not set
# CONFIG_BMP280 is not set
# CONFIG_DLHL60D is not set
# CONFIG_DPS310 is not set
CONFIG_HID_SENSOR_PRESS=y
# CONFIG_HP03 is not set
# CONFIG_HSC030PA is not set
# CONFIG_ICP10100 is not set
# CONFIG_MPL115_I2C is not set
# CONFIG_MPL115_SPI is not set
# CONFIG_MPL3115 is not set
# CONFIG_MPRLS0025PA_I2C is not set
# CONFIG_MPRLS0025PA_SPI is not set
# CONFIG_MS5611 is not set
# CONFIG_MS5637 is not set
# CONFIG_SDP500 is not set
# CONFIG_IIO_ST_PRESS is not set
# CONFIG_T5403 is not set
# CONFIG_HP206C is not set
# CONFIG_ZPA2326 is not set
# CONFIG_ADP810 is not set
# end of Pressure sensors

#
# Lightning sensors
#
# CONFIG_AS3935 is not set
# end of Lightning sensors

#
# Proximity and distance sensors
#
# CONFIG_D3323AA is not set
# CONFIG_HX9023S is not set
# CONFIG_IRSD200 is not set
# CONFIG_ISL29501 is not set
# CONFIG_LIDAR_LITE_V2 is not set
# CONFIG_MB1232 is not set
# CONFIG_PING is not set
# CONFIG_RFD77402 is not set
# CONFIG_SRF04 is not set
# CONFIG_SX9310 is not set
# CONFIG_SX9324 is not set
# CONFIG_SX9360 is not set
# CONFIG_SX9500 is not set
# CONFIG_SRF08 is not set
# CONFIG_VCNL3020 is not set
# CONFIG_VL53L0X_I2C is not set
# CONFIG_VL53L1X_I2C is not set
# CONFIG_AW96103 is not set
# end of Proximity and distance sensors

#
# Resolver to digital converters
#
# CONFIG_AD2S90 is not set
# CONFIG_AD2S1200 is not set
# CONFIG_AD2S1210 is not set
# end of Resolver to digital converters

#
# Temperature sensors
#
# CONFIG_LTC2983 is not set
# CONFIG_MAXIM_THERMOCOUPLE is not set
CONFIG_HID_SENSOR_TEMP=y
# CONFIG_MLX90614 is not set
# CONFIG_MLX90632 is not set
# CONFIG_MLX90635 is not set
# CONFIG_TMP006 is not set
# CONFIG_TMP007 is not set
# CONFIG_TMP117 is not set
# CONFIG_TSYS01 is not set
# CONFIG_TSYS02D is not set
# CONFIG_MAX30208 is not set
# CONFIG_MAX31856 is not set
# CONFIG_MAX31865 is not set
# CONFIG_MCP9600 is not set
# end of Temperature sensors

# CONFIG_NTB is not set
# CONFIG_PWM is not set

#
# IRQ chip support
#
CONFIG_IRQCHIP=y
CONFIG_IRQ_MSI_LIB=y
# CONFIG_AL_FIC is not set
# CONFIG_XILINX_INTC is not set
# end of IRQ chip support

# CONFIG_IPACK_BUS is not set
CONFIG_RESET_CONTROLLER=y
# CONFIG_RESET_GPIO is not set
# CONFIG_RESET_INTEL_GW is not set
# CONFIG_RESET_SIMPLE is not set
# CONFIG_RESET_TI_SYSCON is not set
# CONFIG_RESET_TI_TPS380X is not set

#
# PHY Subsystem
#
CONFIG_GENERIC_PHY=y
# CONFIG_PHY_CAN_TRANSCEIVER is not set
CONFIG_PHY_GOOGLE_USB=y
CONFIG_USB_LGM_PHY=y
# CONFIG_PHY_NXP_PTN3222 is not set
# CONFIG_PHY_NXP_TJA1145 is not set

#
# PHY drivers for Broadcom platforms
#
# CONFIG_BCM_KONA_USB2_PHY is not set
# end of PHY drivers for Broadcom platforms

# CONFIG_PHY_CADENCE_TORRENT is not set
# CONFIG_PHY_CADENCE_DPHY is not set
# CONFIG_PHY_CADENCE_DPHY_RX is not set
# CONFIG_PHY_CADENCE_SIERRA is not set
# CONFIG_PHY_CADENCE_SALVO is not set
# CONFIG_PHY_INTEL_LGM_COMBO is not set
# CONFIG_PHY_INTEL_LGM_EMMC is not set
# CONFIG_PHY_PXA_28NM_HSIC is not set
# CONFIG_PHY_PXA_28NM_USB2 is not set
CONFIG_PHY_CPCAP_USB=y
# CONFIG_PHY_MAPPHONE_MDM6600 is not set
# CONFIG_PHY_OCELOT_SERDES is not set
CONFIG_PHY_QCOM_USB_HS=y
CONFIG_PHY_QCOM_USB_HSIC=y
CONFIG_PHY_SAMSUNG_USB2=y
# CONFIG_PHY_TI_DS125DF111 is not set
CONFIG_PHY_TUSB1210=y
# end of PHY Subsystem

# CONFIG_POWERCAP is not set
# CONFIG_MCB is not set

#
# Performance monitor support
#
# CONFIG_DWC_PCIE_PMU is not set
# end of Performance monitor support

CONFIG_RAS=y
CONFIG_USB4=y
CONFIG_USB4_CONFIGFS=y
# CONFIG_USB4_DEBUGFS_WRITE is not set
# CONFIG_USB4_DMA_TEST is not set
# CONFIG_USB4_STREAM is not set

#
# Android
#
CONFIG_ANDROID_BINDER_IPC=y
CONFIG_ANDROID_BINDERFS=y
CONFIG_ANDROID_BINDER_DEVICES="binder0,binder1"
# end of Android

CONFIG_LIBNVDIMM=y
CONFIG_BLK_DEV_PMEM=y
CONFIG_ND_CLAIM=y
CONFIG_ND_BTT=y
CONFIG_BTT=y
CONFIG_ND_PFN=y
CONFIG_NVDIMM_PFN=y
CONFIG_NVDIMM_DAX=y
CONFIG_OF_PMEM=y
# CONFIG_RAMDAX is not set
CONFIG_NVDIMM_KEYS=y
# CONFIG_NVDIMM_SECURITY_TEST is not set
CONFIG_DAX=y
CONFIG_DEV_DAX=y
# CONFIG_DEV_DAX_PMEM is not set
CONFIG_DEV_DAX_FSDEV=y
# CONFIG_DEV_DAX_KMEM is not set
CONFIG_NVMEM=y
CONFIG_NVMEM_SYSFS=y
CONFIG_NVMEM_LAYOUTS=y

#
# Layout Types
#
# CONFIG_NVMEM_LAYOUT_SL28_VPD is not set
# CONFIG_NVMEM_LAYOUT_ONIE_TLV is not set
# CONFIG_NVMEM_LAYOUT_U_BOOT_ENV is not set
# end of Layout Types

# CONFIG_NVMEM_RMEM is not set
# CONFIG_NVMEM_U_BOOT_ENV is not set

#
# HW tracing support
#
# CONFIG_STM is not set
# CONFIG_INTEL_TH is not set
# end of HW tracing support

# CONFIG_FPGA is not set
# CONFIG_FSI is not set
CONFIG_TEE=y
CONFIG_TEE_DMABUF_HEAPS=y
CONFIG_OPTEE_STATIC_PROTMEM_POOL=y
# CONFIG_MUX_CORE is not set
# CONFIG_SIOX is not set
# CONFIG_SLIMBUS is not set
# CONFIG_INTERCONNECT is not set
CONFIG_COUNTER=y
# CONFIG_INTEL_QEP is not set
# CONFIG_INTERRUPT_CNT is not set
CONFIG_MOST=y
CONFIG_MOST_USB_HDM=y
# CONFIG_MOST_CDEV is not set
# CONFIG_MOST_SND is not set
# CONFIG_PECI is not set
# CONFIG_HTE is not set
# end of Device Drivers

#
# File systems
#
CONFIG_DCACHE_WORD_ACCESS=y
CONFIG_VALIDATE_FS_PARSER=y
CONFIG_FS_IOMAP=y
CONFIG_FS_STACK=y
CONFIG_BUFFER_HEAD=y
CONFIG_LEGACY_DIRECT_IO=y
# CONFIG_EXT2_FS is not set
CONFIG_EXT4_FS=y
CONFIG_EXT4_USE_FOR_EXT2=y
CONFIG_EXT4_FS_POSIX_ACL=y
CONFIG_EXT4_FS_SECURITY=y
# CONFIG_EXT4_DEBUG is not set
CONFIG_JBD2=y
# CONFIG_JBD2_DEBUG is not set
CONFIG_FS_MBCACHE=y
CONFIG_JFS_FS=y
CONFIG_JFS_POSIX_ACL=y
CONFIG_JFS_SECURITY=y
CONFIG_JFS_DEBUG=y
# CONFIG_JFS_STATISTICS is not set
CONFIG_XFS_FS=y
# CONFIG_XFS_SUPPORT_V4 is not set
# CONFIG_XFS_SUPPORT_ASCII_CI is not set
CONFIG_XFS_QUOTA=y
CONFIG_XFS_POSIX_ACL=y
CONFIG_XFS_RT=y
CONFIG_XFS_DRAIN_INTENTS=y
CONFIG_XFS_LIVE_HOOKS=y
CONFIG_XFS_MEMORY_BUFS=y
CONFIG_XFS_BTREE_IN_MEM=y
CONFIG_XFS_ONLINE_SCRUB=y
# CONFIG_XFS_ONLINE_SCRUB_STATS is not set
CONFIG_XFS_ONLINE_REPAIR=y
# CONFIG_XFS_WARN is not set
# CONFIG_XFS_DEBUG is not set
CONFIG_GFS2_FS=y
CONFIG_GFS2_FS_LOCKING_DLM=y
CONFIG_OCFS2_FS=y
CONFIG_OCFS2_FS_O2CB=y
CONFIG_OCFS2_FS_USERSPACE_CLUSTER=y
CONFIG_OCFS2_FS_STATS=y
# CONFIG_OCFS2_DEBUG_MASKLOG is not set
CONFIG_OCFS2_DEBUG_FS=y
CONFIG_BTRFS_FS=y
CONFIG_BTRFS_FS_POSIX_ACL=y
# CONFIG_BTRFS_FS_RUN_SANITY_TESTS is not set
# CONFIG_BTRFS_DEBUG is not set
CONFIG_BTRFS_ASSERT=y
# CONFIG_BTRFS_EXPERIMENTAL is not set
CONFIG_NILFS2_FS=y
CONFIG_F2FS_FS=y
CONFIG_F2FS_STAT_FS=y
CONFIG_F2FS_FS_XATTR=y
CONFIG_F2FS_FS_POSIX_ACL=y
CONFIG_F2FS_FS_SECURITY=y
CONFIG_F2FS_CHECK_FS=y
CONFIG_F2FS_FAULT_INJECTION=y
CONFIG_F2FS_FS_COMPRESSION=y
CONFIG_F2FS_FS_LZO=y
CONFIG_F2FS_FS_LZORLE=y
CONFIG_F2FS_FS_LZ4=y
CONFIG_F2FS_FS_LZ4HC=y
CONFIG_F2FS_FS_ZSTD=y
# CONFIG_F2FS_IOSTAT is not set
# CONFIG_F2FS_UNFAIR_RWSEM is not set
CONFIG_ZONEFS_FS=y
CONFIG_FS_DAX=y
CONFIG_FS_DAX_PMD=y
CONFIG_FS_POSIX_ACL=y
CONFIG_EXPORTFS=y
CONFIG_EXPORTFS_BLOCK_OPS=y
CONFIG_FILE_LOCKING=y
CONFIG_FS_ENCRYPTION=y
CONFIG_FS_ENCRYPTION_ALGS=y
CONFIG_FS_ENCRYPTION_INLINE_CRYPT=y
CONFIG_FS_VERITY=y
CONFIG_FS_VERITY_BUILTIN_SIGNATURES=y
CONFIG_FSNOTIFY=y
CONFIG_DNOTIFY=y
CONFIG_INOTIFY_USER=y
CONFIG_FANOTIFY=y
CONFIG_FANOTIFY_ACCESS_PERMISSIONS=y
CONFIG_QUOTA=y
CONFIG_QUOTA_NETLINK_INTERFACE=y
# CONFIG_QUOTA_DEBUG is not set
CONFIG_QUOTA_TREE=y
# CONFIG_QFMT_V1 is not set
CONFIG_QFMT_V2=y
CONFIG_QUOTACTL=y
CONFIG_AUTOFS_FS=y
CONFIG_FUSE_FS=y
CONFIG_CUSE=y
CONFIG_VIRTIO_FS=y
CONFIG_FUSE_DAX=y
# CONFIG_FUSE_PASSTHROUGH is not set
CONFIG_FUSE_IO_URING=y
CONFIG_OVERLAY_FS=y
CONFIG_OVERLAY_FS_REDIRECT_DIR=y
CONFIG_OVERLAY_FS_REDIRECT_ALWAYS_FOLLOW=y
CONFIG_OVERLAY_FS_INDEX=y
# CONFIG_OVERLAY_FS_NFS_EXPORT is not set
# CONFIG_OVERLAY_FS_XINO_AUTO is not set
# CONFIG_OVERLAY_FS_METACOPY is not set
CONFIG_OVERLAY_FS_DEBUG=y

#
# Caches
#
CONFIG_NETFS_SUPPORT=y
# CONFIG_NETFS_STATS is not set
# CONFIG_NETFS_DEBUG is not set
CONFIG_FSCACHE=y
# CONFIG_FSCACHE_STATS is not set
CONFIG_CACHEFILES=y
# CONFIG_CACHEFILES_DEBUG is not set
# CONFIG_CACHEFILES_ERROR_INJECTION is not set
# CONFIG_CACHEFILES_ONDEMAND is not set
# end of Caches

#
# CD-ROM/DVD Filesystems
#
CONFIG_ISO9660_FS=y
CONFIG_JOLIET=y
CONFIG_ZISOFS=y
CONFIG_UDF_FS=y
# end of CD-ROM/DVD Filesystems

#
# DOS/FAT/EXFAT/NT Filesystems
#
CONFIG_FAT_FS=y
CONFIG_MSDOS_FS=y
CONFIG_VFAT_FS=y
CONFIG_FAT_DEFAULT_CODEPAGE=437
CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
# CONFIG_FAT_DEFAULT_UTF8 is not set
CONFIG_EXFAT_FS=y
CONFIG_EXFAT_DEFAULT_IOCHARSET="utf8"
# CONFIG_NTFS_FS is not set
CONFIG_NTFS3_FS=y
# CONFIG_NTFS3_64BIT_CLUSTER is not set
CONFIG_NTFS3_LZX_XPRESS=y
CONFIG_NTFS3_FS_POSIX_ACL=y
# end of DOS/FAT/EXFAT/NT Filesystems

#
# Pseudo filesystems
#
CONFIG_PROC_FS=y
CONFIG_PROC_KCORE=y
CONFIG_PROC_VMCORE=y
# CONFIG_PROC_VMCORE_DEVICE_DUMP is not set
CONFIG_PROC_SYSCTL=y
CONFIG_PROC_PAGE_MONITOR=y
CONFIG_PROC_CHILDREN=y
CONFIG_PROC_PID_ARCH_STATUS=y
CONFIG_KERNFS=y
CONFIG_SYSFS=y
CONFIG_TMPFS=y
CONFIG_TMPFS_POSIX_ACL=y
CONFIG_TMPFS_XATTR=y
# CONFIG_TMPFS_INODE64 is not set
CONFIG_TMPFS_QUOTA=y
CONFIG_ARCH_SUPPORTS_HUGETLBFS=y
CONFIG_HUGETLBFS=y
# CONFIG_HUGETLB_PAGE_OPTIMIZE_VMEMMAP_DEFAULT_ON is not set
CONFIG_HUGETLB_PAGE=y
CONFIG_HUGETLB_PAGE_OPTIMIZE_VMEMMAP=y
CONFIG_HUGETLB_PMD_PAGE_TABLE_SHARING=y
CONFIG_ARCH_HAS_GIGANTIC_PAGE=y
CONFIG_CONFIGFS_FS=y
# end of Pseudo filesystems

CONFIG_MISC_FILESYSTEMS=y
CONFIG_ORANGEFS_FS=y
CONFIG_ADFS_FS=y
# CONFIG_ADFS_FS_RW is not set
CONFIG_AFFS_FS=y
CONFIG_ECRYPT_FS=y
CONFIG_ECRYPT_FS_MESSAGING=y
CONFIG_HFS_FS=y
CONFIG_HFSPLUS_FS=y
CONFIG_BEFS_FS=y
# CONFIG_BEFS_DEBUG is not set
CONFIG_BFS_FS=y
# CONFIG_EFS_FS is not set
CONFIG_JFFS2_FS=y
CONFIG_JFFS2_FS_DEBUG=0
CONFIG_JFFS2_FS_WRITEBUFFER=y
# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
CONFIG_JFFS2_SUMMARY=y
CONFIG_JFFS2_FS_XATTR=y
CONFIG_JFFS2_FS_POSIX_ACL=y
CONFIG_JFFS2_FS_SECURITY=y
CONFIG_JFFS2_COMPRESSION_OPTIONS=y
CONFIG_JFFS2_ZLIB=y
CONFIG_JFFS2_LZO=y
CONFIG_JFFS2_RTIME=y
CONFIG_JFFS2_RUBIN=y
# CONFIG_JFFS2_CMODE_NONE is not set
CONFIG_JFFS2_CMODE_PRIORITY=y
# CONFIG_JFFS2_CMODE_SIZE is not set
# CONFIG_JFFS2_CMODE_FAVOURLZO is not set
CONFIG_UBIFS_FS=y
CONFIG_UBIFS_FS_ADVANCED_COMPR=y
CONFIG_UBIFS_FS_LZO=y
CONFIG_UBIFS_FS_ZLIB=y
CONFIG_UBIFS_FS_ZSTD=y
CONFIG_UBIFS_ATIME_SUPPORT=y
CONFIG_UBIFS_FS_XATTR=y
CONFIG_UBIFS_FS_SECURITY=y
# CONFIG_UBIFS_FS_AUTHENTICATION is not set
CONFIG_CRAMFS=y
CONFIG_CRAMFS_BLOCKDEV=y
CONFIG_CRAMFS_MTD=y
CONFIG_SQUASHFS=y
# CONFIG_SQUASHFS_FILE_CACHE is not set
CONFIG_SQUASHFS_FILE_DIRECT=y
CONFIG_SQUASHFS_DECOMP_MULTI=y
# CONFIG_SQUASHFS_CHOICE_DECOMP_BY_MOUNT is not set
# CONFIG_SQUASHFS_COMPILE_DECOMP_SINGLE is not set
CONFIG_SQUASHFS_COMPILE_DECOMP_MULTI=y
# CONFIG_SQUASHFS_COMPILE_DECOMP_MULTI_PERCPU is not set
# CONFIG_SQUASHFS_MOUNT_DECOMP_THREADS is not set
CONFIG_SQUASHFS_XATTR=y
# CONFIG_SQUASHFS_COMP_CACHE_FULL is not set
CONFIG_SQUASHFS_ZLIB=y
CONFIG_SQUASHFS_LZ4=y
CONFIG_SQUASHFS_LZO=y
CONFIG_SQUASHFS_XZ=y
CONFIG_SQUASHFS_ZSTD=y
CONFIG_SQUASHFS_4K_DEVBLK_SIZE=y
# CONFIG_SQUASHFS_EMBEDDED is not set
CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3
# CONFIG_VXFS_FS is not set
CONFIG_MINIX_FS=y
CONFIG_OMFS_FS=y
CONFIG_HPFS_FS=y
CONFIG_QNX4FS_FS=y
CONFIG_QNX6FS_FS=y
# CONFIG_QNX6FS_DEBUG is not set
CONFIG_ROMFS_FS=y
# CONFIG_ROMFS_BACKED_BY_BLOCK is not set
# CONFIG_ROMFS_BACKED_BY_MTD is not set
CONFIG_ROMFS_BACKED_BY_BOTH=y
CONFIG_ROMFS_ON_BLOCK=y
CONFIG_ROMFS_ON_MTD=y
CONFIG_PSTORE=y
CONFIG_PSTORE_DEFAULT_KMSG_BYTES=10240
CONFIG_PSTORE_COMPRESS=y
# CONFIG_PSTORE_CONSOLE is not set
# CONFIG_PSTORE_PMSG is not set
# CONFIG_PSTORE_RAM is not set
# CONFIG_PSTORE_BLK is not set
CONFIG_UFS_FS=y
CONFIG_UFS_FS_WRITE=y
# CONFIG_UFS_DEBUG is not set
CONFIG_EROFS_FS=y
# CONFIG_EROFS_FS_DEBUG is not set
CONFIG_EROFS_FS_XATTR=y
CONFIG_EROFS_FS_POSIX_ACL=y
CONFIG_EROFS_FS_SECURITY=y
# CONFIG_EROFS_FS_BACKED_BY_FILE is not set
CONFIG_EROFS_FS_ZIP=y
# CONFIG_EROFS_FS_ZIP_LZMA is not set
# CONFIG_EROFS_FS_ZIP_DEFLATE is not set
# CONFIG_EROFS_FS_ZIP_ZSTD is not set
# CONFIG_EROFS_FS_ZIP_ACCEL is not set
# CONFIG_EROFS_FS_PCPU_KTHREAD is not set
# CONFIG_EROFS_FS_PAGE_CACHE_SHARE is not set
CONFIG_NETWORK_FILESYSTEMS=y
CONFIG_NFS_FS=y
# CONFIG_NFS_V2 is not set
CONFIG_NFS_V3=y
CONFIG_NFS_V3_ACL=y
CONFIG_NFS_V4=y
# CONFIG_NFS_SWAP is not set
CONFIG_NFS_V4_0=y
CONFIG_NFS_V4_2=y
CONFIG_PNFS_FILE_LAYOUT=y
CONFIG_PNFS_BLOCK=y
CONFIG_PNFS_FLEXFILE_LAYOUT=y
CONFIG_NFS_V4_1_IMPLEMENTATION_ID_DOMAIN="kernel.org"
# CONFIG_NFS_V4_1_MIGRATION is not set
CONFIG_NFS_V4_SECURITY_LABEL=y
CONFIG_ROOT_NFS=y
CONFIG_NFS_FSCACHE=y
# CONFIG_NFS_USE_LEGACY_DNS is not set
CONFIG_NFS_USE_KERNEL_DNS=y
# CONFIG_NFS_DISABLE_UDP_SUPPORT is not set
CONFIG_NFS_V4_2_READ_PLUS=y
CONFIG_NFSD=y
# CONFIG_NFSD_V2 is not set
CONFIG_NFSD_V3_ACL=y
CONFIG_NFSD_V4=y
CONFIG_NFSD_PNFS=y
CONFIG_NFSD_BLOCKLAYOUT=y
CONFIG_NFSD_SCSILAYOUT=y
CONFIG_NFSD_FLEXFILELAYOUT=y
CONFIG_NFSD_V4_2_INTER_SSC=y
CONFIG_NFSD_V4_SECURITY_LABEL=y
# CONFIG_NFSD_LEGACY_CLIENT_TRACKING is not set
# CONFIG_NFSD_V4_POSIX_ACLS is not set
CONFIG_GRACE_PERIOD=y
CONFIG_LOCKD=y
CONFIG_LOCKD_V4=y
CONFIG_NFS_ACL_SUPPORT=y
CONFIG_NFS_COMMON=y
# CONFIG_NFS_LOCALIO is not set
CONFIG_NFS_V4_2_SSC_HELPER=y
CONFIG_SUNRPC=y
CONFIG_SUNRPC_GSS=y
CONFIG_SUNRPC_BACKCHANNEL=y
CONFIG_RPCSEC_GSS_KRB5=y
# CONFIG_SUNRPC_DEBUG is not set
# CONFIG_SUNRPC_XPRT_RDMA is not set
CONFIG_CEPH_FS=y
CONFIG_CEPH_FSCACHE=y
CONFIG_CEPH_FS_POSIX_ACL=y
# CONFIG_CEPH_FS_SECURITY_LABEL is not set
CONFIG_CIFS=y
# CONFIG_CIFS_STATS2 is not set
CONFIG_CIFS_ALLOW_INSECURE_LEGACY=y
CONFIG_CIFS_UPCALL=y
CONFIG_CIFS_XATTR=y
CONFIG_CIFS_POSIX=y
CONFIG_CIFS_DEBUG=y
# CONFIG_CIFS_DEBUG2 is not set
# CONFIG_CIFS_DEBUG_DUMP_KEYS is not set
CONFIG_CIFS_DFS_UPCALL=y
CONFIG_CIFS_SWN_UPCALL=y
CONFIG_CIFS_SMB_DIRECT=y
CONFIG_CIFS_FSCACHE=y
# CONFIG_CIFS_ROOT is not set
# CONFIG_CIFS_COMPRESSION is not set
CONFIG_SMB_SERVER=y
# CONFIG_SMB_SERVER_SMBDIRECT is not set
# CONFIG_SMB_SERVER_CHECK_CAP_NET_ADMIN is not set
# CONFIG_SMB_SERVER_KERBEROS5 is not set
CONFIG_SMBDIRECT=y
CONFIG_SMBFS=y
# CONFIG_CODA_FS is not set
CONFIG_AFS_FS=y
# CONFIG_AFS_DEBUG is not set
CONFIG_AFS_FSCACHE=y
# CONFIG_AFS_DEBUG_CURSOR is not set
CONFIG_9P_FS=y
CONFIG_9P_FSCACHE=y
CONFIG_9P_FS_POSIX_ACL=y
CONFIG_9P_FS_SECURITY=y
CONFIG_NLS=y
CONFIG_NLS_DEFAULT="utf8"
CONFIG_NLS_CODEPAGE_437=y
CONFIG_NLS_CODEPAGE_737=y
CONFIG_NLS_CODEPAGE_775=y
CONFIG_NLS_CODEPAGE_850=y
CONFIG_NLS_CODEPAGE_852=y
CONFIG_NLS_CODEPAGE_855=y
CONFIG_NLS_CODEPAGE_857=y
CONFIG_NLS_CODEPAGE_860=y
CONFIG_NLS_CODEPAGE_861=y
CONFIG_NLS_CODEPAGE_862=y
CONFIG_NLS_CODEPAGE_863=y
CONFIG_NLS_CODEPAGE_864=y
CONFIG_NLS_CODEPAGE_865=y
CONFIG_NLS_CODEPAGE_866=y
CONFIG_NLS_CODEPAGE_869=y
CONFIG_NLS_CODEPAGE_936=y
CONFIG_NLS_CODEPAGE_950=y
CONFIG_NLS_CODEPAGE_932=y
CONFIG_NLS_CODEPAGE_949=y
CONFIG_NLS_CODEPAGE_874=y
CONFIG_NLS_ISO8859_8=y
CONFIG_NLS_CODEPAGE_1250=y
CONFIG_NLS_CODEPAGE_1251=y
CONFIG_NLS_ASCII=y
CONFIG_NLS_ISO8859_1=y
CONFIG_NLS_ISO8859_2=y
CONFIG_NLS_ISO8859_3=y
CONFIG_NLS_ISO8859_4=y
CONFIG_NLS_ISO8859_5=y
CONFIG_NLS_ISO8859_6=y
CONFIG_NLS_ISO8859_7=y
CONFIG_NLS_ISO8859_9=y
CONFIG_NLS_ISO8859_13=y
CONFIG_NLS_ISO8859_14=y
CONFIG_NLS_ISO8859_15=y
CONFIG_NLS_KOI8_R=y
CONFIG_NLS_KOI8_U=y
CONFIG_NLS_MAC_ROMAN=y
CONFIG_NLS_MAC_CELTIC=y
CONFIG_NLS_MAC_CENTEURO=y
CONFIG_NLS_MAC_CROATIAN=y
CONFIG_NLS_MAC_CYRILLIC=y
CONFIG_NLS_MAC_GAELIC=y
CONFIG_NLS_MAC_GREEK=y
CONFIG_NLS_MAC_ICELAND=y
CONFIG_NLS_MAC_INUIT=y
CONFIG_NLS_MAC_ROMANIAN=y
CONFIG_NLS_MAC_TURKISH=y
CONFIG_NLS_UTF8=y
CONFIG_NLS_UCS2_UTILS=y
CONFIG_DLM=y
# CONFIG_DLM_DEBUG is not set
CONFIG_UNICODE=y
CONFIG_IO_WQ=y
# end of File systems

#
# Security options
#
CONFIG_KEYS=y
CONFIG_KEYS_REQUEST_CACHE=y
CONFIG_PERSISTENT_KEYRINGS=y
CONFIG_BIG_KEYS=y
CONFIG_TRUSTED_KEYS=y
# CONFIG_TRUSTED_KEYS_TPM is not set
# CONFIG_TRUSTED_KEYS_TEE is not set

#
# No trust source selected!
#
CONFIG_ENCRYPTED_KEYS=y
# CONFIG_USER_DECRYPTED_DATA is not set
CONFIG_KEY_DH_OPERATIONS=y
CONFIG_KEY_NOTIFICATIONS=y
# CONFIG_SECURITY_DMESG_RESTRICT is not set
# CONFIG_PROC_MEM_ALWAYS_FORCE is not set
CONFIG_PROC_MEM_FORCE_PTRACE=y
# CONFIG_PROC_MEM_NO_FORCE is not set
CONFIG_SECURITY=y
CONFIG_HAS_SECURITY_AUDIT=y
CONFIG_SECURITYFS=y
CONFIG_SECURITY_NETWORK=y
CONFIG_SECURITY_INFINIBAND=y
CONFIG_SECURITY_NETWORK_XFRM=y
CONFIG_SECURITY_PATH=y
# CONFIG_INTEL_TXT is not set
CONFIG_LSM_MMAP_MIN_ADDR=65536
# CONFIG_STATIC_USERMODEHELPER is not set
CONFIG_SECURITY_SELINUX=y
CONFIG_SECURITY_SELINUX_BOOTPARAM=y
CONFIG_SECURITY_SELINUX_DEVELOP=y
CONFIG_SECURITY_SELINUX_AVC_STATS=y
CONFIG_SECURITY_SELINUX_SIDTAB_HASH_BITS=9
CONFIG_SECURITY_SELINUX_SID2STR_CACHE_SIZE=256
CONFIG_SECURITY_SELINUX_AVC_HASH_BITS=9
# CONFIG_SECURITY_SELINUX_DEBUG is not set
# CONFIG_SECURITY_SMACK is not set
CONFIG_SECURITY_TOMOYO=y
CONFIG_SECURITY_TOMOYO_MAX_ACCEPT_ENTRY=64
CONFIG_SECURITY_TOMOYO_MAX_AUDIT_LOG=32
CONFIG_SECURITY_TOMOYO_OMIT_USERSPACE_LOADER=y
CONFIG_SECURITY_TOMOYO_INSECURE_BUILTIN_SETTING=y
# CONFIG_SECURITY_APPARMOR is not set
# CONFIG_SECURITY_LOADPIN is not set
CONFIG_SECURITY_YAMA=y
CONFIG_SECURITY_SAFESETID=y
CONFIG_SECURITY_LOCKDOWN_LSM=y
CONFIG_SECURITY_LOCKDOWN_LSM_EARLY=y
CONFIG_LOCK_DOWN_KERNEL_FORCE_NONE=y
# CONFIG_LOCK_DOWN_KERNEL_FORCE_INTEGRITY is not set
# CONFIG_LOCK_DOWN_KERNEL_FORCE_CONFIDENTIALITY is not set
CONFIG_SECURITY_LANDLOCK=y
# CONFIG_SECURITY_IPE is not set
CONFIG_INTEGRITY=y
CONFIG_INTEGRITY_SIGNATURE=y
CONFIG_INTEGRITY_ASYMMETRIC_KEYS=y
CONFIG_INTEGRITY_TRUSTED_KEYRING=y
CONFIG_INTEGRITY_AUDIT=y
CONFIG_IMA=y
CONFIG_IMA_MEASURE_PCR_IDX=10
CONFIG_IMA_LSM_RULES=y
CONFIG_IMA_NG_TEMPLATE=y
# CONFIG_IMA_SIG_TEMPLATE is not set
CONFIG_IMA_DEFAULT_TEMPLATE="ima-ng"
# CONFIG_IMA_DEFAULT_HASH_SHA1 is not set
CONFIG_IMA_DEFAULT_HASH_SHA256=y
# CONFIG_IMA_DEFAULT_HASH_SHA512 is not set
# CONFIG_IMA_DEFAULT_HASH_WP512 is not set
CONFIG_IMA_DEFAULT_HASH="sha256"
CONFIG_IMA_WRITE_POLICY=y
CONFIG_IMA_READ_POLICY=y
CONFIG_IMA_APPRAISE=y
# CONFIG_IMA_ARCH_POLICY is not set
# CONFIG_IMA_APPRAISE_BUILD_POLICY is not set
# CONFIG_IMA_APPRAISE_BOOTPARAM is not set
CONFIG_IMA_APPRAISE_MODSIG=y
# CONFIG_IMA_KEYRINGS_PERMIT_SIGNED_BY_BUILTIN_OR_SECONDARY is not set
# CONFIG_IMA_BLACKLIST_KEYRING is not set
# CONFIG_IMA_LOAD_X509 is not set
CONFIG_IMA_MEASURE_ASYMMETRIC_KEYS=y
CONFIG_IMA_QUEUE_EARLY_BOOT_KEYS=y
# CONFIG_IMA_DISABLE_HTABLE is not set
# CONFIG_IMA_STAGING is not set
CONFIG_EVM=y
CONFIG_EVM_ATTR_FSUUID=y
CONFIG_EVM_ADD_XATTRS=y
# CONFIG_EVM_LOAD_X509 is not set
CONFIG_DEFAULT_SECURITY_SELINUX=y
# CONFIG_DEFAULT_SECURITY_TOMOYO is not set
# CONFIG_DEFAULT_SECURITY_DAC is not set
CONFIG_LSM="landlock,lockdown,yama,safesetid,integrity,tomoyo,selinux,bpf"

#
# Kernel hardening options
#

#
# Memory initialization
#
CONFIG_CC_HAS_AUTO_VAR_INIT_PATTERN=y
CONFIG_CC_HAS_AUTO_VAR_INIT_ZERO_BARE=y
CONFIG_CC_HAS_AUTO_VAR_INIT_ZERO=y
# CONFIG_INIT_STACK_NONE is not set
# CONFIG_INIT_STACK_ALL_PATTERN is not set
CONFIG_INIT_STACK_ALL_ZERO=y
CONFIG_INIT_ON_ALLOC_DEFAULT_ON=y
# CONFIG_INIT_ON_FREE_DEFAULT_ON is not set
CONFIG_CC_HAS_ZERO_CALL_USED_REGS=y
# CONFIG_ZERO_CALL_USED_REGS is not set
# end of Memory initialization

#
# Bounds checking
#
CONFIG_FORTIFY_SOURCE=y
CONFIG_HARDENED_USERCOPY=y
# CONFIG_HARDENED_USERCOPY_DEFAULT_ON is not set
# end of Bounds checking

#
# Hardening of kernel data structures
#
CONFIG_LIST_HARDENED=y
CONFIG_BUG_ON_DATA_CORRUPTION=y
# end of Hardening of kernel data structures

CONFIG_RANDSTRUCT_NONE=y
# end of Kernel hardening options
# end of Security options

CONFIG_ASYNC_CORE=y
CONFIG_ASYNC_MEMCPY=y
CONFIG_ASYNC_XOR=y
CONFIG_ASYNC_PQ=y
CONFIG_ASYNC_RAID6_RECOV=y
CONFIG_CRYPTO=y

#
# Crypto core or helper
#
CONFIG_CRYPTO_ALGAPI=y
CONFIG_CRYPTO_ALGAPI2=y
CONFIG_CRYPTO_AEAD=y
CONFIG_CRYPTO_AEAD2=y
CONFIG_CRYPTO_SIG=y
CONFIG_CRYPTO_SIG2=y
CONFIG_CRYPTO_SKCIPHER=y
CONFIG_CRYPTO_SKCIPHER2=y
CONFIG_CRYPTO_HASH=y
CONFIG_CRYPTO_HASH2=y
CONFIG_CRYPTO_RNG=y
CONFIG_CRYPTO_RNG2=y
CONFIG_CRYPTO_AKCIPHER2=y
CONFIG_CRYPTO_AKCIPHER=y
CONFIG_CRYPTO_KPP2=y
CONFIG_CRYPTO_KPP=y
CONFIG_CRYPTO_ACOMP2=y
CONFIG_CRYPTO_ACOMP=y
CONFIG_CRYPTO_MANAGER=y
CONFIG_CRYPTO_MANAGER2=y
CONFIG_CRYPTO_USER=y
# CONFIG_CRYPTO_SELFTESTS is not set
# CONFIG_CRYPTO_NULL is not set
CONFIG_CRYPTO_PCRYPT=y
# CONFIG_CRYPTO_CRYPTD is not set
CONFIG_CRYPTO_AUTHENC=y
CONFIG_CRYPTO_KRB5ENC=y
# CONFIG_CRYPTO_BENCHMARK is not set
CONFIG_CRYPTO_ENGINE=y
# end of Crypto core or helper

#
# Public-key cryptography
#
CONFIG_CRYPTO_RSA=y
CONFIG_CRYPTO_DH=y
# CONFIG_CRYPTO_DH_RFC7919_GROUPS is not set
CONFIG_CRYPTO_ECC=y
CONFIG_CRYPTO_ECDH=y
# CONFIG_CRYPTO_ECDSA is not set
CONFIG_CRYPTO_ECRDSA=y
CONFIG_CRYPTO_MLDSA=y
# end of Public-key cryptography

#
# Block ciphers
#
CONFIG_CRYPTO_AES=y
CONFIG_CRYPTO_ANUBIS=y
CONFIG_CRYPTO_ARIA=y
CONFIG_CRYPTO_BLOWFISH=y
CONFIG_CRYPTO_BLOWFISH_COMMON=y
CONFIG_CRYPTO_CAMELLIA=y
CONFIG_CRYPTO_CAST_COMMON=y
CONFIG_CRYPTO_CAST5=y
CONFIG_CRYPTO_CAST6=y
CONFIG_CRYPTO_DES=y
CONFIG_CRYPTO_KHAZAD=y
CONFIG_CRYPTO_SEED=y
CONFIG_CRYPTO_SERPENT=y
CONFIG_CRYPTO_SM4=y
CONFIG_CRYPTO_SM4_GENERIC=y
CONFIG_CRYPTO_TEA=y
CONFIG_CRYPTO_TWOFISH=y
CONFIG_CRYPTO_TWOFISH_COMMON=y
# end of Block ciphers

#
# Length-preserving ciphers and modes
#
CONFIG_CRYPTO_ADIANTUM=y
CONFIG_CRYPTO_ARC4=y
CONFIG_CRYPTO_CHACHA20=y
CONFIG_CRYPTO_CBC=y
CONFIG_CRYPTO_CTR=y
CONFIG_CRYPTO_CTS=y
CONFIG_CRYPTO_ECB=y
CONFIG_CRYPTO_HCTR2=y
CONFIG_CRYPTO_LRW=y
CONFIG_CRYPTO_XCTR=y
CONFIG_CRYPTO_XTS=y
# end of Length-preserving ciphers and modes

#
# AEAD (authenticated encryption with associated data) ciphers
#
CONFIG_CRYPTO_AEGIS128=y
CONFIG_CRYPTO_CHACHA20POLY1305=y
CONFIG_CRYPTO_CCM=y
CONFIG_CRYPTO_GCM=y
CONFIG_CRYPTO_GENIV=y
CONFIG_CRYPTO_SEQIV=y
CONFIG_CRYPTO_ECHAINIV=y
CONFIG_CRYPTO_ESSIV=y
# end of AEAD (authenticated encryption with associated data) ciphers

#
# Hashes, digests, and MACs
#
# CONFIG_CRYPTO_BLAKE2B is not set
CONFIG_CRYPTO_CMAC=y
CONFIG_CRYPTO_HMAC=y
# CONFIG_CRYPTO_MD4 is not set
# CONFIG_CRYPTO_MD5 is not set
CONFIG_CRYPTO_RMD160=y
CONFIG_CRYPTO_SHA1=y
CONFIG_CRYPTO_SHA256=y
CONFIG_CRYPTO_SHA512=y
CONFIG_CRYPTO_SHA3=y
# CONFIG_CRYPTO_SM3 is not set
CONFIG_CRYPTO_STREEBOG=y
CONFIG_CRYPTO_WP512=y
CONFIG_CRYPTO_XCBC=y
# CONFIG_CRYPTO_XXHASH is not set
# end of Hashes, digests, and MACs

#
# CRCs (cyclic redundancy checks)
#
# CONFIG_CRYPTO_CRC32C is not set
# CONFIG_CRYPTO_CRC32 is not set
# end of CRCs (cyclic redundancy checks)

#
# Compression
#
CONFIG_CRYPTO_DEFLATE=y
CONFIG_CRYPTO_LZO=y
CONFIG_CRYPTO_842=y
CONFIG_CRYPTO_LZ4=y
CONFIG_CRYPTO_LZ4HC=y
CONFIG_CRYPTO_ZSTD=y
# end of Compression

#
# Random number generation
#
# CONFIG_CRYPTO_DRBG is not set
# CONFIG_CRYPTO_JITTERENTROPY is not set
CONFIG_CRYPTO_KDF800108_CTR=y
# end of Random number generation

#
# Userspace interface (deprecated)
#
CONFIG_CRYPTO_USER_API=y
CONFIG_CRYPTO_USER_API_HASH=y
CONFIG_CRYPTO_USER_API_SKCIPHER=y
CONFIG_CRYPTO_USER_API_RNG=y
CONFIG_CRYPTO_USER_API_AEAD=y
CONFIG_CRYPTO_USER_API_ENABLE_OBSOLETE=y
# end of Userspace interface (deprecated)

#
# Accelerated Cryptographic Algorithms for CPU (x86)
#
CONFIG_CRYPTO_AES_NI_INTEL=y
CONFIG_CRYPTO_BLOWFISH_X86_64=y
CONFIG_CRYPTO_CAMELLIA_X86_64=y
CONFIG_CRYPTO_CAMELLIA_AESNI_AVX_X86_64=y
CONFIG_CRYPTO_CAMELLIA_AESNI_AVX2_X86_64=y
CONFIG_CRYPTO_CAST5_AVX_X86_64=y
CONFIG_CRYPTO_CAST6_AVX_X86_64=y
CONFIG_CRYPTO_SERPENT_SSE2_X86_64=y
CONFIG_CRYPTO_SERPENT_AVX_X86_64=y
CONFIG_CRYPTO_SERPENT_AVX2_X86_64=y
CONFIG_CRYPTO_SM4_AESNI_AVX_X86_64=y
CONFIG_CRYPTO_SM4_AESNI_AVX2_X86_64=y
CONFIG_CRYPTO_TWOFISH_X86_64=y
CONFIG_CRYPTO_TWOFISH_X86_64_3WAY=y
CONFIG_CRYPTO_TWOFISH_AVX_X86_64=y
CONFIG_CRYPTO_ARIA_AESNI_AVX_X86_64=y
# CONFIG_CRYPTO_ARIA_AESNI_AVX2_X86_64 is not set
# CONFIG_CRYPTO_ARIA_GFNI_AVX512_X86_64 is not set
CONFIG_CRYPTO_AEGIS128_AESNI_SSE2=y
# end of Accelerated Cryptographic Algorithms for CPU (x86)

CONFIG_CRYPTO_HW=y
CONFIG_CRYPTO_DEV_PADLOCK=y
CONFIG_CRYPTO_DEV_PADLOCK_AES=y
CONFIG_CRYPTO_DEV_PADLOCK_SHA=y
# CONFIG_CRYPTO_DEV_ATMEL_ECC is not set
# CONFIG_CRYPTO_DEV_ATMEL_SHA204A is not set
CONFIG_CRYPTO_DEV_CCP=y
CONFIG_CRYPTO_DEV_CCP_DD=y
# CONFIG_CRYPTO_DEV_SP_CCP is not set
# CONFIG_CRYPTO_DEV_SP_PSP is not set
# CONFIG_CRYPTO_DEV_NITROX_CNN55XX is not set
CONFIG_CRYPTO_DEV_QAT=y
CONFIG_CRYPTO_DEV_QAT_DH895xCC=y
CONFIG_CRYPTO_DEV_QAT_C3XXX=y
CONFIG_CRYPTO_DEV_QAT_C62X=y
# CONFIG_CRYPTO_DEV_QAT_4XXX is not set
# CONFIG_CRYPTO_DEV_QAT_420XX is not set
# CONFIG_CRYPTO_DEV_QAT_6XXX is not set
CONFIG_CRYPTO_DEV_QAT_DH895xCCVF=y
CONFIG_CRYPTO_DEV_QAT_C3XXXVF=y
CONFIG_CRYPTO_DEV_QAT_C62XVF=y
# CONFIG_CRYPTO_DEV_QAT_ERROR_INJECTION is not set
CONFIG_CRYPTO_DEV_VIRTIO=y
# CONFIG_CRYPTO_DEV_SAFEXCEL is not set
# CONFIG_CRYPTO_DEV_CCREE is not set
# CONFIG_CRYPTO_DEV_AMLOGIC_GXL is not set
CONFIG_ASYMMETRIC_KEY_TYPE=y
CONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE=y
CONFIG_X509_CERTIFICATE_PARSER=y
CONFIG_PKCS8_PRIVATE_KEY_PARSER=y
CONFIG_PKCS7_MESSAGE_PARSER=y
# CONFIG_PKCS7_WAIVE_AUTHATTRS_REJECTION_FOR_MLDSA is not set
CONFIG_PKCS7_TEST_KEY=y
CONFIG_SIGNED_PE_FILE_VERIFICATION=y
# CONFIG_FIPS_SIGNATURE_SELFTEST is not set

#
# Certificates for signature checking
#
CONFIG_MODULE_SIG_KEY="certs/signing_key.pem"
# CONFIG_MODULE_SIG_KEY_TYPE_RSA is not set
CONFIG_MODULE_SIG_KEY_TYPE_MLDSA_44=y
# CONFIG_MODULE_SIG_KEY_TYPE_MLDSA_65 is not set
# CONFIG_MODULE_SIG_KEY_TYPE_MLDSA_87 is not set
CONFIG_SYSTEM_TRUSTED_KEYRING=y
CONFIG_SYSTEM_TRUSTED_KEYS=""
# CONFIG_SYSTEM_EXTRA_CERTIFICATE is not set
CONFIG_SECONDARY_TRUSTED_KEYRING=y
# CONFIG_SECONDARY_TRUSTED_KEYRING_SIGNED_BY_BUILTIN is not set
# CONFIG_SYSTEM_BLACKLIST_KEYRING is not set
CONFIG_OPENSSL_SUPPORTS_ML_DSA=y
# end of Certificates for signature checking

CONFIG_CRYPTO_KRB5=y
# CONFIG_CRYPTO_KRB5_SELFTESTS is not set
CONFIG_BINARY_PRINTF=y

#
# Library routines
#
CONFIG_LINEAR_RANGES=y
# CONFIG_PACKING is not set
CONFIG_BITREVERSE=y
CONFIG_GENERIC_BITREVERSE=y
CONFIG_GENERIC_STRNCPY_FROM_USER=y
CONFIG_GENERIC_STRNLEN_USER=y
CONFIG_GENERIC_NET_UTILS=y
# CONFIG_CORDIC is not set
# CONFIG_PRIME_NUMBERS is not set
CONFIG_RATIONAL=y
CONFIG_GENERIC_IOMAP=y
CONFIG_ARCH_USE_CMPXCHG_LOCKREF=y
CONFIG_ARCH_HAS_FAST_MULTIPLIER=y
CONFIG_ARCH_USE_SYM_ANNOTATIONS=y
CONFIG_CRC8=y
CONFIG_CRC16=y
CONFIG_CRC_CCITT=y
CONFIG_CRC_ITU_T=y
CONFIG_CRC_T10DIF=y
CONFIG_CRC_T10DIF_ARCH=y
CONFIG_CRC32=y
CONFIG_CRC32_ARCH=y
CONFIG_CRC64=y
CONFIG_CRC64_ARCH=y
CONFIG_CRC_OPTIMIZATIONS=y
CONFIG_CRYPTO_HASH_INFO=y
CONFIG_CRYPTO_LIB_UTILS=y
CONFIG_CRYPTO_LIB_AES=y
CONFIG_CRYPTO_LIB_AES_ARCH=y
CONFIG_CRYPTO_LIB_AES_CBC_MACS=y
CONFIG_CRYPTO_LIB_ARC4=y
CONFIG_CRYPTO_LIB_GF128MUL=y
CONFIG_CRYPTO_LIB_BLAKE2B=y
CONFIG_CRYPTO_LIB_BLAKE2S_ARCH=y
CONFIG_CRYPTO_LIB_CHACHA=y
CONFIG_CRYPTO_LIB_CHACHA_ARCH=y
CONFIG_CRYPTO_LIB_CURVE25519=y
CONFIG_CRYPTO_LIB_CURVE25519_ARCH=y
CONFIG_CRYPTO_LIB_CURVE25519_GENERIC=y
CONFIG_CRYPTO_LIB_DES=y
CONFIG_CRYPTO_LIB_GF128HASH=y
CONFIG_CRYPTO_LIB_GF128HASH_ARCH=y
CONFIG_CRYPTO_LIB_MD5=y
CONFIG_CRYPTO_LIB_MLDSA=y
CONFIG_CRYPTO_LIB_NH=y
CONFIG_CRYPTO_LIB_NH_ARCH=y
CONFIG_CRYPTO_LIB_POLY1305=y
CONFIG_CRYPTO_LIB_POLY1305_ARCH=y
CONFIG_CRYPTO_LIB_POLY1305_GENERIC=y
CONFIG_CRYPTO_LIB_POLY1305_RSIZE=11
CONFIG_CRYPTO_LIB_CHACHA20POLY1305=y
CONFIG_CRYPTO_LIB_SHA1=y
CONFIG_CRYPTO_LIB_SHA1_ARCH=y
CONFIG_CRYPTO_LIB_SHA256=y
CONFIG_CRYPTO_LIB_SHA256_ARCH=y
CONFIG_CRYPTO_LIB_SHA512=y
CONFIG_CRYPTO_LIB_SHA512_ARCH=y
CONFIG_CRYPTO_LIB_SHA3=y
CONFIG_XOR_BLOCKS=y
CONFIG_XOR_BLOCKS_ARCH=y
CONFIG_RAID6_PQ=y
CONFIG_RAID6_PQ_ARCH=y
# CONFIG_RAID6_PQ_BENCHMARK is not set
CONFIG_XXHASH=y
# CONFIG_RANDOM32_SELFTEST is not set
CONFIG_842_COMPRESS=y
CONFIG_842_DECOMPRESS=y
CONFIG_ZLIB_INFLATE=y
CONFIG_ZLIB_DEFLATE=y
CONFIG_LZO_COMPRESS=y
CONFIG_LZO_DECOMPRESS=y
CONFIG_LZ4_COMPRESS=y
CONFIG_LZ4HC_COMPRESS=y
CONFIG_LZ4_DECOMPRESS=y
CONFIG_ZSTD_COMMON=y
CONFIG_ZSTD_COMPRESS=y
CONFIG_ZSTD_DECOMPRESS=y
CONFIG_XZ_DEC=y
CONFIG_XZ_DEC_X86=y
CONFIG_XZ_DEC_POWERPC=y
CONFIG_XZ_DEC_ARM=y
CONFIG_XZ_DEC_ARMTHUMB=y
CONFIG_XZ_DEC_ARM64=y
CONFIG_XZ_DEC_SPARC=y
CONFIG_XZ_DEC_RISCV=y
# CONFIG_XZ_DEC_MICROLZMA is not set
CONFIG_XZ_DEC_BCJ=y
# CONFIG_XZ_DEC_TEST is not set
CONFIG_DECOMPRESS_GZIP=y
CONFIG_DECOMPRESS_BZIP2=y
CONFIG_DECOMPRESS_LZMA=y
CONFIG_DECOMPRESS_XZ=y
CONFIG_DECOMPRESS_LZO=y
CONFIG_DECOMPRESS_LZ4=y
CONFIG_DECOMPRESS_ZSTD=y
CONFIG_GENERIC_ALLOCATOR=y
CONFIG_REED_SOLOMON=y
CONFIG_REED_SOLOMON_DEC8=y
CONFIG_TEXTSEARCH=y
CONFIG_TEXTSEARCH_KMP=y
CONFIG_TEXTSEARCH_BM=y
CONFIG_TEXTSEARCH_FSM=y
CONFIG_INTERVAL_TREE=y
CONFIG_INTERVAL_TREE_SPAN_ITER=y
CONFIG_XARRAY_MULTI=y
CONFIG_ASSOCIATIVE_ARRAY=y
CONFIG_CLOSURES=y
CONFIG_HAS_IOMEM=y
CONFIG_HAS_IOPORT=y
CONFIG_HAS_IOPORT_MAP=y
CONFIG_HAS_DMA=y
CONFIG_DMA_OPS_HELPERS=y
CONFIG_NEED_SG_DMA_FLAGS=y
CONFIG_NEED_SG_DMA_LENGTH=y
CONFIG_NEED_DMA_MAP_STATE=y
CONFIG_ARCH_DMA_ADDR_T_64BIT=y
CONFIG_DMA_DECLARE_COHERENT=y
CONFIG_SWIOTLB=y
# CONFIG_SWIOTLB_DYNAMIC is not set
CONFIG_DMA_NEED_SYNC=y
# CONFIG_DMA_RESTRICTED_POOL is not set
CONFIG_DMA_CMA=y
# CONFIG_DMA_NUMA_CMA is not set

#
# Default contiguous memory area size:
#
CONFIG_CMA_SIZE_MBYTES=0
CONFIG_CMA_SIZE_PERCENTAGE=0
# CONFIG_CMA_SIZE_SEL_MBYTES is not set
# CONFIG_CMA_SIZE_SEL_PERCENTAGE is not set
# CONFIG_CMA_SIZE_SEL_MIN is not set
CONFIG_CMA_SIZE_SEL_MAX=y
CONFIG_CMA_ALIGNMENT=8
# CONFIG_DMA_API_DEBUG is not set
# CONFIG_DMA_MAP_BENCHMARK is not set
CONFIG_SGL_ALLOC=y
CONFIG_CHECK_SIGNATURE=y
# CONFIG_CPUMASK_OFFSTACK is not set
CONFIG_CPU_RMAP=y
CONFIG_DQL=y
CONFIG_GLOB=y
CONFIG_NLATTR=y
CONFIG_CLZ_TAB=y
CONFIG_IRQ_POLL=y
CONFIG_MPILIB=y
CONFIG_SIGNATURE=y
CONFIG_DIMLIB=y
CONFIG_LIBFDT=y
CONFIG_OID_REGISTRY=y
CONFIG_HAVE_GENERIC_VDSO=y
CONFIG_GENERIC_GETTIMEOFDAY=y
CONFIG_GENERIC_VDSO_OVERFLOW_PROTECT=y
CONFIG_VDSO_GETRANDOM=y
CONFIG_FONT_SUPPORT=y
# CONFIG_FONTS is not set
CONFIG_FONT_8x8=y
CONFIG_FONT_8x16=y
CONFIG_SG_POOL=y
CONFIG_ARCH_HAS_PMEM_API=y
CONFIG_MEMREGION=y
CONFIG_ARCH_HAS_CPU_CACHE_INVALIDATE_MEMREGION=y
CONFIG_ARCH_HAS_UACCESS_FLUSHCACHE=y
CONFIG_ARCH_HAS_COPY_MC=y
CONFIG_ARCH_STACKWALK=y
CONFIG_STACKDEPOT=y
CONFIG_STACKDEPOT_ALWAYS_INIT=y
CONFIG_STACKDEPOT_MAX_FRAMES=64
CONFIG_REF_TRACKER=y
CONFIG_SBITMAP=y
# CONFIG_LWQ_TEST is not set
# end of Library routines

CONFIG_FIRMWARE_TABLE=y
CONFIG_UNION_FIND=y

#
# Kernel hacking
#

#
# printk and dmesg options
#
CONFIG_PRINTK_TIME=y
CONFIG_PRINTK_CALLER=y
# CONFIG_STACKTRACE_BUILD_ID is not set
CONFIG_CONSOLE_LOGLEVEL_DEFAULT=7
CONFIG_CONSOLE_LOGLEVEL_QUIET=4
CONFIG_MESSAGE_LOGLEVEL_DEFAULT=4
# CONFIG_BOOT_PRINTK_DELAY is not set
CONFIG_DYNAMIC_DEBUG=y
CONFIG_DYNAMIC_DEBUG_CORE=y
CONFIG_SYMBOLIC_ERRNAME=y
CONFIG_DEBUG_BUGVERBOSE=y
CONFIG_DEBUG_BUGVERBOSE_DETAILED=y
# end of printk and dmesg options

CONFIG_DEBUG_KERNEL=y
CONFIG_DEBUG_MISC=y

#
# Compile-time checks and compiler options
#
CONFIG_DEBUG_INFO=y
CONFIG_AS_HAS_NON_CONST_ULEB128=y
# CONFIG_DEBUG_INFO_NONE is not set
# CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT is not set
CONFIG_DEBUG_INFO_DWARF4=y
# CONFIG_DEBUG_INFO_DWARF5 is not set
# CONFIG_DEBUG_INFO_REDUCED is not set
CONFIG_DEBUG_INFO_COMPRESSED_NONE=y
# CONFIG_DEBUG_INFO_COMPRESSED_ZLIB is not set
# CONFIG_DEBUG_INFO_COMPRESSED_ZSTD is not set
# CONFIG_DEBUG_INFO_SPLIT is not set
# CONFIG_DEBUG_INFO_BTF is not set
CONFIG_PAHOLE_HAS_LANG_EXCLUDE=y
# CONFIG_GDB_SCRIPTS is not set
CONFIG_FRAME_WARN=2048
# CONFIG_STRIP_ASM_SYMS is not set
# CONFIG_READABLE_ASM is not set
# CONFIG_HEADERS_INSTALL is not set
# CONFIG_DEBUG_SECTION_MISMATCH is not set
CONFIG_SECTION_MISMATCH_WARN_ONLY=y
# CONFIG_DEBUG_FORCE_FUNCTION_ALIGN_64B is not set
CONFIG_OBJTOOL=y
# CONFIG_OBJTOOL_WERROR is not set
CONFIG_NOINSTR_VALIDATION=y
# CONFIG_VMLINUX_MAP is not set
# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set
# end of Compile-time checks and compiler options

#
# Generic Kernel Debugging Instruments
#
# CONFIG_MAGIC_SYSRQ is not set
CONFIG_DEBUG_FS=y
CONFIG_DEBUG_FS_ALLOW_ALL=y
# CONFIG_DEBUG_FS_ALLOW_NONE is not set
CONFIG_HAVE_ARCH_KGDB=y
# CONFIG_KGDB is not set
CONFIG_ARCH_HAS_UBSAN=y
CONFIG_UBSAN=y
# CONFIG_UBSAN_TRAP is not set
CONFIG_CC_HAS_UBSAN_BOUNDS_STRICT=y
CONFIG_UBSAN_BOUNDS=y
CONFIG_UBSAN_BOUNDS_STRICT=y
CONFIG_UBSAN_SHIFT=y
# CONFIG_UBSAN_DIV_ZERO is not set
# CONFIG_UBSAN_BOOL is not set
# CONFIG_UBSAN_ENUM is not set
# CONFIG_UBSAN_ALIGNMENT is not set
# CONFIG_TEST_UBSAN is not set
CONFIG_HAVE_ARCH_KCSAN=y
CONFIG_HAVE_KCSAN_COMPILER=y
# end of Generic Kernel Debugging Instruments

#
# Networking Debugging
#
CONFIG_NET_DEV_REFCNT_TRACKER=y
CONFIG_NET_NS_REFCNT_TRACKER=y
CONFIG_DEBUG_NET=y
# CONFIG_DEBUG_NET_SMALL_RTNL is not set
# end of Networking Debugging

#
# Memory Debugging
#
CONFIG_PAGE_EXTENSION=y
# CONFIG_DEBUG_PAGEALLOC is not set
CONFIG_SLUB_DEBUG=y
# CONFIG_SLUB_DEBUG_ON is not set
CONFIG_SLUB_RCU_DEBUG=y
CONFIG_PAGE_OWNER=y
CONFIG_PAGE_TABLE_CHECK=y
CONFIG_PAGE_TABLE_CHECK_ENFORCED=y
CONFIG_PAGE_POISONING=y
# CONFIG_DEBUG_PAGE_REF is not set
# CONFIG_DEBUG_RODATA_TEST is not set
CONFIG_ARCH_HAS_DEBUG_WX=y
CONFIG_DEBUG_WX=y
CONFIG_ARCH_HAS_PTDUMP=y
CONFIG_PTDUMP=y
CONFIG_PTDUMP_DEBUGFS=y
CONFIG_HAVE_DEBUG_KMEMLEAK=y
# CONFIG_DEBUG_KMEMLEAK is not set
# CONFIG_PER_VMA_LOCK_STATS is not set
CONFIG_DEBUG_OBJECTS=y
# CONFIG_DEBUG_OBJECTS_SELFTEST is not set
CONFIG_DEBUG_OBJECTS_FREE=y
CONFIG_DEBUG_OBJECTS_TIMERS=y
CONFIG_DEBUG_OBJECTS_WORK=y
CONFIG_DEBUG_OBJECTS_RCU_HEAD=y
CONFIG_DEBUG_OBJECTS_PERCPU_COUNTER=y
CONFIG_DEBUG_OBJECTS_ENABLE_DEFAULT=1
# CONFIG_SHRINKER_DEBUG is not set
CONFIG_DEBUG_STACK_USAGE=y
CONFIG_SCHED_STACK_END_CHECK=y
CONFIG_ARCH_HAS_DEBUG_VM_PGTABLE=y
CONFIG_DEBUG_VFS=y
CONFIG_DEBUG_VM_IRQSOFF=y
CONFIG_DEBUG_VM=y
CONFIG_DEBUG_VM_MAPLE_TREE=y
CONFIG_DEBUG_VM_RB=y
CONFIG_DEBUG_VM_PGFLAGS=y
CONFIG_DEBUG_VM_PGTABLE=y
CONFIG_ARCH_HAS_DEBUG_VIRTUAL=y
CONFIG_DEBUG_VIRTUAL=y
CONFIG_DEBUG_MEMORY_INIT=y
CONFIG_DEBUG_PER_CPU_MAPS=y
CONFIG_DEBUG_KMAP_LOCAL=y
CONFIG_ARCH_SUPPORTS_KMAP_LOCAL_FORCE_MAP=y
CONFIG_DEBUG_KMAP_LOCAL_FORCE_MAP=y
# CONFIG_MEM_ALLOC_PROFILING is not set
CONFIG_HAVE_ARCH_KASAN=y
CONFIG_HAVE_ARCH_KASAN_VMALLOC=y
CONFIG_CC_HAS_KASAN_GENERIC=y
CONFIG_CC_HAS_KASAN_SW_TAGS=y
CONFIG_CC_HAS_WORKING_NOSANITIZE_ADDRESS=y
CONFIG_KASAN=y
CONFIG_CC_HAS_KASAN_MEMINTRINSIC_PREFIX=y
CONFIG_KASAN_GENERIC=y
# CONFIG_KASAN_OUTLINE is not set
CONFIG_KASAN_INLINE=y
CONFIG_KASAN_STACK=y
CONFIG_KASAN_VMALLOC=y
# CONFIG_KASAN_EXTRA_INFO is not set
CONFIG_HAVE_ARCH_KFENCE=y
CONFIG_KFENCE=y
CONFIG_KFENCE_SAMPLE_INTERVAL=100
CONFIG_KFENCE_NUM_OBJECTS=255
# CONFIG_KFENCE_DEFERRABLE is not set
CONFIG_KFENCE_STATIC_KEYS=y
CONFIG_KFENCE_STRESS_TEST_FAULTS=0
CONFIG_HAVE_ARCH_KMSAN=y
# end of Memory Debugging

# CONFIG_DEBUG_SHIRQ is not set

#
# Debug Oops, Lockups and Hangs
#
CONFIG_PANIC_ON_OOPS=y
CONFIG_PANIC_TIMEOUT=86400
CONFIG_LOCKUP_DETECTOR=y
CONFIG_SOFTLOCKUP_DETECTOR=y
# CONFIG_SOFTLOCKUP_DETECTOR_INTR_STORM is not set
CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=1
CONFIG_HAVE_HARDLOCKUP_DETECTOR_BUDDY=y
CONFIG_HARDLOCKUP_DETECTOR=y
# CONFIG_HARDLOCKUP_DETECTOR_PREFER_BUDDY is not set
CONFIG_HARDLOCKUP_DETECTOR_PERF=y
# CONFIG_HARDLOCKUP_DETECTOR_BUDDY is not set
# CONFIG_HARDLOCKUP_DETECTOR_ARCH is not set
CONFIG_HARDLOCKUP_DETECTOR_COUNTS_HRTIMER=y
CONFIG_HARDLOCKUP_CHECK_TIMESTAMP=y
CONFIG_BOOTPARAM_HARDLOCKUP_PANIC=y
CONFIG_DETECT_HUNG_TASK=y
CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=140
CONFIG_BOOTPARAM_HUNG_TASK_PANIC=1
# CONFIG_DETECT_HUNG_TASK_BLOCKER is not set
CONFIG_WQ_WATCHDOG=y
CONFIG_BOOTPARAM_WQ_STALL_PANIC=0
# CONFIG_WQ_CPU_INTENSIVE_REPORT is not set
# CONFIG_TEST_LOCKUP is not set
# end of Debug Oops, Lockups and Hangs

#
# Scheduler Debugging
#
CONFIG_SCHED_INFO=y
CONFIG_SCHEDSTATS=y
# end of Scheduler Debugging

CONFIG_DEBUG_PREEMPT=y
# CONFIG_DEBUG_ATOMIC is not set

#
# Lock Debugging (spinlocks, mutexes, etc...)
#
CONFIG_LOCK_DEBUGGING_SUPPORT=y
CONFIG_PROVE_LOCKING=y
CONFIG_PROVE_RAW_LOCK_NESTING=y
# CONFIG_LOCK_STAT is not set
CONFIG_DEBUG_RT_MUTEXES=y
CONFIG_DEBUG_SPINLOCK=y
CONFIG_DEBUG_MUTEXES=y
CONFIG_DEBUG_WW_MUTEX_SLOWPATH=y
CONFIG_DEBUG_RWSEMS=y
CONFIG_DEBUG_LOCK_ALLOC=y
CONFIG_LOCKDEP=y
CONFIG_LOCKDEP_BITS=20
CONFIG_LOCKDEP_CHAINS_BITS=20
CONFIG_LOCKDEP_STACK_TRACE_BITS=20
CONFIG_LOCKDEP_STACK_TRACE_HASH_BITS=14
CONFIG_LOCKDEP_CIRCULAR_QUEUE_BITS=12
# CONFIG_DEBUG_LOCKDEP is not set
CONFIG_DEBUG_ATOMIC_SLEEP=y
# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
# CONFIG_LOCK_TORTURE_TEST is not set
# CONFIG_WW_MUTEX_SELFTEST is not set
# CONFIG_SCF_TORTURE_TEST is not set
CONFIG_CSD_LOCK_WAIT_DEBUG=y
# CONFIG_CSD_LOCK_WAIT_DEBUG_DEFAULT is not set
# end of Lock Debugging (spinlocks, mutexes, etc...)

CONFIG_TRACE_IRQFLAGS=y
CONFIG_TRACE_IRQFLAGS_NMI=y
CONFIG_NMI_CHECK_CPU=y
CONFIG_DEBUG_IRQFLAGS=y
CONFIG_STACKTRACE=y
# CONFIG_DEBUG_KOBJECT is not set
# CONFIG_DEBUG_KOBJECT_RELEASE is not set

#
# Debug kernel data structures
#
CONFIG_DEBUG_LIST=y
CONFIG_DEBUG_PLIST=y
CONFIG_DEBUG_SG=y
CONFIG_DEBUG_NOTIFIERS=y
# CONFIG_DEBUG_CLOSURES is not set
CONFIG_DEBUG_MAPLE_TREE=y
# end of Debug kernel data structures

#
# RCU Debugging
#
CONFIG_PROVE_RCU=y
# CONFIG_RCU_SCALE_TEST is not set
# CONFIG_RCU_TORTURE_TEST is not set
# CONFIG_RCU_REF_SCALE_TEST is not set
CONFIG_RCU_CPU_STALL_TIMEOUT=100
CONFIG_RCU_EXP_CPU_STALL_TIMEOUT=0
# CONFIG_RCU_CPU_STALL_CPUTIME is not set
# CONFIG_RCU_TRACE is not set
CONFIG_RCU_EQS_DEBUG=y
# end of RCU Debugging

# CONFIG_DEBUG_WQ_FORCE_RR_CPU is not set
# CONFIG_CPU_HOTPLUG_STATE_CONTROL is not set
# CONFIG_LATENCYTOP is not set
CONFIG_USER_STACKTRACE_SUPPORT=y
CONFIG_NOP_TRACER=y
CONFIG_HAVE_RETHOOK=y
CONFIG_HAVE_FUNCTION_TRACER=y
CONFIG_HAVE_DYNAMIC_FTRACE=y
CONFIG_HAVE_DYNAMIC_FTRACE_WITH_REGS=y
CONFIG_HAVE_DYNAMIC_FTRACE_WITH_DIRECT_CALLS=y
CONFIG_HAVE_DYNAMIC_FTRACE_WITH_ARGS=y
CONFIG_HAVE_FTRACE_REGS_HAVING_PT_REGS=y
CONFIG_HAVE_DYNAMIC_FTRACE_NO_PATCHABLE=y
CONFIG_HAVE_DYNAMIC_FTRACE_WITH_JMP=y
CONFIG_HAVE_SYSCALL_TRACEPOINTS=y
CONFIG_HAVE_FENTRY=y
CONFIG_HAVE_OBJTOOL_MCOUNT=y
CONFIG_HAVE_OBJTOOL_NOP_MCOUNT=y
CONFIG_HAVE_C_RECORDMCOUNT=y
CONFIG_HAVE_BUILDTIME_MCOUNT_SORT=y
CONFIG_TRACE_CLOCK=y
CONFIG_RING_BUFFER=y
CONFIG_EVENT_TRACING=y
CONFIG_CONTEXT_SWITCH_TRACER=y
CONFIG_PREEMPTIRQ_TRACEPOINTS=y
CONFIG_TRACING=y
CONFIG_GENERIC_TRACER=y
CONFIG_TRACING_SUPPORT=y
CONFIG_FTRACE=y
CONFIG_TRACEFS_AUTOMOUNT_DEPRECATED=y
# CONFIG_BOOTTIME_TRACING is not set
# CONFIG_FUNCTION_TRACER is not set
# CONFIG_STACK_TRACER is not set
# CONFIG_IRQSOFF_TRACER is not set
# CONFIG_PREEMPT_TRACER is not set
# CONFIG_SCHED_TRACER is not set
# CONFIG_HWLAT_TRACER is not set
# CONFIG_OSNOISE_TRACER is not set
# CONFIG_TIMERLAT_TRACER is not set
# CONFIG_MMIOTRACE is not set
# CONFIG_FTRACE_SYSCALLS is not set
# CONFIG_TRACER_SNAPSHOT is not set
CONFIG_BRANCH_PROFILE_NONE=y
# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set
CONFIG_BLK_DEV_IO_TRACE=y
CONFIG_UPROBE_EVENTS=y
CONFIG_EPROBE_EVENTS=y
CONFIG_BPF_EVENTS=y
CONFIG_DYNAMIC_EVENTS=y
CONFIG_PROBE_EVENTS=y
# CONFIG_SYNTH_EVENTS is not set
# CONFIG_USER_EVENTS is not set
# CONFIG_HIST_TRIGGERS is not set
CONFIG_TRACE_EVENT_INJECT=y
# CONFIG_TRACEPOINT_BENCHMARK is not set
# CONFIG_RING_BUFFER_BENCHMARK is not set
# CONFIG_TRACE_EVAL_MAP_FILE is not set
# CONFIG_FTRACE_STARTUP_TEST is not set
# CONFIG_RING_BUFFER_STARTUP_TEST is not set
CONFIG_RING_BUFFER_VALIDATE_TIME_DELTAS=y
# CONFIG_RING_BUFFER_PERSISTENT_INJECT is not set
# CONFIG_PREEMPTIRQ_DELAY_TEST is not set
# CONFIG_RV is not set
# CONFIG_TRACE_REMOTE_TEST is not set
CONFIG_PROVIDE_OHCI1394_DMA_INIT=y
# CONFIG_SAMPLES is not set
CONFIG_HAVE_SAMPLE_FTRACE_DIRECT=y
CONFIG_HAVE_SAMPLE_FTRACE_DIRECT_MULTI=y
CONFIG_ARCH_HAS_DEVMEM_IS_ALLOWED=y
# CONFIG_STRICT_DEVMEM is not set

#
# x86 Debugging
#
CONFIG_EARLY_PRINTK_USB=y
CONFIG_X86_VERBOSE_BOOTUP=y
CONFIG_EARLY_PRINTK=y
CONFIG_EARLY_PRINTK_DBGP=y
# CONFIG_EARLY_PRINTK_USB_XDBC is not set
# CONFIG_DEBUG_TLBFLUSH is not set
CONFIG_HAVE_MMIOTRACE_SUPPORT=y
# CONFIG_X86_DECODER_SELFTEST is not set
CONFIG_IO_DELAY_0X80=y
# CONFIG_IO_DELAY_0XED is not set
# CONFIG_IO_DELAY_UDELAY is not set
# CONFIG_IO_DELAY_NONE is not set
CONFIG_DEBUG_BOOT_PARAMS=y
# CONFIG_CPA_DEBUG is not set
CONFIG_DEBUG_ENTRY=y
# CONFIG_DEBUG_NMI_SELFTEST is not set
CONFIG_X86_DEBUG_FPU=y
# CONFIG_PUNIT_ATOM_DEBUG is not set
CONFIG_UNWINDER_ORC=y
# CONFIG_UNWINDER_FRAME_POINTER is not set
# end of x86 Debugging

#
# Kernel Testing and Coverage
#
# CONFIG_KUNIT is not set
# CONFIG_NOTIFIER_ERROR_INJECTION is not set
CONFIG_FAULT_INJECTION=y
CONFIG_FAILSLAB=y
CONFIG_FAIL_PAGE_ALLOC=y
CONFIG_FAULT_INJECTION_USERCOPY=y
CONFIG_FAIL_MAKE_REQUEST=y
CONFIG_FAIL_IO_TIMEOUT=y
CONFIG_FAIL_FUTEX=y
CONFIG_FAULT_INJECTION_DEBUG_FS=y
# CONFIG_FAIL_MMC_REQUEST is not set
# CONFIG_FAIL_SKB_REALLOC is not set
CONFIG_FAULT_INJECTION_CONFIGFS=y
# CONFIG_FAULT_INJECTION_STACKTRACE_FILTER is not set
CONFIG_ARCH_HAS_KCOV=y
CONFIG_KCOV=y
CONFIG_KCOV_ENABLE_COMPARISONS=y
CONFIG_KCOV_INSTRUMENT_ALL=y
CONFIG_KCOV_IRQ_AREA_SIZE=0x40000
# CONFIG_KCOV_SELFTEST is not set
CONFIG_RUNTIME_TESTING_MENU=y
# CONFIG_TEST_DHRY is not set
# CONFIG_LKDTM is not set
# CONFIG_TEST_DIV64 is not set
# CONFIG_TEST_MULDIV64 is not set
# CONFIG_BACKTRACE_SELF_TEST is not set
# CONFIG_TEST_REF_TRACKER is not set
# CONFIG_RBTREE_TEST is not set
# CONFIG_REED_SOLOMON_TEST is not set
# CONFIG_INTERVAL_TREE_TEST is not set
# CONFIG_PERCPU_TEST is not set
# CONFIG_ATOMIC64_SELFTEST is not set
# CONFIG_ASYNC_RAID6_TEST is not set
# CONFIG_TEST_HEXDUMP is not set
# CONFIG_TEST_KSTRTOX is not set
# CONFIG_TEST_BITMAP is not set
# CONFIG_TEST_XARRAY is not set
# CONFIG_TEST_MAPLE_TREE is not set
# CONFIG_TEST_RHASHTABLE is not set
# CONFIG_TEST_IDA is not set
# CONFIG_TEST_LKM is not set
# CONFIG_TEST_BITOPS is not set
# CONFIG_TEST_VMALLOC is not set
# CONFIG_TEST_WORKQUEUE is not set
# CONFIG_TEST_BPF is not set
# CONFIG_FIND_BIT_BENCHMARK is not set
# CONFIG_TEST_FIRMWARE is not set
# CONFIG_TEST_SYSCTL is not set
# CONFIG_CONTEXT_ANALYSIS_TEST is not set
# CONFIG_TEST_UDELAY is not set
# CONFIG_TEST_STATIC_KEYS is not set
# CONFIG_TEST_DYNAMIC_DEBUG is not set
# CONFIG_TEST_KMOD is not set
# CONFIG_TEST_KALLSYMS is not set
# CONFIG_TEST_DEBUG_VIRTUAL is not set
# CONFIG_TEST_MEMCAT_P is not set
# CONFIG_TEST_MEMINIT is not set
# CONFIG_TEST_HMM is not set
# CONFIG_TEST_FREE_PAGES is not set
# CONFIG_TEST_CLOCKSOURCE_WATCHDOG is not set
# CONFIG_TEST_OBJPOOL is not set
CONFIG_ARCH_USE_MEMTEST=y
# CONFIG_MEMTEST is not set
# end of Kernel Testing and Coverage

#
# Rust hacking
#
# end of Rust hacking
# end of Kernel hacking

CONFIG_IO_URING_ZCRX=y
CONFIG_IO_URING_BPF=y
KernelRepo git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
ReproCID 0
ReproOpts
ReproSyzID 0
SyzkallerCommit c38879ea49099c3d2a402e615172fc71484df058
TargetArch amd64
TargetOS linux

Outputs:
Reproduced ✅
EquivalenceAnalysis
The reproducer successfully triggered the expected crash: general protection fault in subdev_open. The crash signature and call trace match the original bug report exactly.
OtherCrashReports
ReproC
#define _GNU_SOURCE
#include <fcntl.h>
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include <dirent.h>
#include <errno.h>

char vimc_dev_name[256] = "vimc";

void find_vimc_dev_name(void) {
    DIR *dir = opendir("/sys/bus/platform/devices");
    if (!dir) {
        printf("[-] Failed to opendir /sys/bus/platform/devices: %s\n", strerror(errno));
        exit(1);
    }
    struct dirent *ent;
    int found = 0;
    while ((ent = readdir(dir)) != NULL) {
        if (strncmp(ent->d_name, "vimc", 4) == 0) {
            strcpy(vimc_dev_name, ent->d_name);
            found = 1;
            break;
        }
    }
    closedir(dir);
    if (!found) {
        printf("[-] Could not find vimc device in /sys/bus/platform/devices, using default '%s'\n", vimc_dev_name);
    } else {
        printf("[+] Found vimc device: %s\n", vimc_dev_name);
    }
}

void *bind_unbind_thread(void *arg)
{
    int bind_fd = open("/sys/bus/platform/drivers/vimc/bind", O_WRONLY);
    if (bind_fd < 0) {
        printf("[-] Failed to open bind: %s\n", strerror(errno));
        exit(1);
    }
    int unbind_fd = open("/sys/bus/platform/drivers/vimc/unbind", O_WRONLY);
    if (unbind_fd < 0) {
        printf("[-] Failed to open unbind: %s\n", strerror(errno));
        exit(1);
    }
    printf("[+] Opened sysfs bind/unbind successfully.\n");

    while (1) {
        ssize_t ret = write(unbind_fd, vimc_dev_name, strlen(vimc_dev_name));
        if (ret < 0 && errno != ENODEV && errno != EBUSY) {
            printf("[-] write unbind failed: %s\n", strerror(errno));
            exit(1);
        }
        
        ret = write(bind_fd, vimc_dev_name, strlen(vimc_dev_name));
        if (ret < 0 && errno != ENODEV && errno != EBUSY) {
            printf("[-] write bind failed: %s\n", strerror(errno));
            exit(1);
        }
        usleep(1000);
    }
    return NULL;
}

void *open_thread(void *arg)
{
    char dev_name[32];
    
    while (1) {
        for (int i = 0; i < 64; i++) {
            sprintf(dev_name, "/dev/v4l-subdev%d", i);
            int fd = open(dev_name, O_RDWR | O_NONBLOCK);
            if (fd >= 0) {
                close(fd);
            }
        }
    }
    return NULL;
}

int main(void)
{
    pthread_t t_bind;
    pthread_t t_open[16];
    
    find_vimc_dev_name();
    
    if (pthread_create(&t_bind, NULL, bind_unbind_thread, NULL) != 0) {
        printf("[-] Failed to create bind thread: %s\n", strerror(errno));
        exit(1);
    }
    printf("[+] Created bind/unbind thread.\n");
    
    for (int i = 0; i < 16; i++) {
        if (pthread_create(&t_open[i], NULL, open_thread, NULL) != 0) {
            printf("[-] Failed to create open thread: %s\n", strerror(errno));
            exit(1);
        }
    }
    printf("[+] Created open threads.\n");
    
    sleep(10);
    printf("[+] Reproducer finished\n");
    return 0;
}
ReproducedBugTitle
general protection fault in subdev_open
ReproducedCrashReport
Oops: general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#1] SMP KASAN NOPTI
KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007]
CPU: 1 UID: 0 PID: 5849 Comm: syz-executor254 Not tainted syzkaller #1 PREEMPT(full) 
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
RIP: 0010:subdev_open+0x1bc/0x430 drivers/media/v4l2-core/v4l2-subdev.c:115
Code: 83 7d 00 00 0f 84 aa 00 00 00 4c 89 e0 48 c1 e8 03 80 3c 28 00 74 08 4c 89 e7 e8 5f 85 42 fa 49 8b 1c 24 48 89 d8 48 c1 e8 03 <80> 3c 28 00 74 08 48 89 df e8 46 85 42 fa 4c 8b 2b 4d 85 ed 74 7b
RSP: 0018:ffffc900038bf830 EFLAGS: 00010246
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
RDX: 0000000000000000 RSI: ffffffff8e1683c1 RDI: 00000000ffffffff
RBP: dffffc0000000000 R08: ffffffff90608a37 R09: 1ffffffff20c1146
R10: dffffc0000000000 R11: fffffbfff20c1147 R12: ffff88818e7a8020
R13: ffff88818d82d3d0 R14: ffff88818d038400 R15: ffff8881ff84c000
FS:  00007fbc8dad76c0(0000) GS:ffff8882e86f3000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fe44d9ad43c CR3: 00000001fc981000 CR4: 0000000000352ef0
Call Trace:
 <TASK>
 v4l2_open+0x1bc/0x3a0 drivers/media/v4l2-core/v4l2-dev.c:433
 chrdev_open+0x4d9/0x600 fs/char_dev.c:411
 do_dentry_open+0x816/0x1380 fs/open.c:947
 vfs_open+0x3b/0x340 fs/open.c:1052
 do_open fs/namei.c:4700 [inline]
 path_openat+0x2e44/0x3830 fs/namei.c:4863
 do_file_open+0x23e/0x4a0 fs/namei.c:4892
 do_sys_openat2+0x115/0x200 fs/open.c:1368
 do_sys_open fs/open.c:1374 [inline]
 __do_sys_openat fs/open.c:1390 [inline]
 __se_sys_openat fs/open.c:1385 [inline]
 __x64_sys_openat+0x138/0x170 fs/open.c:1385
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0x174/0x580 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fbc93b3dc9e
Code: 08 0f 85 f5 e2 ff ff 49 89 fb 48 89 f0 48 89 d7 48 89 ce 4c 89 c2 4d 89 ca 4c 8b 44 24 08 4c 8b 4c 24 10 4c 89 5c 24 08 0f 05 <c3> 90 41 57 41 56 4d 89 c6 41 55 4d 89 cd 41 54 55 53 48 83 ec 08
RSP: 002b:00007fbc8dad7128 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 00007fbc8dad76c0 RCX: 00007fbc93b3dc9e
RDX: 0000000000000802 RSI: 00007fbc8dad71e0 RDI: ffffffffffffff9c
RBP: 00007fbc8dad71e0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007fbc93b8809b
R13: 0000000000000000 R14: 00007fff715a0080 R15: 00007fff715a0168
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:subdev_open+0x1bc/0x430 drivers/media/v4l2-core/v4l2-subdev.c:115
Code: 83 7d 00 00 0f 84 aa 00 00 00 4c 89 e0 48 c1 e8 03 80 3c 28 00 74 08 4c 89 e7 e8 5f 85 42 fa 49 8b 1c 24 48 89 d8 48 c1 e8 03 <80> 3c 28 00 74 08 48 89 df e8 46 85 42 fa 4c 8b 2b 4d 85 ed 74 7b
RSP: 0018:ffffc900038bf830 EFLAGS: 00010246

RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
RDX: 0000000000000000 RSI: ffffffff8e1683c1 RDI: 00000000ffffffff
RBP: dffffc0000000000 R08: ffffffff90608a37 R09: 1ffffffff20c1146
R10: dffffc0000000000 R11: fffffbfff20c1147 R12: ffff88818e7a8020
R13: ffff88818d82d3d0 R14: ffff88818d038400 R15: ffff8881ff84c000
FS:  00007fbc8dad76c0(0000) GS:ffff8882e86f3000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fff538bb318 CR3: 00000001fc981000 CR4: 0000000000352ef0
----------------
Code disassembly (best guess):
   0:	83 7d 00 00          	cmpl   $0x0,0x0(%rbp)
   4:	0f 84 aa 00 00 00    	je     0xb4
   a:	4c 89 e0             	mov    %r12,%rax
   d:	48 c1 e8 03          	shr    $0x3,%rax
  11:	80 3c 28 00          	cmpb   $0x0,(%rax,%rbp,1)
  15:	74 08                	je     0x1f
  17:	4c 89 e7             	mov    %r12,%rdi
  1a:	e8 5f 85 42 fa       	call   0xfa42857e
  1f:	49 8b 1c 24          	mov    (%r12),%rbx
  23:	48 89 d8             	mov    %rbx,%rax
  26:	48 c1 e8 03          	shr    $0x3,%rax
* 2a:	80 3c 28 00          	cmpb   $0x0,(%rax,%rbp,1) <-- trapping instruction
  2e:	74 08                	je     0x38
  30:	48 89 df             	mov    %rbx,%rdi
  33:	e8 46 85 42 fa       	call   0xfa42857e
  38:	4c 8b 2b             	mov    (%rbx),%r13
  3b:	4d 85 ed             	test   %r13,%r13
  3e:	74 7b                	je     0xbb

Crash report:
Oops: general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#1] SMP KASAN NOPTI
KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007]
CPU: 1 UID: 0 PID: 11356 Comm: syz.1.1458 Tainted: G             L      syzkaller #0 PREEMPT(full) 
Tainted: [L]=SOFTLOCKUP
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/16/2026
RIP: 0010:subdev_open+0x193/0x510 drivers/media/v4l2-core/v4l2-subdev.c:115
Code: 00 00 00 00 fc ff df 48 c1 ea 03 80 3c 02 00 0f 85 bc 02 00 00 48 b8 00 00 00 00 00 fc ff df 49 8b 2c 24 48 89 ea 48 c1 ea 03 <80> 3c 02 00 0f 85 04 03 00 00 48 8b 6d 00 48 85 ed 0f 84 95 00 00
RSP: 0018:ffffc900037bf8a0 EFLAGS: 00010246
RAX: dffffc0000000000 RBX: ffff888055f54c00 RCX: ffffc90003e51000
RDX: 0000000000000000 RSI: ffffffff88163993 RDI: ffff88802d3ad3d0
RBP: 0000000000000000 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000001 R11: 0000000000000000 R12: ffff88802d414020
R13: ffff88802d70b000 R14: ffff888079c69340 R15: ffff888055f54d38
FS:  00007f15691926c0(0000) GS:ffff888123eed000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f1568387700 CR3: 000000003243a000 CR4: 00000000003526f0
Call Trace:
 <TASK>
 v4l2_open+0x1d2/0x490 drivers/media/v4l2-core/v4l2-dev.c:433
 chrdev_open+0x234/0x6a0 fs/char_dev.c:411
 do_dentry_open+0x6ab/0x14d0 fs/open.c:947
 vfs_open+0x82/0x3f0 fs/open.c:1052
 do_open fs/namei.c:4700 [inline]
 path_openat+0x2873/0x4280 fs/namei.c:4863
 do_file_open+0x20e/0x430 fs/namei.c:4892
 do_sys_openat2+0x10f/0x1e0 fs/open.c:1368
 do_sys_open fs/open.c:1374 [inline]
 __do_sys_openat fs/open.c:1390 [inline]
 __se_sys_openat fs/open.c:1385 [inline]
 __x64_sys_openat+0x12d/0x210 fs/open.c:1385
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0x115/0x870 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f156835e90e
Code: 08 0f 85 a5 a8 ff ff 49 89 fb 48 89 f0 48 89 d7 48 89 ce 4c 89 c2 4d 89 ca 4c 8b 44 24 08 4c 8b 4c 24 10 4c 89 5c 24 08 0f 05 <c3> 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 80 00 00 00 00 48 83 ec 08
RSP: 002b:00007f1569191b28 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 00007f15691926c0 RCX: 00007f156835e90e
RDX: 0000000000000002 RSI: 00007f1569191c00 RDI: ffffffffffffff9c
RBP: 00007f1569191c00 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: cccccccccccccccd
R13: 00007f1568626038 R14: 00007f1568625fa0 R15: 00007ffe228ab238
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:subdev_open+0x193/0x510 drivers/media/v4l2-core/v4l2-subdev.c:115
Code: 00 00 00 00 fc ff df 48 c1 ea 03 80 3c 02 00 0f 85 bc 02 00 00 48 b8 00 00 00 00 00 fc ff df 49 8b 2c 24 48 89 ea 48 c1 ea 03 <80> 3c 02 00 0f 85 04 03 00 00 48 8b 6d 00 48 85 ed 0f 84 95 00 00
RSP: 0018:ffffc900037bf8a0 EFLAGS: 00010246

RAX: dffffc0000000000 RBX: ffff888055f54c00 RCX: ffffc90003e51000
RDX: 0000000000000000 RSI: ffffffff88163993 RDI: ffff88802d3ad3d0
RBP: 0000000000000000 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000001 R11: 0000000000000000 R12: ffff88802d414020
R13: ffff88802d70b000 R14: ffff888079c69340 R15: ffff888055f54d38
FS:  00007f15691926c0(0000) GS:ffff888123ded000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fc283cc07e8 CR3: 000000003243a000 CR4: 00000000003526f0
----------------
Code disassembly (best guess), 7 bytes skipped:
   0:	48 c1 ea 03          	shr    $0x3,%rdx
   4:	80 3c 02 00          	cmpb   $0x0,(%rdx,%rax,1)
   8:	0f 85 bc 02 00 00    	jne    0x2ca
   e:	48 b8 00 00 00 00 00 	movabs $0xdffffc0000000000,%rax
  15:	fc ff df
  18:	49 8b 2c 24          	mov    (%r12),%rbp
  1c:	48 89 ea             	mov    %rbp,%rdx
  1f:	48 c1 ea 03          	shr    $0x3,%rdx
* 23:	80 3c 02 00          	cmpb   $0x0,(%rdx,%rax,1) <-- trapping instruction
  27:	0f 85 04 03 00 00    	jne    0x331
  2d:	48 8b 6d 00          	mov    0x0(%rbp),%rbp
  31:	48 85 ed             	test   %rbp,%rbp
  34:	0f                   	.byte 0xf
  35:	84                   	.byte 0x84
  36:	95                   	xchg   %eax,%ebp

Trajectory: (Expand/Collapse All)
Seq Timestamp Type Name Duration
0/0 2026/08/07 15:42 flow repro-c
1h07m Results:
map[EquivalenceAnalysis:The reproducer successfully triggered the expected crash: general protection fault in subdev_open. The crash signature and call trace match the original bug report exactly. OtherCrashReports:<nil> ReproC:#define _GNU_SOURCE
#include <fcntl.h>
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include <dirent.h>
#include <errno.h>

char vimc_dev_name[256] = "vimc";

void find_vimc_dev_name(void) {
    DIR *dir = opendir("/sys/bus/platform/devices");
    if (!dir) {
        printf("[-] Failed to opendir /sys/bus/platform/devices: %s\n", strerror(errno));
        exit(1);
    }
    struct dirent *ent;
    int found = 0;
    while ((ent = readdir(dir)) != NULL) {
        if (strncmp(ent->d_name, "vimc", 4) == 0) {
            strcpy(vimc_dev_name, ent->d_name);
            found = 1;
            break;
        }
    }
    closedir(dir);
    if (!found) {
        printf("[-] Could not find vimc device in /sys/bus/platform/devices, using default '%s'\n", vimc_dev_name);
    } else {
        printf("[+] Found vimc device: %s\n", vimc_dev_name);
    }
}

void *bind_unbind_thread(void *arg)
{
    int bind_fd = open("/sys/bus/platform/drivers/vimc/bind", O_WRONLY);
    if (bind_fd < 0) {
        printf("[-] Failed to open bind: %s\n", strerror(errno));
        exit(1);
    }
    int unbind_fd = open("/sys/bus/platform/drivers/vimc/unbind", O_WRONLY);
    if (unbind_fd < 0) {
        printf("[-] Failed to open unbind: %s\n", strerror(errno));
        exit(1);
    }
    printf("[+] Opened sysfs bind/unbind successfully.\n");

    while (1) {
        ssize_t ret = write(unbind_fd, vimc_dev_name, strlen(vimc_dev_name));
        if (ret < 0 && errno != ENODEV && errno != EBUSY) {
            printf("[-] write unbind failed: %s\n", strerror(errno));
            exit(1);
        }
        
        ret = write(bind_fd, vimc_dev_name, strlen(vimc_dev_name));
        if (ret < 0 && errno != ENODEV && errno != EBUSY) {
            printf("[-] write bind failed: %s\n", strerror(errno));
            exit(1);
        }
        usleep(1000);
    }
    return NULL;
}

void *open_thread(void *arg)
{
    char dev_name[32];
    
    while (1) {
        for (int i = 0; i < 64; i++) {
            sprintf(dev_name, "/dev/v4l-subdev%d", i);
            int fd = open(dev_name, O_RDWR | O_NONBLOCK);
            if (fd >= 0) {
                close(fd);
            }
        }
    }
    return NULL;
}

int main(void)
{
    pthread_t t_bind;
    pthread_t t_open[16];
    
    find_vimc_dev_name();
    
    if (pthread_create(&t_bind, NULL, bind_unbind_thread, NULL) != 0) {
        printf("[-] Failed to create bind thread: %s\n", strerror(errno));
        exit(1);
    }
    printf("[+] Created bind/unbind thread.\n");
    
    for (int i = 0; i < 16; i++) {
        if (pthread_create(&t_open[i], NULL, open_thread, NULL) != 0) {
            printf("[-] Failed to create open thread: %s\n", strerror(errno));
            exit(1);
        }
    }
    printf("[+] Created open threads.\n");
    
    sleep(10);
    printf("[+] Reproducer finished\n");
    return 0;
}
 Reproduced:true ReproducedBugTitle:general protection fault in subdev_open ReproducedCrashReport:Oops: general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#1] SMP KASAN NOPTI
KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007]
CPU: 1 UID: 0 PID: 5849 Comm: syz-executor254 Not tainted syzkaller #1 PREEMPT(full) 
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
RIP: 0010:subdev_open+0x1bc/0x430 drivers/media/v4l2-core/v4l2-subdev.c:115
Code: 83 7d 00 00 0f 84 aa 00 00 00 4c 89 e0 48 c1 e8 03 80 3c 28 00 74 08 4c 89 e7 e8 5f 85 42 fa 49 8b 1c 24 48 89 d8 48 c1 e8 03 <80> 3c 28 00 74 08 48 89 df e8 46 85 42 fa 4c 8b 2b 4d 85 ed 74 7b
RSP: 0018:ffffc900038bf830 EFLAGS: 00010246
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
RDX: 0000000000000000 RSI: ffffffff8e1683c1 RDI: 00000000ffffffff
RBP: dffffc0000000000 R08: ffffffff90608a37 R09: 1ffffffff20c1146
R10: dffffc0000000000 R11: fffffbfff20c1147 R12: ffff88818e7a8020
R13: ffff88818d82d3d0 R14: ffff88818d038400 R15: ffff8881ff84c000
FS:  00007fbc8dad76c0(0000) GS:ffff8882e86f3000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fe44d9ad43c CR3: 00000001fc981000 CR4: 0000000000352ef0
Call Trace:
 <TASK>
 v4l2_open+0x1bc/0x3a0 drivers/media/v4l2-core/v4l2-dev.c:433
 chrdev_open+0x4d9/0x600 fs/char_dev.c:411
 do_dentry_open+0x816/0x1380 fs/open.c:947
 vfs_open+0x3b/0x340 fs/open.c:1052
 do_open fs/namei.c:4700 [inline]
 path_openat+0x2e44/0x3830 fs/namei.c:4863
 do_file_open+0x23e/0x4a0 fs/namei.c:4892
 do_sys_openat2+0x115/0x200 fs/open.c:1368
 do_sys_open fs/open.c:1374 [inline]
 __do_sys_openat fs/open.c:1390 [inline]
 __se_sys_openat fs/open.c:1385 [inline]
 __x64_sys_openat+0x138/0x170 fs/open.c:1385
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0x174/0x580 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fbc93b3dc9e
Code: 08 0f 85 f5 e2 ff ff 49 89 fb 48 89 f0 48 89 d7 48 89 ce 4c 89 c2 4d 89 ca 4c 8b 44 24 08 4c 8b 4c 24 10 4c 89 5c 24 08 0f 05 <c3> 90 41 57 41 56 4d 89 c6 41 55 4d 89 cd 41 54 55 53 48 83 ec 08
RSP: 002b:00007fbc8dad7128 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 00007fbc8dad76c0 RCX: 00007fbc93b3dc9e
RDX: 0000000000000802 RSI: 00007fbc8dad71e0 RDI: ffffffffffffff9c
RBP: 00007fbc8dad71e0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007fbc93b8809b
R13: 0000000000000000 R14: 00007fff715a0080 R15: 00007fff715a0168
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:subdev_open+0x1bc/0x430 drivers/media/v4l2-core/v4l2-subdev.c:115
Code: 83 7d 00 00 0f 84 aa 00 00 00 4c 89 e0 48 c1 e8 03 80 3c 28 00 74 08 4c 89 e7 e8 5f 85 42 fa 49 8b 1c 24 48 89 d8 48 c1 e8 03 <80> 3c 28 00 74 08 48 89 df e8 46 85 42 fa 4c 8b 2b 4d 85 ed 74 7b
RSP: 0018:ffffc900038bf830 EFLAGS: 00010246

RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
RDX: 0000000000000000 RSI: ffffffff8e1683c1 RDI: 00000000ffffffff
RBP: dffffc0000000000 R08: ffffffff90608a37 R09: 1ffffffff20c1146
R10: dffffc0000000000 R11: fffffbfff20c1147 R12: ffff88818e7a8020
R13: ffff88818d82d3d0 R14: ffff88818d038400 R15: ffff8881ff84c000
FS:  00007fbc8dad76c0(0000) GS:ffff8882e86f3000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fff538bb318 CR3: 00000001fc981000 CR4: 0000000000352ef0
----------------
Code disassembly (best guess):
   0:	83 7d 00 00          	cmpl   $0x0,0x0(%rbp)
   4:	0f 84 aa 00 00 00    	je     0xb4
   a:	4c 89 e0             	mov    %r12,%rax
   d:	48 c1 e8 03          	shr    $0x3,%rax
  11:	80 3c 28 00          	cmpb   $0x0,(%rax,%rbp,1)
  15:	74 08                	je     0x1f
  17:	4c 89 e7             	mov    %r12,%rdi
  1a:	e8 5f 85 42 fa       	call   0xfa42857e
  1f:	49 8b 1c 24          	mov    (%r12),%rbx
  23:	48 89 d8             	mov    %rbx,%rax
  26:	48 c1 e8 03          	shr    $0x3,%rax
* 2a:	80 3c 28 00          	cmpb   $0x0,(%rax,%rbp,1) <-- trapping instruction
  2e:	74 08                	je     0x38
  30:	48 89 df             	mov    %rbx,%rdi
  33:	e8 46 85 42 fa       	call   0xfa42857e
  38:	4c 8b 2b             	mov    (%rbx),%r13
  3b:	4d 85 ed             	test   %r13,%r13
  3e:	74 7b                	je     0xbb
]

1/1 2026/08/07 15:42 action kernel-checkouter
1m Results:
map[KernelSrc:/app/workdir/cache/src/9d4bc8dbb37da7464722132cca9f0756f97b7cb8]

2/1 2026/08/07 15:43 action kernel-builder
15m Results:
map[KernelObj:/app/workdir/cache/build/495ebcb3a488089b977eb39ae949e8c92267255e]

3/1 2026/08/07 15:59 action codesearch-prepare
10m Results:
map[Index:codesearch-index]

4/1 2026/08/07 16:09 agent initial-researcher
26m Model:
best-expensive

Instruction:
You are a security researcher with deep Linux kernel background.
Your goal is to analyze a Linux kernel bug description and propose a strategy to reproduce it
with a minimal, standalone C program for the strictly defensive purpose of verifying a bugfix.

=== TOOL SELECTION GUIDELINES ===
- When looking up C function or struct definitions, prefer codesearch-definition-source
  and codesearch-struct-layout first.
- Fall back to read-file or grepper only if symbol lookup fails or when inspecting macros,
  headers, or non-C files.

=== CRITICAL PROHIBITIONS ===
- Do NOT propose an exploit. Focus solely on minimal technical reproduction of the bug state.
- Do NOT write long explanations. Keep your analysis and strategy proposal concise.
- Do NOT assume that the target bug has already been fixed just because a git commit title
  or description mentions a similar bug or fix. Commit messages often reference related issues
  or partial fixes. Proceed with proposing a reproduction strategy regardless of historical fix commits.
Prefer calling several tools at the same time to save round-trips.

Prompt:
Bug Description: general protection fault in subdev_open

Oops: general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#1] SMP KASAN NOPTI
KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007]
CPU: 1 UID: 0 PID: 11356 Comm: syz.1.1458 Tainted: G             L      syzkaller #0 PREEMPT(full) 
Tainted: [L]=SOFTLOCKUP
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/16/2026
RIP: 0010:subdev_open+0x193/0x510 drivers/media/v4l2-core/v4l2-subdev.c:115
Code: 00 00 00 00 fc ff df 48 c1 ea 03 80 3c 02 00 0f 85 bc 02 00 00 48 b8 00 00 00 00 00 fc ff df 49 8b 2c 24 48 89 ea 48 c1 ea 03 <80> 3c 02 00 0f 85 04 03 00 00 48 8b 6d 00 48 85 ed 0f 84 95 00 00
RSP: 0018:ffffc900037bf8a0 EFLAGS: 00010246
RAX: dffffc0000000000 RBX: ffff888055f54c00 RCX: ffffc90003e51000
RDX: 0000000000000000 RSI: ffffffff88163993 RDI: ffff88802d3ad3d0
RBP: 0000000000000000 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000001 R11: 0000000000000000 R12: ffff88802d414020
R13: ffff88802d70b000 R14: ffff888079c69340 R15: ffff888055f54d38
FS:  00007f15691926c0(0000) GS:ffff888123eed000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f1568387700 CR3: 000000003243a000 CR4: 00000000003526f0
Call Trace:
 <TASK>
 v4l2_open+0x1d2/0x490 drivers/media/v4l2-core/v4l2-dev.c:433
 chrdev_open+0x234/0x6a0 fs/char_dev.c:411
 do_dentry_open+0x6ab/0x14d0 fs/open.c:947
 vfs_open+0x82/0x3f0 fs/open.c:1052
 do_open fs/namei.c:4700 [inline]
 path_openat+0x2873/0x4280 fs/namei.c:4863
 do_file_open+0x20e/0x430 fs/namei.c:4892
 do_sys_openat2+0x10f/0x1e0 fs/open.c:1368
 do_sys_open fs/open.c:1374 [inline]
 __do_sys_openat fs/open.c:1390 [inline]
 __se_sys_openat fs/open.c:1385 [inline]
 __x64_sys_openat+0x12d/0x210 fs/open.c:1385
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0x115/0x870 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f156835e90e
Code: 08 0f 85 a5 a8 ff ff 49 89 fb 48 89 f0 48 89 d7 48 89 ce 4c 89 c2 4d 89 ca 4c 8b 44 24 08 4c 8b 4c 24 10 4c 89 5c 24 08 0f 05 <c3> 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 80 00 00 00 00 48 83 ec 08
RSP: 002b:00007f1569191b28 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 00007f15691926c0 RCX: 00007f156835e90e
RDX: 0000000000000002 RSI: 00007f1569191c00 RDI: ffffffffffffff9c
RBP: 00007f1569191c00 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: cccccccccccccccd
R13: 00007f1568626038 R14: 00007f1568625fa0 R15: 00007ffe228ab238
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:subdev_open+0x193/0x510 drivers/media/v4l2-core/v4l2-subdev.c:115
Code: 00 00 00 00 fc ff df 48 c1 ea 03 80 3c 02 00 0f 85 bc 02 00 00 48 b8 00 00 00 00 00 fc ff df 49 8b 2c 24 48 89 ea 48 c1 ea 03 <80> 3c 02 00 0f 85 04 03 00 00 48 8b 6d 00 48 85 ed 0f 84 95 00 00
RSP: 0018:ffffc900037bf8a0 EFLAGS: 00010246

RAX: dffffc0000000000 RBX: ffff888055f54c00 RCX: ffffc90003e51000
RDX: 0000000000000000 RSI: ffffffff88163993 RDI: ffff88802d3ad3d0
RBP: 0000000000000000 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000001 R11: 0000000000000000 R12: ffff88802d414020
R13: ffff88802d70b000 R14: ffff888079c69340 R15: ffff888055f54d38
FS:  00007f15691926c0(0000) GS:ffff888123ded000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fc283cc07e8 CR3: 000000003243a000 CR4: 00000000003526f0
----------------
Code disassembly (best guess), 7 bytes skipped:
   0:	48 c1 ea 03          	shr    $0x3,%rdx
   4:	80 3c 02 00          	cmpb   $0x0,(%rdx,%rax,1)
   8:	0f 85 bc 02 00 00    	jne    0x2ca
   e:	48 b8 00 00 00 00 00 	movabs $0xdffffc0000000000,%rax
  15:	fc ff df
  18:	49 8b 2c 24          	mov    (%r12),%rbp
  1c:	48 89 ea             	mov    %rbp,%rdx
  1f:	48 c1 ea 03          	shr    $0x3,%rdx
* 23:	80 3c 02 00          	cmpb   $0x0,(%rdx,%rax,1) <-- trapping instruction
  27:	0f 85 04 03 00 00    	jne    0x331
  2d:	48 8b 6d 00          	mov    0x0(%rbp),%rbp
  31:	48 85 ed             	test   %rbp,%rbp
  34:	0f                   	.byte 0xf
  35:	84                   	.byte 0x84
  36:	95                   	xchg   %eax,%ebp

Reply:
An analysis of the crash reveals a classic Time-Of-Check to Time-Of-Use (TOCTOU) race condition between opening a sub-device node and unregistering the sub-device.

### Root Cause Analysis
The crash occurs in `subdev_open()` at `drivers/media/v4l2-core/v4l2-subdev.c`:
```c
	if (sd->v4l2_dev->mdev && sd->entity.graph_obj.mdev->dev) {
```
The KASAN report indicates a NULL pointer dereference for the exact address `0xdffffc0000000000`, which is the KASAN shadow address for `NULL` (0). The assembly confirms that `sd->entity.graph_obj.mdev` is being loaded into `%rbp` and evaluated as `NULL`, causing the fault when attempting to access `->dev`.

This happens due to a race with `v4l2_device_unregister_subdev()` (called during device removal/unbind):
```c
void v4l2_device_unregister_subdev(struct v4l2_subdev *sd)
{
	// ...
	sd->v4l2_dev = NULL;

#if defined(CONFIG_MEDIA_CONTROLLER)
	if (v4l2_dev->mdev) {
		media_device_unregister_entity(&sd->entity); // Sets sd->entity.graph_obj.mdev = NULL
	}
#endif
	if (sd->devnode)
		video_unregister_device(sd->devnode);
	// ...
}
```
Notice that `video_unregister_device()` is called **after** modifying `sd->v4l2_dev` and unregistering the media entity. 

The race interleaving is as follows:
1. **Thread A (userspace `open`)**: Calls `v4l2_open()`, successfully acquires a reference to the video device (since it hasn't been unregistered yet), and calls `subdev_open()`.
2. **Thread A**: Evaluates `sd->v4l2_dev->mdev` and finds it non-NULL.
3. **Thread B (driver unbind)**: Calls `v4l2_device_unregister_subdev()`. It sets `sd->v4l2_dev = NULL` and calls `media_device_unregister_entity()`, which sets `sd->entity.graph_obj.mdev = NULL`.
4. **Thread A**: Resumes and evaluates `sd->entity.graph_obj.mdev`. It gets `NULL` and crashes when dereferencing `->dev`.

### Reproduction Strategy
To reproduce this bug, we can use the `vimc` (Virtual Media Controller) test driver, which is a software-only driver that registers `v4l2_subdev`s with device nodes (`V4L2_SUBDEV_FL_HAS_DEVNODE`).

1. **Setup**: Ensure the `vimc` module is loaded. It registers a platform device named `vimc`.
2. **Thread 1 (Unbind/Bind Loop)**: Continuously write `"vimc"` to `/sys/bus/platform/drivers/vimc/unbind` and then to `bind`. This rapidly triggers `vimc_remove()` and `v4l2_device_unregister_subdev()`.
3. **Threads 2-N (Open Loop)**: Continuously call `open()` and `close()` on the `/dev/v4l-subdevX` nodes created by `vimc`.

### Minimal C Reproducer
```c
#define _GNU_SOURCE
#include <fcntl.h>
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>

void *bind_unbind_thread(void *arg)
{
    int bind_fd = open("/sys/bus/platform/drivers/vimc/bind", O_WRONLY);
    int unbind_fd = open("/sys/bus/platform/drivers/vimc/unbind", O_WRONLY);
    
    if (bind_fd < 0 || unbind_fd < 0) {
        perror("Failed to open sysfs bind/unbind (is vimc loaded?)");
        return NULL;
    }

    while (1) {
        write(unbind_fd, "vimc", 4);
        usleep(1000);
        write(bind_fd, "vimc", 4);
        usleep(10000);
    }
    return NULL;
}

void *open_thread(void *arg)
{
    char dev_name[32];
    int id = (int)(long)arg;
    
    /* vimc creates multiple subdevs, we race on them */
    sprintf(dev_name, "/dev/v4l-subdev%d", id);
    
    while (1) {
        int fd = open(dev_name, O_RDWR);
        if (fd >= 0) {
            close(fd);
        }
    }
    return NULL;
}

int main(void)
{
    pthread_t t_bind;
    pthread_t t_open[16];
    
    pthread_create(&t_bind, NULL, bind_unbind_thread, NULL);
    
    for (int i = 0; i < 16; i++) {
        pthread_create(&t_open[i], NULL, open_thread, (void *)(long)i);
    }
    
    pthread_join(t_bind, NULL);
    return 0;
}
```

5/2 2026/08/07 16:09 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 5341
							output: 48
							thoughts: 132
						

Thoughts:
**My Debugging Journey: Tracing a Null Pointer Dereference in `subdev_open`**

My current focus is on a rather irritating kernel crash, a general protection fault occurring within the `subdev_open` function. I've pinpointed the exact location: `drivers/media/v4l2-core/v4l2-subdev.c:115`. What's particularly concerning is that this isn't just any fault; KASAN is reporting a null-pointer dereference, and the problematic memory range is distressingly small, sitting squarely in `[0x0000000000000000-0x0000000000000007]`. This immediately tells me I'm dealing with a fundamental issue, likely an uninitialized pointer or a pointer that's been prematurely freed, pointing to the very bottom of the address space. My next logical step, therefore, is to dive deep into the source code of `subdev_open` itself, within `drivers/media/v4l2-core/v4l2-subdev.c`, to understand how this null pointer is being accessed and what might be leading to its null state.


6/2 2026/08/07 16:09 tool codesearch-definition-source
0m Args:
map[ContextFile:drivers/media/v4l2-core/v4l2-subdev.c Name:subdev_open]

Results:
map[SourceCode:  95:	static int subdev_open(struct file *file)
  96:	{
  97:		struct video_device *vdev = video_devdata(file);
  98:		struct v4l2_subdev *sd = vdev_to_v4l2_subdev(vdev);
  99:		struct v4l2_subdev_fh *subdev_fh;
 100:		int ret;
 101:	
 102:		subdev_fh = kzalloc_obj(*subdev_fh);
 103:		if (subdev_fh == NULL)
 104:			return -ENOMEM;
 105:	
 106:		ret = subdev_fh_init(subdev_fh, sd);
 107:		if (ret) {
 108:			kfree(subdev_fh);
 109:			return ret;
 110:		}
 111:	
 112:		v4l2_fh_init(&subdev_fh->vfh, vdev);
 113:		v4l2_fh_add(&subdev_fh->vfh, file);
 114:	
 115:		if (sd->v4l2_dev->mdev && sd->entity.graph_obj.mdev->dev) {
 116:			struct module *owner;
 117:	
 118:			owner = sd->entity.graph_obj.mdev->dev->driver->owner;
 119:			if (!try_module_get(owner)) {
 120:				ret = -EBUSY;
 121:				goto err;
 122:			}
 123:			subdev_fh->owner = owner;
 124:		}
 125:	
 126:		if (sd->internal_ops && sd->internal_ops->open) {
 127:			ret = sd->internal_ops->open(sd, subdev_fh);
 128:			if (ret < 0)
 129:				goto err;
 130:		}
 131:	
 132:		return 0;
 133:	
 134:	err:
 135:		module_put(subdev_fh->owner);
 136:		v4l2_fh_del(&subdev_fh->vfh, file);
 137:		v4l2_fh_exit(&subdev_fh->vfh);
 138:		subdev_fh_free(subdev_fh);
 139:		kfree(subdev_fh);
 140:	
 141:		return ret;
 142:	}
 SourceFile:drivers/media/v4l2-core/v4l2-subdev.c]

7/2 2026/08/07 16:09 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 6257
							output: 51
							thoughts: 95
						

Thoughts:
**My Diagnostic Journey**

Alright, so I'm staring at line 115: `if (sd->v4l2_dev->mdev && sd->entity.graph_obj.mdev->dev) {`. My immediate suspicion, given the context of a crash and the nature of that line, is a null pointer dereference. The most probable culprit here is `sd->v4l2_dev` itself being NULL. If that's the case, then attempting to access `->mdev` on it would, of course, blow up.

To confirm or deny this hypothesis, I need to understand the structure of `v4l2_subdev`. Specifically, I need to locate the `v4l2_dev` member within it. This will tell me how it's supposed to be populated and what the expected relationship is between `sd` and its `v4l2_dev` field. Once I see the struct layout, I can better reason about how `sd->v4l2_dev` might end up being NULL in the first place, and then I can trace back the code path leading to this point to pinpoint the exact condition that causes this failure.


8/2 2026/08/07 16:09 tool codesearch-struct-layout
0m Args:
map[ContextFile:drivers/media/v4l2-core/v4l2-subdev.c Name:v4l2_subdev]

Results:
map[Fields:[map[Name:entity OffsetBits:0 SizeBits:960] map[Name:list OffsetBits:960 SizeBits:128] map[Name:owner OffsetBits:1088 SizeBits:64] map[Name:owner_v4l2_dev OffsetBits:1152 SizeBits:8] map[Name:flags OffsetBits:1184 SizeBits:32] map[Name:v4l2_dev OffsetBits:1216 SizeBits:64] map[Name:ops OffsetBits:1280 SizeBits:64] map[Name:internal_ops OffsetBits:1344 SizeBits:64] map[Name:ctrl_handler OffsetBits:1408 SizeBits:64] map[Name:name OffsetBits:1472 SizeBits:416] map[Name:grp_id OffsetBits:1888 SizeBits:32] map[Name:dev_priv OffsetBits:1920 SizeBits:64] map[Name:host_priv OffsetBits:1984 SizeBits:64] map[Name:devnode OffsetBits:2048 SizeBits:64] map[Name:dev OffsetBits:2112 SizeBits:64] map[Name:fwnode OffsetBits:2176 SizeBits:64] map[Name:async_list OffsetBits:2240 SizeBits:128] map[Name:async_subdev_endpoint_list OffsetBits:2368 SizeBits:128] map[Name:subdev_notifier OffsetBits:2496 SizeBits:64] map[Name:asc_list OffsetBits:2560 SizeBits:128] map[Name:pdata OffsetBits:2688 SizeBits:64] map[Name:state_lock OffsetBits:2752 SizeBits:64] map[Name:privacy_led OffsetBits:2816 SizeBits:64] map[Name:active_state OffsetBits:2880 SizeBits:64] map[Name:enabled_pads OffsetBits:2944 SizeBits:64] map[Name:s_stream_enabled OffsetBits:3008 SizeBits:8]]]

9/2 2026/08/07 16:09 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 6767
							output: 56
							thoughts: 479
						

Thoughts:
**Tracing a KASAN Trap: The `v4l2_dev` Dereference**

Alright, let's break down what's happening here. I've identified that `v4l2_dev` is located at offset 1216 bits, or 152 bytes, within some structure. The assembly code shows a critical sequence: a `mov` into `%rbp` from `(%r12)`, followed by a shift right on `%rbp` into `%rdx`, and then a `cmpb` instruction that's triggering the trap. This `cmpb $0x0, (%rdx,%rax,1)` is the culprit.

My initial thought was that `%rbp` was being dereferenced directly after being loaded from `(%r12)`. If `%r12` holds `0xffff88802d414020`, and the subsequent `mov 0x0(%rbp), %rbp` were to execute, then `%rbp` would indeed become `0x0000000000000000`, leading to a NULL pointer dereference. However, the trap isn't there; it's at the `cmpb`.

This means the problem lies with the values involved in the `cmpb` instruction itself. I've determined that `%rdx` is zero. This makes sense because `%rbp` (which was initially loaded from `(%r12)`) was zero, and then `shr $0x3, %rdx` on a zero value still results in zero. The other component, `%rax`, is `0xdffffc0000000000`. This value immediately screams "KASAN shadow offset" to me.

Therefore, the `cmpb` is effectively checking the KASAN shadow memory at address zero. Attempting to read from address zero is what's causing the fault. This implies that the value loaded into `%rbp` from `(%r12)` *was* zero. And that brings me back to `%r12` itself. What is the context for `%r12`? My investigation points towards `subdev_open` and the `sd` variable, which is derived from `vdev_to_v4l2_subdev(vdev)`. I need to examine `vdev_to_v4l2_subdev` to understand why `(%r12)` is yielding a zero value, leading to this KASAN-related trap.


10/2 2026/08/07 16:09 tool codesearch-definition-source
0m Error:
log-in to see details

Args:
map[ContextFile:drivers/media/v4l2-core/v4l2-subdev.c Name:vdev_to_v4l2_subdev]

Results:
map[SourceCode: SourceFile:]

11/2 2026/08/07 16:09 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 7307
							output: 26
							thoughts: 19
						

Thoughts:
**My Thought Process on `vdev_to_v4l2_subdev`**

Ah, so the first thing that comes to mind when presented with this task is, "Where is this `vdev_to_v4l2_subdev` likely to be used, and what's its purpose?" My immediate instinct is to look for its definition and its call sites. Given the name, `vdev_to_v4l2_subdev`, it sounds like a utility function or a lookup mechanism designed to bridge the gap between a "vdev" (which I'm assuming refers to some kind of generic video device abstraction, perhaps within a driver framework) and a specific Video4Linux2 subdevice. This kind of mapping is common when you have a layered architecture where a higher-level API needs to interact with lower-level, more specific hardware interfaces.

So, the plan is to use `grep` to find all occurrences of `vdev_to_v4l2_subdev`. This will tell me, at a glance, where this function is defined and, more importantly, where it's being *called*. The call sites will reveal the context of its usage. Are we using it to find the subdevice that a particular vdev is associated with? Is it part of an initialization routine? Or perhaps it's used during error handling or resource management?

By examining these call sites, I can start to infer the function's arguments and return values. What information does it need to perform the mapping? Does it take a `vdev` pointer and return a `v4l2_subdev` pointer? Or perhaps it takes a specific identifier for the vdev and returns a pointer to the relevant subdevice structure. The return value will be crucial for understanding what the caller does with the resulting `v4l2_subdev` – perhaps it directly calls V4L2 subdev operations, or maybe it's just for informational purposes.

Ultimately, this `grep` is the first step in understanding the role of `vdev_to_v4l2_subdev` within the broader system. It's about tracing the flow of information and control, and identifying the specific interactions between different components of the video subsystem. I'll be looking for patterns that suggest how this mapping is established and utilized, which will be key to understanding the overall architecture and functionality.


12/2 2026/08/07 16:09 tool grepper
0m Args:
map[Expression:vdev_to_v4l2_subdev]

Results:
map[Output:drivers/media/v4l2-core/v4l2-subdev.c=95=static int subdev_open(struct file *file)
--
drivers/media/v4l2-core/v4l2-subdev.c-97-	struct video_device *vdev = video_devdata(file);
drivers/media/v4l2-core/v4l2-subdev.c:98:	struct v4l2_subdev *sd = vdev_to_v4l2_subdev(vdev);
drivers/media/v4l2-core/v4l2-subdev.c-99-	struct v4l2_subdev_fh *subdev_fh;
--
drivers/media/v4l2-core/v4l2-subdev.c=144=static int subdev_close(struct file *file)
--
drivers/media/v4l2-core/v4l2-subdev.c-146-	struct video_device *vdev = video_devdata(file);
drivers/media/v4l2-core/v4l2-subdev.c:147:	struct v4l2_subdev *sd = vdev_to_v4l2_subdev(vdev);
drivers/media/v4l2-core/v4l2-subdev.c-148-	struct v4l2_fh *vfh = file_to_v4l2_fh(file);
--
drivers/media/v4l2-core/v4l2-subdev.c=644=static long subdev_do_ioctl(struct file *file, unsigned int cmd, void *arg,
--
drivers/media/v4l2-core/v4l2-subdev.c-647-	struct video_device *vdev = video_devdata(file);
drivers/media/v4l2-core/v4l2-subdev.c:648:	struct v4l2_subdev *sd = vdev_to_v4l2_subdev(vdev);
drivers/media/v4l2-core/v4l2-subdev.c-649-	struct v4l2_fh *vfh = file_to_v4l2_fh(file);
--
drivers/media/v4l2-core/v4l2-subdev.c=1152=static long subdev_do_ioctl_lock(struct file *file, unsigned int cmd, void *arg)
--
drivers/media/v4l2-core/v4l2-subdev.c-1161-	if (video_is_registered(vdev)) {
drivers/media/v4l2-core/v4l2-subdev.c:1162:		struct v4l2_subdev *sd = vdev_to_v4l2_subdev(vdev);
drivers/media/v4l2-core/v4l2-subdev.c-1163-		struct v4l2_fh *vfh = file_to_v4l2_fh(file);
--
drivers/media/v4l2-core/v4l2-subdev.c=1190=static long subdev_compat_ioctl32(struct file *file, unsigned int cmd,
--
drivers/media/v4l2-core/v4l2-subdev.c-1193-	struct video_device *vdev = video_devdata(file);
drivers/media/v4l2-core/v4l2-subdev.c:1194:	struct v4l2_subdev *sd = vdev_to_v4l2_subdev(vdev);
drivers/media/v4l2-core/v4l2-subdev.c-1195-
--
drivers/media/v4l2-core/v4l2-subdev.c=1216=static __poll_t subdev_poll(struct file *file, poll_table *wait)
--
drivers/media/v4l2-core/v4l2-subdev.c-1218-	struct video_device *vdev = video_devdata(file);
drivers/media/v4l2-core/v4l2-subdev.c:1219:	struct v4l2_subdev *sd = vdev_to_v4l2_subdev(vdev);
drivers/media/v4l2-core/v4l2-subdev.c-1220-	struct v4l2_fh *fh = file_to_v4l2_fh(file);
--
include/media/v4l2-subdev.h=1050=struct v4l2_subdev {
--
include/media/v4l2-subdev.h-1110-/**
include/media/v4l2-subdev.h:1111: * vdev_to_v4l2_subdev - Returns a &struct v4l2_subdev from
include/media/v4l2-subdev.h-1112- *	the &struct video_device embedded on it.
--
include/media/v4l2-subdev.h-1115- */
include/media/v4l2-subdev.h:1116:#define vdev_to_v4l2_subdev(vdev) \
include/media/v4l2-subdev.h-1117-	((struct v4l2_subdev *)video_get_drvdata(vdev))
]

13/2 2026/08/07 16:09 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 8728
							output: 20
							thoughts: 73
						

Thoughts:
**My Thought Process Regarding `vdev_to_v4l2_subdev`**

So, the first thing that strikes me is this `vdev_to_v4l2_subdev` entity. My immediate instinct, given my familiarity with kernel APIs, is that it's likely a macro. Macros are such common tools for encapsulating common patterns and simplifying type conversions or data retrieval, especially in a driver model like the V4L2 subsystem.

And indeed, when I look at its definition, my hunch is confirmed:

```c
#define vdev_to_v4l2_subdev(vdev) ((struct v4l2_subdev *)video_get_drvdata(vdev))
```

This confirms my initial assessment. It's a macro, designed to take a `vdev` (which I presume refers to a `struct video_device`, a core V4L2 entity representing a video device) and cast its driver-private data to a `struct v4l2_subdev`. This is a very typical pattern for associating a generic `video_device` structure with a more specific driver-specific data structure, in this case, a `v4l2_subdev`.

The critical part of this macro is the call to `video_get_drvdata(vdev)`. This function, I know, is the standard V4L2 way to retrieve the driver-specific data that was previously attached to a `struct video_device` using `video_set_drvdata`. The casting `(struct v4l2_subdev *)` is necessary because `video_get_drvdata` typically returns a `void *`, and this macro provides the necessary type information to treat that `void *` as a pointer to a `struct v4l2_subdev`.

Therefore, my next step in understanding the context of `vdev_to_v4l2_subdev` is to delve into the implementation and usage of `video_get_drvdata`. I need to understand precisely how `drvdata` is set and what kind of data is expected to be stored there in the context of V4L2 subdevices. This will clarify the relationship and data flow between a `video_device` and its associated `v4l2_subdev`.


14/2 2026/08/07 16:09 tool grepper
0m Args:
map[Expression:video_get_drvdata]

Results:
map[Output:
Full output is too long, showing 500 out of 1091 lines.
Use more precise expression if possible.

Documentation/driver-api/media/v4l2-dev.rst=323=You can set/get driver private data in the video_device struct using:
Documentation/driver-api/media/v4l2-dev.rst-324-
Documentation/driver-api/media/v4l2-dev.rst:325:	:c:func:`video_get_drvdata <video_get_drvdata>`
Documentation/driver-api/media/v4l2-dev.rst-326-	(:c:type:`vdev <video_device>`);
--
Documentation/driver-api/media/v4l2-dev.rst=339=returns the video_device belonging to the file struct.
Documentation/driver-api/media/v4l2-dev.rst-340-
Documentation/driver-api/media/v4l2-dev.rst:341:The :c:func:`video_devdata` function combines :c:func:`video_get_drvdata`
Documentation/driver-api/media/v4l2-dev.rst-342-with :c:func:`video_devdata`:
--
Documentation/translations/zh_CN/video4linux/v4l2-framework.txt=730=video_device 辅助函数
--
Documentation/translations/zh_CN/video4linux/v4l2-framework.txt-738-
Documentation/translations/zh_CN/video4linux/v4l2-framework.txt:739:void *video_get_drvdata(struct video_device *vdev);
Documentation/translations/zh_CN/video4linux/v4l2-framework.txt-740-void video_set_drvdata(struct video_device *vdev, void *data);
--
Documentation/translations/zh_CN/video4linux/v4l2-framework.txt=747=struct video_device *video_devdata(struct file *file);
--
Documentation/translations/zh_CN/video4linux/v4l2-framework.txt-750-
Documentation/translations/zh_CN/video4linux/v4l2-framework.txt:751:video_drvdata 辅助函数结合了 video_get_drvdata 和 video_devdata
Documentation/translations/zh_CN/video4linux/v4l2-framework.txt-752-的功能:
--
drivers/media/i2c/video-i2c.c=735=static void video_i2c_release(struct video_device *vdev)
drivers/media/i2c/video-i2c.c-736-{
drivers/media/i2c/video-i2c.c:737:	struct video_i2c_data *data = video_get_drvdata(vdev);
drivers/media/i2c/video-i2c.c-738-
--
drivers/media/pci/bt8xx/bttv-driver.c=173=static ssize_t card_show(struct device *cd,
--
drivers/media/pci/bt8xx/bttv-driver.c-176-	struct video_device *vfd = to_video_device(cd);
drivers/media/pci/bt8xx/bttv-driver.c:177:	struct bttv *btv = video_get_drvdata(vfd);
drivers/media/pci/bt8xx/bttv-driver.c-178-	return sprintf(buf, "%d\n", btv ? btv->c.type : UNSET);
--
drivers/media/pci/cx18/cx18-fileops.c=775=int cx18_v4l2_open(struct file *filp)
--
drivers/media/pci/cx18/cx18-fileops.c-778-	struct video_device *video_dev = video_devdata(filp);
drivers/media/pci/cx18/cx18-fileops.c:779:	struct cx18_stream *s = video_get_drvdata(video_dev);
drivers/media/pci/cx18/cx18-fileops.c-780-	struct cx18 *cx = s->cx;
--
drivers/media/pci/intel/ipu3/ipu3-cio2.c=1296=static int cio2_video_link_validate(struct media_link *link)
--
drivers/media/pci/intel/ipu3/ipu3-cio2.c-1300-	struct cio2_queue *q = container_of(vd, struct cio2_queue, vdev);
drivers/media/pci/intel/ipu3/ipu3-cio2.c:1301:	struct cio2_device *cio2 = video_get_drvdata(vd);
drivers/media/pci/intel/ipu3/ipu3-cio2.c-1302-	struct device *dev = &cio2->pci_dev->dev;
--
drivers/media/pci/ivtv/ivtv-fileops.c=943=static int ivtv_open(struct file *filp)
--
drivers/media/pci/ivtv/ivtv-fileops.c-945-	struct video_device *vdev = video_devdata(filp);
drivers/media/pci/ivtv/ivtv-fileops.c:946:	struct ivtv_stream *s = video_get_drvdata(vdev);
drivers/media/pci/ivtv/ivtv-fileops.c-947-	struct ivtv *itv = s->itv;
--
drivers/media/pci/mgb4/mgb4_sysfs_in.c=19=static ssize_t input_id_show(struct device *dev,
--
drivers/media/pci/mgb4/mgb4_sysfs_in.c-22-	struct video_device *vdev = to_video_device(dev);
drivers/media/pci/mgb4/mgb4_sysfs_in.c:23:	struct mgb4_vin_dev *vindev = video_get_drvdata(vdev);
drivers/media/pci/mgb4/mgb4_sysfs_in.c-24-
--
drivers/media/pci/mgb4/mgb4_sysfs_in.c=28=static ssize_t oldi_lane_width_show(struct device *dev,
--
drivers/media/pci/mgb4/mgb4_sysfs_in.c-31-	struct video_device *vdev = to_video_device(dev);
drivers/media/pci/mgb4/mgb4_sysfs_in.c:32:	struct mgb4_vin_dev *vindev = video_get_drvdata(vdev);
drivers/media/pci/mgb4/mgb4_sysfs_in.c-33-	struct mgb4_dev *mgbdev = vindev->mgbdev;
--
drivers/media/pci/mgb4/mgb4_sysfs_in.c=68=static ssize_t oldi_lane_width_store(struct device *dev,
--
drivers/media/pci/mgb4/mgb4_sysfs_in.c-72-	struct video_device *vdev = to_video_device(dev);
drivers/media/pci/mgb4/mgb4_sysfs_in.c:73:	struct mgb4_vin_dev *vindev = video_get_drvdata(vdev);
drivers/media/pci/mgb4/mgb4_sysfs_in.c-74-	struct mgb4_dev *mgbdev = vindev->mgbdev;
--
drivers/media/pci/mgb4/mgb4_sysfs_in.c=123=static ssize_t color_mapping_show(struct device *dev,
--
drivers/media/pci/mgb4/mgb4_sysfs_in.c-126-	struct video_device *vdev = to_video_device(dev);
drivers/media/pci/mgb4/mgb4_sysfs_in.c:127:	struct mgb4_vin_dev *vindev = video_get_drvdata(vdev);
drivers/media/pci/mgb4/mgb4_sysfs_in.c-128-	u32 config = mgb4_read_reg(&vindev->mgbdev->video,
--
drivers/media/pci/mgb4/mgb4_sysfs_in.c=147=static ssize_t color_mapping_store(struct device *dev,
--
drivers/media/pci/mgb4/mgb4_sysfs_in.c-151-	struct video_device *vdev = to_video_device(dev);
drivers/media/pci/mgb4/mgb4_sysfs_in.c:152:	struct mgb4_vin_dev *vindev = video_get_drvdata(vdev);
drivers/media/pci/mgb4/mgb4_sysfs_in.c-153-	u32 fpga_data;
--
drivers/media/pci/mgb4/mgb4_sysfs_in.c=181=static ssize_t link_status_show(struct device *dev,
--
drivers/media/pci/mgb4/mgb4_sysfs_in.c-184-	struct video_device *vdev = to_video_device(dev);
drivers/media/pci/mgb4/mgb4_sysfs_in.c:185:	struct mgb4_vin_dev *vindev = video_get_drvdata(vdev);
drivers/media/pci/mgb4/mgb4_sysfs_in.c-186-	u32 status = mgb4_read_reg(&vindev->mgbdev->video,
--
drivers/media/pci/mgb4/mgb4_sysfs_in.c=192=static ssize_t stream_status_show(struct device *dev,
--
drivers/media/pci/mgb4/mgb4_sysfs_in.c-195-	struct video_device *vdev = to_video_device(dev);
drivers/media/pci/mgb4/mgb4_sysfs_in.c:196:	struct mgb4_vin_dev *vindev = video_get_drvdata(vdev);
drivers/media/pci/mgb4/mgb4_sysfs_in.c-197-	u32 status = mgb4_read_reg(&vindev->mgbdev->video,
--
drivers/media/pci/mgb4/mgb4_sysfs_in.c=204=static ssize_t video_width_show(struct device *dev,
--
drivers/media/pci/mgb4/mgb4_sysfs_in.c-207-	struct video_device *vdev = to_video_device(dev);
drivers/media/pci/mgb4/mgb4_sysfs_in.c:208:	struct mgb4_vin_dev *vindev = video_get_drvdata(vdev);
drivers/media/pci/mgb4/mgb4_sysfs_in.c-209-	u32 config = mgb4_read_reg(&vindev->mgbdev->video,
--
drivers/media/pci/mgb4/mgb4_sysfs_in.c=215=static ssize_t video_height_show(struct device *dev,
--
drivers/media/pci/mgb4/mgb4_sysfs_in.c-218-	struct video_device *vdev = to_video_device(dev);
drivers/media/pci/mgb4/mgb4_sysfs_in.c:219:	struct mgb4_vin_dev *vindev = video_get_drvdata(vdev);
drivers/media/pci/mgb4/mgb4_sysfs_in.c-220-	u32 config = mgb4_read_reg(&vindev->mgbdev->video,
--
drivers/media/pci/mgb4/mgb4_sysfs_in.c=226=static ssize_t hsync_status_show(struct device *dev,
--
drivers/media/pci/mgb4/mgb4_sysfs_in.c-229-	struct video_device *vdev = to_video_device(dev);
drivers/media/pci/mgb4/mgb4_sysfs_in.c:230:	struct mgb4_vin_dev *vindev = video_get_drvdata(vdev);
drivers/media/pci/mgb4/mgb4_sysfs_in.c-231-	u32 status = mgb4_read_reg(&vindev->mgbdev->video,
--
drivers/media/pci/mgb4/mgb4_sysfs_in.c=245=static ssize_t vsync_status_show(struct device *dev,
--
drivers/media/pci/mgb4/mgb4_sysfs_in.c-248-	struct video_device *vdev = to_video_device(dev);
drivers/media/pci/mgb4/mgb4_sysfs_in.c:249:	struct mgb4_vin_dev *vindev = video_get_drvdata(vdev);
drivers/media/pci/mgb4/mgb4_sysfs_in.c-250-	u32 status = mgb4_read_reg(&vindev->mgbdev->video,
--
drivers/media/pci/mgb4/mgb4_sysfs_in.c=264=static ssize_t hsync_gap_length_show(struct device *dev,
--
drivers/media/pci/mgb4/mgb4_sysfs_in.c-268-	struct video_device *vdev = to_video_device(dev);
drivers/media/pci/mgb4/mgb4_sysfs_in.c:269:	struct mgb4_vin_dev *vindev = video_get_drvdata(vdev);
drivers/media/pci/mgb4/mgb4_sysfs_in.c-270-	u32 sync = mgb4_read_reg(&vindev->mgbdev->video,
--
drivers/media/pci/mgb4/mgb4_sysfs_in.c=280=static ssize_t hsync_gap_length_store(struct device *dev,
--
drivers/media/pci/mgb4/mgb4_sysfs_in.c-284-	struct video_device *vdev = to_video_device(dev);
drivers/media/pci/mgb4/mgb4_sysfs_in.c:285:	struct mgb4_vin_dev *vindev = video_get_drvdata(vdev);
drivers/media/pci/mgb4/mgb4_sysfs_in.c-286-	unsigned long val;
--
drivers/media/pci/mgb4/mgb4_sysfs_in.c=301=static ssize_t vsync_gap_length_show(struct device *dev,
--
drivers/media/pci/mgb4/mgb4_sysfs_in.c-304-	struct video_device *vdev = to_video_device(dev);
drivers/media/pci/mgb4/mgb4_sysfs_in.c:305:	struct mgb4_vin_dev *vindev = video_get_drvdata(vdev);
drivers/media/pci/mgb4/mgb4_sysfs_in.c-306-	u32 sync = mgb4_read_reg(&vindev->mgbdev->video,
--
drivers/media/pci/mgb4/mgb4_sysfs_in.c=316=static ssize_t vsync_gap_length_store(struct device *dev,
--
drivers/media/pci/mgb4/mgb4_sysfs_in.c-320-	struct video_device *vdev = to_video_device(dev);
drivers/media/pci/mgb4/mgb4_sysfs_in.c:321:	struct mgb4_vin_dev *vindev = video_get_drvdata(vdev);
drivers/media/pci/mgb4/mgb4_sysfs_in.c-322-	unsigned long val;
--
drivers/media/pci/mgb4/mgb4_sysfs_in.c=337=static ssize_t pclk_frequency_show(struct device *dev,
--
drivers/media/pci/mgb4/mgb4_sysfs_in.c-340-	struct video_device *vdev = to_video_device(dev);
drivers/media/pci/mgb4/mgb4_sysfs_in.c:341:	struct mgb4_vin_dev *vindev = video_get_drvdata(vdev);
drivers/media/pci/mgb4/mgb4_sysfs_in.c-342-	u32 freq = mgb4_read_reg(&vindev->mgbdev->video,
--
drivers/media/pci/mgb4/mgb4_sysfs_in.c=348=static ssize_t hsync_width_show(struct device *dev,
--
drivers/media/pci/mgb4/mgb4_sysfs_in.c-351-	struct video_device *vdev = to_video_device(dev);
drivers/media/pci/mgb4/mgb4_sysfs_in.c:352:	struct mgb4_vin_dev *vindev = video_get_drvdata(vdev);
drivers/media/pci/mgb4/mgb4_sysfs_in.c-353-	u32 sig = mgb4_read_reg(&vindev->mgbdev->video,
--
drivers/media/pci/mgb4/mgb4_sysfs_in.c=359=static ssize_t vsync_width_show(struct device *dev,
--
drivers/media/pci/mgb4/mgb4_sysfs_in.c-362-	struct video_device *vdev = to_video_device(dev);
drivers/media/pci/mgb4/mgb4_sysfs_in.c:363:	struct mgb4_vin_dev *vindev = video_get_drvdata(vdev);
drivers/media/pci/mgb4/mgb4_sysfs_in.c-364-	u32 sig = mgb4_read_reg(&vindev->mgbdev->video,
--
drivers/media/pci/mgb4/mgb4_sysfs_in.c=370=static ssize_t hback_porch_show(struct device *dev,
--
drivers/media/pci/mgb4/mgb4_sysfs_in.c-373-	struct video_device *vdev = to_video_device(dev);
drivers/media/pci/mgb4/mgb4_sysfs_in.c:374:	struct mgb4_vin_dev *vindev = video_get_drvdata(vdev);
drivers/media/pci/mgb4/mgb4_sysfs_in.c-375-	u32 sig = mgb4_read_reg(&vindev->mgbdev->video,
--
drivers/media/pci/mgb4/mgb4_sysfs_in.c=381=static ssize_t hfront_porch_show(struct device *dev,
--
drivers/media/pci/mgb4/mgb4_sysfs_in.c-384-	struct video_device *vdev = to_video_device(dev);
drivers/media/pci/mgb4/mgb4_sysfs_in.c:385:	struct mgb4_vin_dev *vindev = video_get_drvdata(vdev);
drivers/media/pci/mgb4/mgb4_sysfs_in.c-386-	u32 sig = mgb4_read_reg(&vindev->mgbdev->video,
--
drivers/media/pci/mgb4/mgb4_sysfs_in.c=392=static ssize_t vback_porch_show(struct device *dev,
--
drivers/media/pci/mgb4/mgb4_sysfs_in.c-395-	struct video_device *vdev = to_video_device(dev);
drivers/media/pci/mgb4/mgb4_sysfs_in.c:396:	struct mgb4_vin_dev *vindev = video_get_drvdata(vdev);
drivers/media/pci/mgb4/mgb4_sysfs_in.c-397-	u32 sig = mgb4_read_reg(&vindev->mgbdev->video,
--
drivers/media/pci/mgb4/mgb4_sysfs_in.c=403=static ssize_t vfront_porch_show(struct device *dev,
--
drivers/media/pci/mgb4/mgb4_sysfs_in.c-406-	struct video_device *vdev = to_video_device(dev);
drivers/media/pci/mgb4/mgb4_sysfs_in.c:407:	struct mgb4_vin_dev *vindev = video_get_drvdata(vdev);
drivers/media/pci/mgb4/mgb4_sysfs_in.c-408-	u32 sig = mgb4_read_reg(&vindev->mgbdev->video,
--
drivers/media/pci/mgb4/mgb4_sysfs_in.c=414=static ssize_t frequency_range_show(struct device *dev,
--
drivers/media/pci/mgb4/mgb4_sysfs_in.c-417-	struct video_device *vdev = to_video_device(dev);
drivers/media/pci/mgb4/mgb4_sysfs_in.c:418:	struct mgb4_vin_dev *vindev = video_get_drvdata(vdev);
drivers/media/pci/mgb4/mgb4_sysfs_in.c-419-
--
drivers/media/pci/mgb4/mgb4_sysfs_in.c=423=static ssize_t frequency_range_store(struct device *dev,
--
drivers/media/pci/mgb4/mgb4_sysfs_in.c-427-	struct video_device *vdev = to_video_device(dev);
drivers/media/pci/mgb4/mgb4_sysfs_in.c:428:	struct mgb4_vin_dev *vindev = video_get_drvdata(vdev);
drivers/media/pci/mgb4/mgb4_sysfs_in.c-429-	unsigned long val;
--
drivers/media/pci/mgb4/mgb4_sysfs_in.c=454=static ssize_t fpdl3_input_width_show(struct device *dev,
--
drivers/media/pci/mgb4/mgb4_sysfs_in.c-457-	struct video_device *vdev = to_video_device(dev);
drivers/media/pci/mgb4/mgb4_sysfs_in.c:458:	struct mgb4_vin_dev *vindev = video_get_drvdata(vdev);
drivers/media/pci/mgb4/mgb4_sysfs_in.c-459-	s32 ret;
--
drivers/media/pci/mgb4/mgb4_sysfs_in.c=483=static ssize_t fpdl3_input_width_store(struct device *dev,
--
drivers/media/pci/mgb4/mgb4_sysfs_in.c-487-	struct video_device *vdev = to_video_device(dev);
drivers/media/pci/mgb4/mgb4_sysfs_in.c:488:	struct mgb4_vin_dev *vindev = video_get_drvdata(vdev);
drivers/media/pci/mgb4/mgb4_sysfs_in.c-489-	u8 i2c_data;
--
drivers/media/pci/mgb4/mgb4_sysfs_in.c=522=static ssize_t gmsl_mode_show(struct device *dev,
--
drivers/media/pci/mgb4/mgb4_sysfs_in.c-525-	struct video_device *vdev = to_video_device(dev);
drivers/media/pci/mgb4/mgb4_sysfs_in.c:526:	struct mgb4_vin_dev *vindev = video_get_drvdata(vdev);
drivers/media/pci/mgb4/mgb4_sysfs_in.c-527-	s32 r1, r300, r3;
--
drivers/media/pci/mgb4/mgb4_sysfs_in.c=553=static ssize_t gmsl_mode_store(struct device *dev,
--
drivers/media/pci/mgb4/mgb4_sysfs_in.c-567-	struct video_device *vdev = to_video_device(dev);
drivers/media/pci/mgb4/mgb4_sysfs_in.c:568:	struct mgb4_vin_dev *vindev = video_get_drvdata(vdev);
drivers/media/pci/mgb4/mgb4_sysfs_in.c-569-	const struct mgb4_i2c_kv *values;
--
drivers/media/pci/mgb4/mgb4_sysfs_in.c=604=static ssize_t gmsl_stream_id_show(struct device *dev,
--
drivers/media/pci/mgb4/mgb4_sysfs_in.c-607-	struct video_device *vdev = to_video_device(dev);
drivers/media/pci/mgb4/mgb4_sysfs_in.c:608:	struct mgb4_vin_dev *vindev = video_get_drvdata(vdev);
drivers/media/pci/mgb4/mgb4_sysfs_in.c-609-	s32 ret;
--
drivers/media/pci/mgb4/mgb4_sysfs_in.c=620=static ssize_t gmsl_stream_id_store(struct device *dev,
--
drivers/media/pci/mgb4/mgb4_sysfs_in.c-624-	struct video_device *vdev = to_video_device(dev);
drivers/media/pci/mgb4/mgb4_sysfs_in.c:625:	struct mgb4_vin_dev *vindev = video_get_drvdata(vdev);
drivers/media/pci/mgb4/mgb4_sysfs_in.c-626-	unsigned long val;
--
drivers/media/pci/mgb4/mgb4_sysfs_in.c=650=static ssize_t gmsl_fec_show(struct device *dev, struct device_attribute *attr,
--
drivers/media/pci/mgb4/mgb4_sysfs_in.c-653-	struct video_device *vdev = to_video_device(dev);
drivers/media/pci/mgb4/mgb4_sysfs_in.c:654:	struct mgb4_vin_dev *vindev = video_get_drvdata(vdev);
drivers/media/pci/mgb4/mgb4_sysfs_in.c-655-	s32 r3e0, r308;
--
drivers/media/pci/mgb4/mgb4_sysfs_in.c=676=static ssize_t gmsl_fec_store(struct device *dev, struct device_attribute *attr,
--
drivers/media/pci/mgb4/mgb4_sysfs_in.c-679-	struct video_device *vdev = to_video_device(dev);
drivers/media/pci/mgb4/mgb4_sysfs_in.c:680:	struct mgb4_vin_dev *vindev = video_get_drvdata(vdev);
drivers/media/pci/mgb4/mgb4_sysfs_in.c-681-	static const struct mgb4_i2c_kv enable[] = {
--
drivers/media/pci/mgb4/mgb4_sysfs_out.c=52=static ssize_t output_id_show(struct device *dev,
--
drivers/media/pci/mgb4/mgb4_sysfs_out.c-55-	struct video_device *vdev = to_video_device(dev);
drivers/media/pci/mgb4/mgb4_sysfs_out.c:56:	struct mgb4_vout_dev *voutdev = video_get_drvdata(vdev);
drivers/media/pci/mgb4/mgb4_sysfs_out.c-57-
--
drivers/media/pci/mgb4/mgb4_sysfs_out.c=61=static ssize_t video_source_show(struct device *dev,
--
drivers/media/pci/mgb4/mgb4_sysfs_out.c-64-	struct video_device *vdev = to_video_device(dev);
drivers/media/pci/mgb4/mgb4_sysfs_out.c:65:	struct mgb4_vout_dev *voutdev = video_get_drvdata(vdev);
drivers/media/pci/mgb4/mgb4_sysfs_out.c-66-	u32 config = mgb4_read_reg(&voutdev->mgbdev->video,
--
drivers/media/pci/mgb4/mgb4_sysfs_out.c=84=static ssize_t video_source_store(struct device *dev,
--
drivers/media/pci/mgb4/mgb4_sysfs_out.c-88-	struct video_device *vdev = to_video_device(dev);
drivers/media/pci/mgb4/mgb4_sysfs_out.c:89:	struct mgb4_vout_dev *voutdev = video_get_drvdata(vdev);
drivers/media/pci/mgb4/mgb4_sysfs_out.c-90-	struct mgb4_dev *mgbdev = voutdev->mgbdev;
--
drivers/media/pci/mgb4/mgb4_sysfs_out.c=146=static ssize_t color_mapping_show(struct device *dev,
--
drivers/media/pci/mgb4/mgb4_sysfs_out.c-149-	struct video_device *vdev = to_video_device(dev);
drivers/media/pci/mgb4/mgb4_sysfs_out.c:150:	struct mgb4_vout_dev *voutdev = video_get_drvdata(vdev);
drivers/media/pci/mgb4/mgb4_sysfs_out.c-151-	u32 config = mgb4_read_reg(&voutdev->mgbdev->video,
--
drivers/media/pci/mgb4/mgb4_sysfs_out.c=170=static ssize_t color_mapping_store(struct device *dev,
--
drivers/media/pci/mgb4/mgb4_sysfs_out.c-174-	struct video_device *vdev = to_video_device(dev);
drivers/media/pci/mgb4/mgb4_sysfs_out.c:175:	struct mgb4_vout_dev *voutdev = video_get_drvdata(vdev);
drivers/media/pci/mgb4/mgb4_sysfs_out.c-176-	u32 fpga_data;
--
drivers/media/pci/mgb4/mgb4_sysfs_out.c=204=static ssize_t display_width_show(struct device *dev,
--
drivers/media/pci/mgb4/mgb4_sysfs_out.c-207-	struct video_device *vdev = to_video_device(dev);
drivers/media/pci/mgb4/mgb4_sysfs_out.c:208:	struct mgb4_vout_dev *voutdev = video_get_drvdata(vdev);
drivers/media/pci/mgb4/mgb4_sysfs_out.c-209-	u32 config = mgb4_read_reg(&voutdev->mgbdev->video,
--
drivers/media/pci/mgb4/mgb4_sysfs_out.c=215=static ssize_t display_width_store(struct device *dev,
--
drivers/media/pci/mgb4/mgb4_sysfs_out.c-219-	struct video_device *vdev = to_video_device(dev);
drivers/media/pci/mgb4/mgb4_sysfs_out.c:220:	struct mgb4_vout_dev *voutdev = video_get_drvdata(vdev);
drivers/media/pci/mgb4/mgb4_sysfs_out.c-221-	unsigned long val;
--
drivers/media/pci/mgb4/mgb4_sysfs_out.c=244=static ssize_t display_height_show(struct device *dev,
--
drivers/media/pci/mgb4/mgb4_sysfs_out.c-247-	struct video_device *vdev = to_video_device(dev);
drivers/media/pci/mgb4/mgb4_sysfs_out.c:248:	struct mgb4_vout_dev *voutdev = video_get_drvdata(vdev);
drivers/media/pci/mgb4/mgb4_sysfs_out.c-249-	u32 config = mgb4_read_reg(&voutdev->mgbdev->video,
--
drivers/media/pci/mgb4/mgb4_sysfs_out.c=255=static ssize_t display_height_store(struct device *dev,
--
drivers/media/pci/mgb4/mgb4_sysfs_out.c-259-	struct video_device *vdev = to_video_device(dev);
drivers/media/pci/mgb4/mgb4_sysfs_out.c:260:	struct mgb4_vout_dev *voutdev = video_get_drvdata(vdev);
drivers/media/pci/mgb4/mgb4_sysfs_out.c-261-	unsigned long val;
--
drivers/media/pci/mgb4/mgb4_sysfs_out.c=284=static ssize_t frame_rate_show(struct device *dev,
--
drivers/media/pci/mgb4/mgb4_sysfs_out.c-287-	struct video_device *vdev = to_video_device(dev);
drivers/media/pci/mgb4/mgb4_sysfs_out.c:288:	struct mgb4_vout_dev *voutdev = video_get_drvdata(vdev);
drivers/media/pci/mgb4/mgb4_sysfs_out.c-289-	u32 period = mgb4_read_reg(&voutdev->mgbdev->video,
--
drivers/media/pci/mgb4/mgb4_sysfs_out.c=299=static ssize_t frame_rate_store(struct device *dev,
--
drivers/media/pci/mgb4/mgb4_sysfs_out.c-303-	struct video_device *vdev = to_video_device(dev);
drivers/media/pci/mgb4/mgb4_sysfs_out.c:304:	struct mgb4_vout_dev *voutdev = video_get_drvdata(vdev);
drivers/media/pci/mgb4/mgb4_sysfs_out.c-305-	unsigned long val;
--
drivers/media/pci/mgb4/mgb4_sysfs_out.c=319=static ssize_t hsync_width_show(struct device *dev,
--
drivers/media/pci/mgb4/mgb4_sysfs_out.c-322-	struct video_device *vdev = to_video_device(dev);
drivers/media/pci/mgb4/mgb4_sysfs_out.c:323:	struct mgb4_vout_dev *voutdev = video_get_drvdata(vdev);
drivers/media/pci/mgb4/mgb4_sysfs_out.c-324-	u32 sig = mgb4_read_reg(&voutdev->mgbdev->video,
--
drivers/media/pci/mgb4/mgb4_sysfs_out.c=334=static ssize_t hsync_width_store(struct device *dev,
--
drivers/media/pci/mgb4/mgb4_sysfs_out.c-338-	struct video_device *vdev = to_video_device(dev);
drivers/media/pci/mgb4/mgb4_sysfs_out.c:339:	struct mgb4_vout_dev *voutdev = video_get_drvdata(vdev);
drivers/media/pci/mgb4/mgb4_sysfs_out.c-340-	unsigned long val;
--
drivers/media/pci/mgb4/mgb4_sysfs_out.c=355=static ssize_t vsync_width_show(struct device *dev,
--
drivers/media/pci/mgb4/mgb4_sysfs_out.c-358-	struct video_device *vdev = to_video_device(dev);
drivers/media/pci/mgb4/mgb4_sysfs_out.c:359:	struct mgb4_vout_dev *voutdev = video_get_drvdata(vdev);
drivers/media/pci/mgb4/mgb4_sysfs_out.c-360-	u32 sig = mgb4_read_reg(&voutdev->mgbdev->video,
--
drivers/media/pci/mgb4/mgb4_sysfs_out.c=370=static ssize_t vsync_width_store(struct device *dev,
--
drivers/media/pci/mgb4/mgb4_sysfs_out.c-374-	struct video_device *vdev = to_video_device(dev);
drivers/media/pci/mgb4/mgb4_sysfs_out.c:375:	struct mgb4_vout_dev *voutdev = video_get_drvdata(vdev);
drivers/media/pci/mgb4/mgb4_sysfs_out.c-376-	unsigned long val;
--
drivers/media/pci/mgb4/mgb4_sysfs_out.c=391=static ssize_t hback_porch_show(struct device *dev,
--
drivers/media/pci/mgb4/mgb4_sysfs_out.c-394-	struct video_device *vdev = to_video_device(dev);
drivers/media/pci/mgb4/mgb4_sysfs_out.c:395:	struct mgb4_vout_dev *voutdev = video_get_drvdata(vdev);
drivers/media/pci/mgb4/mgb4_sysfs_out.c-396-	u32 sig = mgb4_read_reg(&voutdev->mgbdev->video,
--
drivers/media/pci/mgb4/mgb4_sysfs_out.c=406=static ssize_t hback_porch_store(struct device *dev,
--
drivers/media/pci/mgb4/mgb4_sysfs_out.c-410-	struct video_device *vdev = to_video_device(dev);
drivers/media/pci/mgb4/mgb4_sysfs_out.c:411:	struct mgb4_vout_dev *voutdev = video_get_drvdata(vdev);
drivers/media/pci/mgb4/mgb4_sysfs_out.c-412-	unsigned long val;
--
drivers/media/pci/mgb4/mgb4_sysfs_out.c=427=static ssize_t vback_porch_show(struct device *dev,
--
drivers/media/pci/mgb4/mgb4_sysfs_out.c-430-	struct video_device *vdev = to_video_device(dev);
drivers/media/pci/mgb4/mgb4_sysfs_out.c:431:	struct mgb4_vout_dev *voutdev = video_get_drvdata(vdev);
drivers/media/pci/mgb4/mgb4_sysfs_out.c-432-	u32 sig = mgb4_read_reg(&voutdev->mgbdev->video,
--
drivers/media/pci/mgb4/mgb4_sysfs_out.c=442=static ssize_t vback_porch_store(struct device *dev,
--
drivers/media/pci/mgb4/mgb4_sysfs_out.c-446-	struct video_device *vdev = to_video_device(dev);
drivers/media/pci/mgb4/mgb4_sysfs_out.c:447:	struct mgb4_vout_dev *voutdev = video_get_drvdata(vdev);
drivers/media/pci/mgb4/mgb4_sysfs_out.c-448-	unsigned long val;
--
drivers/media/pci/mgb4/mgb4_sysfs_out.c=463=static ssize_t hfront_porch_show(struct device *dev,
--
drivers/media/pci/mgb4/mgb4_sysfs_out.c-466-	struct video_device *vdev = to_video_device(dev);
drivers/media/pci/mgb4/mgb4_sysfs_out.c:467:	struct mgb4_vout_dev *voutdev = video_get_drvdata(vdev);
drivers/media/pci/mgb4/mgb4_sysfs_out.c-468-	u32 sig = mgb4_read_reg(&voutdev->mgbdev->video,
--
drivers/media/pci/mgb4/mgb4_sysfs_out.c=478=static ssize_t hfront_porch_store(struct device *dev,
--
drivers/media/pci/mgb4/mgb4_sysfs_out.c-482-	struct video_device *vdev = to_video_device(dev);
drivers/media/pci/mgb4/mgb4_sysfs_out.c:483:	struct mgb4_vout_dev *voutdev = video_get_drvdata(vdev);
drivers/media/pci/mgb4/mgb4_sysfs_out.c-484-	unsigned long val;
--
drivers/media/pci/mgb4/mgb4_sysfs_out.c=499=static ssize_t vfront_porch_show(struct device *dev,
--
drivers/media/pci/mgb4/mgb4_sysfs_out.c-502-	struct video_device *vdev = to_video_device(dev);
drivers/media/pci/mgb4/mgb4_sysfs_out.c:503:	struct mgb4_vout_dev *voutdev = video_get_drvdata(vdev);
drivers/media/pci/mgb4/mgb4_sysfs_out.c-504-	u32 sig = mgb4_read_reg(&voutdev->mgbdev->video,
--
drivers/media/pci/mgb4/mgb4_sysfs_out.c=514=static ssize_t vfront_porch_store(struct device *dev,
--
drivers/media/pci/mgb4/mgb4_sysfs_out.c-518-	struct video_device *vdev = to_video_device(dev);
drivers/media/pci/mgb4/mgb4_sysfs_out.c:519:	struct mgb4_vout_dev *voutdev = video_get_drvdata(vdev);
drivers/media/pci/mgb4/mgb4_sysfs_out.c-520-	unsigned long val;
--
drivers/media/pci/mgb4/mgb4_sysfs_out.c=537=static ssize_t hsync_polarity_show(struct device *dev,
--
drivers/media/pci/mgb4/mgb4_sysfs_out.c-540-	struct video_device *vdev = to_video_device(dev);
drivers/media/pci/mgb4/mgb4_sysfs_out.c:541:	struct mgb4_vout_dev *voutdev = video_get_drvdata(vdev);
drivers/media/pci/mgb4/mgb4_sysfs_out.c-542-	u32 config = mgb4_read_reg(&voutdev->mgbdev->video,
--
drivers/media/pci/mgb4/mgb4_sysfs_out.c=552=static ssize_t hsync_polarity_store(struct device *dev,
--
drivers/media/pci/mgb4/mgb4_sysfs_out.c-556-	struct video_device *vdev = to_video_device(dev);
drivers/media/pci/mgb4/mgb4_sysfs_out.c:557:	struct mgb4_vout_dev *voutdev = video_get_drvdata(vdev);
drivers/media/pci/mgb4/mgb4_sysfs_out.c-558-	unsigned long val;
--
drivers/media/pci/mgb4/mgb4_sysfs_out.c=573=static ssize_t vsync_polarity_show(struct device *dev,
--
drivers/media/pci/mgb4/mgb4_sysfs_out.c-576-	struct video_device *vdev = to_video_device(dev);
drivers/media/pci/mgb4/mgb4_sysfs_out.c:577:	struct mgb4_vout_dev *voutdev = video_get_drvdata(vdev);
drivers/media/pci/mgb4/mgb4_sysfs_out.c-578-	u32 config = mgb4_read_reg(&voutdev->mgbdev->video,
--
drivers/media/pci/mgb4/mgb4_sysfs_out.c=588=static ssize_t vsync_polarity_store(struct device *dev,
--
drivers/media/pci/mgb4/mgb4_sysfs_out.c-592-	struct video_device *vdev = to_video_device(dev);
drivers/media/pci/mgb4/mgb4_sysfs_out.c:593:	struct mgb4_vout_dev *voutdev = video_get_drvdata(vdev);
drivers/media/pci/mgb4/mgb4_sysfs_out.c-594-	unsigned long val;
--
drivers/media/pci/mgb4/mgb4_sysfs_out.c=609=static ssize_t de_polarity_show(struct device *dev,
--
drivers/media/pci/mgb4/mgb4_sysfs_out.c-612-	struct video_device *vdev = to_video_device(dev);
drivers/media/pci/mgb4/mgb4_sysfs_out.c:613:	struct mgb4_vout_dev *voutdev = video_get_drvdata(vdev);
drivers/media/pci/mgb4/mgb4_sysfs_out.c-614-	u32 config = mgb4_read_reg(&voutdev->mgbdev->video,
--
drivers/media/pci/mgb4/mgb4_sysfs_out.c=624=static ssize_t de_polarity_store(struct device *dev,
--
drivers/media/pci/mgb4/mgb4_sysfs_out.c-628-	struct video_device *vdev = to_video_device(dev);
drivers/media/pci/mgb4/mgb4_sysfs_out.c:629:	struct mgb4_vout_dev *voutdev = video_get_drvdata(vdev);
drivers/media/pci/mgb4/mgb4_sysfs_out.c-630-	unsigned long val;
--
drivers/media/pci/mgb4/mgb4_sysfs_out.c=645=static ssize_t fpdl3_output_width_show(struct device *dev,
--
drivers/media/pci/mgb4/mgb4_sysfs_out.c-648-	struct video_device *vdev = to_video_device(dev);
drivers/media/pci/mgb4/mgb4_sysfs_out.c:649:	struct mgb4_vout_dev *voutdev = video_get_drvdata(vdev);
drivers/media/pci/mgb4/mgb4_sysfs_out.c-650-	s32 ret;
--
drivers/media/pci/mgb4/mgb4_sysfs_out.c=674=static ssize_t fpdl3_output_width_store(struct device *dev,
--
drivers/media/pci/mgb4/mgb4_sysfs_out.c-678-	struct video_device *vdev = to_video_device(dev);
drivers/media/pci/mgb4/mgb4_sysfs_out.c:679:	struct mgb4_vout_dev *voutdev = video_get_drvdata(vdev);
drivers/media/pci/mgb4/mgb4_sysfs_out.c-680-	u8 i2c_data;
--
drivers/media/pci/mgb4/mgb4_sysfs_out.c=711=static ssize_t pclk_frequency_show(struct device *dev,
--
drivers/media/pci/mgb4/mgb4_sysfs_out.c-714-	struct video_device *vdev = to_video_device(dev);
drivers/media/pci/mgb4/mgb4_sysfs_out.c:715:	struct mgb4_vout_dev *voutdev = video_get_drvdata(vdev);
drivers/media/pci/mgb4/mgb4_sysfs_out.c-716-
--
drivers/media/pci/mgb4/mgb4_sysfs_out.c=720=static ssize_t pclk_frequency_store(struct device *dev,
--
drivers/media/pci/mgb4/mgb4_sysfs_out.c-724-	struct video_device *vdev = to_video_device(dev);
drivers/media/pci/mgb4/mgb4_sysfs_out.c:725:	struct mgb4_vout_dev *voutdev = video_get_drvdata(vdev);
drivers/media/pci/mgb4/mgb4_sysfs_out.c-726-	struct mgb4_dev *mgbdev = voutdev->mgbdev;
--
drivers/media/pci/saa7134/saa7134-go7007.c=219=static void saa7134_go7007_irq_ts_done(struct saa7134_dev *dev,
--
drivers/media/pci/saa7134/saa7134-go7007.c-221-{
drivers/media/pci/saa7134/saa7134-go7007.c:222:	struct go7007 *go = video_get_drvdata(dev->empress_dev);
drivers/media/pci/saa7134/saa7134-go7007.c-223-	struct saa7134_go7007 *saa = go->hpi_context;
--
drivers/media/pci/saa7134/saa7134-go7007.c=473=static int saa7134_go7007_fini(struct saa7134_dev *dev)
--
drivers/media/pci/saa7134/saa7134-go7007.c-480-
drivers/media/pci/saa7134/saa7134-go7007.c:481:	go = video_get_drvdata(dev->empress_dev);
drivers/media/pci/saa7134/saa7134-go7007.c-482-	if (go->audio_enabled)
--
drivers/media/pci/saa7134/saa7134.h=723=static inline bool is_empress(struct file *file)
--
drivers/media/pci/saa7134/saa7134.h-725-	struct video_device *vdev = video_devdata(file);
drivers/media/pci/saa7134/saa7134.h:726:	struct saa7134_dev *dev = video_get_drvdata(vdev);
drivers/media/pci/saa7134/saa7134.h-727-
--
drivers/media/pci/saa7164/saa7164-encoder.c=707=static int fops_open(struct file *file)
--
drivers/media/pci/saa7164/saa7164-encoder.c-712-
drivers/media/pci/saa7164/saa7164-encoder.c:713:	port = (struct saa7164_port *)video_get_drvdata(video_devdata(file));
drivers/media/pci/saa7164/saa7164-encoder.c-714-	if (!port)
--
drivers/media/pci/saa7164/saa7164-vbi.c=410=static int fops_open(struct file *file)
--
drivers/media/pci/saa7164/saa7164-vbi.c-415-
drivers/media/pci/saa7164/saa7164-vbi.c:416:	port = (struct saa7164_port *)video_get_drvdata(video_devdata(file));
drivers/media/pci/saa7164/saa7164-vbi.c-417-	if (!port)
--
drivers/media/platform/allegro-dvt/allegro-core.c=3095=static int allegro_open(struct file *file)
--
drivers/media/platform/allegro-dvt/allegro-core.c-3097-	struct video_device *vdev = video_devdata(file);
drivers/media/platform/allegro-dvt/allegro-core.c:3098:	struct allegro_dev *dev = video_get_drvdata(vdev);
drivers/media/platform/allegro-dvt/allegro-core.c-3099-	struct allegro_channel *channel = NULL;
--
drivers/media/platform/amlogic/c3/isp/c3-isp-capture.c=507=static int c3_isp_cap_link_validate(struct media_link *link)
--
drivers/media/platform/amlogic/c3/isp/c3-isp-capture.c-512-		media_entity_to_v4l2_subdev(link->source->entity);
drivers/media/platform/amlogic/c3/isp/c3-isp-capture.c:513:	struct c3_isp_capture *cap = video_get_drvdata(vdev);
drivers/media/platform/amlogic/c3/isp/c3-isp-capture.c-514-	struct v4l2_subdev_format src_fmt = {
--
drivers/media/platform/arm/mali-c55/mali-c55-capture.c=279=static int mali_c55_link_validate(struct media_link *link)
--
drivers/media/platform/arm/mali-c55/mali-c55-capture.c-282-		media_entity_to_video_device(link->sink->entity);
drivers/media/platform/arm/mali-c55/mali-c55-capture.c:283:	struct mali_c55_cap_dev *cap_dev = video_get_drvdata(vdev);
drivers/media/platform/arm/mali-c55/mali-c55-capture.c-284-	struct v4l2_subdev *sd =
--
drivers/media/platform/broadcom/bcm2835-unicam.c=2122=static int unicam_video_link_validate(struct media_link *link)
--
drivers/media/platform/broadcom/bcm2835-unicam.c-2127-		media_entity_to_v4l2_subdev(link->source->entity);
drivers/media/platform/broadcom/bcm2835-unicam.c:2128:	struct unicam_node *node = video_get_drvdata(vdev);
drivers/media/platform/broadcom/bcm2835-unicam.c-2129-	const u32 pad = is_image_node(node) ? UNICAM_SD_PAD_SOURCE_IMAGE
--
drivers/media/platform/broadcom/bcm2835-unicam.c=2221=static void unicam_node_release(struct video_device *vdev)
drivers/media/platform/broadcom/bcm2835-unicam.c-2222-{
drivers/media/platform/broadcom/bcm2835-unicam.c:2223:	struct unicam_node *node = video_get_drvdata(vdev);
drivers/media/platform/broadcom/bcm2835-unicam.c-2224-
--

]

15/2 2026/08/07 16:09 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 23919
							output: 42
							thoughts: 45
						

Thoughts:
**My Thought Process on Locating `video_get_drvdata`**

Ah, I'm trying to pinpoint the exact location of the `video_get_drvdata` function definition within the kernel source. Based on its name, "video" clearly points me towards the video subsystem, and "drvdata" is a common convention for driver-specific data. This strongly suggests it's a core V4L2 (Video for Linux Two) helper function. My initial hypothesis is that it will reside within the primary V4L2 device handling headers. Therefore, I'm immediately thinking it's likely declared in `include/media/v4l2-dev.h`. My next step, naturally, is to actually verify this by checking the contents of that specific header file.


16/2 2026/08/07 16:09 tool codesearch-definition-source
0m Args:
map[ContextFile:include/media/v4l2-dev.h Name:video_get_drvdata]

Results:
map[SourceCode: 482:	/**
 483:	 * video_get_drvdata - gets private data from &struct video_device.
 484:	 *
 485:	 * @vdev: pointer to &struct video_device
 486:	 *
 487:	 * returns a pointer to the private data
 488:	 */
 489:	static inline void *video_get_drvdata(struct video_device *vdev)
 490:	{
 491:		return dev_get_drvdata(&vdev->dev);
 492:	}
 SourceFile:include/media/v4l2-dev.h]

17/2 2026/08/07 16:09 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 24174
							output: 40
							thoughts: 72
						

Thoughts:
**My Thought Process Unraveling the Crash**

Alright, let's trace this. My initial thought upon seeing `vdev_to_v4l2_subdev(vdev)` is that it's a straightforward mapping, likely retrieving driver-specific data attached to the device. The expression `dev_get_drvdata(&vdev->dev)` confirms this intuition – it's the standard kernel mechanism for getting the driver's private data associated with a `struct device`. So, `vdev` *should* be pointing to the correct `v4l2_subdev` structure, or at least the associated private data.

Now, the crash is occurring within `subdev_open`. My immediate next step is to understand how `subdev_open` is obtaining its `vdev` argument. The trace points to `video_devdata(file)`, indicating that the `vdev` in this context is derived from the `struct file` pointer passed to the open operation. This is a common pattern in the V4L2 framework: the `struct file` typically holds a pointer to the `struct video_device`, which in turn is linked to the underlying V4L2 device structure.

This then leads me to my next critical investigation: I need to meticulously examine the `video_devdata` function itself. What exactly does it return? How does it extract the `struct video_device` from the `struct file`? Is there any chance of a NULL pointer being dereferenced here, or perhaps an incorrect `struct video_device` being retrieved? My focus will be on the internal workings of `video_devdata` to ensure the `vdev` obtained there is valid and correctly populated before it's passed to `subdev_open`, and subsequently, before `vdev_to_v4l2_subdev` is even called internally.


18/2 2026/08/07 16:10 tool codesearch-definition-source
0m Args:
map[ContextFile:include/media/v4l2-dev.h Name:video_devdata]

Results:
map[SourceCode: 237:	struct video_device *video_devdata(struct file *file)
 238:	{
 239:		return video_devices[iminor(file_inode(file))];
 240:	}
 SourceFile:drivers/media/v4l2-core/v4l2-dev.c]

19/2 2026/08/07 16:10 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 24368
							output: 48
							thoughts: 522
						

Thoughts:
**My Thought Process on the Kernel Crash**

Okay, let's retrace my steps here, trying to pinpoint this kernel crash. I'm looking at the flow, and it seems to originate from `video_devdata`, which I understand gives me `video_devices[iminor(file_inode(file))]`. From there, `vdev_to_v4l2_subdev(vdev)` is called, and that, in turn, calls `dev_get_drvdata(&vdev->dev)`, which ultimately retrieves `dev->driver_data`.

Now, a critical point: if `vdev_to_v4l2_subdev` returns `NULL`, then my `sd` variable would be `NULL`. The immediate concern is that attempting to dereference `sd->v4l2_dev` would then lead to a NULL pointer dereference.

However, the *actual* crash is occurring at `sd->v4l2_dev->mdev`. This is where things get a bit confusing. If `sd` *were* `NULL`, then `sd->v4l2_dev` would effectively be `0 + 152` (assuming `v4l2_dev` is an offset within a structure pointed to by `sd`, which isn't explicitly stated but is implied by the structure of the crash). Dereferencing *that* would then try to access `sd->v4l2_dev->mdev`.

But the KASAN report specifically states: `KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007]`. This is a dereference of *zero*, which is a direct NULL pointer dereference. This means `sd->v4l2_dev` *must* be `NULL` at the time of the crash.

Now, let's look at the assembly, which is where I'm trying to get to the bottom of this. I see that `sd` itself is being loaded into `%rbp` from `(%r12)`. The assembly snippet shows:
```assembly
  18:	49 8b 2c 24          	mov    (%r12),%rbp
  1c:	48 89 ea             	mov    %rbp,%rdx
  1f:	48 c1 ea 03          	shr    $0x3,%rdx
* 23:	80 3c 02 00          	cmpb   $0x0,(%rdx,%rax,1) <-- trapping instruction
```
The trapping instruction is `cmpb $0x0,(%rdx,%rax,1)`. This suggests a comparison with zero is happening. The problem is, if `sd` is `NULL` (which `%rbp` holds at instruction 18), then `sd->v4l2_dev` *should* be `NULL` as well, leading to the KASAN report.

What's puzzling me is that `%rbp` is loaded directly from `(%r12)`. I need to understand what `%r12` points to *before* this instruction executes. My current focus is to go back to the `subdev_open` function, the context from which this code snippet is extracted, to understand the initialization and meaning of `%r12` and how it ultimately leads to `sd` being `NULL` when it shouldn't be, or why `sd->v4l2_dev` is being dereferenced when `sd` *is* `NULL`.


20/2 2026/08/07 16:10 tool codesearch-definition-source
0m Args:
map[ContextFile:drivers/media/v4l2-core/v4l2-subdev.c Name:subdev_open]

Results:
map[SourceCode:  95:	static int subdev_open(struct file *file)
  96:	{
  97:		struct video_device *vdev = video_devdata(file);
  98:		struct v4l2_subdev *sd = vdev_to_v4l2_subdev(vdev);
  99:		struct v4l2_subdev_fh *subdev_fh;
 100:		int ret;
 101:	
 102:		subdev_fh = kzalloc_obj(*subdev_fh);
 103:		if (subdev_fh == NULL)
 104:			return -ENOMEM;
 105:	
 106:		ret = subdev_fh_init(subdev_fh, sd);
 107:		if (ret) {
 108:			kfree(subdev_fh);
 109:			return ret;
 110:		}
 111:	
 112:		v4l2_fh_init(&subdev_fh->vfh, vdev);
 113:		v4l2_fh_add(&subdev_fh->vfh, file);
 114:	
 115:		if (sd->v4l2_dev->mdev && sd->entity.graph_obj.mdev->dev) {
 116:			struct module *owner;
 117:	
 118:			owner = sd->entity.graph_obj.mdev->dev->driver->owner;
 119:			if (!try_module_get(owner)) {
 120:				ret = -EBUSY;
 121:				goto err;
 122:			}
 123:			subdev_fh->owner = owner;
 124:		}
 125:	
 126:		if (sd->internal_ops && sd->internal_ops->open) {
 127:			ret = sd->internal_ops->open(sd, subdev_fh);
 128:			if (ret < 0)
 129:				goto err;
 130:		}
 131:	
 132:		return 0;
 133:	
 134:	err:
 135:		module_put(subdev_fh->owner);
 136:		v4l2_fh_del(&subdev_fh->vfh, file);
 137:		v4l2_fh_exit(&subdev_fh->vfh);
 138:		subdev_fh_free(subdev_fh);
 139:		kfree(subdev_fh);
 140:	
 141:		return ret;
 142:	}
 SourceFile:drivers/media/v4l2-core/v4l2-subdev.c]

21/2 2026/08/07 16:10 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 25674
							output: 50
							thoughts: 149
						

Thoughts:
**My Thought Process Regarding `subdev_open` and `sd->v4l2_dev` Access**

Okay, so I'm looking at the `subdev_open` function, and the first thing that catches my eye is the access to `sd->v4l2_dev`. My immediate thought is to establish the memory location of `sd->v4l2_dev` relative to the `sd` structure pointer. I know that if `sd` itself isn't NULL, then `sd->v4l2_dev` resides at an offset of 152 bytes, which is `0x98` in hexadecimal, from the start of the `sd` structure.

This leads me to question the underlying assembly instruction responsible for this access. I'm going to re-examine the assembly code snippet provided.

```
  18:	49 8b 2c 24          	mov    (%r12),%rbp
```

Now, I need to correlate this assembly with my understanding of the structure. If `%r12` in this context happens to be pointing to `sd->v4l2_dev`, then the dereferencing operation `(%r12)` would actually be accessing the `mdev` member within the `v4l2_device` structure, i.e., `sd->v4l2_dev->mdev`.

To confirm this, the next logical step for me is to meticulously check the layout of the `v4l2_device` structure itself. I need to see the offsets of its members to verify if `mdev` is indeed positioned where the assembly implies it should be, given the assumption about `%r12`. This detailed structural analysis is crucial for ensuring my interpretation of the assembly and its relation to the C code is accurate.


22/2 2026/08/07 16:10 tool codesearch-struct-layout
0m Args:
map[ContextFile:drivers/media/v4l2-core/v4l2-subdev.c Name:v4l2_device]

Results:
map[Fields:[map[Name:dev OffsetBits:0 SizeBits:64] map[Name:mdev OffsetBits:64 SizeBits:64] map[Name:subdevs OffsetBits:128 SizeBits:128] map[Name:lock OffsetBits:256 SizeBits:512] map[Name:name OffsetBits:768 SizeBits:288] map[Name:notify OffsetBits:1088 SizeBits:64] map[Name:ctrl_handler OffsetBits:1152 SizeBits:64] map[Name:prio OffsetBits:1216 SizeBits:128] map[Name:ref OffsetBits:1344 SizeBits:32] map[Name:release OffsetBits:1408 SizeBits:64]]]

23/2 2026/08/07 16:10 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 25995
							output: 47
							thoughts: 569
						

Thoughts:
**My Thought Process on the KASAN Trap**

Okay, let me walk through how I arrived at this understanding of the KASAN trap. Initially, I was focused on the `mdev` offset. I calculated it to be 8 bytes (64 bits) from the beginning of some structure. Then, I considered the possibility that `%r12` was holding `sd->v4l2_dev`. If that were the case, `mdev` would be at offset 8.

However, the assembly instruction `mov (%r12), %rbp` immediately contradicted this. It indicated that the value being loaded into `%rbp` was at offset 0 relative to `%r12`. My next thought was, "What is at offset 0?" I hypothesized that it might be `dev`.

Then, I decided to re-examine the C code snippet: `if (sd->v4l2_dev->mdev && sd->entity.graph_obj.mdev->dev)`. This line is crucial. I realized that `sd->v4l2_dev` is a pointer. If it were NULL, then accessing `sd->v4l2_dev->mdev` would be a direct NULL dereference.

I then questioned if `%r12` could indeed be `sd->v4l2_dev`. I checked the value of `%r12` (`ffff88802d414020`) and concluded that `sd->v4l2_dev` *couldn't* be NULL, because if it were, `%r12` would also be NULL.

My next logical leap was to consider if `%r12` was pointing to `&sd->v4l2_dev->mdev` instead of `sd->v4l2_dev` itself. If `sd->v4l2_dev` was `ffff88802d414018`, then the address of its `mdev` member (`&sd->v4l2_dev->mdev`) would indeed be `ffff88802d414020` (which matches `%r12`). With this assumption, the `mov (%r12), %rbp` instruction would correctly load the `mdev` value into `%rbp`. The subsequent check `if (mdev is NULL)` would then be meaningful.

But then I hit the real puzzle: the trap was at `cmpb $0x0, (%rdx,%rax,1)`. This looked like a KASAN shadow check. My confusion was: why would it be checking the KASAN shadow of `mdev`? If `%rbp` (which holds `mdev`) were 0, then the subsequent calculations involving `%rdx` and `%rax` would lead to checking the shadow of address 0. This seemed odd.

The breakthrough came when I connected this to the *second* part of the `if` condition: `sd->entity.graph_obj.mdev->dev`. This is *another* dereference of an `mdev` pointer, this time from `sd->entity.graph_obj`. My realization was that the KASAN check wasn't about the `mdev` I had been focusing on from `sd->v4l2_dev`. Instead, it was about the KASAN shadow of the *other* `mdev` pointer (from `sd->entity.graph_obj.mdev`) that was about to be dereferenced. The assembly was performing a bounds check on the shadow memory for this second `mdev` pointer *before* it was used to access `->dev`. This is why the layout of the `media_entity` struct became my next focus.


24/2 2026/08/07 16:10 tool codesearch-struct-layout
0m Args:
map[ContextFile:drivers/media/v4l2-core/v4l2-subdev.c Name:media_entity]

Results:
map[Fields:[map[Name:graph_obj OffsetBits:0 SizeBits:256] map[Name:name OffsetBits:256 SizeBits:64] map[Name:obj_type OffsetBits:320 SizeBits:32] map[Name:function OffsetBits:352 SizeBits:32] map[Name:flags OffsetBits:384 SizeBits:64] map[Name:num_pads OffsetBits:448 SizeBits:16] map[Name:num_links OffsetBits:464 SizeBits:16] map[Name:num_backlinks OffsetBits:480 SizeBits:16] map[Name:internal_idx OffsetBits:512 SizeBits:32] map[Name:pads OffsetBits:576 SizeBits:64] map[Name:links OffsetBits:640 SizeBits:128] map[Name:ops OffsetBits:768 SizeBits:64] map[Name:use_count OffsetBits:832 SizeBits:32] map[Name:info OffsetBits:864 SizeBits:64]]]

25/2 2026/08/07 16:10 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 26780
							output: 48
							thoughts: 24
						

Thoughts:
**My Thought Process on `graph_obj` and `media_gobj`**

Alright, so the `graph_obj` is sitting right there at the very beginning, at offset 0. That's a good starting point. My immediate next step is to dive into the structure definition for `media_gobj`. I need to understand its layout to see where its different members are located relative to the start of the struct. This will be crucial for correctly interpreting the data I'm seeing and for any subsequent operations I might need to perform, like accessing specific fields or understanding how it interacts with other data structures.


26/2 2026/08/07 16:10 tool codesearch-struct-layout
0m Args:
map[ContextFile:drivers/media/v4l2-core/v4l2-subdev.c Name:media_gobj]

Results:
map[Fields:[map[Name:mdev OffsetBits:0 SizeBits:64] map[Name:id OffsetBits:64 SizeBits:32] map[Name:list OffsetBits:128 SizeBits:128]]]

27/2 2026/08/07 16:10 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 26884
							output: 54
							thoughts: 623
						

Thoughts:
**A Deep Dive into a Potential NULL Pointer Dereference**

My thought process began by analyzing an assembly snippet in conjunction with the corresponding C code, aiming to understand the logic flow and identify potential issues.

Initially, I observed that `mdev` resides at offset 0 within `graph_obj`. This implies that `sd->entity.graph_obj.mdev` would be located at offset 0 of `sd->entity`. Further tracing the structure, I recalled that `entity` itself is at offset 0 of `v4l2_subdev`. Therefore, `sd->entity.graph_obj.mdev` should, logically, be at offset 0 of `sd`.

This realization led me to a crucial hypothesis: if `sd->entity.graph_obj.mdev` is indeed at offset 0 of `sd`, then the assembly instruction `(%r12)` must be loading this very member!

I then cross-referenced this with the C code: `if (sd->v4l2_dev->mdev && sd->entity.graph_obj.mdev->dev) {`. The logic here is clear: if `sd->v4l2_dev->mdev` evaluates to true, the code proceeds to dereference `sd->entity.graph_obj.mdev->dev`. This is where my concern escalated. If `sd->entity.graph_obj.mdev` happens to be NULL, then `sd->entity.graph_obj.mdev->dev` would trigger a NULL pointer dereference.

Returning to the assembly, I examined the specific instructions around the potential trap point:

```
  18:	49 8b 2c 24          	mov    (%r12),%rbp
  1c:	48 89 ea             	mov    %rbp,%rdx
  1f:	48 c1 ea 03          	shr    $0x3,%rdx
* 23:	80 3c 02 00          	cmpb   $0x0,(%rdx,%rax,1) <-- trapping instruction
  27:	0f 85 04 03 00 00    	jne    0x331
  2d:	48 8b 6d 00          	mov    0x0(%rbp),%rbp
```

Assuming `%r12` holds the address of `sd`, the instruction `mov (%r12),%rbp` would indeed load `sd->entity.graph_obj.mdev` into `%rbp`. The subsequent instructions are involved in checking the KASAN shadow memory for `%rbp`. The critical point is the instruction at `23:`, which attempts to read from the KASAN shadow. If `%rbp` (i.e., `sd->entity.graph_obj.mdev`) is NULL, this read operation would naturally cause a trap because it's trying to access the shadow of a NULL pointer.

This led me to a definitive conclusion: `sd->entity.graph_obj.mdev` is NULL at this point in the execution.

However, this finding immediately presented a paradox. The C code explicitly checks `sd->v4l2_dev->mdev`. If that condition was true, we are now observing that `sd->entity.graph_obj.mdev` is NULL. This raises a significant question: how can `sd->v4l2_dev->mdev` be non-NULL while `sd->entity.graph_obj.mdev` is NULL, given that the typical initialization process, specifically through functions like `v4l2_device_register_subdev`, is expected to set both? This discrepancy is the core of my current investigation.


28/2 2026/08/07 16:10 tool codesearch-definition-source
0m Error:
log-in to see details

Args:
map[ContextFile:drivers/media/v4l2-core/v4l2-device.c Name:v4l2_device_register_subdev]

Results:
map[SourceCode: SourceFile:]

29/2 2026/08/07 16:10 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 27566
							output: 25
							thoughts: 18
						

Thoughts:
**My Thought Process on `v4l2_device_register_subdev`**

Alright, my immediate instinct here is to trace the lifecycle and usage of `v4l2_device_register_subdev`. I'm trying to get a firm grasp on *where* and *how* this function is called, and by extension, what it signifies in the broader context of the Video4Linux2 subsystem.

Essentially, I'm looking for the entry points. When a sub-device, like a sensor or a video encoder/decoder, is being brought into the V4L2 framework, this function is going to be the pivotal moment where it announces its presence and registers itself with the main `v4l2_device`. This isn't just a simple registration; it's about establishing the sub-device's identity and making it known to the system so that other components, like the core V4L2 driver or userspace applications, can interact with it.

I'd be scrutinizing the call sites to understand:

*   **Who is registering?** What types of sub-devices are typically being registered here? Are they hardware-specific drivers, or more generic components?
*   **What context is it registered in?** Is this happening during device initialization, probe, or some other phase? What are the prerequisites for calling this function successfully? This tells me about the dependencies.
*   **What data is being passed?** The `v4l2_subdev` structure itself, and its associated `v4l2_device`, are going to contain crucial information. I'd be looking at the fields being populated, the flags set, and any particular operations or controls that are being exposed through this registration. This is where the sub-device defines its capabilities.
*   **What happens *after* registration?** The `grep` alone won't show me the full picture, but it's a starting point. I'd then follow up by looking at the functions called *by* or *after* `v4l2_device_register_subdev`. This would likely involve things like notifying other parts of the system, potentially triggering enumeration of capabilities, or even setting up internal data structures for the V4L2 framework.

In essence, this `grep` is my initial probe into understanding how sub-devices become first-class citizens within the V4L2 ecosystem. It's about identifying the moment of integration and the subsequent steps that bring a hardware component under the control and management of the V4L2 framework.


30/2 2026/08/07 16:10 tool grepper
0m Args:
map[Expression:v4l2_device_register_subdev]

Results:
map[Output:
Full output is too long, showing 500 out of 719 lines.
Use more precise expression if possible.

Documentation/driver-api/media/v4l2-controls.rst=294=When a sub-device is registered with a V4L2 driver by calling
Documentation/driver-api/media/v4l2-controls.rst:295:v4l2_device_register_subdev() and the ctrl_handler fields of both v4l2_subdev
Documentation/driver-api/media/v4l2-controls.rst-296-and v4l2_device are set, then the controls of the subdev will become
--
Documentation/driver-api/media/v4l2-controls.rst=299=skipped (so a V4L2 driver can always override a subdev control).
Documentation/driver-api/media/v4l2-controls.rst-300-
Documentation/driver-api/media/v4l2-controls.rst:301:What happens here is that v4l2_device_register_subdev() calls
Documentation/driver-api/media/v4l2-controls.rst-302-v4l2_ctrl_add_handler() adding the controls of the subdev to the controls
--
Documentation/driver-api/media/v4l2-controls.rst=667=control handler. You do that by simply setting the ctrl_handler field in
Documentation/driver-api/media/v4l2-controls.rst:668:struct v4l2_device to NULL. Now v4l2_device_register_subdev() will no longer
Documentation/driver-api/media/v4l2-controls.rst-669-merge subdev controls.
--
Documentation/driver-api/media/v4l2-subdev.rst=163=In the **synchronous** case a device (bridge) driver needs to register the
--
Documentation/driver-api/media/v4l2-subdev.rst-165-
Documentation/driver-api/media/v4l2-subdev.rst:166:	:c:func:`v4l2_device_register_subdev <v4l2_device_register_subdev>`
Documentation/driver-api/media/v4l2-subdev.rst-167-	(:c:type:`v4l2_dev <v4l2_device>`, :c:type:`sd <v4l2_subdev>`).
--
Documentation/driver-api/media/v4l2-subdev.rst=368=device nodes for all registered sub-devices marked with
Documentation/driver-api/media/v4l2-subdev.rst-369-``V4L2_SUBDEV_FL_HAS_DEVNODE`` by calling
Documentation/driver-api/media/v4l2-subdev.rst:370::c:func:`v4l2_device_register_subdev_nodes`. Those device nodes will be
Documentation/driver-api/media/v4l2-subdev.rst-371-automatically removed when sub-devices are unregistered.
--
Documentation/translations/zh_CN/video4linux/v4l2-framework.txt=301=name 域,但如有必要,revision 域必须初始化。
--
Documentation/translations/zh_CN/video4linux/v4l2-framework.txt-322-
Documentation/translations/zh_CN/video4linux/v4l2-framework.txt:323:	int err = v4l2_device_register_subdev(v4l2_dev, sd);
Documentation/translations/zh_CN/video4linux/v4l2-framework.txt-324-
--
Documentation/translations/zh_CN/video4linux/v4l2-framework.txt=383=V4L2 子设备用户空间API
--
Documentation/translations/zh_CN/video4linux/v4l2-framework.txt-392-
Documentation/translations/zh_CN/video4linux/v4l2-framework.txt:393:注册子设备之后, v4l2_device 驱动会通过调用 v4l2_device_register_subdev_nodes()
Documentation/translations/zh_CN/video4linux/v4l2-framework.txt-394-函数为所有已注册并设置了 V4L2_SUBDEV_FL_HAS_DEVNODE 的子设备创建
--
drivers/media/i2c/adv748x/adv748x-csi2.c=42=static int adv748x_csi2_register_link(struct adv748x_csi2 *tx,
--
drivers/media/i2c/adv748x/adv748x-csi2.c-50-	if (!src->v4l2_dev) {
drivers/media/i2c/adv748x/adv748x-csi2.c:51:		ret = v4l2_device_register_subdev(v4l2_dev, src);
drivers/media/i2c/adv748x/adv748x-csi2.c-52-		if (ret)
--
drivers/media/i2c/ccs/ccs-core.c=2931=static int ccs_register_subdev(struct ccs_sensor *sensor,
--
drivers/media/i2c/ccs/ccs-core.c-2941-
drivers/media/i2c/ccs/ccs-core.c:2942:	rval = v4l2_device_register_subdev(sensor->src->sd.v4l2_dev, &ssd->sd);
drivers/media/i2c/ccs/ccs-core.c-2943-	if (rval) {
drivers/media/i2c/ccs/ccs-core.c:2944:		dev_err(&client->dev, "v4l2_device_register_subdev failed\n");
drivers/media/i2c/ccs/ccs-core.c-2945-		return rval;
--
drivers/media/i2c/mt9m114.c=2068=static int mt9m114_ifp_registered(struct v4l2_subdev *sd)
--
drivers/media/i2c/mt9m114.c-2072-
drivers/media/i2c/mt9m114.c:2073:	ret = v4l2_device_register_subdev(sd->v4l2_dev, &sensor->pa.sd);
drivers/media/i2c/mt9m114.c-2074-	if (ret < 0) {
--
drivers/media/i2c/s5c73m3/s5c73m3-core.c=1467=static int s5c73m3_oif_registered(struct v4l2_subdev *sd)
--
drivers/media/i2c/s5c73m3/s5c73m3-core.c-1471-
drivers/media/i2c/s5c73m3/s5c73m3-core.c:1472:	ret = v4l2_device_register_subdev(sd->v4l2_dev, &state->sensor_sd);
drivers/media/i2c/s5c73m3/s5c73m3-core.c-1473-	if (ret) {
--
drivers/media/i2c/s5k5baf.c=1750=static int s5k5baf_registered(struct v4l2_subdev *sd)
--
drivers/media/i2c/s5k5baf.c-1754-
drivers/media/i2c/s5k5baf.c:1755:	ret = v4l2_device_register_subdev(sd->v4l2_dev, &state->cis_sd);
drivers/media/i2c/s5k5baf.c-1756-	if (ret < 0)
--
drivers/media/pci/cx18/cx18-av-core.c=1299=int cx18_av_probe(struct cx18 *cx)
--
drivers/media/pci/cx18/cx18-av-core.c-1351-	}
drivers/media/pci/cx18/cx18-av-core.c:1352:	err = v4l2_device_register_subdev(&cx->v4l2_dev, sd);
drivers/media/pci/cx18/cx18-av-core.c-1353-	if (err)
--
drivers/media/pci/cx18/cx18-gpio.c=280=int cx18_gpio_register(struct cx18 *cx, u32 hw)
--
drivers/media/pci/cx18/cx18-gpio.c-304-	sd->grp_id = hw;
drivers/media/pci/cx18/cx18-gpio.c:305:	return v4l2_device_register_subdev(&cx->v4l2_dev, sd);
drivers/media/pci/cx18/cx18-gpio.c-306-}
--
drivers/media/pci/cx23885/cx23888-ir.c=1138=int cx23888_ir_probe(struct cx23885_dev *dev)
--
drivers/media/pci/cx23885/cx23888-ir.c-1164-
drivers/media/pci/cx23885/cx23888-ir.c:1165:	ret = v4l2_device_register_subdev(&dev->v4l2_dev, sd);
drivers/media/pci/cx23885/cx23888-ir.c-1166-	if (ret == 0) {
--
drivers/media/pci/intel/ipu3/ipu3-cio2.c=1398=static int cio2_notifier_complete(struct v4l2_async_notifier *notifier)
--
drivers/media/pci/intel/ipu3/ipu3-cio2.c-1415-
drivers/media/pci/intel/ipu3/ipu3-cio2.c:1416:	return v4l2_device_register_subdev_nodes(&cio2->v4l2_dev);
drivers/media/pci/intel/ipu3/ipu3-cio2.c-1417-}
--
drivers/media/pci/intel/ipu3/ipu3-cio2.c=1488=static int cio2_queue_init(struct cio2_device *cio2, struct cio2_queue *q)
--
drivers/media/pci/intel/ipu3/ipu3-cio2.c-1553-
drivers/media/pci/intel/ipu3/ipu3-cio2.c:1554:	r = v4l2_device_register_subdev(&cio2->v4l2_dev, subdev);
drivers/media/pci/intel/ipu3/ipu3-cio2.c-1555-	if (r) {
--
drivers/media/pci/intel/ipu6/ipu6-isys-csi2.c=527=int ipu6_isys_csi2_init(struct ipu6_isys_csi2 *csi2,
--
drivers/media/pci/intel/ipu6/ipu6-isys-csi2.c-555-
drivers/media/pci/intel/ipu6/ipu6-isys-csi2.c:556:	ret = v4l2_device_register_subdev(&isys->v4l2_dev, &csi2->asd.sd);
drivers/media/pci/intel/ipu6/ipu6-isys-csi2.c-557-	if (ret) {
--
drivers/media/pci/intel/ipu6/ipu6-isys.c=672=static int isys_notifier_bound(struct v4l2_async_notifier *notifier,
--
drivers/media/pci/intel/ipu6/ipu6-isys.c-699-
drivers/media/pci/intel/ipu6/ipu6-isys.c:700:	return v4l2_device_register_subdev_nodes(&isys->v4l2_dev);
drivers/media/pci/intel/ipu6/ipu6-isys.c-701-}
--
drivers/media/pci/intel/ipu6/ipu6-isys.c=703=static int isys_notifier_complete(struct v4l2_async_notifier *notifier)
--
drivers/media/pci/intel/ipu6/ipu6-isys.c-707-
drivers/media/pci/intel/ipu6/ipu6-isys.c:708:	return v4l2_device_register_subdev_nodes(&isys->v4l2_dev);
drivers/media/pci/intel/ipu6/ipu6-isys.c-709-}
--
drivers/media/pci/ivtv/ivtv-gpio.c=328=int ivtv_gpio_init(struct ivtv *itv)
--
drivers/media/pci/ivtv/ivtv-gpio.c-353-	v4l2_ctrl_handler_setup(&itv->hdl_gpio);
drivers/media/pci/ivtv/ivtv-gpio.c:354:	return v4l2_device_register_subdev(&itv->v4l2_dev, &itv->sd_gpio);
drivers/media/pci/ivtv/ivtv-gpio.c-355-}
--
drivers/media/pci/saa7134/saa7134-go7007.c=405=static int saa7134_go7007_init(struct saa7134_dev *dev)
--
drivers/media/pci/saa7134/saa7134-go7007.c-454-	/* Register the subdevice interface with the go7007 device */
drivers/media/pci/saa7134/saa7134-go7007.c:455:	if (v4l2_device_register_subdev(&go->v4l2_dev, sd) < 0)
drivers/media/pci/saa7134/saa7134-go7007.c-456-		pr_info("saa7134-go7007: register subdev failed\n");
--
drivers/media/platform/amd/isp4/isp4_subdev.c=962=int isp4sd_init(struct isp4_subdev *isp_subdev, struct v4l2_device *v4l2_dev,
--
drivers/media/platform/amd/isp4/isp4_subdev.c-993-
drivers/media/platform/amd/isp4/isp4_subdev.c:994:	ret = v4l2_device_register_subdev(v4l2_dev, &isp_subdev->sdev);
drivers/media/platform/amd/isp4/isp4_subdev.c-995-	if (ret) {
--
drivers/media/platform/amlogic/c3/isp/c3-isp-core.c=586=int c3_isp_core_register(struct c3_isp_device *isp)
--
drivers/media/platform/amlogic/c3/isp/c3-isp-core.c-619-
drivers/media/platform/amlogic/c3/isp/c3-isp-core.c:620:	ret = v4l2_device_register_subdev(&isp->v4l2_dev, sd);
drivers/media/platform/amlogic/c3/isp/c3-isp-core.c-621-	if (ret)
--
drivers/media/platform/amlogic/c3/isp/c3-isp-dev.c=106=static int c3_isp_notify_complete(struct v4l2_async_notifier *notifier)
--
drivers/media/platform/amlogic/c3/isp/c3-isp-dev.c-110-
drivers/media/platform/amlogic/c3/isp/c3-isp-dev.c:111:	return v4l2_device_register_subdev_nodes(&isp->v4l2_dev);
drivers/media/platform/amlogic/c3/isp/c3-isp-dev.c-112-}
--
drivers/media/platform/amlogic/c3/isp/c3-isp-resizer.c=811=static int c3_isp_rsz_register(struct c3_isp_resizer *rsz)
--
drivers/media/platform/amlogic/c3/isp/c3-isp-resizer.c-838-
drivers/media/platform/amlogic/c3/isp/c3-isp-resizer.c:839:	ret = v4l2_device_register_subdev(&rsz->isp->v4l2_dev, sd);
drivers/media/platform/amlogic/c3/isp/c3-isp-resizer.c-840-	if (ret)
--
drivers/media/platform/arm/mali-c55/mali-c55-core.c=400=static int mali_c55_notifier_complete(struct v4l2_async_notifier *notifier)
--
drivers/media/platform/arm/mali-c55/mali-c55-core.c-404-
drivers/media/platform/arm/mali-c55/mali-c55-core.c:405:	return v4l2_device_register_subdev_nodes(&mali_c55->v4l2_dev);
drivers/media/platform/arm/mali-c55/mali-c55-core.c-406-}
--
drivers/media/platform/arm/mali-c55/mali-c55-isp.c=580=int mali_c55_register_isp(struct mali_c55 *mali_c55)
--
drivers/media/platform/arm/mali-c55/mali-c55-isp.c-615-
drivers/media/platform/arm/mali-c55/mali-c55-isp.c:616:	ret = v4l2_device_register_subdev(&mali_c55->v4l2_dev, sd);
drivers/media/platform/arm/mali-c55/mali-c55-isp.c-617-	if (ret)
--
drivers/media/platform/arm/mali-c55/mali-c55-resizer.c=1060=static int mali_c55_register_resizer(struct mali_c55 *mali_c55,
--
drivers/media/platform/arm/mali-c55/mali-c55-resizer.c-1103-
drivers/media/platform/arm/mali-c55/mali-c55-resizer.c:1104:	ret = v4l2_device_register_subdev(&mali_c55->v4l2_dev, sd);
drivers/media/platform/arm/mali-c55/mali-c55-resizer.c-1105-	if (ret)
--
drivers/media/platform/arm/mali-c55/mali-c55-tpg.c=362=int mali_c55_register_tpg(struct mali_c55 *mali_c55)
--
drivers/media/platform/arm/mali-c55/mali-c55-tpg.c-394-
drivers/media/platform/arm/mali-c55/mali-c55-tpg.c:395:	ret = v4l2_device_register_subdev(&mali_c55->v4l2_dev, sd);
drivers/media/platform/arm/mali-c55/mali-c55-tpg.c-396-	if (ret) {
--
drivers/media/platform/broadcom/bcm2835-unicam.c=1501=static int unicam_subdev_init(struct unicam_device *unicam)
--
drivers/media/platform/broadcom/bcm2835-unicam.c-1535-
drivers/media/platform/broadcom/bcm2835-unicam.c:1536:	ret = v4l2_device_register_subdev(&unicam->v4l2_dev, sd);
drivers/media/platform/broadcom/bcm2835-unicam.c-1537-	if (ret) {
--
drivers/media/platform/broadcom/bcm2835-unicam.c=2484=static int unicam_async_complete(struct v4l2_async_notifier *notifier)
--
drivers/media/platform/broadcom/bcm2835-unicam.c-2500-
drivers/media/platform/broadcom/bcm2835-unicam.c:2501:	ret = v4l2_device_register_subdev_nodes(&unicam->v4l2_dev);
drivers/media/platform/broadcom/bcm2835-unicam.c-2502-	if (ret) {
--
drivers/media/platform/microchip/microchip-isc-base.c=1752=static int isc_async_complete(struct v4l2_async_notifier *notifier)
--
drivers/media/platform/microchip/microchip-isc-base.c-1761-
drivers/media/platform/microchip/microchip-isc-base.c:1762:	ret = v4l2_device_register_subdev_nodes(&isc->v4l2_dev);
drivers/media/platform/microchip/microchip-isc-base.c-1763-	if (ret < 0) {
--
drivers/media/platform/microchip/microchip-isc-scaler.c=187=int isc_scaler_init(struct isc_device *isc)
--
drivers/media/platform/microchip/microchip-isc-scaler.c-221-
drivers/media/platform/microchip/microchip-isc-scaler.c:222:	ret = v4l2_device_register_subdev(&isc->v4l2_dev, &isc->scaler_sd);
drivers/media/platform/microchip/microchip-isc-scaler.c-223-	if (ret < 0) {
--
drivers/media/platform/nxp/imx7-media-csi.c=1982=static int imx7_csi_registered(struct v4l2_subdev *sd)
--
drivers/media/platform/nxp/imx7-media-csi.c-1994-
drivers/media/platform/nxp/imx7-media-csi.c:1995:	ret = v4l2_device_register_subdev_nodes(&csi->v4l2_dev);
drivers/media/platform/nxp/imx7-media-csi.c-1996-	if (ret)
--
drivers/media/platform/nxp/imx7-media-csi.c=2065=static int imx7_csi_notify_complete(struct v4l2_async_notifier *notifier)
--
drivers/media/platform/nxp/imx7-media-csi.c-2068-
drivers/media/platform/nxp/imx7-media-csi.c:2069:	return v4l2_device_register_subdev_nodes(&csi->v4l2_dev);
drivers/media/platform/nxp/imx7-media-csi.c-2070-}
--
drivers/media/platform/nxp/imx7-media-csi.c=2160=static int imx7_csi_media_init(struct imx7_csi *csi)
--
drivers/media/platform/nxp/imx7-media-csi.c-2192-
drivers/media/platform/nxp/imx7-media-csi.c:2193:	ret = v4l2_device_register_subdev(&csi->v4l2_dev, &csi->sd);
drivers/media/platform/nxp/imx7-media-csi.c-2194-	if (ret)
--
drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c=79=static int mxc_isi_async_notifier_complete(struct v4l2_async_notifier *notifier)
--
drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c-85-
drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c:86:	ret = v4l2_device_register_subdev_nodes(&isi->v4l2_dev);
drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c-87-	if (ret < 0) {
--
drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c=101=static int mxc_isi_pipe_register(struct mxc_isi_pipe *pipe)
--
drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c-104-
drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c:105:	ret = v4l2_device_register_subdev(&pipe->isi->v4l2_dev, &pipe->sd);
drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c-106-	if (ret < 0)
--
drivers/media/platform/nxp/imx8-isi/imx8-isi-crossbar.c=500=int mxc_isi_crossbar_register(struct mxc_isi_crossbar *xbar)
drivers/media/platform/nxp/imx8-isi/imx8-isi-crossbar.c-501-{
drivers/media/platform/nxp/imx8-isi/imx8-isi-crossbar.c:502:	return v4l2_device_register_subdev(&xbar->isi->v4l2_dev, &xbar->sd);
drivers/media/platform/nxp/imx8-isi/imx8-isi-crossbar.c-503-}
--
drivers/media/platform/qcom/camss/camss-csid.c=1357=int msm_csid_register_entity(struct csid_device *csid,
--
drivers/media/platform/qcom/camss/camss-csid.c-1413-
drivers/media/platform/qcom/camss/camss-csid.c:1414:	ret = v4l2_device_register_subdev(v4l2_dev, sd);
drivers/media/platform/qcom/camss/camss-csid.c-1415-	if (ret < 0) {
--
drivers/media/platform/qcom/camss/camss-csiphy.c=783=int msm_csiphy_register_entity(struct csiphy_device *csiphy,
--
drivers/media/platform/qcom/camss/camss-csiphy.c-815-
drivers/media/platform/qcom/camss/camss-csiphy.c:816:	ret = v4l2_device_register_subdev(v4l2_dev, sd);
drivers/media/platform/qcom/camss/camss-csiphy.c-817-	if (ret < 0) {
--
drivers/media/platform/qcom/camss/camss-ispif.c=1377=int msm_ispif_register_entities(struct ispif_device *ispif,
--
drivers/media/platform/qcom/camss/camss-ispif.c-1418-
drivers/media/platform/qcom/camss/camss-ispif.c:1419:		ret = v4l2_device_register_subdev(v4l2_dev, sd);
drivers/media/platform/qcom/camss/camss-ispif.c-1420-		if (ret < 0) {
--
drivers/media/platform/qcom/camss/camss-tpg.c=450=int msm_tpg_register_entity(struct tpg_device *tpg,
--
drivers/media/platform/qcom/camss/camss-tpg.c-498-
drivers/media/platform/qcom/camss/camss-tpg.c:499:	ret = v4l2_device_register_subdev(v4l2_dev, sd);
drivers/media/platform/qcom/camss/camss-tpg.c-500-	if (ret < 0) {
--
drivers/media/platform/qcom/camss/camss-vfe.c=2056=int msm_vfe_register_entities(struct vfe_device *vfe,
--
drivers/media/platform/qcom/camss/camss-vfe.c-2102-
drivers/media/platform/qcom/camss/camss-vfe.c:2103:		ret = v4l2_device_register_subdev(v4l2_dev, sd);
drivers/media/platform/qcom/camss/camss-vfe.c-2104-		if (ret < 0) {
--
drivers/media/platform/qcom/camss/camss.c=5183=static int camss_subdev_notifier_complete(struct v4l2_async_notifier *async)
--
drivers/media/platform/qcom/camss/camss.c-5219-
drivers/media/platform/qcom/camss/camss.c:5220:	return v4l2_device_register_subdev_nodes(&camss->v4l2_dev);
drivers/media/platform/qcom/camss/camss.c-5221-}
--
drivers/media/platform/raspberrypi/pisp_be/pisp_be.c=1492=static int pispbe_init_subdev(struct pispbe_dev *pispbe)
--
drivers/media/platform/raspberrypi/pisp_be/pisp_be.c-1512-
drivers/media/platform/raspberrypi/pisp_be/pisp_be.c:1513:	ret = v4l2_device_register_subdev(&pispbe->v4l2_dev, sd);
drivers/media/platform/raspberrypi/pisp_be/pisp_be.c-1514-	if (ret)
--
drivers/media/platform/raspberrypi/rp1-cfe/cfe.c=2148=static int cfe_probe_complete(struct cfe_device *cfe)
--
drivers/media/platform/raspberrypi/rp1-cfe/cfe.c-2167-
drivers/media/platform/raspberrypi/rp1-cfe/cfe.c:2168:	ret = v4l2_device_register_subdev_nodes(&cfe->v4l2_dev);
drivers/media/platform/raspberrypi/rp1-cfe/cfe.c-2169-	if (ret) {
--
drivers/media/platform/raspberrypi/rp1-cfe/csi2.c=526=int csi2_init(struct csi2_device *csi2, struct dentry *debugfs)
--
drivers/media/platform/raspberrypi/rp1-cfe/csi2.c-564-
drivers/media/platform/raspberrypi/rp1-cfe/csi2.c:565:	ret = v4l2_device_register_subdev(csi2->v4l2_dev, &csi2->sd);
drivers/media/platform/raspberrypi/rp1-cfe/csi2.c-566-	if (ret) {
--
drivers/media/platform/raspberrypi/rp1-cfe/pisp-fe.c=544=int pisp_fe_init(struct pisp_fe_device *fe, struct dentry *debugfs)
--
drivers/media/platform/raspberrypi/rp1-cfe/pisp-fe.c-580-
drivers/media/platform/raspberrypi/rp1-cfe/pisp-fe.c:581:	ret = v4l2_device_register_subdev(fe->v4l2_dev, &fe->sd);
drivers/media/platform/raspberrypi/rp1-cfe/pisp-fe.c-582-	if (ret) {
--
drivers/media/platform/renesas/rcar-vin/rcar-core.c=209=static int rvin_group_notify_complete(struct v4l2_async_notifier *notifier)
--
drivers/media/platform/renesas/rcar-vin/rcar-core.c-218-
drivers/media/platform/renesas/rcar-vin/rcar-core.c:219:	ret = v4l2_device_register_subdev_nodes(&vin->v4l2_dev);
drivers/media/platform/renesas/rcar-vin/rcar-core.c-220-	if (ret) {
--
drivers/media/platform/renesas/rcar_drif.c=1133=static int rcar_drif_notify_complete(struct v4l2_async_notifier *notifier)
--
drivers/media/platform/renesas/rcar_drif.c-1149-	sdr->v4l2_dev.ctrl_handler = &sdr->ctrl_hdl;
drivers/media/platform/renesas/rcar_drif.c:1150:	ret = v4l2_device_register_subdev_nodes(&sdr->v4l2_dev);
drivers/media/platform/renesas/rcar_drif.c-1151-	if (ret) {
--
drivers/media/platform/renesas/rzg2l-cru/rzg2l-core.c=39=static int rzg2l_cru_group_notify_complete(struct v4l2_async_notifier *notifier)
--
drivers/media/platform/renesas/rzg2l-cru/rzg2l-core.c-48-
drivers/media/platform/renesas/rzg2l-cru/rzg2l-core.c:49:	ret = v4l2_device_register_subdev_nodes(&cru->v4l2_dev);
drivers/media/platform/renesas/rzg2l-cru/rzg2l-core.c-50-	if (ret) {
--
drivers/media/platform/renesas/rzg2l-cru/rzg2l-ip.c=330=int rzg2l_cru_ip_subdev_register(struct rzg2l_cru_dev *cru)
--
drivers/media/platform/renesas/rzg2l-cru/rzg2l-ip.c-358-
drivers/media/platform/renesas/rzg2l-cru/rzg2l-ip.c:359:	ret = v4l2_device_register_subdev(&cru->v4l2_dev, &ip->subdev);
drivers/media/platform/renesas/rzg2l-cru/rzg2l-ip.c-360-	if (ret < 0)
--
drivers/media/platform/renesas/vsp1/vsp1_drv.c=251=static int vsp1_create_entities(struct vsp1_device *vsp1)
--
drivers/media/platform/renesas/vsp1/vsp1_drv.c-477-	list_for_each_entry(entity, &vsp1->entities, list_dev) {
drivers/media/platform/renesas/vsp1/vsp1_drv.c:478:		ret = v4l2_device_register_subdev(&vsp1->v4l2_dev,
drivers/media/platform/renesas/vsp1/vsp1_drv.c-479-						  &entity->subdev);
--
drivers/media/platform/renesas/vsp1/vsp1_drv.c-492-
drivers/media/platform/renesas/vsp1/vsp1_drv.c:493:		ret = v4l2_device_register_subdev_nodes(&vsp1->v4l2_dev);
drivers/media/platform/renesas/vsp1/vsp1_drv.c-494-		if (ret < 0)
--
drivers/media/platform/rockchip/rkcif/rkcif-dev.c=138=static int rkcif_notifier_complete(struct v4l2_async_notifier *notifier)
--
drivers/media/platform/rockchip/rkcif/rkcif-dev.c-142-
drivers/media/platform/rockchip/rkcif/rkcif-dev.c:143:	return v4l2_device_register_subdev_nodes(&rkcif->v4l2_dev);
drivers/media/platform/rockchip/rkcif/rkcif-dev.c-144-}
--
drivers/media/platform/rockchip/rkcif/rkcif-interface.c=358=int rkcif_interface_register(struct rkcif_device *rkcif,
--
drivers/media/platform/rockchip/rkcif/rkcif-interface.c-391-
drivers/media/platform/rockchip/rkcif/rkcif-interface.c:392:	ret = v4l2_device_register_subdev(&rkcif->v4l2_dev, sd);
drivers/media/platform/rockchip/rkcif/rkcif-interface.c-393-	if (ret) {
--
drivers/media/platform/rockchip/rkisp1/rkisp1-csi.c=437=int rkisp1_csi_register(struct rkisp1_device *rkisp1)
--
drivers/media/platform/rockchip/rkisp1/rkisp1-csi.c-468-
drivers/media/platform/rockchip/rkisp1/rkisp1-csi.c:469:	ret = v4l2_device_register_subdev(&csi->rkisp1->v4l2_dev, sd);
drivers/media/platform/rockchip/rkisp1/rkisp1-csi.c-470-	if (ret) {
--
drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c=164=static int rkisp1_subdev_notifier_complete(struct v4l2_async_notifier *notifier)
--
drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c-168-
drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c:169:	return v4l2_device_register_subdev_nodes(&rkisp1->v4l2_dev);
drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c-170-}
--
drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c=1027=int rkisp1_isp_register(struct rkisp1_device *rkisp1)
--
drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c-1057-
drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c:1058:	ret = v4l2_device_register_subdev(&rkisp1->v4l2_dev, sd);
drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c-1059-	if (ret) {
--
drivers/media/platform/rockchip/rkisp1/rkisp1-resizer.c=682=static int rkisp1_rsz_register(struct rkisp1_resizer *rsz)
--
drivers/media/platform/rockchip/rkisp1/rkisp1-resizer.c-720-
drivers/media/platform/rockchip/rkisp1/rkisp1-resizer.c:721:	ret = v4l2_device_register_subdev(&rsz->rkisp1->v4l2_dev, sd);
drivers/media/platform/rockchip/rkisp1/rkisp1-resizer.c-722-	if (ret) {
--
drivers/media/platform/samsung/exynos4-is/media-dev.c=571=static int register_fimc_lite_entity(struct fimc_md *fmd,
--
drivers/media/platform/samsung/exynos4-is/media-dev.c-590-
drivers/media/platform/samsung/exynos4-is/media-dev.c:591:	ret = v4l2_device_register_subdev(&fmd->v4l2_dev, sd);
drivers/media/platform/samsung/exynos4-is/media-dev.c-592-	if (!ret)
--
drivers/media/platform/samsung/exynos4-is/media-dev.c=600=static int register_fimc_entity(struct fimc_md *fmd, struct fimc_dev *fimc)
--
drivers/media/platform/samsung/exynos4-is/media-dev.c-617-
drivers/media/platform/samsung/exynos4-is/media-dev.c:618:	ret = v4l2_device_register_subdev(&fmd->v4l2_dev, sd);
drivers/media/platform/samsung/exynos4-is/media-dev.c-619-	if (!ret) {
--
drivers/media/platform/samsung/exynos4-is/media-dev.c=631=static int register_csis_entity(struct fimc_md *fmd,
--
drivers/media/platform/samsung/exynos4-is/media-dev.c-646-	sd->grp_id = GRP_ID_CSIS;
drivers/media/platform/samsung/exynos4-is/media-dev.c:647:	ret = v4l2_device_register_subdev(&fmd->v4l2_dev, sd);
drivers/media/platform/samsung/exynos4-is/media-dev.c-648-	if (!ret)
--
drivers/media/platform/samsung/exynos4-is/media-dev.c=656=static int register_fimc_is_entity(struct fimc_md *fmd, struct fimc_is *is)
--
drivers/media/platform/samsung/exynos4-is/media-dev.c-668-
drivers/media/platform/samsung/exynos4-is/media-dev.c:669:	ret = v4l2_device_register_subdev(&fmd->v4l2_dev, sd);
drivers/media/platform/samsung/exynos4-is/media-dev.c-670-	if (ret) {
--
drivers/media/platform/samsung/exynos4-is/media-dev.c=1394=static int subdev_notifier_complete(struct v4l2_async_notifier *notifier)
--
drivers/media/platform/samsung/exynos4-is/media-dev.c-1408-
drivers/media/platform/samsung/exynos4-is/media-dev.c:1409:	ret = v4l2_device_register_subdev_nodes(&fmd->v4l2_dev);
drivers/media/platform/samsung/exynos4-is/media-dev.c-1410-	if (ret < 0)
--
drivers/media/platform/samsung/s3c-camif/camif-core.c=398=static int s3c_camif_probe(struct platform_device *pdev)
--
drivers/media/platform/samsung/s3c-camif/camif-core.c-470-
drivers/media/platform/samsung/s3c-camif/camif-core.c:471:	ret = v4l2_device_register_subdev(&camif->v4l2_dev, &camif->subdev);
drivers/media/platform/samsung/s3c-camif/camif-core.c-472-	if (ret < 0)
--
drivers/media/platform/samsung/s3c-camif/camif-core.c-474-
drivers/media/platform/samsung/s3c-camif/camif-core.c:475:	ret = v4l2_device_register_subdev_nodes(&camif->v4l2_dev);
drivers/media/platform/samsung/s3c-camif/camif-core.c-476-	if (ret < 0)
--
drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-common.c=40=int dcmipp_ent_sd_register(struct dcmipp_ent_device *ved,
--
drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-common.c-85-	/* Register the subdev with the v4l2 and the media framework */
drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-common.c:86:	ret = v4l2_device_register_subdev(v4l2_dev, sd);
drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-common.c-87-	if (ret) {
--
drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-core.c=395=static int dcmipp_graph_notify_complete(struct v4l2_async_notifier *notifier)
--
drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-core.c-408-	/* Expose all subdev's nodes*/
drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-core.c:409:	ret = v4l2_device_register_subdev_nodes(&dcmipp->v4l2_dev);
drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-core.c-410-	if (ret) {
--
drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c=74=static int sun4i_csi_notify_complete(struct v4l2_async_notifier *notifier)
--
drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c-81-
drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c:82:	ret = v4l2_device_register_subdev(&csi->v4l, subdev);
drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c-83-	if (ret < 0)
--
drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c-108-
drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c:109:	ret = v4l2_device_register_subdev_nodes(&csi->v4l);
drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c-110-	if (ret < 0)
--
drivers/media/platform/sunxi/sun6i-csi/sun6i_csi_bridge.c=689=sun6i_csi_bridge_notifier_complete(struct v4l2_async_notifier *notifier)
--
drivers/media/platform/sunxi/sun6i-csi/sun6i_csi_bridge.c-698-
drivers/media/platform/sunxi/sun6i-csi/sun6i_csi_bridge.c:699:	return v4l2_device_register_subdev_nodes(v4l2_dev);
drivers/media/platform/sunxi/sun6i-csi/sun6i_csi_bridge.c-700-}
--
drivers/media/platform/sunxi/sun6i-csi/sun6i_csi_bridge.c=768=int sun6i_csi_bridge_setup(struct sun6i_csi_device *csi_dev)
--
drivers/media/platform/sunxi/sun6i-csi/sun6i_csi_bridge.c-816-	else
drivers/media/platform/sunxi/sun6i-csi/sun6i_csi_bridge.c:817:		ret = v4l2_device_register_subdev(v4l2_dev, subdev);
drivers/media/platform/sunxi/sun6i-csi/sun6i_csi_bridge.c-818-
--
drivers/media/platform/ti/cal/cal-camerarx.c=959=struct cal_camerarx *cal_camerarx_create(struct cal_dev *cal,
--
drivers/media/platform/ti/cal/cal-camerarx.c-1019-
drivers/media/platform/ti/cal/cal-camerarx.c:1020:	ret = v4l2_device_register_subdev(&cal->v4l2_dev, sd);
drivers/media/platform/ti/cal/cal-camerarx.c-1021-	if (ret)
--
drivers/media/platform/ti/cal/cal.c=829=static int cal_async_notifier_complete(struct v4l2_async_notifier *notifier)
--
drivers/media/platform/ti/cal/cal.c-843-
drivers/media/platform/ti/cal/cal.c:844:	ret = v4l2_device_register_subdev_nodes(&cal->v4l2_dev);
drivers/media/platform/ti/cal/cal.c-845-	if (ret)
--
drivers/media/platform/ti/j721e-csi2rx/j721e-csi2rx.c=445=static int csi_async_notifier_complete(struct v4l2_async_notifier *notifier)
--
drivers/media/platform/ti/j721e-csi2rx/j721e-csi2rx.c-480-
drivers/media/platform/ti/j721e-csi2rx/j721e-csi2rx.c:481:	ret = v4l2_device_register_subdev_nodes(&csi->v4l2_dev);
drivers/media/platform/ti/j721e-csi2rx/j721e-csi2rx.c-482-	if (ret)
--
drivers/media/platform/ti/j721e-csi2rx/j721e-csi2rx.c=1394=static int ti_csi2rx_v4l2_init(struct ti_csi2rx_dev *csi)
--
drivers/media/platform/ti/j721e-csi2rx/j721e-csi2rx.c-1439-
drivers/media/platform/ti/j721e-csi2rx/j721e-csi2rx.c:1440:	ret = v4l2_device_register_subdev(&csi->v4l2_dev, sd);
drivers/media/platform/ti/j721e-csi2rx/j721e-csi2rx.c-1441-	if (ret)
--
drivers/media/platform/ti/omap3isp/isp.c=2012=static int isp_subdev_notifier_complete(struct v4l2_async_notifier *async)
--
drivers/media/platform/ti/omap3isp/isp.c-2023-
drivers/media/platform/ti/omap3isp/isp.c:2024:	ret = v4l2_device_register_subdev_nodes(&isp->v4l2_dev);
drivers/media/platform/ti/omap3isp/isp.c-2025-	if (ret < 0)
--
drivers/media/platform/ti/omap3isp/ispccdc.c=2624=int omap3isp_ccdc_register_entities(struct isp_ccdc_device *ccdc,
--
drivers/media/platform/ti/omap3isp/ispccdc.c-2630-	ccdc->subdev.dev = vdev->mdev->dev;
drivers/media/platform/ti/omap3isp/ispccdc.c:2631:	ret = v4l2_device_register_subdev(vdev, &ccdc->subdev);
drivers/media/platform/ti/omap3isp/ispccdc.c-2632-	if (ret < 0)
--
drivers/media/platform/ti/omap3isp/ispccp2.c=1036=int omap3isp_ccp2_register_entities(struct isp_ccp2_device *ccp2,
--
drivers/media/platform/ti/omap3isp/ispccp2.c-1042-	ccp2->subdev.dev = vdev->mdev->dev;
drivers/media/platform/ti/omap3isp/ispccp2.c:1043:	ret = v4l2_device_register_subdev(vdev, &ccp2->subdev);
drivers/media/platform/ti/omap3isp/ispccp2.c-1044-	if (ret < 0)
--
drivers/media/platform/ti/omap3isp/ispcsi2.c=1203=int omap3isp_csi2_register_entities(struct isp_csi2_device *csi2,
--
drivers/media/platform/ti/omap3isp/ispcsi2.c-1209-	csi2->subdev.dev = vdev->mdev->dev;
drivers/media/platform/ti/omap3isp/ispcsi2.c:1210:	ret = v4l2_device_register_subdev(vdev, &csi2->subdev);
drivers/media/platform/ti/omap3isp/ispcsi2.c-1211-	if (ret < 0)
--
drivers/media/platform/ti/omap3isp/isppreview.c=2226=int omap3isp_preview_register_entities(struct isp_prev_device *prev,
--
drivers/media/platform/ti/omap3isp/isppreview.c-2232-	prev->subdev.dev = vdev->mdev->dev;
drivers/media/platform/ti/omap3isp/isppreview.c:2233:	ret = v4l2_device_register_subdev(vdev, &prev->subdev);
drivers/media/platform/ti/omap3isp/isppreview.c-2234-	if (ret < 0)
--
drivers/media/platform/ti/omap3isp/ispresizer.c=1685=int omap3isp_resizer_register_entities(struct isp_res_device *res,
--
drivers/media/platform/ti/omap3isp/ispresizer.c-1691-	res->subdev.dev = vdev->mdev->dev;
drivers/media/platform/ti/omap3isp/ispresizer.c:1692:	ret = v4l2_device_register_subdev(vdev, &res->subdev);
drivers/media/platform/ti/omap3isp/ispresizer.c-1693-	if (ret < 0)
--
drivers/media/platform/ti/omap3isp/ispstat.c=1018=int omap3isp_stat_register_entities(struct ispstat *stat,

]

31/2 2026/08/07 16:10 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 42057
							output: 54
							thoughts: 39
						

Thoughts:
**My Thought Process**

Right, so I'm diving into the nitty-gritty of the Video4Linux2 subsystem, specifically how a sub-device gets registered. My current focus is on the `v4l2_device_register_subdev` function, and I'm looking at its implementation in `drivers/media/v4l2-core/v4l2-device.c`. My goal is to understand the sequence of operations and the underlying logic when a new sub-device is brought into the V4L2 framework. I'm essentially tracing the lifecycle of a sub-device registration from the perspective of the core V4L2 driver code.


32/2 2026/08/07 16:10 tool codesearch-definition-source
0m Error:
log-in to see details

Args:
map[ContextFile:drivers/media/v4l2-core/v4l2-device.c Name:v4l2_device_register_subdev]

Results:
map[SourceCode: SourceFile:]

33/2 2026/08/07 16:10 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 42155
							output: 50
							thoughts: 80
						

Thoughts:
**My Thought Process on Locating `v4l2_device_register_subdev`**

Okay, so I'm trying to find where the `v4l2_device_register_subdev` function is defined. My initial hypothesis is that it's likely within the `drivers/media/v4l2-core/` directory, as that's the core V4L2 subsystem. Specifically, I'm leaning towards `v4l2-device.c` because that file name strongly suggests it handles the management of V4L2 devices and their associated components. However, I'm also keeping in mind that the exact name might be slightly different, or perhaps the function is exported and defined elsewhere but visible from this core area. Therefore, my immediate next step is to perform a targeted `grep` for the precise string `v4l2_device_register_subdev` within the `drivers/media/v4l2-core/v4l2-device.c` file. This will be the most efficient way to confirm its presence or rule out this specific file for the definition.


34/2 2026/08/07 16:10 tool grepper
0m Args:
map[Expression:v4l2_device_register_subdev PathPrefix:drivers/media/v4l2-core/v4l2-device.c]

Results:
map[Output:drivers/media/v4l2-core/v4l2-device.c=109=EXPORT_SYMBOL_GPL(v4l2_device_unregister);
drivers/media/v4l2-core/v4l2-device.c-110-
drivers/media/v4l2-core/v4l2-device.c:111:int __v4l2_device_register_subdev(struct v4l2_device *v4l2_dev,
drivers/media/v4l2-core/v4l2-device.c-112-				  struct v4l2_subdev *sd, struct module *module)
--
drivers/media/v4l2-core/v4l2-device.c-172-}
drivers/media/v4l2-core/v4l2-device.c:173:EXPORT_SYMBOL_GPL(__v4l2_device_register_subdev);
drivers/media/v4l2-core/v4l2-device.c-174-
--
drivers/media/v4l2-core/v4l2-device.c=185=static void v4l2_device_release_subdev_node(struct video_device *vdev)
--
drivers/media/v4l2-core/v4l2-device.c-190-
drivers/media/v4l2-core/v4l2-device.c:191:int __v4l2_device_register_subdev_nodes(struct v4l2_device *v4l2_dev,
drivers/media/v4l2-core/v4l2-device.c-192-					bool read_only)
--
drivers/media/v4l2-core/v4l2-device.c-260-}
drivers/media/v4l2-core/v4l2-device.c:261:EXPORT_SYMBOL_GPL(__v4l2_device_register_subdev_nodes);
drivers/media/v4l2-core/v4l2-device.c-262-
]

35/2 2026/08/07 16:10 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 42803
							output: 55
							thoughts: 26
						

Thoughts:
**My Thought Process Upon Encountering `__v4l2_device_register_subdev`**

Okay, so I've just landed on the `__v4l2_device_register_subdev` function. My immediate instinct is to dive into its purpose and mechanics, as it clearly plays a crucial role in the Video4Linux2 (V4L2) subsystem. Given my expertise in this domain, I'm looking for the core functionality it provides and how it fits into the broader architecture.

My initial thought is to understand *what* this function is actually doing. The name itself is quite descriptive: it's registering a "subdevice" with a "V4L2 device." This implies a hierarchical relationship where a main V4L2 device can manage or contain multiple independent functional units, which are referred to as subdevices. These subdevices could represent things like image sensors, tuners, video decoders, or other hardware components that contribute to the overall video capture or processing pipeline.

I'm also considering *why* this registration is necessary. Registration is typically about making something known to a system so it can be managed, accessed, and utilized. So, I'm assuming `__v4l2_device_register_subdev` is the mechanism by which a V4L2 device driver informs the V4L2 core that it has an available subdevice, providing the necessary information for the core to interact with it. This likely involves associating the subdevice with its parent V4L2 device and making its capabilities discoverable.

My mind is racing through the potential arguments this function might take. I'd expect it to need a pointer to the parent `struct v4l2_device` to establish the parent-child relationship. It will almost certainly need a pointer to the `struct v4l2_subdev` itself, which would contain all the specific details about the subdevice – its name, its capabilities, and crucially, its operations table (`struct v4l2_subdev_ops`). This operations table is the key interface through which the V4L2 core will communicate with the subdevice.

Furthermore, I'm anticipating that this function will handle some level of internal bookkeeping within the V4L2 core. This could include:

*   **Populating data structures:** The V4L2 core likely maintains lists of registered subdevices associated with each `v4l2_device`. `__v4l2_device_register_subdev` would be responsible for adding the new subdevice to the appropriate list.
*   **Error checking:** As with any kernel function, I'm expecting robust error handling. It needs to validate the input arguments, check for memory allocation failures, and ensure that the subdevice isn't already registered.
*   **Resource management:** Depending on the complexity, it might involve acquiring locks or other synchronization primitives to ensure thread-safe access to the V4L2 device's subdevice list.
*   **Setting internal state:** It might set internal flags or identifiers for the subdevice within the V4L2 core.

I'm also thinking about the implications of this registration. Once a subdevice is registered, how does the V4L2 core interact with it? It would likely be through the `v4l2_subdev_ops` table. For example, if a user-space application wants to configure a specific sensor that is implemented as a subdevice, the V4L2 core would use the registered subdevice's operations to mediate that request. This implies a clear separation of concerns: the V4L2 core handles the generic V4L2 framework, while the subdevice driver provides the specific hardware implementation.

Finally, I'm considering the return value. A standard approach would be to return `0` on success and a negative `errno` value on failure. This allows the caller (likely another part of the V4L2 device driver) to react appropriately to registration problems.

In essence, my initial thought process is to deconstruct `__v4l2_device_register_subdev` into its fundamental purpose: to formally introduce a V4L2 subdevice to the V4L2 framework, making it known, manageable, and accessible through a well-defined interface, all while ensuring proper system integrity and error handling. I'm ready to delve into the implementation details to confirm these assumptions.


36/2 2026/08/07 16:11 tool codesearch-definition-source
0m Args:
map[ContextFile:drivers/media/v4l2-core/v4l2-device.c Name:__v4l2_device_register_subdev]

Results:
map[SourceCode: 111:	int __v4l2_device_register_subdev(struct v4l2_device *v4l2_dev,
 112:					  struct v4l2_subdev *sd, struct module *module)
 113:	{
 114:		int err;
 115:	
 116:		/* Check for valid input */
 117:		if (!v4l2_dev || !sd || sd->v4l2_dev || !sd->name[0])
 118:			return -EINVAL;
 119:	
 120:		/*
 121:		 * The reason to acquire the module here is to avoid unloading
 122:		 * a module of sub-device which is registered to a media
 123:		 * device. To make it possible to unload modules for media
 124:		 * devices that also register sub-devices, do not
 125:		 * try_module_get() such sub-device owners.
 126:		 */
 127:		sd->owner_v4l2_dev = v4l2_dev->dev && v4l2_dev->dev->driver &&
 128:			module == v4l2_dev->dev->driver->owner;
 129:	
 130:		if (!sd->owner_v4l2_dev && !try_module_get(module))
 131:			return -ENODEV;
 132:	
 133:		sd->v4l2_dev = v4l2_dev;
 134:		/* This just returns 0 if either of the two args is NULL */
 135:		err = v4l2_ctrl_add_handler(v4l2_dev->ctrl_handler, sd->ctrl_handler,
 136:					    NULL, true);
 137:		if (err)
 138:			goto error_module;
 139:	
 140:	#if defined(CONFIG_MEDIA_CONTROLLER)
 141:		/* Register the entity. */
 142:		if (v4l2_dev->mdev) {
 143:			err = media_device_register_entity(v4l2_dev->mdev, &sd->entity);
 144:			if (err < 0)
 145:				goto error_module;
 146:		}
 147:	#endif
 148:	
 149:		if (sd->internal_ops && sd->internal_ops->registered) {
 150:			err = sd->internal_ops->registered(sd);
 151:			if (err)
 152:				goto error_unregister;
 153:		}
 154:	
 155:		sd->owner = module;
 156:	
 157:		spin_lock(&v4l2_dev->lock);
 158:		list_add_tail(&sd->list, &v4l2_dev->subdevs);
 159:		spin_unlock(&v4l2_dev->lock);
 160:	
 161:		return 0;
 162:	
 163:	error_unregister:
 164:	#if defined(CONFIG_MEDIA_CONTROLLER)
 165:		media_device_unregister_entity(&sd->entity);
 166:	#endif
 167:	error_module:
 168:		if (!sd->owner_v4l2_dev)
 169:			module_put(sd->owner);
 170:		sd->v4l2_dev = NULL;
 171:		return err;
 172:	}
 SourceFile:drivers/media/v4l2-core/v4l2-device.c]

37/2 2026/08/07 16:11 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 43877
							output: 42
							thoughts: 133
						

Thoughts:
**My Thought Process Regarding Media Device Entity Initialization**

Alright, so I'm digging into how media device entities get registered and managed, and I've just had a thought about a potential issue or a nuance I need to clarify.

My initial observation is that when `media_device_register_entity` is called, it's supposed to set the `mdev` field within the `sd->entity.graph_obj`. This seems to be the core mechanism for linking an entity back to its parent media device.

However, I'm immediately struck by the fact that this assignment, specifically `sd->entity.graph_obj.mdev`, appears to be contingent on `CONFIG_MEDIA_CONTROLLER` being defined. If that configuration option is *not* enabled, then `sd->entity.graph_obj.mdev` would, by extension, never be explicitly set by this registration function.

This leads me to a follow-up thought: if `CONFIG_MEDIA_CONTROLLER` isn't defined, what is the default value of `sd->entity.graph_obj.mdev`? My assumption, based on typical C initialization behavior, is that it would likely default to 0 (or NULL, if it were a pointer).

But then a crucial question arises: Is `sd->v4l2_dev->mdev` also protected by the `CONFIG_MEDIA_CONTROLLER` guard? Because if both the entity's `mdev` pointer *and* the parent `v4l2_dev`'s `mdev` pointer are conditionally compiled, it raises concerns about how the media device controller framework functions (or doesn't function) when that configuration is absent.

To resolve this, I need to go back and carefully examine the definition of the `v4l2_device` struct itself. I need to see if `v4l2_dev->mdev` has similar conditional compilation directives, or if its existence and initialization are handled differently, especially in the absence of `CONFIG_MEDIA_CONTROLLER`. This is key to understanding the full picture of how these entities are supposed to be linked and managed across the board.


38/2 2026/08/07 16:11 tool codesearch-definition-source
0m Args:
map[ContextFile:include/media/v4l2-device.h Name:v4l2_device]

Results:
map[SourceCode:  18:	/**
  19:	 * struct v4l2_device - main struct to for V4L2 device drivers
  20:	 *
  21:	 * @dev: pointer to struct device.
  22:	 * @mdev: pointer to struct media_device, may be NULL.
  23:	 * @subdevs: used to keep track of the registered subdevs
  24:	 * @lock: lock this struct; can be used by the driver as well
  25:	 *	if this struct is embedded into a larger struct.
  26:	 * @name: unique device name, by default the driver name + bus ID
  27:	 * @notify: notify operation called by some sub-devices.
  28:	 * @ctrl_handler: The control handler. May be %NULL.
  29:	 * @prio: Device's priority state
  30:	 * @ref: Keep track of the references to this struct.
  31:	 * @release: Release function that is called when the ref count
  32:	 *	goes to 0.
  33:	 *
  34:	 * Each instance of a V4L2 device should create the v4l2_device struct,
  35:	 * either stand-alone or embedded in a larger struct.
  36:	 *
  37:	 * It allows easy access to sub-devices (see v4l2-subdev.h) and provides
  38:	 * basic V4L2 device-level support.
  39:	 *
  40:	 * .. note::
  41:	 *
  42:	 *    #) @dev->driver_data points to this struct.
  43:	 *    #) @dev might be %NULL if there is no parent device
  44:	 */
  45:	struct v4l2_device {
  46:		struct device *dev;
  47:		struct media_device *mdev;
  48:		struct list_head subdevs;
  49:		spinlock_t lock;
  50:		char name[36];
  51:		void (*notify)(struct v4l2_subdev *sd,
  52:				unsigned int notification, void *arg);
  53:		struct v4l2_ctrl_handler *ctrl_handler;
  54:		struct v4l2_prio_state prio;
  55:		struct kref ref;
  56:		void (*release)(struct v4l2_device *v4l2_dev);
  57:	};
 SourceFile:include/media/v4l2-device.h]

39/2 2026/08/07 16:11 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 44706
							output: 42
							thoughts: 136
						

Thoughts:
**My Thought Process Regarding `v4l2_device` and `CONFIG_MEDIA_CONTROLLER`**

Okay, so I'm thinking about how the `mdev` member within `v4l2_device` behaves, specifically in relation to the `CONFIG_MEDIA_CONTROLLER` kernel configuration option.

My initial assumption is that `mdev` within `v4l2_device` is *always* present. This leads me to ponder: if `CONFIG_MEDIA_CONTROLLER` is *not* enabled, could `v4l2_dev->mdev` still end up being non-NULL because some driver explicitly sets it?

Then, I have a bit of a correction to that line of thinking. I realize that if `CONFIG_MEDIA_CONTROLLER` is absent, the function `media_device_register_entity` simply won't be called. This is a key point because `sd->entity.graph_obj.mdev` (where `sd` is likely a struct media_sub_device) is populated *within* `media_device_register_entity`. Therefore, if that function isn't called, `sd->entity.graph_obj.mdev` *must* be NULL.

However, I'm still questioning the `v4l2_dev->mdev` part. Even if the entity isn't registered because of the missing `CONFIG_MEDIA_CONTROLLER`, is it still possible for `sd->v4l2_dev->mdev` to be non-NULL? This is what I need to verify. To do this, I need to dive into the implementation of `media_device_register_entity` itself to see precisely how `mdev` is handled and where it's assigned, or if it's potentially set elsewhere even when `CONFIG_MEDIA_CONTROLLER` is disabled.


40/2 2026/08/07 16:11 tool codesearch-definition-source
0m Args:
map[ContextFile:drivers/media/mc/mc-device.c Name:media_device_register_entity]

Results:
map[SourceCode: 605:	int __must_check media_device_register_entity(struct media_device *mdev,
 606:						      struct media_entity *entity)
 607:	{
 608:		struct media_entity_notify *notify, *next;
 609:		struct media_pad *iter;
 610:		int ret;
 611:	
 612:		if (entity->function == MEDIA_ENT_F_V4L2_SUBDEV_UNKNOWN ||
 613:		    entity->function == MEDIA_ENT_F_UNKNOWN)
 614:			dev_warn(mdev->dev,
 615:				 "Entity type for entity %s was not initialized!\n",
 616:				 entity->name);
 617:	
 618:		/* Warn if we apparently re-register an entity */
 619:		WARN_ON(entity->graph_obj.mdev != NULL);
 620:		entity->graph_obj.mdev = mdev;
 621:		INIT_LIST_HEAD(&entity->links);
 622:		entity->num_links = 0;
 623:		entity->num_backlinks = 0;
 624:	
 625:		ret = ida_alloc_min(&mdev->entity_internal_idx, 1, GFP_KERNEL);
 626:		if (ret < 0)
 627:			return ret;
 628:		entity->internal_idx = ret;
 629:	
 630:		mutex_lock(&mdev->graph_mutex);
 631:		mdev->entity_internal_idx_max =
 632:			max(mdev->entity_internal_idx_max, entity->internal_idx);
 633:	
 634:		/* Initialize media_gobj embedded at the entity */
 635:		media_gobj_create(mdev, MEDIA_GRAPH_ENTITY, &entity->graph_obj);
 636:	
 637:		/* Initialize objects at the pads */
 638:		media_entity_for_each_pad(entity, iter)
 639:			media_gobj_create(mdev, MEDIA_GRAPH_PAD, &iter->graph_obj);
 640:	
 641:		/* invoke entity_notify callbacks */
 642:		list_for_each_entry_safe(notify, next, &mdev->entity_notify, list)
 643:			notify->notify(entity, notify->notify_data);
 644:	
 645:		if (mdev->entity_internal_idx_max
 646:		    >= mdev->pm_count_walk.ent_enum.idx_max) {
 647:			struct media_graph new = { .top = 0 };
 648:	
 649:			/*
 650:			 * Initialise the new graph walk before cleaning up
 651:			 * the old one in order not to spoil the graph walk
 652:			 * object of the media device if graph walk init fails.
 653:			 */
 654:			ret = media_graph_walk_init(&new, mdev);
 655:			if (ret) {
 656:				__media_device_unregister_entity(entity);
 657:				mutex_unlock(&mdev->graph_mutex);
 658:				return ret;
 659:			}
 660:			media_graph_walk_cleanup(&mdev->pm_count_walk);
 661:			mdev->pm_count_walk = new;
 662:		}
 663:		mutex_unlock(&mdev->graph_mutex);
 664:	
 665:		return 0;
 666:	}
 SourceFile:drivers/media/mc/mc-device.c]

41/2 2026/08/07 16:11 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 45888
							output: 40
							thoughts: 95
						

Thoughts:
**My Thought Process**

Alright, let's trace this. I'm looking at the interaction with `media_device_register_entity`. My initial thought is about the conditional logic: if `CONFIG_MEDIA_CONTROLLER` is *enabled*, then `media_device_register_entity` actually *does* something. Specifically, it's responsible for setting the `mdev` field within the `entity->graph_obj` to point to the relevant `mdev` (media device).

However, the flip side of that coin is crucial: if `CONFIG_MEDIA_CONTROLLER` is *not* enabled, then `media_device_register_entity` appears to be either a no-operation or it's simply not called at all. This is a significant divergence in behavior based on that single configuration option.

To confirm this understanding and delve deeper into the specifics of `media_device_register_entity` itself, my next logical step is to examine its definition directly. I need to go to the source and check `include/media/media-device.h`. That's where I expect to find the exact implementation and verify if my assumptions about its conditional nature and its role in linking entities to media devices are correct.


42/2 2026/08/07 16:11 tool codesearch-definition-source
0m Args:
map[ContextFile:include/media/media-device.h Name:media_device_register_entity]

Results:
map[SourceCode: 605:	int __must_check media_device_register_entity(struct media_device *mdev,
 606:						      struct media_entity *entity)
 607:	{
 608:		struct media_entity_notify *notify, *next;
 609:		struct media_pad *iter;
 610:		int ret;
 611:	
 612:		if (entity->function == MEDIA_ENT_F_V4L2_SUBDEV_UNKNOWN ||
 613:		    entity->function == MEDIA_ENT_F_UNKNOWN)
 614:			dev_warn(mdev->dev,
 615:				 "Entity type for entity %s was not initialized!\n",
 616:				 entity->name);
 617:	
 618:		/* Warn if we apparently re-register an entity */
 619:		WARN_ON(entity->graph_obj.mdev != NULL);
 620:		entity->graph_obj.mdev = mdev;
 621:		INIT_LIST_HEAD(&entity->links);
 622:		entity->num_links = 0;
 623:		entity->num_backlinks = 0;
 624:	
 625:		ret = ida_alloc_min(&mdev->entity_internal_idx, 1, GFP_KERNEL);
 626:		if (ret < 0)
 627:			return ret;
 628:		entity->internal_idx = ret;
 629:	
 630:		mutex_lock(&mdev->graph_mutex);
 631:		mdev->entity_internal_idx_max =
 632:			max(mdev->entity_internal_idx_max, entity->internal_idx);
 633:	
 634:		/* Initialize media_gobj embedded at the entity */
 635:		media_gobj_create(mdev, MEDIA_GRAPH_ENTITY, &entity->graph_obj);
 636:	
 637:		/* Initialize objects at the pads */
 638:		media_entity_for_each_pad(entity, iter)
 639:			media_gobj_create(mdev, MEDIA_GRAPH_PAD, &iter->graph_obj);
 640:	
 641:		/* invoke entity_notify callbacks */
 642:		list_for_each_entry_safe(notify, next, &mdev->entity_notify, list)
 643:			notify->notify(entity, notify->notify_data);
 644:	
 645:		if (mdev->entity_internal_idx_max
 646:		    >= mdev->pm_count_walk.ent_enum.idx_max) {
 647:			struct media_graph new = { .top = 0 };
 648:	
 649:			/*
 650:			 * Initialise the new graph walk before cleaning up
 651:			 * the old one in order not to spoil the graph walk
 652:			 * object of the media device if graph walk init fails.
 653:			 */
 654:			ret = media_graph_walk_init(&new, mdev);
 655:			if (ret) {
 656:				__media_device_unregister_entity(entity);
 657:				mutex_unlock(&mdev->graph_mutex);
 658:				return ret;
 659:			}
 660:			media_graph_walk_cleanup(&mdev->pm_count_walk);
 661:			mdev->pm_count_walk = new;
 662:		}
 663:		mutex_unlock(&mdev->graph_mutex);
 664:	
 665:		return 0;
 666:	}
 SourceFile:drivers/media/mc/mc-device.c]

43/2 2026/08/07 16:11 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 47027
							output: 40
							thoughts: 54
						

Thoughts:
**My Thought Process on `media_device_register_entity` Stub**

Okay, so my attention has been drawn to this file, `include/media/media-device.h`, and I'm noticing something interesting. Specifically, there's a stub definition for the `media_device_register_entity` function. This immediately flags something in my mind, because a stub usually implies conditional compilation or a fallback mechanism. And indeed, the condition I'm seeing attached to this stub is `if !CONFIG_MEDIA_CONTROLLER`.

This tells me, in my expert understanding, that the `media_device_register_entity` function isn't always actively implemented. Its presence as a stub suggests that when the `CONFIG_MEDIA_CONTROLLER` kernel configuration option is *not* enabled, this function won't have a full, functional implementation available. Instead, it's being provided with a placeholder – a stub. This is a common pattern in kernel development to avoid compilation errors when certain features are disabled, while still maintaining a consistent API surface. My next logical step, of course, is to dive into that specific header file, `include/media/media-device.h`, to examine this stub definition firsthand and understand its exact nature and implications.


44/2 2026/08/07 16:11 tool codesearch-definition-source
0m Args:
map[ContextFile:include/media/media-device.h Name:media_device_register_entity]

Results:
map[SourceCode: 605:	int __must_check media_device_register_entity(struct media_device *mdev,
 606:						      struct media_entity *entity)
 607:	{
 608:		struct media_entity_notify *notify, *next;
 609:		struct media_pad *iter;
 610:		int ret;
 611:	
 612:		if (entity->function == MEDIA_ENT_F_V4L2_SUBDEV_UNKNOWN ||
 613:		    entity->function == MEDIA_ENT_F_UNKNOWN)
 614:			dev_warn(mdev->dev,
 615:				 "Entity type for entity %s was not initialized!\n",
 616:				 entity->name);
 617:	
 618:		/* Warn if we apparently re-register an entity */
 619:		WARN_ON(entity->graph_obj.mdev != NULL);
 620:		entity->graph_obj.mdev = mdev;
 621:		INIT_LIST_HEAD(&entity->links);
 622:		entity->num_links = 0;
 623:		entity->num_backlinks = 0;
 624:	
 625:		ret = ida_alloc_min(&mdev->entity_internal_idx, 1, GFP_KERNEL);
 626:		if (ret < 0)
 627:			return ret;
 628:		entity->internal_idx = ret;
 629:	
 630:		mutex_lock(&mdev->graph_mutex);
 631:		mdev->entity_internal_idx_max =
 632:			max(mdev->entity_internal_idx_max, entity->internal_idx);
 633:	
 634:		/* Initialize media_gobj embedded at the entity */
 635:		media_gobj_create(mdev, MEDIA_GRAPH_ENTITY, &entity->graph_obj);
 636:	
 637:		/* Initialize objects at the pads */
 638:		media_entity_for_each_pad(entity, iter)
 639:			media_gobj_create(mdev, MEDIA_GRAPH_PAD, &iter->graph_obj);
 640:	
 641:		/* invoke entity_notify callbacks */
 642:		list_for_each_entry_safe(notify, next, &mdev->entity_notify, list)
 643:			notify->notify(entity, notify->notify_data);
 644:	
 645:		if (mdev->entity_internal_idx_max
 646:		    >= mdev->pm_count_walk.ent_enum.idx_max) {
 647:			struct media_graph new = { .top = 0 };
 648:	
 649:			/*
 650:			 * Initialise the new graph walk before cleaning up
 651:			 * the old one in order not to spoil the graph walk
 652:			 * object of the media device if graph walk init fails.
 653:			 */
 654:			ret = media_graph_walk_init(&new, mdev);
 655:			if (ret) {
 656:				__media_device_unregister_entity(entity);
 657:				mutex_unlock(&mdev->graph_mutex);
 658:				return ret;
 659:			}
 660:			media_graph_walk_cleanup(&mdev->pm_count_walk);
 661:			mdev->pm_count_walk = new;
 662:		}
 663:		mutex_unlock(&mdev->graph_mutex);
 664:	
 665:		return 0;
 666:	}
 SourceFile:drivers/media/mc/mc-device.c]

45/2 2026/08/07 16:11 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 48125
							output: 36
							thoughts: 19
						

Thoughts:
**My Thought Process on Examining `include/media/media-device.h`**

Okay, so the initial impulse, or rather, the *necessity*, that just struck me is that I need to go directly to the source file, `include/media/media-device.h`. I can't rely on what I *think* is in there, or what other headers might be including. This specific header is the definitive declaration, the ground truth for media device structures and definitions, and if I'm going to be absolutely certain about how media devices are represented or how their interfaces are structured, I have to inspect this file firsthand. It's about digging into the foundational definitions to ensure my understanding is precise and uncorrupted by indirect references or potential ambiguities elsewhere.


46/2 2026/08/07 16:11 tool grepper
0m Args:
map[Expression:media_device_register_entity PathPrefix:include/media/media-device.h]

Results:
map[Output:include/media/media-device.h=301=void media_device_unregister(struct media_device *mdev);
--
include/media/media-device.h-303-/**
include/media/media-device.h:304: * media_device_register_entity() - registers a media entity inside a
include/media/media-device.h-305- *	previously registered media device.
--
include/media/media-device.h-317- * The media_entity name, type and flags fields should be initialized before
include/media/media-device.h:318: * calling media_device_register_entity(). Entities embedded in higher-level
include/media/media-device.h-319- * standard structures can have some of those fields set by the higher-level
--
include/media/media-device.h-338- */
include/media/media-device.h:339:int __must_check media_device_register_entity(struct media_device *mdev,
include/media/media-device.h-340-					      struct media_entity *entity);
--
include/media/media-device.h=361=void media_device_unregister_entity(struct media_entity *entity);
--
include/media/media-device.h-363-/**
include/media/media-device.h:364: * media_device_register_entity_notify() - Registers a media entity_notify
include/media/media-device.h-365- *					   callback
--
include/media/media-device.h-375-
include/media/media-device.h:376:void media_device_register_entity_notify(struct media_device *mdev,
include/media/media-device.h-377-					struct media_entity_notify *nptr);
--
include/media/media-device.h=451=static inline void media_device_cleanup(struct media_device *mdev)
--
include/media/media-device.h-453-}
include/media/media-device.h:454:static inline int media_device_register_entity(struct media_device *mdev,
include/media/media-device.h-455-						struct media_entity *entity)
--
include/media/media-device.h=459=static inline void media_device_unregister_entity(struct media_entity *entity)
--
include/media/media-device.h-461-}
include/media/media-device.h:462:static inline void media_device_register_entity_notify(
include/media/media-device.h-463-					struct media_device *mdev,
]

47/2 2026/08/07 16:11 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 48840
							output: 48
							thoughts: 527
						

Thoughts:
**My Debugging Journey: Tracing a Kernel Crash**

Ah, the excitement of a kernel bug hunt! I think I've stumbled upon a critical race condition, or at least a misunderstanding of how certain configurations play out. It all started when I noticed a crash occurring within the `subdev_open` function.

My initial thought process went something like this: "Okay, let's see what's happening in `subdev_open`." I zeroed in on this line:

```c
if (sd->v4l2_dev->mdev && sd->entity.graph_obj.mdev->dev) {
```

This condition implies that both `sd->v4l2_dev->mdev` and `sd->entity.graph_obj.mdev->dev` need to be valid for the subsequent code to execute.

Then, my gaze drifted to the `media_device_register_entity` function. I saw this:

```c
static inline int media_device_register_entity(struct media_dev *mdev,
						struct media_entity *entity)
{
	return 0;
}
```

This is interesting. If `CONFIG_MEDIA_CONTROLLER` is *not* defined, this function is essentially a no-op. It returns `0` and doesn't actually register anything. Crucially, this means `entity->graph_obj.mdev` would remain `NULL`.

My mind immediately jumped to `__v4l2_device_register_subdev`. I recalled seeing this conditional compilation:

```c
#if defined(CONFIG_MEDIA_CONTROLLER)
	/* Register the entity. */
	if (v4l2_dev->mdev) {
		err = media_device_register_entity(v4l2_dev->mdev, &sd->entity);
		if (err < 0)
			goto error_module;
	}
#endif
```

This makes perfect sense. If `CONFIG_MEDIA_CONTROLLER` is *not* defined, `media_device_register_entity` is simply *not even called*.

So, here's the potential problem I'm seeing: If `CONFIG_MEDIA_CONTROLLER` is disabled, `sd->v4l2_dev->mdev` *could* still be non-NULL if the driver explicitly sets it. However, because `media_device_register_entity` was never invoked, `sd->entity.graph_obj.mdev` will inevitably be `NULL`.

This directly leads to the crash in `subdev_open`, because the condition `sd->entity.graph_obj.mdev->dev` would then be attempting to dereference a `NULL` pointer.

I'm thinking that `sd->entity.graph_obj.mdev` is only ever intended to be set when `CONFIG_MEDIA_CONTROLLER` is enabled. My next step is to confirm that `subdev_open` is indeed compiled and executed even when `CONFIG_MEDIA_CONTROLLER` is disabled. I'll be checking `drivers/media/v4l2-core/v4l2-subdev.c` to verify if `subdev_open` is conditionally compiled out, or if it's always present when `CONFIG_VIDEO_V4L2_SUBDEV_API` is enabled. My initial check suggests `v4l2-subdev.c` is always compiled, so the latter is more likely. I need to dive into the source of `subdev_open` within `v4l2-subdev.c` to be absolutely sure.


48/2 2026/08/07 16:12 tool codesearch-definition-source
0m Args:
map[ContextFile:drivers/media/v4l2-core/v4l2-subdev.c Name:subdev_open]

Results:
map[SourceCode:  95:	static int subdev_open(struct file *file)
  96:	{
  97:		struct video_device *vdev = video_devdata(file);
  98:		struct v4l2_subdev *sd = vdev_to_v4l2_subdev(vdev);
  99:		struct v4l2_subdev_fh *subdev_fh;
 100:		int ret;
 101:	
 102:		subdev_fh = kzalloc_obj(*subdev_fh);
 103:		if (subdev_fh == NULL)
 104:			return -ENOMEM;
 105:	
 106:		ret = subdev_fh_init(subdev_fh, sd);
 107:		if (ret) {
 108:			kfree(subdev_fh);
 109:			return ret;
 110:		}
 111:	
 112:		v4l2_fh_init(&subdev_fh->vfh, vdev);
 113:		v4l2_fh_add(&subdev_fh->vfh, file);
 114:	
 115:		if (sd->v4l2_dev->mdev && sd->entity.graph_obj.mdev->dev) {
 116:			struct module *owner;
 117:	
 118:			owner = sd->entity.graph_obj.mdev->dev->driver->owner;
 119:			if (!try_module_get(owner)) {
 120:				ret = -EBUSY;
 121:				goto err;
 122:			}
 123:			subdev_fh->owner = owner;
 124:		}
 125:	
 126:		if (sd->internal_ops && sd->internal_ops->open) {
 127:			ret = sd->internal_ops->open(sd, subdev_fh);
 128:			if (ret < 0)
 129:				goto err;
 130:		}
 131:	
 132:		return 0;
 133:	
 134:	err:
 135:		module_put(subdev_fh->owner);
 136:		v4l2_fh_del(&subdev_fh->vfh, file);
 137:		v4l2_fh_exit(&subdev_fh->vfh);
 138:		subdev_fh_free(subdev_fh);
 139:		kfree(subdev_fh);
 140:	
 141:		return ret;
 142:	}
 SourceFile:drivers/media/v4l2-core/v4l2-subdev.c]

49/2 2026/08/07 16:12 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 50151
							output: 36
							thoughts: 43
						

Thoughts:
**My Thought Process**

I'm currently grappling with a conditional compilation scenario and trying to trace the implications of a specific preprocessor directive, `CONFIG_MEDIA_CONTROLLER`. My immediate concern is: if `CONFIG_MEDIA_CONTROLLER` is *not* defined, does the member `sd->entity.graph_obj.mdev` even exist within the `sd` structure? To answer this, my next logical step is to dive into the definition of `media_entity` itself. I need to examine how `graph_obj` is structured and, crucially, whether `mdev` is a member that is conditionally included based on `CONFIG_MEDIA_CONTROLLER`. This will clarify the memory layout and accessibility of that particular field under the given compilation conditions.


50/2 2026/08/07 16:12 tool codesearch-definition-source
0m Args:
map[ContextFile:include/media/media-entity.h Name:media_entity]

Results:
map[SourceCode: 316:	/**
 317:	 * struct media_entity - A media entity graph object.
 318:	 *
 319:	 * @graph_obj:	Embedded structure containing the media object common data.
 320:	 * @name:	Entity name.
 321:	 * @obj_type:	Type of the object that implements the media_entity.
 322:	 * @function:	Entity main function, as defined in
 323:	 *		:ref:`include/uapi/linux/media.h <media_header>`
 324:	 *		(seek for ``MEDIA_ENT_F_*``)
 325:	 * @flags:	Entity flags, as defined in
 326:	 *		:ref:`include/uapi/linux/media.h <media_header>`
 327:	 *		(seek for ``MEDIA_ENT_FL_*``)
 328:	 * @num_pads:	Number of sink and source pads.
 329:	 * @num_links:	Total number of links, forward and back, enabled and disabled.
 330:	 * @num_backlinks: Number of backlinks
 331:	 * @internal_idx: An unique internal entity specific number. The numbers are
 332:	 *		re-used if entities are unregistered or registered again.
 333:	 * @pads:	Pads array with the size defined by @num_pads.
 334:	 * @links:	List of data links.
 335:	 * @ops:	Entity operations.
 336:	 * @use_count:	Use count for the entity.
 337:	 * @info:	Union with devnode information.  Kept just for backward
 338:	 *		compatibility.
 339:	 * @info.dev:	Contains device major and minor info.
 340:	 * @info.dev.major: device node major, if the device is a devnode.
 341:	 * @info.dev.minor: device node minor, if the device is a devnode.
 342:	 *
 343:	 * .. note::
 344:	 *
 345:	 *    The @use_count reference count must never be negative, but is a signed
 346:	 *    integer on purpose: a simple ``WARN_ON(<0)`` check can be used to detect
 347:	 *    reference count bugs that would make it negative.
 348:	 */
 349:	struct media_entity {
 350:		struct media_gobj graph_obj;	/* must be first field in struct */
 351:		const char *name;
 352:		enum media_entity_type obj_type;
 353:		u32 function;
 354:		unsigned long flags;
 355:	
 356:		u16 num_pads;
 357:		u16 num_links;
 358:		u16 num_backlinks;
 359:		int internal_idx;
 360:	
 361:		struct media_pad *pads;
 362:		struct list_head links;
 363:	
 364:		const struct media_entity_operations *ops;
 365:	
 366:		int use_count;
 367:	
 368:		union {
 369:			struct {
 370:				u32 major;
 371:				u32 minor;
 372:			} dev;
 373:		} info;
 374:	};
 SourceFile:include/media/media-entity.h]

51/2 2026/08/07 16:12 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 51180
							output: 37
							thoughts: 24
						

Thoughts:
**My Thought Process on `media_entity` and `media_gobj`**

Alright, so the first thing that strikes me is this absolute certainty: `media_entity` *always* has a `graph_obj`. There's no "if" or "maybe" here, it's a given. This is a foundational piece of information, and it immediately prompts me to consider the implications of that relationship.

Since `media_entity` is guaranteed to possess a `graph_obj`, my next logical step, my immediate follow-up thought, is to investigate `media_gobj`. I need to understand what this `media_gobj` is, what its properties are, and how it interacts with, or is perhaps even derived from, that established `graph_obj` within the `media_entity`. It's like knowing a component is always present; the next step is to dissect that component itself.


52/2 2026/08/07 16:12 tool codesearch-definition-source
0m Args:
map[ContextFile:include/media/media-entity.h Name:media_gobj]

Results:
map[SourceCode:  47:	/**
  48:	 * struct media_gobj - Define a graph object.
  49:	 *
  50:	 * @mdev:	Pointer to the struct &media_device that owns the object
  51:	 * @id:		Non-zero object ID identifier. The ID should be unique
  52:	 *		inside a media_device, as it is composed by
  53:	 *		%MEDIA_BITS_PER_TYPE to store the type plus
  54:	 *		%MEDIA_BITS_PER_ID to store the ID
  55:	 * @list:	List entry stored in one of the per-type mdev object lists
  56:	 *
  57:	 * All objects on the media graph should have this struct embedded
  58:	 */
  59:	struct media_gobj {
  60:		struct media_device	*mdev;
  61:		u32			id;
  62:		struct list_head	list;
  63:	};
 SourceFile:include/media/media-entity.h]

53/2 2026/08/07 16:12 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 51508
							output: 44
							thoughts: 91
						

Thoughts:
**A Deep Dive into Media Controller and V4L2 Subdevice Relationships**

Okay, so my initial assumption was that a `media_gobj` *always* has an `mdev`, meaning it's always associated with a media device. But upon closer inspection, I realized this isn't quite right. If `CONFIG_MEDIA_CONTROLLER` is *disabled*, then the `media_device_register_entity` function, which is responsible for linking entities to the media device graph, effectively does nothing. This means that `entity->graph_obj.mdev` would indeed be NULL, contradicting my initial thought.

This then leads me to question the relationship between `v4l2_subdev` and `media_gobj` (specifically, its `entity` member). I'm finding that `v4l2_subdev` seems to have an `entity` pointer unconditionally. This makes sense, as a V4L2 subdevice is fundamentally an entity within the media framework, even if the full media controller infrastructure isn't explicitly enabled. My next step is to delve into the definition of `v4l2_subdev` itself to confirm this structural dependency and understand how it interacts with the media entity concept in all scenarios.


54/2 2026/08/07 16:12 tool codesearch-definition-source
0m Args:
map[ContextFile:include/media/v4l2-subdev.h Name:v4l2_subdev]

Results:
map[SourceCode: 992:	/**
 993:	 * struct v4l2_subdev - describes a V4L2 sub-device
 994:	 *
 995:	 * @entity: pointer to &struct media_entity
 996:	 * @list: List of sub-devices
 997:	 * @owner: The owner is the same as the driver's &struct device owner.
 998:	 * @owner_v4l2_dev: true if the &sd->owner matches the owner of @v4l2_dev->dev
 999:	 *	owner. Initialized by v4l2_device_register_subdev().
1000:	 * @flags: subdev flags. Can be:
1001:	 *   %V4L2_SUBDEV_FL_IS_I2C - Set this flag if this subdev is a i2c device;
1002:	 *   %V4L2_SUBDEV_FL_IS_SPI - Set this flag if this subdev is a spi device;
1003:	 *   %V4L2_SUBDEV_FL_HAS_DEVNODE - Set this flag if this subdev needs a
1004:	 *   device node;
1005:	 *   %V4L2_SUBDEV_FL_HAS_EVENTS -  Set this flag if this subdev generates
1006:	 *   events.
1007:	 *
1008:	 * @v4l2_dev: pointer to struct &v4l2_device
1009:	 * @ops: pointer to struct &v4l2_subdev_ops
1010:	 * @internal_ops: pointer to struct &v4l2_subdev_internal_ops.
1011:	 *	Never call these internal ops from within a driver!
1012:	 * @ctrl_handler: The control handler of this subdev. May be NULL.
1013:	 * @name: Name of the sub-device. Please notice that the name must be unique.
1014:	 * @grp_id: can be used to group similar subdevs. Value is driver-specific
1015:	 * @dev_priv: pointer to private data
1016:	 * @host_priv: pointer to private data used by the device where the subdev
1017:	 *	is attached.
1018:	 * @devnode: subdev device node
1019:	 * @dev: pointer to the physical device, if any
1020:	 * @fwnode: The fwnode_handle of the subdev, usually the same as
1021:	 *	    either dev->of_node->fwnode or dev->fwnode (whichever is non-NULL).
1022:	 * @async_list: Links this subdev to a global subdev_list or
1023:	 *		@notifier->done_list list.
1024:	 * @async_subdev_endpoint_list: List entry in async_subdev_endpoint_entry of
1025:	 *				&struct v4l2_async_subdev_endpoint.
1026:	 * @subdev_notifier: A sub-device notifier implicitly registered for the sub-
1027:	 *		     device using v4l2_async_register_subdev_sensor().
1028:	 * @asc_list: Async connection list, of &struct
1029:	 *	      v4l2_async_connection.subdev_entry.
1030:	 * @pdata: common part of subdevice platform data
1031:	 * @state_lock: A pointer to a lock used for all the subdev's states, set by the
1032:	 *		driver. This is	optional. If NULL, each state instance will get
1033:	 *		a lock of its own.
1034:	 * @privacy_led: Optional pointer to a LED classdev for the privacy LED for sensors.
1035:	 * @active_state: Active state for the subdev (NULL for subdevs tracking the
1036:	 *		  state internally). Initialized by calling
1037:	 *		  v4l2_subdev_init_finalize().
1038:	 * @enabled_pads: Bitmask of enabled pads used by v4l2_subdev_enable_streams()
1039:	 *		  and v4l2_subdev_disable_streams() helper functions for
1040:	 *		  fallback cases.
1041:	 * @s_stream_enabled: Tracks whether streaming has been enabled with s_stream.
1042:	 *                    This is only for call_s_stream() internal use.
1043:	 *
1044:	 * Each instance of a subdev driver should create this struct, either
1045:	 * stand-alone or embedded in a larger struct.
1046:	 *
1047:	 * This structure should be initialized by v4l2_subdev_init() or one of
1048:	 * its variants: v4l2_spi_subdev_init(), v4l2_i2c_subdev_init().
1049:	 */
1050:	struct v4l2_subdev {
1051:	#if defined(CONFIG_MEDIA_CONTROLLER)
1052:		struct media_entity entity;
1053:	#endif
1054:		struct list_head list;
1055:		struct module *owner;
1056:		bool owner_v4l2_dev;
1057:		u32 flags;
1058:		struct v4l2_device *v4l2_dev;
1059:		const struct v4l2_subdev_ops *ops;
1060:		const struct v4l2_subdev_internal_ops *internal_ops;
1061:		struct v4l2_ctrl_handler *ctrl_handler;
1062:		char name[52];
1063:		u32 grp_id;
1064:		void *dev_priv;
1065:		void *host_priv;
1066:		struct video_device *devnode;
1067:		struct device *dev;
1068:		struct fwnode_handle *fwnode;
1069:		struct list_head async_list;
1070:		struct list_head async_subdev_endpoint_list;
1071:		struct v4l2_async_notifier *subdev_notifier;
1072:		struct list_head asc_list;
1073:		struct v4l2_subdev_platform_data *pdata;
1074:		struct mutex *state_lock;
1075:	
1076:		/*
1077:		 * The fields below are private, and should only be accessed via
1078:		 * appropriate functions.
1079:		 */
1080:	
1081:		struct led_classdev *privacy_led;
1082:	
1083:		/*
1084:		 * TODO: active_state should most likely be changed from a pointer to an
1085:		 * embedded field. For the time being it's kept as a pointer to more
1086:		 * easily catch uses of active_state in the cases where the driver
1087:		 * doesn't support it.
1088:		 */
1089:		struct v4l2_subdev_state *active_state;
1090:		u64 enabled_pads;
1091:		bool s_stream_enabled;
1092:	};
 SourceFile:include/media/v4l2-subdev.h]

55/2 2026/08/07 16:12 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 53612
							output: 48
							thoughts: 78
						

Thoughts:
**My Thought Process Unpacked**

This is fascinating. My initial observation, a rather sharp insight I thought, was that the `entity` object appears to be conditional – it's *only* present when `CONFIG_MEDIA_CONTROLLER` is defined. That makes perfect sense from a modularity perspective; if you don't have the media controller configuration, you wouldn't need the entity associated with it.

However, that's where the wheels started to turn, and a significant question arose. If `entity` is strictly dependent on `CONFIG_MEDIA_CONTROLLER` being defined, then how on earth is the `subdev_open` function able to compile when `CONFIG_MEDIA_CONTROLLER` is *not* defined? This presents a logical conflict that I need to resolve. It implies there's either a subtle oversight in my initial assumption about `entity`'s exclusivity or a mechanism within `subdev_open` that handles the absence of `entity` gracefully. My next logical step, therefore, is to revisit the `subdev_open` function itself, to scrutinize its implementation and understand precisely how it navigates this apparent dependency.


56/2 2026/08/07 16:12 tool codesearch-definition-source
0m Args:
map[ContextFile:drivers/media/v4l2-core/v4l2-subdev.c Name:subdev_open]

Results:
map[SourceCode:  95:	static int subdev_open(struct file *file)
  96:	{
  97:		struct video_device *vdev = video_devdata(file);
  98:		struct v4l2_subdev *sd = vdev_to_v4l2_subdev(vdev);
  99:		struct v4l2_subdev_fh *subdev_fh;
 100:		int ret;
 101:	
 102:		subdev_fh = kzalloc_obj(*subdev_fh);
 103:		if (subdev_fh == NULL)
 104:			return -ENOMEM;
 105:	
 106:		ret = subdev_fh_init(subdev_fh, sd);
 107:		if (ret) {
 108:			kfree(subdev_fh);
 109:			return ret;
 110:		}
 111:	
 112:		v4l2_fh_init(&subdev_fh->vfh, vdev);
 113:		v4l2_fh_add(&subdev_fh->vfh, file);
 114:	
 115:		if (sd->v4l2_dev->mdev && sd->entity.graph_obj.mdev->dev) {
 116:			struct module *owner;
 117:	
 118:			owner = sd->entity.graph_obj.mdev->dev->driver->owner;
 119:			if (!try_module_get(owner)) {
 120:				ret = -EBUSY;
 121:				goto err;
 122:			}
 123:			subdev_fh->owner = owner;
 124:		}
 125:	
 126:		if (sd->internal_ops && sd->internal_ops->open) {
 127:			ret = sd->internal_ops->open(sd, subdev_fh);
 128:			if (ret < 0)
 129:				goto err;
 130:		}
 131:	
 132:		return 0;
 133:	
 134:	err:
 135:		module_put(subdev_fh->owner);
 136:		v4l2_fh_del(&subdev_fh->vfh, file);
 137:		v4l2_fh_exit(&subdev_fh->vfh);
 138:		subdev_fh_free(subdev_fh);
 139:		kfree(subdev_fh);
 140:	
 141:		return ret;
 142:	}
 SourceFile:drivers/media/v4l2-core/v4l2-subdev.c]

57/2 2026/08/07 16:12 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 54474
							output: 42
							thoughts: 235
						

Thoughts:
**My Thought Process Unpacking a Potential Compilation Issue**

Okay, so I'm reviewing this code, and my attention is immediately drawn to line 115: `if (sd->v4l2_dev->mdev && sd->entity.graph_obj.mdev->dev) {`. My initial instinct is to flag this as a potential compilation error, specifically if `CONFIG_MEDIA_CONTROLLER` is *not* defined. My reasoning here is that if that configuration option is absent, the `entity` member, which is being accessed via `sd->entity.graph_obj.mdev`, wouldn't even exist within the `v4l2_subdev` structure. That's a pretty direct path to a compiler complaint.

However, the plot thickens. I then consider the `sd->v4l2_dev->mdev` part of that same condition. My recollection, or perhaps a quick mental check, suggests that `mdev` itself is *also* conditionally compiled based on `CONFIG_MEDIA_CONTROLLER`. This is where my thought process pivots from a simple error identification to a deeper investigation of the conditional compilation directives.

To verify this, I decide to re-examine the `v4l2_device` structure definition. I'm looking for the exact placement of the `CONFIG_MEDIA_CONTROLLER` guard. My initial scan of the struct layout output *didn't* show that `#if defined(CONFIG_MEDIA_CONTROLLER)` guard around the `mdev` member, which is rather odd. This discrepancy is what compels me to go back and meticulously re-read the output from the struct layout tool, double-checking every line, to ensure I haven't missed something subtle. It's this kind of detailed verification that's crucial when you're dealing with complex conditional compilation and potential subtle bugs.


58/2 2026/08/07 16:12 tool codesearch-definition-source
0m Args:
map[ContextFile:include/media/v4l2-device.h Name:v4l2_device]

Results:
map[SourceCode:  18:	/**
  19:	 * struct v4l2_device - main struct to for V4L2 device drivers
  20:	 *
  21:	 * @dev: pointer to struct device.
  22:	 * @mdev: pointer to struct media_device, may be NULL.
  23:	 * @subdevs: used to keep track of the registered subdevs
  24:	 * @lock: lock this struct; can be used by the driver as well
  25:	 *	if this struct is embedded into a larger struct.
  26:	 * @name: unique device name, by default the driver name + bus ID
  27:	 * @notify: notify operation called by some sub-devices.
  28:	 * @ctrl_handler: The control handler. May be %NULL.
  29:	 * @prio: Device's priority state
  30:	 * @ref: Keep track of the references to this struct.
  31:	 * @release: Release function that is called when the ref count
  32:	 *	goes to 0.
  33:	 *
  34:	 * Each instance of a V4L2 device should create the v4l2_device struct,
  35:	 * either stand-alone or embedded in a larger struct.
  36:	 *
  37:	 * It allows easy access to sub-devices (see v4l2-subdev.h) and provides
  38:	 * basic V4L2 device-level support.
  39:	 *
  40:	 * .. note::
  41:	 *
  42:	 *    #) @dev->driver_data points to this struct.
  43:	 *    #) @dev might be %NULL if there is no parent device
  44:	 */
  45:	struct v4l2_device {
  46:		struct device *dev;
  47:		struct media_device *mdev;
  48:		struct list_head subdevs;
  49:		spinlock_t lock;
  50:		char name[36];
  51:		void (*notify)(struct v4l2_subdev *sd,
  52:				unsigned int notification, void *arg);
  53:		struct v4l2_ctrl_handler *ctrl_handler;
  54:		struct v4l2_prio_state prio;
  55:		struct kref ref;
  56:		void (*release)(struct v4l2_device *v4l2_dev);
  57:	};
 SourceFile:include/media/v4l2-device.h]

59/2 2026/08/07 16:12 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 55405
							output: 48
							thoughts: 151
						

Thoughts:
**My Thought Process Regarding `mdev` and `CONFIG_MEDIA_CONTROLLER`**

My initial observation was that `mdev` itself, as a concept or function, doesn't appear to be directly protected by the `#if defined(CONFIG_MEDIA_CONTROLLER)` preprocessor directive. This struck me as a bit odd because, in my experience, components that heavily rely on the Media Controller framework are typically enclosed within such conditional compilation guards.

However, I then noticed that the `entity` member within the `v4l2_subdev` structure *is* indeed guarded by `#if defined(CONFIG_MEDIA_CONTROLLER)`. This is a crucial detail.

This revelation led to a logical deduction: If the `entity` field within `v4l2_subdev` is conditional on `CONFIG_MEDIA_CONTROLLER`, then any code that *uses* this `entity` field, specifically within the `subdev_open` function, *must* also be compiled with `CONFIG_MEDIA_CONTROLLER` enabled. If it weren't, the `subdev_open` function, attempting to access a member that might not exist in a non-Media Controller build, would simply fail to compile. This is a fundamental principle of C preprocessor directives; you can't use something that's conditionally compiled out.

To confirm this chain of reasoning, my next step was to directly inspect the source code, specifically `drivers/media/v4l2-core/v4l2-subdev.c`, to verify whether the `subdev_open` function itself, or its critical parts that interact with the `entity`, are indeed enclosed within `#if defined(CONFIG_MEDIA_CONTROLLER)` guards. This would be the definitive way to resolve the apparent discrepancy.


60/2 2026/08/07 16:12 tool codesearch-definition-source
0m Args:
map[ContextFile:drivers/media/v4l2-core/v4l2-subdev.c Name:subdev_open]

Results:
map[SourceCode:  95:	static int subdev_open(struct file *file)
  96:	{
  97:		struct video_device *vdev = video_devdata(file);
  98:		struct v4l2_subdev *sd = vdev_to_v4l2_subdev(vdev);
  99:		struct v4l2_subdev_fh *subdev_fh;
 100:		int ret;
 101:	
 102:		subdev_fh = kzalloc_obj(*subdev_fh);
 103:		if (subdev_fh == NULL)
 104:			return -ENOMEM;
 105:	
 106:		ret = subdev_fh_init(subdev_fh, sd);
 107:		if (ret) {
 108:			kfree(subdev_fh);
 109:			return ret;
 110:		}
 111:	
 112:		v4l2_fh_init(&subdev_fh->vfh, vdev);
 113:		v4l2_fh_add(&subdev_fh->vfh, file);
 114:	
 115:		if (sd->v4l2_dev->mdev && sd->entity.graph_obj.mdev->dev) {
 116:			struct module *owner;
 117:	
 118:			owner = sd->entity.graph_obj.mdev->dev->driver->owner;
 119:			if (!try_module_get(owner)) {
 120:				ret = -EBUSY;
 121:				goto err;
 122:			}
 123:			subdev_fh->owner = owner;
 124:		}
 125:	
 126:		if (sd->internal_ops && sd->internal_ops->open) {
 127:			ret = sd->internal_ops->open(sd, subdev_fh);
 128:			if (ret < 0)
 129:				goto err;
 130:		}
 131:	
 132:		return 0;
 133:	
 134:	err:
 135:		module_put(subdev_fh->owner);
 136:		v4l2_fh_del(&subdev_fh->vfh, file);
 137:		v4l2_fh_exit(&subdev_fh->vfh);
 138:		subdev_fh_free(subdev_fh);
 139:		kfree(subdev_fh);
 140:	
 141:		return ret;
 142:	}
 SourceFile:drivers/media/v4l2-core/v4l2-subdev.c]

61/2 2026/08/07 16:12 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 56340
							output: 44
							thoughts: 76
						

Thoughts:
**My Thought Process Regarding `v4l2_subdev` and Media Controller Dependencies**

My initial reaction upon encountering the `subdev_open` function was surprise. I noticed that it was *not* directly guarded by the `#if defined(CONFIG_MEDIA_CONTROLLER)` preprocessor directive, which struck me as unusual given its apparent role within the media controller framework.

This observation immediately prompted me to cross-reference with the `v4l2_subdev` structure definition. I recalled, or at least suspected, that the `entity` member within `v4l2_subdev` *was* indeed protected by the `CONFIG_MEDIA_CONTROLLER` guard. This discrepancy became the core of my line of inquiry: if the `entity` member, which seems intrinsically linked to media controller functionality, is guarded, why isn't `subdev_open`?

To resolve this, my next logical step was to revisit the source code, specifically `include/media/v4l2-subdev.h`. I needed to meticulously re-examine the definitions and surrounding code for both `subdev_open` and the `entity` member to understand the precise conditions under which they are compiled and how they interact within the broader V4L2 subsystem. My goal was to confirm whether my initial assessment of `subdev_open`'s lack of guarding was accurate and to then deduce the rationale behind this design choice, potentially revealing a subtle dependency or a different scope of inclusion than I initially assumed.


62/2 2026/08/07 16:12 tool codesearch-definition-source
0m Args:
map[ContextFile:include/media/v4l2-subdev.h Name:v4l2_subdev]

Results:
map[SourceCode: 992:	/**
 993:	 * struct v4l2_subdev - describes a V4L2 sub-device
 994:	 *
 995:	 * @entity: pointer to &struct media_entity
 996:	 * @list: List of sub-devices
 997:	 * @owner: The owner is the same as the driver's &struct device owner.
 998:	 * @owner_v4l2_dev: true if the &sd->owner matches the owner of @v4l2_dev->dev
 999:	 *	owner. Initialized by v4l2_device_register_subdev().
1000:	 * @flags: subdev flags. Can be:
1001:	 *   %V4L2_SUBDEV_FL_IS_I2C - Set this flag if this subdev is a i2c device;
1002:	 *   %V4L2_SUBDEV_FL_IS_SPI - Set this flag if this subdev is a spi device;
1003:	 *   %V4L2_SUBDEV_FL_HAS_DEVNODE - Set this flag if this subdev needs a
1004:	 *   device node;
1005:	 *   %V4L2_SUBDEV_FL_HAS_EVENTS -  Set this flag if this subdev generates
1006:	 *   events.
1007:	 *
1008:	 * @v4l2_dev: pointer to struct &v4l2_device
1009:	 * @ops: pointer to struct &v4l2_subdev_ops
1010:	 * @internal_ops: pointer to struct &v4l2_subdev_internal_ops.
1011:	 *	Never call these internal ops from within a driver!
1012:	 * @ctrl_handler: The control handler of this subdev. May be NULL.
1013:	 * @name: Name of the sub-device. Please notice that the name must be unique.
1014:	 * @grp_id: can be used to group similar subdevs. Value is driver-specific
1015:	 * @dev_priv: pointer to private data
1016:	 * @host_priv: pointer to private data used by the device where the subdev
1017:	 *	is attached.
1018:	 * @devnode: subdev device node
1019:	 * @dev: pointer to the physical device, if any
1020:	 * @fwnode: The fwnode_handle of the subdev, usually the same as
1021:	 *	    either dev->of_node->fwnode or dev->fwnode (whichever is non-NULL).
1022:	 * @async_list: Links this subdev to a global subdev_list or
1023:	 *		@notifier->done_list list.
1024:	 * @async_subdev_endpoint_list: List entry in async_subdev_endpoint_entry of
1025:	 *				&struct v4l2_async_subdev_endpoint.
1026:	 * @subdev_notifier: A sub-device notifier implicitly registered for the sub-
1027:	 *		     device using v4l2_async_register_subdev_sensor().
1028:	 * @asc_list: Async connection list, of &struct
1029:	 *	      v4l2_async_connection.subdev_entry.
1030:	 * @pdata: common part of subdevice platform data
1031:	 * @state_lock: A pointer to a lock used for all the subdev's states, set by the
1032:	 *		driver. This is	optional. If NULL, each state instance will get
1033:	 *		a lock of its own.
1034:	 * @privacy_led: Optional pointer to a LED classdev for the privacy LED for sensors.
1035:	 * @active_state: Active state for the subdev (NULL for subdevs tracking the
1036:	 *		  state internally). Initialized by calling
1037:	 *		  v4l2_subdev_init_finalize().
1038:	 * @enabled_pads: Bitmask of enabled pads used by v4l2_subdev_enable_streams()
1039:	 *		  and v4l2_subdev_disable_streams() helper functions for
1040:	 *		  fallback cases.
1041:	 * @s_stream_enabled: Tracks whether streaming has been enabled with s_stream.
1042:	 *                    This is only for call_s_stream() internal use.
1043:	 *
1044:	 * Each instance of a subdev driver should create this struct, either
1045:	 * stand-alone or embedded in a larger struct.
1046:	 *
1047:	 * This structure should be initialized by v4l2_subdev_init() or one of
1048:	 * its variants: v4l2_spi_subdev_init(), v4l2_i2c_subdev_init().
1049:	 */
1050:	struct v4l2_subdev {
1051:	#if defined(CONFIG_MEDIA_CONTROLLER)
1052:		struct media_entity entity;
1053:	#endif
1054:		struct list_head list;
1055:		struct module *owner;
1056:		bool owner_v4l2_dev;
1057:		u32 flags;
1058:		struct v4l2_device *v4l2_dev;
1059:		const struct v4l2_subdev_ops *ops;
1060:		const struct v4l2_subdev_internal_ops *internal_ops;
1061:		struct v4l2_ctrl_handler *ctrl_handler;
1062:		char name[52];
1063:		u32 grp_id;
1064:		void *dev_priv;
1065:		void *host_priv;
1066:		struct video_device *devnode;
1067:		struct device *dev;
1068:		struct fwnode_handle *fwnode;
1069:		struct list_head async_list;
1070:		struct list_head async_subdev_endpoint_list;
1071:		struct v4l2_async_notifier *subdev_notifier;
1072:		struct list_head asc_list;
1073:		struct v4l2_subdev_platform_data *pdata;
1074:		struct mutex *state_lock;
1075:	
1076:		/*
1077:		 * The fields below are private, and should only be accessed via
1078:		 * appropriate functions.
1079:		 */
1080:	
1081:		struct led_classdev *privacy_led;
1082:	
1083:		/*
1084:		 * TODO: active_state should most likely be changed from a pointer to an
1085:		 * embedded field. For the time being it's kept as a pointer to more
1086:		 * easily catch uses of active_state in the cases where the driver
1087:		 * doesn't support it.
1088:		 */
1089:		struct v4l2_subdev_state *active_state;
1090:		u64 enabled_pads;
1091:		bool s_stream_enabled;
1092:	};
 SourceFile:include/media/v4l2-subdev.h]

63/2 2026/08/07 16:12 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 58429
							output: 41
							thoughts: 193
						

Thoughts:
**My Thought Process Unpacking a Potential Compilation Issue**

Alright, I've hit a bit of a logical knot here that I need to untangle. My initial observation is this: if `CONFIG_MEDIA_CONTROLLER` is *not* defined, then I'm assuming that the `entity` member within the `v4l2_subdev` structure is effectively absent or not utilized in this specific build context.

This immediately raises a question: how does the code manage to compile `sd->entity.graph_obj.mdev->dev` within the `subdev_open` function? This expression clearly relies on the presence of `sd->entity`, which, by my initial assumption, shouldn't be there under the condition of `CONFIG_MEDIA_CONTROLLER` being undefined.

So, my next step is to re-examine `subdev_open` with this specific query in mind. I'm looking to see if there's a conditional compilation block, perhaps an `#if defined(CONFIG_MEDIA_CONTROLLER)`, that encloses the usage of `sd->entity.graph_obj.mdev->dev`. If such a block exists, it would explain how the compiler avoids issues when the configuration is absent.

However, my current understanding is that `subdev_open` is defined in `drivers/media/v4l2-core/v4l2-subdev.c`. I need to confirm if this entire file, or at least the `subdev_open` function within it, is unconditionally compiled, or if it's also subject to configuration flags.

This leads me to a more crucial check: `drivers/media/v4l2-core/v4l2-subdev.c` is *only* compiled if `CONFIG_VIDEO_V4L2_SUBDEV_API` is enabled. This is a critical piece of information! It means the *entire* `v4l2-subdev.c` file, including `subdev_open`, is contingent on `CONFIG_VIDEO_V4L2_SUBDEV_API`.

Therefore, my next action is to delve into `drivers/media/v4l2-core/Makefile` to scrutinize how `CONFIG_VIDEO_V4L2_SUBDEV_API` influences the compilation of `v4l2-subdev.c`. This will tell me if the premise of `CONFIG_MEDIA_CONTROLLER` absence *guarantees* the absence of `sd->entity` in all compiled scenarios, or if `CONFIG_VIDEO_V4L2_SUBDEV_API`, when enabled, brings `sd->entity` into play regardless of `CONFIG_MEDIA_CONTROLLER`. I need to be sure about the exact build conditions that lead to the presence or absence of `sd->entity` when `subdev_open` is invoked.


64/2 2026/08/07 16:12 tool grepper
0m Args:
map[Expression:v4l2-subdev.o PathPrefix:drivers/media/v4l2-core/Makefile]

Results:
map[Output:drivers/media/v4l2-core/Makefile=11=videodev-objs	:=	v4l2-dev.o v4l2-ioctl.o v4l2-device.o v4l2-fh.o \
drivers/media/v4l2-core/Makefile:12:			v4l2-event.o v4l2-subdev.o v4l2-common.o \
drivers/media/v4l2-core/Makefile-13-			v4l2-ctrls-core.o v4l2-ctrls-api.o \
]

65/2 2026/08/07 16:12 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 58802
							output: 44
							thoughts: 119
						

Thoughts:
**My Internal Monologue on V4L2 Subdevice Compilation**

This is genuinely puzzling. My immediate thought upon seeing the build output was, "Hold on a second, `v4l2-subdev.o` is *always* being compiled as part of `videodev-objs`." This feels like a fundamental aspect that should be stable.

However, this raises a significant contradiction for me. If `v4l2-subdev.o` is always compiled, how can the `sd->entity` member be compiled into existence if `CONFIG_MEDIA_CONTROLLER` is *not* defined? That simply doesn't compute. The presence of `sd->entity` strongly implies a dependency on the media controller framework.

My next logical step was to revisit the source code, specifically `include/media/v4l2-subdev.h`. I was hoping to find a subtle detail I might have overlooked, perhaps a conditional compilation directive or a macro definition that would explain how `sd->entity` could exist without the top-level `CONFIG_MEDIA_CONTROLLER`.

This led me to a further hypothesis: could it be that `CONFIG_VIDEO_V4L2_SUBDEV_API` implicitly selects `CONFIG_MEDIA_CONTROLLER`? It's a plausible chain of dependencies, where enabling the subdev API might inherently require the media controller framework to function correctly, even if not explicitly stated in every single Kconfig entry.

To confirm or deny this, my next action must be to delve into `drivers/media/v4l2-core/Kconfig`. This is where the core logic for how these configuration options are related and selected typically resides. I need to trace the dependencies there to understand the precise relationship between `CONFIG_VIDEO_V4L2_SUBDEV_API` and `CONFIG_MEDIA_CONTROLLER` and, consequently, how `v4l2-subdev.o` can be compiled while seemingly bypassing a direct dependency.


66/2 2026/08/07 16:13 tool grepper
0m Args:
map[Expression:VIDEO_V4L2_SUBDEV_API PathPrefix:drivers/media/v4l2-core/Kconfig]

Results:
map[Output:drivers/media/v4l2-core/Kconfig=6=config VIDEO_V4L2_I2C
--
drivers/media/v4l2-core/Kconfig-10-
drivers/media/v4l2-core/Kconfig:11:config VIDEO_V4L2_SUBDEV_API
drivers/media/v4l2-core/Kconfig-12-	bool
--
drivers/media/v4l2-core/Kconfig=57=config V4L2_FLASH_LED_CLASS
--
drivers/media/v4l2-core/Kconfig-62-	select V4L2_ASYNC
drivers/media/v4l2-core/Kconfig:63:	select VIDEO_V4L2_SUBDEV_API
drivers/media/v4l2-core/Kconfig-64-	help
]

67/2 2026/08/07 16:13 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 59170
							output: 26
							thoughts: 53
						

Thoughts:
**My Thought Process Unpacking a Dependency:**

Okay, so I've just encountered a dependency I wasn't immediately certain about. The `VIDEO_V4L2_SUBDEV_API` seems to rely on `MEDIA_CONTROLLER`. My immediate instinct is to verify this. I'll need to dive into the kernel configuration files to confirm. Specifically, I'll be looking in `drivers/media/Kconfig` and also in `drivers/media/v4l2-core/Kconfig` as that seems like a logical place for V4L2-specific configurations. This will allow me to trace the Kconfig symbols and understand the exact relationship between these two subsystems.


68/2 2026/08/07 16:13 tool grepper
0m Args:
map[Expression:config VIDEO_V4L2_SUBDEV_API]

Results:
map[Output:drivers/media/v4l2-core/Kconfig=6=config VIDEO_V4L2_I2C
--
drivers/media/v4l2-core/Kconfig-10-
drivers/media/v4l2-core/Kconfig:11:config VIDEO_V4L2_SUBDEV_API
drivers/media/v4l2-core/Kconfig-12-	bool
]

69/2 2026/08/07 16:13 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 59347
							output: 39
							thoughts: 25
						

Thoughts:
**My Thought Process on Locating the Kconfig Entry**

Alright, so my immediate goal is to pinpoint the specific Kconfig entry within the V4L2 core's configuration file that's relevant to the task at hand. I'm assuming this isn't just a casual browse, but rather a targeted investigation. My first instinct, therefore, is to go straight to the source: the `drivers/media/v4l2-core/Kconfig` file. I've mentally bookmarked a specific line number, around line 11, as a likely starting point. This isn't a shot in the dark; it's based on my experience with Kconfig file structures. Often, core functionalities, especially those related to device drivers and their foundational configurations, are declared relatively early in these files. Line 11 seems like a reasonable heuristic for finding such an entry, perhaps a `config` statement or a `menuconfig` directive that sets the stage for the V4L2 subsystem's inclusion or configuration options. My next step, naturally, would be to open that file and visually scan that approximate location.


70/2 2026/08/07 16:13 tool read-file
0m Args:
map[File:drivers/media/v4l2-core/Kconfig FirstLine:1 LineCount:20]

Results:
map[Contents:   1:	# SPDX-License-Identifier: GPL-2.0-only
   2:	#
   3:	# Generic video config states
   4:	#
   5:	
   6:	config VIDEO_V4L2_I2C
   7:		bool
   8:		depends on I2C && VIDEO_DEV
   9:		default y
  10:	
  11:	config VIDEO_V4L2_SUBDEV_API
  12:		bool
  13:		depends on VIDEO_DEV && MEDIA_CONTROLLER
  14:		help
  15:		  Enables the V4L2 sub-device pad-level userspace API used to configure
  16:		  video format, size and frame rate between hardware blocks.
  17:	
  18:		  This API is mostly used by camera interfaces in embedded platforms.
  19:	
  20:	config VIDEO_ADV_DEBUG
]

71/2 2026/08/07 16:13 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 59638
							output: 48
							thoughts: 131
						

Thoughts:
**My Thought Process Regarding v4l2-subdev.c Compilation**

Right, so I'm looking at the dependencies here, and it's immediately clear that `VIDEO_V4L2_SUBDEV_API` has a direct dependency on `MEDIA_CONTROLLER`. That's a pretty fundamental linkage.

However, my attention is immediately drawn to the fact that `v4l2-subdev.c` seems to be compiled *unconditionally*. This is where the mental gears start turning, because if `VIDEO_V4L2_SUBDEV_API` *requires* `MEDIA_CONTROLLER`, then how on earth is `v4l2-subdev.c` able to successfully compile when `MEDIA_CONTROLLER` is *disabled*? That presents a logical inconsistency that I need to resolve.

So, the next logical step for me is to go back and scrutinize the source code of `drivers/media/v4l2-core/v4l2-subdev.c` itself. I need to pinpoint exactly where the potential disconnect is happening. My hypothesis is that some critical piece of functionality within `v4l2-subdev.c` might be conditionally compiled, and I need to verify if, for instance, a function like `subdev_open` – which would logically be tied to the subdev API – is correctly guarded by the `#if defined(CONFIG_VIDEO_V4L2_SUBDEV_API)` preprocessor directive. If it's not, that would explain the compilation issue when the dependency is absent.


72/2 2026/08/07 16:13 tool codesearch-definition-source
0m Error:
log-in to see details

Args:
map[ContextFile:drivers/media/v4l2-core/v4l2-subdev.c Name:subdev_open]

73/2 2026/08/07 16:13 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 59938
							output: 48
							thoughts: 35
						

Thoughts:
**My Thought Process for Approaching the `subdev_open` Function**

Right, so the first thing that pops into my head is that I'm pretty sure I've already encountered and implemented `subdev_open` before. My immediate instinct is to not reinvent the wheel and to leverage that existing knowledge. Therefore, my next logical step is to dive into the source code, specifically `v4l2-subdev.c`, and examine the lines *preceding* the `subdev_open` function. I'm not just looking for the definition of `subdev_open` itself, but rather for the surrounding context. I want to understand what logic, initializations, or checks are being performed *before* the actual opening of the sub-device happens. This will give me crucial insight into its dependencies, any pre-conditions that must be met, and potentially the overall flow within the V4L2 sub-device framework that leads up to this particular operation. It's all about building a comprehensive understanding of the sequence of events and the state of the system at the point of `subdev_open`'s invocation.


74/2 2026/08/07 16:13 tool read-file
0m Args:
map[File:drivers/media/v4l2-core/v4l2-subdev.c FirstLine:80 LineCount:20]

Results:
map[Contents:  80:		state = __v4l2_subdev_state_alloc(sd, "fh->state->lock", &key);
  81:		if (IS_ERR(state))
  82:			return PTR_ERR(state);
  83:	
  84:		fh->state = state;
  85:	
  86:		return 0;
  87:	}
  88:	
  89:	static void subdev_fh_free(struct v4l2_subdev_fh *fh)
  90:	{
  91:		__v4l2_subdev_state_free(fh->state);
  92:		fh->state = NULL;
  93:	}
  94:	
  95:	static int subdev_open(struct file *file)
  96:	{
  97:		struct video_device *vdev = video_devdata(file);
  98:		struct v4l2_subdev *sd = vdev_to_v4l2_subdev(vdev);
  99:		struct v4l2_subdev_fh *subdev_fh;
]

75/2 2026/08/07 16:13 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 60309
							output: 46
							thoughts: 17
						

Thoughts:
**My Thought Process on Revisiting `v4l2-subdev.c`**

Okay, my immediate instinct here is to dig deeper into `v4l2-subdev.c`. I'm feeling like the solution or at least a critical piece of understanding lies somewhere within its existing code. I suspect I've either overlooked something subtle earlier, or perhaps there's a pattern or interaction I haven't fully grasped yet. It's a methodical approach, really – when you're trying to pinpoint an issue, going back to the source, to the core implementation files, is often the most direct way to find it. I'm essentially performing a deep dive, expecting to uncover a detail, a specific function call, or a conditional logic that's key to what I'm trying to achieve or debug. I'm not just randomly browsing; I have a targeted intent to re-examine this file with fresh eyes, looking for anything that might have been missed in a previous pass.


76/2 2026/08/07 16:13 tool read-file
0m Args:
map[File:drivers/media/v4l2-core/v4l2-subdev.c FirstLine:1 LineCount:50]

Results:
map[Contents:   1:	// SPDX-License-Identifier: GPL-2.0-only
   2:	/*
   3:	 * V4L2 sub-device
   4:	 *
   5:	 * Copyright (C) 2010 Nokia Corporation
   6:	 *
   7:	 * Contact: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
   8:	 *	    Sakari Ailus <sakari.ailus@iki.fi>
   9:	 */
  10:	
  11:	#include <linux/export.h>
  12:	#include <linux/ioctl.h>
  13:	#include <linux/leds.h>
  14:	#include <linux/mm.h>
  15:	#include <linux/module.h>
  16:	#include <linux/overflow.h>
  17:	#include <linux/slab.h>
  18:	#include <linux/string.h>
  19:	#include <linux/types.h>
  20:	#include <linux/version.h>
  21:	#include <linux/videodev2.h>
  22:	
  23:	#include <media/v4l2-ctrls.h>
  24:	#include <media/v4l2-device.h>
  25:	#include <media/v4l2-event.h>
  26:	#include <media/v4l2-fh.h>
  27:	#include <media/v4l2-ioctl.h>
  28:	
  29:	/**
  30:	 * struct v4l2_subdev_stream_config - Used for storing stream configuration.
  31:	 *
  32:	 * @pad: pad number
  33:	 * @stream: stream number
  34:	 * @enabled: has the stream been enabled with v4l2_subdev_enable_streams()
  35:	 * @fmt: &struct v4l2_mbus_framefmt
  36:	 * @crop: &struct v4l2_rect to be used for crop
  37:	 * @compose: &struct v4l2_rect to be used for compose
  38:	 * @interval: frame interval
  39:	 *
  40:	 * This structure stores configuration for a stream.
  41:	 */
  42:	struct v4l2_subdev_stream_config {
  43:		u32 pad;
  44:		u32 stream;
  45:		bool enabled;
  46:	
  47:		struct v4l2_mbus_framefmt fmt;
  48:		struct v4l2_rect crop;
  49:		struct v4l2_rect compose;
  50:		struct v4l2_fract interval;
]

77/2 2026/08/07 16:13 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 61098
							output: 42
							thoughts: 60
						

Thoughts:
**My Thought Process Regarding `subdev_open` Compilation**

My initial reaction upon reviewing the code was surprise. I observed that the `subdev_open` function appears to be compiled unconditionally, regardless of any specific configuration options. This immediately raised a concern in my mind, as I recalled a potential dependency: if `CONFIG_MEDIA_CONTROLLER` is not defined, then the `sd->entity` member, which seems crucial for `subdev_open`'s operation, should not exist. This inconsistency prompted me to revisit the `include/media/v4l2-subdev.h` header file to re-verify the definitions and ensure my understanding of the data structures and their conditional availability was accurate. I need to be certain about the exact conditions under which `sd->entity` is populated or declared.


78/2 2026/08/07 16:14 tool read-file
0m Args:
map[File:include/media/v4l2-subdev.h FirstLine:1040 LineCount:30]

Results:
map[Contents:1040:	 *		  fallback cases.
1041:	 * @s_stream_enabled: Tracks whether streaming has been enabled with s_stream.
1042:	 *                    This is only for call_s_stream() internal use.
1043:	 *
1044:	 * Each instance of a subdev driver should create this struct, either
1045:	 * stand-alone or embedded in a larger struct.
1046:	 *
1047:	 * This structure should be initialized by v4l2_subdev_init() or one of
1048:	 * its variants: v4l2_spi_subdev_init(), v4l2_i2c_subdev_init().
1049:	 */
1050:	struct v4l2_subdev {
1051:	#if defined(CONFIG_MEDIA_CONTROLLER)
1052:		struct media_entity entity;
1053:	#endif
1054:		struct list_head list;
1055:		struct module *owner;
1056:		bool owner_v4l2_dev;
1057:		u32 flags;
1058:		struct v4l2_device *v4l2_dev;
1059:		const struct v4l2_subdev_ops *ops;
1060:		const struct v4l2_subdev_internal_ops *internal_ops;
1061:		struct v4l2_ctrl_handler *ctrl_handler;
1062:		char name[52];
1063:		u32 grp_id;
1064:		void *dev_priv;
1065:		void *host_priv;
1066:		struct video_device *devnode;
1067:		struct device *dev;
1068:		struct fwnode_handle *fwnode;
1069:		struct list_head async_list;
]

79/2 2026/08/07 16:14 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 61698
							output: 38
							thoughts: 114
						

Thoughts:
**The Interplay of Configuration Options**

My thought process here is centered on a specific dependency within the V4L2 subsystem's code. I'm realizing that the `entity` structure, which is crucial for operations like `subdev_open`, is not unconditionally available. Its definition is directly tied to the presence of `CONFIG_MEDIA_CONTROLLER`. This immediately raises a red flag for me: if `CONFIG_MEDIA_CONTROLLER` is *not* defined during the build, then any code attempting to use `entity` would fail to compile.

This dependency leads me to consider the broader context of where this code lives and how it's compiled. I'm quickly recalling that the file `drivers/media/v4l2-core/v4l2-subdev.c` itself is not always part of the build. Its inclusion is contingent on `CONFIG_VIDEO_V4L2_SUBDEV_API` being enabled. This suggests a layered dependency structure, where enabling one feature (like the subdev API) might, in turn, pull in code that relies on other configuration options (`CONFIG_MEDIA_CONTROLLER`) to function correctly.

To fully grasp this, I need to re-examine the `drivers/media/v4l2-core/Makefile`. I'm looking for how these `CONFIG_` options are translated into Kconfig dependencies and how they ultimately control the compilation of specific files and objects. My goal is to map out this dependency chain precisely, ensuring that I understand precisely under what configuration conditions `entity` will be defined, `v4l2-subdev.c` will be compiled, and therefore `subdev_open` will be a valid, compilable function. It's all about understanding the intricate dance between these configuration flags.


80/2 2026/08/07 16:14 tool read-file
0m Args:
map[File:drivers/media/v4l2-core/Makefile FirstLine:1 LineCount:20]

Results:
map[Contents:   1:	# SPDX-License-Identifier: GPL-2.0
   2:	#
   3:	# Makefile for the V4L2 core
   4:	#
   5:	
   6:	ccflags-y += -I$(srctree)/drivers/media/dvb-frontends
   7:	ccflags-y += -I$(srctree)/drivers/media/tuners
   8:	
   9:	tuner-objs	:=	tuner-core.o
  10:	
  11:	videodev-objs	:=	v4l2-dev.o v4l2-ioctl.o v4l2-device.o v4l2-fh.o \
  12:				v4l2-event.o v4l2-subdev.o v4l2-common.o \
  13:				v4l2-ctrls-core.o v4l2-ctrls-api.o \
  14:				v4l2-ctrls-request.o v4l2-ctrls-defs.o
  15:	
  16:	# Please keep it alphabetically sorted by Kconfig name
  17:	# (e. g. LC_ALL=C sort Makefile)
  18:	videodev-$(CONFIG_COMPAT) += v4l2-compat-ioctl32.o
  19:	videodev-$(CONFIG_MEDIA_CONTROLLER) += v4l2-mc.o
  20:	videodev-$(CONFIG_SPI) += v4l2-spi.o
]

81/2 2026/08/07 16:14 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 62229
							output: 48
							thoughts: 120
						

Thoughts:
**A Deep Dive into Media Controller Dependencies**

I've been wrestling with a persistent observation: the object file `v4l2-subdev.o` consistently appears within the `videodev-objs` compilation list. This seems straightforward enough on the surface. However, my current focus is on the `subdev_open` function, which, I know, resides in `v4l2-subdev.c`. The puzzle arises when I consider the `sd->entity` member within `subdev_open`. Specifically, how can this member be compiled and accessed if the `CONFIG_MEDIA_CONTROLLER` option is *not* defined? It feels like a contradiction. To resolve this, I'm compelled to re-examine the `subdev_open` function in `v4l2-subdev.c` with a fine-toothed comb. My primary question now is: is there an explicit `#if defined(CONFIG_MEDIA_CONTROLLER)` block *directly within* the `subdev_open` function itself that guards the usage of `sd->entity`? This would be the logical explanation for its conditional compilation and my current confusion.


82/2 2026/08/07 16:14 tool read-file
0m Args:
map[File:drivers/media/v4l2-core/v4l2-subdev.c FirstLine:110 LineCount:20]

Results:
map[Contents: 110:		}
 111:	
 112:		v4l2_fh_init(&subdev_fh->vfh, vdev);
 113:		v4l2_fh_add(&subdev_fh->vfh, file);
 114:	
 115:		if (sd->v4l2_dev->mdev && sd->entity.graph_obj.mdev->dev) {
 116:			struct module *owner;
 117:	
 118:			owner = sd->entity.graph_obj.mdev->dev->driver->owner;
 119:			if (!try_module_get(owner)) {
 120:				ret = -EBUSY;
 121:				goto err;
 122:			}
 123:			subdev_fh->owner = owner;
 124:		}
 125:	
 126:		if (sd->internal_ops && sd->internal_ops->open) {
 127:			ret = sd->internal_ops->open(sd, subdev_fh);
 128:			if (ret < 0)
 129:				goto err;
]

83/2 2026/08/07 16:14 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 62702
							output: 42
							thoughts: 125
						

Thoughts:
**My Thought Process Regarding `sd->entity` Usage**

My initial reaction upon seeing `sd->entity` being used unconditionally was one of immediate concern and confusion. My brain immediately flagged this as a potential issue, asking, "How can this possibly compile if `CONFIG_MEDIA_CONTROLLER` isn't defined?" My understanding of such conditional compilation directives is that they are precisely there to prevent the use of code that depends on specific features or configurations from being included when those features are absent. This usage seemed to contradict that fundamental principle.

My immediate next step was to revisit the relevant header file, specifically `include/media/v4l2-subdev.h`. I was hoping to find some overlooked detail, perhaps a misunderstanding on my part about how `entity` was defined or exposed. I was thinking, "Maybe `entity` is *always* defined in some way, even when `CONFIG_MEDIA_CONTROLLER` is not set, making this unconditional usage valid." This would imply some form of a fallback or a null definition, which I thought I might have missed.

However, my memory then kicked in, recalling a `#if defined(CONFIG_MEDIA_CONTROLLER)` directive. This memory reinforced my initial suspicion. If such a conditional block *is* present, then any code *outside* of that block that directly relies on `CONFIG_MEDIA_CONTROLLER`'s existence would indeed be problematic when the configuration is absent. This is where the real quandary lay for me.

Therefore, my subsequent action was to go back and meticulously re-read the specific section of `include/media/v4l2-subdev.h`, focusing intently on lines 1040-1060. I was determined to reconcile the apparent contradiction. I needed to see, with absolute clarity, how `sd->entity` was being declared and used in relation to the `CONFIG_MEDIA_CONTROLLER` preprocessor directive. Was there a subtle redefinition I missed? Was the unconditional usage *actually* conditional in a way I hadn't perceived? My goal was to trace the dependency chain and understand the compiler's behavior under different configuration scenarios.


84/2 2026/08/07 16:14 tool read-file
0m Args:
map[File:include/media/v4l2-subdev.h FirstLine:1040 LineCount:20]

Results:
map[Contents:1040:	 *		  fallback cases.
1041:	 * @s_stream_enabled: Tracks whether streaming has been enabled with s_stream.
1042:	 *                    This is only for call_s_stream() internal use.
1043:	 *
1044:	 * Each instance of a subdev driver should create this struct, either
1045:	 * stand-alone or embedded in a larger struct.
1046:	 *
1047:	 * This structure should be initialized by v4l2_subdev_init() or one of
1048:	 * its variants: v4l2_spi_subdev_init(), v4l2_i2c_subdev_init().
1049:	 */
1050:	struct v4l2_subdev {
1051:	#if defined(CONFIG_MEDIA_CONTROLLER)
1052:		struct media_entity entity;
1053:	#endif
1054:		struct list_head list;
1055:		struct module *owner;
1056:		bool owner_v4l2_dev;
1057:		u32 flags;
1058:		struct v4l2_device *v4l2_dev;
1059:		const struct v4l2_subdev_ops *ops;
]

85/2 2026/08/07 16:14 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 63207
							output: 53
							thoughts: 96
						

Thoughts:
**My Thought Process**

Okay, so I'm examining this code, and the first thing I notice is a conditional compilation directive: `#if defined(CONFIG_MEDIA_CONTROLLER)`. This immediately tells me that a significant portion of this functionality, related to media controllers, is only active when that specific configuration option is enabled.

Following that, I see that the `subdev_open` function has a prerequisite: it *must* be guarded by `#if defined(CONFIG_VIDEO_V4L2_SUBDEV_API)`. This is a critical dependency. It means that even if the `CONFIG_MEDIA_CONTROLLER` is set, `subdev_open` won't even be compiled unless the `CONFIG_VIDEO_V4L2_SUBDEV_API` is also defined. This suggests a layered approach to feature enablement, where V4L2 subdevice API support is a foundational requirement for certain media controller operations.

To confirm my understanding and to ensure I haven't missed anything, my next logical step is to actually go and inspect the source file `drivers/media/v4l2-core/v4l2-subdev.c`. My goal there is to specifically look for the `#if defined(CONFIG_VIDEO_V4L2_SUBDEV_API)` directive. This verification step is crucial to ascertain how and where this guard is implemented within the V4L2 subdevice core, and to see if there are any subtleties in its usage that might affect the `subdev_open` function or related components. I need to be absolutely certain about the scope and impact of this conditional compilation.


86/2 2026/08/07 16:14 tool grepper
0m Args:
map[Expression:CONFIG_VIDEO_V4L2_SUBDEV_API PathPrefix:drivers/media/v4l2-core/v4l2-subdev.c]

Results:
map[Output:drivers/media/v4l2-core/v4l2-subdev.c=42=struct v4l2_subdev_stream_config {
--
drivers/media/v4l2-core/v4l2-subdev.c-52-
drivers/media/v4l2-core/v4l2-subdev.c:53:#if defined(CONFIG_VIDEO_V4L2_SUBDEV_API)
drivers/media/v4l2-core/v4l2-subdev.c-54-/*
--
drivers/media/v4l2-core/v4l2-subdev.c=59=static bool v4l2_subdev_enable_streams_api;
--
drivers/media/v4l2-core/v4l2-subdev.c-73-
drivers/media/v4l2-core/v4l2-subdev.c:74:#if defined(CONFIG_VIDEO_V4L2_SUBDEV_API)
drivers/media/v4l2-core/v4l2-subdev.c-75-static int subdev_fh_init(struct v4l2_subdev_fh *fh, struct v4l2_subdev *sd)
--
drivers/media/v4l2-core/v4l2-subdev.c=144=static int subdev_close(struct file *file)
--
drivers/media/v4l2-core/v4l2-subdev.c-160-}
drivers/media/v4l2-core/v4l2-subdev.c:161:#else /* CONFIG_VIDEO_V4L2_SUBDEV_API */
drivers/media/v4l2-core/v4l2-subdev.c-162-static int subdev_open(struct file *file)
--
drivers/media/v4l2-core/v4l2-subdev.c=167=static int subdev_close(struct file *file)
--
drivers/media/v4l2-core/v4l2-subdev.c-170-}
drivers/media/v4l2-core/v4l2-subdev.c:171:#endif /* CONFIG_VIDEO_V4L2_SUBDEV_API */
drivers/media/v4l2-core/v4l2-subdev.c-172-
--
drivers/media/v4l2-core/v4l2-subdev.c=214=static int check_state(struct v4l2_subdev *sd, struct v4l2_subdev_state *state,
--
drivers/media/v4l2-core/v4l2-subdev.c-217-	if (sd->flags & V4L2_SUBDEV_FL_STREAMS) {
drivers/media/v4l2-core/v4l2-subdev.c:218:#if defined(CONFIG_VIDEO_V4L2_SUBDEV_API)
drivers/media/v4l2-core/v4l2-subdev.c-219-		if (!v4l2_subdev_state_get_format(state, pad, stream))
--
drivers/media/v4l2-core/v4l2-subdev.c=576=EXPORT_SYMBOL(v4l2_subdev_call_wrappers);
drivers/media/v4l2-core/v4l2-subdev.c-577-
drivers/media/v4l2-core/v4l2-subdev.c:578:#if defined(CONFIG_VIDEO_V4L2_SUBDEV_API)
drivers/media/v4l2-core/v4l2-subdev.c-579-
--
drivers/media/v4l2-core/v4l2-subdev.c=1190=static long subdev_compat_ioctl32(struct file *file, unsigned int cmd,
--
drivers/media/v4l2-core/v4l2-subdev.c-1199-
drivers/media/v4l2-core/v4l2-subdev.c:1200:#else /* CONFIG_VIDEO_V4L2_SUBDEV_API */
drivers/media/v4l2-core/v4l2-subdev.c-1201-static long subdev_ioctl(struct file *file, unsigned int cmd,
--
drivers/media/v4l2-core/v4l2-subdev.c=1208=static long subdev_compat_ioctl32(struct file *file, unsigned int cmd,
--
drivers/media/v4l2-core/v4l2-subdev.c-1213-#endif
drivers/media/v4l2-core/v4l2-subdev.c:1214:#endif /* CONFIG_VIDEO_V4L2_SUBDEV_API */
drivers/media/v4l2-core/v4l2-subdev.c-1215-
--
drivers/media/v4l2-core/v4l2-subdev.c=1325=v4l2_subdev_link_validate_get_format(struct media_pad *pad, u32 stream,
--
drivers/media/v4l2-core/v4l2-subdev.c-1351-
drivers/media/v4l2-core/v4l2-subdev.c:1352:#if defined(CONFIG_VIDEO_V4L2_SUBDEV_API)
drivers/media/v4l2-core/v4l2-subdev.c-1353-
drivers/media/v4l2-core/v4l2-subdev.c=1354=static void __v4l2_link_validate_get_streams(struct media_pad *pad,
--
drivers/media/v4l2-core/v4l2-subdev.c-1395-
drivers/media/v4l2-core/v4l2-subdev.c:1396:#endif /* CONFIG_VIDEO_V4L2_SUBDEV_API */
drivers/media/v4l2-core/v4l2-subdev.c-1397-
drivers/media/v4l2-core/v4l2-subdev.c=1398=static void v4l2_link_validate_get_streams(struct media_pad *pad,
--
drivers/media/v4l2-core/v4l2-subdev.c-1409-
drivers/media/v4l2-core/v4l2-subdev.c:1410:#if defined(CONFIG_VIDEO_V4L2_SUBDEV_API)
drivers/media/v4l2-core/v4l2-subdev.c-1411-	__v4l2_link_validate_get_streams(pad, streams_mask, states_locked);
--
drivers/media/v4l2-core/v4l2-subdev.c=1873=EXPORT_SYMBOL_GPL(__v4l2_subdev_state_get_interval);
drivers/media/v4l2-core/v4l2-subdev.c-1874-
drivers/media/v4l2-core/v4l2-subdev.c:1875:#if defined(CONFIG_VIDEO_V4L2_SUBDEV_API)
drivers/media/v4l2-core/v4l2-subdev.c-1876-
--
drivers/media/v4l2-core/v4l2-subdev.c=2672=EXPORT_SYMBOL_GPL(v4l2_subdev_get_frame_desc_passthrough);
drivers/media/v4l2-core/v4l2-subdev.c-2673-
drivers/media/v4l2-core/v4l2-subdev.c:2674:#endif /* CONFIG_VIDEO_V4L2_SUBDEV_API */
drivers/media/v4l2-core/v4l2-subdev.c-2675-
]

87/2 2026/08/07 16:14 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 65370
							output: 57
							thoughts: 831
						

Thoughts:
**The Root Cause of the Crash: An Uninitialized Media Device Pointer**

My investigation has revealed the source of this vexing crash. It stems from a race condition related to the initialization of `sd->entity.graph_obj.mdev`. I've confirmed that the `subdev_open` function is only compiled when `CONFIG_VIDEO_V4L2_SUBDEV_API` is defined, and crucially, this configuration itself depends on `CONFIG_MEDIA_CONTROLLER` being enabled. This means that `CONFIG_MEDIA_CONTROLLER` is *always* active when `subdev_open` is present in the code. Consequently, the `sd->entity.graph_obj.mdev` member *should* always be present and initialized. The fact that it's NULL, leading to the crash, points to a specific initialization failure.

I've been meticulously tracing the flow within `__v4l2_device_register_subdev` to understand how this state can occur. The critical piece of logic is here:

```c
#if defined(CONFIG_MEDIA_CONTROLLER)
	/* Register the entity. */
	if (v4l2_dev->mdev) {
		err = media_device_register_entity(v4l2_dev->mdev, &sd->entity);
		if (err < 0)
			goto error_module;
	}
#endif
```

The problem arises if `v4l2_dev->mdev` happens to be NULL *at the moment* `__v4l2_device_register_subdev` is called. In this scenario, `media_device_register_entity` is simply skipped. This leaves `sd->entity.graph_obj.mdev` as NULL, even though `sd->v4l2_dev` might be valid.

The plot thickens because it's possible for `v4l2_dev->mdev` to be populated *after* `v4l2_device_register_subdev` has completed. If this happens, we end up in the exact situation that triggers the crash: `sd->v4l2_dev->mdev` is non-NULL, but `sd->entity.graph_obj.mdev` remains NULL. When `subdev_open` is later invoked, it checks `sd->v4l2_dev->mdev` (which is now valid) and attempts to dereference `sd->entity.graph_obj.mdev->dev`, leading directly to a NULL pointer dereference.

I also considered the possibility that `media_device_register_entity` might fail. However, my analysis of the error handling shows that if `media_device_register_entity` returns an error, `__v4l2_device_register_subdev` explicitly sets `sd->v4l2_dev` back to NULL. This means if registration fails, we wouldn't have a non-NULL `sd->v4l2_dev` to begin with.

The key insight, then, is that the subdev's device node *is* registered – that's how `subdev_open` is reached via `vdev_to_v4l2_subdev(vdev)`. This registration happens through `v4l2_device_register_subdev_nodes`. Therefore, the failure must be occurring specifically within the media controller registration path *after* the device node has been set up, leaving `sd->entity.graph_obj.mdev` uninitialized while `sd->v4l2_dev->mdev` is eventually populated.


88/2 2026/08/07 16:14 tool codesearch-definition-source
0m Args:
map[ContextFile:drivers/media/v4l2-core/v4l2-device.c Name:__v4l2_device_register_subdev_nodes]

Results:
map[SourceCode: 191:	int __v4l2_device_register_subdev_nodes(struct v4l2_device *v4l2_dev,
 192:						bool read_only)
 193:	{
 194:		struct video_device *vdev;
 195:		struct v4l2_subdev *sd;
 196:		int err;
 197:	
 198:		/* Register a device node for every subdev marked with the
 199:		 * V4L2_SUBDEV_FL_HAS_DEVNODE flag.
 200:		 */
 201:		list_for_each_entry(sd, &v4l2_dev->subdevs, list) {
 202:			if (!(sd->flags & V4L2_SUBDEV_FL_HAS_DEVNODE))
 203:				continue;
 204:	
 205:			if (sd->devnode)
 206:				continue;
 207:	
 208:			vdev = kzalloc_obj(*vdev);
 209:			if (!vdev) {
 210:				err = -ENOMEM;
 211:				goto clean_up;
 212:			}
 213:	
 214:			video_set_drvdata(vdev, sd);
 215:			strscpy(vdev->name, sd->name, sizeof(vdev->name));
 216:			vdev->dev_parent = sd->dev;
 217:			vdev->v4l2_dev = v4l2_dev;
 218:			vdev->fops = &v4l2_subdev_fops;
 219:			vdev->release = v4l2_device_release_subdev_node;
 220:			vdev->ctrl_handler = sd->ctrl_handler;
 221:			if (read_only)
 222:				set_bit(V4L2_FL_SUBDEV_RO_DEVNODE, &vdev->flags);
 223:			sd->devnode = vdev;
 224:			err = __video_register_device(vdev, VFL_TYPE_SUBDEV, -1, 1,
 225:						      sd->owner);
 226:			if (err < 0) {
 227:				sd->devnode = NULL;
 228:				kfree(vdev);
 229:				goto clean_up;
 230:			}
 231:	#if defined(CONFIG_MEDIA_CONTROLLER)
 232:			sd->entity.info.dev.major = VIDEO_MAJOR;
 233:			sd->entity.info.dev.minor = vdev->minor;
 234:	
 235:			/* Interface is created by __video_register_device() */
 236:			if (vdev->v4l2_dev->mdev) {
 237:				struct media_link *link;
 238:	
 239:				link = media_create_intf_link(&sd->entity,
 240:							      &vdev->intf_devnode->intf,
 241:							      MEDIA_LNK_FL_ENABLED |
 242:							      MEDIA_LNK_FL_IMMUTABLE);
 243:				if (!link) {
 244:					err = -ENOMEM;
 245:					goto clean_up;
 246:				}
 247:			}
 248:	#endif
 249:		}
 250:		return 0;
 251:	
 252:	clean_up:
 253:		list_for_each_entry(sd, &v4l2_dev->subdevs, list) {
 254:			if (!sd->devnode)
 255:				break;
 256:			video_unregister_device(sd->devnode);
 257:		}
 258:	
 259:		return err;
 260:	}
 SourceFile:drivers/media/v4l2-core/v4l2-device.c]

89/2 2026/08/07 16:14 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 67360
							output: 43
							thoughts: 151
						

Thoughts:
**A Deep Dive into Subdevice Registration and Media Link Creation**

My current line of inquiry focuses on a subtle but critical timing issue within the V4L2 subdevice registration process, specifically when `v4l2_dev->mdev` is set *after* the `v4l2_device_register_subdev` function has been called. This sequence of events leads to a null pointer for `sd->entity.graph_obj.mdev` at a crucial juncture.

Following this, the `__v4l2_device_register_subdev_nodes` function is invoked. What I'm observing is that within this function, the check for `vdev->v4l2_dev->mdev` evaluates to non-NULL. This is because, as I've noted, `mdev` *was* subsequently set. This leads the code down a path that attempts to create a media interface link.

The specific function I'm scrutinizing now is `media_create_intf_link`. My concern arises because I know that `media_create_intf_link` directly utilizes `entity->graph_obj.mdev`. Given the initial null pointer I identified, it seems highly probable that there's a mismatch here – the function is being called with an expectation that `entity->graph_obj.mdev` will be valid, when in fact, due to the asynchronous setting of `v4l2_dev->mdev`, it's not. I need to meticulously trace the execution within `media_create_intf_link` itself to confirm if this is indeed where the potential issue manifests.


90/2 2026/08/07 16:14 tool codesearch-definition-source
0m Args:
map[ContextFile:drivers/media/mc/mc-entity.c Name:media_create_intf_link]

Results:
map[SourceCode:1572:	struct media_link *media_create_intf_link(struct media_entity *entity,
1573:						    struct media_interface *intf,
1574:						    u32 flags)
1575:	{
1576:		struct media_link *link;
1577:	
1578:		link = media_add_link(&intf->links);
1579:		if (link == NULL)
1580:			return NULL;
1581:	
1582:		link->intf = intf;
1583:		link->entity = entity;
1584:		link->flags = flags | MEDIA_LNK_FL_INTERFACE_LINK;
1585:	
1586:		/* Initialize graph object embedded at the new link */
1587:		media_gobj_create(intf->graph_obj.mdev, MEDIA_GRAPH_LINK,
1588:				&link->graph_obj);
1589:	
1590:		return link;
1591:	}
 SourceFile:drivers/media/mc/mc-entity.c]

91/2 2026/08/07 16:14 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 67849
							output: 49
							thoughts: 120
						

Thoughts:
**My Thought Process Regarding `media_create_intf_link` and Device Initialization**

Okay, so I'm looking at the `media_create_intf_link` function and how it interacts with media devices. My initial observation is that it relies on `intf->graph_obj.mdev`. This is a crucial detail because it means the link creation *doesn't* directly depend on `entity->graph_obj.mdev`. This implies that `media_create_intf_link` could potentially succeed even if `entity->graph_obj.mdev` happens to be NULL. That's an interesting point to note, as it might allow for certain link configurations before a full entity-level device is established.

However, my next thought immediately goes to where `intf->graph_obj.mdev` actually originates. I'm tracing its lineage and realizing that it's derived from `vdev->intf_devnode->intf`. This connection is key. So, if `intf->graph_obj.mdev` is populated, it means `vdev->intf_devnode` must have been set up.

This then leads me to question: where exactly is `vdev->intf_devnode` instantiated? My investigation points to the `__video_register_device` function. This is where the core video device registration happens, and it's the likely place where the `intf_devnode` structure, and by extension the `intf` pointer used in link creation, is initialized. Understanding this sequence is vital for grasping the lifecycle of media device nodes and their associated links.


92/2 2026/08/07 16:15 tool codesearch-definition-source
0m Args:
map[ContextFile:drivers/media/v4l2-core/v4l2-dev.c Name:__video_register_device]

Results:
map[SourceCode: 910:	int __video_register_device(struct video_device *vdev,
 911:				    enum vfl_devnode_type type,
 912:				    int nr, int warn_if_nr_in_use,
 913:				    struct module *owner)
 914:	{
 915:		int i = 0;
 916:		int ret;
 917:		int minor_offset = 0;
 918:		int minor_cnt = VIDEO_NUM_DEVICES;
 919:		const char *name_base;
 920:	
 921:		/* A minor value of -1 marks this video device as never
 922:		   having been registered */
 923:		vdev->minor = -1;
 924:	
 925:		/* the release callback MUST be present */
 926:		if (WARN_ON(!vdev->release))
 927:			return -EINVAL;
 928:		/* the v4l2_dev pointer MUST be present */
 929:		if (WARN_ON(!vdev->v4l2_dev))
 930:			return -EINVAL;
 931:		/* the device_caps field MUST be set for all but subdevs */
 932:		if (WARN_ON(type != VFL_TYPE_SUBDEV && !vdev->device_caps))
 933:			return -EINVAL;
 934:		/* the open and release file operations are mandatory */
 935:		if (WARN_ON(!vdev->fops || !vdev->fops->open || !vdev->fops->release))
 936:			return -EINVAL;
 937:	
 938:		/* v4l2_fh support */
 939:		spin_lock_init(&vdev->fh_lock);
 940:		INIT_LIST_HEAD(&vdev->fh_list);
 941:	
 942:		/* Part 1: check device type */
 943:		switch (type) {
 944:		case VFL_TYPE_VIDEO:
 945:			name_base = "video";
 946:			break;
 947:		case VFL_TYPE_VBI:
 948:			name_base = "vbi";
 949:			break;
 950:		case VFL_TYPE_RADIO:
 951:			name_base = "radio";
 952:			break;
 953:		case VFL_TYPE_SUBDEV:
 954:			name_base = "v4l-subdev";
 955:			break;
 956:		case VFL_TYPE_SDR:
 957:			/* Use device name 'swradio' because 'sdr' was already taken. */
 958:			name_base = "swradio";
 959:			break;
 960:		case VFL_TYPE_TOUCH:
 961:			name_base = "v4l-touch";
 962:			break;
 963:		default:
 964:			pr_err("%s called with unknown type: %d\n",
 965:			       __func__, type);
 966:			return -EINVAL;
 967:		}
 968:	
 969:		vdev->vfl_type = type;
 970:		vdev->cdev = NULL;
 971:		if (vdev->dev_parent == NULL)
 972:			vdev->dev_parent = vdev->v4l2_dev->dev;
 973:		if (vdev->ctrl_handler == NULL)
 974:			vdev->ctrl_handler = vdev->v4l2_dev->ctrl_handler;
 975:		/* If the prio state pointer is NULL, then use the v4l2_device
 976:		   prio state. */
 977:		if (vdev->prio == NULL)
 978:			vdev->prio = &vdev->v4l2_dev->prio;
 979:	
 980:		/* Part 2: find a free minor, device node number and device index. */
 981:	#ifdef CONFIG_VIDEO_FIXED_MINOR_RANGES
 982:		/* Keep the ranges for the first four types for historical
 983:		 * reasons.
 984:		 * Newer devices (not yet in place) should use the range
 985:		 * of 128-191 and just pick the first free minor there
 986:		 * (new style). */
 987:		switch (type) {
 988:		case VFL_TYPE_VIDEO:
 989:			minor_offset = 0;
 990:			minor_cnt = 64;
 991:			break;
 992:		case VFL_TYPE_RADIO:
 993:			minor_offset = 64;
 994:			minor_cnt = 64;
 995:			break;
 996:		case VFL_TYPE_VBI:
 997:			minor_offset = 224;
 998:			minor_cnt = 32;
 999:			break;
1000:		default:
1001:			minor_offset = 128;
1002:			minor_cnt = 64;
1003:			break;
1004:		}
1005:	#endif
1006:	
1007:		/* Pick a device node number */
1008:		mutex_lock(&videodev_lock);
1009:		nr = devnode_find(vdev, nr == -1 ? 0 : nr, minor_cnt);
1010:		if (nr == minor_cnt)
1011:			nr = devnode_find(vdev, 0, minor_cnt);
1012:		if (nr == minor_cnt) {
1013:			pr_err("could not get a free device node number\n");
1014:			mutex_unlock(&videodev_lock);
1015:			return -ENFILE;
1016:		}
1017:	#ifdef CONFIG_VIDEO_FIXED_MINOR_RANGES
1018:		/* 1-on-1 mapping of device node number to minor number */
1019:		i = nr;
1020:	#else
1021:		/* The device node number and minor numbers are independent, so
1022:		   we just find the first free minor number. */
1023:		for (i = 0; i < VIDEO_NUM_DEVICES; i++)
1024:			if (video_devices[i] == NULL)
1025:				break;
1026:		if (i == VIDEO_NUM_DEVICES) {
1027:			mutex_unlock(&videodev_lock);
1028:			pr_err("could not get a free minor\n");
1029:			return -ENFILE;
1030:		}
1031:	#endif
1032:		vdev->minor = i + minor_offset;
1033:		vdev->num = nr;
1034:	
1035:		if (WARN_ON(vdev->minor >= VIDEO_NUM_DEVICES)) {
1036:			mutex_unlock(&videodev_lock);
1037:			return -EINVAL;
1038:		}
1039:	
1040:		/* Should not happen since we thought this minor was free */
1041:		if (WARN_ON(video_devices[vdev->minor])) {
1042:			mutex_unlock(&videodev_lock);
1043:			pr_err("video_device not empty!\n");
1044:			return -ENFILE;
1045:		}
1046:		devnode_set(vdev);
1047:		vdev->index = get_index(vdev);
1048:		video_devices[vdev->minor] = vdev;
1049:		mutex_unlock(&videodev_lock);
1050:	
1051:		if (vdev->ioctl_ops)
1052:			determine_valid_ioctls(vdev);
1053:	
1054:		/* Part 3: Initialize the character device */
1055:		vdev->cdev = cdev_alloc();
1056:		if (vdev->cdev == NULL) {
1057:			ret = -ENOMEM;
1058:			goto cleanup;
1059:		}
1060:		vdev->cdev->ops = &v4l2_fops;
1061:		vdev->cdev->owner = owner;
1062:		ret = cdev_add(vdev->cdev, MKDEV(VIDEO_MAJOR, vdev->minor), 1);
1063:		if (ret < 0) {
1064:			pr_err("%s: cdev_add failed\n", __func__);
1065:			kfree(vdev->cdev);
1066:			vdev->cdev = NULL;
1067:			goto cleanup;
1068:		}
1069:	
1070:		/* Part 4: register the device with sysfs */
1071:		vdev->dev.class = &video_class;
1072:		vdev->dev.devt = MKDEV(VIDEO_MAJOR, vdev->minor);
1073:		vdev->dev.parent = vdev->dev_parent;
1074:		vdev->dev.release = v4l2_device_release;
1075:		dev_set_name(&vdev->dev, "%s%d", name_base, vdev->num);
1076:	
1077:		/* Increase v4l2_device refcount */
1078:		v4l2_device_get(vdev->v4l2_dev);
1079:	
1080:		mutex_lock(&videodev_lock);
1081:		ret = device_register(&vdev->dev);
1082:		if (ret < 0) {
1083:			mutex_unlock(&videodev_lock);
1084:			pr_err("%s: device_register failed\n", __func__);
1085:			put_device(&vdev->dev);
1086:			return ret;
1087:		}
1088:	
1089:		if (nr != -1 && nr != vdev->num && warn_if_nr_in_use)
1090:			pr_warn("%s: requested %s%d, got %s\n", __func__,
1091:				name_base, nr, video_device_node_name(vdev));
1092:	
1093:		/* Part 5: Register the entity. */
1094:		ret = video_register_media_controller(vdev);
1095:	
1096:		/* Part 6: Activate this minor. The char device can now be used. */
1097:		set_bit(V4L2_FL_REGISTERED, &vdev->flags);
1098:		mutex_unlock(&videodev_lock);
1099:	
1100:		return 0;
1101:	
1102:	cleanup:
1103:		mutex_lock(&videodev_lock);
1104:		if (vdev->cdev)
1105:			cdev_del(vdev->cdev);
1106:		video_devices[vdev->minor] = NULL;
1107:		devnode_clear(vdev);
1108:		mutex_unlock(&videodev_lock);
1109:		/* Mark this video device as never having been registered. */
1110:		vdev->minor = -1;
1111:		return ret;
1112:	}
 SourceFile:drivers/media/v4l2-core/v4l2-dev.c]

93/2 2026/08/07 16:15 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 71232
							output: 50
							thoughts: 20
						

Thoughts:
**My Thought Process Regarding `video_register_media_controller`**

Alright, so the `video_register_media_controller` function has just been invoked. My immediate instinct, given my expertise in this domain, is to dive into its implementation. I need to understand precisely what actions this registration process entails. Is it a simple binding of a controller instance, or does it involve a more complex setup? I'm particularly interested in the underlying mechanisms: what data structures are being populated, what communication channels are being established, and what lifecycle events this registration might be kicking off or preparing for. I'm also considering the potential implications – how will this registration impact the existing video playback system? Will it introduce new functionalities, alter existing behaviors, or perhaps establish dependencies that I need to be aware of for future debugging or optimization? Essentially, I'm looking to gain a comprehensive grasp of its role and responsibilities within the broader video media framework.


94/2 2026/08/07 16:15 tool codesearch-definition-source
0m Args:
map[ContextFile:drivers/media/v4l2-core/v4l2-dev.c Name:video_register_media_controller]

Results:
map[SourceCode: 817:	static int video_register_media_controller(struct video_device *vdev)
 818:	{
 819:	#if defined(CONFIG_MEDIA_CONTROLLER)
 820:		u32 intf_type;
 821:		int ret;
 822:	
 823:		/* Memory-to-memory devices are more complex and use
 824:		 * their own function to register its mc entities.
 825:		 */
 826:		if (!vdev->v4l2_dev->mdev || vdev->vfl_dir == VFL_DIR_M2M)
 827:			return 0;
 828:	
 829:		vdev->entity.obj_type = MEDIA_ENTITY_TYPE_VIDEO_DEVICE;
 830:		vdev->entity.function = MEDIA_ENT_F_UNKNOWN;
 831:	
 832:		switch (vdev->vfl_type) {
 833:		case VFL_TYPE_VIDEO:
 834:			intf_type = MEDIA_INTF_T_V4L_VIDEO;
 835:			vdev->entity.function = MEDIA_ENT_F_IO_V4L;
 836:			break;
 837:		case VFL_TYPE_VBI:
 838:			intf_type = MEDIA_INTF_T_V4L_VBI;
 839:			vdev->entity.function = MEDIA_ENT_F_IO_VBI;
 840:			break;
 841:		case VFL_TYPE_SDR:
 842:			intf_type = MEDIA_INTF_T_V4L_SWRADIO;
 843:			vdev->entity.function = MEDIA_ENT_F_IO_SWRADIO;
 844:			break;
 845:		case VFL_TYPE_TOUCH:
 846:			intf_type = MEDIA_INTF_T_V4L_TOUCH;
 847:			vdev->entity.function = MEDIA_ENT_F_IO_V4L;
 848:			break;
 849:		case VFL_TYPE_RADIO:
 850:			intf_type = MEDIA_INTF_T_V4L_RADIO;
 851:			/*
 852:			 * Radio doesn't have an entity at the V4L2 side to represent
 853:			 * radio input or output. Instead, the audio input/output goes
 854:			 * via either physical wires or ALSA.
 855:			 */
 856:			break;
 857:		case VFL_TYPE_SUBDEV:
 858:			intf_type = MEDIA_INTF_T_V4L_SUBDEV;
 859:			/* Entity will be created via v4l2_device_register_subdev() */
 860:			break;
 861:		default:
 862:			return 0;
 863:		}
 864:	
 865:		if (vdev->entity.function != MEDIA_ENT_F_UNKNOWN) {
 866:			vdev->entity.name = vdev->name;
 867:	
 868:			/* Needed just for backward compatibility with legacy MC API */
 869:			vdev->entity.info.dev.major = VIDEO_MAJOR;
 870:			vdev->entity.info.dev.minor = vdev->minor;
 871:	
 872:			ret = media_device_register_entity(vdev->v4l2_dev->mdev,
 873:							   &vdev->entity);
 874:			if (ret < 0) {
 875:				pr_warn("%s: media_device_register_entity failed\n",
 876:					__func__);
 877:				return ret;
 878:			}
 879:		}
 880:	
 881:		vdev->intf_devnode = media_devnode_create(vdev->v4l2_dev->mdev,
 882:							  intf_type,
 883:							  0, VIDEO_MAJOR,
 884:							  vdev->minor);
 885:		if (!vdev->intf_devnode) {
 886:			media_device_unregister_entity(&vdev->entity);
 887:			return -ENOMEM;
 888:		}
 889:	
 890:		if (vdev->entity.function != MEDIA_ENT_F_UNKNOWN) {
 891:			struct media_link *link;
 892:	
 893:			link = media_create_intf_link(&vdev->entity,
 894:						      &vdev->intf_devnode->intf,
 895:						      MEDIA_LNK_FL_ENABLED |
 896:						      MEDIA_LNK_FL_IMMUTABLE);
 897:			if (!link) {
 898:				media_devnode_remove(vdev->intf_devnode);
 899:				media_device_unregister_entity(&vdev->entity);
 900:				return -ENOMEM;
 901:			}
 902:		}
 903:	
 904:		/* FIXME: how to create the other interface links? */
 905:	
 906:	#endif
 907:		return 0;
 908:	}
 SourceFile:drivers/media/v4l2-core/v4l2-dev.c]

95/2 2026/08/07 16:15 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 72786
							output: 24
							thoughts: 1629
						

Thoughts:
**My Thoughts on a Potential Media Controller Race Condition**

This is quite an interesting conundrum I've stumbled upon, and it seems to point towards a subtle race condition within the V4L2 media controller framework, specifically when dealing with subdevices. My primary concern is around the registration of a subdevice's entity within the media device context.

Here's how my thought process unfolded:

Initially, I observed that for `VFL_TYPE_SUBDEV`, the `video_register_media_controller` function *doesn't* directly call `media_device_register_entity`. The comment `/* Entity will be created via v4l2_device_register_subdev() */` is a bit of a red herring here, as the entity itself isn't immediately registered in the media device.

However, it *does* call `media_devnode_create`, which means `vdev->intf_devnode` is indeed created. This is a crucial point.

Then, I looked at `__v4l2_device_register_subdev_nodes`. This function proceeds to register the actual video device node. Inside this, I saw the section related to `CONFIG_MEDIA_CONTROLLER`, where `media_create_intf_link` is invoked.

This is where my attention sharpened. `media_create_intf_link` is called with `&sd->entity` as an argument. When I examined the implementation of `media_create_intf_link`, I noticed that it sets up the link but *does not* dereference `entity->graph_obj.mdev`. This means that, from the perspective of the `media_create_intf_link` call itself, it succeeds without necessarily verifying if `sd->entity.graph_obj.mdev` is properly initialized.

The consequence of this is that the device node gets registered successfully, and from userspace, it appears as a valid, openable subdevice.

The problem arises later, when userspace actually opens this subdevice. This triggers the `subdev_open` function. Inside `subdev_open`, there's a check: `if (sd->v4l2_dev->mdev && sd->entity.graph_obj.mdev->dev)`.

Here's the critical flaw: `sd->v4l2_dev->mdev` might be non-NULL (because it was set at some point), but `sd->entity.graph_obj.mdev` can still be NULL. This happens because `media_device_register_entity` was *never* called for `sd->entity` *before* the media device (`v4l2_dev->mdev`) was made available.

My question then becomes: why wasn't `media_device_register_entity` called? The answer, I believe, lies in the initial call to `v4l2_device_register_subdev`. If `v4l2_dev->mdev` was NULL *at that specific moment*, then `media_device_register_entity` for `sd->entity` would be skipped.

The scenario then unfolds as follows:
1. `v4l2_device_register_subdev` is called when `v4l2_dev->mdev` is NULL. `sd->entity` is not registered with the media device.
2. Later, the driver *sets* `v4l2_dev->mdev` to a non-NULL value.
3. The driver then calls `v4l2_device_register_subdev_nodes`. This function registers the device node but, because `sd->entity` was never registered with the media device (step 1), `sd->entity.graph_obj.mdev` remains NULL.
4. Userspace opens the subdevice, leading to the `NULL` dereference in `subdev_open`.

I'm now trying to ascertain if any existing drivers exhibit this behavior, particularly those that might be triggered by fuzzers like syzkaller. If such a driver exists, it points to a driver bug. However, if syzkaller can reliably trigger this, it might indicate a more fundamental race condition within the framework itself, or a complex interaction that's hard for drivers to get right. I'm investigating drivers like `vivid`, `vimc`, `vkms`, `uvcvideo`, and `vidtv`, and also considering if `media_device_register_entity` could have failed and what the consequences of that failure are. The absence of a specific driver in the crash log suggests a more general issue or a specific interaction pattern. My current hypothesis strongly leans towards a driver setting `v4l2_dev->mdev` *after* `v4l2_device_register_subdev` has been called, but *before* `__v4l2_device_register_subdev_nodes` is invoked.


96/2 2026/08/07 16:15 tool grepper
0m Args:
map[Expression:v4l2_dev\.mdev =]

Results:
map[Output:drivers/media/pci/intel/ipu3/ipu3-cio2.c=1657=static int cio2_pci_probe(struct pci_dev *pci_dev,
--
drivers/media/pci/intel/ipu3/ipu3-cio2.c-1725-
drivers/media/pci/intel/ipu3/ipu3-cio2.c:1726:	cio2->v4l2_dev.mdev = &cio2->media_dev;
drivers/media/pci/intel/ipu3/ipu3-cio2.c-1727-	r = v4l2_device_register(dev, &cio2->v4l2_dev);
--
drivers/media/pci/intel/ipu6/ipu6-isys.c=783=static int isys_register_devices(struct ipu6_isys *isys)
--
drivers/media/pci/intel/ipu6/ipu6-isys.c-799-
drivers/media/pci/intel/ipu6/ipu6-isys.c:800:	isys->v4l2_dev.mdev = &isys->media_dev;
drivers/media/pci/intel/ipu6/ipu6-isys.c-801-	isys->v4l2_dev.ctrl_handler = NULL;
--
drivers/media/pci/saa7134/saa7134-core.c=1003=static int saa7134_initdev(struct pci_dev *pci_dev,
--
drivers/media/pci/saa7134/saa7134-core.c-1026-	media_device_pci_init(dev->media_dev, pci_dev, dev->name);
drivers/media/pci/saa7134/saa7134-core.c:1027:	dev->v4l2_dev.mdev = dev->media_dev;
drivers/media/pci/saa7134/saa7134-core.c-1028-#endif
--
drivers/media/platform/amd/isp4/isp4.c=118=static int isp4_capture_probe(struct platform_device *pdev)
--
drivers/media/platform/amd/isp4/isp4.c-152-
drivers/media/platform/amd/isp4/isp4.c:153:	isp_dev->v4l2_dev.mdev = &isp_dev->mdev;
drivers/media/platform/amd/isp4/isp4.c-154-
--
drivers/media/platform/amphion/vpu_drv.c=75=static int vpu_init_media_device(struct vpu_dev *vpu)
--
drivers/media/platform/amphion/vpu_drv.c-80-	media_device_init(&vpu->mdev);
drivers/media/platform/amphion/vpu_drv.c:81:	vpu->v4l2_dev.mdev = &vpu->mdev;
drivers/media/platform/amphion/vpu_drv.c-82-
--
drivers/media/platform/arm/mali-c55/mali-c55-core.c=442=static int mali_c55_media_frameworks_init(struct mali_c55 *mali_c55)
--
drivers/media/platform/arm/mali-c55/mali-c55-core.c-454-
drivers/media/platform/arm/mali-c55/mali-c55-core.c:455:	mali_c55->v4l2_dev.mdev = &mali_c55->media_dev;
drivers/media/platform/arm/mali-c55/mali-c55-core.c-456-	ret = v4l2_device_register(mali_c55->dev, &mali_c55->v4l2_dev);
--
drivers/media/platform/broadcom/bcm2835-unicam.c=2624=static int unicam_media_init(struct unicam_device *unicam)
--
drivers/media/platform/broadcom/bcm2835-unicam.c-2634-
drivers/media/platform/broadcom/bcm2835-unicam.c:2635:	unicam->v4l2_dev.mdev = &unicam->mdev;
drivers/media/platform/broadcom/bcm2835-unicam.c-2636-
--
drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec_drv.c=354=static int mtk_vcodec_probe(struct platform_device *pdev)
--
drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec_drv.c-491-		dev->mdev_dec.ops = &mtk_vcodec_media_ops;
drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec_drv.c:492:		dev->v4l2_dev.mdev = &dev->mdev_dec;
drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec_drv.c-493-
--
drivers/media/platform/microchip/microchip-isc-base.c=1914=int isc_mc_init(struct isc_device *isc, u32 ver)
--
drivers/media/platform/microchip/microchip-isc-base.c-1943-
drivers/media/platform/microchip/microchip-isc-base.c:1944:	isc->v4l2_dev.mdev = &isc->mdev;
drivers/media/platform/microchip/microchip-isc-base.c-1945-
--
drivers/media/platform/nvidia/tegra-vde/v4l2.c=919=int tegra_vde_v4l2_init(struct tegra_vde *vde)
--
drivers/media/platform/nvidia/tegra-vde/v4l2.c-935-
drivers/media/platform/nvidia/tegra-vde/v4l2.c:936:	vde->v4l2_dev.mdev = &vde->mdev;
drivers/media/platform/nvidia/tegra-vde/v4l2.c-937-	vde->mdev.ops = &tegra_media_device_ops;
--
drivers/media/platform/nxp/dw100/dw100.c=1563=static int dw100_probe(struct platform_device *pdev)
--
drivers/media/platform/nxp/dw100/dw100.c-1624-	dw_dev->mdev.ops = &dw100_m2m_media_ops;
drivers/media/platform/nxp/dw100/dw100.c:1625:	dw_dev->v4l2_dev.mdev = &dw_dev->mdev;
drivers/media/platform/nxp/dw100/dw100.c-1626-
--
drivers/media/platform/nxp/imx-pxp.c=1771=static int pxp_probe(struct platform_device *pdev)
--
drivers/media/platform/nxp/imx-pxp.c-1864-	media_device_init(&dev->mdev);
drivers/media/platform/nxp/imx-pxp.c:1865:	dev->v4l2_dev.mdev = &dev->mdev;
drivers/media/platform/nxp/imx-pxp.c-1866-
--
drivers/media/platform/nxp/imx7-media-csi.c=2129=static int imx7_csi_media_dev_init(struct imx7_csi *csi)
--
drivers/media/platform/nxp/imx7-media-csi.c-2136-
drivers/media/platform/nxp/imx7-media-csi.c:2137:	csi->v4l2_dev.mdev = &csi->mdev;
drivers/media/platform/nxp/imx7-media-csi.c-2138-	strscpy(csi->v4l2_dev.name, "imx-media",
--
drivers/media/platform/qcom/camss/camss.c=5355=static int camss_probe(struct platform_device *pdev)
--
drivers/media/platform/qcom/camss/camss.c-5425-
drivers/media/platform/qcom/camss/camss.c:5426:	camss->v4l2_dev.mdev = &camss->media_dev;
drivers/media/platform/qcom/camss/camss.c-5427-	ret = v4l2_device_register(camss->dev, &camss->v4l2_dev);
--
drivers/media/platform/raspberrypi/rp1-cfe/cfe.c=2276=static int cfe_probe(struct platform_device *pdev)
--
drivers/media/platform/raspberrypi/rp1-cfe/cfe.c-2360-
drivers/media/platform/raspberrypi/rp1-cfe/cfe.c:2361:	cfe->v4l2_dev.mdev = &cfe->mdev;
drivers/media/platform/raspberrypi/rp1-cfe/cfe.c-2362-
--
drivers/media/platform/renesas/rcar-vin/rcar-core.c=118=static int rvin_group_get(struct rvin_dev *vin,
--
drivers/media/platform/renesas/rcar-vin/rcar-core.c-163-	vin->group = group;
drivers/media/platform/renesas/rcar-vin/rcar-core.c:164:	vin->v4l2_dev.mdev = &group->mdev;
drivers/media/platform/renesas/rcar-vin/rcar-core.c-165-
--
drivers/media/platform/renesas/rcar-vin/rcar-core.c=174=static void rvin_group_put(struct rvin_dev *vin)
--
drivers/media/platform/renesas/rcar-vin/rcar-core.c-180-	vin->group = NULL;
drivers/media/platform/renesas/rcar-vin/rcar-core.c:181:	vin->v4l2_dev.mdev = NULL;
drivers/media/platform/renesas/rcar-vin/rcar-core.c-182-
--
drivers/media/platform/renesas/rzg2l-cru/rzg2l-core.c=205=static int rzg2l_cru_media_init(struct rzg2l_cru_dev *cru)
--
drivers/media/platform/renesas/rzg2l-cru/rzg2l-core.c-226-
drivers/media/platform/renesas/rzg2l-cru/rzg2l-core.c:227:	cru->v4l2_dev.mdev = &cru->mdev;
drivers/media/platform/renesas/rzg2l-cru/rzg2l-core.c-228-
--
drivers/media/platform/renesas/rzg2l-cru/rzg2l-core.c-233-		mutex_lock(&cru->mdev_lock);
drivers/media/platform/renesas/rzg2l-cru/rzg2l-core.c:234:		cru->v4l2_dev.mdev = NULL;
drivers/media/platform/renesas/rzg2l-cru/rzg2l-core.c-235-		mutex_unlock(&cru->mdev_lock);
--
drivers/media/platform/rockchip/rkcif/rkcif-dev.c=164=static int rkcif_probe(struct platform_device *pdev)
--
drivers/media/platform/rockchip/rkcif/rkcif-dev.c-219-
drivers/media/platform/rockchip/rkcif/rkcif-dev.c:220:	rkcif->v4l2_dev.mdev = &rkcif->media_dev;
drivers/media/platform/rockchip/rkcif/rkcif-dev.c-221-	ret = v4l2_device_register(dev, &rkcif->v4l2_dev);
--
drivers/media/platform/rockchip/rkvdec/rkvdec.c=1339=static int rkvdec_v4l2_init(struct rkvdec_dev *rkvdec)
--
drivers/media/platform/rockchip/rkvdec/rkvdec.c-1361-	rkvdec->mdev.ops = &rkvdec_media_ops;
drivers/media/platform/rockchip/rkvdec/rkvdec.c:1362:	rkvdec->v4l2_dev.mdev = &rkvdec->mdev;
drivers/media/platform/rockchip/rkvdec/rkvdec.c-1363-
--
drivers/media/platform/st/stm32/stm32-dcmi.c=1954=static int dcmi_probe(struct platform_device *pdev)
--
drivers/media/platform/st/stm32/stm32-dcmi.c-2101-
drivers/media/platform/st/stm32/stm32-dcmi.c:2102:	dcmi->v4l2_dev.mdev = &dcmi->mdev;
drivers/media/platform/st/stm32/stm32-dcmi.c-2103-
--
drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-core.c=466=static int dcmipp_probe(struct platform_device *pdev)
--
drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-core.c-561-	/* Link the media device within the v4l2_device */
drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-core.c:562:	dcmipp->v4l2_dev.mdev = &dcmipp->mdev;
drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-core.c-563-
--
drivers/media/platform/ti/cal/cal.c=966=static int cal_media_init(struct cal_dev *cal)
--
drivers/media/platform/ti/cal/cal.c-979-	 */
drivers/media/platform/ti/cal/cal.c:980:	cal->v4l2_dev.mdev = mdev;
drivers/media/platform/ti/cal/cal.c-981-	ret = v4l2_device_register(cal->dev, &cal->v4l2_dev);
--
drivers/media/platform/ti/j721e-csi2rx/j721e-csi2rx.c=1394=static int ti_csi2rx_v4l2_init(struct ti_csi2rx_dev *csi)
--
drivers/media/platform/ti/j721e-csi2rx/j721e-csi2rx.c-1405-
drivers/media/platform/ti/j721e-csi2rx/j721e-csi2rx.c:1406:	csi->v4l2_dev.mdev = mdev;
drivers/media/platform/ti/j721e-csi2rx/j721e-csi2rx.c-1407-
--
drivers/media/platform/ti/omap3isp/isp.c=1647=static int isp_register_entities(struct isp_device *isp)
--
drivers/media/platform/ti/omap3isp/isp.c-1657-
drivers/media/platform/ti/omap3isp/isp.c:1658:	isp->v4l2_dev.mdev = &isp->media_dev;
drivers/media/platform/ti/omap3isp/isp.c-1659-	ret = v4l2_device_register(isp->dev, &isp->v4l2_dev);
--
drivers/media/platform/verisilicon/hantro_drv.c=1074=static int hantro_probe(struct platform_device *pdev)
--
drivers/media/platform/verisilicon/hantro_drv.c-1235-	vpu->mdev.ops = &hantro_m2m_media_ops;
drivers/media/platform/verisilicon/hantro_drv.c:1236:	vpu->v4l2_dev.mdev = &vpu->mdev;
drivers/media/platform/verisilicon/hantro_drv.c-1237-
--
drivers/media/platform/xilinx/xilinx-vipp.c=540=static int xvip_composite_v4l2_init(struct xvip_composite_device *xdev)
--
drivers/media/platform/xilinx/xilinx-vipp.c-550-
drivers/media/platform/xilinx/xilinx-vipp.c:551:	xdev->v4l2_dev.mdev = &xdev->media_dev;
drivers/media/platform/xilinx/xilinx-vipp.c-552-	ret = v4l2_device_register(xdev->dev, &xdev->v4l2_dev);
--
drivers/media/test-drivers/vicodec/vicodec-core.c=2103=static int vicodec_probe(struct platform_device *pdev)
--
drivers/media/test-drivers/vicodec/vicodec-core.c-2124-	dev->mdev.ops = &vicodec_m2m_media_ops;
drivers/media/test-drivers/vicodec/vicodec-core.c:2125:	dev->v4l2_dev.mdev = &dev->mdev;
drivers/media/test-drivers/vicodec/vicodec-core.c-2126-#endif
--
drivers/media/test-drivers/vim2m.c=1489=static int vim2m_probe(struct platform_device *pdev)
--
drivers/media/test-drivers/vim2m.c-1531-	dev->mdev.ops = &m2m_media_ops;
drivers/media/test-drivers/vim2m.c:1532:	dev->v4l2_dev.mdev = &dev->mdev;
drivers/media/test-drivers/vim2m.c-1533-
--
drivers/media/test-drivers/vimc/vimc-core.c=338=static int vimc_probe(struct platform_device *pdev)
--
drivers/media/test-drivers/vimc/vimc-core.c-362-	/* Link the media device within the v4l2_device */
drivers/media/test-drivers/vimc/vimc-core.c:363:	vimc->v4l2_dev.mdev = &vimc->mdev;
drivers/media/test-drivers/vimc/vimc-core.c-364-
--
drivers/media/test-drivers/visl/visl-core.c=437=static int visl_probe(struct platform_device *pdev)
--
drivers/media/test-drivers/visl/visl-core.c-476-	dev->mdev.ops = &visl_m2m_media_ops;
drivers/media/test-drivers/visl/visl-core.c:477:	dev->v4l2_dev.mdev = &dev->mdev;
drivers/media/test-drivers/visl/visl-core.c-478-
--
drivers/media/test-drivers/vivid/vivid-core.c=1800=static int vivid_create_instance(struct platform_device *pdev, int inst)
--
drivers/media/test-drivers/vivid/vivid-core.c-1823-#ifdef CONFIG_MEDIA_CONTROLLER
drivers/media/test-drivers/vivid/vivid-core.c:1824:	dev->v4l2_dev.mdev = &dev->mdev;
drivers/media/test-drivers/vivid/vivid-core.c-1825-
--
drivers/media/usb/au0828/au0828-video.c=646=int au0828_v4l2_device_register(struct usb_interface *interface,
--
drivers/media/usb/au0828/au0828-video.c-655-#ifdef CONFIG_MEDIA_CONTROLLER
drivers/media/usb/au0828/au0828-video.c:656:	dev->v4l2_dev.mdev = dev->media_dev;
drivers/media/usb/au0828/au0828-video.c-657-#endif
--
drivers/media/usb/cx231xx/cx231xx-cards.c=1689=static int cx231xx_usb_probe(struct usb_interface *interface,
--
drivers/media/usb/cx231xx/cx231xx-cards.c-1813-#ifdef CONFIG_MEDIA_CONTROLLER
drivers/media/usb/cx231xx/cx231xx-cards.c:1814:	dev->v4l2_dev.mdev = dev->media_dev;
drivers/media/usb/cx231xx/cx231xx-cards.c-1815-#endif
--
drivers/media/usb/em28xx/em28xx-video.c=2687=static int em28xx_v4l2_init(struct em28xx *dev)
--
drivers/media/usb/em28xx/em28xx-video.c-2718-#ifdef CONFIG_MEDIA_CONTROLLER
drivers/media/usb/em28xx/em28xx-video.c:2719:	v4l2->v4l2_dev.mdev = dev->media_dev;
drivers/media/usb/em28xx/em28xx-video.c-2720-#endif
--
drivers/staging/media/atomisp/pci/atomisp_v4l2.c=824=static int atomisp_register_entities(struct atomisp_device *isp)
--
drivers/staging/media/atomisp/pci/atomisp_v4l2.c-834-	media_device_init(&isp->media_dev);
drivers/staging/media/atomisp/pci/atomisp_v4l2.c:835:	isp->v4l2_dev.mdev = &isp->media_dev;
drivers/staging/media/atomisp/pci/atomisp_v4l2.c-836-	ret = v4l2_device_register(isp->dev, &isp->v4l2_dev);
--
drivers/staging/media/imx/imx-media-dev-common.c=332=struct imx_media_dev *imx_media_dev_init(struct device *dev,
--
drivers/staging/media/imx/imx-media-dev-common.c-349-
drivers/staging/media/imx/imx-media-dev-common.c:350:	imxmd->v4l2_dev.mdev = &imxmd->md;
drivers/staging/media/imx/imx-media-dev-common.c-351-	imxmd->v4l2_dev.notify = imx_media_notify;
--
drivers/staging/media/ipu3/ipu3-v4l2.c=1348=int imgu_v4l2_register(struct imgu_device *imgu)
--
drivers/staging/media/ipu3/ipu3-v4l2.c-1358-	/* Set up v4l2 device */
drivers/staging/media/ipu3/ipu3-v4l2.c:1359:	imgu->v4l2_dev.mdev = &imgu->media_dev;
drivers/staging/media/ipu3/ipu3-v4l2.c-1360-	imgu->v4l2_dev.ctrl_handler = NULL;
--
drivers/staging/media/ipu7/ipu7-isys.c=374=static int isys_register_devices(struct ipu7_isys *isys)
--
drivers/staging/media/ipu7/ipu7-isys.c-389-
drivers/staging/media/ipu7/ipu7-isys.c:390:	isys->v4l2_dev.mdev = &isys->media_dev;
drivers/staging/media/ipu7/ipu7-isys.c-391-	isys->v4l2_dev.ctrl_handler = NULL;
--
drivers/staging/media/sunxi/cedrus/cedrus.c=451=static int cedrus_probe(struct platform_device *pdev)
--
drivers/staging/media/sunxi/cedrus/cedrus.c-505-	dev->mdev.ops = &cedrus_m2m_media_ops;
drivers/staging/media/sunxi/cedrus/cedrus.c:506:	dev->v4l2_dev.mdev = &dev->mdev;
drivers/staging/media/sunxi/cedrus/cedrus.c-507-
--
drivers/staging/media/tegra-video/video.c=44=static int host1x_video_probe(struct host1x_device *dev)
--
drivers/staging/media/tegra-video/video.c-66-
drivers/staging/media/tegra-video/video.c:67:	vid->v4l2_dev.mdev = &vid->media_dev;
drivers/staging/media/tegra-video/video.c-68-	vid->v4l2_dev.release = tegra_v4l2_dev_release;
]

97/2 2026/08/07 16:15 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 81197
							output: 47
							thoughts: 147
						

Thoughts:
**My Thought Process Regarding `vivid` and Subdevice Registration**

My initial thought was to question the ordering of operations within the `vivid` driver, specifically concerning the initialization of its V4L2 device structure (`v4l2_dev`) and the subsequent registration of its subdevices. I noticed that in `vivid_create_instance`, there's a conditional inclusion of `dev->v4l2_dev.mdev = &dev->mdev;` guarded by `CONFIG_MEDIA_CONTROLLER`. This immediately raised a flag for me: is it possible for `v4l2_device_register_subdev` to be called *before* `v4l2_dev.mdev` has been assigned?

Then, looking closer at `vivid_create_instance`, I saw that `dev->v4l2_dev.mdev = &dev->mdev;` *is indeed* called. My next mental step was to confirm if the subdevice registration actually happens *after* this assignment. To clarify this sequence, I decided to scrutinize the `vivid_create_instance` function itself.


98/2 2026/08/07 16:15 tool codesearch-definition-source
0m Args:
map[ContextFile:drivers/media/test-drivers/vivid/vivid-core.c Name:vivid_create_instance]

Results:
map[SourceCode:1800:	static int vivid_create_instance(struct platform_device *pdev, int inst)
1801:	{
1802:		static const struct v4l2_dv_timings def_dv_timings =
1803:						V4L2_DV_BT_CEA_1280X720P60;
1804:		unsigned in_type_counter[4] = { 0, 0, 0, 0 };
1805:		unsigned out_type_counter[4] = { 0, 0, 0, 0 };
1806:		int ccs_cap = ccs_cap_mode[inst];
1807:		int ccs_out = ccs_out_mode[inst];
1808:		bool has_tuner;
1809:		bool has_modulator;
1810:		struct vivid_dev *dev;
1811:		unsigned node_type = node_types[inst];
1812:		v4l2_std_id tvnorms_cap = 0, tvnorms_out = 0;
1813:		int ret;
1814:		int i;
1815:	
1816:		/* allocate main vivid state structure */
1817:		dev = kzalloc_obj(*dev);
1818:		if (!dev)
1819:			return -ENOMEM;
1820:	
1821:		dev->inst = inst;
1822:	
1823:	#ifdef CONFIG_MEDIA_CONTROLLER
1824:		dev->v4l2_dev.mdev = &dev->mdev;
1825:	
1826:		/* Initialize media device */
1827:		strscpy(dev->mdev.model, VIVID_MODULE_NAME, sizeof(dev->mdev.model));
1828:		snprintf(dev->mdev.bus_info, sizeof(dev->mdev.bus_info),
1829:			 "platform:%s-%03d", VIVID_MODULE_NAME, inst);
1830:		dev->mdev.dev = &pdev->dev;
1831:		media_device_init(&dev->mdev);
1832:		dev->mdev.ops = &vivid_media_ops;
1833:	#endif
1834:	
1835:		/* register v4l2_device */
1836:		snprintf(dev->v4l2_dev.name, sizeof(dev->v4l2_dev.name),
1837:				"%s-%03d", VIVID_MODULE_NAME, inst);
1838:		ret = v4l2_device_register(&pdev->dev, &dev->v4l2_dev);
1839:		if (ret) {
1840:			kfree(dev);
1841:			return ret;
1842:		}
1843:		dev->v4l2_dev.release = vivid_dev_release;
1844:	
1845:		ret = vivid_detect_feature_set(dev, inst, node_type,
1846:					       &has_tuner, &has_modulator,
1847:					       &ccs_cap, &ccs_out,
1848:					       in_type_counter, out_type_counter);
1849:		if (ret)
1850:			goto free_dev;
1851:	
1852:		vivid_set_capabilities(dev);
1853:	
1854:		ret = -ENOMEM;
1855:		/* initialize the test pattern generator */
1856:		tpg_init(&dev->tpg, 640, 360);
1857:		if (tpg_alloc(&dev->tpg, array_size(MAX_WIDTH, MAX_ZOOM)))
1858:			goto free_dev;
1859:		dev->scaled_line = vcalloc(MAX_WIDTH, MAX_ZOOM);
1860:		if (!dev->scaled_line)
1861:			goto free_dev;
1862:		dev->blended_line = vcalloc(MAX_WIDTH, MAX_ZOOM);
1863:		if (!dev->blended_line)
1864:			goto free_dev;
1865:	
1866:		/* load the edid */
1867:		dev->edid = vmalloc_array(256, 128);
1868:		if (!dev->edid)
1869:			goto free_dev;
1870:	
1871:		ret = vivid_init_dv_timings(dev);
1872:		if (ret < 0)
1873:			goto free_dev;
1874:	
1875:		vivid_disable_unused_ioctls(dev, has_tuner, has_modulator,
1876:					    in_type_counter, out_type_counter);
1877:	
1878:		/* configure internal data */
1879:		dev->fmt_cap = &vivid_formats[0];
1880:		dev->fmt_out = &vivid_formats[0];
1881:		if (!dev->multiplanar)
1882:			vivid_formats[0].data_offset[0] = 0;
1883:		dev->webcam_size_idx = 1;
1884:		dev->webcam_ival_idx = 3;
1885:		tpg_s_fourcc(&dev->tpg, dev->fmt_cap->fourcc);
1886:		dev->std_out = V4L2_STD_PAL;
1887:		if (dev->input_type[0] == TV || dev->input_type[0] == SVID)
1888:			tvnorms_cap = V4L2_STD_ALL;
1889:		if (dev->output_type[0] == SVID)
1890:			tvnorms_out = V4L2_STD_ALL;
1891:		for (i = 0; i < MAX_INPUTS; i++) {
1892:			dev->dv_timings_cap[i] = def_dv_timings;
1893:			dev->std_cap[i] = V4L2_STD_PAL;
1894:		}
1895:		dev->dv_timings_out = def_dv_timings;
1896:		dev->tv_freq = 2804 /* 175.25 * 16 */;
1897:		dev->tv_audmode = V4L2_TUNER_MODE_STEREO;
1898:		dev->tv_field_cap = V4L2_FIELD_INTERLACED;
1899:		dev->tv_field_out = V4L2_FIELD_INTERLACED;
1900:		dev->radio_rx_freq = 95000 * 16;
1901:		dev->radio_rx_audmode = V4L2_TUNER_MODE_STEREO;
1902:		if (dev->has_radio_tx) {
1903:			dev->radio_tx_freq = 95500 * 16;
1904:			dev->radio_rds_loop = false;
1905:		}
1906:		dev->radio_tx_subchans = V4L2_TUNER_SUB_STEREO | V4L2_TUNER_SUB_RDS;
1907:		dev->sdr_adc_freq = 300000;
1908:		dev->sdr_fm_freq = 50000000;
1909:		dev->sdr_pixelformat = V4L2_SDR_FMT_CU8;
1910:		dev->sdr_buffersize = SDR_CAP_SAMPLES_PER_BUF * 2;
1911:	
1912:		dev->edid_max_blocks = dev->edid_blocks = 2;
1913:		memcpy(dev->edid, vivid_hdmi_edid, sizeof(vivid_hdmi_edid));
1914:		dev->radio_rds_init_time = ktime_get();
1915:		INIT_WORK(&dev->update_hdmi_ctrl_work, update_hdmi_ctrls_work_handler);
1916:		INIT_WORK(&dev->update_svid_ctrl_work, update_svid_ctrls_work_handler);
1917:		for (int j = 0, k = 0; j < dev->num_inputs; ++j)
1918:			if (dev->input_type[j] == HDMI)
1919:				dev->hdmi_index_to_input_index[k++] = j;
1920:		for (int j = 0, k = 0; j < dev->num_outputs; ++j)
1921:			if (dev->output_type[j] == HDMI) {
1922:				dev->output_to_iface_index[j] = k;
1923:				dev->hdmi_index_to_output_index[k++] = j;
1924:			}
1925:		for (int j = 0, k = 0; j < dev->num_inputs; ++j)
1926:			if (dev->input_type[j] == SVID)
1927:				dev->svid_index_to_input_index[k++] = j;
1928:		for (int j = 0, k = 0; j < dev->num_outputs; ++j)
1929:			if (dev->output_type[j] == SVID)
1930:				dev->output_to_iface_index[j] = k++;
1931:	
1932:		/* create all controls */
1933:		ret = vivid_create_controls(dev, ccs_cap == -1, ccs_out == -1, no_error_inj,
1934:				in_type_counter[TV] || in_type_counter[SVID] ||
1935:				out_type_counter[SVID],
1936:				in_type_counter[HDMI] || out_type_counter[HDMI]);
1937:		if (ret)
1938:			goto unreg_dev;
1939:	
1940:		/* enable/disable interface specific controls */
1941:		if (dev->num_inputs && dev->input_type[0] != HDMI) {
1942:			v4l2_ctrl_activate(dev->ctrl_dv_timings_signal_mode, false);
1943:			v4l2_ctrl_activate(dev->ctrl_dv_timings, false);
1944:		} else if (dev->num_inputs && dev->input_type[0] == HDMI) {
1945:			v4l2_ctrl_activate(dev->ctrl_std_signal_mode, false);
1946:			v4l2_ctrl_activate(dev->ctrl_standard, false);
1947:		}
1948:	
1949:		/*
1950:		 * update the capture and output formats to do a proper initial
1951:		 * configuration.
1952:		 */
1953:		vivid_update_format_cap(dev, false);
1954:		vivid_update_format_out(dev);
1955:	
1956:		/* update touch configuration */
1957:		dev->timeperframe_tch_cap.numerator = 1;
1958:		dev->timeperframe_tch_cap.denominator = 10;
1959:		vivid_set_touch(dev, 0);
1960:	
1961:		/* initialize locks */
1962:		spin_lock_init(&dev->slock);
1963:		mutex_init(&dev->mutex);
1964:	
1965:		/* init dma queues */
1966:		INIT_LIST_HEAD(&dev->vid_cap_active);
1967:		INIT_LIST_HEAD(&dev->vid_out_active);
1968:		INIT_LIST_HEAD(&dev->vbi_cap_active);
1969:		INIT_LIST_HEAD(&dev->vbi_out_active);
1970:		INIT_LIST_HEAD(&dev->sdr_cap_active);
1971:		INIT_LIST_HEAD(&dev->meta_cap_active);
1972:		INIT_LIST_HEAD(&dev->meta_out_active);
1973:		INIT_LIST_HEAD(&dev->touch_cap_active);
1974:	
1975:		spin_lock_init(&dev->cec_xfers_slock);
1976:	
1977:		if (allocators[inst] == 1)
1978:			dma_coerce_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32));
1979:	
1980:		ret = vivid_create_queues(dev);
1981:		if (ret)
1982:			goto unreg_dev;
1983:	
1984:	#ifdef CONFIG_VIDEO_VIVID_CEC
1985:		if (dev->has_vid_cap && in_type_counter[HDMI]) {
1986:			struct cec_adapter *adap;
1987:	
1988:			adap = vivid_cec_alloc_adap(dev, 0, false);
1989:			ret = PTR_ERR_OR_ZERO(adap);
1990:			if (ret < 0)
1991:				goto unreg_dev;
1992:			dev->cec_rx_adap = adap;
1993:		}
1994:	
1995:		if (dev->has_vid_out) {
1996:			int j;
1997:	
1998:			for (i = j = 0; i < dev->num_outputs; i++) {
1999:				struct cec_adapter *adap;
2000:	
2001:				if (dev->output_type[i] != HDMI)
2002:					continue;
2003:	
2004:				adap = vivid_cec_alloc_adap(dev, j, true);
2005:				ret = PTR_ERR_OR_ZERO(adap);
2006:				if (ret < 0) {
2007:					while (j--)
2008:						cec_delete_adapter(dev->cec_tx_adap[j]);
2009:					goto unreg_dev;
2010:				}
2011:	
2012:				dev->cec_tx_adap[j++] = adap;
2013:			}
2014:		}
2015:	
2016:		if (dev->cec_rx_adap || dev->num_hdmi_outputs) {
2017:			init_waitqueue_head(&dev->kthread_waitq_cec);
2018:			dev->kthread_cec = kthread_run(vivid_cec_bus_thread, dev,
2019:						       "vivid_cec-%s", dev->v4l2_dev.name);
2020:			if (IS_ERR(dev->kthread_cec)) {
2021:				ret = PTR_ERR(dev->kthread_cec);
2022:				dev->kthread_cec = NULL;
2023:				v4l2_err(&dev->v4l2_dev, "kernel_thread() failed\n");
2024:				goto unreg_dev;
2025:			}
2026:		}
2027:	
2028:	#endif
2029:	
2030:		v4l2_ctrl_handler_setup(&dev->ctrl_hdl_vid_cap);
2031:		v4l2_ctrl_handler_setup(&dev->ctrl_hdl_vid_out);
2032:		v4l2_ctrl_handler_setup(&dev->ctrl_hdl_vbi_cap);
2033:		v4l2_ctrl_handler_setup(&dev->ctrl_hdl_vbi_out);
2034:		v4l2_ctrl_handler_setup(&dev->ctrl_hdl_radio_rx);
2035:		v4l2_ctrl_handler_setup(&dev->ctrl_hdl_radio_tx);
2036:		v4l2_ctrl_handler_setup(&dev->ctrl_hdl_sdr_cap);
2037:		v4l2_ctrl_handler_setup(&dev->ctrl_hdl_meta_cap);
2038:		v4l2_ctrl_handler_setup(&dev->ctrl_hdl_meta_out);
2039:		v4l2_ctrl_handler_setup(&dev->ctrl_hdl_touch_cap);
2040:	
2041:		/* finally start creating the device nodes */
2042:		ret = vivid_create_devnodes(pdev, dev, inst,
2043:					    tvnorms_cap, tvnorms_out,
2044:					    in_type_counter, out_type_counter);
2045:		if (ret)
2046:			goto unreg_dev;
2047:	
2048:		/* Now that everything is fine, let's add it to device list */
2049:		vivid_devs[inst] = dev;
2050:	
2051:		return 0;
2052:	
2053:	unreg_dev:
2054:		vb2_video_unregister_device(&dev->touch_cap_dev);
2055:		vb2_video_unregister_device(&dev->meta_out_dev);
2056:		vb2_video_unregister_device(&dev->meta_cap_dev);
2057:		video_unregister_device(&dev->radio_tx_dev);
2058:		video_unregister_device(&dev->radio_rx_dev);
2059:		vb2_video_unregister_device(&dev->sdr_cap_dev);
2060:		vb2_video_unregister_device(&dev->vbi_out_dev);
2061:		vb2_video_unregister_device(&dev->vbi_cap_dev);
2062:		vb2_video_unregister_device(&dev->vid_out_dev);
2063:		vb2_video_unregister_device(&dev->vid_cap_dev);
2064:		cec_unregister_adapter(dev->cec_rx_adap);
2065:		for (i = 0; i < MAX_HDMI_OUTPUTS; i++)
2066:			cec_unregister_adapter(dev->cec_tx_adap[i]);
2067:		if (dev->kthread_cec)
2068:			kthread_stop(dev->kthread_cec);
2069:	free_dev:
2070:		v4l2_device_put(&dev->v4l2_dev);
2071:		return ret;
2072:	}
 SourceFile:drivers/media/test-drivers/vivid/vivid-core.c]

99/2 2026/08/07 16:15 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 86477
							output: 45
							thoughts: 113
						

Thoughts:
**A Deep Dive into `vivid`'s Media Controller Integration**

My initial thought process, as I was examining the `vivid_create_instance` function, centered on the order of operations involving the V4L2 device and its media controller counterpart. I noticed that `dev->v4l2_dev.mdev = &dev->mdev;` was being assigned *before* the call to `v4l2_device_register`. This struck me as a point of interest, particularly because `vivid`'s primary interaction is with `video_device` objects, not `v4l2_subdev` entities.

This observation then led me to question the extent of `vivid`'s integration with the V4L2 media controller framework. Specifically, I found myself wondering if `vivid` actually *utilizes* `v4l2_subdev` structures. My initial scan suggested that it did not, as I couldn't locate any explicit calls to `v4l2_device_register_subdev`. To solidify this understanding and to explore potential nuances or alternative implementations, my next step was to turn my attention to the `vimc` (Virtual Media Controller) driver, as it's a prime candidate for showcasing a more comprehensive media controller integration.


100/2 2026/08/07 16:16 tool codesearch-definition-source
0m Args:
map[ContextFile:drivers/media/test-drivers/vimc/vimc-core.c Name:vimc_probe]

Results:
map[SourceCode: 338:	static int vimc_probe(struct platform_device *pdev)
 339:	{
 340:		const struct font_desc *font = find_font("VGA8x16");
 341:		struct vimc_device *vimc;
 342:		int ret;
 343:	
 344:		dev_dbg(&pdev->dev, "probe");
 345:	
 346:		if (!font) {
 347:			dev_err(&pdev->dev, "could not find font\n");
 348:			return -ENODEV;
 349:		}
 350:	
 351:		tpg_set_font(font->data);
 352:	
 353:		if (vimc_allocator == VIMC_ALLOCATOR_DMA_CONTIG)
 354:			dma_coerce_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32));
 355:	
 356:		vimc = kzalloc_obj(*vimc);
 357:		if (!vimc)
 358:			return -ENOMEM;
 359:	
 360:		vimc->pipe_cfg = &pipe_cfg;
 361:	
 362:		/* Link the media device within the v4l2_device */
 363:		vimc->v4l2_dev.mdev = &vimc->mdev;
 364:	
 365:		/* Initialize media device */
 366:		strscpy(vimc->mdev.model, VIMC_MDEV_MODEL_NAME,
 367:			sizeof(vimc->mdev.model));
 368:		vimc->mdev.dev = &pdev->dev;
 369:		media_device_init(&vimc->mdev);
 370:	
 371:		ret = vimc_register_devices(vimc);
 372:		if (ret) {
 373:			media_device_cleanup(&vimc->mdev);
 374:			kfree(vimc);
 375:			return ret;
 376:		}
 377:		/*
 378:		 * the release cb is set only after successful registration.
 379:		 * if the registration fails, we release directly from probe
 380:		 */
 381:	
 382:		vimc->v4l2_dev.release = vimc_v4l2_dev_release;
 383:		platform_set_drvdata(pdev, vimc);
 384:		return 0;
 385:	}
 SourceFile:drivers/media/test-drivers/vimc/vimc-core.c]

101/2 2026/08/07 16:16 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 87370
							output: 58
							thoughts: 53
						

Thoughts:
**My Thought Process Regarding `vimc` and Device Registration**

Okay, so I've been digging into this `vimc` module, and a specific sequence of operations has caught my eye. I'm noticing that `vimc` is assigning `vimc->v4l2_dev.mdev = &vimc->mdev;` *before* it calls `vimc_register_devices`. This order of operations is interesting, and I want to understand the implications of it. My immediate next step, therefore, is to examine the `rzg2l_cru_media_init` function to see how it interacts with this setup. I'm particularly looking for how it utilizes the `mdev` pointer that's being set so early in the `vimc` initialization process. My hypothesis is that `rzg2l_cru_media_init` likely relies on that `mdev` being present and correctly configured at that stage to proceed with its own device initialization or registration logic.


102/2 2026/08/07 16:16 tool codesearch-definition-source
0m Error:
log-in to see details

Args:
map[ContextFile:drivers/media/platform/renesas/rzg2l-cru/rzg2l-core.c Name:rzg2l_cru_media_init]

Results:
map[SourceCode: SourceFile:]

103/2 2026/08/07 16:16 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 87486
							output: 52
							thoughts: 36
						

Thoughts:
**My Thought Process on `rzg2l-core.c` Line 205**

My initial instinct, when faced with a specific line of code like `rzg2l-core.c` line 205, is to immediately dive into the context surrounding it to understand its purpose. I'm not just looking at that single line in isolation; I need to see what led up to it and what consequences it has. This means examining the function it's within, the variables it operates on, and how it interacts with other parts of the code. I'll be paying close attention to any conditional logic, data structures, or calls to other functions that might shed light on its intended behavior. My goal here is to unravel the "why" behind that line, not just the "what."


104/2 2026/08/07 16:16 tool read-file
0m Args:
map[File:drivers/media/platform/renesas/rzg2l-cru/rzg2l-core.c FirstLine:205 LineCount:40]

Results:
map[Contents: 205:	static int rzg2l_cru_media_init(struct rzg2l_cru_dev *cru)
 206:	{
 207:		struct media_device *mdev = NULL;
 208:		const struct of_device_id *match;
 209:		int ret;
 210:	
 211:		cru->pad.flags = MEDIA_PAD_FL_SINK | MEDIA_PAD_FL_MUST_CONNECT;
 212:		ret = media_entity_pads_init(&cru->vdev.entity, 1, &cru->pad);
 213:		if (ret)
 214:			return ret;
 215:	
 216:		mutex_init(&cru->mdev_lock);
 217:		mdev = &cru->mdev;
 218:		mdev->dev = cru->dev;
 219:		mdev->ops = &rzg2l_cru_media_ops;
 220:	
 221:		match = of_match_node(cru->dev->driver->of_match_table,
 222:				      cru->dev->of_node);
 223:	
 224:		strscpy(mdev->driver_name, KBUILD_MODNAME, sizeof(mdev->driver_name));
 225:		strscpy(mdev->model, match->compatible, sizeof(mdev->model));
 226:	
 227:		cru->v4l2_dev.mdev = &cru->mdev;
 228:	
 229:		media_device_init(mdev);
 230:	
 231:		ret = rzg2l_cru_mc_parse_of_graph(cru);
 232:		if (ret) {
 233:			mutex_lock(&cru->mdev_lock);
 234:			cru->v4l2_dev.mdev = NULL;
 235:			mutex_unlock(&cru->mdev_lock);
 236:		}
 237:	
 238:		return 0;
 239:	}
 240:	
 241:	static int rzg2l_cru_probe(struct platform_device *pdev)
 242:	{
 243:		struct device *dev = &pdev->dev;
 244:		struct rzg2l_cru_dev *cru;
]

105/2 2026/08/07 16:16 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 88214
							output: 52
							thoughts: 105
						

Thoughts:
**My Internal Monologue**

Okay, so I've been digging into this `rzg2l_cru_mc_parse_of_graph` function. My understanding is that if this function encounters an error, it's supposed to signal a problem by setting `cru->v4l2_dev.mdev` to `NULL`. That seems like a straightforward failure indicator.

However, I'm seeing something that's making me pause. It appears that `rzg2l_cru_media_init`, which calls `rzg2l_cru_mc_parse_of_graph`, is *still* returning a success code (0) even if `rzg2l_cru_mc_parse_of_graph` itself fails and sets that `mdev` pointer to `NULL`. This is a critical disconnect.

This behavior is problematic because if `rzg2l_cru_media_init` returns `0` (success), then the probe function, `rzg2l_cru_probe`, will simply continue its execution as if everything is fine. It won't be aware of the underlying failure within `rzg2l_cru_mc_parse_of_graph` that has left `mdev` uninitialized.

This is why I need to go back and scrutinize the logic within `rzg2l_cru_probe` itself. I need to understand how it's interpreting the return codes from `rzg2l_cru_media_init` and what the downstream consequences are of this apparent discrepancy. There's a potential for unexpected behavior or a missed error path here.


106/2 2026/08/07 16:16 tool read-file
0m Args:
map[File:drivers/media/platform/renesas/rzg2l-cru/rzg2l-core.c FirstLine:241 LineCount:50]

Results:
map[Contents: 241:	static int rzg2l_cru_probe(struct platform_device *pdev)
 242:	{
 243:		struct device *dev = &pdev->dev;
 244:		struct rzg2l_cru_dev *cru;
 245:		int irq, ret;
 246:	
 247:		cru = devm_kzalloc(dev, sizeof(*cru), GFP_KERNEL);
 248:		if (!cru)
 249:			return -ENOMEM;
 250:	
 251:		cru->base = devm_platform_ioremap_resource(pdev, 0);
 252:		if (IS_ERR(cru->base))
 253:			return PTR_ERR(cru->base);
 254:	
 255:		cru->presetn = devm_reset_control_get_shared(dev, "presetn");
 256:		if (IS_ERR(cru->presetn))
 257:			return dev_err_probe(dev, PTR_ERR(cru->presetn),
 258:					     "Failed to get cpg presetn\n");
 259:	
 260:		cru->aresetn = devm_reset_control_get_exclusive(dev, "aresetn");
 261:		if (IS_ERR(cru->aresetn))
 262:			return dev_err_probe(dev, PTR_ERR(cru->aresetn),
 263:					     "Failed to get cpg aresetn\n");
 264:	
 265:		cru->vclk = devm_clk_get(dev, "video");
 266:		if (IS_ERR(cru->vclk))
 267:			return dev_err_probe(dev, PTR_ERR(cru->vclk),
 268:					     "Failed to get video clock\n");
 269:	
 270:		cru->dev = dev;
 271:		cru->info = of_device_get_match_data(dev);
 272:	
 273:		irq = platform_get_irq(pdev, 0);
 274:		if (irq < 0)
 275:			return irq;
 276:	
 277:		ret = devm_request_irq(dev, irq, cru->info->irq_handler, 0,
 278:				       KBUILD_MODNAME, cru);
 279:		if (ret)
 280:			return dev_err_probe(dev, ret, "failed to request irq\n");
 281:	
 282:		platform_set_drvdata(pdev, cru);
 283:	
 284:		ret = rzg2l_cru_dma_register(cru);
 285:		if (ret)
 286:			return ret;
 287:	
 288:		cru->num_buf = RZG2L_CRU_HW_BUFFER_DEFAULT;
 289:		pm_suspend_ignore_children(dev, true);
 290:		ret = devm_pm_runtime_enable(dev);
]

107/2 2026/08/07 16:16 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 89212
							output: 52
							thoughts: 16
						

Thoughts:
**My Thought Process for Delving Deeper into `rzg2l_cru_probe`**

Okay, my immediate impulse is to dive further into `rzg2l_cru_probe`. I want to understand what this particular component or module does at a more granular level. This isn't just a casual browse; I'm approaching this with the expectation of encountering complex, potentially novel, or highly optimized implementations given my expertise in the field. I'm anticipating that the code within `rzg2l_cru_probe` will be designed to address specific challenges or leverage particular hardware capabilities, and my goal is to decipher those intentions. I'm prepared for dense logic, intricate data structures, and potentially a reliance on deep domain knowledge to fully grasp its function. Essentially, I'm ready to roll up my sleeves and extract the core functionality, the underlying design principles, and any critical performance considerations or optimizations that are likely present. I'm not just looking for *what* it does, but *how* and *why* it does it in this particular manner.


108/2 2026/08/07 16:16 tool read-file
0m Args:
map[File:drivers/media/platform/renesas/rzg2l-cru/rzg2l-core.c FirstLine:291 LineCount:50]

Results:
map[Contents: 291:		if (ret)
 292:			goto error_dma_unregister;
 293:	
 294:		ret = rzg2l_cru_media_init(cru);
 295:		if (ret)
 296:			goto error_dma_unregister;
 297:	
 298:		return 0;
 299:	
 300:	error_dma_unregister:
 301:		rzg2l_cru_dma_unregister(cru);
 302:	
 303:		return ret;
 304:	}
 305:	
 306:	static void rzg2l_cru_remove(struct platform_device *pdev)
 307:	{
 308:		struct rzg2l_cru_dev *cru = platform_get_drvdata(pdev);
 309:	
 310:		v4l2_async_nf_unregister(&cru->notifier);
 311:		v4l2_async_nf_cleanup(&cru->notifier);
 312:	
 313:		rzg2l_cru_video_unregister(cru);
 314:		media_device_cleanup(&cru->mdev);
 315:		mutex_destroy(&cru->mdev_lock);
 316:	
 317:		rzg2l_cru_dma_unregister(cru);
 318:	}
 319:	
 320:	static const u16 rzg3e_cru_regs[] = {
 321:		[CRUnCTRL] = 0x0,
 322:		[CRUnIE] = 0x4,
 323:		[CRUnIE2] = 0x8,
 324:		[CRUnINTS] = 0xc,
 325:		[CRUnINTS2] = 0x10,
 326:		[CRUnRST] = 0x18,
 327:		[AMnMB1ADDRL] = 0x40,
 328:		[AMnMB1ADDRH] = 0x44,
 329:		[AMnMB2ADDRL] = 0x48,
 330:		[AMnMB2ADDRH] = 0x4c,
 331:		[AMnMB3ADDRL] = 0x50,
 332:		[AMnMB3ADDRH] = 0x54,
 333:		[AMnMB4ADDRL] = 0x58,
 334:		[AMnMB4ADDRH] = 0x5c,
 335:		[AMnMB5ADDRL] = 0x60,
 336:		[AMnMB5ADDRH] = 0x64,
 337:		[AMnMB6ADDRL] = 0x68,
 338:		[AMnMB6ADDRH] = 0x6c,
 339:		[AMnMB7ADDRL] = 0x70,
 340:		[AMnMB7ADDRH] = 0x74,
]

109/2 2026/08/07 16:16 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 90113
							output: 62
							thoughts: 122
						

Thoughts:
**My Thought Process Regarding `rzg2l_cru_media_init` and Subdevice Registration**

I've just encountered a rather peculiar behavior, and I need to fully understand its implications. It seems that the `rzg2l_cru_media_init` function, despite its name suggesting it initializes media-related aspects, can return a success code (0) even when a critical internal operation, `rzg2l_cru_mc_parse_of_graph`, fails. This is concerning because if `rzg2l_cru_mc_parse_of_graph` fails, it results in `cru->v4l2_dev.mdev` being set to `NULL`.

My immediate concern is the consequence of `cru->v4l2_dev.mdev` being `NULL`. If this happens, the `rzg2l_cru_probe` function, which is supposed to be the main entry point for probing the device, also returns 0, signifying success. This creates a false sense of successful initialization, which could lead to downstream errors or unexpected behavior.

The crux of my current investigation is to confirm the exact role of `rzg2l_cru_mc_parse_of_graph`. I strongly suspect it's responsible for the actual registration of subdevices within the media framework. If my suspicion is correct, then `rzg2l_cru_media_init` returning success while subdevices fail to register is a significant flaw. It means the system might proceed with a partially or entirely uninitialized media pipeline, believing everything is in order.

To resolve this, I need to meticulously examine the implementation of `rzg2l_cru_mc_parse_of_graph`. I'll be looking for the specific logic that handles subdevice parsing and registration to confirm my hypothesis and understand how this failure condition is being handled (or, more accurately, *not* being handled in a way that would propagate an error). This is critical for ensuring the robustness and correctness of the media driver.


110/2 2026/08/07 16:16 tool codesearch-definition-source
0m Error:
log-in to see details

Args:
map[ContextFile:drivers/media/platform/renesas/rzg2l-cru/rzg2l-core.c Name:rzg2l_cru_mc_parse_of_graph]

Results:
map[SourceCode: SourceFile:]

111/2 2026/08/07 16:16 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 90302
							output: 50
							thoughts: 21
						

Thoughts:
**My Thought Process on `rzg2l_cru_mc_parse_of_graph`**

Alright, the first thing that comes to my mind, the immediate impulse, is to get a handle on where exactly this `rzg2l_cru_mc_parse_of_graph` function or entity is used. My go-to for this kind of investigation is almost always `grep`. So, I'm thinking, "Okay, I need to run a `grep` command."

The specific command I'd be looking for is something along the lines of `grep -r 'rzg2l_cru_mc_parse_of_graph' .` or perhaps more targeted if I have a sense of the directory structure. The `-r` is crucial here because I want to search recursively through the entire project or relevant codebase. I'm not just looking in the current directory; I need to explore subdirectories to find every instance.

Why `grep`? Because it's the most direct and efficient way to get a raw list of all files and lines containing this specific string. It's about establishing a baseline understanding of its presence. Once I have that output, I can then begin to analyze the context.

What am I hoping to see in the `grep` output? I'm looking for:
*   **File Paths:** Which files are calling or referencing `rzg2l_cru_mc_parse_of_graph`? This tells me the modules, components, or layers that interact with it.
*   **Line Numbers:** Pinpointing the exact location within each file.
*   **Surrounding Code:** The context of the `grep` hit. Is it part of a function definition, a call site, a comment, a test case, or a configuration file? This will give me initial clues about its purpose and how it's being used.

Essentially, running `grep` is my first step in deconstructing this piece of the codebase. It's like opening up the map and marking all the locations where this particular landmark appears. From there, I can start drawing connections and understanding the broader landscape. It’s a pragmatic, low-level approach to gather the raw data before I start forming more complex hypotheses.


112/2 2026/08/07 16:16 tool grepper
0m Args:
map[Expression:rzg2l_cru_mc_parse_of_graph PathPrefix:drivers/media/platform/renesas/rzg2l-cru/]

Results:
map[Output:drivers/media/platform/renesas/rzg2l-cru/rzg2l-core.c=134=static int rzg2l_cru_mc_parse_of(struct rzg2l_cru_dev *cru)
--
drivers/media/platform/renesas/rzg2l-cru/rzg2l-core.c-179-
drivers/media/platform/renesas/rzg2l-cru/rzg2l-core.c:180:static int rzg2l_cru_mc_parse_of_graph(struct rzg2l_cru_dev *cru)
drivers/media/platform/renesas/rzg2l-cru/rzg2l-core.c-181-{
--
drivers/media/platform/renesas/rzg2l-cru/rzg2l-core.c=205=static int rzg2l_cru_media_init(struct rzg2l_cru_dev *cru)
--
drivers/media/platform/renesas/rzg2l-cru/rzg2l-core.c-230-
drivers/media/platform/renesas/rzg2l-cru/rzg2l-core.c:231:	ret = rzg2l_cru_mc_parse_of_graph(cru);
drivers/media/platform/renesas/rzg2l-cru/rzg2l-core.c-232-	if (ret) {
]

113/2 2026/08/07 16:16 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 90722
							output: 52
							thoughts: 20
						

Thoughts:
**My Thought Process on `rzg2l_cru_mc_parse_of_graph`**

Alright, diving into `rzg2l_cru_mc_parse_of_graph`. My immediate inclination is to get a high-level understanding of its purpose. What problem is this function designed to solve? Given the name, "parse\_of\_graph," I'm strongly suspecting it's about taking some form of graph representation and transforming it, likely into a more usable internal data structure or perhaps extracting specific information from it. The "mc" in the name might hint at a specific context – perhaps related to memory controllers or some form of communication management within the "rzg2l" system. "cru" is less immediately obvious, but could be an abbreviation for a particular module or component.

My next step is to examine the function signature. What are its inputs? What does it return? This will give me concrete clues about the data it operates on and the output it produces. I'll be looking for:

*   **Input parameters:** Are they pointers to data structures, raw data buffers, or specific configuration values? What types are they? Understanding the types will inform me about the *format* of the graph data being parsed. Is it an adjacency list, an adjacency matrix, a custom serialized format, or something else?
*   **Return value:** Is it a success/failure code, a pointer to a newly created data structure, or perhaps a set of extracted metrics? The return type will tell me what I gain from calling this function.

Once I have the signature, I'll then proceed to the function's implementation. Here's where I'll be looking for the core logic:

*   **Initialization:** What state does the function set up? Are there any local variables or data structures being allocated or initialized?
*   **Core parsing logic:** How does it iterate through the input graph representation? Is it using a specific algorithm (e.g., depth-first search, breadth-first search, or a custom traversal)? I'll be paying close attention to how it identifies nodes, edges, and any associated attributes.
*   **Data transformation/extraction:** What is it doing with the parsed graph information? Is it building a new graph representation, extracting connectivity information, calculating properties of the graph (like reachability or dependencies), or something else? The way it manipulates the data will reveal its ultimate purpose.
*   **Error handling:** How does it deal with invalid input or unexpected graph structures? Are there checks for malformed data, out-of-bounds accesses, or other potential issues? Robust error handling is crucial for understanding the function's reliability.
*   **Resource management:** Does it allocate memory that needs to be freed? Does it interact with any global resources that might have specific lifecycle requirements?

My ultimate goal is to understand the *semantics* of this parsing operation. Not just *how* it does it, but *why*. What is the intended use of the parsed graph data? Is it for configuration, analysis, simulation, or some form of runtime control? Understanding the context in which `rzg2l_cru_mc_parse_of_graph` is called will be key to fully appreciating its role within the larger system.


114/2 2026/08/07 16:17 tool read-file
0m Args:
map[File:drivers/media/platform/renesas/rzg2l-cru/rzg2l-core.c FirstLine:180 LineCount:25]

Results:
map[Contents: 180:	static int rzg2l_cru_mc_parse_of_graph(struct rzg2l_cru_dev *cru)
 181:	{
 182:		int ret;
 183:	
 184:		v4l2_async_nf_init(&cru->notifier, &cru->v4l2_dev);
 185:	
 186:		ret = rzg2l_cru_mc_parse_of(cru);
 187:		if (ret)
 188:			return ret;
 189:	
 190:		cru->notifier.ops = &rzg2l_cru_async_ops;
 191:	
 192:		if (list_empty(&cru->notifier.waiting_list))
 193:			return 0;
 194:	
 195:		ret = v4l2_async_nf_register(&cru->notifier);
 196:		if (ret < 0) {
 197:			dev_err(cru->dev, "Notifier registration failed\n");
 198:			v4l2_async_nf_cleanup(&cru->notifier);
 199:			return ret;
 200:		}
 201:	
 202:		return 0;
 203:	}
 204:	
]

115/2 2026/08/07 16:17 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 91148
							output: 61
							thoughts: 92
						

Thoughts:
**My Thought Process Unpacking the Crucial Initialization Flow**

Okay, so my initial thought process here is really about dissecting the dependencies and failure paths within this driver code, specifically around the initialization of the async notifier and its subsequent impact on the V4L2 device.

I'm looking at `rzg2l_cru_mc_parse_of_graph`, and the first thing that jumps out at me is that it *initializes the async notifier*. This is a critical piece of infrastructure, so I immediately focus on what happens if this initialization *fails*. The comment clearly states that in the event of failure, `cru->v4l2_dev.mdev` is set to `NULL`. This is a significant consequence, implying that the entire media device registration will be aborted if the async notifier can't be set up.

But then, a quick mental check or a glance at the code leads me to `rzg2l_cru_ip_subdev_register`. My internal dialogue goes, "Hold on a second, if `rzg2l_cru_mc_parse_of_graph` is responsible for the async notifier, then what's the purpose of `rzg2l_cru_ip_subdev_register`?" I recognize that registration is typically a separate step, often dependent on prior successful initialization. So, my next logical step, driven by this question, is to dive *directly* into the implementation of `rzg2l_cru_ip_subdev_register`. I need to understand its role, what it expects as prerequisites, and how it interacts with or is affected by the outcome of the async notifier initialization. This is crucial for verifying my understanding of the control flow and potential error propagation.


116/2 2026/08/07 16:17 tool codesearch-definition-source
0m Error:
log-in to see details

Args:
map[ContextFile:drivers/media/platform/renesas/rzg2l-cru/rzg2l-ip.c Name:rzg2l_cru_ip_subdev_register]

Results:
map[SourceCode: SourceFile:]

117/2 2026/08/07 16:17 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 91306
							output: 49
							thoughts: 20
						

Thoughts:
**My Thought Process on `rzg2l_cru_ip_subdev_register`**

Ah, I need to get a handle on where and how this `rzg2l_cru_ip_subdev_register` function is being utilized. My immediate instinct is to leverage `grep`. It's the most direct way to scan through my codebase and pinpoint every instance of this specific identifier. I'm looking for its declaration, its calls, and any context surrounding its use. This will give me a foundational understanding of its role within the RZG2L platform's IP subdevice registration mechanism.


118/2 2026/08/07 16:17 tool grepper
0m Args:
map[Expression:rzg2l_cru_ip_subdev_register PathPrefix:drivers/media/platform/renesas/rzg2l-cru/]

Results:
map[Output:drivers/media/platform/renesas/rzg2l-cru/rzg2l-core.c=39=static int rzg2l_cru_group_notify_complete(struct v4l2_async_notifier *notifier)
--
drivers/media/platform/renesas/rzg2l-cru/rzg2l-core.c-44-
drivers/media/platform/renesas/rzg2l-cru/rzg2l-core.c:45:	ret = rzg2l_cru_ip_subdev_register(cru);
drivers/media/platform/renesas/rzg2l-cru/rzg2l-core.c-46-	if (ret)
--
drivers/media/platform/renesas/rzg2l-cru/rzg2l-cru.h=178=const struct v4l2_format_info *rzg2l_cru_format_from_pixel(u32 format);
drivers/media/platform/renesas/rzg2l-cru/rzg2l-cru.h-179-
drivers/media/platform/renesas/rzg2l-cru/rzg2l-cru.h:180:int rzg2l_cru_ip_subdev_register(struct rzg2l_cru_dev *cru);
drivers/media/platform/renesas/rzg2l-cru/rzg2l-cru.h-181-void rzg2l_cru_ip_subdev_unregister(struct rzg2l_cru_dev *cru);
--
drivers/media/platform/renesas/rzg2l-cru/rzg2l-ip.c=326=static const struct media_entity_operations rzg2l_cru_ip_entity_ops = {
--
drivers/media/platform/renesas/rzg2l-cru/rzg2l-ip.c-329-
drivers/media/platform/renesas/rzg2l-cru/rzg2l-ip.c:330:int rzg2l_cru_ip_subdev_register(struct rzg2l_cru_dev *cru)
drivers/media/platform/renesas/rzg2l-cru/rzg2l-ip.c-331-{
]

119/2 2026/08/07 16:17 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 91918
							output: 52
							thoughts: 19
						

Thoughts:
**My Thought Process on `rzg2l_cru_ip_subdev_register`**

Right, I need to get a handle on what's happening within `rzg2l_cru_ip_subdev_register`. My initial approach is to break down the function's purpose and then delve into its implementation details, focusing on how it integrates the IP subdevice into the broader driver framework.

First, I'm asking myself: **What is the core responsibility of this function?** Given the name, it's clearly about registering an "IP subdevice" for the "rzg2l" platform. This implies it's a crucial step in initializing and making a specific hardware component (the "IP subdevice") available to the system through the Renesas RZG2L driver infrastructure. I'm assuming "IP" here refers to a specific functional block or peripheral within the RZG2L SoC. The "subdev" part suggests it's a component managed by a larger driver, likely the main RZG2L driver or a related framework.

Next, I'm going to be looking for **how it achieves this registration**. This will involve scrutinizing the function's parameters. What information is it being passed? Is it receiving a pointer to the device, a configuration structure, or perhaps identifiers? Understanding these inputs will tell me what data the function uses to perform its task. I'll be particularly interested in any data structures that define the characteristics or capabilities of the IP subdevice being registered.

Then, I'll be zeroing in on the **API calls it makes**. This is where the actual registration "happens." I expect to see calls to underlying kernel subsystems or specific RZG2L driver framework APIs. Is it using a generic device registration mechanism? Is there a specialized RZG2L API for registering these IP subdevices? I'll be looking for functions that likely involve:

*   **Resource allocation:** Does it need to allocate memory or other resources for the subdevice?
*   **Information propagation:** How does it inform the rest of the system about this new subdevice? This might involve populating device trees, registering interrupt handlers, or creating specific device nodes.
*   **State management:** Is it initializing any internal state for this subdevice?

I'll also be paying close attention to **error handling**. What are the potential failure points? How does the function report errors back to the caller? This is vital for understanding the robustness of the registration process and for debugging potential issues. I'll be looking for return codes and any specific error paths.

Furthermore, I'm considering the **context within the RZG2L driver model**. Where does this function fit in the overall initialization sequence? Is it called during probe? Is it part of a larger initialization routine for the RZG2L SoC? Understanding its place in the sequence will give me a better appreciation of its dependencies and its role in enabling specific hardware functionality.

Finally, I'll be thinking about the **implications of a successful registration**. What does it mean for the system once this function returns successfully? What new capabilities are now available? What other parts of the driver or kernel can now interact with this IP subdevice? This backward-thinking approach helps solidify my understanding of the function's importance.

In essence, my thought process is a systematic dissection: understanding the *what*, the *how*, the *when*, and the *why* of `rzg2l_cru_ip_subdev_register` within its specific driver context, always keeping in mind the practical implications for the RZG2L platform.


120/2 2026/08/07 16:17 tool read-file
0m Args:
map[File:drivers/media/platform/renesas/rzg2l-cru/rzg2l-ip.c FirstLine:330 LineCount:40]

Results:
map[Contents: 330:	int rzg2l_cru_ip_subdev_register(struct rzg2l_cru_dev *cru)
 331:	{
 332:		struct rzg2l_cru_ip *ip = &cru->ip;
 333:		int ret;
 334:	
 335:		ip->subdev.dev = cru->dev;
 336:		v4l2_subdev_init(&ip->subdev, &rzg2l_cru_ip_subdev_ops);
 337:		ip->subdev.internal_ops = &rzg2l_cru_ip_internal_ops;
 338:		v4l2_set_subdevdata(&ip->subdev, cru);
 339:		snprintf(ip->subdev.name, sizeof(ip->subdev.name),
 340:			 "cru-ip-%s", dev_name(cru->dev));
 341:		ip->subdev.flags = V4L2_SUBDEV_FL_HAS_DEVNODE;
 342:	
 343:		ip->subdev.entity.function = MEDIA_ENT_F_PROC_VIDEO_PIXEL_FORMATTER;
 344:		ip->subdev.entity.ops = &rzg2l_cru_ip_entity_ops;
 345:	
 346:		ip->pads[RZG2L_CRU_IP_SINK].flags = MEDIA_PAD_FL_SINK |
 347:						    MEDIA_PAD_FL_MUST_CONNECT;
 348:		ip->pads[RZG2L_CRU_IP_SOURCE].flags = MEDIA_PAD_FL_SOURCE |
 349:						      MEDIA_PAD_FL_MUST_CONNECT;
 350:	
 351:		ret = media_entity_pads_init(&ip->subdev.entity, 2, ip->pads);
 352:		if (ret)
 353:			return ret;
 354:	
 355:		ret = v4l2_subdev_init_finalize(&ip->subdev);
 356:		if (ret < 0)
 357:			goto entity_cleanup;
 358:	
 359:		ret = v4l2_device_register_subdev(&cru->v4l2_dev, &ip->subdev);
 360:		if (ret < 0)
 361:			goto error_subdev;
 362:	
 363:		return 0;
 364:	error_subdev:
 365:		v4l2_subdev_cleanup(&ip->subdev);
 366:	entity_cleanup:
 367:		media_entity_cleanup(&ip->subdev.entity);
 368:	
 369:		return ret;
]

121/2 2026/08/07 16:17 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 92724
							output: 58
							thoughts: 173
						

Thoughts:
**My Thought Process Regarding the Driver's Safety**

Initially, I'm struck by the call chain. I notice that `rzg2l_cru_ip_subdev_register` is being invoked from within `rzg2l_cru_group_notify_complete`. This immediately flags `rzg2l_cru_group_notify_complete` as the asynchronous notifier's completion callback.

My next thought is to scrutinize the error handling path. I observe that if `rzg2l_cru_mc_parse_of_graph` encounters an error, `cru->v4l2_dev.mdev` is set to NULL. This is a critical observation.

Then, the pieces click together: if `rzg2l_cru_mc_parse_of_graph` fails, the asynchronous notifier is *never* registered in the first place. This means its completion callback, `rzg2l_cru_group_notify_complete`, will *never* be invoked. Consequently, the function that's called from within that callback, `rzg2l_cru_ip_subdev_register`, will also *never* be called.

Therefore, my conclusion is that this particular driver is inherently safe from the potential issues that could arise from `rzg2l_cru_ip_subdev_register` being called under those specific failure conditions.

With that assurance for the rzg2l driver, I now shift my attention to a different area, specifically `sun4i_csi_notify_complete`, to apply a similar line of reasoning and ensure its robustness.


122/2 2026/08/07 16:17 tool codesearch-definition-source
0m Error:
log-in to see details

Args:
map[ContextFile:drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c Name:sun4i_csi_notify_complete]

Results:
map[SourceCode: SourceFile:]

123/2 2026/08/07 16:17 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 92960
							output: 46
							thoughts: 17
						

Thoughts:
**My Thought Process on `sun4i_csi_notify_complete`**

Alright, so the immediate impulse is to figure out what `sun4i_csi_notify_complete` is doing. My first instinct is to reach for `grep`, the go-to tool for quickly scanning codebases. I'm not just looking for a single instance; I want to see the full context of its usage. This means I'll be looking for all the places it's called, and crucially, where it's defined. Understanding the call sites will tell me *who* is triggering this notification, and seeing its definition will reveal *what* it's actually doing – what actions it initiates or what state changes it represents. My goal is to build a mental map of its lifecycle and its role within the `sun4i_csi` subsystem.


124/2 2026/08/07 16:18 tool grepper
0m Args:
map[Expression:sun4i_csi_notify_complete PathPrefix:drivers/media/platform/sunxi/sun4i-csi/]

Results:
map[Output:drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c=53=static int sun4i_csi_notify_bound(struct v4l2_async_notifier *notifier,
--
drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c-73-
drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c:74:static int sun4i_csi_notify_complete(struct v4l2_async_notifier *notifier)
drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c-75-{
--
drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c=121=static const struct v4l2_async_notifier_operations sun4i_csi_notify_ops = {
drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c-122-	.bound		= sun4i_csi_notify_bound,
drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c:123:	.complete	= sun4i_csi_notify_complete,
drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c-124-};
]

125/2 2026/08/07 16:18 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 93367
							output: 51
							thoughts: 16
						

Thoughts:
**My Thought Process on `sun4i_csi_notify_complete`**

Alright, diving into `sun4i_csi_notify_complete`. The name itself tells me this is about signaling the successful completion of a CSI (Camera Serial Interface) operation on a sun4i platform. Given my expertise, I'm immediately looking for the mechanisms that allow a hardware component (the CSI controller) to communicate its state, specifically a "done" signal, back to the software.

My initial expectation is that this function will likely be a callback or an interrupt handler. It's the logical endpoint for a CSI transfer. So, the first thing I'll be scrutinizing is how it's triggered. Is it via an interrupt? If so, I'll be checking the interrupt handling setup – the `request_irq` calls, the interrupt service routine (ISR) registration, and how this `sun4i_csi_notify_complete` function is linked to that interrupt. Or is it a polling mechanism? While less common for this kind of hardware notification, I'll keep it in mind.

From a functional perspective, what does "complete" mean in the context of a CSI controller? It's not just about the hardware stopping. It implies data has been captured, processed (at least to some extent by the hardware), and is ready for consumption by the rest of the system. Therefore, I'm anticipating this function will be responsible for several key actions:

1.  **Acknowledging the interrupt/completion:** The hardware needs to know its signal has been received and processed. This might involve writing to a specific status register in the CSI controller to clear the interrupt flag.
2.  **Data availability notification:** The most crucial aspect. How does this function tell the higher-level software (likely the video driver or buffer management system) that new image data is ready? This could involve waking up a waiting process, signaling a semaphore, or directly calling another driver function to handle the data.
3.  **Buffer management:** If the CSI controller is operating in a DMA (Direct Memory Access) mode, it's almost certainly using buffers. This function will need to know *which* buffer has been filled. It will likely involve tracking the buffer that was allocated for the completed frame or scanline. My expectation is that it will update some internal state to mark that buffer as "filled" and potentially make it available for the application.
4.  **Queue management:** CSI interfaces often deal with streaming data. So, there's likely a queue of buffers. This function will probably dequeue the completed buffer, mark it as filled, and enqueue it into a "ready" or "filled" queue for the application to process. Conversely, it might also be responsible for fetching the *next* available buffer from the application's pool to prepare for the subsequent capture.
5.  **Error handling (potentially):** While the name suggests success, I'll be looking for any checks for error conditions that might have occurred *during* the capture. If an error occurred, this function might need to signal that instead of success, or perhaps clean up resources associated with the failed transfer.
6.  **Power management/state updates:** Depending on the driver's sophistication, this completion notification might also be used to update power management states. For example, if the CSI was only active during capture, it might signal that it's okay to go back to a lower power state.

Essentially, `sun4i_csi_notify_complete` acts as the bridge between the hardware's low-level, event-driven nature and the software's structured approach to data handling. It’s the point where raw hardware events are translated into meaningful information for the rest of the system to use. My focus will be on understanding the exact sequence of operations, the register manipulations, and the software synchronization primitives employed to achieve this transition reliably and efficiently.


126/2 2026/08/07 16:18 tool read-file
0m Args:
map[File:drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c FirstLine:74 LineCount:40]

Results:
map[Contents:  74:	static int sun4i_csi_notify_complete(struct v4l2_async_notifier *notifier)
  75:	{
  76:		struct sun4i_csi *csi = container_of(notifier, struct sun4i_csi,
  77:						     notifier);
  78:		struct v4l2_subdev *subdev = &csi->subdev;
  79:		struct video_device *vdev = &csi->vdev;
  80:		int ret;
  81:	
  82:		ret = v4l2_device_register_subdev(&csi->v4l, subdev);
  83:		if (ret < 0)
  84:			return ret;
  85:	
  86:		ret = sun4i_csi_v4l2_register(csi);
  87:		if (ret < 0)
  88:			return ret;
  89:	
  90:		ret = media_device_register(&csi->mdev);
  91:		if (ret)
  92:			return ret;
  93:	
  94:		/* Create link from subdev to main device */
  95:		ret = media_create_pad_link(&subdev->entity, CSI_SUBDEV_SOURCE,
  96:					    &vdev->entity, 0,
  97:					    MEDIA_LNK_FL_ENABLED |
  98:					    MEDIA_LNK_FL_IMMUTABLE);
  99:		if (ret)
 100:			goto err_clean_media;
 101:	
 102:		ret = media_create_pad_link(&csi->src_subdev->entity, csi->src_pad,
 103:					    &subdev->entity, CSI_SUBDEV_SINK,
 104:					    MEDIA_LNK_FL_ENABLED |
 105:					    MEDIA_LNK_FL_IMMUTABLE);
 106:		if (ret)
 107:			goto err_clean_media;
 108:	
 109:		ret = v4l2_device_register_subdev_nodes(&csi->v4l);
 110:		if (ret < 0)
 111:			goto err_clean_media;
 112:	
 113:		return 0;
]

127/2 2026/08/07 16:18 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 94051
							output: 56
							thoughts: 145
						

Thoughts:
**My Thought Process Unraveling `sun4i_csi_notify_complete` and its Dependencies**

Okay, I'm looking at the `sun4i_csi_notify_complete` function and I'm seeing it perform some registrations. Specifically, it calls `v4l2_device_register_subdev`, then `sun4i_csi_v4l2_register`, and finally `media_device_register`. This all seems like standard V4L2 and media framework setup.

However, a specific detail is catching my eye: `media_device_register(&csi->mdev)`. My immediate thought is, "Where is `csi->mdev` initialized or set up?" I know that a `media_device` structure typically needs to be associated with a `media_controller` or something similar to be properly registered. The function signature implies `csi` is a pointer to some CSI (Camera Serial Interface) structure.

My instinct is to trace back the origin of `csi->mdev`. The most logical place for this initialization would be within the probe function of the CSI driver, which is where hardware is typically discovered and initialized. So, my next step is to go and examine the `sun4i_csi_probe` function to see how `csi->mdev` is being populated and prepared before `sun4i_csi_notify_complete` is called. I'm expecting to find the initialization of the `media_device` structure, likely assigning it to `csi->mdev` and potentially setting up its relationships with other media entities.


128/2 2026/08/07 16:18 tool codesearch-definition-source
0m Error:
log-in to see details

Args:
map[ContextFile:drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c Name:sun4i_csi_probe]

Results:
map[SourceCode: SourceFile:]

129/2 2026/08/07 16:18 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 94257
							output: 44
							thoughts: 15
						

Thoughts:
**My Thought Process on Locating the CSI Probe Functionality**

My immediate impulse is to pinpoint the exact location within the codebase where the CSI (Camera Serial Interface) probe function for the `sun4i` architecture is implemented. To do this, I'd leverage a powerful command-line utility, `grep`, to perform a literal search for the function name, `sun4i_csi_probe`. This is my standard and most efficient approach for quickly identifying the source file and line number where a specific function is defined or called. I'm not looking for anything more nuanced at this stage; I simply need to know *where* this particular piece of code resides so I can then delve into its logic.


130/2 2026/08/07 16:18 tool grepper
0m Args:
map[Expression:sun4i_csi_probe PathPrefix:drivers/media/platform/sunxi/sun4i-csi/]

Results:
map[Output:drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c=126=static int sun4i_csi_notifier_init(struct sun4i_csi *csi)
--
drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c-161-
drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c:162:static int sun4i_csi_probe(struct platform_device *pdev)
drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c-163-{
--
drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c=341=static struct platform_driver sun4i_csi_driver = {
drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c:342:	.probe	= sun4i_csi_probe,
drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c-343-	.remove = sun4i_csi_remove,
]

131/2 2026/08/07 16:18 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 94611
							output: 52
							thoughts: 14
						

Thoughts:
**My Thought Process on `sun4i_csi_probe`**

Alright, so my immediate thought is: I need to dive into the `sun4i_csi_probe` function. This is clearly the entry point for initializing the CSI (Camera Serial Interface) driver on a Sun4i-based system. My primary objective here is to understand the entire initialization sequence, from the very moment the driver is loaded and recognized by the kernel, all the way to the point where it's ready to accept camera data.

I'm anticipating a fairly standard probe sequence, but with specific hardware interactions relevant to the Sun4i architecture. So, I'll be looking for:

*   **Device Identification and Resource Allocation:** The first thing this probe function must do is identify the specific CSI device it's dealing with and then acquire the necessary hardware resources. This will involve looking at how it accesses the device tree to get compatible strings, memory-mapped I/O (MMIO) regions, interrupt lines, and any other platform-specific resources. I'm particularly interested in how it handles multiple CSI devices if the hardware supports that.
*   **Clock and Power Management:** Cameras are power-hungry. I'll be scrutinizing how the driver enables and configures the necessary clocks for the CSI controller and potentially any associated ISP (Image Signal Processor) or sensor interfaces. Similarly, I'll be checking for any power domain management it initiates to ensure the hardware is powered up correctly.
*   **Register Initialization:** This is where the rubber meets the road. I expect to see a significant portion of the probe function dedicated to writing specific values to the CSI hardware registers. This will likely involve configuring things like:
    *   **Data Interface:** Setting up the bus width, pixel format, and timing parameters to match the connected camera sensor.
    *   **DMA Controller:** Configuring the DMA channels for efficient data transfer from the CSI to memory. I'll be looking for how it allocates and sets up DMA descriptors.
    *   **Interrupt Handling:** Registering the interrupt handler and configuring the interrupt controller to signal when data is ready or an error occurs.
    *   **General Control Registers:** Enabling the CSI controller, setting up frame buffering, and perhaps configuring various operating modes.
*   **Subsystem Integration:** The CSI driver doesn't operate in a vacuum. I need to see how it registers itself with the broader media subsystem in the Linux kernel. This will involve creating a `v4l2_subdev` or similar structure and populating it with the necessary operations (like `s_stream`, `g_fmt`, etc.) that other parts of the media pipeline will use to control the CSI.
*   **Sensor Discovery and Configuration (Potentially):** While the probe function primarily deals with the CSI *controller*, it's possible it might attempt some rudimentary interaction with the connected camera sensor to identify it or perform initial configuration. I'll be looking for any I2C or other bus accesses that might suggest this. If it doesn't do this, I know that sensor-specific probing will happen in a separate driver.
*   **Error Handling:** Throughout this process, robust error handling is critical. I'll be paying close attention to how the driver checks return codes from API calls, frees up resources on failure, and logs appropriate error messages. This is crucial for debugging and understanding potential points of failure during boot or runtime.

Essentially, `sun4i_csi_probe` is my roadmap to understanding the initial setup of the camera interface hardware. I'm looking for a clear, logical flow that demonstrates mastery of the Sun4i's specific CSI IP and its integration into the Linux media framework. I expect it to be a well-structured function, and my goal is to dissect each part to fully grasp its contribution to the overall driver functionality.


132/2 2026/08/07 16:18 tool read-file
0m Args:
map[File:drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c FirstLine:162 LineCount:50]

Results:
map[Contents: 162:	static int sun4i_csi_probe(struct platform_device *pdev)
 163:	{
 164:		struct v4l2_subdev *subdev;
 165:		struct video_device *vdev;
 166:		struct sun4i_csi *csi;
 167:		int ret;
 168:		int irq;
 169:	
 170:		csi = devm_kzalloc(&pdev->dev, sizeof(*csi), GFP_KERNEL);
 171:		if (!csi)
 172:			return -ENOMEM;
 173:		platform_set_drvdata(pdev, csi);
 174:		csi->dev = &pdev->dev;
 175:		subdev = &csi->subdev;
 176:		vdev = &csi->vdev;
 177:	
 178:		csi->traits = of_device_get_match_data(&pdev->dev);
 179:		if (!csi->traits)
 180:			return -EINVAL;
 181:	
 182:		csi->mdev.dev = csi->dev;
 183:		strscpy(csi->mdev.model, "Allwinner Video Capture Device",
 184:			sizeof(csi->mdev.model));
 185:		csi->mdev.hw_revision = 0;
 186:		media_device_init(&csi->mdev);
 187:		csi->v4l.mdev = &csi->mdev;
 188:	
 189:		csi->regs = devm_platform_ioremap_resource(pdev, 0);
 190:		if (IS_ERR(csi->regs))
 191:			return PTR_ERR(csi->regs);
 192:	
 193:		irq = platform_get_irq(pdev, 0);
 194:		if (irq < 0)
 195:			return irq;
 196:	
 197:		csi->bus_clk = devm_clk_get(&pdev->dev, "bus");
 198:		if (IS_ERR(csi->bus_clk)) {
 199:			dev_err(&pdev->dev, "Couldn't get our bus clock\n");
 200:			return PTR_ERR(csi->bus_clk);
 201:		}
 202:	
 203:		if (csi->traits->has_isp) {
 204:			csi->isp_clk = devm_clk_get(&pdev->dev, "isp");
 205:			if (IS_ERR(csi->isp_clk)) {
 206:				dev_err(&pdev->dev, "Couldn't get our ISP clock\n");
 207:				return PTR_ERR(csi->isp_clk);
 208:			}
 209:		}
 210:	
 211:		csi->ram_clk = devm_clk_get(&pdev->dev, "ram");
]

133/2 2026/08/07 16:18 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 95519
							output: 54
							thoughts: 264
						

Thoughts:
**A Deep Dive into `v4l2_device_register_subdev` and its Implications**

My initial thought process focused on the safety of the `sun4i_csi_probe` function, specifically the ordering of operations. I noted that `csi->v4l.mdev = &csi->mdev;` is executed *before* `v4l2_device_register_subdev`. This specific sequence led me to conclude that the `sun4i` driver was, at first glance, safe from potential issues related to this ordering.

However, a more critical examination quickly led me to a crucial "what if" scenario: what happens if `media_device_register_entity` fails during the registration process? My understanding is that if `media_device_register_entity` encounters an error, the `__v4l2_device_register_subdev` function will return an error. Crucially, this means the subdevice will *not* be added to the `subdevs` list. Consequently, `__v4l2_device_register_subdev_nodes` would not be able to find or process this subdevice, which could lead to unexpected behavior or incomplete device initialization.

This raised a broader question in my mind: are there any drivers that deviate from the standard registration flow? Specifically, I began to ponder if any driver might call `v4l2_device_register_subdev_nodes` on a `v4l2_device` that has subdevs added manually, or where the `mdev` member is set *after* `v4l2_device_register_subdev` has already been called. This would represent a deviation from the expected, and potentially fragile, initialization order.

To answer this, I decided to re-examine the callers of `v4l2_device_register_subdev`. My investigation led me to a significant finding: `v4l2_async_register_subdev` is a widely used function by numerous drivers. This observation prompted me to delve deeper into the implementation and behavior of `v4l2_async_register_subdev`, as it represents a key area where the standard registration flow might be exercised or potentially circumvented, requiring further scrutiny.


134/2 2026/08/07 16:18 tool codesearch-definition-source
0m Error:
log-in to see details

Args:
map[ContextFile:drivers/media/v4l2-core/v4l2-async.c Name:v4l2_async_register_subdev]

Results:
map[SourceCode: SourceFile:]

135/2 2026/08/07 16:18 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 95842
							output: 42
							thoughts: 18
						

Thoughts:
**My Thought Process on Identifying and Addressing the `v4l2_async_register_subdev` Pattern**

Right, so, the immediate thought when presented with this kind of situation – where a specific function call like `v4l2_async_register_subdev` is highlighted – is to understand its *context* and *implications*. My internal grep, if you will, immediately flags this as a critical junction point in the V4L2 asynchronous subdevice framework.

My first instinct is to perform a mental, or actual, `grep` (or its equivalent in my internal knowledge base) for `v4l2_async_register_subdev`. This isn't just about finding occurrences; it's about understanding *where* this function is being invoked and, more importantly, *why*. I'm looking for the patterns of its usage:

*   **Initialization Flows:** Where does `v4l2_async_register_subdev` fit into the overall device or driver initialization sequence? Is it called early on, during platform device probing, or later in response to specific events? I'd be scrutinizing the `probe` functions of various V4L2 drivers that deal with asynchronous subdevices.
*   **Subdevice Dependencies:** This function is the cornerstone of how subdevices announce their presence and capabilities to the V4L2 core in an asynchronous manner. My analysis would focus on how this registration informs the framework about the subdevice's identity, its parent entity (if any), and its media bus connections.
*   **Error Handling and Robustness:** What happens if `v4l2_async_register_subdev` fails? I'd be paying close attention to the error handling code surrounding its invocation. Does the driver correctly unwind its resources? Are there any subtle race conditions that could arise from a partial registration or a failure to register?
*   **Integration with the Media Framework:** I'm also thinking about how this registration bridges the gap between the V4L2 subsystem and the Linux Media framework. This function is instrumental in populating the `struct media_device` and its associated entities. I'd be examining how the information passed to `v4l2_async_register_subdev` (like device names, pad configurations, etc.) is then used by the media controller.
*   **Asynchronous Nature:** The "async" in the function name is key. I'm considering the implications for device enumeration and interaction. How does this asynchronous registration mechanism allow for devices to be discovered and connected in an order that's not strictly dictated by the hardware bus? This implies a need for mechanisms to wait for subdevices to become available, which likely involves other parts of the V4L2 async framework.
*   **Potential for Common Issues:** As an expert, I'm always on the lookout for recurring problems. With a function like this, I'd anticipate potential issues around:
    *   **Incorrectly specifying device links:** Misconfigured `struct v4l2_async_subdev` fields that describe connections between subdevices.
    *   **Resource leaks:** If the registration fails after some resources have been allocated but before registration is complete.
    *   **Missing subdevices:** Drivers that fail to register all their necessary subdevices.
    *   **Naming conflicts:** Although less common with proper use, I'd keep it in mind.

Essentially, my thought process involves dissecting the function's role within the broader V4L2 and Media framework, understanding its inputs and outputs, tracing its execution paths, and anticipating potential failure modes or areas where improper usage could lead to bugs. It's about connecting this single function call to the entire lifecycle and operational logic of asynchronous V4L2 subdevices.


136/2 2026/08/07 16:18 tool grepper
0m Args:
map[Expression:v4l2_async_register_subdev PathPrefix:drivers/media/v4l2-core/]

Results:
map[Output:drivers/media/v4l2-core/v4l2-async.c=803=EXPORT_SYMBOL_GPL(v4l2_async_connection_unique);
drivers/media/v4l2-core/v4l2-async.c-804-
drivers/media/v4l2-core/v4l2-async.c:805:int __v4l2_async_register_subdev(struct v4l2_subdev *sd, struct module *module)
drivers/media/v4l2-core/v4l2-async.c-806-{
--
drivers/media/v4l2-core/v4l2-async.c-881-}
drivers/media/v4l2-core/v4l2-async.c:882:EXPORT_SYMBOL(__v4l2_async_register_subdev);
drivers/media/v4l2-core/v4l2-async.c-883-
--
drivers/media/v4l2-core/v4l2-flash-led-class.c=652=static struct v4l2_flash *__v4l2_flash_init(
--
drivers/media/v4l2-core/v4l2-flash-led-class.c-690-
drivers/media/v4l2-core/v4l2-flash-led-class.c:691:	ret = v4l2_async_register_subdev(sd);
drivers/media/v4l2-core/v4l2-flash-led-class.c-692-	if (ret < 0)
--
drivers/media/v4l2-core/v4l2-fwnode.c=1227=v4l2_async_nf_parse_fwnode_sensor(struct device *dev,
--
drivers/media/v4l2-core/v4l2-fwnode.c-1258-
drivers/media/v4l2-core/v4l2-fwnode.c:1259:int __v4l2_async_register_subdev_sensor(struct v4l2_subdev *sd, struct module *module)
drivers/media/v4l2-core/v4l2-fwnode.c-1260-{
--
drivers/media/v4l2-core/v4l2-fwnode.c-1284-
drivers/media/v4l2-core/v4l2-fwnode.c:1285:	ret = __v4l2_async_register_subdev(sd, module);
drivers/media/v4l2-core/v4l2-fwnode.c-1286-	if (ret < 0)
--
drivers/media/v4l2-core/v4l2-fwnode.c-1302-}
drivers/media/v4l2-core/v4l2-fwnode.c:1303:EXPORT_SYMBOL_GPL(__v4l2_async_register_subdev_sensor);
drivers/media/v4l2-core/v4l2-fwnode.c-1304-
]

137/2 2026/08/07 16:19 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 96694
							output: 55
							thoughts: 18
						

Thoughts:
**My Thought Process on `__v4l2_async_register_subdev`**

Ah, so I'm looking at `__v4l2_async_register_subdev`. My immediate inclination is to understand its role within the broader V4L2 asynchronous subsystem. I'm an expert in this domain, so I'm not just trying to grasp the function's syntax; I'm evaluating its implications for device discovery, enumeration, and ultimately, how it contributes to the dynamic management of video devices.

My mental model of the V4L2 subsystem involves a central controller orchestrating various sub-devices. This function, `__v4l2_async_register_subdev`, feels like a critical piece of that orchestration – a point where a newly identified or initialized sub-device announces its presence to the system. I'm anticipating that it's responsible for adding this sub-device to some kind of internal registry or list managed by the asynchronous framework.

Beyond simple registration, I'm curious about the parameters it takes. What information is being passed in? Is it just a pointer to the sub-device structure itself, or are there other vital details like device IDs, capabilities, or even hooks for later communication? I need to understand what data the system *needs* to know about a sub-device at the point of its registration to effectively manage it.

Furthermore, I'm considering the *consequences* of this registration. Does it immediately trigger any probing or connection attempts with other sub-devices? Or is it a more passive registration, with connections being established later based on explicit configuration or discovery rules? The "async" in the name suggests a deliberate separation of concerns, so I'm leaning towards the latter, but I need to confirm.

I'm also thinking about error handling. What happens if the registration fails? Does it return an error code? Are there any rollback mechanisms? As an expert, I'm always mindful of robustness and how the system recovers from unexpected situations.

Finally, I'm mentally tracing the call stack. Where is `__v4l2_async_register_subdev` typically called from? Is it during driver initialization, or perhaps as part of a hotplugging event? This context will further illuminate its purpose and importance in the V4L2 device lifecycle. Essentially, I'm dissecting this function to understand its precise place and impact on the V4L2 asynchronous device graph.


138/2 2026/08/07 16:19 tool codesearch-definition-source
0m Error:
log-in to see details

Args:
map[ContextFile:drivers/media/v4l2-core/v4l2-async.c Name:__v4l2_async_register_subdev]

Results:
map[SourceCode: SourceFile:]

139/2 2026/08/07 16:19 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 96772
							output: 47
							thoughts: 47
						

Thoughts:
**My Thought Process Regarding `__v4l2_async_register_subdev`**

Ah, so the puzzle piece clicks into place! I was pondering the asynchronous registration of sub-devices within the Video4Linux2 framework, and I've pinpointed the exact function responsible: `__v4l2_async_register_subdev`. My immediate inclination is to dive into its implementation, specifically within the `drivers/media/v4l2-core/v4l2-async.c` file. This is where I expect to find the low-level mechanics of how these sub-devices are integrated into the asynchronous framework, and I'm eager to dissect its operations.


140/2 2026/08/07 16:19 tool read-file
0m Args:
map[File:drivers/media/v4l2-core/v4l2-async.c FirstLine:805 LineCount:50]

Results:
map[Contents: 805:	int __v4l2_async_register_subdev(struct v4l2_subdev *sd, struct module *module)
 806:	{
 807:		struct v4l2_async_notifier *subdev_notifier;
 808:		struct v4l2_async_notifier *notifier;
 809:		struct v4l2_async_connection *asc;
 810:		int ret;
 811:	
 812:		INIT_LIST_HEAD(&sd->asc_list);
 813:	
 814:		/*
 815:		 * No reference taken. The reference is held by the device (struct
 816:		 * v4l2_subdev.dev), and async sub-device does not exist independently
 817:		 * of the device at any point of time.
 818:		 *
 819:		 * The async sub-device shall always be registered for its device node,
 820:		 * not the endpoint node.
 821:		 */
 822:		if (!sd->fwnode && sd->dev) {
 823:			sd->fwnode = dev_fwnode(sd->dev);
 824:		} else if (fwnode_graph_is_endpoint(sd->fwnode)) {
 825:			dev_warn(sd->dev, "sub-device fwnode is an endpoint!\n");
 826:			return -EINVAL;
 827:		}
 828:	
 829:		sd->owner = module;
 830:	
 831:		mutex_lock(&list_lock);
 832:	
 833:		list_for_each_entry(notifier, &notifier_list, notifier_entry) {
 834:			struct v4l2_device *v4l2_dev =
 835:				v4l2_async_nf_find_v4l2_dev(notifier);
 836:	
 837:			if (!v4l2_dev)
 838:				continue;
 839:	
 840:			while ((asc = v4l2_async_find_match(notifier, sd))) {
 841:				ret = v4l2_async_match_notify(notifier, v4l2_dev, sd,
 842:							      asc);
 843:				if (ret)
 844:					goto err_unlock;
 845:	
 846:				ret = v4l2_async_nf_try_subdev_notifier(notifier, sd);
 847:				if (ret)
 848:					goto err_unbind_one;
 849:	
 850:				ret = v4l2_async_nf_try_complete(notifier);
 851:				if (ret)
 852:					goto err_unbind;
 853:			}
 854:		}
]

141/2 2026/08/07 16:19 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 97640
							output: 53
							thoughts: 46
						

Thoughts:
**A Moment of Revelation in the v4l2 Asynchronous Subdevice Landscape**

I just had a significant realization that requires a deep dive into the intricacies of the v4l2 asynchronous subdevice framework. My attention was drawn to the fact that `v4l2_async_match_notify` actually invokes `v4l2_device_register_subdev`. This is a critical piece of information, as it suggests a more tightly coupled relationship between the asynchronous matching process and the fundamental registration of a subdevice within the v4l2 framework than I might have initially assumed. My next step, naturally, is to meticulously examine the implementation and behavior of `v4l2_async_match_notify` to fully grasp the implications of this discovery. I need to understand *why* and *how* this registration occurs within the asynchronous notification mechanism.


142/2 2026/08/07 16:19 tool codesearch-definition-source
0m Error:
log-in to see details

Args:
map[ContextFile:drivers/media/v4l2-core/v4l2-async.c Name:v4l2_async_match_notify]

Results:
map[SourceCode: SourceFile:]

143/2 2026/08/07 16:19 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 97744
							output: 47
							thoughts: 16
						

Thoughts:
**My Thought Process Upon Reading `v4l2_async_match_notify`**

Alright, so I've just stumbled upon `v4l2_async_match_notify`. My immediate thought is to get a handle on its purpose and how it fits into the broader V4L2 asynchronous subsystem. I'm trying to understand what kind of situation it's designed to address.

The name itself, `match_notify`, suggests a mechanism for signaling or notifying when a "match" has been found. In the context of V4L2 asynchronous, this likely relates to discovering and binding different video devices or sub-devices that need to work together. V4L2 async is all about dynamic discovery and connection of hardware components without hardcoding dependencies at compile time. So, this `notify` function is probably a crucial part of that discovery and connection handshake.

I'm anticipating that this function will be called when some criteria are met, allowing a waiting entity to proceed. What could those criteria be? Perhaps it's when a specific device has been registered, or when a particular set of properties has been identified that allows a connection to be established between different asynchronous V4L2 entities. It's about enabling the system to dynamically assemble the necessary components for a video pipeline.

The "match" part implies there's some form of identifier or descriptor involved. A device or a subsystem will present itself with certain characteristics, and other parts of the system will be looking for a match based on these characteristics. When that match is found, `v4l2_async_match_notify` is likely invoked to tell the interested party, "Hey, I found what you were looking for, and here it is!"

So, my mental model is forming around this:
1.  **Asynchronous V4L2 Entities:** There are independent V4L2 components that need to connect.
2.  **Discovery/Matching:** A process is underway to find compatible entities.
3.  **Notification:** When a suitable partner for an entity is located, this `notify` function is the signal that gets sent.

I'm eager to see the parameters it takes. They'll probably reveal *what* is being matched and *who* is being notified. Is it a specific device? A particular sub-device? And who is the recipient of this notification? Is it another device driver waiting for a specific sensor to come online? Or is it a higher-level V4L2 core component orchestrating the pipeline?

In essence, `v4l2_async_match_notify` feels like a linchpin in the V4L2 asynchronous framework, enabling the dynamic and flexible assembly of video processing pipelines by signaling successful discovery and identification of complementary hardware components. It's the "aha!" moment for devices looking for their partners in the asynchronous V4L2 world.


144/2 2026/08/07 16:19 tool read-file
0m Args:
map[File:drivers/media/v4l2-core/v4l2-async.c FirstLine:300 LineCount:50]

Results:
map[Contents: 300:				"v4l2-async: V4L2 device not available\n");
 301:			return 0;
 302:		}
 303:	
 304:		/* Is everything ready? */
 305:		if (!v4l2_async_nf_can_complete(notifier))
 306:			return 0;
 307:	
 308:		dev_dbg(notifier_dev(__notifier), "v4l2-async: complete\n");
 309:	
 310:		return v4l2_async_nf_call_complete(notifier);
 311:	}
 312:	
 313:	static int
 314:	v4l2_async_nf_try_all_subdevs(struct v4l2_async_notifier *notifier);
 315:	
 316:	static int v4l2_async_create_ancillary_links(struct v4l2_async_notifier *n,
 317:						     struct v4l2_subdev *sd)
 318:	{
 319:	#if IS_ENABLED(CONFIG_MEDIA_CONTROLLER)
 320:		struct media_link *link;
 321:	
 322:		if (sd->entity.function != MEDIA_ENT_F_LENS &&
 323:		    sd->entity.function != MEDIA_ENT_F_FLASH)
 324:			return 0;
 325:	
 326:		if (!n->sd) {
 327:			dev_warn(notifier_dev(n),
 328:				 "not a sub-device notifier, not creating an ancillary link for %s!\n",
 329:				 dev_name(sd->dev));
 330:			return 0;
 331:		}
 332:	
 333:		link = media_create_ancillary_link(&n->sd->entity, &sd->entity);
 334:	
 335:		return IS_ERR(link) ? PTR_ERR(link) : 0;
 336:	#else
 337:		return 0;
 338:	#endif
 339:	}
 340:	
 341:	static int v4l2_async_match_notify(struct v4l2_async_notifier *notifier,
 342:					   struct v4l2_device *v4l2_dev,
 343:					   struct v4l2_subdev *sd,
 344:					   struct v4l2_async_connection *asc)
 345:	{
 346:		bool registered = false;
 347:		int ret;
 348:	
 349:		if (list_empty(&sd->asc_list)) {
]

145/2 2026/08/07 16:19 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 98557
							output: 47
							thoughts: 18
						

Thoughts:
**My Deep Dive into `v4l2_async_match_notify`**

Alright, so I'm digging into `v4l2_async_match_notify` again, and I want to get a really thorough understanding of its workings. I need to trace the flow, understand the conditions under which it's called, and what its ultimate purpose is in the context of V4L2 async subdev operations.

My primary goal is to map out the sequence of events that leads to `v4l2_async_match_notify` being invoked. I'll be looking at the calling contexts – what parts of the V4L2 framework or the subdev drivers themselves are responsible for initiating this notification. I'm particularly interested in the "match" aspect. What does it mean for a subdev to be "matched" in this asynchronous setup? Is it about finding compatible devices, fulfilling dependencies, or both?

I need to understand the data structures involved. What information is passed into `v4l2_async_match_notify`? What does it operate on? I'm guessing there's a list or a set of subdevs, and the notification likely involves an event or a state change that signifies a potential match.

Furthermore, I want to dissect the logic *within* `v4l2_async_match_notify`. What decisions are made? Is it purely a signaling mechanism, or does it actively try to resolve matches or trigger further actions? I'll be paying close attention to any conditional branches or loops that dictate the behavior.

Finally, I need to consider the implications. What are the consequences of a successful `v4l2_async_match_notify` call? Does it lead to device initialization, resource allocation, or the establishment of communication links between subdevs? Conversely, what happens if a match isn't found or if the notification fails for some reason? Understanding these downstream effects is crucial for a complete picture. I'm essentially trying to paint a detailed mental model of this function's role in orchestrating the asynchronous V4L2 subdev ecosystem.


146/2 2026/08/07 16:19 tool read-file
0m Args:
map[File:drivers/media/v4l2-core/v4l2-async.c FirstLine:350 LineCount:50]

Results:
map[Contents: 350:			ret = __v4l2_device_register_subdev(v4l2_dev, sd, sd->owner);
 351:			if (ret < 0)
 352:				return ret;
 353:			registered = true;
 354:		}
 355:	
 356:		ret = v4l2_async_nf_call_bound(notifier, sd, asc);
 357:		if (ret < 0) {
 358:			if (asc->match.type == V4L2_ASYNC_MATCH_TYPE_FWNODE)
 359:				dev_dbg(notifier_dev(notifier),
 360:					"failed binding %pfw (%d)\n",
 361:					asc->match.fwnode, ret);
 362:			goto err_unregister_subdev;
 363:		}
 364:	
 365:		if (registered) {
 366:			/*
 367:			 * Depending of the function of the entities involved, we may
 368:			 * want to create links between them (for example between a
 369:			 * sensor and its lens or between a sensor's source pad and the
 370:			 * connected device's sink pad).
 371:			 */
 372:			ret = v4l2_async_create_ancillary_links(notifier, sd);
 373:			if (ret) {
 374:				if (asc->match.type == V4L2_ASYNC_MATCH_TYPE_FWNODE)
 375:					dev_dbg(notifier_dev(notifier),
 376:						"failed creating links for %pfw (%d)\n",
 377:						asc->match.fwnode, ret);
 378:				goto err_call_unbind;
 379:			}
 380:		}
 381:	
 382:		list_add(&asc->asc_subdev_entry, &sd->asc_list);
 383:		asc->sd = sd;
 384:	
 385:		/* Move from the waiting list to notifier's done */
 386:		list_move(&asc->asc_entry, &notifier->done_list);
 387:	
 388:		dev_dbg(notifier_dev(notifier), "v4l2-async: %s bound (ret %d)\n",
 389:			dev_name(sd->dev), ret);
 390:	
 391:		return 0;
 392:	
 393:	err_call_unbind:
 394:		v4l2_async_nf_call_unbind(notifier, sd, asc);
 395:		list_del(&asc->asc_subdev_entry);
 396:	
 397:	err_unregister_subdev:
 398:		if (registered)
 399:			v4l2_device_unregister_subdev(sd);
]

147/2 2026/08/07 16:19 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 99408
							output: 60
							thoughts: 106
						

Thoughts:
**My Thought Process Unfolding**

Alright, let's break this down. I've just seen that `v4l2_async_match_notify` is making a call to `__v4l2_device_register_subdev`, passing it `v4l2_dev` and `sd` (which I understand to be the subdevice) and its `owner`.

The immediate question that springs to mind, given my expertise in this area, is: where is this `v4l2_dev` coming from? It's clearly a crucial piece of context for registering the subdevice.

My next step, naturally, is to trace its origin. I see that `v4l2_dev` is being obtained by calling `v4l2_async_nf_find_v4l2_dev(notifier)`.

So, the logical progression of my thinking is now to delve into the implementation of `v4l2_async_nf_find_v4l2_dev` to understand precisely how it's locating and returning the correct `v4l2_dev` pointer. This will tell me the underlying mechanism by which the notifier is associating itself with a particular v4l2 device.


148/2 2026/08/07 16:19 tool codesearch-definition-source
0m Error:
log-in to see details

Args:
map[ContextFile:drivers/media/v4l2-core/v4l2-async.c Name:v4l2_async_nf_find_v4l2_dev]

Results:
map[SourceCode: SourceFile:]

149/2 2026/08/07 16:19 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 99579
							output: 47
							thoughts: 23
						

Thoughts:
**My Thought Process on `v4l2_async_nf_find_v4l2_dev`**

Alright, so I've just dug into `v4l2_async_nf_find_v4l2_dev`. My primary goal here is to get a really clear grasp of *how* this function identifies and retrieves a specific `v4l2_dev` (Video for Linux Two device) within the asynchronous framework, particularly when dealing with entities that don't have a direct hardware backing but are instead represented by a device node.

The name itself, `v4l2_async_nf_find_v4l2_dev`, is a pretty strong hint. "nf" likely stands for "notifier," suggesting it's being used in conjunction with the V4L2 notifier framework, which is crucial for asynchronous operations – things that happen independently and trigger callbacks. "find_v4l2_dev" is straightforward; it's about locating a `v4l2_dev` structure.

So, what's the core problem this function solves? In the V4L2 asynchronous world, entities can be linked. Sometimes, an entity (like a sub-device or a media controller node) needs to find its corresponding `v4l2_dev` object. This is especially important when dealing with "non-functional" entities – those that are logical constructs within the media framework but don't directly map to a single hardware device node you'd `open()` in the traditional sense. They might be aggregates, virtual devices, or something similar.

My expectation is that this function will take some identifier for the entity it's looking for. Given the context of V4L2 and media, this identifier is probably related to the entity's device node or its properties. I'm anticipating it will iterate through a list of available `v4l2_dev` structures. The key will be the *matching logic*. How does it know it's found the *right* `v4l2_dev` for the given entity?

I'm looking for checks that compare information. This could involve:

*   **Device Node Matching:** If the entity is associated with a specific device node (`dev_t`), the function might try to find a `v4l2_dev` that's registered with that same device. This seems like a direct and robust way to link a logical entity to its underlying V4L2 device.
*   **Bus Information:** For entities that do have some hardware connection, bus information (like PCI, USB, I2C) could be used. However, since the "nf" hints at non-functional entities, this might be less common here, or it might be a fallback.
*   **Driver Name/Properties:** Perhaps the function matches based on the driver name associated with the `v4l2_dev` and some property of the entity. This would be useful if a single driver manages multiple entities, and we need to pick the correct one.
*   **Internal Links:** It's possible that the `v4l2_async_notifier` structure itself holds pointers or references to the `v4l2_dev` it's associated with, simplifying the search. The "notifier" part of the name makes me lean towards this being a crucial aspect.

I'm particularly interested in how it handles cases where the `v4l2_dev` might not be immediately available or fully initialized. The asynchronous nature suggests this is a real possibility. Does it register a callback to be notified when the device *does* become ready? Or does it assume the `v4l2_dev` is already populated and registered? The name "find" implies a search within existing structures, so I'll focus on that first, but keep the asynchronous implications in mind.

Ultimately, my goal is to understand the contract of this function: what inputs does it expect, what does it return on success, and what happens on failure (e.g., `NULL` return). And crucially, how does it interact with the broader V4L2 asynchronous framework to ensure proper device discovery and management, especially for those less tangible, non-functional entities. I want to see the precise criteria used for identifying the correct `v4l2_dev` to avoid ambiguity and ensure the right device is associated with the right asynchronous operation.


150/2 2026/08/07 16:20 tool read-file
0m Args:
map[File:drivers/media/v4l2-core/v4l2-async.c FirstLine:250 LineCount:30]

Results:
map[Contents: 250:		return notifier->v4l2_dev;
 251:	}
 252:	
 253:	/*
 254:	 * Return true if all child sub-device notifiers are complete, false otherwise.
 255:	 */
 256:	static bool
 257:	v4l2_async_nf_can_complete(struct v4l2_async_notifier *notifier)
 258:	{
 259:		struct v4l2_async_connection *asc;
 260:	
 261:		if (!list_empty(&notifier->waiting_list))
 262:			return false;
 263:	
 264:		list_for_each_entry(asc, &notifier->done_list, asc_entry) {
 265:			struct v4l2_async_notifier *subdev_notifier =
 266:				v4l2_async_find_subdev_notifier(asc->sd);
 267:	
 268:			if (subdev_notifier &&
 269:			    !v4l2_async_nf_can_complete(subdev_notifier))
 270:				return false;
 271:		}
 272:	
 273:		return true;
 274:	}
 275:	
 276:	/*
 277:	 * Complete the master notifier if possible. This is done when all async
 278:	 * sub-devices have been bound; v4l2_device is also available then.
 279:	 */
]

151/2 2026/08/07 16:20 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 100066
							output: 47
							thoughts: 29
						

Thoughts:
**A Deep Dive into V4L2 Asynchronous Device Discovery**

So, I've been tracing through this V4L2 asynchronous device management code, specifically how it discovers and links up the various sub-devices. My current focus is on the `v4l2_async_nf_find_v4l2_dev` function. I just realized, and it's a rather precise point in my mental mapping of this code, that this particular function, `v4l2_async_nf_find_v4l2_dev`, resides at line 240. This isn't just a casual observation; it signifies a concrete anchor point in my understanding of the control flow and the structural layout of this module. Knowing its exact location helps me quickly navigate back to it, analyze its inputs and outputs in context, and understand how it's being invoked by other parts of the system. It’s a crucial piece of the puzzle in comprehending the intricate dance of device enumeration and matching within the V4L2 framework, especially when dealing with asynchronous operations where dependencies and discovery order are paramount.


152/2 2026/08/07 16:20 tool read-file
0m Args:
map[File:drivers/media/v4l2-core/v4l2-async.c FirstLine:230 LineCount:25]

Results:
map[Contents: 230:	/* Find the sub-device notifier registered by a sub-device driver. */
 231:	static struct v4l2_async_notifier *
 232:	v4l2_async_find_subdev_notifier(struct v4l2_subdev *sd)
 233:	{
 234:		struct v4l2_async_notifier *n;
 235:	
 236:		list_for_each_entry(n, &notifier_list, notifier_entry)
 237:			if (n->sd == sd)
 238:				return n;
 239:	
 240:		return NULL;
 241:	}
 242:	
 243:	/* Get v4l2_device related to the notifier if one can be found. */
 244:	static struct v4l2_device *
 245:	v4l2_async_nf_find_v4l2_dev(struct v4l2_async_notifier *notifier)
 246:	{
 247:		while (notifier->parent)
 248:			notifier = notifier->parent;
 249:	
 250:		return notifier->v4l2_dev;
 251:	}
 252:	
 253:	/*
 254:	 * Return true if all child sub-device notifiers are complete, false otherwise.
]

153/2 2026/08/07 16:20 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 100513
							output: 34
							thoughts: 1887
						

Thoughts:
**My Thought Process on the V4L2 Subdev Crash**

I've been digging into this V4L2 subdev crash, specifically a general protection fault within `subdev_open`, and I've been meticulously tracing the potential paths that could lead to it. My primary goal is to understand how `sd->entity.graph_obj.mdev` can end up being NULL when it's expected to be valid.

My initial thought was about the `v4l2_dev` structure. I know that `v4l2_dev` is derived from `notifier->v4l2_dev`. If `notifier->v4l2_dev->mdev` is NULL when `v4l2_async_match_notify` is called, then `media_device_register_entity` is skipped. This led me to consider if a driver might be setting `notifier->v4l2_dev->mdev` *after* this point. However, my experience suggests that drivers typically populate `v4l2_dev->mdev` *before* registering the notifier, making this scenario less likely.

I then shifted my focus to what happens if `v4l2_dev->mdev` is *not* NULL, but `media_device_register_entity` itself fails. If `media_device_register_entity` returns an error, this error propagates up through `__v4l2_device_register_subdev` and `v4l2_async_match_notify`, eventually causing `__v4l2_async_register_subdev` to return an error. In this case, the subdevice wouldn't be registered, and importantly, `sd->v4l2_dev` would be NULL. This would mean `__v4l2_device_register_subdev_nodes` wouldn't even see the subdevice. This seems like a valid failure path, but it doesn't directly explain the crash *within* `subdev_open` where the `mdev` is being accessed.

My attention then turned to a more subtle scenario: what if `media_device_register_entity` succeeds, but `sd->entity.graph_obj.mdev` ends up being NULL? I quickly realized this shouldn't happen because `media_device_register_entity` explicitly sets `entity->graph_obj.mdev = mdev;`. So, this path seems impossible unless something unregisters the entity.

This brought me to consider the possibility of `media_device_unregister_entity` being called. I know `media_device_unregister_entity` sets `entity->graph_obj.mdev = NULL;`. I also know that `media_device_unregister_entity` is typically called within `v4l2_device_unregister_subdev`. However, if a subdevice is unregistered, it's removed from the `v4l2_dev->subdevs` list, meaning `__v4l2_device_register_subdev_nodes` wouldn't process it, again not leading to the crash *in* `subdev_open`.

A crucial point then emerged: what if `sd->entity.graph_obj.mdev` is NULL simply because `CONFIG_MEDIA_CONTROLLER` is not defined? I then remembered a dependency: `subdev_open` is only compiled if `CONFIG_VIDEO_V4L2_SUBDEV_API` is enabled, and that, in turn, *depends* on `CONFIG_MEDIA_CONTROLLER`. Therefore, `CONFIG_MEDIA_CONTROLLER` *must* be defined for this code path to even exist. This ruled out that as the primary reason for `sd->entity.graph_obj.mdev` being NULL.

At this point, the crash log itself became my primary guide. I focused on the specific assembly instruction causing the fault: `cmpb $0x0,(%rdx,%rax,1)`. I analyzed how `%r12` (which points to `sd->entity.graph_obj.mdev` in this context) is loaded into `%rbp`. If `sd->entity.graph_obj.mdev` is NULL, then `(%r12)` is NULL, and `%rbp` becomes NULL. The subsequent access `0x0(%rbp)` (which is `mdev->dev`) would then be a dereference of NULL, causing the fault. Crucially, the KASAN check happens *before* this dereference, and it flags the NULL `%rbp` as the problem. This strongly confirms that `sd->entity.graph_obj.mdev` is indeed NULL at the point of the crash.

So, the core of my investigation shifted to understanding how `sd->entity.graph_obj.mdev` could be NULL. I identified two main possibilities:
1.  `media_device_register_entity` was never called for this subdevice's entity.
2.  `media_device_unregister_entity` was called for this subdevice's entity.

I've been systematically checking common drivers. For example, in `vivid`, I noted that it registers `v4l2_dev` *before* `v4l2_device_register`, and it doesn't directly use `v4l2_device_register_subdev` in the way I initially expected. It uses `video_device` directly. I also checked `vimc`, where `mdev` is set *before* subdev registration, which seems correct. My current path is to continue examining other drivers like `cx18` to see if there's a pattern of setting `mdev` *after* subdev registration or a subtle unregistration flow that I might be missing.


154/2 2026/08/07 16:20 tool grepper
0m Args:
map[Expression:v4l2_dev\.mdev = PathPrefix:drivers/media/]

Results:
map[Output:drivers/media/pci/intel/ipu3/ipu3-cio2.c=1657=static int cio2_pci_probe(struct pci_dev *pci_dev,
--
drivers/media/pci/intel/ipu3/ipu3-cio2.c-1725-
drivers/media/pci/intel/ipu3/ipu3-cio2.c:1726:	cio2->v4l2_dev.mdev = &cio2->media_dev;
drivers/media/pci/intel/ipu3/ipu3-cio2.c-1727-	r = v4l2_device_register(dev, &cio2->v4l2_dev);
--
drivers/media/pci/intel/ipu6/ipu6-isys.c=783=static int isys_register_devices(struct ipu6_isys *isys)
--
drivers/media/pci/intel/ipu6/ipu6-isys.c-799-
drivers/media/pci/intel/ipu6/ipu6-isys.c:800:	isys->v4l2_dev.mdev = &isys->media_dev;
drivers/media/pci/intel/ipu6/ipu6-isys.c-801-	isys->v4l2_dev.ctrl_handler = NULL;
--
drivers/media/pci/saa7134/saa7134-core.c=1003=static int saa7134_initdev(struct pci_dev *pci_dev,
--
drivers/media/pci/saa7134/saa7134-core.c-1026-	media_device_pci_init(dev->media_dev, pci_dev, dev->name);
drivers/media/pci/saa7134/saa7134-core.c:1027:	dev->v4l2_dev.mdev = dev->media_dev;
drivers/media/pci/saa7134/saa7134-core.c-1028-#endif
--
drivers/media/platform/amd/isp4/isp4.c=118=static int isp4_capture_probe(struct platform_device *pdev)
--
drivers/media/platform/amd/isp4/isp4.c-152-
drivers/media/platform/amd/isp4/isp4.c:153:	isp_dev->v4l2_dev.mdev = &isp_dev->mdev;
drivers/media/platform/amd/isp4/isp4.c-154-
--
drivers/media/platform/amphion/vpu_drv.c=75=static int vpu_init_media_device(struct vpu_dev *vpu)
--
drivers/media/platform/amphion/vpu_drv.c-80-	media_device_init(&vpu->mdev);
drivers/media/platform/amphion/vpu_drv.c:81:	vpu->v4l2_dev.mdev = &vpu->mdev;
drivers/media/platform/amphion/vpu_drv.c-82-
--
drivers/media/platform/arm/mali-c55/mali-c55-core.c=442=static int mali_c55_media_frameworks_init(struct mali_c55 *mali_c55)
--
drivers/media/platform/arm/mali-c55/mali-c55-core.c-454-
drivers/media/platform/arm/mali-c55/mali-c55-core.c:455:	mali_c55->v4l2_dev.mdev = &mali_c55->media_dev;
drivers/media/platform/arm/mali-c55/mali-c55-core.c-456-	ret = v4l2_device_register(mali_c55->dev, &mali_c55->v4l2_dev);
--
drivers/media/platform/broadcom/bcm2835-unicam.c=2624=static int unicam_media_init(struct unicam_device *unicam)
--
drivers/media/platform/broadcom/bcm2835-unicam.c-2634-
drivers/media/platform/broadcom/bcm2835-unicam.c:2635:	unicam->v4l2_dev.mdev = &unicam->mdev;
drivers/media/platform/broadcom/bcm2835-unicam.c-2636-
--
drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec_drv.c=354=static int mtk_vcodec_probe(struct platform_device *pdev)
--
drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec_drv.c-491-		dev->mdev_dec.ops = &mtk_vcodec_media_ops;
drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec_drv.c:492:		dev->v4l2_dev.mdev = &dev->mdev_dec;
drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec_drv.c-493-
--
drivers/media/platform/microchip/microchip-isc-base.c=1914=int isc_mc_init(struct isc_device *isc, u32 ver)
--
drivers/media/platform/microchip/microchip-isc-base.c-1943-
drivers/media/platform/microchip/microchip-isc-base.c:1944:	isc->v4l2_dev.mdev = &isc->mdev;
drivers/media/platform/microchip/microchip-isc-base.c-1945-
--
drivers/media/platform/nvidia/tegra-vde/v4l2.c=919=int tegra_vde_v4l2_init(struct tegra_vde *vde)
--
drivers/media/platform/nvidia/tegra-vde/v4l2.c-935-
drivers/media/platform/nvidia/tegra-vde/v4l2.c:936:	vde->v4l2_dev.mdev = &vde->mdev;
drivers/media/platform/nvidia/tegra-vde/v4l2.c-937-	vde->mdev.ops = &tegra_media_device_ops;
--
drivers/media/platform/nxp/dw100/dw100.c=1563=static int dw100_probe(struct platform_device *pdev)
--
drivers/media/platform/nxp/dw100/dw100.c-1624-	dw_dev->mdev.ops = &dw100_m2m_media_ops;
drivers/media/platform/nxp/dw100/dw100.c:1625:	dw_dev->v4l2_dev.mdev = &dw_dev->mdev;
drivers/media/platform/nxp/dw100/dw100.c-1626-
--
drivers/media/platform/nxp/imx-pxp.c=1771=static int pxp_probe(struct platform_device *pdev)
--
drivers/media/platform/nxp/imx-pxp.c-1864-	media_device_init(&dev->mdev);
drivers/media/platform/nxp/imx-pxp.c:1865:	dev->v4l2_dev.mdev = &dev->mdev;
drivers/media/platform/nxp/imx-pxp.c-1866-
--
drivers/media/platform/nxp/imx7-media-csi.c=2129=static int imx7_csi_media_dev_init(struct imx7_csi *csi)
--
drivers/media/platform/nxp/imx7-media-csi.c-2136-
drivers/media/platform/nxp/imx7-media-csi.c:2137:	csi->v4l2_dev.mdev = &csi->mdev;
drivers/media/platform/nxp/imx7-media-csi.c-2138-	strscpy(csi->v4l2_dev.name, "imx-media",
--
drivers/media/platform/qcom/camss/camss.c=5355=static int camss_probe(struct platform_device *pdev)
--
drivers/media/platform/qcom/camss/camss.c-5425-
drivers/media/platform/qcom/camss/camss.c:5426:	camss->v4l2_dev.mdev = &camss->media_dev;
drivers/media/platform/qcom/camss/camss.c-5427-	ret = v4l2_device_register(camss->dev, &camss->v4l2_dev);
--
drivers/media/platform/raspberrypi/rp1-cfe/cfe.c=2276=static int cfe_probe(struct platform_device *pdev)
--
drivers/media/platform/raspberrypi/rp1-cfe/cfe.c-2360-
drivers/media/platform/raspberrypi/rp1-cfe/cfe.c:2361:	cfe->v4l2_dev.mdev = &cfe->mdev;
drivers/media/platform/raspberrypi/rp1-cfe/cfe.c-2362-
--
drivers/media/platform/renesas/rcar-vin/rcar-core.c=118=static int rvin_group_get(struct rvin_dev *vin,
--
drivers/media/platform/renesas/rcar-vin/rcar-core.c-163-	vin->group = group;
drivers/media/platform/renesas/rcar-vin/rcar-core.c:164:	vin->v4l2_dev.mdev = &group->mdev;
drivers/media/platform/renesas/rcar-vin/rcar-core.c-165-
--
drivers/media/platform/renesas/rcar-vin/rcar-core.c=174=static void rvin_group_put(struct rvin_dev *vin)
--
drivers/media/platform/renesas/rcar-vin/rcar-core.c-180-	vin->group = NULL;
drivers/media/platform/renesas/rcar-vin/rcar-core.c:181:	vin->v4l2_dev.mdev = NULL;
drivers/media/platform/renesas/rcar-vin/rcar-core.c-182-
--
drivers/media/platform/renesas/rzg2l-cru/rzg2l-core.c=205=static int rzg2l_cru_media_init(struct rzg2l_cru_dev *cru)
--
drivers/media/platform/renesas/rzg2l-cru/rzg2l-core.c-226-
drivers/media/platform/renesas/rzg2l-cru/rzg2l-core.c:227:	cru->v4l2_dev.mdev = &cru->mdev;
drivers/media/platform/renesas/rzg2l-cru/rzg2l-core.c-228-
--
drivers/media/platform/renesas/rzg2l-cru/rzg2l-core.c-233-		mutex_lock(&cru->mdev_lock);
drivers/media/platform/renesas/rzg2l-cru/rzg2l-core.c:234:		cru->v4l2_dev.mdev = NULL;
drivers/media/platform/renesas/rzg2l-cru/rzg2l-core.c-235-		mutex_unlock(&cru->mdev_lock);
--
drivers/media/platform/rockchip/rkcif/rkcif-dev.c=164=static int rkcif_probe(struct platform_device *pdev)
--
drivers/media/platform/rockchip/rkcif/rkcif-dev.c-219-
drivers/media/platform/rockchip/rkcif/rkcif-dev.c:220:	rkcif->v4l2_dev.mdev = &rkcif->media_dev;
drivers/media/platform/rockchip/rkcif/rkcif-dev.c-221-	ret = v4l2_device_register(dev, &rkcif->v4l2_dev);
--
drivers/media/platform/rockchip/rkvdec/rkvdec.c=1339=static int rkvdec_v4l2_init(struct rkvdec_dev *rkvdec)
--
drivers/media/platform/rockchip/rkvdec/rkvdec.c-1361-	rkvdec->mdev.ops = &rkvdec_media_ops;
drivers/media/platform/rockchip/rkvdec/rkvdec.c:1362:	rkvdec->v4l2_dev.mdev = &rkvdec->mdev;
drivers/media/platform/rockchip/rkvdec/rkvdec.c-1363-
--
drivers/media/platform/st/stm32/stm32-dcmi.c=1954=static int dcmi_probe(struct platform_device *pdev)
--
drivers/media/platform/st/stm32/stm32-dcmi.c-2101-
drivers/media/platform/st/stm32/stm32-dcmi.c:2102:	dcmi->v4l2_dev.mdev = &dcmi->mdev;
drivers/media/platform/st/stm32/stm32-dcmi.c-2103-
--
drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-core.c=466=static int dcmipp_probe(struct platform_device *pdev)
--
drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-core.c-561-	/* Link the media device within the v4l2_device */
drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-core.c:562:	dcmipp->v4l2_dev.mdev = &dcmipp->mdev;
drivers/media/platform/st/stm32/stm32-dcmipp/dcmipp-core.c-563-
--
drivers/media/platform/ti/cal/cal.c=966=static int cal_media_init(struct cal_dev *cal)
--
drivers/media/platform/ti/cal/cal.c-979-	 */
drivers/media/platform/ti/cal/cal.c:980:	cal->v4l2_dev.mdev = mdev;
drivers/media/platform/ti/cal/cal.c-981-	ret = v4l2_device_register(cal->dev, &cal->v4l2_dev);
--
drivers/media/platform/ti/j721e-csi2rx/j721e-csi2rx.c=1394=static int ti_csi2rx_v4l2_init(struct ti_csi2rx_dev *csi)
--
drivers/media/platform/ti/j721e-csi2rx/j721e-csi2rx.c-1405-
drivers/media/platform/ti/j721e-csi2rx/j721e-csi2rx.c:1406:	csi->v4l2_dev.mdev = mdev;
drivers/media/platform/ti/j721e-csi2rx/j721e-csi2rx.c-1407-
--
drivers/media/platform/ti/omap3isp/isp.c=1647=static int isp_register_entities(struct isp_device *isp)
--
drivers/media/platform/ti/omap3isp/isp.c-1657-
drivers/media/platform/ti/omap3isp/isp.c:1658:	isp->v4l2_dev.mdev = &isp->media_dev;
drivers/media/platform/ti/omap3isp/isp.c-1659-	ret = v4l2_device_register(isp->dev, &isp->v4l2_dev);
--
drivers/media/platform/verisilicon/hantro_drv.c=1074=static int hantro_probe(struct platform_device *pdev)
--
drivers/media/platform/verisilicon/hantro_drv.c-1235-	vpu->mdev.ops = &hantro_m2m_media_ops;
drivers/media/platform/verisilicon/hantro_drv.c:1236:	vpu->v4l2_dev.mdev = &vpu->mdev;
drivers/media/platform/verisilicon/hantro_drv.c-1237-
--
drivers/media/platform/xilinx/xilinx-vipp.c=540=static int xvip_composite_v4l2_init(struct xvip_composite_device *xdev)
--
drivers/media/platform/xilinx/xilinx-vipp.c-550-
drivers/media/platform/xilinx/xilinx-vipp.c:551:	xdev->v4l2_dev.mdev = &xdev->media_dev;
drivers/media/platform/xilinx/xilinx-vipp.c-552-	ret = v4l2_device_register(xdev->dev, &xdev->v4l2_dev);
--
drivers/media/test-drivers/vicodec/vicodec-core.c=2103=static int vicodec_probe(struct platform_device *pdev)
--
drivers/media/test-drivers/vicodec/vicodec-core.c-2124-	dev->mdev.ops = &vicodec_m2m_media_ops;
drivers/media/test-drivers/vicodec/vicodec-core.c:2125:	dev->v4l2_dev.mdev = &dev->mdev;
drivers/media/test-drivers/vicodec/vicodec-core.c-2126-#endif
--
drivers/media/test-drivers/vim2m.c=1489=static int vim2m_probe(struct platform_device *pdev)
--
drivers/media/test-drivers/vim2m.c-1531-	dev->mdev.ops = &m2m_media_ops;
drivers/media/test-drivers/vim2m.c:1532:	dev->v4l2_dev.mdev = &dev->mdev;
drivers/media/test-drivers/vim2m.c-1533-
--
drivers/media/test-drivers/vimc/vimc-core.c=338=static int vimc_probe(struct platform_device *pdev)
--
drivers/media/test-drivers/vimc/vimc-core.c-362-	/* Link the media device within the v4l2_device */
drivers/media/test-drivers/vimc/vimc-core.c:363:	vimc->v4l2_dev.mdev = &vimc->mdev;
drivers/media/test-drivers/vimc/vimc-core.c-364-
--
drivers/media/test-drivers/visl/visl-core.c=437=static int visl_probe(struct platform_device *pdev)
--
drivers/media/test-drivers/visl/visl-core.c-476-	dev->mdev.ops = &visl_m2m_media_ops;
drivers/media/test-drivers/visl/visl-core.c:477:	dev->v4l2_dev.mdev = &dev->mdev;
drivers/media/test-drivers/visl/visl-core.c-478-
--
drivers/media/test-drivers/vivid/vivid-core.c=1800=static int vivid_create_instance(struct platform_device *pdev, int inst)
--
drivers/media/test-drivers/vivid/vivid-core.c-1823-#ifdef CONFIG_MEDIA_CONTROLLER
drivers/media/test-drivers/vivid/vivid-core.c:1824:	dev->v4l2_dev.mdev = &dev->mdev;
drivers/media/test-drivers/vivid/vivid-core.c-1825-
--
drivers/media/usb/au0828/au0828-video.c=646=int au0828_v4l2_device_register(struct usb_interface *interface,
--
drivers/media/usb/au0828/au0828-video.c-655-#ifdef CONFIG_MEDIA_CONTROLLER
drivers/media/usb/au0828/au0828-video.c:656:	dev->v4l2_dev.mdev = dev->media_dev;
drivers/media/usb/au0828/au0828-video.c-657-#endif
--
drivers/media/usb/cx231xx/cx231xx-cards.c=1689=static int cx231xx_usb_probe(struct usb_interface *interface,
--
drivers/media/usb/cx231xx/cx231xx-cards.c-1813-#ifdef CONFIG_MEDIA_CONTROLLER
drivers/media/usb/cx231xx/cx231xx-cards.c:1814:	dev->v4l2_dev.mdev = dev->media_dev;
drivers/media/usb/cx231xx/cx231xx-cards.c-1815-#endif
--
drivers/media/usb/em28xx/em28xx-video.c=2687=static int em28xx_v4l2_init(struct em28xx *dev)
--
drivers/media/usb/em28xx/em28xx-video.c-2718-#ifdef CONFIG_MEDIA_CONTROLLER
drivers/media/usb/em28xx/em28xx-video.c:2719:	v4l2->v4l2_dev.mdev = dev->media_dev;
drivers/media/usb/em28xx/em28xx-video.c-2720-#endif
]

155/2 2026/08/07 16:20 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 108218
							output: 51
							thoughts: 116
						

Thoughts:
**My Thought Process on `em28xx` and `cx231xx` Initialization**

As I delve into the intricacies of these driver initializations, my immediate focus is on how the `em28xx` and `cx231xx` devices are being registered and integrated, particularly with the Media Controller framework.

My initial thought is to examine the `cx231xx` and `em28xx` drivers. I'm particularly interested in the `em28xx_v4l2_init` function. I noticed a specific conditional block:

```c
#ifdef CONFIG_MEDIA_CONTROLLER
	v4l2->v4l2_dev.mdev = dev->media_dev;
#endif
```

This snippet suggests that the `v4l2_dev.mdev` field, which is crucial for Media Controller integration, is being set within `em28xx_v4l2_init`. However, a crucial question arises in my mind: does the `em28xx` driver register its sub-devices *before* `em28xx_v4l2_init` is even called?

If sub-devices are registered prior to this initialization point, it could have implications for the Media Controller's graph construction and the availability of those sub-devices when `v4l2->v4l2_dev.mdev` is being assigned. This potential timing mismatch is something I need to clarify.

To get to the bottom of this, I'll need to trace the execution flow more precisely. My next step will be to investigate the `em28xx_usb_probe` function. This is where the device probing typically begins, and I anticipate finding the key to understanding the order of operations and whether sub-devices are indeed registered before the V4L2 initialization. I'm looking to confirm if the Media Controller device (`dev->media_dev`) is available and associated with the sub-devices at the point `em28xx_v4l2_init` is invoked.


156/2 2026/08/07 16:20 tool codesearch-definition-source
0m Args:
map[ContextFile:drivers/media/usb/em28xx/em28xx-cards.c Name:em28xx_usb_probe]

Results:
map[SourceCode:4088:	/*
4089:	 * em28xx_usb_probe()
4090:	 * checks for supported devices
4091:	 */
4092:	static int em28xx_usb_probe(struct usb_interface *intf,
4093:				    const struct usb_device_id *id)
4094:	{
4095:		struct usb_device *udev;
4096:		struct em28xx *dev = NULL;
4097:		int retval;
4098:		bool has_vendor_audio = false, has_video = false, has_dvb = false;
4099:		int i, nr, try_bulk;
4100:		const int ifnum = intf->altsetting[0].desc.bInterfaceNumber;
4101:		char *speed;
4102:	
4103:		udev = usb_get_dev(interface_to_usbdev(intf));
4104:	
4105:		/* Check to see next free device and mark as used */
4106:		do {
4107:			nr = find_first_zero_bit(em28xx_devused, EM28XX_MAXBOARDS);
4108:			if (nr >= EM28XX_MAXBOARDS) {
4109:				/* No free device slots */
4110:				dev_err(&intf->dev,
4111:					"Driver supports up to %i em28xx boards.\n",
4112:				       EM28XX_MAXBOARDS);
4113:				retval = -ENOMEM;
4114:				goto err_no_slot;
4115:			}
4116:		} while (test_and_set_bit(nr, em28xx_devused));
4117:	
4118:		/* Don't register audio interfaces */
4119:		if (intf->altsetting[0].desc.bInterfaceClass == USB_CLASS_AUDIO) {
4120:			dev_info(&intf->dev,
4121:				"audio device (%04x:%04x): interface %i, class %i\n",
4122:				le16_to_cpu(udev->descriptor.idVendor),
4123:				le16_to_cpu(udev->descriptor.idProduct),
4124:				ifnum,
4125:				intf->altsetting[0].desc.bInterfaceClass);
4126:	
4127:			retval = -ENODEV;
4128:			goto err;
4129:		}
4130:	
4131:		/* allocate memory for our device state and initialize it */
4132:		dev = kzalloc_obj(*dev);
4133:		if (!dev) {
4134:			retval = -ENOMEM;
4135:			goto err;
4136:		}
4137:	
4138:		/* compute alternate max packet sizes */
4139:		dev->alt_max_pkt_size_isoc = kcalloc(intf->num_altsetting,
4140:						     sizeof(dev->alt_max_pkt_size_isoc[0]),
4141:						     GFP_KERNEL);
4142:		if (!dev->alt_max_pkt_size_isoc) {
4143:			kfree(dev);
4144:			retval = -ENOMEM;
4145:			goto err;
4146:		}
4147:	
4148:		/* Get endpoints */
4149:		for (i = 0; i < intf->num_altsetting; i++) {
4150:			int ep;
4151:	
4152:			for (ep = 0;
4153:			     ep < intf->altsetting[i].desc.bNumEndpoints;
4154:			     ep++)
4155:				em28xx_check_usb_descriptor(dev, udev, intf,
4156:							    i, ep,
4157:							    &has_vendor_audio,
4158:							    &has_video,
4159:							    &has_dvb);
4160:		}
4161:	
4162:		if (!(has_vendor_audio || has_video || has_dvb)) {
4163:			retval = -ENODEV;
4164:			goto err_free;
4165:		}
4166:	
4167:		switch (udev->speed) {
4168:		case USB_SPEED_LOW:
4169:			speed = "1.5";
4170:			break;
4171:		case USB_SPEED_UNKNOWN:
4172:		case USB_SPEED_FULL:
4173:			speed = "12";
4174:			break;
4175:		case USB_SPEED_HIGH:
4176:			speed = "480";
4177:			break;
4178:		default:
4179:			speed = "unknown";
4180:		}
4181:	
4182:		dev_info(&intf->dev,
4183:			"New device %s %s @ %s Mbps (%04x:%04x, interface %d, class %d)\n",
4184:			udev->manufacturer ? udev->manufacturer : "",
4185:			udev->product ? udev->product : "",
4186:			speed,
4187:			le16_to_cpu(udev->descriptor.idVendor),
4188:			le16_to_cpu(udev->descriptor.idProduct),
4189:			ifnum,
4190:			intf->altsetting->desc.bInterfaceNumber);
4191:	
4192:		/*
4193:		 * Make sure we have 480 Mbps of bandwidth, otherwise things like
4194:		 * video stream wouldn't likely work, since 12 Mbps is generally
4195:		 * not enough even for most Digital TV streams.
4196:		 */
4197:		if (udev->speed != USB_SPEED_HIGH && disable_usb_speed_check == 0) {
4198:			dev_err(&intf->dev, "Device initialization failed.\n");
4199:			dev_err(&intf->dev,
4200:				"Device must be connected to a high-speed USB 2.0 port.\n");
4201:			retval = -ENODEV;
4202:			goto err_free;
4203:		}
4204:	
4205:		kref_init(&dev->ref);
4206:	
4207:		dev->devno = nr;
4208:		dev->model = id->driver_info;
4209:		dev->alt   = -1;
4210:		dev->is_audio_only = has_vendor_audio && !(has_video || has_dvb);
4211:		dev->has_video = has_video;
4212:		dev->ifnum = ifnum;
4213:	
4214:		dev->ts = PRIMARY_TS;
4215:		snprintf(dev->name, 28, "em28xx");
4216:		dev->dev_next = NULL;
4217:	
4218:		if (has_vendor_audio) {
4219:			dev_info(&intf->dev,
4220:				"Audio interface %i found (Vendor Class)\n", ifnum);
4221:			dev->usb_audio_type = EM28XX_USB_AUDIO_VENDOR;
4222:		}
4223:		/* Checks if audio is provided by a USB Audio Class intf */
4224:		for (i = 0; i < udev->config->desc.bNumInterfaces; i++) {
4225:			struct usb_interface *uif = udev->config->interface[i];
4226:	
4227:			if (uif->altsetting[0].desc.bInterfaceClass == USB_CLASS_AUDIO) {
4228:				if (has_vendor_audio)
4229:					dev_err(&intf->dev,
4230:						"em28xx: device seems to have vendor AND usb audio class interfaces !\n"
4231:						"\t\tThe vendor interface will be ignored. Please contact the developers <linux-media@vger.kernel.org>\n");
4232:				dev->usb_audio_type = EM28XX_USB_AUDIO_CLASS;
4233:				break;
4234:			}
4235:		}
4236:	
4237:		if (has_video)
4238:			dev_info(&intf->dev, "Video interface %i found:%s%s\n",
4239:				ifnum,
4240:				dev->analog_ep_bulk ? " bulk" : "",
4241:				dev->analog_ep_isoc ? " isoc" : "");
4242:		if (has_dvb)
4243:			dev_info(&intf->dev, "DVB interface %i found:%s%s\n",
4244:				ifnum,
4245:				dev->dvb_ep_bulk ? " bulk" : "",
4246:				dev->dvb_ep_isoc ? " isoc" : "");
4247:	
4248:		dev->num_alt = intf->num_altsetting;
4249:	
4250:		if ((unsigned int)card[nr] < em28xx_bcount)
4251:			dev->model = card[nr];
4252:	
4253:		/* save our data pointer in this intf device */
4254:		usb_set_intfdata(intf, dev);
4255:	
4256:		/* allocate device struct and check if the device is a webcam */
4257:		mutex_init(&dev->lock);
4258:		retval = em28xx_init_dev(dev, udev, intf, nr);
4259:		if (retval)
4260:			goto err_free;
4261:	
4262:		if (usb_xfer_mode < 0) {
4263:			if (dev->is_webcam)
4264:				try_bulk = 1;
4265:			else
4266:				try_bulk = 0;
4267:		} else if (dev->board.decoder == EM28XX_BUILTIN && dev->analog_xfer_mode) {
4268:			try_bulk = 1;
4269:		} else {
4270:			try_bulk = usb_xfer_mode > 0;
4271:		}
4272:	
4273:		/* Disable V4L2 if the device doesn't have a decoder or image sensor */
4274:		if (has_video &&
4275:		    dev->board.decoder == EM28XX_NODECODER &&
4276:		    dev->em28xx_sensor == EM28XX_NOSENSOR) {
4277:			dev_err(&intf->dev,
4278:				"Currently, V4L2 is not supported on this model\n");
4279:			has_video = false;
4280:			dev->has_video = false;
4281:		}
4282:	
4283:		if (dev->board.has_dual_ts &&
4284:		    (dev->tuner_type != TUNER_ABSENT || INPUT(0)->type)) {
4285:			/*
4286:			 * The logic with sets alternate is not ready for dual-tuners
4287:			 * which analog modes.
4288:			 */
4289:			dev_err(&intf->dev,
4290:				"We currently don't support analog TV or stream capture on dual tuners.\n");
4291:			has_video = false;
4292:		}
4293:	
4294:		/* Select USB transfer types to use */
4295:		if (has_video) {
4296:			if (!dev->analog_ep_isoc || (try_bulk && dev->analog_ep_bulk))
4297:				dev->analog_xfer_bulk = 1;
4298:			dev_info(&intf->dev, "analog set to %s mode.\n",
4299:				dev->analog_xfer_bulk ? "bulk" : "isoc");
4300:		}
4301:		if (has_dvb) {
4302:			if (!dev->dvb_ep_isoc || (try_bulk && dev->dvb_ep_bulk))
4303:				dev->dvb_xfer_bulk = 1;
4304:			dev_info(&intf->dev, "dvb set to %s mode.\n",
4305:				dev->dvb_xfer_bulk ? "bulk" : "isoc");
4306:		}
4307:	
4308:		if (dev->board.has_dual_ts && em28xx_duplicate_dev(dev) == 0) {
4309:			kref_init(&dev->dev_next->ref);
4310:	
4311:			dev->dev_next->ts = SECONDARY_TS;
4312:			dev->dev_next->alt   = -1;
4313:			dev->dev_next->is_audio_only = has_vendor_audio &&
4314:							!(has_video || has_dvb);
4315:			dev->dev_next->has_video = false;
4316:			dev->dev_next->ifnum = ifnum;
4317:			dev->dev_next->model = id->driver_info;
4318:	
4319:			mutex_init(&dev->dev_next->lock);
4320:			retval = em28xx_init_dev(dev->dev_next, udev, intf,
4321:						 dev->dev_next->devno);
4322:			if (retval)
4323:				goto err_free;
4324:	
4325:			dev->dev_next->board.ir_codes = NULL; /* No IR for 2nd tuner */
4326:			dev->dev_next->board.has_ir_i2c = 0; /* No IR for 2nd tuner */
4327:	
4328:			if (usb_xfer_mode < 0) {
4329:				if (dev->dev_next->is_webcam)
4330:					try_bulk = 1;
4331:				else
4332:					try_bulk = 0;
4333:			} else {
4334:				try_bulk = usb_xfer_mode > 0;
4335:			}
4336:	
4337:			/* Select USB transfer types to use */
4338:			if (has_dvb) {
4339:				if (!dev->dvb_ep_isoc_ts2 ||
4340:				    (try_bulk && dev->dvb_ep_bulk_ts2))
4341:					dev->dev_next->dvb_xfer_bulk = 1;
4342:				dev_info(&dev->intf->dev, "dvb ts2 set to %s mode.\n",
4343:					 dev->dev_next->dvb_xfer_bulk ? "bulk" : "isoc");
4344:			}
4345:	
4346:			dev->dev_next->dvb_ep_isoc = dev->dvb_ep_isoc_ts2;
4347:			dev->dev_next->dvb_ep_bulk = dev->dvb_ep_bulk_ts2;
4348:			dev->dev_next->dvb_max_pkt_size_isoc = dev->dvb_max_pkt_size_isoc_ts2;
4349:			dev->dev_next->dvb_alt_isoc = dev->dvb_alt_isoc;
4350:	
4351:			/* Configure hardware to support TS2*/
4352:			if (dev->dvb_xfer_bulk) {
4353:				/* The ep4 and ep5 are configured for BULK */
4354:				em28xx_write_reg(dev, 0x0b, 0x96);
4355:				mdelay(100);
4356:				em28xx_write_reg(dev, 0x0b, 0x80);
4357:				mdelay(100);
4358:			} else {
4359:				/* The ep4 and ep5 are configured for ISO */
4360:				em28xx_write_reg(dev, 0x0b, 0x96);
4361:				mdelay(100);
4362:				em28xx_write_reg(dev, 0x0b, 0x82);
4363:				mdelay(100);
4364:			}
4365:		}
4366:	
4367:		request_modules(dev);
4368:	
4369:		/*
4370:		 * Do it at the end, to reduce dynamic configuration changes during
4371:		 * the device init. Yet, as request_modules() can be async, the
4372:		 * topology will likely change after the load of the em28xx subdrivers.
4373:		 */
4374:	#ifdef CONFIG_MEDIA_CONTROLLER
4375:		/*
4376:		 * No need to check the return value, the device will still be
4377:		 * usable without media controller API.
4378:		 */
4379:		retval = media_device_register(dev->media_dev);
4380:	#endif
4381:	
4382:		return 0;
4383:	
4384:	err_free:
4385:		kfree(dev->alt_max_pkt_size_isoc);
4386:		kfree(dev);
4387:	
4388:	err:
4389:		clear_bit(nr, em28xx_devused);
4390:	
4391:	err_no_slot:
4392:		usb_put_dev(udev);
4393:		return retval;
4394:	}
 SourceFile:drivers/media/usb/em28xx/em28xx-cards.c]

157/2 2026/08/07 16:20 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 113378
							output: 54
							thoughts: 157
						

Thoughts:
**My Thought Process on the em28xx Driver Initialization Flow**

Okay, so I'm tracing the initialization of the `em28xx` USB device driver, and a specific sequence of calls has caught my attention. It seems that the initial probe function, `em28xx_usb_probe`, is making a call to `request_modules(dev)`. My understanding is that `request_modules` is a mechanism to dynamically load additional, dependent kernel modules. In this context, I'm specifically looking at how the video capabilities are brought online, so I'm expecting it to load something like `em28xx-video`.

Indeed, my initial suspicion is confirmed: `request_modules` *does* load sub-modules, and `em28xx-video` is one of them. Now, within `em28xx-video`, the next critical step I'm observing is a call to `em28xx_v4l2_init`. This function, as its name suggests, is where the V4L2 (Video for Linux Two) subsystem is integrated.

Inside `em28xx_v4l2_init`, I see that `v4l2->v4l2_dev.mdev = dev->media_dev;` is being set. This looks like a crucial connection, linking the V4L2 device structure to the underlying media device structure that the `em28xx` driver is managing. This is likely the point where the V4L2 layer gains awareness of the hardware's media capabilities.

This then leads me to question the exact order of subdevice registration. My initial thought might be that `em28xx_v4l2_init` itself registers the subdevices. However, upon closer inspection, I need to be sure. I'm checking if the actual registration of subdevices is handled *within* `em28xx_v4l2_init`, or if it's a separate step. My current hypothesis, which I'm actively verifying by examining the code, is that the subdevices are registered using `v4l2_device_register_subdev`. I need to confirm whether `em28xx_v4l2_init` is the caller of this function, or if it prepares the necessary structures for a subsequent call to `v4l2_device_register_subdev` elsewhere. This is the precise point of detail I'm focusing on right now to fully understand the subdevice setup.


158/2 2026/08/07 16:21 tool codesearch-definition-source
0m Args:
map[ContextFile:drivers/media/usb/em28xx/em28xx-video.c Name:em28xx_v4l2_init]

Results:
map[SourceCode:2687:	static int em28xx_v4l2_init(struct em28xx *dev)
2688:	{
2689:		u8 val;
2690:		int ret;
2691:		unsigned int maxw;
2692:		struct v4l2_ctrl_handler *hdl;
2693:		struct em28xx_v4l2 *v4l2;
2694:	
2695:		if (dev->is_audio_only) {
2696:			/* Shouldn't initialize IR for this interface */
2697:			return 0;
2698:		}
2699:	
2700:		if (!dev->has_video) {
2701:			/* This device does not support the v4l2 extension */
2702:			return 0;
2703:		}
2704:	
2705:		dev_info(&dev->intf->dev, "Registering V4L2 extension\n");
2706:	
2707:		mutex_lock(&dev->lock);
2708:	
2709:		v4l2 = kzalloc_obj(*v4l2);
2710:		if (!v4l2) {
2711:			mutex_unlock(&dev->lock);
2712:			return -ENOMEM;
2713:		}
2714:		kref_init(&v4l2->ref);
2715:		v4l2->dev = dev;
2716:		dev->v4l2 = v4l2;
2717:	
2718:	#ifdef CONFIG_MEDIA_CONTROLLER
2719:		v4l2->v4l2_dev.mdev = dev->media_dev;
2720:	#endif
2721:		ret = v4l2_device_register(&dev->intf->dev, &v4l2->v4l2_dev);
2722:		if (ret < 0) {
2723:			dev_err(&dev->intf->dev,
2724:				"Call to v4l2_device_register() failed!\n");
2725:			goto err;
2726:		}
2727:	
2728:		hdl = &v4l2->ctrl_handler;
2729:		v4l2_ctrl_handler_init(hdl, 9);
2730:		v4l2->v4l2_dev.ctrl_handler = hdl;
2731:	
2732:		if (dev->is_webcam)
2733:			v4l2->progressive = true;
2734:	
2735:		/*
2736:		 * Default format, used for tvp5150 or saa711x output formats
2737:		 */
2738:		v4l2->vinmode = EM28XX_VINMODE_YUV422_CbYCrY;
2739:		v4l2->vinctl  = EM28XX_VINCTRL_INTERLACED |
2740:				EM28XX_VINCTRL_CCIR656_ENABLE;
2741:	
2742:		/* request some modules */
2743:	
2744:		if (dev->has_msp34xx)
2745:			v4l2_i2c_new_subdev(&v4l2->v4l2_dev,
2746:					    &dev->i2c_adap[dev->def_i2c_bus],
2747:					    "msp3400", 0, msp3400_addrs);
2748:	
2749:		if (dev->board.decoder == EM28XX_SAA711X)
2750:			v4l2_i2c_new_subdev(&v4l2->v4l2_dev,
2751:					    &dev->i2c_adap[dev->def_i2c_bus],
2752:					    "saa7115_auto", 0, saa711x_addrs);
2753:	
2754:		if (dev->board.decoder == EM28XX_TVP5150)
2755:			v4l2_i2c_new_subdev(&v4l2->v4l2_dev,
2756:					    &dev->i2c_adap[dev->def_i2c_bus],
2757:					    "tvp5150", 0, tvp5150_addrs);
2758:	
2759:		if (dev->board.adecoder == EM28XX_TVAUDIO)
2760:			v4l2_i2c_new_subdev(&v4l2->v4l2_dev,
2761:					    &dev->i2c_adap[dev->def_i2c_bus],
2762:					    "tvaudio", dev->board.tvaudio_addr, NULL);
2763:	
2764:		/* Initialize tuner and camera */
2765:	
2766:		if (dev->board.tuner_type != TUNER_ABSENT) {
2767:			unsigned short tuner_addr = dev->board.tuner_addr;
2768:			int has_demod = (dev->board.tda9887_conf & TDA9887_PRESENT);
2769:	
2770:			if (dev->board.radio.type)
2771:				v4l2_i2c_new_subdev(&v4l2->v4l2_dev,
2772:						    &dev->i2c_adap[dev->def_i2c_bus],
2773:						    "tuner", dev->board.radio_addr,
2774:						    NULL);
2775:	
2776:			if (has_demod)
2777:				v4l2_i2c_new_subdev(&v4l2->v4l2_dev,
2778:						    &dev->i2c_adap[dev->def_i2c_bus],
2779:						    "tuner", 0,
2780:						    v4l2_i2c_tuner_addrs(ADDRS_DEMOD));
2781:			if (tuner_addr == 0) {
2782:				enum v4l2_i2c_tuner_type type =
2783:					has_demod ? ADDRS_TV_WITH_DEMOD : ADDRS_TV;
2784:				struct v4l2_subdev *sd;
2785:	
2786:				sd = v4l2_i2c_new_subdev(&v4l2->v4l2_dev,
2787:							 &dev->i2c_adap[dev->def_i2c_bus],
2788:							 "tuner", 0,
2789:							 v4l2_i2c_tuner_addrs(type));
2790:	
2791:				if (sd)
2792:					tuner_addr = v4l2_i2c_subdev_addr(sd);
2793:			} else {
2794:				v4l2_i2c_new_subdev(&v4l2->v4l2_dev,
2795:						    &dev->i2c_adap[dev->def_i2c_bus],
2796:						    "tuner", tuner_addr, NULL);
2797:			}
2798:	
2799:			em28xx_tuner_setup(dev, tuner_addr);
2800:		}
2801:	
2802:		if (dev->em28xx_sensor != EM28XX_NOSENSOR)
2803:			em28xx_init_camera(dev);
2804:	
2805:		/* Configure audio */
2806:		ret = em28xx_audio_setup(dev);
2807:		if (ret < 0) {
2808:			dev_err(&dev->intf->dev,
2809:				"%s: Error while setting audio - error [%d]!\n",
2810:				__func__, ret);
2811:			goto unregister_dev;
2812:		}
2813:		if (dev->audio_mode.ac97 != EM28XX_NO_AC97) {
2814:			v4l2_ctrl_new_std(hdl, &em28xx_ctrl_ops,
2815:					  V4L2_CID_AUDIO_MUTE, 0, 1, 1, 1);
2816:			v4l2_ctrl_new_std(hdl, &em28xx_ctrl_ops,
2817:					  V4L2_CID_AUDIO_VOLUME, 0, 0x1f, 1, 0x1f);
2818:		} else {
2819:			/* install the em28xx notify callback */
2820:			v4l2_ctrl_notify(v4l2_ctrl_find(hdl, V4L2_CID_AUDIO_MUTE),
2821:					 em28xx_ctrl_notify, dev);
2822:			v4l2_ctrl_notify(v4l2_ctrl_find(hdl, V4L2_CID_AUDIO_VOLUME),
2823:					 em28xx_ctrl_notify, dev);
2824:		}
2825:	
2826:		/* wake i2c devices */
2827:		em28xx_wake_i2c(dev);
2828:	
2829:		/* init video dma queues */
2830:		INIT_LIST_HEAD(&dev->vidq.active);
2831:		INIT_LIST_HEAD(&dev->vbiq.active);
2832:	
2833:		if (dev->has_msp34xx) {
2834:			/* Send a reset to other chips via gpio */
2835:			ret = em28xx_write_reg(dev, EM2820_R08_GPIO_CTRL, 0xf7);
2836:			if (ret < 0) {
2837:				dev_err(&dev->intf->dev,
2838:					"%s: em28xx_write_reg - msp34xx(1) failed! error [%d]\n",
2839:					__func__, ret);
2840:				goto unregister_dev;
2841:			}
2842:			usleep_range(10000, 11000);
2843:	
2844:			ret = em28xx_write_reg(dev, EM2820_R08_GPIO_CTRL, 0xff);
2845:			if (ret < 0) {
2846:				dev_err(&dev->intf->dev,
2847:					"%s: em28xx_write_reg - msp34xx(2) failed! error [%d]\n",
2848:					__func__, ret);
2849:				goto unregister_dev;
2850:			}
2851:			usleep_range(10000, 11000);
2852:		}
2853:	
2854:		/* set default norm */
2855:		v4l2->norm = -1;
2856:		v4l2_device_call_all(&v4l2->v4l2_dev, 0, video, s_std, v4l2->norm);
2857:		v4l2->interlaced_fieldmode = EM28XX_INTERLACED_DEFAULT;
2858:	
2859:		/* Analog specific initialization */
2860:		v4l2->format = &format[0];
2861:	
2862:		maxw = norm_maxw(dev);
2863:		/*
2864:		 * MaxPacketSize for em2800 is too small to capture at full resolution
2865:		 * use half of maxw as the scaler can only scale to 50%
2866:		 */
2867:		if (dev->board.is_em2800)
2868:			maxw /= 2;
2869:	
2870:		em28xx_set_video_format(dev, format[0].fourcc,
2871:					maxw, norm_maxh(dev));
2872:	
2873:		video_mux(dev, 0);
2874:	
2875:		/* Audio defaults */
2876:		dev->mute = 1;
2877:		dev->volume = 0x1f;
2878:	
2879:	/*	em28xx_write_reg(dev, EM28XX_R0E_AUDIOSRC, 0xc0); audio register */
2880:		val = (u8)em28xx_read_reg(dev, EM28XX_R0F_XCLK);
2881:		em28xx_write_reg(dev, EM28XX_R0F_XCLK,
2882:				 (EM28XX_XCLK_AUDIO_UNMUTE | val));
2883:	
2884:		em28xx_set_outfmt(dev);
2885:	
2886:		/* Add image controls */
2887:	
2888:		/*
2889:		 * NOTE: at this point, the subdevices are already registered, so
2890:		 * bridge controls are only added/enabled when no subdevice provides
2891:		 * them
2892:		 */
2893:		if (!v4l2_ctrl_find(hdl, V4L2_CID_CONTRAST))
2894:			v4l2_ctrl_new_std(hdl, &em28xx_ctrl_ops,
2895:					  V4L2_CID_CONTRAST,
2896:					  0, 0x1f, 1, CONTRAST_DEFAULT);
2897:		if (!v4l2_ctrl_find(hdl, V4L2_CID_BRIGHTNESS))
2898:			v4l2_ctrl_new_std(hdl, &em28xx_ctrl_ops,
2899:					  V4L2_CID_BRIGHTNESS,
2900:					  -0x80, 0x7f, 1, BRIGHTNESS_DEFAULT);
2901:		if (!v4l2_ctrl_find(hdl, V4L2_CID_SATURATION))
2902:			v4l2_ctrl_new_std(hdl, &em28xx_ctrl_ops,
2903:					  V4L2_CID_SATURATION,
2904:					  0, 0x1f, 1, SATURATION_DEFAULT);
2905:		if (!v4l2_ctrl_find(hdl, V4L2_CID_BLUE_BALANCE))
2906:			v4l2_ctrl_new_std(hdl, &em28xx_ctrl_ops,
2907:					  V4L2_CID_BLUE_BALANCE,
2908:					  -0x30, 0x30, 1, BLUE_BALANCE_DEFAULT);
2909:		if (!v4l2_ctrl_find(hdl, V4L2_CID_RED_BALANCE))
2910:			v4l2_ctrl_new_std(hdl, &em28xx_ctrl_ops,
2911:					  V4L2_CID_RED_BALANCE,
2912:					  -0x30, 0x30, 1, RED_BALANCE_DEFAULT);
2913:		if (!v4l2_ctrl_find(hdl, V4L2_CID_SHARPNESS))
2914:			v4l2_ctrl_new_std(hdl, &em28xx_ctrl_ops,
2915:					  V4L2_CID_SHARPNESS,
2916:					  0, 0x0f, 1, SHARPNESS_DEFAULT);
2917:	
2918:		/* Reset image controls */
2919:		em28xx_colorlevels_set_default(dev);
2920:		v4l2_ctrl_handler_setup(hdl);
2921:		ret = hdl->error;
2922:		if (ret)
2923:			goto unregister_dev;
2924:	
2925:		/* allocate and fill video video_device struct */
2926:		em28xx_vdev_init(dev, &v4l2->vdev, &em28xx_video_template, "video");
2927:		mutex_init(&v4l2->vb_queue_lock);
2928:		mutex_init(&v4l2->vb_vbi_queue_lock);
2929:		v4l2->vdev.queue = &v4l2->vb_vidq;
2930:		v4l2->vdev.queue->lock = &v4l2->vb_queue_lock;
2931:		v4l2->vdev.device_caps = V4L2_CAP_READWRITE | V4L2_CAP_VIDEO_CAPTURE |
2932:					 V4L2_CAP_STREAMING;
2933:		if (dev->int_audio_type != EM28XX_INT_AUDIO_NONE)
2934:			v4l2->vdev.device_caps |= V4L2_CAP_AUDIO;
2935:		if (dev->tuner_type != TUNER_ABSENT || em28xx_analogtv_supported(dev))
2936:			v4l2->vdev.device_caps |= V4L2_CAP_TUNER;
2937:	
2938:		/* disable inapplicable ioctls */
2939:		if (dev->is_webcam) {
2940:			v4l2_disable_ioctl(&v4l2->vdev, VIDIOC_QUERYSTD);
2941:			v4l2_disable_ioctl(&v4l2->vdev, VIDIOC_G_STD);
2942:			v4l2_disable_ioctl(&v4l2->vdev, VIDIOC_S_STD);
2943:		} else {
2944:			v4l2_disable_ioctl(&v4l2->vdev, VIDIOC_S_PARM);
2945:		}
2946:		if ((v4l2->vdev.device_caps & V4L2_CAP_TUNER) == 0) {
2947:			v4l2_disable_ioctl(&v4l2->vdev, VIDIOC_G_TUNER);
2948:			v4l2_disable_ioctl(&v4l2->vdev, VIDIOC_S_TUNER);
2949:			v4l2_disable_ioctl(&v4l2->vdev, VIDIOC_G_FREQUENCY);
2950:			v4l2_disable_ioctl(&v4l2->vdev, VIDIOC_S_FREQUENCY);
2951:		}
2952:		if (dev->int_audio_type == EM28XX_INT_AUDIO_NONE) {
2953:			v4l2_disable_ioctl(&v4l2->vdev, VIDIOC_G_AUDIO);
2954:			v4l2_disable_ioctl(&v4l2->vdev, VIDIOC_S_AUDIO);
2955:		}
2956:	
2957:		if (dev->chip_id == CHIP_ID_EM2828X || dev->board.decoder == EM28XX_BUILTIN)
2958:			v4l2_disable_ioctl(&v4l2->vdev, VIDIOC_ENUM_FRAMESIZES);
2959:	
2960:		/* register v4l2 video video_device */
2961:		ret = video_register_device(&v4l2->vdev, VFL_TYPE_VIDEO,
2962:					    video_nr[dev->devno]);
2963:		if (ret) {
2964:			dev_err(&dev->intf->dev,
2965:				"unable to register video device (error=%i).\n", ret);
2966:			goto unregister_dev;
2967:		}
2968:	
2969:		/* Allocate and fill vbi video_device struct */
2970:		if (em28xx_vbi_supported(dev) == 1) {
2971:			em28xx_vdev_init(dev, &v4l2->vbi_dev, &em28xx_video_template,
2972:					 "vbi");
2973:	
2974:			v4l2->vbi_dev.queue = &v4l2->vb_vbiq;
2975:			v4l2->vbi_dev.queue->lock = &v4l2->vb_vbi_queue_lock;
2976:			v4l2->vbi_dev.device_caps = V4L2_CAP_STREAMING |
2977:				V4L2_CAP_READWRITE | V4L2_CAP_VBI_CAPTURE;
2978:			if ((v4l2->vdev.device_caps & V4L2_CAP_TUNER) == 0)
2979:				v4l2->vbi_dev.device_caps |= V4L2_CAP_TUNER;
2980:	
2981:			/* disable inapplicable ioctls */
2982:			v4l2_disable_ioctl(&v4l2->vbi_dev, VIDIOC_S_PARM);
2983:			if ((v4l2->vbi_dev.device_caps & V4L2_CAP_TUNER) == 0) {
2984:				v4l2_disable_ioctl(&v4l2->vbi_dev, VIDIOC_G_TUNER);
2985:				v4l2_disable_ioctl(&v4l2->vbi_dev, VIDIOC_S_TUNER);
2986:				v4l2_disable_ioctl(&v4l2->vbi_dev, VIDIOC_G_FREQUENCY);
2987:				v4l2_disable_ioctl(&v4l2->vbi_dev, VIDIOC_S_FREQUENCY);
2988:			}
2989:			if (dev->int_audio_type == EM28XX_INT_AUDIO_NONE) {
2990:				v4l2_disable_ioctl(&v4l2->vbi_dev, VIDIOC_G_AUDIO);
2991:				v4l2_disable_ioctl(&v4l2->vbi_dev, VIDIOC_S_AUDIO);
2992:			}
2993:	
2994:			/* register v4l2 vbi video_device */
2995:			ret = video_register_device(&v4l2->vbi_dev, VFL_TYPE_VBI,
2996:						    vbi_nr[dev->devno]);
2997:			if (ret < 0) {
2998:				dev_err(&dev->intf->dev,
2999:					"unable to register vbi device\n");
3000:				goto unregister_dev;
3001:			}
3002:		}
3003:	
3004:		if (em28xx_boards[dev->model].radio.type == EM28XX_RADIO) {
3005:			em28xx_vdev_init(dev, &v4l2->radio_dev, &em28xx_radio_template,
3006:					 "radio");
3007:			v4l2->radio_dev.device_caps = V4L2_CAP_RADIO | V4L2_CAP_TUNER;
3008:			ret = video_register_device(&v4l2->radio_dev, VFL_TYPE_RADIO,
3009:						    radio_nr[dev->devno]);
3010:			if (ret < 0) {
3011:				dev_err(&dev->intf->dev,
3012:					"can't register radio device\n");
3013:				goto unregister_dev;
3014:			}
3015:			dev_info(&dev->intf->dev,
3016:				 "Registered radio device as %s\n",
3017:				 video_device_node_name(&v4l2->radio_dev));
3018:		}
3019:	
3020:		/* Init entities at the Media Controller */
3021:		em28xx_v4l2_create_entities(dev);
3022:	
3023:	#ifdef CONFIG_MEDIA_CONTROLLER
3024:		ret = v4l2_mc_create_media_graph(dev->media_dev);
3025:		if (ret) {
3026:			dev_err(&dev->intf->dev,
3027:				"failed to create media graph\n");
3028:			em28xx_v4l2_media_release(dev);
3029:			goto unregister_dev;
3030:		}
3031:	#endif
3032:	
3033:		dev_info(&dev->intf->dev,
3034:			 "V4L2 video device registered as %s\n",
3035:			 video_device_node_name(&v4l2->vdev));
3036:	
3037:		if (video_is_registered(&v4l2->vbi_dev))
3038:			dev_info(&dev->intf->dev,
3039:				 "V4L2 VBI device registered as %s\n",
3040:				 video_device_node_name(&v4l2->vbi_dev));
3041:	
3042:		/* Save some power by putting tuner to sleep */
3043:		v4l2_device_call_all(&v4l2->v4l2_dev, 0, tuner, standby);
3044:	
3045:		/* initialize videobuf2 stuff */
3046:		em28xx_vb2_setup(dev);
3047:	
3048:		dev_info(&dev->intf->dev,
3049:			 "V4L2 extension successfully initialized\n");
3050:	
3051:		kref_get(&dev->ref);
3052:	
3053:		mutex_unlock(&dev->lock);
3054:		return 0;
3055:	
3056:	unregister_dev:
3057:		if (video_is_registered(&v4l2->radio_dev)) {
3058:			dev_info(&dev->intf->dev,
3059:				 "V4L2 device %s deregistered\n",
3060:				 video_device_node_name(&v4l2->radio_dev));
3061:			video_unregister_device(&v4l2->radio_dev);
3062:		}
3063:		if (video_is_registered(&v4l2->vbi_dev)) {
3064:			dev_info(&dev->intf->dev,
3065:				 "V4L2 device %s deregistered\n",
3066:				 video_device_node_name(&v4l2->vbi_dev));
3067:			video_unregister_device(&v4l2->vbi_dev);
3068:		}
3069:		if (video_is_registered(&v4l2->vdev)) {
3070:			dev_info(&dev->intf->dev,
3071:				 "V4L2 device %s deregistered\n",
3072:				 video_device_node_name(&v4l2->vdev));
3073:			video_unregister_device(&v4l2->vdev);
3074:		}
3075:	
3076:		v4l2_ctrl_handler_free(&v4l2->ctrl_handler);
3077:		v4l2_device_unregister(&v4l2->v4l2_dev);
3078:	err:
3079:		dev->v4l2 = NULL;
3080:		kref_put(&v4l2->ref, em28xx_free_v4l2);
3081:		mutex_unlock(&dev->lock);
3082:		return ret;
3083:	}
 SourceFile:drivers/media/usb/em28xx/em28xx-video.c]

159/2 2026/08/07 16:21 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 121278
							output: 56
							thoughts: 451
						

Thoughts:
**My Thought Process Regarding `em28xx` and V4L2 Subdevice Registration Safety**

Alright, so I'm dissecting this `em28xx_v4l2_init` function, and my initial thought was about the call chain: `em28xx_v4l2_init` -> `v4l2_i2c_new_subdev` -> `v4l2_device_register_subdev`. I noticed that `v4l2->v4l2_dev.mdev = dev->media_dev;` is set *before* `v4l2_device_register(&dev->intf->dev, &v4l2->v4l2_dev);`. This sequence immediately gave me a sense of safety for `em28xx` in this specific scenario, as the media device seems to be established prior to the broader V4L2 device registration.

However, as is my nature, I had to push further and consider edge cases. My next mental jump was: "What if `v4l2_device_register_subdev` is called, but `v4l2_dev->mdev` *isn't* set, and then it's *never* set later?" If `v4l2_dev->mdev` remains NULL throughout, then `sd->entity.graph_obj.mdev` would also be NULL. Crucially, since `sd->v4l2_dev->mdev` is *also* NULL in this hypothetical, the critical check `if (sd->v4l2_dev->mdev && sd->entity.graph_obj.mdev->dev)` would correctly evaluate to false. This means, in that particular failure mode, there's no crash, which is good!

My focus then shifted to the *only* scenario where a crash *could* occur: if `sd->v4l2_dev->mdev` is NON-NULL, but `sd->entity.graph_obj.mdev` is NULL. The question then became, "How could *that* specific imbalance arise?" I brainstormed two possibilities:

1.  The assignment `v4l2_dev->mdev = ...` happens *after* `v4l2_device_register_subdev` has already been called.
2.  There was a failure during `media_device_register_entity`, but the driver somehow bypassed the error and kept the subdevice registered in its internal list.

I immediately questioned the second possibility. My understanding is that `__v4l2_device_register_subdev` is designed to return an error precisely when `media_device_register_entity` fails. So, if that error is returned, the caller *should* be handling it. This led me to loop back and specifically examine the error handling within `v4l2_i2c_new_subdev` to confirm my suspicion about how these errors are propagated and managed.


160/2 2026/08/07 16:21 tool codesearch-definition-source
0m Args:
map[ContextFile:drivers/media/v4l2-core/v4l2-common.c Name:v4l2_i2c_new_subdev]

Results:
map[SourceCode: 120:	struct v4l2_subdev *v4l2_i2c_new_subdev(struct v4l2_device *v4l2_dev,
 121:						struct i2c_adapter *adapter,
 122:						const char *client_type,
 123:						u8 addr,
 124:						const unsigned short *probe_addrs)
 125:	{
 126:		struct i2c_board_info info;
 127:	
 128:		/*
 129:		 * Setup the i2c board info with the device type and
 130:		 * the device address.
 131:		 */
 132:		memset(&info, 0, sizeof(info));
 133:		strscpy(info.type, client_type, sizeof(info.type));
 134:		info.addr = addr;
 135:	
 136:		return v4l2_i2c_new_subdev_board(v4l2_dev, adapter, &info,
 137:						 probe_addrs);
 138:	}
 SourceFile:drivers/media/v4l2-core/v4l2-i2c.c]

161/2 2026/08/07 16:21 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 122110
							output: 60
							thoughts: 21
						

Thoughts:
**My Thought Process**

Okay, so my immediate instinct here is to dig into `v4l2_i2c_new_subdev_board`. This is where the rubber meets the road, so to speak, for registering a V4L2 subdevice that's connected over I2C. I want to understand exactly *how* this function is orchestrating the setup of the subdevice, particularly the I2C bus interaction.

I'm particularly interested in the arguments being passed to it. What exactly is being provided in terms of device information, configuration, and of course, the I2C client structure that will be used to communicate with the hardware. I need to see if the device-specific quirks or platform data are being correctly incorporated. This is crucial for ensuring the subdevice is initialized with the right parameters and can properly enumerate and interact with its underlying hardware.

Beyond the direct arguments, I'll be looking at the internal logic of `v4l2_i2c_new_subdev_board`. How is it handling potential errors during registration? What are the different paths it can take depending on the provided information? Is it relying on existing I2C devices, or is it creating new ones? My goal is to trace the flow from the function call to the point where the subdevice is recognized and usable by the V4L2 framework, with a sharp focus on the I2C communication layer. This function is the linchpin, and a thorough understanding of its mechanics is essential.


162/2 2026/08/07 16:22 tool codesearch-definition-source
0m Args:
map[ContextFile:drivers/media/v4l2-core/v4l2-i2c.c Name:v4l2_i2c_new_subdev_board]

Results:
map[SourceCode:  61:	/* Load an i2c sub-device. */
  62:	struct v4l2_subdev
  63:	*v4l2_i2c_new_subdev_board(struct v4l2_device *v4l2_dev,
  64:				   struct i2c_adapter *adapter,
  65:				   struct i2c_board_info *info,
  66:				   const unsigned short *probe_addrs)
  67:	{
  68:		struct v4l2_subdev *sd = NULL;
  69:		struct i2c_client *client;
  70:	
  71:		if (!v4l2_dev)
  72:			return NULL;
  73:	
  74:		request_module(I2C_MODULE_PREFIX "%s", info->type);
  75:	
  76:		/* Create the i2c client */
  77:		if (info->addr == 0 && probe_addrs)
  78:			client = i2c_new_scanned_device(adapter, info, probe_addrs,
  79:							NULL);
  80:		else
  81:			client = i2c_new_client_device(adapter, info);
  82:	
  83:		/*
  84:		 * Note: by loading the module first we are certain that c->driver
  85:		 * will be set if the driver was found. If the module was not loaded
  86:		 * first, then the i2c core tries to delay-load the module for us,
  87:		 * and then c->driver is still NULL until the module is finally
  88:		 * loaded. This delay-load mechanism doesn't work if other drivers
  89:		 * want to use the i2c device, so explicitly loading the module
  90:		 * is the best alternative.
  91:		 */
  92:		if (!i2c_client_has_driver(client))
  93:			goto error;
  94:	
  95:		/* Lock the module so we can safely get the v4l2_subdev pointer */
  96:		if (!try_module_get(client->dev.driver->owner))
  97:			goto error;
  98:		sd = i2c_get_clientdata(client);
  99:	
 100:		/*
 101:		 * Register with the v4l2_device which increases the module's
 102:		 * use count as well.
 103:		 */
 104:		if (__v4l2_device_register_subdev(v4l2_dev, sd, sd->owner))
 105:			sd = NULL;
 106:		/* Decrease the module use count to match the first try_module_get. */
 107:		module_put(client->dev.driver->owner);
 108:	
 109:	error:
 110:		/*
 111:		 * If we have a client but no subdev, then something went wrong and
 112:		 * we must unregister the client.
 113:		 */
 114:		if (!IS_ERR(client) && !sd)
 115:			i2c_unregister_device(client);
 116:		return sd;
 117:	}
 SourceFile:drivers/media/v4l2-core/v4l2-i2c.c]

163/2 2026/08/07 16:22 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 123082
							output: 54
							thoughts: 63
						

Thoughts:
**My Thought Process on Subdevice Registration and Cleanup**

So, I'm analyzing this code, and my immediate concern is error handling, specifically when `__v4l2_device_register_subdev` doesn't go as planned. My understanding is that if that registration function returns an error, the `sd` pointer will be NULL. And crucially, in that failure scenario, `i2c_unregister_device` is immediately invoked. This tells me that if the subdevice registration fails, the subdevice is effectively destroyed or cleaned up right then and there.

This leads me to a related question: what's happening with `v4l2_spi_new_subdev` in this context? I need to understand if its behavior mirrors this failure and cleanup pattern, or if it has its own distinct error handling pathway. I'm trying to connect the dots between how these different subdevice creation and registration mechanisms manage resources when things go wrong.


164/2 2026/08/07 16:22 tool codesearch-definition-source
0m Args:
map[ContextFile:drivers/media/v4l2-core/v4l2-spi.c Name:v4l2_spi_new_subdev]

Results:
map[SourceCode:  36:	struct v4l2_subdev *v4l2_spi_new_subdev(struct v4l2_device *v4l2_dev,
  37:						struct spi_controller *ctlr,
  38:						struct spi_board_info *info)
  39:	{
  40:		struct v4l2_subdev *sd = NULL;
  41:		struct spi_device *spi = NULL;
  42:	
  43:		if (!v4l2_dev)
  44:			return NULL;
  45:		if (info->modalias[0])
  46:			request_module(info->modalias);
  47:	
  48:		spi = spi_new_device(ctlr, info);
  49:	
  50:		if (!spi || !spi->dev.driver)
  51:			goto error;
  52:	
  53:		if (!try_module_get(spi->dev.driver->owner))
  54:			goto error;
  55:	
  56:		sd = spi_get_drvdata(spi);
  57:	
  58:		/*
  59:		 * Register with the v4l2_device which increases the module's
  60:		 * use count as well.
  61:		 */
  62:		if (__v4l2_device_register_subdev(v4l2_dev, sd, sd->owner))
  63:			sd = NULL;
  64:	
  65:		/* Decrease the module use count to match the first try_module_get. */
  66:		module_put(spi->dev.driver->owner);
  67:	
  68:	error:
  69:		/*
  70:		 * If we have a client but no subdev, then something went wrong and
  71:		 * we must unregister the client.
  72:		 */
  73:		if (!sd)
  74:			spi_unregister_device(spi);
  75:	
  76:		return sd;
  77:	}
 SourceFile:drivers/media/v4l2-core/v4l2-spi.c]

165/2 2026/08/07 16:22 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 123764
							output: 49
							thoughts: 821
						

Thoughts:
Here are my thoughts:

**My Thought Process on Subdevice Registration and Unregistration within the V4L2 Framework**

I'm on the same page as you regarding the initial point: if `__v4l2_device_register_subdev` fails, the subdevice isn't retained. That's a fundamental aspect of robust error handling.

My immediate follow-up thought then was about the *direct* invocation of `v4l2_device_register_subdev` by a driver, like `v4l2_device_register_subdev(v4l2_dev, sd)`. The critical question became: what happens if this direct call fails? Does the driver simply ignore the error and proceed, or is it correctly propagated? To answer this, I decided to examine the callers of `v4l2_device_register_subdev`.

I found two illustrative examples:

*   In `drivers/media/pci/cx18/cx18-gpio.c`, the call is `return v4l2_device_register_subdev(&cx->v4l2_dev, sd);`. Here, the error is clearly returned by the function, indicating that the caller is expected to handle it.
*   In `drivers/media/pci/intel/ipu3/ipu3-cio2.c`, the pattern is `r = v4l2_device_register_subdev(&cio2->v4l2_dev, subdev); if (r) { ... goto fail_subdev; }`. This explicitly shows the error being checked and handled, which is the correct behavior.

This confirmed that drivers are generally expected to handle the failure of `v4l2_device_register_subdev`.

However, I then started thinking about a more subtle scenario: what if `media_device_register_entity` succeeds, but `sd->entity.graph_obj.mdev` somehow gets cleared *after* that? My mind immediately went to `media_device_unregister_entity`.

The next logical step was to determine when `media_device_unregister_entity` is actually called. I found that it's invoked within `v4l2_device_unregister_subdev`. Looking at the `v4l2_device_unregister_subdev` implementation, I noticed something quite important:

```c
void v4l2_device_unregister_subdev(struct v4l2_subdev *sd)
{
	// ... (initial checks) ...
	v4l2_dev = sd->v4l2_dev;

	// ... (list management and unregistered callback) ...
	sd->v4l2_dev = NULL;

#if defined(CONFIG_MEDIA_CONTROLLER)
	if (v4l2_dev->mdev) {
		/*
		 * No need to check if the entity was registered.
		 * media_device_unregister_entity() does that.
		 */
		media_device_unregister_entity(&sd->entity);
	}
#endif
	video_unregister_device(sd->devnode); // <-- THIS LINE
	// ... (module put) ...
}
```

My mind immediately seized on the order of operations here: `video_unregister_device(sd->devnode)` is called *after* `media_device_unregister_entity(&sd->entity)`.

This sequence raised a significant concern for me. When `video_unregister_device` is called, the device node is indeed unregistered. However, and this is the crucial point, `video_unregister_device` doesn't *immediately* free the device node if it's currently open by a process.

Then, the thought crystallized: if a process is currently within `subdev_open`, it might have already looked up the `vdev` using `video_devdata(file)`. What happens if `video_unregister_device` is called while such a process is holding onto a reference or is mid-operation? This led me to investigate the behavior of `chrdev_open` and `v4l2_open` in relation to `video_unregister_device` to understand the exact state transitions and potential race conditions.


166/2 2026/08/07 16:23 tool codesearch-definition-source
0m Args:
map[ContextFile:drivers/media/v4l2-core/v4l2-dev.c Name:v4l2_open]

Results:
map[SourceCode: 410:	/* Override for the open function */
 411:	static int v4l2_open(struct inode *inode, struct file *filp)
 412:	{
 413:		struct video_device *vdev;
 414:		int ret;
 415:	
 416:		/* Check if the video device is available */
 417:		mutex_lock(&videodev_lock);
 418:		vdev = video_devdata(filp);
 419:		/* return ENODEV if the video device has already been removed. */
 420:		if (vdev == NULL || !video_is_registered(vdev)) {
 421:			mutex_unlock(&videodev_lock);
 422:			return -ENODEV;
 423:		}
 424:		/* and increase the device refcount */
 425:		video_get(vdev);
 426:		mutex_unlock(&videodev_lock);
 427:	
 428:		if (!video_is_registered(vdev)) {
 429:			ret = -ENODEV;
 430:			goto done;
 431:		}
 432:	
 433:		ret = vdev->fops->open(filp);
 434:		if (ret)
 435:			goto done;
 436:	
 437:		/* All drivers must use v4l2_fh. */
 438:		if (WARN_ON(!test_bit(V4L2_FL_USES_V4L2_FH, &vdev->flags))) {
 439:			vdev->fops->release(filp);
 440:			ret = -ENODEV;
 441:		}
 442:	
 443:	done:
 444:		if (vdev->dev_debug & V4L2_DEV_DEBUG_FOP)
 445:			dprintk("%s: open (%d)\n",
 446:				video_device_node_name(vdev), ret);
 447:	
 448:		/* decrease the refcount in case of an error */
 449:		if (ret)
 450:			video_put(vdev);
 451:		return ret;
 452:	}
 SourceFile:drivers/media/v4l2-core/v4l2-dev.c]

167/2 2026/08/07 16:23 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 125282
							output: 31
							thoughts: 593
						

Thoughts:
**My Thought Process Unraveling a Concurrency Bug**

My initial focus was on the `v4l2_open` function and its check using `video_is_registered(vdev)`. I was contemplating a scenario where `video_unregister_device` might be called concurrently with `v4l2_open`. In such a case, I reasoned, `video_is_registered` could still return true, leading to the execution of `vdev->fops->open(filp)`.

This led me to examine the `subdev_open` function, which is what `vdev->fops->open` resolves to. Inside `subdev_open`, there's a critical check:

```c
if (sd->v4l2_dev->mdev && sd->entity.graph_obj.mdev->dev) {
```

My immediate concern was what would happen if `v4l2_device_unregister_subdev` was executing concurrently. I outlined the steps involved in `v4l2_device_unregister_subdev`:

1.  It sets `sd->v4l2_dev = NULL`.
2.  It calls `media_device_unregister_entity(&sd->entity)`.
3.  It calls `video_unregister_device(sd->devnode)`.

The crucial point here was the initial step: `sd->v4l2_dev = NULL;`. My thought was that if this happened *before* the check in `subdev_open`, then `sd->v4l2_dev->mdev` would inevitably lead to a NULL pointer dereference.

However, the observed crash was a NULL pointer dereference at `sd->entity.graph_obj.mdev->dev`. This contradicted my initial hypothesis. It implied that `sd->v4l2_dev` was *not* NULL, and `sd->v4l2_dev->mdev` was also *not* NULL. Instead, `sd->entity.graph_obj.mdev` itself *was* NULL.

This presented a puzzle: how could `sd->entity.graph_obj.mdev` become NULL concurrently while `sd->v4l2_dev` remained valid? I knew that `media_device_unregister_entity` is responsible for setting `entity->graph_obj.mdev = NULL`. But then I recalled the sequence in `v4l2_device_unregister_subdev` again. It sets `sd->v4l2_dev = NULL;` *before* calling `media_device_unregister_entity`.

This created a new paradox in my thinking. If `sd->v4l2_dev` were truly NULL at that point, then `subdev_open` *should* have crashed at `sd->v4l2_dev->mdev` first. But it wasn't. The crash was happening at a different, albeit related, field.

This realization forced me to re-evaluate. The crash at `sd->entity.graph_obj.mdev->dev` meant that `sd->v4l2_dev` was still pointing to a valid structure, and its `mdev` field was also valid. This strongly suggested that the `sd->v4l2_dev = NULL;` line within `v4l2_device_unregister_subdev` had either not yet executed, or had been executed in a way that didn't impact the `subdev_open` path in the specific moment of the crash.

The core of my confusion then became: if `v4l2_device_unregister_subdev` is the only path setting `sd->v4l2_dev` to NULL and unregistering the entity, and the crash is at `sd->entity.graph_obj.mdev->dev` while `sd->v4l2_dev` is *not* NULL, then is there another function that could be calling `media_device_unregister_entity` in a way that corrupts `sd->entity.graph_obj.mdev` without affecting `sd->v4l2_dev` first? This led me to ask myself: "Wait, is there any OTHER place where `media_device_unregister_entity` is called?" My next step was to dive into the code to find out.


168/2 2026/08/07 16:24 tool grepper
0m Args:
map[Expression:media_device_unregister_entity PathPrefix:drivers/media/]

Results:
map[Output:drivers/media/dvb-core/dvbdev.c=207=static void dvb_media_device_free(struct dvb_device *dvbdev)
--
drivers/media/dvb-core/dvbdev.c-210-	if (dvbdev->entity) {
drivers/media/dvb-core/dvbdev.c:211:		media_device_unregister_entity(dvbdev->entity);
drivers/media/dvb-core/dvbdev.c-212-		kfree(dvbdev->entity);
--
drivers/media/dvb-core/dvbdev.c-221-		for (i = 0; i < dvbdev->tsout_num_entities; i++) {
drivers/media/dvb-core/dvbdev.c:222:			media_device_unregister_entity(&dvbdev->tsout_entity[i]);
drivers/media/dvb-core/dvbdev.c-223-			kfree(dvbdev->tsout_entity[i].name);
--
drivers/media/dvb-core/dvbdev.c-238-	if (dvbdev->adapter->conn) {
drivers/media/dvb-core/dvbdev.c:239:		media_device_unregister_entity(dvbdev->adapter->conn);
drivers/media/dvb-core/dvbdev.c-240-		kfree(dvbdev->adapter->conn);
--
drivers/media/i2c/tvp5150.c=1602=static int tvp5150_registered(struct v4l2_subdev *sd)
--
drivers/media/i2c/tvp5150.c-1666-	for (i = 0; i < decoder->connectors_num; i++) {
drivers/media/i2c/tvp5150.c:1667:		media_device_unregister_entity(&decoder->connectors[i].ent);
drivers/media/i2c/tvp5150.c-1668-		media_entity_cleanup(&decoder->connectors[i].ent);
--
drivers/media/i2c/tvp5150.c=2237=static void tvp5150_remove(struct i2c_client *c)
--
drivers/media/i2c/tvp5150.c-2249-	for (i = 0; i < decoder->connectors_num; i++) {
drivers/media/i2c/tvp5150.c:2250:		media_device_unregister_entity(&decoder->connectors[i].ent);
drivers/media/i2c/tvp5150.c-2251-		media_entity_cleanup(&decoder->connectors[i].ent);
--
drivers/media/mc/mc-device.c=570=static void media_device_release(struct media_devnode *devnode)
--
drivers/media/mc/mc-device.c-574-
drivers/media/mc/mc-device.c:575:static void __media_device_unregister_entity(struct media_entity *entity)
drivers/media/mc/mc-device.c-576-{
--
drivers/media/mc/mc-device.c=605=int __must_check media_device_register_entity(struct media_device *mdev,
--
drivers/media/mc/mc-device.c-655-		if (ret) {
drivers/media/mc/mc-device.c:656:			__media_device_unregister_entity(entity);
drivers/media/mc/mc-device.c-657-			mutex_unlock(&mdev->graph_mutex);
--
drivers/media/mc/mc-device.c=667=EXPORT_SYMBOL_GPL(media_device_register_entity);
drivers/media/mc/mc-device.c-668-
drivers/media/mc/mc-device.c:669:void media_device_unregister_entity(struct media_entity *entity)
drivers/media/mc/mc-device.c-670-{
--
drivers/media/mc/mc-device.c-676-	mutex_lock(&mdev->graph_mutex);
drivers/media/mc/mc-device.c:677:	__media_device_unregister_entity(entity);
drivers/media/mc/mc-device.c-678-	mutex_unlock(&mdev->graph_mutex);
drivers/media/mc/mc-device.c-679-}
drivers/media/mc/mc-device.c:680:EXPORT_SYMBOL_GPL(media_device_unregister_entity);
drivers/media/mc/mc-device.c-681-
--
drivers/media/mc/mc-device.c=791=EXPORT_SYMBOL_GPL(media_device_register_entity_notify);
--
drivers/media/mc/mc-device.c-795- */
drivers/media/mc/mc-device.c:796:static void __media_device_unregister_entity_notify(struct media_device *mdev,
drivers/media/mc/mc-device.c-797-					struct media_entity_notify *nptr)
--
drivers/media/mc/mc-device.c-801-
drivers/media/mc/mc-device.c:802:void media_device_unregister_entity_notify(struct media_device *mdev,
drivers/media/mc/mc-device.c-803-					struct media_entity_notify *nptr)
--
drivers/media/mc/mc-device.c-805-	mutex_lock(&mdev->graph_mutex);
drivers/media/mc/mc-device.c:806:	__media_device_unregister_entity_notify(mdev, nptr);
drivers/media/mc/mc-device.c-807-	mutex_unlock(&mdev->graph_mutex);
drivers/media/mc/mc-device.c-808-}
drivers/media/mc/mc-device.c:809:EXPORT_SYMBOL_GPL(media_device_unregister_entity_notify);
drivers/media/mc/mc-device.c-810-
drivers/media/mc/mc-device.c=811=void media_device_unregister(struct media_device *mdev)
--
drivers/media/mc/mc-device.c-833-	list_for_each_entry_safe(entity, next, &mdev->entities, graph_obj.list)
drivers/media/mc/mc-device.c:834:		__media_device_unregister_entity(entity);
drivers/media/mc/mc-device.c-835-
--
drivers/media/mc/mc-device.c-837-	list_for_each_entry_safe(notify, nextp, &mdev->entity_notify, list)
drivers/media/mc/mc-device.c:838:		__media_device_unregister_entity_notify(mdev, notify);
drivers/media/mc/mc-device.c-839-
--
drivers/media/pci/saa7134/saa7134-core.c=796=static void saa7134_media_release(struct saa7134_dev *dev)
--
drivers/media/pci/saa7134/saa7134-core.c-801-	for (i = 0; i < SAA7134_INPUT_MAX + 1; i++)
drivers/media/pci/saa7134/saa7134-core.c:802:		media_device_unregister_entity(&dev->input_ent[i]);
drivers/media/pci/saa7134/saa7134-core.c-803-#endif
--
drivers/media/platform/nxp/imx8-isi/imx8-isi-m2m.c=732=int mxc_isi_m2m_register(struct mxc_isi_dev *isi, struct v4l2_device *v4l2_dev)
--
drivers/media/platform/nxp/imx8-isi/imx8-isi-m2m.c-835-err_entity_unreg:
drivers/media/platform/nxp/imx8-isi/imx8-isi-m2m.c:836:	media_device_unregister_entity(&vdev->entity);
drivers/media/platform/nxp/imx8-isi/imx8-isi-m2m.c-837-err_entity_cleanup:
--
drivers/media/platform/verisilicon/hantro_drv.c=780=static int hantro_attach_func(struct hantro_dev *vpu,
--
drivers/media/platform/verisilicon/hantro_drv.c-861-err_rel_entity2:
drivers/media/platform/verisilicon/hantro_drv.c:862:	media_device_unregister_entity(&func->sink);
drivers/media/platform/verisilicon/hantro_drv.c-863-
drivers/media/platform/verisilicon/hantro_drv.c-864-err_rel_entity1:
drivers/media/platform/verisilicon/hantro_drv.c:865:	media_device_unregister_entity(&func->proc);
drivers/media/platform/verisilicon/hantro_drv.c-866-
drivers/media/platform/verisilicon/hantro_drv.c-867-err_rel_entity0:
drivers/media/platform/verisilicon/hantro_drv.c:868:	media_device_unregister_entity(&func->vdev.entity);
drivers/media/platform/verisilicon/hantro_drv.c-869-	return ret;
--
drivers/media/platform/verisilicon/hantro_drv.c=872=static void hantro_detach_func(struct hantro_func *func)
--
drivers/media/platform/verisilicon/hantro_drv.c-877-	media_entity_remove_links(&func->vdev.entity);
drivers/media/platform/verisilicon/hantro_drv.c:878:	media_device_unregister_entity(&func->sink);
drivers/media/platform/verisilicon/hantro_drv.c:879:	media_device_unregister_entity(&func->proc);
drivers/media/platform/verisilicon/hantro_drv.c:880:	media_device_unregister_entity(&func->vdev.entity);
drivers/media/platform/verisilicon/hantro_drv.c-881-}
--
drivers/media/tuners/si2157.c=1074=static void si2157_remove(struct i2c_client *client)
--
drivers/media/tuners/si2157.c-1085-	if (dev->mdev)
drivers/media/tuners/si2157.c:1086:		media_device_unregister_entity(&dev->ent);
drivers/media/tuners/si2157.c-1087-#endif
--
drivers/media/usb/au0828/au0828-core.c=125=static void au0828_unregister_media_device(struct au0828_dev *dev)
--
drivers/media/usb/au0828/au0828-core.c-137-			continue;
drivers/media/usb/au0828/au0828-core.c:138:		media_device_unregister_entity_notify(mdev, notify);
drivers/media/usb/au0828/au0828-core.c-139-	}
--
drivers/media/usb/au0828/au0828-video.c=622=void au0828_usb_v4l2_media_release(struct au0828_dev *dev)
--
drivers/media/usb/au0828/au0828-video.c-629-			return;
drivers/media/usb/au0828/au0828-video.c:630:		media_device_unregister_entity(&dev->input_ent[i]);
drivers/media/usb/au0828/au0828-video.c-631-	}
--
drivers/media/usb/em28xx/em28xx-video.c=994=static void em28xx_v4l2_media_release(struct em28xx *dev)
--
drivers/media/usb/em28xx/em28xx-video.c-999-	if (dev->board.decoder == EM28XX_BUILTIN) {
drivers/media/usb/em28xx/em28xx-video.c:1000:		media_device_unregister_entity(dev->v4l2->decoder);
drivers/media/usb/em28xx/em28xx-video.c-1001-		kfree(dev->v4l2->decoder);
--
drivers/media/usb/em28xx/em28xx-video.c-1007-			return;
drivers/media/usb/em28xx/em28xx-video.c:1008:		media_device_unregister_entity(&dev->input_ent[i]);
drivers/media/usb/em28xx/em28xx-video.c-1009-	}
--
drivers/media/v4l2-core/v4l2-dev.c=177=static void v4l2_device_release(struct device *cd)
--
drivers/media/v4l2-core/v4l2-dev.c-207-		if (vdev->entity.function != MEDIA_ENT_F_UNKNOWN)
drivers/media/v4l2-core/v4l2-dev.c:208:			media_device_unregister_entity(&vdev->entity);
drivers/media/v4l2-core/v4l2-dev.c-209-	}
--
drivers/media/v4l2-core/v4l2-dev.c=817=static int video_register_media_controller(struct video_device *vdev)
--
drivers/media/v4l2-core/v4l2-dev.c-885-	if (!vdev->intf_devnode) {
drivers/media/v4l2-core/v4l2-dev.c:886:		media_device_unregister_entity(&vdev->entity);
drivers/media/v4l2-core/v4l2-dev.c-887-		return -ENOMEM;
--
drivers/media/v4l2-core/v4l2-dev.c-898-			media_devnode_remove(vdev->intf_devnode);
drivers/media/v4l2-core/v4l2-dev.c:899:			media_device_unregister_entity(&vdev->entity);
drivers/media/v4l2-core/v4l2-dev.c-900-			return -ENOMEM;
--
drivers/media/v4l2-core/v4l2-device.c=111=int __v4l2_device_register_subdev(struct v4l2_device *v4l2_dev,
--
drivers/media/v4l2-core/v4l2-device.c-164-#if defined(CONFIG_MEDIA_CONTROLLER)
drivers/media/v4l2-core/v4l2-device.c:165:	media_device_unregister_entity(&sd->entity);
drivers/media/v4l2-core/v4l2-device.c-166-#endif
--
drivers/media/v4l2-core/v4l2-device.c=263=void v4l2_device_unregister_subdev(struct v4l2_subdev *sd)
--
drivers/media/v4l2-core/v4l2-device.c-286-		 */
drivers/media/v4l2-core/v4l2-device.c:287:		media_device_unregister_entity(&sd->entity);
drivers/media/v4l2-core/v4l2-device.c-288-	}
--
drivers/media/v4l2-core/v4l2-mem2mem.c=1017=void v4l2_m2m_unregister_media_controller(struct v4l2_m2m_dev *m2m_dev)
--
drivers/media/v4l2-core/v4l2-mem2mem.c-1024-	media_entity_remove_links(&m2m_dev->proc);
drivers/media/v4l2-core/v4l2-mem2mem.c:1025:	media_device_unregister_entity(m2m_dev->source);
drivers/media/v4l2-core/v4l2-mem2mem.c:1026:	media_device_unregister_entity(&m2m_dev->sink);
drivers/media/v4l2-core/v4l2-mem2mem.c:1027:	media_device_unregister_entity(&m2m_dev->proc);
drivers/media/v4l2-core/v4l2-mem2mem.c-1028-	kfree(m2m_dev->source->name);
--
drivers/media/v4l2-core/v4l2-mem2mem.c=1094=int v4l2_m2m_register_media_controller(struct v4l2_m2m_dev *m2m_dev,
--
drivers/media/v4l2-core/v4l2-mem2mem.c-1171-err_rel_entity2:
drivers/media/v4l2-core/v4l2-mem2mem.c:1172:	media_device_unregister_entity(&m2m_dev->proc);
drivers/media/v4l2-core/v4l2-mem2mem.c-1173-	kfree(m2m_dev->proc.name);
drivers/media/v4l2-core/v4l2-mem2mem.c-1174-err_rel_entity1:
drivers/media/v4l2-core/v4l2-mem2mem.c:1175:	media_device_unregister_entity(&m2m_dev->sink);
drivers/media/v4l2-core/v4l2-mem2mem.c-1176-	kfree(m2m_dev->sink.name);
drivers/media/v4l2-core/v4l2-mem2mem.c-1177-err_rel_entity0:
drivers/media/v4l2-core/v4l2-mem2mem.c:1178:	media_device_unregister_entity(m2m_dev->source);
drivers/media/v4l2-core/v4l2-mem2mem.c-1179-	kfree(m2m_dev->source->name);
]

169/2 2026/08/07 16:24 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 130760
							output: 54
							thoughts: 2024
						

Thoughts:
**My Thoughts on the `v4l2_device_unregister_subdev` and `subdev_open` Race Condition**

I've been digging into a rather insidious bug, and I think I've finally pieced together the sequence of events that leads to the crash. It all centers around a race condition between `v4l2_device_unregister_subdev` and `subdev_open`.

Initially, I was looking at `v4l2_device_unregister_subdev` and noticed it calls `media_device_unregister_entity(&sd->entity)`. My concern was that if `v4l2_device_unregister_subdev` and `subdev_open` ran concurrently, `sd->v4l2_dev` might be set to `NULL` *before* `media_device_unregister_entity` was called. This would be problematic because `sd->v4l2_dev` is set to `NULL` without any locking mechanism. If `subdev_open` then tried to dereference `sd->v4l2_dev->mdev`, it would indeed crash.

However, the actual crash I'm seeing occurs at `sd->entity.graph_obj.mdev->dev`. This is a crucial detail. It means that when `subdev_open` crashed, `sd->v4l2_dev` was *not* `NULL` at the point of that specific check. This led me to hypothesize a specific timing issue: `sd->v4l2_dev` might have been read into a register, then `media_device_unregister_entity` was called (which sets `sd->entity.graph_obj.mdev` to `NULL`), and *then* `subdev_open` proceeded to read `sd->entity.graph_obj.mdev` and found it to be `NULL`.

Let's re-examine the assembly for `subdev_open` to confirm this theory. If `%r12` holds `&sd->entity.graph_obj.mdev`, then `(%r12)` accesses `sd->entity.graph_obj.mdev`. The critical observation is that `sd->v4l2_dev->mdev` is evaluated *first*. If `sd->v4l2_dev->mdev` is read and found to be non-`NULL`, and *then* `sd->entity.graph_obj.mdev` is read, and `media_device_unregister_entity` has concurrently set `entity->graph_obj.mdev` to `NULL`, that would explain the crash.

Here's the core problem: `v4l2_device_unregister_subdev` sets `sd->v4l2_dev = NULL`. Then, it calls `media_device_unregister_entity`. If `subdev_open` reads `sd->v4l2_dev` *before* it's set to `NULL`, but *after* `media_device_unregister_entity` has already nullified `sd->entity.graph_obj.mdev`, that's where the crash happens. `subdev_open` reads a non-`NULL` `sd->v4l2_dev`, then checks `sd->v4l2_dev->mdev` (which might still be valid or its value was cached). However, subsequently, it accesses `sd->entity.graph_obj.mdev` which has been set to `NULL` by `media_device_unregister_entity`, leading to the dereference of a `NULL` pointer. This is a classic Time-of-check to time-of-use (TOCTOU) race condition.

The next logical step was to determine if `v4l2_device_unregister_subdev` and `subdev_open` can, in fact, run concurrently. `subdev_open` is invoked when userspace opens a device node, while `v4l2_device_unregister_subdev` is called during driver removal or subdev unregistration. The question is whether any locks prevent this concurrency.

In `v4l2_open`, a `videodev_lock` is acquired to check if the video device is still registered. `video_unregister_device` also uses `videodev_lock` to clear the device entry and the `V4L2_FL_REGISTERED` flag. However, the crucial point is that `v4l2_device_unregister_subdev` calls `video_unregister_device(sd->devnode)` *after* `media_device_unregister_entity(&sd->entity)`.

This means that even when `sd->v4l2_dev` is set to `NULL` and `media_device_unregister_entity` is called, the device node is *still considered registered* by the kernel. Consequently, `v4l2_open` can successfully find the `vdev`, obtain a reference, and proceed to call `vdev->fops->open`, which is our `subdev_open` function. This allows `subdev_open` to run concurrently with `v4l2_device_unregister_subdev`.

Let's trace the precise interleaving:

**Thread 1 (Driver Removal):**
1. Calls `v4l2_device_unregister_subdev(sd)`.
2. Sets `sd->v4l2_dev = NULL`.
3. Calls `media_device_unregister_entity(&sd->entity)`.
    * Inside `media_device_unregister_entity`:
        * Acquires `mdev->graph_mutex`.
        * Calls `__media_device_unregister_entity(entity)`.
        * Inside `__media_device_unregister_entity`:
            * Sets `entity->graph_obj.mdev = NULL`.
        * Releases `mdev->graph_mutex`.

**Thread 2 (Userspace Open):**
1. Calls `v4l2_open`.
2. Finds `vdev`, it's still registered.
3. Calls `subdev_open`.
    * In `subdev_open`:
        * **Crucially, it first reads `sd->v4l2_dev`. Because Thread 1 hasn't yet set it to `NULL` *from Thread 2's perspective*, this read succeeds and returns a non-`NULL` value.**
        * It then reads `sd->v4l2_dev->mdev` and finds it to be non-`NULL`.
        * It checks if this condition is true (it is).
        * **At this precise moment, Thread 1 continues and sets `sd->v4l2_dev = NULL`.**
        * **Thread 1 then calls `media_device_unregister_entity`, which sets `sd->entity.graph_obj.mdev = NULL`.**
        * **Back in Thread 2, after the initial check, it proceeds to the next part of the conditional expression and reads `sd->entity.graph_obj.mdev`. It now reads `NULL`.**
        * **Finally, it attempts to dereference this `NULL` pointer (`->dev`), causing the crash.**

This sequence perfectly explains the crash at `sd->entity.graph_obj.mdev->dev`. The race condition is indeed between `subdev_open` and `v4l2_device_unregister_subdev`, specifically because `v4l2_device_unregister_subdev` modifies the state of `sd` (setting `v4l2_dev` to `NULL` and unregistering the entity's media device pointer) *before* it completes the unregistration of the subdev's device node via `video_unregister_device`.


170/2 2026/08/07 16:24 tool codesearch-definition-source
0m Args:
map[ContextFile:drivers/media/v4l2-core/v4l2-device.c Name:v4l2_device_unregister_subdev]

Results:
map[SourceCode: 263:	void v4l2_device_unregister_subdev(struct v4l2_subdev *sd)
 264:	{
 265:		struct v4l2_device *v4l2_dev;
 266:	
 267:		/* return if it isn't registered */
 268:		if (sd == NULL || sd->v4l2_dev == NULL)
 269:			return;
 270:	
 271:		v4l2_dev = sd->v4l2_dev;
 272:	
 273:		spin_lock(&v4l2_dev->lock);
 274:		list_del(&sd->list);
 275:		spin_unlock(&v4l2_dev->lock);
 276:	
 277:		if (sd->internal_ops && sd->internal_ops->unregistered)
 278:			sd->internal_ops->unregistered(sd);
 279:		sd->v4l2_dev = NULL;
 280:	
 281:	#if defined(CONFIG_MEDIA_CONTROLLER)
 282:		if (v4l2_dev->mdev) {
 283:			/*
 284:			 * No need to explicitly remove links, as both pads and
 285:			 * links are removed by the function below, in the right order
 286:			 */
 287:			media_device_unregister_entity(&sd->entity);
 288:		}
 289:	#endif
 290:		if (sd->devnode)
 291:			video_unregister_device(sd->devnode);
 292:		else
 293:			v4l2_subdev_release(sd);
 294:	}
 SourceFile:drivers/media/v4l2-core/v4l2-device.c]

171/2 2026/08/07 16:24 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 133339
							output: 45
							thoughts: 255
						

Thoughts:
**The Race Condition in Device Unregistration**

Ah, I've stumbled upon a critical race condition here, and it's quite straightforward once I see it. My thought process began with a simple observation: `video_unregister_device(sd->devnode)` is being invoked at the absolute tail end of the `v4l2_device_unregister_subdev` function. This is the core of the problem. It means that the device node, `sd->devnode`, remains accessible and, crucially, *openable* by other processes even as the underlying `sd->v4l2_dev` is being nullified and `sd->entity` is undergoing unregistration. This temporal overlap is precisely what defines a classic race condition.

To reliably trigger this bug, I've identified a few key prerequisites. First, the driver in question must be one that registers a subdevice and assigns it a device node, indicated by `V4L2_SUBDEV_FL_HAS_DEVNODE`. Second, it's essential that the driver leverages the `media_controller` framework, ensuring that `sd->v4l2_dev->mdev` is not NULL. This dependency on the media controller is important for the overall structure. Finally, and most critically, I need a scenario where a process attempts to open the subdevice's device node *concurrently* with the driver's removal or the subdevice's unregistration process.

Now, for practical reproduction, I'm considering test drivers. Initially, I thought `vivid` might be a good candidate, but upon closer inspection, I realized `vivid` doesn't actually utilize subdevices in the way I need for this test. However, `vimc` is a different story. It *does* use subdevices and, importantly, it registers device nodes for those subdevices. My next step, therefore, is to dive into the specifics of `vimc`'s subdevice implementation to confirm it meets all the criteria and use it as the platform for reproducing this race condition.


172/2 2026/08/07 16:25 tool grepper
0m Args:
map[Expression:V4L2_SUBDEV_FL_HAS_DEVNODE PathPrefix:drivers/media/test-drivers/vimc/]

Results:
map[Output:drivers/media/test-drivers/vimc/vimc-common.c=356=int vimc_ent_sd_register(struct vimc_ent_device *ved,
--
drivers/media/test-drivers/vimc/vimc-common.c-380-	/* Expose this subdev to user space */
drivers/media/test-drivers/vimc/vimc-common.c:381:	sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
drivers/media/test-drivers/vimc/vimc-common.c-382-	if (sd->ctrl_handler)
]

173/2 2026/08/07 16:25 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 133789
							output: 36
							thoughts: 161
						

Thoughts:
**Aha! A Pathway to Testing `vimc`'s Subdevice Node Behavior**

My initial thought, upon seeing `vimc` setting the `V4L2_SUBDEV_FL_HAS_DEVNODE` flag, is one of immediate positive reinforcement – "Yes!" This flag is the key enabler, signifying that `vimc` will indeed be creating device nodes for its subdevices. My understanding then immediately solidifies: `vimc` will be responsible for the creation of `/dev/v4l-subdevX` nodes.

This immediately sparks a testing idea. If `vimc` is loaded, it brings these `/dev/v4l-subdevX` nodes into existence. The exciting part is the potential for dynamic interaction. I can envision a scenario where one thread is actively opening and interacting with these `/dev/v4l-subdevX` nodes – perhaps performing read/write operations or ioctls. Simultaneously, a *separate* thread could be tasked with orchestrating the removal of these nodes. This could be achieved by unloading the `vimc` module itself, or more subtly, by unbinding the device.

However, a crucial consideration then surfaces, tempered by my experience with fuzzing frameworks like syzkaller. I recall that syzkaller generally avoids module unloading. Instead, its typical approach for dynamic resource management involves unbinding devices through sysfs, or relying on pseudo-devices that can be programmatically destroyed. This leads me to pause and re-evaluate the nature of `vimc`. Is it a standard loadable kernel module, or perhaps a platform device? The implications for the unbinding strategy are significant.

My next step, therefore, is to verify this: I need to delve into the `vimc_probe` function to definitively determine its device type and how it's registered. This will inform the most effective and robust way to test the dynamic lifecycle of its subdevice nodes.


174/2 2026/08/07 16:25 tool grepper
0m Args:
map[Expression:platform_driver_register PathPrefix:drivers/media/test-drivers/vimc/]

Results:
map[Output:drivers/media/test-drivers/vimc/vimc-core.c=416=static int __init vimc_init(void)
--
drivers/media/test-drivers/vimc/vimc-core.c-427-
drivers/media/test-drivers/vimc/vimc-core.c:428:	ret = platform_driver_register(&vimc_pdrv);
drivers/media/test-drivers/vimc/vimc-core.c-429-	if (ret) {
]

175/2 2026/08/07 16:25 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 134108
							output: 45
							thoughts: 89
						

Thoughts:
**My Thought Process Regarding `vimc`**

So, my initial thought is that `vimc` is indeed a platform driver. That's a fundamental piece of information. Given that, the most direct way to manipulate it, at least from a user-space perspective if I were interacting at that level, would be to unbind it. The standard mechanism for that, as I recall, is through the `/sys/bus/platform/drivers/vimc/unbind` interface. That's the conventional route for platform drivers.

Now, my mind immediately jumps to alternative approaches. I consider `vivid`. However, I quickly dismiss it because I know `vivid` doesn't operate with subdevs, and that's a key characteristic I'm dealing with here. It wouldn't be the right tool for the job.

Then, `vkms` comes to mind. But no, that's DRM (Direct Rendering Manager). While related to graphics and display, it's a distinct subsystem and not what I need for directly managing `vimc`.

This leads me to ponder `vidtv`. Is this a viable path? I need to investigate that further. My next step would be to actually look into `vidtv` to understand its capabilities and how it interfaces with drivers like `vimc`. That's where the real investigation needs to happen next.


176/2 2026/08/07 16:26 tool grepper
0m Error:
log-in to see details

Args:
map[Expression:V4L2_SUBDEV_FL_HAS_DEVNODE PathPrefix:drivers/media/test-drivers/vidtv/]

Results:
map[Output:]

177/2 2026/08/07 16:26 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 134240
							output: 40
							thoughts: 235
						

Thoughts:
**My Thought Process on Subdev Unregistration and Syzkaller**

Alright, so I'm trying to figure out how to reliably unregister V4L2 subdevices, specifically in the context of fuzzing with syzkaller. My initial thought was `vimc`, as it's a common and well-behaved component, so it seemed like a good starting point for testing unregistration mechanisms.

However, I then recalled that syzkaller itself might be interacting with devices in ways that could lead to unregistration. I started wondering if syzkaller was using `vivid` or perhaps `vimc` internally for its fuzzing operations, which could impact how I approach testing.

My next line of inquiry was to broaden my search for alternative methods of unregistering a subdev. I considered if there were any specific `ioctl` calls within certain drivers that might trigger subdev unregistration. I quickly dismissed this idea, concluding it wasn't a standard or expected behavior for drivers to unregister subdevs via arbitrary ioctls.

The most established and "proper" way to trigger a `remove` operation, which in turn should call `v4l2_device_unregister_subdev`, is by unbinding the driver through sysfs. This is the standard Linux device model approach.

But then the syzkaller constraint came into play. I realized that syzkaller, by default, doesn't typically run with root privileges, meaning it wouldn't be able to write to `/sys/bus/platform/drivers/.../unbind`. This immediately invalidated the sysfs unbinding method as a general solution for syzkaller-based fuzzing, unless I were in a very specific, privileged environment.

This led me to consider how syzkaller *does* manage device lifecycle, especially for buses like USB. I remembered that syzkaller has specific syscall wrappers for USB device manipulation, namely `syz_usb_connect` and `syz_usb_disconnect`. This suggested that USB devices might be a more promising avenue for testing subdev unregistration within syzkaller's capabilities.

So, my focus shifted to USB drivers that utilize subdevices and also expose them via device nodes. I started looking at specific examples like `em28xx`, `au0828`, or `cx231xx`, as these are known to handle video capture and often employ subdevice architectures.

My investigation confirmed that `em28xx` indeed registers subdevices. The crucial next question, though, is whether `em28xx` (or the others I'm checking) sets the `V4L2_SUBDEV_FL_HAS_DEVNODE` flag for its registered subdevices. If a subdevice has this flag set, it implies it's intended to be directly manageable through a device node, which could then be a target for syzkaller's `syz_usb_disconnect` to trigger its removal. This is the current thread of my investigation.


178/2 2026/08/07 16:27 tool grepper
0m Error:
log-in to see details

Args:
map[Expression:V4L2_SUBDEV_FL_HAS_DEVNODE PathPrefix:drivers/media/usb/]

Results:
map[Output:]

179/2 2026/08/07 16:27 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 134513
							output: 43
							thoughts: 37
						

Thoughts:
**A Deep Dive into V4L2 Subdevice Driver Node Creation**

My initial thought process is to verify a specific behavior within the Video4Linux2 (V4L2) framework concerning subdevice driver node creation. I'm questioning whether standard USB drivers, in general, are responsible for setting the `V4L2_SUBDEV_FL_HAS_DEVNODE` flag. This flag, as I understand it, signifies that a subdevice driver has successfully registered a device node, making it accessible through the V4L2 API. My immediate inclination is to state that, no, this doesn't seem to be a typical responsibility of generic USB drivers. They often handle the low-level USB communication, but the V4L2 subdevice abstraction layer likely manages the device node registration itself.

However, this is where my thought process pivots. I recognize the need for a more specific and potentially contradictory example to test this hypothesis. I immediately think of the `uvcvideo` driver. The USB Video Class (UVC) is a very common and well-established standard for USB cameras. Given its prevalence and the fact that it *must* expose camera functionality through V4L2, it's a prime candidate to investigate. Therefore, my next thought is to specifically consider whether the `uvcvideo` driver, being a USB driver for a video device, *does* in fact set the `V4L2_SUBDEV_FL_HAS_DEVNODE` flag. This would either reinforce my initial assumption about generic USB drivers or, more interestingly, highlight a specific exception or nuance within the UVC implementation.


180/2 2026/08/07 16:27 tool grepper
0m Error:
log-in to see details

Args:
map[Expression:V4L2_SUBDEV_FL_HAS_DEVNODE PathPrefix:drivers/media/usb/uvc/]

Results:
map[Output:]

181/2 2026/08/07 16:27 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 134591
							output: 40
							thoughts: 38
						

Thoughts:
**My Thought Process on `uvcvideo` and `V4L2_SUBDEV_FL_HAS_DEVNODE`**

Okay, so I'm reviewing the `uvcvideo` driver, and something has caught my eye. I seem to recall that for a V4L2 subdevice to expose a device node (meaning it's accessible directly through something like `/dev/v4l-subdevX`), it typically needs to set the `V4L2_SUBDEV_FL_HAS_DEVNODE` flag. My initial thought is that `uvcvideo` *should* be setting this flag, as it's a fundamental part of how these devices are managed and interacted with.

But then, a doubt creeps in. Am I absolutely sure about this? I need to verify. My immediate next step is to dive into the `uvc_entity` structure. This is where the core representation of UVC entities within the driver resides, and it's highly probable that any flags related to device node presence would be managed or checked within this context. I'll be looking for where `V4L2_SUBDEV_FL_HAS_DEVNODE` is used, or more importantly, *not* used, within the `uvcvideo` code, specifically concerning the `uvc_entity` definition or its associated handlers. This will either confirm my assumption or, if it turns out `uvcvideo` doesn't set it, force me to re-evaluate my understanding of how UVC devices expose their capabilities through the V4L2 framework.


182/2 2026/08/07 16:27 tool grepper
0m Args:
map[Expression:v4l2_device_register_subdev PathPrefix:drivers/media/usb/uvc/]

Results:
map[Output:drivers/media/usb/uvc/uvc_entity.c=70=static int uvc_mc_init_entity(struct uvc_video_chain *chain,
--
drivers/media/usb/uvc/uvc_entity.c-121-
drivers/media/usb/uvc/uvc_entity.c:122:		ret = v4l2_device_register_subdev(&chain->dev->vdev,
drivers/media/usb/uvc/uvc_entity.c-123-						  &entity->subdev);
]

183/2 2026/08/07 16:27 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 134801
							output: 47
							thoughts: 14
						

Thoughts:
**A Deep Dive into `uvc_mc_init_entity`: My Current Thought Trajectory**

My current line of inquiry is centered on a specific function: `uvc_mc_init_entity`. I'm essentially performing a deep dive, a thorough examination, to understand its role, its mechanics, and its implications within the broader system. This isn't a superficial glance; I'm aiming for a comprehensive grasp of what this function does, why it's designed that way, and how it interacts with other components. My thought process is geared towards dissecting its purpose – what entity is it initializing, and what does that initialization entail? I'm also considering its context: where does it fit into the overall data flow or control logic? Are there any dependencies or prerequisites I need to be aware of? I'm mentally running through potential scenarios, edge cases, and error handling to anticipate any unexpected behaviors or vulnerabilities. In essence, I'm trying to build a mental model of `uvc_mc_init_entity` that's as robust and detailed as possible, allowing me to confidently assess its performance, optimize its usage, or even identify areas for potential improvement.


184/2 2026/08/07 16:28 tool codesearch-definition-source
0m Args:
map[ContextFile:drivers/media/usb/uvc/uvc_entity.c Name:uvc_mc_init_entity]

Results:
map[SourceCode:  70:	static int uvc_mc_init_entity(struct uvc_video_chain *chain,
  71:				      struct uvc_entity *entity)
  72:	{
  73:		int ret;
  74:	
  75:		if (UVC_ENTITY_TYPE(entity) != UVC_TT_STREAMING) {
  76:			u32 function;
  77:	
  78:			v4l2_subdev_init(&entity->subdev, &uvc_subdev_ops);
  79:			strscpy(entity->subdev.name, entity->name,
  80:				sizeof(entity->subdev.name));
  81:	
  82:			switch (UVC_ENTITY_TYPE(entity)) {
  83:			case UVC_VC_SELECTOR_UNIT:
  84:				function = MEDIA_ENT_F_VID_MUX;
  85:				break;
  86:			case UVC_VC_PROCESSING_UNIT:
  87:			case UVC_VC_EXTENSION_UNIT:
  88:				/* For lack of a better option. */
  89:				function = MEDIA_ENT_F_PROC_VIDEO_PIXEL_FORMATTER;
  90:				break;
  91:			case UVC_COMPOSITE_CONNECTOR:
  92:			case UVC_COMPONENT_CONNECTOR:
  93:				function = MEDIA_ENT_F_CONN_COMPOSITE;
  94:				break;
  95:			case UVC_SVIDEO_CONNECTOR:
  96:				function = MEDIA_ENT_F_CONN_SVIDEO;
  97:				break;
  98:			case UVC_ITT_CAMERA:
  99:				function = MEDIA_ENT_F_CAM_SENSOR;
 100:				break;
 101:			case UVC_TT_VENDOR_SPECIFIC:
 102:			case UVC_ITT_VENDOR_SPECIFIC:
 103:			case UVC_ITT_MEDIA_TRANSPORT_INPUT:
 104:			case UVC_OTT_VENDOR_SPECIFIC:
 105:			case UVC_OTT_DISPLAY:
 106:			case UVC_OTT_MEDIA_TRANSPORT_OUTPUT:
 107:			case UVC_EXTERNAL_VENDOR_SPECIFIC:
 108:			case UVC_EXT_GPIO_UNIT:
 109:			default:
 110:				function = MEDIA_ENT_F_V4L2_SUBDEV_UNKNOWN;
 111:				break;
 112:			}
 113:	
 114:			entity->subdev.entity.function = function;
 115:	
 116:			ret = media_entity_pads_init(&entity->subdev.entity,
 117:						entity->num_pads, entity->pads);
 118:	
 119:			if (ret < 0)
 120:				return ret;
 121:	
 122:			ret = v4l2_device_register_subdev(&chain->dev->vdev,
 123:							  &entity->subdev);
 124:		} else if (entity->vdev != NULL) {
 125:			ret = media_entity_pads_init(&entity->vdev->entity,
 126:						entity->num_pads, entity->pads);
 127:			if (entity->flags & UVC_ENTITY_FLAG_DEFAULT)
 128:				entity->vdev->entity.flags |= MEDIA_ENT_FL_DEFAULT;
 129:		} else
 130:			ret = 0;
 131:	
 132:		return ret;
 133:	}
 SourceFile:drivers/media/usb/uvc/uvc_entity.c]

185/2 2026/08/07 16:28 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 135841
							output: 45
							thoughts: 192
						

Thoughts:
**My Thought Process Regarding `uvcvideo`, `vimc`, and Syzkaller's Subdevice Interactions**

Right, so I'm digging into this interaction, and the first thing that strikes me is that the `uvcvideo` driver, which is what usually handles USB Video Class devices, explicitly *doesn't* set the `V4L2_SUBDEV_FL_HAS_DEVNODE` flag. This is a pretty significant detail, as it means `uvcvideo` itself isn't responsible for creating those `/dev/v4l-subdevX` device nodes.

This immediately throws up a question in my mind: if `uvcvideo` isn't creating these nodes, then how is syzkaller, the fuzzer, managing to open them? It seems contradictory at first glance.

Then, a possibility emerges: could syzkaller be targeting `/dev/v4l-subdevX` nodes that have been created by a *different* driver entirely? I recall looking at syzkaller's configuration, and I see that `vimc` is indeed enabled. This seems like a strong candidate.

However, I also know that syzkaller can utilize the `vivid` driver, which is known *not* to have any subdevice functionality at all. So, even if `vimc` is the culprit for the subdevice nodes, how is syzkaller even getting to a point where it can interact with `vimc` in the first place, especially since `vimc` is a platform device?

This leads me to consider the lifecycle of platform drivers. My understanding is that `vimc`, being a platform driver, is typically created automatically during the boot process. This is because its device is registered by its module's initialization function. So, the presence of `vimc` isn't something syzkaller has to explicitly "trigger" in the sense of calling a specific driver function; it's just there, ready to go, if the platform infrastructure sets it up. To confirm this, I'm now going to dive into the `vimc_init` function to see exactly how it registers itself and makes its subdevice nodes available.


186/2 2026/08/07 16:29 tool codesearch-definition-source
0m Args:
map[ContextFile:drivers/media/test-drivers/vimc/vimc-core.c Name:vimc_init]

Results:
map[SourceCode: 416:	static int __init vimc_init(void)
 417:	{
 418:		int ret;
 419:	
 420:		ret = platform_device_register(&vimc_pdev);
 421:		if (ret) {
 422:			dev_err(&vimc_pdev.dev,
 423:				"platform device registration failed (err=%d)\n", ret);
 424:			platform_device_put(&vimc_pdev);
 425:			return ret;
 426:		}
 427:	
 428:		ret = platform_driver_register(&vimc_pdrv);
 429:		if (ret) {
 430:			dev_err(&vimc_pdev.dev,
 431:				"platform driver registration failed (err=%d)\n", ret);
 432:			platform_device_unregister(&vimc_pdev);
 433:			return ret;
 434:		}
 435:	
 436:		return 0;
 437:	}
 SourceFile:drivers/media/test-drivers/vimc/vimc-core.c]

187/2 2026/08/07 16:29 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 136394
							output: 45
							thoughts: 246
						

Thoughts:
**My Thought Process Regarding the `vimc` Race Condition**

Ah, so it's clear `vimc` is indeed initialized at boot. This means the `/dev/v4l-subdevX` device nodes should be readily available. My immediate question then becomes: how exactly does syzkaller manage to trigger this race condition?

I've confirmed syzkaller's ability to interact with these `/dev/v4l-subdevX` nodes. But the key, I realize, is its capability to *unbind* the `vimc` driver. This is where my attention shifts. Can syzkaller directly write to `/sys/bus/platform/drivers/vimc/unbind`?

The crucial piece of the puzzle is understanding syzkaller's execution context. Since it runs as root within the VM, it absolutely *can* write to sysfs entries. I'm considering if syzkaller might employ a specific helper function like `syz_mount_image`, but then I remember it's perfectly capable of simply using basic `open` and `write` operations directly on sysfs.

This leads me to think about syzkaller's capabilities for device manipulation. I know it has specific pseudo-syscalls like `syz_usb_disconnect` for USB devices. However, for platform devices, the direct sysfs write mechanism seems to be the intended path. I should probably take a moment to verify if there are any *other* mechanisms syzkaller might leverage to unregister a subdev, just to be thorough.

But the most direct route to investigate is the core race condition scenario: what happens if syzkaller opens `/dev/v4l-subdevX` and, in parallel, unbinds the `vimc` driver? My next step is to meticulously examine the `vimc_remove` function to understand the precise sequence of events and identify the point of vulnerability.


188/2 2026/08/07 16:29 tool codesearch-definition-source
0m Args:
map[ContextFile:drivers/media/test-drivers/vimc/vimc-core.c Name:vimc_remove]

Results:
map[SourceCode: 387:	static void vimc_remove(struct platform_device *pdev)
 388:	{
 389:		struct vimc_device *vimc = platform_get_drvdata(pdev);
 390:	
 391:		dev_dbg(&pdev->dev, "remove");
 392:	
 393:		vimc_unregister_subdevs(vimc);
 394:		media_device_unregister(&vimc->mdev);
 395:		v4l2_device_unregister(&vimc->v4l2_dev);
 396:		v4l2_device_put(&vimc->v4l2_dev);
 397:	}
 SourceFile:drivers/media/test-drivers/vimc/vimc-core.c]

189/2 2026/08/07 16:29 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 136892
							output: 49
							thoughts: 21
						

Thoughts:
**My Thought Process Regarding `vimc_unregister_subdevs` and `vimc_ent_sd_unregister`**

Okay, so I'm looking at the `vimc_unregister_subdevs` function, and my first thought is to trace its execution path to understand what it's actually doing. I see it immediately calls `vimc_ent_sd_unregister`. This is a straightforward dependency; it's not like `vimc_unregister_subdevs` is doing a lot of its own work before handing off to another function. The name `vimc_ent_sd_unregister` strongly suggests that it's responsible for the actual unregistration of a "subdevice" (sd) associated with an "entity" (ent) within the Vim (Video Input/Output Core) framework. This implies that `vimc_unregister_subdevs` is likely a higher-level orchestrator or a convenience wrapper, perhaps dealing with multiple subdevices or the overall cleanup of the Vim entity's subdevice components. My next step would be to examine `vimc_ent_sd_unregister` itself to understand the specifics of how that unregistration is performed and what resources are being released.


190/2 2026/08/07 16:29 tool codesearch-definition-source
0m Error:
log-in to see details

Args:
map[ContextFile:drivers/media/test-drivers/vimc/vimc-common.c Name:vimc_ent_sd_unregister]

Results:
map[SourceCode: SourceFile:]

191/2 2026/08/07 16:29 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 136967
							output: 49
							thoughts: 14
						

Thoughts:
**My Thought Process Regarding `vimc_unregister_subdevs`**

Alright, so my immediate impulse upon seeing `vimc_unregister_subdevs` is to dive into its functionality. My mind immediately starts to consider the implications of "unregistering" and "subdevs" within the context of the Video Input (VIMC) driver.

What does it *mean* to unregister a subdevice in this framework? I'm assuming there's a registration process, so there must be a corresponding de-registration. This function likely handles the cleanup associated with a subdevice that's no longer needed or is being removed from the system.

My first questions revolve around the *mechanism* of this unregistration. Does it simply involve removing an entry from a list? Or is there more involved? I'm picturing a data structure, perhaps an array or a linked list, that maintains a record of active subdevices. `vimc_unregister_subdevs` would then iterate through this structure, or a specific entry within it, and perform the necessary cleanup.

What kind of cleanup, though? This is where my expertise kicks in. For a video input driver, a "subdevice" could represent a physical camera sensor, a tuner, a capture card component, or some other hardware block. When unregistering such a component, I'd expect the following to occur:

*   **Resource Release:** This is paramount. Any memory allocations, IRQ handlers, DMA channels, or memory-mapped I/O regions that were associated with this subdevice must be freed. I'm thinking about `kfree`, `free_irq`, `dma_free_coherent`, and similar kernel functions.
*   **Device State Management:** The subdevice's internal state needs to be reset or invalidated. If it was actively capturing or streaming, those operations must be halted. Registers might need to be put into a safe, default state.
*   **Notification:** Other parts of the VIMC driver, or potentially the broader system, might need to be notified that this subdevice is no longer available. This could involve unregistering from other kernel subsystems (like V4L2's device registration), clearing out any associated event queues, or invalidating pointers held by other components.
*   **Reference Counting:** If other parts of the kernel hold references to this subdevice, this function needs to ensure those references are properly decremented and that the subdevice is truly no longer in use before deallocating its resources. This is crucial for preventing use-after-free bugs.
*   **Concurrency:** I'm also considering concurrency. If `vimc_unregister_subdevs` can be called from multiple contexts, or if subdevices can be registered/unregistered concurrently, then synchronization primitives like mutexes or spinlocks will be critical to protect shared data structures. The function's implementation will likely involve acquiring locks before accessing shared state and releasing them afterward.

My mental model is that `vimc_unregister_subdevs` is likely a core part of the VIMC driver's lifecycle management. It’s the counterpart to whatever function handles *registering* these subdevices. The `_subdevs` suffix suggests it might handle the unregistration of *multiple* subdevices, perhaps all currently registered ones, or a group of them based on some criteria. This could be triggered during module unload, system suspend, or when a specific set of hardware components is being dynamically reconfigured.

Ultimately, I'm expecting to see code that systematically tears down the infrastructure established during registration, ensuring a clean and safe removal of the subdevice from the driver's operational view. It's about safely dismantling the logical and physical representation of that component within the VIMC framework.


192/2 2026/08/07 16:30 tool codesearch-definition-source
0m Args:
map[ContextFile:drivers/media/test-drivers/vimc/vimc-core.c Name:vimc_unregister_subdevs]

Results:
map[SourceCode: 235:	static void vimc_unregister_subdevs(struct vimc_device *vimc)
 236:	{
 237:		unsigned int i;
 238:	
 239:		for (i = 0; i < vimc->pipe_cfg->num_ents; i++)
 240:			if (vimc->ent_devs[i] && vimc->pipe_cfg->ents[i].type->unregister)
 241:				vimc->pipe_cfg->ents[i].type->unregister(vimc->ent_devs[i]);
 242:	}
 SourceFile:drivers/media/test-drivers/vimc/vimc-core.c]

193/2 2026/08/07 16:30 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 137207
							output: 47
							thoughts: 21
						

Thoughts:
**My Thought Process**

Alright, so I'm looking at this `vimc_sen` component, and my primary concern is how it handles its cleanup or, more formally, its unregistration. I need to identify the specific callback function responsible for this process. From what I've just reviewed, it's clear that the designated function for unregistering `vimc_sen` is `vimc_sen_unregister`. This is the function I'll need to interact with when I want to gracefully tear down or disable the `vimc_sen` functionality.


194/2 2026/08/07 16:30 tool codesearch-definition-source
0m Error:
log-in to see details

Args:
map[ContextFile:drivers/media/test-drivers/vimc/vimc-sensor.c Name:vimc_sen_unregister]

Results:
map[SourceCode: SourceFile:]

195/2 2026/08/07 16:30 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 137280
							output: 38
							thoughts: 17
						

Thoughts:
**My Thought Process on `vimc-sensor.c` and `unregister`**

Alright, so the first thing that comes to mind is I need to get a feel for how this `unregister` functionality is being handled within the `vimc-sensor.c` codebase. My immediate impulse is to reach for `grep` – it's my go-to for a quick and dirty scan of a file for specific patterns. So, I'm going to `grep` for the literal string `unregister` within `vimc-sensor.c`. This should give me a solid starting point, highlighting all the locations where this term appears. From there, I can begin to trace the execution flow and understand the context in which `unregister` is being called, what arguments it takes, and what its intended effect is within the sensor's lifecycle.


196/2 2026/08/07 16:30 tool grepper
0m Error:
log-in to see details

Args:
map[Expression:unregister PathPrefix:drivers/media/test-drivers/vimc/vimc-sensor.c]

Results:
map[Output:]

197/2 2026/08/07 16:30 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 137333
							output: 39
							thoughts: 14
						

Thoughts:
**My Thought Process**

Okay, so my immediate focus is on investigating the `vimc_ent_sd_unregister` function. I need to understand its purpose and how it operates within the system. My goal here is to get a comprehensive grasp of what this particular piece of code does, likely in the context of managing entity unregistrations, and to ensure I'm fully aware of its implications.


198/2 2026/08/07 16:30 tool grepper
0m Error:
log-in to see details

Args:
map[Expression:vimc_ent_sd_unregister PathPrefix:drivers/media/test-drivers/vimc/]

Results:
map[Output:]

199/2 2026/08/07 16:30 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 137384
							output: 42
							thoughts: 15
						

Thoughts:
**My Thought Process on Locating the Relevant Release Information**

My initial impulse is to investigate what seems like the most probable candidate for the release information: `vimc_sen_release`. This name suggests a connection to "vimc" (perhaps a system or project identifier), "sen" (potentially denoting a specific environment like "staging" or "sentinel," or a particular component), and "release" (clearly indicating that this is where I'd expect to find details about a deployed version). It’s a straightforward, descriptive naming convention, and often, in well-organized systems, this is precisely where such information would reside. So, my first mental step is to query or inspect this specific entity, assuming it's a variable, a configuration key, a table name, or a file path, to see if it contains the data I'm looking for. This is the most efficient starting point before delving into more complex or less obvious possibilities.


200/2 2026/08/07 16:30 tool grepper
0m Error:
log-in to see details

Args:
map[Expression:v4l2_device_unregister_subdev PathPrefix:drivers/media/test-drivers/vimc/]

Results:
map[Output:]

201/2 2026/08/07 16:30 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 137439
							output: 38
							thoughts: 106
						

Thoughts:
**My Deep Dive into Vimc Subdevice Unregistration**

My initial reaction was one of surprise, bordering on disbelief: "Wait, `vimc` does NOT call `v4l2_device_unregister_subdev`?" This seemed counterintuitive, given its role as a video input multiplexer controller, and the standard practice for managing subdevices within the V4L2 framework. My immediate next step was to revisit the `vimc_ent_sd_unregister` function. I reasoned that perhaps I had misremembered the exact naming convention, or that it might be a differently named function serving the same purpose. However, a quick mental scan or search confirmed: "No matches." This only deepened my suspicion.

The thought process then naturally led me to consider alternative or more specific unregistration mechanisms within the `vimc` driver. I began to probe for functions that might be explicitly designed for the removal of `vimc`'s own subdevices, rather than relying on a generic V4L2 framework call. This led me to consider functions like `vimc_rm_subdevs`. The name itself strongly suggested a connection to removing subdevices, making it a prime candidate for investigation.

To gain definitive clarity, my thought process dictated that I needed to examine the source code directly. I resolved to "read `drivers/media/test-drivers/vimc/vimc-common.c` to see how it unregisters." This was the crucial step to move from speculation to concrete understanding. By delving into the specific implementation details within `vimc-common.c`, I aimed to uncover the precise sequence of operations and the specific functions employed by `vimc` to manage the lifecycle of its subdevices, particularly during their unregistration.


202/2 2026/08/07 16:31 tool grepper
0m Error:
log-in to see details

Args:
map[Expression:unregister PathPrefix:drivers/media/test-drivers/vimc/vimc-common.c]

Results:
map[Output:]

203/2 2026/08/07 16:31 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 137581
							output: 49
							thoughts: 40
						

Thoughts:
**My Thought Process on `vimc-common.c` and Registration/Unregistration**

Okay, so my first reaction upon looking at `vimc-common.c` was a moment of pause, a sort of "wait a minute" feeling. I'm scanning through the code, and I notice there isn't an explicit `unregister` function defined within it. This immediately sparks a question in my mind: if there's a registration mechanism, shouldn't there be a corresponding way to deregister or clean up those registrations? It seems like a fundamental aspect of resource management, especially in a system where components might come and go.

My immediate next step, the logical progression of this thought, is to dive deeper into the registration process itself. I need to understand *how* things are being registered to figure out why there might be no explicit unregister. So, I'm now focusing my attention on `vimc_ent_sd_register`. I'm going to meticulously examine its implementation within `vimc-common.c`. My goal here is to see what exactly happens when `vimc_ent_sd_register` is called. Does it simply add an entry to a list? Does it allocate resources? Does it set up callbacks? The details of this registration function are key to understanding the absence of a corresponding unregistration. I suspect that the way it's implemented will shed light on whether unregistration is handled implicitly, through some other mechanism, or if it's an oversight that needs to be addressed.


204/2 2026/08/07 16:31 tool codesearch-definition-source
0m Args:
map[ContextFile:drivers/media/test-drivers/vimc/vimc-common.c Name:vimc_ent_sd_register]

Results:
map[SourceCode: 356:	int vimc_ent_sd_register(struct vimc_ent_device *ved,
 357:				 struct v4l2_subdev *sd,
 358:				 struct v4l2_device *v4l2_dev,
 359:				 const char *const name,
 360:				 u32 function,
 361:				 u16 num_pads,
 362:				 struct media_pad *pads,
 363:				 const struct v4l2_subdev_internal_ops *int_ops,
 364:				 const struct v4l2_subdev_ops *sd_ops)
 365:	{
 366:		int ret;
 367:	
 368:		/* Fill the vimc_ent_device struct */
 369:		ved->ent = &sd->entity;
 370:	
 371:		/* Initialize the subdev */
 372:		v4l2_subdev_init(sd, sd_ops);
 373:		sd->internal_ops = int_ops;
 374:		sd->entity.function = function;
 375:		sd->entity.ops = &vimc_ent_sd_mops;
 376:		sd->owner = THIS_MODULE;
 377:		strscpy(sd->name, name, sizeof(sd->name));
 378:		v4l2_set_subdevdata(sd, ved);
 379:	
 380:		/* Expose this subdev to user space */
 381:		sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
 382:		if (sd->ctrl_handler)
 383:			sd->flags |= V4L2_SUBDEV_FL_HAS_EVENTS;
 384:	
 385:		/* Initialize the media entity */
 386:		ret = media_entity_pads_init(&sd->entity, num_pads, pads);
 387:		if (ret)
 388:			return ret;
 389:	
 390:		/*
 391:		 * Finalize the subdev initialization if it supports active states. Use
 392:		 * the control handler lock as the state lock if available.
 393:		 */
 394:		if (int_ops && int_ops->init_state) {
 395:			if (sd->ctrl_handler)
 396:				sd->state_lock = sd->ctrl_handler->lock;
 397:	
 398:			ret = v4l2_subdev_init_finalize(sd);
 399:			if (ret) {
 400:				dev_err(v4l2_dev->dev,
 401:					"%s: subdev initialization failed (err=%d)\n",
 402:					name, ret);
 403:				goto err_clean_m_ent;
 404:			}
 405:		}
 406:	
 407:		/* Register the subdev with the v4l2 and the media framework */
 408:		ret = v4l2_device_register_subdev(v4l2_dev, sd);
 409:		if (ret) {
 410:			dev_err(v4l2_dev->dev,
 411:				"%s: subdev register failed (err=%d)\n",
 412:				name, ret);
 413:			goto err_clean_sd;
 414:		}
 415:	
 416:		return 0;
 417:	
 418:	err_clean_sd:
 419:		v4l2_subdev_cleanup(sd);
 420:	err_clean_m_ent:
 421:		media_entity_cleanup(&sd->entity);
 422:		return ret;
 423:	}
 SourceFile:drivers/media/test-drivers/vimc/vimc-common.c]

205/2 2026/08/07 16:31 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 138734
							output: 39
							thoughts: 23
						

Thoughts:
**My Thought Process Unpacked**

Okay, so I'm staring at this code, right? And I'm tracking a particular function call – `vimc_ent_sd_unregister`. My immediate, almost reflexive thought is, "Where is this thing defined?" Given the naming convention, `vimc_ent_sd_unregister`, I'm expecting it to be related to the `vimc` (Virtual Machine Connection) module, and specifically something to do with "entity" (`ent`) and "service discovery" (`sd`) unregistration. My mental map of the codebase, or perhaps a quick grep or IDE search, has led me to believe it *should* reside in a file that clearly signals its role in common `vimc` functionalities.

Then, bam! The lookup or the code path I'm following points me to `vimc-common.c`. And that's where the slight pause, the moment of internal recalibration, happens. My first reaction isn't "Oh, that makes sense," but more of a "Wait a minute... `vimc-common.c`?"

It's not that it's inherently *wrong*, but it deviates slightly from my *initial* expectation. I'm thinking, "Is this really a *common* function? Unregistering a service discovery endpoint feels a bit more specialized than something I'd lump under a general 'common' utility file." I'm mentally questioning the categorization. Is this function truly a fundamental building block that every part of `vimc` might need, or is it more of a peripheral operation that perhaps *could* have been placed elsewhere, like in a dedicated `sd_unregister.c` or a `vimc-entity.c` file if such a thing existed and was more granular?

My internal monologue is essentially a rapid evaluation:
1.  **Expectation:** Function name suggests a specific domain (entity, service discovery, unregistration).
2.  **Search/Lookup:** Result points to `vimc-common.c`.
3.  **Cognitive Dissonance (minor):** "Common" implies broad applicability. Does service discovery unregistration fit that definition?
4.  **Hypothesis Generation:** Perhaps the developers deemed this a sufficiently frequent or foundational operation within the `vimc` ecosystem that it warranted inclusion in the "common" utilities. Or, maybe the structure evolved, and "common" became a catch-all for things that didn't fit neatly elsewhere. It's possible this function has dependencies or interactions with other truly common `vimc` components that made its placement there more practical.

So, my thought process is one of initial expectation, followed by a slight surprise, leading to an immediate internal analysis of *why* it might be placed there, questioning the categorization based on the function's apparent purpose, and considering the developer's potential rationale. It's a brief, but intricate, assessment of code structure and its alignment with my mental model of the project.


206/2 2026/08/07 16:31 tool grepper
0m Error:
log-in to see details

Args:
map[Expression:vimc_ent_sd_unregister PathPrefix:drivers/media/test-drivers/vimc/]

Results:
map[Output:]

207/2 2026/08/07 16:31 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 138794
							output: 42
							thoughts: 47
						

Thoughts:
**My Thought Process on Unregistering SD Entities**

Alright, let's dive back into this unregistering process. I'm trying to figure out the correct function call to de-register a shared data (SD) entity. My first instinct, based on similar operations I've seen, was to try `vimc_ent_sd_unregister`. I've already given that a shot, but unfortunately, it returned no matches. This suggests that either the naming convention is slightly different, or perhaps it's not the exact function I'm looking for in this specific context. So, that's a dead end for now.

My next logical step is to consider alternatives that might serve a similar purpose. Often, de-registration operations are closely tied to resource management or release mechanisms. I'm now turning my attention to `vimc_sen_release`. This function name, "release," sounds promising. It implies freeing up resources or terminating a connection, which is conceptually very close to what unregistering an entity would entail. I'll need to examine its signature and behavior to see if it fits the requirements for de-registering an SD entity. This feels like a more likely candidate given the previous attempt's failure.


208/2 2026/08/07 16:31 tool grepper
0m Error:
log-in to see details

Args:
map[Expression:v4l2_device_unregister_subdev PathPrefix:drivers/media/test-drivers/vimc/]

Results:
map[Output:]

209/2 2026/08/07 16:31 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 138881
							output: 49
							thoughts: 40
						

Thoughts:
**My Thought Process Regarding `vimc` and `v4l2_device_unregister_subdev`**

Hold on a second. My initial assumption, or perhaps a lingering memory of how `v4l2` subdevs are typically managed, seems to be incorrect. I was just thinking that `vimc` *must* be calling `v4l2_device_unregister_subdev` when it cleans up its subdevices. But now that I'm looking at the code, or recalling the specifics, I'm realizing that's not happening. This is a critical point. I need to go back and meticulously re-examine the `vimc_unregister_subdevs` function to understand precisely what it *is* doing, and why it's not invoking the standard `v4l2_device_unregister_subdev`. This discrepancy is significant and warrants a deep dive to ensure I fully grasp the lifecycle management of `vimc`'s subdevices.


210/2 2026/08/07 16:32 tool codesearch-definition-source
0m Args:
map[ContextFile:drivers/media/test-drivers/vimc/vimc-core.c Name:vimc_unregister_subdevs]

Results:
map[SourceCode: 235:	static void vimc_unregister_subdevs(struct vimc_device *vimc)
 236:	{
 237:		unsigned int i;
 238:	
 239:		for (i = 0; i < vimc->pipe_cfg->num_ents; i++)
 240:			if (vimc->ent_devs[i] && vimc->pipe_cfg->ents[i].type->unregister)
 241:				vimc->pipe_cfg->ents[i].type->unregister(vimc->ent_devs[i]);
 242:	}
 SourceFile:drivers/media/test-drivers/vimc/vimc-core.c]

211/2 2026/08/07 16:32 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 139147
							output: 38
							thoughts: 36
						

Thoughts:
**My Thought Process on Examining Sensor Unregistration and Type Handling**

Here I am, diving into the sensor subsystem, and my immediate thought is to understand how unregistration works. I'm looking for a function that sounds like `vimc_sen_unregister` or something very close to it, as that’s the most direct way to investigate the process of a sensor being removed from the system.

Concurrently, I need to grasp the underlying mechanism for managing sensor types. Specifically, I’m curious about what `type->unregister` entails. This suggests that there's a structure or object representing a sensor *type*, and this type itself has a method or function associated with it for unregistration. This is an important distinction; it's not just about unregistering an individual sensor instance, but potentially about deactivating or cleaning up an entire *category* of sensors. I'll be looking closely at `vimc_sen_type` to understand its definition and what operations are defined within it, with `unregister` being a key one to investigate. My goal is to connect how a specific sensor instance's unregistration interacts with or utilizes this broader `type->unregister` mechanism.


212/2 2026/08/07 16:32 tool grepper
0m Error:
log-in to see details

Args:
map[Expression:unregister PathPrefix:drivers/media/test-drivers/vimc/vimc-sensor.c]

Results:
map[Output:]

213/2 2026/08/07 16:32 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 139219
							output: 38
							thoughts: 29
						

Thoughts:
**My Thought Process on the `vimc-sensor.c` Unregistration Issue**

Okay, so my initial scan of `vimc-sensor.c` has just thrown up a rather alarming red flag: I can't seem to find an explicit `unregister` function for the sensor. This is immediately concerning, as in any well-designed driver or module, there *must* be a corresponding cleanup mechanism to deregister or release resources when they are no longer needed. Leaving resources dangling can lead to all sorts of instability and leaks.

My next step, therefore, is to dive deeper and investigate `vimc_sen_release`. This function name strongly suggests it's the designated cleanup or teardown routine for the sensor. I'll be meticulously examining its implementation to see if it, in fact, handles the necessary unregistration logic, perhaps under a different name or as part of a broader deinitialization process. I'm looking for calls to underlying kernel APIs that would remove the sensor from whatever registration framework it's part of, freeing up its associated resources, and ensuring a clean exit. If `vimc_sen_release` doesn't adequately cover this, then we have a genuine problem on our hands that needs immediate attention.


214/2 2026/08/07 16:32 tool grepper
0m Args:
map[Expression:release PathPrefix:drivers/media/test-drivers/vimc/vimc-sensor.c]

Results:
map[Output:drivers/media/test-drivers/vimc/vimc-sensor.c=370=static const struct v4l2_ctrl_ops vimc_sensor_ctrl_ops = {
--
drivers/media/test-drivers/vimc/vimc-sensor.c-373-
drivers/media/test-drivers/vimc/vimc-sensor.c:374:static void vimc_sensor_release(struct vimc_ent_device *ved)
drivers/media/test-drivers/vimc/vimc-sensor.c-375-{
--
drivers/media/test-drivers/vimc/vimc-sensor.c=504=const struct vimc_ent_type vimc_sensor_type = {
drivers/media/test-drivers/vimc/vimc-sensor.c-505-	.add = vimc_sensor_add,
drivers/media/test-drivers/vimc/vimc-sensor.c:506:	.release = vimc_sensor_release
drivers/media/test-drivers/vimc/vimc-sensor.c-507-};
]

215/2 2026/08/07 16:32 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 139548
							output: 47
							thoughts: 44
						

Thoughts:
**My Thought Process on Device Unregistration**

Okay, so I've been diving into this device handling, and my initial assumption about the function name was a little off. I was thinking it was `unregister`, but upon closer inspection, I realized the actual function is `release`. This distinction, while seemingly minor, is crucial for understanding the lifecycle and proper deallocation of these subdevices.

Following that thread, I then looked at what `vimc_unregister_subdevs` actually *does*. My thought process here was to trace the call chain. I discovered that it, in turn, calls `type->unregister`. This tells me that the `unregister` function is the core logic for performing the actual unregistration at the specific device type level.

To understand *how* `type->unregister` is determined and what its implementation entails, I then decided to examine `vimc_ent_type`. This is where the specific details of each device type's behavior are defined, including their unregistration procedures. My goal in checking `vimc_ent_type` was to see the structure that holds these type-specific callbacks and how the `unregister` function pointer is populated within it. This would allow me to connect the generic `vimc_unregister_subdevs` call to the concrete implementation for a given device type.


216/2 2026/08/07 16:33 tool codesearch-definition-source
0m Args:
map[ContextFile:drivers/media/test-drivers/vimc/vimc-common.h Name:vimc_ent_type]

Results:
map[SourceCode: 143:	/**
 144:	 * struct vimc_ent_type		Structure for the callbacks of the entity types
 145:	 *
 146:	 *
 147:	 * @add:			initializes and registers
 148:	 *				vimc entity - called from vimc-core
 149:	 * @unregister:			unregisters vimc entity - called from vimc-core
 150:	 * @release:			releases vimc entity - called from the v4l2_dev
 151:	 *				release callback
 152:	 */
 153:	struct vimc_ent_type {
 154:		struct vimc_ent_device *(*add)(struct vimc_device *vimc,
 155:					       const char *vcfg_name);
 156:		void (*unregister)(struct vimc_ent_device *ved);
 157:		void (*release)(struct vimc_ent_device *ved);
 158:	};
 SourceFile:drivers/media/test-drivers/vimc/vimc-common.h]

217/2 2026/08/07 16:33 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 139919
							output: 45
							thoughts: 63
						

Thoughts:
**My Thought Process Regarding Vimc Sensor Unregistration**

Okay, I'm trying to get a handle on how these Vimc sensors are being unregistered, and it's a bit of a puzzle. My initial understanding was that `unregister` is a function that's called to clean things up, and if it's `NULL`, then it's simply not executed. That seems straightforward enough.

But then I looked at `vimc_sensor_type` and noticed it *doesn't have an `unregister` field at all*. This immediately raised a red flag for me. If there's no dedicated `unregister` function pointer in the sensor type itself, then how on earth are the subdevices associated with Vimc sensors being properly unregistered when the device is removed? It feels like there's a missing piece in the cleanup mechanism. My next step, therefore, is to dive into the `vimc_remove` function. That's where I expect to find the answer to this apparent discrepancy. I need to see what logic is being applied there to ensure proper resource deallocation when a Vimc sensor is no longer needed.


218/2 2026/08/07 16:33 tool codesearch-definition-source
0m Args:
map[ContextFile:drivers/media/test-drivers/vimc/vimc-core.c Name:vimc_remove]

Results:
map[SourceCode: 387:	static void vimc_remove(struct platform_device *pdev)
 388:	{
 389:		struct vimc_device *vimc = platform_get_drvdata(pdev);
 390:	
 391:		dev_dbg(&pdev->dev, "remove");
 392:	
 393:		vimc_unregister_subdevs(vimc);
 394:		media_device_unregister(&vimc->mdev);
 395:		v4l2_device_unregister(&vimc->v4l2_dev);
 396:		v4l2_device_put(&vimc->v4l2_dev);
 397:	}
 SourceFile:drivers/media/test-drivers/vimc/vimc-core.c]

219/2 2026/08/07 16:33 llm initial-researcher
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 140234
							output: 51
							thoughts: 17
						

Thoughts:
**My Realization about `v4l2_device_unregister`**

Wow, I just had a significant realization about `v4l2_device_unregister`. It's not just about unregistering a single V4L2 device; it's a much broader operation. My understanding is now that calling `v4l2_device_unregister` actually triggers the unregistration of *all* the sub-devices associated with that V4L2 device. This is a crucial detail that has broader implications for how I manage device lifecycles and dependencies. I need to keep this in mind to avoid potential issues and ensure proper cleanup.


220/2 2026/08/07 16:34 tool codesearch-definition-source
0m Args:
map[ContextFile:drivers/media/v4l2-core/v4l2-device.c Name:v4l2_device_unregister]

Results:
map[SourceCode:  88:	void v4l2_device_unregister(struct v4l2_device *v4l2_dev)
  89:	{
  90:		struct v4l2_subdev *sd, *next;
  91:	
  92:		/* Just return if v4l2_dev is NULL or if it was already
  93:		 * unregistered before. */
  94:		if (v4l2_dev == NULL || !v4l2_dev->name[0])
  95:			return;
  96:		v4l2_device_disconnect(v4l2_dev);
  97:	
  98:		/* Unregister subdevs */
  99:		list_for_each_entry_safe(sd, next, &v4l2_dev->subdevs, list) {
 100:			v4l2_device_unregister_subdev(sd);
 101:			if (sd->flags & V4L2_SUBDEV_FL_IS_I2C)
 102:				v4l2_i2c_subdev_unregister(sd);
 103:			else if (sd->flags & V4L2_SUBDEV_FL_IS_SPI)
 104:				v4l2_spi_subdev_unregister(sd);
 105:		}
 106:		/* Mark as unregistered, thus preventing duplicate unregistrations */
 107:		v4l2_dev->name[0] = '\0';
 108:	}
 SourceFile:drivers/media/v4l2-core/v4l2-device.c]

221/2 2026/08/07 16:34 llm initial-researcher
2m Model:
gemini-3.1-pro-preview

Tokens:
							input: 140714
							output: 1326
							thoughts: 6841
						

Thoughts:
**Understanding the Race Condition for `v4l2_device_unregister_subdev`**

Okay, so I've been diving deep into this kernel crash, and I think I've got a solid grasp on how it's happening and how to reproduce it. It all hinges on a race condition between a device being unbound and a sub-device being opened.

My initial thought was, "Yes! `v4l2_device_unregister` calls `v4l2_device_unregister_subdev` for all its subdevs, and `vimc_remove` calls `v4l2_device_unregister`." This is crucial because it means that when the `vimc` platform device is unbound (removed), all of its associated sub-devices will go through the unregistration process.

The "aha!" moment came when I connected this to opening the sub-device nodes, like `/dev/v4l-subdevX`. If we can unbind `vimc` and, at the same time, open one of its sub-device nodes, that's where the race is likely to occur.

To make this happen reliably, I need to construct a C program. Here's the breakdown of what I'm planning to do:

1.  **Triggering the Unbind:** I'll need to open `/sys/bus/platform/drivers/vimc/unbind` and write the device name, which I've confirmed is just "vimc" after checking `vimc_init`. This will initiate the unbinding process.

2.  **Opening Sub-devices Concurrently:** In parallel, I'll need to open the `/dev/v4l-subdevX` nodes. I know `vimc` creates multiple subdevs, so targeting `/dev/v4l-subdev0` and `/dev/v4l-subdev1` (or even more) in separate threads seems like the best approach.

3.  **Aggravating the Race:** To increase the chances of hitting this race condition, I can put the binding and unbinding of `vimc` into a tight loop. This will generate a lot of concurrent unbind/bind and open/close operations. I've also considered if other drivers like `syzkaller` might be involved, but `vimc` is a good, self-contained target for a reproducer.

Now, let's trace the execution path to see exactly where the crash happens:

*   **Thread A (Opening):** This thread calls `v4l2_open` on a sub-device. This function acquires the `videodev_lock`, finds the `vdev`, gets a reference using `video_get()`, and then releases `videodev_lock`. Crucially, it then calls the sub-device's `open` operation, which is `subdev_open`.

*   **Thread B (Unbinding):** This thread calls `vimc_remove`, which in turn calls `v4l2_device_unregister`, and finally `v4l2_device_unregister_subdev(sd)`.

The critical part is within `subdev_open`:
```c
if (sd->v4l2_dev->mdev && sd->entity.graph_obj.mdev->dev) {
    // ... crash happens here ...
}
```
And within `v4l2_device_unregister_subdev`:
```c
sd->v4l2_dev = NULL;

#if defined(CONFIG_MEDIA_CONTROLLER)
if (v4l2_dev->mdev) {
    media_device_unregister_entity(&sd->entity);
}
#endif
if (sd->devnode)
    video_unregister_device(sd->devnode);
```
The race occurs if Thread A reads `sd->v4l2_dev` *before* Thread B sets it to `NULL`. Then, if Thread B proceeds to set `sd->v4l2_dev = NULL` and then calls `media_device_unregister_entity`, which in turn sets `sd->entity.graph_obj.mdev = NULL`. At this point, if Thread A, having already read `sd->v4l2_dev->mdev` (which was non-NULL), tries to read `sd->entity.graph_obj.mdev`, it will get `NULL`. The subsequent dereference of this `NULL` pointer (`->dev`) is what causes the null-pointer-dereference crash.

The fact that `video_unregister_device` is called last in `v4l2_device_unregister_subdev` and takes `videodev_lock` is interesting. It means `v4l2_open` can complete its critical section and release `videodev_lock` *before* `video_unregister_device` even acquires it. This allows `subdev_open` to run concurrently with the unregistration process without contention on `videodev_lock`, creating the window for the race.

My reproducer program will involve a thread that continuously binds and unbinds `vimc` and several other threads that repeatedly open `/dev/v4l-subdevX` nodes. This setup should reliably trigger the condition where `subdev_open` is executed just as `v4l2_device_unregister_subdev` is clearing out the necessary pointers. The specific crash occurs because `subdev_open` checks `sd->v4l2_dev->mdev` first, and then `sd->entity.graph_obj.mdev`. The unregistration process sets `sd->v4l2_dev` to NULL, then unregisters the media entity, setting `sd->entity.graph_obj.mdev` to NULL. If the `open` path reads the non-NULL `sd->v4l2_dev->mdev` before it's cleared, and is then preempted, it will proceed to read the now-NULL `sd->entity.graph_obj.mdev`, leading to the crash.


222/1 2026/08/07 16:36 loop
13m
223/2 2026/08/07 16:36 iteration 0
4m
224/3 2026/08/07 16:36 action If
0m Args:
map[OracleFeedback:]

225/3 2026/08/07 16:36 action merge-strategy
0m Results:
map[CurrentReproStrategy:An analysis of the crash reveals a classic Time-Of-Check to Time-Of-Use (TOCTOU) race condition between opening a sub-device node and unregistering the sub-device.

### Root Cause Analysis
The crash occurs in `subdev_open()` at `drivers/media/v4l2-core/v4l2-subdev.c`:
```c
	if (sd->v4l2_dev->mdev && sd->entity.graph_obj.mdev->dev) {
```
The KASAN report indicates a NULL pointer dereference for the exact address `0xdffffc0000000000`, which is the KASAN shadow address for `NULL` (0). The assembly confirms that `sd->entity.graph_obj.mdev` is being loaded into `%rbp` and evaluated as `NULL`, causing the fault when attempting to access `->dev`.

This happens due to a race with `v4l2_device_unregister_subdev()` (called during device removal/unbind):
```c
void v4l2_device_unregister_subdev(struct v4l2_subdev *sd)
{
	// ...
	sd->v4l2_dev = NULL;

#if defined(CONFIG_MEDIA_CONTROLLER)
	if (v4l2_dev->mdev) {
		media_device_unregister_entity(&sd->entity); // Sets sd->entity.graph_obj.mdev = NULL
	}
#endif
	if (sd->devnode)
		video_unregister_device(sd->devnode);
	// ...
}
```
Notice that `video_unregister_device()` is called **after** modifying `sd->v4l2_dev` and unregistering the media entity. 

The race interleaving is as follows:
1. **Thread A (userspace `open`)**: Calls `v4l2_open()`, successfully acquires a reference to the video device (since it hasn't been unregistered yet), and calls `subdev_open()`.
2. **Thread A**: Evaluates `sd->v4l2_dev->mdev` and finds it non-NULL.
3. **Thread B (driver unbind)**: Calls `v4l2_device_unregister_subdev()`. It sets `sd->v4l2_dev = NULL` and calls `media_device_unregister_entity()`, which sets `sd->entity.graph_obj.mdev = NULL`.
4. **Thread A**: Resumes and evaluates `sd->entity.graph_obj.mdev`. It gets `NULL` and crashes when dereferencing `->dev`.

### Reproduction Strategy
To reproduce this bug, we can use the `vimc` (Virtual Media Controller) test driver, which is a software-only driver that registers `v4l2_subdev`s with device nodes (`V4L2_SUBDEV_FL_HAS_DEVNODE`).

1. **Setup**: Ensure the `vimc` module is loaded. It registers a platform device named `vimc`.
2. **Thread 1 (Unbind/Bind Loop)**: Continuously write `"vimc"` to `/sys/bus/platform/drivers/vimc/unbind` and then to `bind`. This rapidly triggers `vimc_remove()` and `v4l2_device_unregister_subdev()`.
3. **Threads 2-N (Open Loop)**: Continuously call `open()` and `close()` on the `/dev/v4l-subdevX` nodes created by `vimc`.

### Minimal C Reproducer
```c
#define _GNU_SOURCE
#include <fcntl.h>
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>

void *bind_unbind_thread(void *arg)
{
    int bind_fd = open("/sys/bus/platform/drivers/vimc/bind", O_WRONLY);
    int unbind_fd = open("/sys/bus/platform/drivers/vimc/unbind", O_WRONLY);
    
    if (bind_fd < 0 || unbind_fd < 0) {
        perror("Failed to open sysfs bind/unbind (is vimc loaded?)");
        return NULL;
    }

    while (1) {
        write(unbind_fd, "vimc", 4);
        usleep(1000);
        write(bind_fd, "vimc", 4);
        usleep(10000);
    }
    return NULL;
}

void *open_thread(void *arg)
{
    char dev_name[32];
    int id = (int)(long)arg;
    
    /* vimc creates multiple subdevs, we race on them */
    sprintf(dev_name, "/dev/v4l-subdev%d", id);
    
    while (1) {
        int fd = open(dev_name, O_RDWR);
        if (fd >= 0) {
            close(fd);
        }
    }
    return NULL;
}

int main(void)
{
    pthread_t t_bind;
    pthread_t t_open[16];
    
    pthread_create(&t_bind, NULL, bind_unbind_thread, NULL);
    
    for (int i = 0; i < 16; i++) {
        pthread_create(&t_open[i], NULL, open_thread, (void *)(long)i);
    }
    
    pthread_join(t_bind, NULL);
    return 0;
}
```]

226/3 2026/08/07 16:36 agent repro-generator
1m Model:
best-expensive

Results:
map[IsProbe:true RawCandidateReproC:#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/stat.h>

int main(void) {
    struct stat st;
    if (stat("/sys/bus/platform/drivers/vimc/bind", &st) == 0) {
        printf("[+] vimc driver is available.\n");
        return 0;
    }
    printf("[-] vimc driver is not available.\n");
    return 1;
}
]

Instruction:
You are a security researcher with deep Linux kernel background.
Your goal is to generate a minimal, standalone C program for the strictly defensive
purpose of verifying a bugfix in an isolated environment.

To ensure that we can diagnose why a program might fail to run on the test environment,
you MUST include detailed logging and error checking in the generated C program:
1. Use 'printf(...)' for all progress messages and error logs.
2. Every system call (e.g., socket, bind, listen, connect, ioctl, send) must check for a failure return value.
3. If a call fails, it must print a specific error message including the function name
   and the error string (use strerror(errno)), and then exit with a non-zero status.
4. The program must print a message after every successful major step.
5. Generate code that follows this pattern for all operations:
    int res = do_something();
    if (res < 0) {
        printf("[-] Failed to do_something: %s\n", strerror(errno));
        exit(1);
    }
    printf("[+] do_something successful.\n");
6. The compilation and development environment (including compilers, build
   systems, makefiles, and kernel build/header directories) is NOT available
   on the target test VM guest. Do NOT check for, build, or reference any
   compilation tools, build files, or kernel development directories.
7. Do NOT execute shell commands or run external binaries (e.g. by using
   functions like 'system()', 'popen()', or the 'exec' family such as
   'execve()'). All environment checks, capability probings, and reproduction
   steps must be performed directly using standard Linux system calls (such
   as 'open', 'socket', 'ioctl', 'stat', etc.).
8. When reproducing asynchronous kernel timeouts or warnings, always
   include a sufficient delay (using sleep or similar) after deleting
   or unregistering the device to allow the kernel's asynchronous
   timeout to trigger before program exit.


=== PHASE 1: CAPABILITY PROBING (GENERATION) ===
You MUST start by generating a simple 'probe' program first. This is a strict, non-negotiable requirement
to verify that the test environment has the necessary kernel capabilities and privileges.
This program's sole purpose is to verify subsystem availability and privileges by probing specific
device files, subsystems, or syscalls (for example: opening /dev/vhci to check if the virtual
Bluetooth controller is accessible, loading a minimal dummy BPF program, or making a specific
socket/ioctl call).

Print clear messages indicating success or failure of these probes, and exit with 0 only if
all checks pass.
Do NOT attempt complex logic, and do NOT try to trigger the actual bug/crash in this first version,
regardless of how simple the reproducer seems. You must wait until a successful probe run has been
confirmed in the environment (i.e., when CapabilitiesVerified becomes true).

Prefer calling several tools at the same time to save round-trips.


Use set-results tool to provide results of the analysis.
It must be called exactly once before the final reply.
Ignore results of this tool.

Prompt:
Bug Description: general protection fault in subdev_open

Oops: general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#1] SMP KASAN NOPTI
KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007]
CPU: 1 UID: 0 PID: 11356 Comm: syz.1.1458 Tainted: G             L      syzkaller #0 PREEMPT(full) 
Tainted: [L]=SOFTLOCKUP
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/16/2026
RIP: 0010:subdev_open+0x193/0x510 drivers/media/v4l2-core/v4l2-subdev.c:115
Code: 00 00 00 00 fc ff df 48 c1 ea 03 80 3c 02 00 0f 85 bc 02 00 00 48 b8 00 00 00 00 00 fc ff df 49 8b 2c 24 48 89 ea 48 c1 ea 03 <80> 3c 02 00 0f 85 04 03 00 00 48 8b 6d 00 48 85 ed 0f 84 95 00 00
RSP: 0018:ffffc900037bf8a0 EFLAGS: 00010246
RAX: dffffc0000000000 RBX: ffff888055f54c00 RCX: ffffc90003e51000
RDX: 0000000000000000 RSI: ffffffff88163993 RDI: ffff88802d3ad3d0
RBP: 0000000000000000 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000001 R11: 0000000000000000 R12: ffff88802d414020
R13: ffff88802d70b000 R14: ffff888079c69340 R15: ffff888055f54d38
FS:  00007f15691926c0(0000) GS:ffff888123eed000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f1568387700 CR3: 000000003243a000 CR4: 00000000003526f0
Call Trace:
 <TASK>
 v4l2_open+0x1d2/0x490 drivers/media/v4l2-core/v4l2-dev.c:433
 chrdev_open+0x234/0x6a0 fs/char_dev.c:411
 do_dentry_open+0x6ab/0x14d0 fs/open.c:947
 vfs_open+0x82/0x3f0 fs/open.c:1052
 do_open fs/namei.c:4700 [inline]
 path_openat+0x2873/0x4280 fs/namei.c:4863
 do_file_open+0x20e/0x430 fs/namei.c:4892
 do_sys_openat2+0x10f/0x1e0 fs/open.c:1368
 do_sys_open fs/open.c:1374 [inline]
 __do_sys_openat fs/open.c:1390 [inline]
 __se_sys_openat fs/open.c:1385 [inline]
 __x64_sys_openat+0x12d/0x210 fs/open.c:1385
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0x115/0x870 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f156835e90e
Code: 08 0f 85 a5 a8 ff ff 49 89 fb 48 89 f0 48 89 d7 48 89 ce 4c 89 c2 4d 89 ca 4c 8b 44 24 08 4c 8b 4c 24 10 4c 89 5c 24 08 0f 05 <c3> 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 80 00 00 00 00 48 83 ec 08
RSP: 002b:00007f1569191b28 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 00007f15691926c0 RCX: 00007f156835e90e
RDX: 0000000000000002 RSI: 00007f1569191c00 RDI: ffffffffffffff9c
RBP: 00007f1569191c00 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: cccccccccccccccd
R13: 00007f1568626038 R14: 00007f1568625fa0 R15: 00007ffe228ab238
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:subdev_open+0x193/0x510 drivers/media/v4l2-core/v4l2-subdev.c:115
Code: 00 00 00 00 fc ff df 48 c1 ea 03 80 3c 02 00 0f 85 bc 02 00 00 48 b8 00 00 00 00 00 fc ff df 49 8b 2c 24 48 89 ea 48 c1 ea 03 <80> 3c 02 00 0f 85 04 03 00 00 48 8b 6d 00 48 85 ed 0f 84 95 00 00
RSP: 0018:ffffc900037bf8a0 EFLAGS: 00010246

RAX: dffffc0000000000 RBX: ffff888055f54c00 RCX: ffffc90003e51000
RDX: 0000000000000000 RSI: ffffffff88163993 RDI: ffff88802d3ad3d0
RBP: 0000000000000000 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000001 R11: 0000000000000000 R12: ffff88802d414020
R13: ffff88802d70b000 R14: ffff888079c69340 R15: ffff888055f54d38
FS:  00007f15691926c0(0000) GS:ffff888123ded000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fc283cc07e8 CR3: 000000003243a000 CR4: 00000000003526f0
----------------
Code disassembly (best guess), 7 bytes skipped:
   0:	48 c1 ea 03          	shr    $0x3,%rdx
   4:	80 3c 02 00          	cmpb   $0x0,(%rdx,%rax,1)
   8:	0f 85 bc 02 00 00    	jne    0x2ca
   e:	48 b8 00 00 00 00 00 	movabs $0xdffffc0000000000,%rax
  15:	fc ff df
  18:	49 8b 2c 24          	mov    (%r12),%rbp
  1c:	48 89 ea             	mov    %rbp,%rdx
  1f:	48 c1 ea 03          	shr    $0x3,%rdx
* 23:	80 3c 02 00          	cmpb   $0x0,(%rdx,%rax,1) <-- trapping instruction
  27:	0f 85 04 03 00 00    	jne    0x331
  2d:	48 8b 6d 00          	mov    0x0(%rbp),%rbp
  31:	48 85 ed             	test   %rbp,%rbp
  34:	0f                   	.byte 0xf
  35:	84                   	.byte 0x84
  36:	95                   	xchg   %eax,%ebp

Strategy: An analysis of the crash reveals a classic Time-Of-Check to Time-Of-Use (TOCTOU) race condition between opening a sub-device node and unregistering the sub-device.

### Root Cause Analysis
The crash occurs in `subdev_open()` at `drivers/media/v4l2-core/v4l2-subdev.c`:
```c
	if (sd->v4l2_dev->mdev && sd->entity.graph_obj.mdev->dev) {
```
The KASAN report indicates a NULL pointer dereference for the exact address `0xdffffc0000000000`, which is the KASAN shadow address for `NULL` (0). The assembly confirms that `sd->entity.graph_obj.mdev` is being loaded into `%rbp` and evaluated as `NULL`, causing the fault when attempting to access `->dev`.

This happens due to a race with `v4l2_device_unregister_subdev()` (called during device removal/unbind):
```c
void v4l2_device_unregister_subdev(struct v4l2_subdev *sd)
{
	// ...
	sd->v4l2_dev = NULL;

#if defined(CONFIG_MEDIA_CONTROLLER)
	if (v4l2_dev->mdev) {
		media_device_unregister_entity(&sd->entity); // Sets sd->entity.graph_obj.mdev = NULL
	}
#endif
	if (sd->devnode)
		video_unregister_device(sd->devnode);
	// ...
}
```
Notice that `video_unregister_device()` is called **after** modifying `sd->v4l2_dev` and unregistering the media entity. 

The race interleaving is as follows:
1. **Thread A (userspace `open`)**: Calls `v4l2_open()`, successfully acquires a reference to the video device (since it hasn't been unregistered yet), and calls `subdev_open()`.
2. **Thread A**: Evaluates `sd->v4l2_dev->mdev` and finds it non-NULL.
3. **Thread B (driver unbind)**: Calls `v4l2_device_unregister_subdev()`. It sets `sd->v4l2_dev = NULL` and calls `media_device_unregister_entity()`, which sets `sd->entity.graph_obj.mdev = NULL`.
4. **Thread A**: Resumes and evaluates `sd->entity.graph_obj.mdev`. It gets `NULL` and crashes when dereferencing `->dev`.

### Reproduction Strategy
To reproduce this bug, we can use the `vimc` (Virtual Media Controller) test driver, which is a software-only driver that registers `v4l2_subdev`s with device nodes (`V4L2_SUBDEV_FL_HAS_DEVNODE`).

1. **Setup**: Ensure the `vimc` module is loaded. It registers a platform device named `vimc`.
2. **Thread 1 (Unbind/Bind Loop)**: Continuously write `"vimc"` to `/sys/bus/platform/drivers/vimc/unbind` and then to `bind`. This rapidly triggers `vimc_remove()` and `v4l2_device_unregister_subdev()`.
3. **Threads 2-N (Open Loop)**: Continuously call `open()` and `close()` on the `/dev/v4l-subdevX` nodes created by `vimc`.

### Minimal C Reproducer
```c
#define _GNU_SOURCE
#include <fcntl.h>
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>

void *bind_unbind_thread(void *arg)
{
    int bind_fd = open("/sys/bus/platform/drivers/vimc/bind", O_WRONLY);
    int unbind_fd = open("/sys/bus/platform/drivers/vimc/unbind", O_WRONLY);
    
    if (bind_fd < 0 || unbind_fd < 0) {
        perror("Failed to open sysfs bind/unbind (is vimc loaded?)");
        return NULL;
    }

    while (1) {
        write(unbind_fd, "vimc", 4);
        usleep(1000);
        write(bind_fd, "vimc", 4);
        usleep(10000);
    }
    return NULL;
}

void *open_thread(void *arg)
{
    char dev_name[32];
    int id = (int)(long)arg;
    
    /* vimc creates multiple subdevs, we race on them */
    sprintf(dev_name, "/dev/v4l-subdev%d", id);
    
    while (1) {
        int fd = open(dev_name, O_RDWR);
        if (fd >= 0) {
            close(fd);
        }
    }
    return NULL;
}

int main(void)
{
    pthread_t t_bind;
    pthread_t t_open[16];
    
    pthread_create(&t_bind, NULL, bind_unbind_thread, NULL);
    
    for (int i = 0; i < 16; i++) {
        pthread_create(&t_open[i], NULL, open_thread, (void *)(long)i);
    }
    
    pthread_join(t_bind, NULL);
    return 0;
}
```




227/4 2026/08/07 16:36 llm repro-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 7223
							output: 32
							thoughts: 426
						

Thoughts:
**My Thought Process on Debugging a General Protection Fault in `subdev_open`**

I've just encountered a bug report detailing a critical issue: a general protection fault occurring within the `subdev_open` function, specifically caused by a null pointer dereference. My immediate next step is to pinpoint the root cause. The analysis provided suggests a race condition, a classic concurrency problem, occurring between `subdev_open` and `v4l2_device_unregister_subdev`. This means that under certain timing circumstances, one operation could be interrupted by the other, leading to an inconsistent state where a pointer is unexpectedly null.

To effectively tackle this, the suggested strategy is to leverage the `vimc` driver for reproduction. The idea is to create a scenario where we race the `open` system call on a `/dev/v4l-subdevX` device against the binding and unbinding operations of the `vimc` platform device. This specific setup is intended to reliably trigger the race condition.

Before I can actually execute this reproduction strategy, I need a way to verify if the necessary environment is present and configured correctly. My first priority is to develop a capability probing program. This program needs to determine if the `vimc` module is loadable, or more importantly, if the `vimc` platform device is already present and discoverable on the system, or if I can even interact with it in any meaningful way.

Now, I'm pausing to consider the nuances of the execution environment. It's entirely possible that the `vimc` module isn't loaded by default. If that's the case, how do I ensure it's available? My initial thought is to check for the existence of `/sys/bus/platform/drivers/vimc`. If this directory isn't present, it might indicate that the driver isn't loaded. I'm considering whether I might need to attempt loading it using `modprobe`, but I quickly dismiss this idea as I'm operating within a fuzzing framework (syzkaller, implicitly) where I cannot directly execute shell commands like `system()`.

I then recall how syzkaller typically operates. It often uses mechanisms like `syz_mount_image` to set up a specific file system environment, or it relies on the assumption that the kernel configuration will include the necessary components, like `vimc`, either as built-in or automatically loadable.

So, my probing program needs to be more sophisticated than just checking for a pre-loaded module. I'll focus on checking for the presence of `/sys/bus/platform/drivers/vimc`. If it's there, great. If not, I need a way to ascertain if its loading can be *triggered*.

However, I'm reminded again that syzkaller might not have `vimc` loaded. This raises the question: how does syzkaller typically load or ensure the availability of modules or drivers? It doesn't actively load them in the traditional sense; rather, it relies on either the module being built into the kernel or the kernel's auto-loading mechanisms kicking in when a device is detected.

Thinking further, `vimc` is a *platform driver*. These types of drivers are usually either compiled directly into the kernel (built-in) or are automatically loaded by the kernel's platform device registration mechanism if the corresponding hardware or virtual device is detected. However, since `vimc` is a *virtual* driver, its registration might be more dynamic. It could be built-in and register itself upon kernel initialization, or it might require a specific trigger.

To gain clarity, my next logical step is to dive into the kernel source code for `vimc`. This will allow me to understand its initialization process, how it registers itself, and what conditions are necessary for it to become available, thereby informing the design of my probing program and ultimately, the reproduction strategy.


228/4 2026/08/07 16:36 tool grepper
0m Args:
map[Expression:vimc PathPrefix:drivers/media/test-drivers/vimc]

Results:
map[Output:
Full output is too long, showing 500 out of 1783 lines.
Use more precise expression if possible.

drivers/media/test-drivers/vimc/Makefile-1-# SPDX-License-Identifier: GPL-2.0
drivers/media/test-drivers/vimc/Makefile:2:vimc-y := vimc-core.o vimc-common.o vimc-streamer.o vimc-capture.o \
drivers/media/test-drivers/vimc/Makefile:3:		vimc-debayer.o vimc-scaler.o vimc-sensor.o vimc-lens.o
drivers/media/test-drivers/vimc/Makefile-4-
drivers/media/test-drivers/vimc/Makefile:5:obj-$(CONFIG_VIDEO_VIMC) += vimc.o
drivers/media/test-drivers/vimc/Makefile-6-
--
drivers/media/test-drivers/vimc/vimc-capture.c-2-/*
drivers/media/test-drivers/vimc/vimc-capture.c:3: * vimc-capture.c Virtual Media Controller Driver
drivers/media/test-drivers/vimc/vimc-capture.c-4- *
--
drivers/media/test-drivers/vimc/vimc-capture.c-12-
drivers/media/test-drivers/vimc/vimc-capture.c:13:#include "vimc-common.h"
drivers/media/test-drivers/vimc/vimc-capture.c:14:#include "vimc-streamer.h"
drivers/media/test-drivers/vimc/vimc-capture.c-15-
drivers/media/test-drivers/vimc/vimc-capture.c:16:struct vimc_capture_device {
drivers/media/test-drivers/vimc/vimc-capture.c:17:	struct vimc_ent_device ved;
drivers/media/test-drivers/vimc/vimc-capture.c-18-	struct video_device vdev;
--
drivers/media/test-drivers/vimc/vimc-capture.c-25-	 * and the isr is not allowed to sleep.
drivers/media/test-drivers/vimc/vimc-capture.c:26:	 * Even if it is not necessary a spinlock in the vimc driver, we
drivers/media/test-drivers/vimc/vimc-capture.c-27-	 * use it here as a code reference
--
drivers/media/test-drivers/vimc/vimc-capture.c-31-	u32 sequence;
drivers/media/test-drivers/vimc/vimc-capture.c:32:	struct vimc_stream stream;
drivers/media/test-drivers/vimc/vimc-capture.c-33-	struct media_pad pad;
--
drivers/media/test-drivers/vimc/vimc-capture.c=36=static const struct v4l2_pix_format fmt_default = {
--
drivers/media/test-drivers/vimc/vimc-capture.c-43-
drivers/media/test-drivers/vimc/vimc-capture.c:44:struct vimc_capture_buffer {
drivers/media/test-drivers/vimc/vimc-capture.c-45-	/*
--
drivers/media/test-drivers/vimc/vimc-capture.c-54-
drivers/media/test-drivers/vimc/vimc-capture.c:55:static int vimc_capture_querycap(struct file *file, void *priv,
drivers/media/test-drivers/vimc/vimc-capture.c-56-			     struct v4l2_capability *cap)
--
drivers/media/test-drivers/vimc/vimc-capture.c-63-
drivers/media/test-drivers/vimc/vimc-capture.c:64:static void vimc_capture_get_format(struct vimc_ent_device *ved,
drivers/media/test-drivers/vimc/vimc-capture.c-65-				struct v4l2_pix_format *fmt)
drivers/media/test-drivers/vimc/vimc-capture.c-66-{
drivers/media/test-drivers/vimc/vimc-capture.c:67:	struct vimc_capture_device *vcapture = container_of(ved, struct vimc_capture_device,
drivers/media/test-drivers/vimc/vimc-capture.c-68-						    ved);
--
drivers/media/test-drivers/vimc/vimc-capture.c-72-
drivers/media/test-drivers/vimc/vimc-capture.c:73:static int vimc_capture_g_fmt_vid_cap(struct file *file, void *priv,
drivers/media/test-drivers/vimc/vimc-capture.c-74-				  struct v4l2_format *f)
drivers/media/test-drivers/vimc/vimc-capture.c-75-{
drivers/media/test-drivers/vimc/vimc-capture.c:76:	struct vimc_capture_device *vcapture = video_drvdata(file);
drivers/media/test-drivers/vimc/vimc-capture.c-77-
--
drivers/media/test-drivers/vimc/vimc-capture.c-82-
drivers/media/test-drivers/vimc/vimc-capture.c:83:static int vimc_capture_try_fmt_vid_cap(struct file *file, void *priv,
drivers/media/test-drivers/vimc/vimc-capture.c-84-				    struct v4l2_format *f)
--
drivers/media/test-drivers/vimc/vimc-capture.c-86-	struct v4l2_pix_format *format = &f->fmt.pix;
drivers/media/test-drivers/vimc/vimc-capture.c:87:	const struct vimc_pix_map *vpix;
drivers/media/test-drivers/vimc/vimc-capture.c-88-
--
drivers/media/test-drivers/vimc/vimc-capture.c-94-	/* Don't accept a pixelformat that is not on the table */
drivers/media/test-drivers/vimc/vimc-capture.c:95:	vpix = vimc_pix_map_by_pixelformat(format->pixelformat);
drivers/media/test-drivers/vimc/vimc-capture.c-96-	if (!vpix) {
drivers/media/test-drivers/vimc/vimc-capture.c-97-		format->pixelformat = fmt_default.pixelformat;
drivers/media/test-drivers/vimc/vimc-capture.c:98:		vpix = vimc_pix_map_by_pixelformat(format->pixelformat);
drivers/media/test-drivers/vimc/vimc-capture.c-99-	}
--
drivers/media/test-drivers/vimc/vimc-capture.c-106-
drivers/media/test-drivers/vimc/vimc-capture.c:107:	vimc_colorimetry_clamp(format);
drivers/media/test-drivers/vimc/vimc-capture.c-108-
--
drivers/media/test-drivers/vimc/vimc-capture.c-114-
drivers/media/test-drivers/vimc/vimc-capture.c:115:static int vimc_capture_s_fmt_vid_cap(struct file *file, void *priv,
drivers/media/test-drivers/vimc/vimc-capture.c-116-				  struct v4l2_format *f)
drivers/media/test-drivers/vimc/vimc-capture.c-117-{
drivers/media/test-drivers/vimc/vimc-capture.c:118:	struct vimc_capture_device *vcapture = video_drvdata(file);
drivers/media/test-drivers/vimc/vimc-capture.c-119-	int ret;
--
drivers/media/test-drivers/vimc/vimc-capture.c-124-
drivers/media/test-drivers/vimc/vimc-capture.c:125:	ret = vimc_capture_try_fmt_vid_cap(file, priv, f);
drivers/media/test-drivers/vimc/vimc-capture.c-126-	if (ret)
--
drivers/media/test-drivers/vimc/vimc-capture.c-147-
drivers/media/test-drivers/vimc/vimc-capture.c:148:static int vimc_capture_enum_fmt_vid_cap(struct file *file, void *priv,
drivers/media/test-drivers/vimc/vimc-capture.c-149-				     struct v4l2_fmtdesc *f)
drivers/media/test-drivers/vimc/vimc-capture.c-150-{
drivers/media/test-drivers/vimc/vimc-capture.c:151:	const struct vimc_pix_map *vpix;
drivers/media/test-drivers/vimc/vimc-capture.c-152-
--
drivers/media/test-drivers/vimc/vimc-capture.c-156-
drivers/media/test-drivers/vimc/vimc-capture.c:157:		vpix = vimc_pix_map_by_code(f->mbus_code);
drivers/media/test-drivers/vimc/vimc-capture.c-158-	} else {
drivers/media/test-drivers/vimc/vimc-capture.c:159:		vpix = vimc_pix_map_by_index(f->index);
drivers/media/test-drivers/vimc/vimc-capture.c-160-	}
--
drivers/media/test-drivers/vimc/vimc-capture.c-169-
drivers/media/test-drivers/vimc/vimc-capture.c:170:static int vimc_capture_enum_framesizes(struct file *file, void *priv,
drivers/media/test-drivers/vimc/vimc-capture.c-171-				    struct v4l2_frmsizeenum *fsize)
drivers/media/test-drivers/vimc/vimc-capture.c-172-{
drivers/media/test-drivers/vimc/vimc-capture.c:173:	const struct vimc_pix_map *vpix;
drivers/media/test-drivers/vimc/vimc-capture.c-174-
--
drivers/media/test-drivers/vimc/vimc-capture.c-178-	/* Only accept code in the pix map table */
drivers/media/test-drivers/vimc/vimc-capture.c:179:	vpix = vimc_pix_map_by_code(fsize->pixel_format);
drivers/media/test-drivers/vimc/vimc-capture.c-180-	if (!vpix)
--
drivers/media/test-drivers/vimc/vimc-capture.c-193-
drivers/media/test-drivers/vimc/vimc-capture.c:194:static const struct v4l2_file_operations vimc_capture_fops = {
drivers/media/test-drivers/vimc/vimc-capture.c-195-	.owner		= THIS_MODULE,
--
drivers/media/test-drivers/vimc/vimc-capture.c-203-
drivers/media/test-drivers/vimc/vimc-capture.c:204:static const struct v4l2_ioctl_ops vimc_capture_ioctl_ops = {
drivers/media/test-drivers/vimc/vimc-capture.c:205:	.vidioc_querycap = vimc_capture_querycap,
drivers/media/test-drivers/vimc/vimc-capture.c-206-
drivers/media/test-drivers/vimc/vimc-capture.c:207:	.vidioc_g_fmt_vid_cap = vimc_capture_g_fmt_vid_cap,
drivers/media/test-drivers/vimc/vimc-capture.c:208:	.vidioc_s_fmt_vid_cap = vimc_capture_s_fmt_vid_cap,
drivers/media/test-drivers/vimc/vimc-capture.c:209:	.vidioc_try_fmt_vid_cap = vimc_capture_try_fmt_vid_cap,
drivers/media/test-drivers/vimc/vimc-capture.c:210:	.vidioc_enum_fmt_vid_cap = vimc_capture_enum_fmt_vid_cap,
drivers/media/test-drivers/vimc/vimc-capture.c:211:	.vidioc_enum_framesizes = vimc_capture_enum_framesizes,
drivers/media/test-drivers/vimc/vimc-capture.c-212-
--
drivers/media/test-drivers/vimc/vimc-capture.c-224-
drivers/media/test-drivers/vimc/vimc-capture.c:225:static void vimc_capture_return_all_buffers(struct vimc_capture_device *vcapture,
drivers/media/test-drivers/vimc/vimc-capture.c-226-					enum vb2_buffer_state state)
drivers/media/test-drivers/vimc/vimc-capture.c-227-{
drivers/media/test-drivers/vimc/vimc-capture.c:228:	struct vimc_capture_buffer *vbuf, *node;
drivers/media/test-drivers/vimc/vimc-capture.c-229-
--
drivers/media/test-drivers/vimc/vimc-capture.c-239-
drivers/media/test-drivers/vimc/vimc-capture.c:240:static int vimc_capture_start_streaming(struct vb2_queue *vq, unsigned int count)
drivers/media/test-drivers/vimc/vimc-capture.c-241-{
drivers/media/test-drivers/vimc/vimc-capture.c:242:	struct vimc_capture_device *vcapture = vb2_get_drv_priv(vq);
drivers/media/test-drivers/vimc/vimc-capture.c-243-	int ret;
--
drivers/media/test-drivers/vimc/vimc-capture.c-249-	if (ret) {
drivers/media/test-drivers/vimc/vimc-capture.c:250:		vimc_capture_return_all_buffers(vcapture, VB2_BUF_STATE_QUEUED);
drivers/media/test-drivers/vimc/vimc-capture.c-251-		return ret;
--
drivers/media/test-drivers/vimc/vimc-capture.c-253-
drivers/media/test-drivers/vimc/vimc-capture.c:254:	ret = vimc_streamer_s_stream(&vcapture->stream, &vcapture->ved, 1);
drivers/media/test-drivers/vimc/vimc-capture.c-255-	if (ret) {
drivers/media/test-drivers/vimc/vimc-capture.c-256-		video_device_pipeline_stop(&vcapture->vdev);
drivers/media/test-drivers/vimc/vimc-capture.c:257:		vimc_capture_return_all_buffers(vcapture, VB2_BUF_STATE_QUEUED);
drivers/media/test-drivers/vimc/vimc-capture.c-258-		return ret;
--
drivers/media/test-drivers/vimc/vimc-capture.c-267- */
drivers/media/test-drivers/vimc/vimc-capture.c:268:static void vimc_capture_stop_streaming(struct vb2_queue *vq)
drivers/media/test-drivers/vimc/vimc-capture.c-269-{
drivers/media/test-drivers/vimc/vimc-capture.c:270:	struct vimc_capture_device *vcapture = vb2_get_drv_priv(vq);
drivers/media/test-drivers/vimc/vimc-capture.c-271-
drivers/media/test-drivers/vimc/vimc-capture.c:272:	vimc_streamer_s_stream(&vcapture->stream, &vcapture->ved, 0);
drivers/media/test-drivers/vimc/vimc-capture.c-273-
--
drivers/media/test-drivers/vimc/vimc-capture.c-277-	/* Release all active buffers */
drivers/media/test-drivers/vimc/vimc-capture.c:278:	vimc_capture_return_all_buffers(vcapture, VB2_BUF_STATE_ERROR);
drivers/media/test-drivers/vimc/vimc-capture.c-279-}
drivers/media/test-drivers/vimc/vimc-capture.c-280-
drivers/media/test-drivers/vimc/vimc-capture.c:281:static void vimc_capture_buf_queue(struct vb2_buffer *vb2_buf)
drivers/media/test-drivers/vimc/vimc-capture.c-282-{
drivers/media/test-drivers/vimc/vimc-capture.c:283:	struct vimc_capture_device *vcapture = vb2_get_drv_priv(vb2_buf->vb2_queue);
drivers/media/test-drivers/vimc/vimc-capture.c:284:	struct vimc_capture_buffer *buf = container_of(vb2_buf,
drivers/media/test-drivers/vimc/vimc-capture.c:285:						   struct vimc_capture_buffer,
drivers/media/test-drivers/vimc/vimc-capture.c-286-						   vb2.vb2_buf);
--
drivers/media/test-drivers/vimc/vimc-capture.c-292-
drivers/media/test-drivers/vimc/vimc-capture.c:293:static int vimc_capture_queue_setup(struct vb2_queue *vq, unsigned int *nbuffers,
drivers/media/test-drivers/vimc/vimc-capture.c-294-				unsigned int *nplanes, unsigned int sizes[],
--
drivers/media/test-drivers/vimc/vimc-capture.c-296-{
drivers/media/test-drivers/vimc/vimc-capture.c:297:	struct vimc_capture_device *vcapture = vb2_get_drv_priv(vq);
drivers/media/test-drivers/vimc/vimc-capture.c-298-
--
drivers/media/test-drivers/vimc/vimc-capture.c-307-
drivers/media/test-drivers/vimc/vimc-capture.c:308:static int vimc_capture_buffer_prepare(struct vb2_buffer *vb)
drivers/media/test-drivers/vimc/vimc-capture.c-309-{
drivers/media/test-drivers/vimc/vimc-capture.c:310:	struct vimc_capture_device *vcapture = vb2_get_drv_priv(vb->vb2_queue);
drivers/media/test-drivers/vimc/vimc-capture.c-311-	unsigned long size = vcapture->format.sizeimage;
--
drivers/media/test-drivers/vimc/vimc-capture.c-320-
drivers/media/test-drivers/vimc/vimc-capture.c:321:static const struct vb2_ops vimc_capture_qops = {
drivers/media/test-drivers/vimc/vimc-capture.c:322:	.start_streaming	= vimc_capture_start_streaming,
drivers/media/test-drivers/vimc/vimc-capture.c:323:	.stop_streaming		= vimc_capture_stop_streaming,
drivers/media/test-drivers/vimc/vimc-capture.c:324:	.buf_queue		= vimc_capture_buf_queue,
drivers/media/test-drivers/vimc/vimc-capture.c:325:	.queue_setup		= vimc_capture_queue_setup,
drivers/media/test-drivers/vimc/vimc-capture.c:326:	.buf_prepare		= vimc_capture_buffer_prepare,
drivers/media/test-drivers/vimc/vimc-capture.c-327-};
drivers/media/test-drivers/vimc/vimc-capture.c-328-
drivers/media/test-drivers/vimc/vimc-capture.c:329:static const struct media_entity_operations vimc_capture_mops = {
drivers/media/test-drivers/vimc/vimc-capture.c:330:	.link_validate		= vimc_vdev_link_validate,
drivers/media/test-drivers/vimc/vimc-capture.c-331-};
drivers/media/test-drivers/vimc/vimc-capture.c-332-
drivers/media/test-drivers/vimc/vimc-capture.c:333:static void vimc_capture_release(struct vimc_ent_device *ved)
drivers/media/test-drivers/vimc/vimc-capture.c-334-{
drivers/media/test-drivers/vimc/vimc-capture.c:335:	struct vimc_capture_device *vcapture =
drivers/media/test-drivers/vimc/vimc-capture.c:336:		container_of(ved, struct vimc_capture_device, ved);
drivers/media/test-drivers/vimc/vimc-capture.c-337-
--
drivers/media/test-drivers/vimc/vimc-capture.c-341-
drivers/media/test-drivers/vimc/vimc-capture.c:342:static void vimc_capture_unregister(struct vimc_ent_device *ved)
drivers/media/test-drivers/vimc/vimc-capture.c-343-{
drivers/media/test-drivers/vimc/vimc-capture.c:344:	struct vimc_capture_device *vcapture =
drivers/media/test-drivers/vimc/vimc-capture.c:345:		container_of(ved, struct vimc_capture_device, ved);
drivers/media/test-drivers/vimc/vimc-capture.c-346-
--
drivers/media/test-drivers/vimc/vimc-capture.c-349-
drivers/media/test-drivers/vimc/vimc-capture.c:350:static void *vimc_capture_process_frame(struct vimc_ent_device *ved,
drivers/media/test-drivers/vimc/vimc-capture.c-351-				    const void *frame)
drivers/media/test-drivers/vimc/vimc-capture.c-352-{
drivers/media/test-drivers/vimc/vimc-capture.c:353:	struct vimc_capture_device *vcapture = container_of(ved, struct vimc_capture_device,
drivers/media/test-drivers/vimc/vimc-capture.c-354-						    ved);
drivers/media/test-drivers/vimc/vimc-capture.c:355:	struct vimc_capture_buffer *vimc_buf;
drivers/media/test-drivers/vimc/vimc-capture.c-356-	void *vbuf;
--
drivers/media/test-drivers/vimc/vimc-capture.c-360-	/* Get the first entry of the list */
drivers/media/test-drivers/vimc/vimc-capture.c:361:	vimc_buf = list_first_entry_or_null(&vcapture->buf_list,
drivers/media/test-drivers/vimc/vimc-capture.c:362:					    typeof(*vimc_buf), list);
drivers/media/test-drivers/vimc/vimc-capture.c:363:	if (!vimc_buf) {
drivers/media/test-drivers/vimc/vimc-capture.c-364-		spin_unlock(&vcapture->qlock);
--
drivers/media/test-drivers/vimc/vimc-capture.c-368-	/* Remove this entry from the list */
drivers/media/test-drivers/vimc/vimc-capture.c:369:	list_del(&vimc_buf->list);
drivers/media/test-drivers/vimc/vimc-capture.c-370-
--
drivers/media/test-drivers/vimc/vimc-capture.c-373-	/* Fill the buffer */
drivers/media/test-drivers/vimc/vimc-capture.c:374:	vimc_buf->vb2.vb2_buf.timestamp = ktime_get_ns();
drivers/media/test-drivers/vimc/vimc-capture.c:375:	vimc_buf->vb2.sequence = vcapture->sequence++;
drivers/media/test-drivers/vimc/vimc-capture.c:376:	vimc_buf->vb2.field = vcapture->format.field;
drivers/media/test-drivers/vimc/vimc-capture.c-377-
drivers/media/test-drivers/vimc/vimc-capture.c:378:	vbuf = vb2_plane_vaddr(&vimc_buf->vb2.vb2_buf, 0);
drivers/media/test-drivers/vimc/vimc-capture.c-379-
--
drivers/media/test-drivers/vimc/vimc-capture.c-382-	/* Set it as ready */
drivers/media/test-drivers/vimc/vimc-capture.c:383:	vb2_set_plane_payload(&vimc_buf->vb2.vb2_buf, 0,
drivers/media/test-drivers/vimc/vimc-capture.c-384-			      vcapture->format.sizeimage);
drivers/media/test-drivers/vimc/vimc-capture.c:385:	vb2_buffer_done(&vimc_buf->vb2.vb2_buf, VB2_BUF_STATE_DONE);
drivers/media/test-drivers/vimc/vimc-capture.c-386-	return NULL;
--
drivers/media/test-drivers/vimc/vimc-capture.c-388-
drivers/media/test-drivers/vimc/vimc-capture.c:389:static struct vimc_ent_device *vimc_capture_add(struct vimc_device *vimc,
drivers/media/test-drivers/vimc/vimc-capture.c-390-					    const char *vcfg_name)
drivers/media/test-drivers/vimc/vimc-capture.c-391-{
drivers/media/test-drivers/vimc/vimc-capture.c:392:	struct v4l2_device *v4l2_dev = &vimc->v4l2_dev;
drivers/media/test-drivers/vimc/vimc-capture.c:393:	const struct vimc_pix_map *vpix;
drivers/media/test-drivers/vimc/vimc-capture.c:394:	struct vimc_capture_device *vcapture;
drivers/media/test-drivers/vimc/vimc-capture.c-395-	struct video_device *vdev;
--
drivers/media/test-drivers/vimc/vimc-capture.c-398-
drivers/media/test-drivers/vimc/vimc-capture.c:399:	/* Allocate the vimc_capture_device struct */
drivers/media/test-drivers/vimc/vimc-capture.c-400-	vcapture = kzalloc_obj(*vcapture);
--
drivers/media/test-drivers/vimc/vimc-capture.c-419-	q->io_modes = VB2_MMAP | VB2_DMABUF;
drivers/media/test-drivers/vimc/vimc-capture.c:420:	if (vimc_allocator == VIMC_ALLOCATOR_VMALLOC)
drivers/media/test-drivers/vimc/vimc-capture.c-421-		q->io_modes |= VB2_USERPTR;
drivers/media/test-drivers/vimc/vimc-capture.c-422-	q->drv_priv = vcapture;
drivers/media/test-drivers/vimc/vimc-capture.c:423:	q->buf_struct_size = sizeof(struct vimc_capture_buffer);
drivers/media/test-drivers/vimc/vimc-capture.c:424:	q->ops = &vimc_capture_qops;
drivers/media/test-drivers/vimc/vimc-capture.c:425:	q->mem_ops = vimc_allocator == VIMC_ALLOCATOR_DMA_CONTIG
drivers/media/test-drivers/vimc/vimc-capture.c-426-		   ? &vb2_dma_contig_memops : &vb2_vmalloc_memops;
--
drivers/media/test-drivers/vimc/vimc-capture.c-433-	if (ret) {
drivers/media/test-drivers/vimc/vimc-capture.c:434:		dev_err(vimc->mdev.dev, "%s: vb2 queue init failed (err=%d)\n",
drivers/media/test-drivers/vimc/vimc-capture.c-435-			vcfg_name, ret);
--
drivers/media/test-drivers/vimc/vimc-capture.c-444-	vcapture->format = fmt_default;
drivers/media/test-drivers/vimc/vimc-capture.c:445:	vpix = vimc_pix_map_by_pixelformat(vcapture->format.pixelformat);
drivers/media/test-drivers/vimc/vimc-capture.c-446-	vcapture->format.bytesperline = vcapture->format.width * vpix->bpp;
--
drivers/media/test-drivers/vimc/vimc-capture.c-449-
drivers/media/test-drivers/vimc/vimc-capture.c:450:	/* Fill the vimc_ent_device struct */
drivers/media/test-drivers/vimc/vimc-capture.c-451-	vcapture->ved.ent = &vcapture->vdev.entity;
drivers/media/test-drivers/vimc/vimc-capture.c:452:	vcapture->ved.process_frame = vimc_capture_process_frame;
drivers/media/test-drivers/vimc/vimc-capture.c:453:	vcapture->ved.vdev_get_format = vimc_capture_get_format;
drivers/media/test-drivers/vimc/vimc-capture.c:454:	vcapture->ved.dev = vimc->mdev.dev;
drivers/media/test-drivers/vimc/vimc-capture.c-455-
--
drivers/media/test-drivers/vimc/vimc-capture.c-459-			  | V4L2_CAP_IO_MC;
drivers/media/test-drivers/vimc/vimc-capture.c:460:	vdev->entity.ops = &vimc_capture_mops;
drivers/media/test-drivers/vimc/vimc-capture.c-461-	vdev->release = video_device_release_empty;
drivers/media/test-drivers/vimc/vimc-capture.c:462:	vdev->fops = &vimc_capture_fops;
drivers/media/test-drivers/vimc/vimc-capture.c:463:	vdev->ioctl_ops = &vimc_capture_ioctl_ops;
drivers/media/test-drivers/vimc/vimc-capture.c-464-	vdev->lock = &vcapture->lock;
--
drivers/media/test-drivers/vimc/vimc-capture.c-473-	if (ret) {
drivers/media/test-drivers/vimc/vimc-capture.c:474:		dev_err(vimc->mdev.dev, "%s: video register failed (err=%d)\n",
drivers/media/test-drivers/vimc/vimc-capture.c-475-			vcapture->vdev.name, ret);
--
drivers/media/test-drivers/vimc/vimc-capture.c-488-
drivers/media/test-drivers/vimc/vimc-capture.c:489:const struct vimc_ent_type vimc_capture_type = {
drivers/media/test-drivers/vimc/vimc-capture.c:490:	.add = vimc_capture_add,
drivers/media/test-drivers/vimc/vimc-capture.c:491:	.unregister = vimc_capture_unregister,
drivers/media/test-drivers/vimc/vimc-capture.c:492:	.release = vimc_capture_release
drivers/media/test-drivers/vimc/vimc-capture.c-493-};
--
drivers/media/test-drivers/vimc/vimc-common.c-2-/*
drivers/media/test-drivers/vimc/vimc-common.c:3: * vimc-common.c Virtual Media Controller Driver
drivers/media/test-drivers/vimc/vimc-common.c-4- *
--
drivers/media/test-drivers/vimc/vimc-common.c-12-
drivers/media/test-drivers/vimc/vimc-common.c:13:#include "vimc-common.h"
drivers/media/test-drivers/vimc/vimc-common.c-14-
--
drivers/media/test-drivers/vimc/vimc-common.c-18- */
drivers/media/test-drivers/vimc/vimc-common.c:19:static const struct vimc_pix_map vimc_pix_map_list[] = {
drivers/media/test-drivers/vimc/vimc-common.c-20-	/* TODO: add all missing formats */
--
drivers/media/test-drivers/vimc/vimc-common.c-180-
drivers/media/test-drivers/vimc/vimc-common.c:181:bool vimc_is_source(struct media_entity *ent)
drivers/media/test-drivers/vimc/vimc-common.c-182-{
--
drivers/media/test-drivers/vimc/vimc-common.c-190-
drivers/media/test-drivers/vimc/vimc-common.c:191:const struct vimc_pix_map *vimc_pix_map_by_index(unsigned int i)
drivers/media/test-drivers/vimc/vimc-common.c-192-{
drivers/media/test-drivers/vimc/vimc-common.c:193:	if (i >= ARRAY_SIZE(vimc_pix_map_list))
drivers/media/test-drivers/vimc/vimc-common.c-194-		return NULL;
drivers/media/test-drivers/vimc/vimc-common.c-195-
drivers/media/test-drivers/vimc/vimc-common.c:196:	return &vimc_pix_map_list[i];
drivers/media/test-drivers/vimc/vimc-common.c-197-}
drivers/media/test-drivers/vimc/vimc-common.c-198-
drivers/media/test-drivers/vimc/vimc-common.c:199:u32 vimc_mbus_code_by_index(unsigned int index)
drivers/media/test-drivers/vimc/vimc-common.c-200-{
--
drivers/media/test-drivers/vimc/vimc-common.c-202-
drivers/media/test-drivers/vimc/vimc-common.c:203:	for (i = 0; i < ARRAY_SIZE(vimc_pix_map_list); i++) {
drivers/media/test-drivers/vimc/vimc-common.c:204:		for (j = 0; j < ARRAY_SIZE(vimc_pix_map_list[i].code); j++) {
drivers/media/test-drivers/vimc/vimc-common.c:205:			if (!vimc_pix_map_list[i].code[j])
drivers/media/test-drivers/vimc/vimc-common.c-206-				break;
--
drivers/media/test-drivers/vimc/vimc-common.c-208-			if (!index)
drivers/media/test-drivers/vimc/vimc-common.c:209:				return vimc_pix_map_list[i].code[j];
drivers/media/test-drivers/vimc/vimc-common.c-210-			index--;
--
drivers/media/test-drivers/vimc/vimc-common.c-215-
drivers/media/test-drivers/vimc/vimc-common.c:216:const struct vimc_pix_map *vimc_pix_map_by_code(u32 code)
drivers/media/test-drivers/vimc/vimc-common.c-217-{
--
drivers/media/test-drivers/vimc/vimc-common.c-219-
drivers/media/test-drivers/vimc/vimc-common.c:220:	for (i = 0; i < ARRAY_SIZE(vimc_pix_map_list); i++) {
drivers/media/test-drivers/vimc/vimc-common.c:221:		for (j = 0; j < ARRAY_SIZE(vimc_pix_map_list[i].code); j++) {
drivers/media/test-drivers/vimc/vimc-common.c:222:			if (vimc_pix_map_list[i].code[j] == code)
drivers/media/test-drivers/vimc/vimc-common.c:223:				return &vimc_pix_map_list[i];
drivers/media/test-drivers/vimc/vimc-common.c-224-		}
--
drivers/media/test-drivers/vimc/vimc-common.c-228-
drivers/media/test-drivers/vimc/vimc-common.c:229:const struct vimc_pix_map *vimc_pix_map_by_pixelformat(u32 pixelformat)
drivers/media/test-drivers/vimc/vimc-common.c-230-{
--
drivers/media/test-drivers/vimc/vimc-common.c-232-
drivers/media/test-drivers/vimc/vimc-common.c:233:	for (i = 0; i < ARRAY_SIZE(vimc_pix_map_list); i++) {
drivers/media/test-drivers/vimc/vimc-common.c:234:		if (vimc_pix_map_list[i].pixelformat == pixelformat)
drivers/media/test-drivers/vimc/vimc-common.c:235:			return &vimc_pix_map_list[i];
drivers/media/test-drivers/vimc/vimc-common.c-236-	}
--
drivers/media/test-drivers/vimc/vimc-common.c-239-
drivers/media/test-drivers/vimc/vimc-common.c:240:static int vimc_get_pix_format(struct media_pad *pad,
drivers/media/test-drivers/vimc/vimc-common.c-241-			       struct v4l2_pix_format *fmt)
--
drivers/media/test-drivers/vimc/vimc-common.c-249-		};
drivers/media/test-drivers/vimc/vimc-common.c:250:		const struct vimc_pix_map *pix_map;
drivers/media/test-drivers/vimc/vimc-common.c-251-		int ret;
--
drivers/media/test-drivers/vimc/vimc-common.c-257-		v4l2_fill_pix_format(fmt, &sd_fmt.format);
drivers/media/test-drivers/vimc/vimc-common.c:258:		pix_map = vimc_pix_map_by_code(sd_fmt.format.code);
drivers/media/test-drivers/vimc/vimc-common.c-259-		fmt->pixelformat = pix_map->pixelformat;
--
drivers/media/test-drivers/vimc/vimc-common.c-263-							 entity);
drivers/media/test-drivers/vimc/vimc-common.c:264:		struct vimc_ent_device *ved = video_get_drvdata(vdev);
drivers/media/test-drivers/vimc/vimc-common.c-265-
--
drivers/media/test-drivers/vimc/vimc-common.c-276-
drivers/media/test-drivers/vimc/vimc-common.c:277:int vimc_vdev_link_validate(struct media_link *link)
drivers/media/test-drivers/vimc/vimc-common.c-278-{
--
drivers/media/test-drivers/vimc/vimc-common.c-281-
drivers/media/test-drivers/vimc/vimc-common.c:282:	ret = vimc_get_pix_format(link->source, &source_fmt);
drivers/media/test-drivers/vimc/vimc-common.c-283-	if (ret)
--
drivers/media/test-drivers/vimc/vimc-common.c-285-
drivers/media/test-drivers/vimc/vimc-common.c:286:	ret = vimc_get_pix_format(link->sink, &sink_fmt);
drivers/media/test-drivers/vimc/vimc-common.c-287-	if (ret)
--
drivers/media/test-drivers/vimc/vimc-common.c-289-
drivers/media/test-drivers/vimc/vimc-common.c:290:	pr_info("vimc link validate: "
drivers/media/test-drivers/vimc/vimc-common.c-291-		"%s:src:%dx%d (0x%x, %d, %d, %d, %d) "
--
drivers/media/test-drivers/vimc/vimc-common.c-351-
drivers/media/test-drivers/vimc/vimc-common.c:352:static const struct media_entity_operations vimc_ent_sd_mops = {
drivers/media/test-drivers/vimc/vimc-common.c-353-	.link_validate = v4l2_subdev_link_validate,
--
drivers/media/test-drivers/vimc/vimc-common.c-355-
drivers/media/test-drivers/vimc/vimc-common.c:356:int vimc_ent_sd_register(struct vimc_ent_device *ved,
drivers/media/test-drivers/vimc/vimc-common.c-357-			 struct v4l2_subdev *sd,
--
drivers/media/test-drivers/vimc/vimc-common.c-367-
drivers/media/test-drivers/vimc/vimc-common.c:368:	/* Fill the vimc_ent_device struct */
drivers/media/test-drivers/vimc/vimc-common.c-369-	ved->ent = &sd->entity;
--
drivers/media/test-drivers/vimc/vimc-common.c-374-	sd->entity.function = function;
drivers/media/test-drivers/vimc/vimc-common.c:375:	sd->entity.ops = &vimc_ent_sd_mops;
drivers/media/test-drivers/vimc/vimc-common.c-376-	sd->owner = THIS_MODULE;
--
drivers/media/test-drivers/vimc/vimc-common.h-2-/*
drivers/media/test-drivers/vimc/vimc-common.h:3: * vimc-common.h Virtual Media Controller Driver
drivers/media/test-drivers/vimc/vimc-common.h-4- *
--
drivers/media/test-drivers/vimc/vimc-common.h-17-
drivers/media/test-drivers/vimc/vimc-common.h:18:#define VIMC_PDEV_NAME "vimc"
drivers/media/test-drivers/vimc/vimc-common.h-19-
--
drivers/media/test-drivers/vimc/vimc-common.h-48-
drivers/media/test-drivers/vimc/vimc-common.h:49:extern unsigned int vimc_allocator;
drivers/media/test-drivers/vimc/vimc-common.h-50-
drivers/media/test-drivers/vimc/vimc-common.h:51:enum vimc_allocator_type {
drivers/media/test-drivers/vimc/vimc-common.h-52-	VIMC_ALLOCATOR_VMALLOC = 0,
--
drivers/media/test-drivers/vimc/vimc-common.h-56-/**
drivers/media/test-drivers/vimc/vimc-common.h:57: * vimc_colorimetry_clamp - Adjust colorimetry parameters
drivers/media/test-drivers/vimc/vimc-common.h-58- *
--
drivers/media/test-drivers/vimc/vimc-common.h-64- */
drivers/media/test-drivers/vimc/vimc-common.h:65:#define vimc_colorimetry_clamp(fmt)					\
drivers/media/test-drivers/vimc/vimc-common.h-66-do {									\
--
drivers/media/test-drivers/vimc/vimc-common.h-82-/**
drivers/media/test-drivers/vimc/vimc-common.h:83: * struct vimc_pix_map - maps media bus code with v4l2 pixel format
drivers/media/test-drivers/vimc/vimc-common.h-84- *
--
drivers/media/test-drivers/vimc/vimc-common.h-92- */
drivers/media/test-drivers/vimc/vimc-common.h:93:struct vimc_pix_map {
drivers/media/test-drivers/vimc/vimc-common.h-94-	unsigned int code[VIMC_PIX_FMT_MAX_CODES];
--
drivers/media/test-drivers/vimc/vimc-common.h-100-/**
drivers/media/test-drivers/vimc/vimc-common.h:101: * struct vimc_ent_device - core struct that represents an entity in the
drivers/media/test-drivers/vimc/vimc-common.h-102- * topology
--
drivers/media/test-drivers/vimc/vimc-common.h-110- *
drivers/media/test-drivers/vimc/vimc-common.h:111: * Each node of the topology must create a vimc_ent_device struct. Depending on
drivers/media/test-drivers/vimc/vimc-common.h-112- * the node it will be of an instance of v4l2_subdev or video_device struct
drivers/media/test-drivers/vimc/vimc-common.h-113- * where both contains a struct media_entity.
drivers/media/test-drivers/vimc/vimc-common.h:114: * Those structures should embedded the vimc_ent_device struct through
drivers/media/test-drivers/vimc/vimc-common.h-115- * v4l2_set_subdevdata() and video_set_drvdata() respectively, allowing the
drivers/media/test-drivers/vimc/vimc-common.h:116: * vimc_ent_device struct to be retrieved from the corresponding struct
drivers/media/test-drivers/vimc/vimc-common.h-117- * media_entity
drivers/media/test-drivers/vimc/vimc-common.h-118- */
drivers/media/test-drivers/vimc/vimc-common.h:119:struct vimc_ent_device {
drivers/media/test-drivers/vimc/vimc-common.h-120-	struct device *dev;
drivers/media/test-drivers/vimc/vimc-common.h-121-	struct media_entity *ent;
drivers/media/test-drivers/vimc/vimc-common.h:122:	void * (*process_frame)(struct vimc_ent_device *ved,
drivers/media/test-drivers/vimc/vimc-common.h-123-				const void *frame);
drivers/media/test-drivers/vimc/vimc-common.h:124:	void (*vdev_get_format)(struct vimc_ent_device *ved,
drivers/media/test-drivers/vimc/vimc-common.h-125-			      struct v4l2_pix_format *fmt);
--
drivers/media/test-drivers/vimc/vimc-common.h-128-/**
drivers/media/test-drivers/vimc/vimc-common.h:129: * struct vimc_device - main device for vimc driver
drivers/media/test-drivers/vimc/vimc-common.h-130- *
drivers/media/test-drivers/vimc/vimc-common.h:131: * @pipe_cfg:	pointer to the vimc pipeline configuration structure
drivers/media/test-drivers/vimc/vimc-common.h:132: * @ent_devs:	array of vimc_ent_device pointers
drivers/media/test-drivers/vimc/vimc-common.h-133- * @mdev:	the associated media_device parent
--
drivers/media/test-drivers/vimc/vimc-common.h-135- */
drivers/media/test-drivers/vimc/vimc-common.h:136:struct vimc_device {
drivers/media/test-drivers/vimc/vimc-common.h:137:	const struct vimc_pipeline_config *pipe_cfg;
drivers/media/test-drivers/vimc/vimc-common.h:138:	struct vimc_ent_device **ent_devs;
drivers/media/test-drivers/vimc/vimc-common.h-139-	struct media_device mdev;
--
drivers/media/test-drivers/vimc/vimc-common.h-143-/**
drivers/media/test-drivers/vimc/vimc-common.h:144: * struct vimc_ent_type		Structure for the callbacks of the entity types
drivers/media/test-drivers/vimc/vimc-common.h-145- *
--
drivers/media/test-drivers/vimc/vimc-common.h-147- * @add:			initializes and registers
drivers/media/test-drivers/vimc/vimc-common.h:148: *				vimc entity - called from vimc-core
drivers/media/test-drivers/vimc/vimc-common.h:149: * @unregister:			unregisters vimc entity - called from vimc-core
drivers/media/test-drivers/vimc/vimc-common.h:150: * @release:			releases vimc entity - called from the v4l2_dev
drivers/media/test-drivers/vimc/vimc-common.h-151- *				release callback
drivers/media/test-drivers/vimc/vimc-common.h-152- */
drivers/media/test-drivers/vimc/vimc-common.h:153:struct vimc_ent_type {
drivers/media/test-drivers/vimc/vimc-common.h:154:	struct vimc_ent_device *(*add)(struct vimc_device *vimc,
drivers/media/test-drivers/vimc/vimc-common.h-155-				       const char *vcfg_name);
drivers/media/test-drivers/vimc/vimc-common.h:156:	void (*unregister)(struct vimc_ent_device *ved);
drivers/media/test-drivers/vimc/vimc-common.h:157:	void (*release)(struct vimc_ent_device *ved);
drivers/media/test-drivers/vimc/vimc-common.h-158-};
--
drivers/media/test-drivers/vimc/vimc-common.h-160-/**
drivers/media/test-drivers/vimc/vimc-common.h:161: * struct vimc_ent_config	Structure which describes individual
drivers/media/test-drivers/vimc/vimc-common.h-162- *				configuration for each entity
--
drivers/media/test-drivers/vimc/vimc-common.h-167- */
drivers/media/test-drivers/vimc/vimc-common.h:168:struct vimc_ent_config {
drivers/media/test-drivers/vimc/vimc-common.h-169-	const char *name;
drivers/media/test-drivers/vimc/vimc-common.h:170:	const struct vimc_ent_type *type;
drivers/media/test-drivers/vimc/vimc-common.h-171-};
drivers/media/test-drivers/vimc/vimc-common.h-172-
drivers/media/test-drivers/vimc/vimc-common.h:173:enum vimc_sensor_osd_mode {
drivers/media/test-drivers/vimc/vimc-common.h-174-	VIMC_SENSOR_OSD_SHOW_ALL = 0,
--
drivers/media/test-drivers/vimc/vimc-common.h-178-
drivers/media/test-drivers/vimc/vimc-common.h:179:struct vimc_sensor_device {
drivers/media/test-drivers/vimc/vimc-common.h:180:	struct vimc_ent_device ved;
drivers/media/test-drivers/vimc/vimc-common.h-181-	struct v4l2_subdev sd;
--
drivers/media/test-drivers/vimc/vimc-common.h-196-		struct v4l2_area size;
drivers/media/test-drivers/vimc/vimc-common.h:197:		enum vimc_sensor_osd_mode osd_value;

]

229/4 2026/08/07 16:36 llm repro-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 21546
							output: 40
							thoughts: 253
						

Thoughts:
**My Thought Process Regarding the `vimc` Driver**

My initial thought is to understand the nature of the `vimc` driver. I recognize it as a platform driver. My immediate concern then becomes how to actually get this driver loaded and active within our testing environment.

I recall syzkaller's typical mechanisms for triggering module loading: usually, it involves interacting with device nodes or utilizing functions like `syz_mount_image`. However, I immediately question whether these standard methods will apply to `vimc` because it's a *virtual* driver. This prompts a deeper inquiry: is there a specific pathway to load `vimc`?

I consider the possibility that `vimc` might be built as a loadable module. If so, it might be present in the system but not yet loaded. Conversely, if it's built directly into the kernel, it would already be present.

To verify its existence, my next step is to check for the presence of `/sys/bus/platform/drivers/vimc` in the test environment. I could even devise a probe program to perform this check. If this directory *doesn't* exist, it suggests `vimc` isn't loaded. My next inclination would be to try and trigger its loading by, for instance, opening device nodes like `/dev/video0` or `/dev/v4l-subdev0`. However, I realize this might not be effective for `vimc` unless it has a specific alias that triggers auto-loading on these devices.

My attention then shifts to the core mechanism of platform drivers. I know that `vimc` is a platform driver, and platform drivers typically register corresponding platform devices. I recall that in `vimc-core.c`, a platform device named `vimc` is indeed registered. This specific detail is crucial, and my next action would be to delve into the code of `vimc-core.c` to understand precisely how this device registration occurs and what implications it has for the driver's loading and initialization.


230/4 2026/08/07 16:36 tool grepper
0m Args:
map[Expression:module_init PathPrefix:drivers/media/test-drivers/vimc/vimc-core.c]

Results:
map[Output:drivers/media/test-drivers/vimc/vimc-core.c=439=static void __exit vimc_exit(void)
--
drivers/media/test-drivers/vimc/vimc-core.c-445-
drivers/media/test-drivers/vimc/vimc-core.c:446:module_init(vimc_init);
drivers/media/test-drivers/vimc/vimc-core.c-447-module_exit(vimc_exit);
]

231/4 2026/08/07 16:36 llm repro-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 21958
							output: 41
							thoughts: 13
						

Thoughts:
**My Thought Process Regarding `vimc_init`**

Alright, so my immediate impulse here is to dig into `vimc_init`. I need to understand its fundamental purpose and how it functions within the broader system. My core question is: what is this initialization routine actually *doing*? Is it setting up global state, allocating resources, establishing connections, or perhaps configuring specific modules? I'm expecting to find details about its scope of influence – does it affect the entire Vim process, or is it more granular, perhaps tied to a specific plugin or set of functionalities that `vimc` manages? I'll be looking for any dependencies it might have, either on external libraries or on other parts of the Vim environment that need to be in place beforehand. Furthermore, I’m curious about its return values, if any, and what they signify in terms of successful initialization or potential issues. Understanding the sequence of operations it performs is crucial for anticipating its impact on performance and stability. Ultimately, I'm trying to build a mental model of `vimc_init` as the foundational step for whatever `vimc` represents, ensuring I grasp its role before proceeding to any subsequent actions or analyses related to `vimc`.


232/4 2026/08/07 16:36 tool grepper
0m Args:
map[Expression:vimc_init PathPrefix:drivers/media/test-drivers/vimc/vimc-core.c]

Results:
map[Output:drivers/media/test-drivers/vimc/vimc-core.c=408=static struct platform_driver vimc_pdrv = {
--
drivers/media/test-drivers/vimc/vimc-core.c-415-
drivers/media/test-drivers/vimc/vimc-core.c:416:static int __init vimc_init(void)
drivers/media/test-drivers/vimc/vimc-core.c-417-{
--
drivers/media/test-drivers/vimc/vimc-core.c=439=static void __exit vimc_exit(void)
--
drivers/media/test-drivers/vimc/vimc-core.c-445-
drivers/media/test-drivers/vimc/vimc-core.c:446:module_init(vimc_init);
drivers/media/test-drivers/vimc/vimc-core.c-447-module_exit(vimc_exit);
]

233/4 2026/08/07 16:36 llm repro-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 22250
							output: 45
							thoughts: 19
						

Thoughts:
**My Thought Process Regarding `vimc_init` and Platform Device Registration**

Ah, right, so my immediate objective here is to scrutinize the `vimc_init` function. My core hypothesis, or rather the question I'm actively trying to answer by delving into its code, is whether this particular initialization routine is responsible for registering a platform device. This is a critical piece of information for understanding the device driver's integration into the system, as platform devices represent a common and well-defined mechanism for exposing hardware to the Linux kernel. If `vimc_init` indeed handles this, it suggests a standard and predictable registration path. My expectation is to find calls to functions like `platform_device_register` or similar API calls within its implementation. I'll be looking for the usual suspects – how it obtains resources, how it identifies the device, and the ultimate action that brings it into the kernel's device tree management. This will inform my subsequent steps in analyzing the driver's behavior and its interaction with the underlying hardware.


234/4 2026/08/07 16:36 tool read-file
0m Args:
map[File:drivers/media/test-drivers/vimc/vimc-core.c FirstLine:416 LineCount:30]

Results:
map[Contents: 416:	static int __init vimc_init(void)
 417:	{
 418:		int ret;
 419:	
 420:		ret = platform_device_register(&vimc_pdev);
 421:		if (ret) {
 422:			dev_err(&vimc_pdev.dev,
 423:				"platform device registration failed (err=%d)\n", ret);
 424:			platform_device_put(&vimc_pdev);
 425:			return ret;
 426:		}
 427:	
 428:		ret = platform_driver_register(&vimc_pdrv);
 429:		if (ret) {
 430:			dev_err(&vimc_pdev.dev,
 431:				"platform driver registration failed (err=%d)\n", ret);
 432:			platform_device_unregister(&vimc_pdev);
 433:			return ret;
 434:		}
 435:	
 436:		return 0;
 437:	}
 438:	
 439:	static void __exit vimc_exit(void)
 440:	{
 441:		platform_driver_unregister(&vimc_pdrv);
 442:	
 443:		platform_device_unregister(&vimc_pdev);
 444:	}
 445:	
]

235/4 2026/08/07 16:36 llm repro-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 22700
							output: 41
							thoughts: 445
						

Thoughts:
**My Thought Process Regarding the VIMC Driver and Syzkaller Bug**

Okay, I'm diving into this VIMC driver issue and how it relates to the syzkaller bug. My immediate thought is about how `vimc_init` is structured: it explicitly registers both `vimc_pdev` and `vimc_pdrv`. This tells me it's setting up the necessary platform device and driver.

Then, the question arises: if VIMC is built as a kernel module, how does it actually get loaded? I know I can't just use `modprobe` in a typical testing scenario, especially not in the context where syzkaller is finding this bug. Syzkaller's mechanism for triggering bugs isn't like manual module loading; it's more about interacting with devices or sysfs entries directly. It might open `/dev/videoX`, `/dev/v4l-subdevX`, or write to sysfs.

This leads me to suspect that if VIMC isn't loaded, it's likely because it's built directly into the syzkaller kernel configuration – meaning `CONFIG_VIDEO_VIMC=y`. This is a crucial point because it bypasses the need for module loading.

So, how do I check if the VIMC driver is actually present and active in the system under test, without relying on module loading? I'll devise a probe. A good initial check is to see if the sysfs entry `/sys/bus/platform/drivers/vimc` even exists. If it doesn't, the driver definitely isn't loaded or registered.

What if that sysfs directory *doesn't* exist? My next thought is to see if interacting with a VIMC-related device node might trigger auto-loading, though I recall VIMC doesn't have a conventional alias like some other drivers that would automatically map to `/dev/video0` or `/dev/v4l-subdev0`.

Given the `CONFIG_VIDEO_VIMC=y` possibility, the most direct and reliable way to confirm VIMC's presence is to check for the existence of the sysfs bind file: `/sys/bus/platform/drivers/vimc/bind`. If this file exists, it confirms the VIMC platform driver has been registered. My probe should return 0 if it finds this file, indicating VIMC is ready, and 1 otherwise.

Now, I'm looking at the actual bug report: `RIP: 0010:subdev_open+0x193/0x510 drivers/media/media/v4l2-core/v4l2-subdev.c:115`. This tells me the general protection fault is happening within the `subdev_open` function in the core V4L2 subdev code. This is a critical piece of information – the bug isn't necessarily *within* VIMC's specific code, but rather how VIMC interacts with the generic V4L2 subdev framework.

This leads to a broader strategy. If VIMC isn't available, or if it's the source of the problem, can I use *another* driver that exhibits similar behavior to reproduce the bug? The key requirements are: a driver that registers a `v4l2_subdev` and has a device node, and importantly, can be unbound via sysfs.

VIMC is a good candidate for testing precisely because it's a software-only driver and doesn't require any specific hardware. This makes it easy to deploy and test.

What other drivers fit this bill? The `vivid` driver comes to mind. It's a virtual V4L2 driver often used for testing. My next step is to investigate whether `vivid` also registers subdevs. If it does, and if it can be manipulated in a way that might trigger a similar GPF in `subdev_open`, it could be a valuable alternative for debugging or reproducing this issue.


236/4 2026/08/07 16:36 tool grepper
0m Error:
log-in to see details

Args:
map[Expression:v4l2_device_register_subdev PathPrefix:drivers/media/test-drivers/vivid]

Results:
map[Output:]

237/4 2026/08/07 16:36 llm repro-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 23184
							output: 41
							thoughts: 34
						

Thoughts:
**A Deep Dive into Video Driver Subdevice Registration**

My thought process began with a specific question about how a particular video driver, `vivid`, registers its subdevices. I initially suspected it might be using the `v4l2_device_register_subdev` function, a common API for this purpose. However, a quick search for direct matches to this function call within the `vivid` driver's codebase yielded no results. This immediately signaled that my initial assumption was incorrect and that `vivid` must be employing a different mechanism.

My next logical step was to broaden the scope of my investigation. Since `vivid` is a V4L2 (Video for Linux Two) driver, I decided to explore related components within the V4L2 framework that might be responsible for subdevice registration. The `vimc` (Virtual Media Capture) driver came to mind as a potential area of interest. `vimc` often serves as a testbed and a component that interacts with various other V4L2 devices, making it a likely candidate for handling or exposing subdevice registration logic. Therefore, my next course of action is to examine the `vimc` driver to see if it utilizes or exposes the functionality that `vivid` is employing for its subdevice registration.


238/4 2026/08/07 16:36 tool grepper
0m Args:
map[Expression:v4l2_device_register_subdev PathPrefix:drivers/media/test-drivers/vimc]

Results:
map[Output:drivers/media/test-drivers/vimc/vimc-common.c=356=int vimc_ent_sd_register(struct vimc_ent_device *ved,
--
drivers/media/test-drivers/vimc/vimc-common.c-407-	/* Register the subdev with the v4l2 and the media framework */
drivers/media/test-drivers/vimc/vimc-common.c:408:	ret = v4l2_device_register_subdev(v4l2_dev, sd);
drivers/media/test-drivers/vimc/vimc-common.c-409-	if (ret) {
--
drivers/media/test-drivers/vimc/vimc-core.c=278=static int vimc_register_devices(struct vimc_device *vimc)
--
drivers/media/test-drivers/vimc/vimc-core.c-314-	/* Expose all subdev's nodes*/
drivers/media/test-drivers/vimc/vimc-core.c:315:	ret = v4l2_device_register_subdev_nodes(&vimc->v4l2_dev);
drivers/media/test-drivers/vimc/vimc-core.c-316-	if (ret) {
]

239/4 2026/08/07 16:36 llm repro-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 23574
							output: 40
							thoughts: 476
						

Thoughts:
**My Thought Process on Probing the `vimc` Driver**

Right, so my primary goal here is to determine if the `vimc` driver is active and, if so, how to interact with it. I've observed that `vimc` internally utilizes `v4l2_device_register_subdev_nodes`, which is a key piece of information.

My initial thought for a probe program was to check for the existence of `/sys/bus/platform/drivers/vimc/bind`. This seems like a direct indicator of the driver being registered at the platform bus level. If that wasn't present, I briefly considered if opening `/dev/video0` might trigger an auto-load for `vimc`. However, my understanding is that `vimc` doesn't typically auto-load just from opening a generic video device node like `/dev/video0`.

I also reviewed the provided bug report. It doesn't show any syzkaller-specific pseudo-syscalls, which means we're likely dealing with standard kernel behavior. The call trace, showing `v4l2_open` calling into `chrdev_open` and then `do_dentry_open`, confirms that what we're seeing is a straightforward `open` syscall. This leads me to conclude that `vimc` must either be already loaded or, quite possibly, built directly into the kernel.

Given this, I'm refining my probe strategy. The next step is to write a program that first checks for the existence of `/sys/bus/platform/drivers/vimc/bind`. Concurrently, I need to look for potential subdevice nodes. The `v4l2_device_register_subdev_nodes` function suggests that `vimc` will create `/dev/v4l-subdev*` nodes. So, the probe should ideally check for the presence of any such nodes.

However, I'm also considering a potential complication: what if other V4L2 drivers are creating `/dev/v4l-subdev*` nodes? To differentiate, I can leverage sysfs. Specifically, I can examine `/sys/class/video4linux/v4l-subdevX/name` for each subdevice node. This file should contain the driver name associated with that particular subdevice. My hypothesis is that for `vimc`, this `name` attribute will reveal something characteristic, like "Sensor A" or "Debayer A," allowing me to definitively identify `vimc`-created subdevices. My ultimate goal is to pinpoint the specific `vimc` subdevice nodes to interact with.


240/4 2026/08/07 16:36 tool grepper
0m Args:
map[Expression:\.name = PathPrefix:drivers/media/test-drivers/vimc/vimc-core.c]

Results:
map[Output:drivers/media/test-drivers/vimc/vimc-core.c=84=static const struct vimc_ent_config ent_config[] = {
drivers/media/test-drivers/vimc/vimc-core.c-85-	[SENSOR_A] = {
drivers/media/test-drivers/vimc/vimc-core.c:86:		.name = "Sensor A",
drivers/media/test-drivers/vimc/vimc-core.c-87-		.type = &vimc_sensor_type
--
drivers/media/test-drivers/vimc/vimc-core.c-89-	[SENSOR_B] = {
drivers/media/test-drivers/vimc/vimc-core.c:90:		.name = "Sensor B",
drivers/media/test-drivers/vimc/vimc-core.c-91-		.type = &vimc_sensor_type
--
drivers/media/test-drivers/vimc/vimc-core.c-93-	[DEBAYER_A] = {
drivers/media/test-drivers/vimc/vimc-core.c:94:		.name = "Debayer A",
drivers/media/test-drivers/vimc/vimc-core.c-95-		.type = &vimc_debayer_type
--
drivers/media/test-drivers/vimc/vimc-core.c-97-	[DEBAYER_B] = {
drivers/media/test-drivers/vimc/vimc-core.c:98:		.name = "Debayer B",
drivers/media/test-drivers/vimc/vimc-core.c-99-		.type = &vimc_debayer_type
--
drivers/media/test-drivers/vimc/vimc-core.c-101-	[RAW_CAPTURE_0] = {
drivers/media/test-drivers/vimc/vimc-core.c:102:		.name = "Raw Capture 0",
drivers/media/test-drivers/vimc/vimc-core.c-103-		.type = &vimc_capture_type
--
drivers/media/test-drivers/vimc/vimc-core.c-105-	[RAW_CAPTURE_1] = {
drivers/media/test-drivers/vimc/vimc-core.c:106:		.name = "Raw Capture 1",
drivers/media/test-drivers/vimc/vimc-core.c-107-		.type = &vimc_capture_type
--
drivers/media/test-drivers/vimc/vimc-core.c-110-		/* TODO: change this to vimc-input when it is implemented */
drivers/media/test-drivers/vimc/vimc-core.c:111:		.name = "RGB/YUV Input",
drivers/media/test-drivers/vimc/vimc-core.c-112-		.type = &vimc_sensor_type
--
drivers/media/test-drivers/vimc/vimc-core.c-114-	[SCALER] = {
drivers/media/test-drivers/vimc/vimc-core.c:115:		.name = "Scaler",
drivers/media/test-drivers/vimc/vimc-core.c-116-		.type = &vimc_scaler_type
--
drivers/media/test-drivers/vimc/vimc-core.c-118-	[RGB_YUV_CAPTURE] = {
drivers/media/test-drivers/vimc/vimc-core.c:119:		.name = "RGB/YUV Capture",
drivers/media/test-drivers/vimc/vimc-core.c-120-		.type = &vimc_capture_type
--
drivers/media/test-drivers/vimc/vimc-core.c-122-	[LENS_A] = {
drivers/media/test-drivers/vimc/vimc-core.c:123:		.name = "Lens A",
drivers/media/test-drivers/vimc/vimc-core.c-124-		.type = &vimc_lens_type
--
drivers/media/test-drivers/vimc/vimc-core.c-126-	[LENS_B] = {
drivers/media/test-drivers/vimc/vimc-core.c:127:		.name = "Lens B",
drivers/media/test-drivers/vimc/vimc-core.c-128-		.type = &vimc_lens_type
--
drivers/media/test-drivers/vimc/vimc-core.c=403=static struct platform_device vimc_pdev = {
drivers/media/test-drivers/vimc/vimc-core.c:404:	.name = VIMC_PDEV_NAME,
drivers/media/test-drivers/vimc/vimc-core.c-405-	.dev.release = vimc_dev_release,
]

241/4 2026/08/07 16:36 llm repro-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 25329
							output: 41
							thoughts: 213
						

Thoughts:
**My Thought Process Regarding `vimc` and Subdevice Handling**

My initial exploration focused on the `vimc` driver and its relationship with subdevices. I recognized that `vimc` is responsible for creating multiple subdevices. My immediate thought was about how to control this driver, specifically if I could bind or unbind it. I noted that the existence of `/sys/bus/platform/drivers/vimc/bind` would be the key indicator for this capability.

However, a critical question arose: what if the `vimc` module isn't loaded into the kernel? I considered using `system()` to execute `modprobe vimc`, but quickly dismissed that as a viable option within my current execution context. The thought then turned to syzkaller itself. I considered the possibility that `vimc` might be built directly into the kernel image syzkaller is testing, bypassing the need for `modprobe`.

To address this uncertainty, I decided the most robust approach would be to craft a probe program. This program would first check for the presence of `/sys/bus/platform/drivers/vimc`. If this directory exists, it would confirm that `vimc` is present and loadable, allowing me to proceed with the assumption that bind/unbind operations are possible. I would then exit with a success code (0).

If `/sys/bus/platform/drivers/vimc` *doesn't* exist, my logic dictated that I wouldn't be able to bind or unbind `vimc` directly. This led to a further complication: even if `vimc` isn't loaded, and I can't `modprobe` it, what happens next? I then remembered that if `/sys/bus/platform/drivers/vimc` isn't present, the implication is that I *can't* bind or unbind `vimc` at all. This was a crucial realization.

This dead end prompted me to look for alternative drivers. My mind immediately jumped to `vivid`, another virtual driver that often serves as a substitute or complement. I decided my next step should be to investigate whether `vivid` also exposes subdevices, potentially offering a similar avenue for testing or interaction if `vimc` proves unmanageable or unavailable.


242/4 2026/08/07 16:36 tool grepper
0m Error:
log-in to see details

Args:
map[Expression:v4l2_device_register_subdev PathPrefix:drivers/media/test-drivers/vivid]

Results:
map[Output:]

243/4 2026/08/07 16:36 llm repro-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 25581
							output: 38
							thoughts: 85
						

Thoughts:
**A Deep Dive into `v4l2_device_register_subdev`**

My mind is currently grappling with the specific implementation details of `v4l2_device_register_subdev`. I distinctly recall having already investigated the `vivid` driver, and my recollection is that it does *not* expose this particular function. This has led me to broaden my search to other virtual drivers within the V4L2 subsystem. My initial hypothesis was that perhaps another virtual driver might have implemented or exposed this functionality.

I've already considered `vkms` (Virtual Kernel Mode Setting), but that, as I know, is primarily a DRM (Direct Rendering Manager) driver and not directly within the V4L2 driver model in a way that would typically expose V4L2-specific subdevice registration functions. Similarly, `vidtv` also doesn't seem to be the place where I'd expect to find it.

Given this, my current investigative path is focused on a more granular search within the kernel source tree, specifically looking within the `drivers/media/test-drivers/` directory. My rationale is that test drivers often serve as early implementations or reference points for new V4L2 APIs, and it's plausible that `v4l2_device_register_subdev` might be present or at least demonstrated within such a context before being widely adopted or integrated elsewhere. This direct file system search is a logical next step in trying to locate the specific implementation or at least understand its current status and where it might be relevant.


244/4 2026/08/07 16:37 tool grepper
0m Args:
map[Expression:v4l2_device_register_subdev PathPrefix:drivers/media/test-drivers]

Results:
map[Output:drivers/media/test-drivers/vimc/vimc-common.c=356=int vimc_ent_sd_register(struct vimc_ent_device *ved,
--
drivers/media/test-drivers/vimc/vimc-common.c-407-	/* Register the subdev with the v4l2 and the media framework */
drivers/media/test-drivers/vimc/vimc-common.c:408:	ret = v4l2_device_register_subdev(v4l2_dev, sd);
drivers/media/test-drivers/vimc/vimc-common.c-409-	if (ret) {
--
drivers/media/test-drivers/vimc/vimc-core.c=278=static int vimc_register_devices(struct vimc_device *vimc)
--
drivers/media/test-drivers/vimc/vimc-core.c-314-	/* Expose all subdev's nodes*/
drivers/media/test-drivers/vimc/vimc-core.c:315:	ret = v4l2_device_register_subdev_nodes(&vimc->v4l2_dev);
drivers/media/test-drivers/vimc/vimc-core.c-316-	if (ret) {
]

245/4 2026/08/07 16:37 llm repro-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 26019
							output: 142
							thoughts: 400
						

Thoughts:
**My Thought Process on VIMC Driver Detection**

So, my immediate thought upon seeing that only `vimc` is present in `test-drivers` is to question the completeness of that observation. What about other potential drivers? The bug report itself mentions `syzkaller` as the culprit that found this issue. My experience with `syzkaller` tells me it usually has `CONFIG_VIDEO_VIMC=y` enabled when it's running. This leads me to consider how I can programmatically verify the presence and state of the `vimc` driver.

My first instinct is to write a simple probe program. The most direct indicator of a registered platform driver is the existence of its corresponding directory under `/sys/bus/platform/drivers/`. Therefore, I propose checking if `/sys/bus/platform/drivers/vimc/bind` exists. If this file is present, it strongly suggests that the `vimc` driver has been loaded and registered with the platform bus, and I'd consider that a "good" state.

However, I quickly encounter a potential snag: what if `vimc` is built as a module and isn't currently loaded? `syzkaller` has mechanisms to trigger module loading, often by opening devices like `/dev/videoX`. So, my next thought is to try opening a sequence of `/dev/video` devices (e.g., `/dev/video0`, `/dev/video1`, and so on) with the expectation that this might force the `vimc` module to load. After attempting to trigger this loading, I'd re-check for the existence of `/sys/bus/platform/drivers/vimc/bind`.

Then, a more nuanced point arises. I recall that `vimc` is a platform driver. These types of drivers don't always auto-load simply by opening a character device like `/dev/videoX`. This is often because they lack a specific module alias for the character device major number (e.g., `char-major-81-*`). This realization tempers my previous strategy regarding opening `/dev/videoX` devices.

This leads me back to a simpler, yet potentially more robust, assumption: it's quite possible that `syzkaller` simply has `vimc` built directly into the kernel, rather than loaded as a module. So, the initial check for `/sys/bus/platform/drivers/vimc/bind` remains my primary focus.

Now, I consider a different problematic scenario: what if the `vimc` driver isn't loaded *and* it's not built-in? Could I artificially create a dummy `v4l2_subdev` from userspace to simulate its presence? No, that's not feasible. I can't directly manipulate kernel subsystems or create kernel objects from userspace in that manner.

So, I simplify my approach once again. The most reliable indicator of the `vimc` driver being present and accessible, regardless of whether it's built-in or a loaded module, is the existence of its entry in the platform driver directory. I refine my check: I will simply verify if `/sys/bus/platform/drivers/vimc` itself exists.

If the directory `/sys/bus/platform/drivers/vimc` exists, I'll consider the driver to be present and return `0` (indicating success or found). If it does not exist, I'll return `1` (indicating failure or not found). This seems like the most straightforward and reliable method to implement in my probe program. I'm now ready to write the code based on this logic.


246/4 2026/08/07 16:37 tool set-results
0m Args:
map[IsProbe:true RawCandidateReproC:#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/stat.h>

int main(void) {
    struct stat st;
    if (stat("/sys/bus/platform/drivers/vimc/bind", &st) == 0) {
        printf("[+] vimc driver is available.\n");
        return 0;
    }
    printf("[-] vimc driver is not available.\n");
    return 1;
}
]

Results:
map[IsProbe:true RawCandidateReproC:#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/stat.h>

int main(void) {
    struct stat st;
    if (stat("/sys/bus/platform/drivers/vimc/bind", &st) == 0) {
        printf("[+] vimc driver is available.\n");
        return 0;
    }
    printf("[-] vimc driver is not available.\n");
    return 1;
}
]

247/3 2026/08/07 16:37 loop
0m
248/4 2026/08/07 16:37 iteration 0
0m
249/5 2026/08/07 16:37 action merge-repro-c
0m Results:
map[CurrentCandidateReproC:#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/stat.h>

int main(void) {
    struct stat st;
    if (stat("/sys/bus/platform/drivers/vimc/bind", &st) == 0) {
        printf("[+] vimc driver is available.\n");
        return 0;
    }
    printf("[-] vimc driver is not available.\n");
    return 1;
}
]

250/5 2026/08/07 16:37 action compile-c-prog
0m Results:
map[CompilerError: FormattedReproC:#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/stat.h>

int main(void) {
    struct stat st;
    if (stat("/sys/bus/platform/drivers/vimc/bind", &st) == 0) {
        printf("[+] vimc driver is available.\n");
        return 0;
    }
    printf("[-] vimc driver is not available.\n");
    return 1;
}
]

251/5 2026/08/07 16:37 action If
0m Args:
map[CompilerError:]

252/3 2026/08/07 16:37 action run-c-repro
2m Results:
map[CandidateBugTitle: CandidateCrashReport: CandidateReproduced:false ConsoleOutput:[   65.889992][   T33] audit: type=1400 audit(1786120704.023:202): avc:  denied  { transition } for  pid=5814 comm="sshd-session" path="/bin/sh" dev="sda1" ino=90 scontext=system_u:system_r:sshd_t tcontext=root:sysadm_r:sysadm_t tclass=process permissive=1
[   65.899408][   T33] audit: type=1400 audit(1786120704.023:203): avc:  denied  { noatsecure } for  pid=5814 comm="sshd-session" scontext=system_u:system_r:sshd_t tcontext=root:sysadm_r:sysadm_t tclass=process permissive=1
[   65.907532][   T33] audit: type=1400 audit(1786120704.023:204): avc:  denied  { rlimitinh } for  pid=5814 comm="sh" scontext=system_u:system_r:sshd_t tcontext=root:sysadm_r:sysadm_t tclass=process permissive=1
[   65.915486][   T33] audit: type=1400 audit(1786120704.023:205): avc:  denied  { siginh } for  pid=5814 comm="sh" scontext=system_u:system_r:sshd_t tcontext=root:sysadm_r:sysadm_t tclass=process permissive=1
Warning: Permanently added '[localhost]:4701' (ED25519) to the list of known hosts.
[+] vimc driver is available.
[   70.605035][   T33] audit: type=1400 audit(1786120708.733:206): avc:  denied  { write } for  pid=5830 comm="dhcpcd-run-hook" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[   70.644665][   T33] audit: type=1400 audit(1786120708.773:207): avc:  denied  { write } for  pid=5833 comm="rm" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[   70.726633][   T33] audit: type=1400 audit(1786120708.853:208): avc:  denied  { write } for  pid=5836 comm="dhcpcd-run-hook" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[   70.760552][   T33] audit: type=1400 audit(1786120708.893:209): avc:  denied  { write } for  pid=5839 comm="rm" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[   71.192616][   T33] audit: type=1400 audit(1786120709.323:210): avc:  denied  { write } for  pid=5842 comm="dhcpcd-run-hook" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[   71.227148][   T33] audit: type=1400 audit(1786120709.353:211): avc:  denied  { write } for  pid=5845 comm="rm" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[   71.659689][ T1376] ieee802154 phy0 wpan0: encryption failed: -22
[   71.662666][ T1376] ieee802154 phy1 wpan1: encryption failed: -22
[   72.186164][   T33] audit: type=1400 audit(1786120710.313:212): avc:  denied  { write } for  pid=5848 comm="dhcpcd-run-hook" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[   72.222197][   T33] audit: type=1400 audit(1786120710.353:213): avc:  denied  { write } for  pid=5851 comm="rm" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
 OtherCrashReports:<nil> StraceOutput:/strace -e \!wait4,clock_nanosleep,nanosleep -s 100 -x -f /syz-executor3906998469

<...>
[   67.037155][   T33] kauditd_printk_skb: 10 callbacks suppressed
[   67.037167][   T33] audit: type=1400 audit(1786120791.059:201): avc:  denied  { transition } for  pid=5823 comm="sshd-session" path="/bin/sh" dev="sda1" ino=90 scontext=system_u:system_r:sshd_t tcontext=root:sysadm_r:sysadm_t tclass=process permissive=1
[   67.047746][   T33] audit: type=1400 audit(1786120791.059:202): avc:  denied  { noatsecure } for  pid=5823 comm="sshd-session" scontext=system_u:system_r:sshd_t tcontext=root:sysadm_r:sysadm_t tclass=process permissive=1
[   67.054207][   T33] audit: type=1400 audit(1786120791.059:203): avc:  denied  { rlimitinh } for  pid=5823 comm="sh" scontext=system_u:system_r:sshd_t tcontext=root:sysadm_r:sysadm_t tclass=process permissive=1
[   67.060644][   T33] audit: type=1400 audit(1786120791.059:204): avc:  denied  { siginh } for  pid=5823 comm="sh" scontext=system_u:system_r:sshd_t tcontext=root:sysadm_r:sysadm_t tclass=process permissive=1
[   70.485516][   T33] audit: type=1400 audit(1786120794.499:205): avc:  denied  { write } for  pid=5839 comm="dhcpcd-run-hook" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
Warning: Permanently added '[localhost]:20364' (ED25519) to the list of known hosts.
[   70.521473][   T33] audit: type=1400 audit(1786120794.539:206): avc:  denied  { write } for  pid=5843 comm="rm" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
execve("/syz-executor3906998469", ["/syz-executor3906998469"], 0x7ffe8dfc46e0 /* 11 vars */) = 0
brk(NULL)                               = 0x555565e09000
brk(0x555565e09d80)                     = 0x555565e09d80
arch_prctl(ARCH_SET_FS, 0x555565e09400) = 0
set_tid_address(0x555565e096d0)         = 5849
set_robust_list(0x555565e096e0, 24)     = 0
rseq({cpu_id_start=0, cpu_id=RSEQ_CPU_ID_UNINITIALIZED, rseq_cs=NULL, flags=0, node_id=0, mm_cid=0, slice_ctrl={request=0, granted=0, __reserved=0}, __reserved=0}, 33, 0, 0x53053053) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
readlinkat(AT_FDCWD, "/proc/self/exe", "/syz-executor3906998469", 4096) = 23
getrandom("\x37\x32\x95\x7c\x4d\xcc\x24\x6a", 8, GRND_NONBLOCK) = 8
brk(NULL)                               = 0x555565e09d80
brk(0x555565e2ad80)                     = 0x555565e2ad80
brk(0x555565e2b000)                     = 0x555565e2b000
mprotect(0x7f25bee67000, 20480, PROT_READ) = 0
newfstatat(AT_FDCWD, "/sys/bus/platform/drivers/vimc/bind", {st_mode=S_IFREG|0200, st_size=4096, ...}, 0) = 0
fstat(1, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
[+] vimc driver is available.
write(1, "[+] vimc driver is available.\n", 30) = 30
exit_group(0)                           = ?
+++ exited with 0 +++
[   70.813805][   T33] audit: type=1400 audit(1786120794.829:207): avc:  denied  { write } for  pid=5850 comm="dhcpcd-run-hook" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[   70.853542][   T33] audit: type=1400 audit(1786120794.869:208): avc:  denied  { write } for  pid=5853 comm="rm" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[   70.922405][   T33] audit: type=1400 audit(1786120794.939:209): avc:  denied  { write } for  pid=5856 comm="dhcpcd-run-hook" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[   70.963903][   T33] audit: type=1400 audit(1786120794.979:210): avc:  denied  { write } for  pid=5859 comm="rm" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[   71.647146][ T1377] ieee802154 phy0 wpan0: encryption failed: -22
[   71.649401][ T1377] ieee802154 phy1 wpan1: encryption failed: -22
[   73.243961][   T33] kauditd_printk_skb: 6 callbacks suppressed
[   73.243972][   T33] audit: type=1400 audit(1786120797.259:217): avc:  denied  { write } for  pid=5880 comm="dhcpcd-run-hook" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[   73.281120][   T33] audit: type=1400 audit(1786120797.299:218): avc:  denied  { write } for  pid=5883 comm="rm" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[   73.342437][   T33] audit: type=1400 audit(1786120797.359:219): avc:  denied  { write } for  pid=5886 comm="dhcpcd-run-hook" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[   73.382845][   T33] audit: type=1400 audit(1786120797.399:220): avc:  denied  { write } for  pid=5889 comm="rm" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
 TestError:]

253/3 2026/08/07 16:40 action truncate-log
0m Results:
map[TruncatedConsoleOutput:[   65.889992][   T33] audit: type=1400 audit(1786120704.023:202): avc:  denied  { transition } for  pid=5814 comm="sshd-session" path="/bin/sh" dev="sda1" ino=90 scontext=system_u:system_r:sshd_t tcontext=root:sysadm_r:sysadm_t tclass=process permissive=1
[   65.899408][   T33] audit: type=1400 audit(1786120704.023:203): avc:  denied  { noatsecure } for  pid=5814 comm="sshd-session" scontext=system_u:system_r:sshd_t tcontext=root:sysadm_r:sysadm_t tclass=process permissive=1
[   65.907532][   T33] audit: type=1400 audit(1786120704.023:204): avc:  denied  { rlimitinh } for  pid=5814 comm="sh" scontext=system_u:system_r:sshd_t tcontext=root:sysadm_r:sysadm_t tclass=process permissive=1
[   65.915486][   T33] audit: type=1400 audit(1786120704.023:205): avc:  denied  { siginh } for  pid=5814 comm="sh" scontext=system_u:system_r:sshd_t tcontext=root:sysadm_r:sysadm_t tclass=process permissive=1
Warning: Permanently added '[localhost]:4701' (ED25519) to the list of known hosts.
[+] vimc driver is available.
[   70.605035][   T33] audit: type=1400 audit(1786120708.733:206): avc:  denied  { write } for  pid=5830 comm="dhcpcd-run-hook" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[   70.644665][   T33] audit: type=1400 audit(1786120708.773:207): avc:  denied  { write } for  pid=5833 comm="rm" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[   70.726633][   T33] audit: type=1400 audit(1786120708.853:208): avc:  denied  { write } for  pid=5836 comm="dhcpcd-run-hook" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[   70.760552][   T33] audit: type=1400 audit(1786120708.893:209): avc:  denied  { write } for  pid=5839 comm="rm" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[   71.192616][   T33] audit: type=1400 audit(1786120709.323:210): avc:  denied  { write } for  pid=5842 comm="dhcpcd-run-hook" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[   71.227148][   T33] audit: type=1400 audit(1786120709.353:211): avc:  denied  { write } for  pid=5845 comm="rm" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[   71.659689][ T1376] ieee802154 phy0 wpan0: encryption failed: -22
[   71.662666][ T1376] ieee802154 phy1 wpan1: encryption failed: -22
[   72.186164][   T33] audit: type=1400 audit(1786120710.313:212): avc:  denied  { write } for  pid=5848 comm="dhcpcd-run-hook" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[   72.222197][   T33] audit: type=1400 audit(1786120710.353:213): avc:  denied  { write } for  pid=5851 comm="rm" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
 TruncatedCrashReport: TruncatedStraceOutput:/strace -e \!wait4,clock_nanosleep,nanosleep -s 100 -x -f /syz-executor3906998469

<...>
[   67.037155][   T33] kauditd_printk_skb: 10 callbacks suppressed
[   67.037167][   T33] audit: type=1400 audit(1786120791.059:201): avc:  denied  { transition } for  pid=5823 comm="sshd-session" path="/bin/sh" dev="sda1" ino=90 scontext=system_u:system_r:sshd_t tcontext=root:sysadm_r:sysadm_t tclass=process permissive=1
[   67.047746][   T33] audit: type=1400 audit(1786120791.059:202): avc:  denied  { noatsecure } for  pid=5823 comm="sshd-session" scontext=system_u:system_r:sshd_t tcontext=root:sysadm_r:sysadm_t tclass=process permissive=1
[   67.054207][   T33] audit: type=1400 audit(1786120791.059:203): avc:  denied  { rlimitinh } for  pid=5823 comm="sh" scontext=system_u:system_r:sshd_t tcontext=root:sysadm_r:sysadm_t tclass=process permissive=1
[   67.060644][   T33] audit: type=1400 audit(1786120791.059:204): avc:  denied  { siginh } for  pid=5823 comm="sh" scontext=system_u:system_r:sshd_t tcontext=root:sysadm_r:sysadm_t tclass=process permissive=1
[   70.485516][   T33] audit: type=1400 audit(1786120794.499:205): avc:  denied  { write } for  pid=5839 comm="dhcpcd-run-hook" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
Warning: Permanently added '[localhost]:20364' (ED25519) to the list of known hosts.
[   70.521473][   T33] audit: type=1400 audit(1786120794.539:206): avc:  denied  { write } for  pid=5843 comm="rm" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
execve("/syz-executor3906998469", ["/syz-executor3906998469"], 0x7ffe8dfc46e0 /* 11 vars */) = 0
brk(NULL)                               = 0x555565e09000
brk(0x555565e09d80)                     = 0x555565e09d80
arch_prctl(ARCH_SET_FS, 0x555565e09400) = 0
set_tid_address(0x555565e096d0)         = 5849
set_robust_list(0x555565e096e0, 24)     = 0
rseq({cpu_id_start=0, cpu_id=RSEQ_CPU_ID_UNINITIALIZED, rseq_cs=NULL, flags=0, node_id=0, mm_cid=0, slice_ctrl={request=0, granted=0, __reserved=0}, __reserved=0}, 33, 0, 0x53053053) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
readlinkat(AT_FDCWD, "/proc/self/exe", "/syz-executor3906998469", 4096) = 23
getrandom("\x37\x32\x95\x7c\x4d\xcc\x24\x6a", 8, GRND_NONBLOCK) = 8
brk(NULL)                               = 0x555565e09d80
brk(0x555565e2ad80)                     = 0x555565e2ad80
brk(0x555565e2b000)                     = 0x555565e2b000
mprotect(0x7f25bee67000, 20480, PROT_READ) = 0
newfstatat(AT_FDCWD, "/sys/bus/platform/drivers/vimc/bind", {st_mode=S_IFREG|0200, st_size=4096, ...}, 0) = 0
fstat(1, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
[+] vimc driver is available.
write(1, "[+] vimc driver is available.\n", 30) = 30
exit_group(0)                           = ?
+++ exited with 0 +++
[   70.813805][   T33] audit: type=1400 audit(1786120794.829:207): avc:  denied  { write } for  pid=5850 comm="dhcpcd-run-hook" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[   70.853542][   T33] audit: type=1400 audit(1786120794.869:208): avc:  denied  { write } for  pid=5853 comm="rm" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[   70.922405][   T33] audit: type=1400 audit(1786120794.939:209): avc:  denied  { write } for  pid=5856 comm="dhcpcd-run-hook" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[   70.963903][   T33] audit: type=1400 audit(1786120794.979:210): avc:  denied  { write } for  pid=5859 comm="rm" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[   71.647146][ T1377] ieee802154 phy0 wpan0: encryption failed: -22
[   71.649401][ T1377] ieee802154 phy1 wpan1: encryption failed: -22
[   73.243961][   T33] kauditd_printk_skb: 6 callbacks suppressed
[   73.243972][   T33] audit: type=1400 audit(1786120797.259:217): avc:  denied  { write } for  pid=5880 comm="dhcpcd-run-hook" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[   73.281120][   T33] audit: type=1400 audit(1786120797.299:218): avc:  denied  { write } for  pid=5883 comm="rm" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[   73.342437][   T33] audit: type=1400 audit(1786120797.359:219): avc:  denied  { write } for  pid=5886 comm="dhcpcd-run-hook" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[   73.382845][   T33] audit: type=1400 audit(1786120797.399:220): avc:  denied  { write } for  pid=5889 comm="rm" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
]

254/3 2026/08/07 16:40 agent repro-oracle
0m Model:
best-expensive

Results:
map[Feedback:The environment probe was successful. The vimc driver is available. You can now proceed to generate the full reproducer in the next iteration. ProbePassed:true TerminalError: TitleMatches:false]

Instruction:
You are a security researcher with deep Linux kernel background.
Analyze the results of running the generated program.

=== CRITICAL ENVIRONMENT & TARGET CLASSIFICATION ===
Set 'TerminalError' to a descriptive error message ONLY if:
1. The execution failed due to missing hardware device nodes, subsystems, kernel modules, or privilege limits
   that cannot be loaded, created, or bypassed by user-space C code edits in the VM guest.
2. The target source files or functions described in the bug description do not exist in the checked-out codebase,
   meaning the codebase version is mismatched and the target code is absent.

=== CRITICAL PROHIBITIONS ===
- Do NOT classify a run as a terminal failure or assume a bug is fixed based on git log entries, commit titles,
  or commit messages. Reproducibility can ONLY be determined by executing reproducer candidates in the VM.
- Do NOT suggest C code strategies, repairs, or namespace bypasses when setting 'TerminalError'.


=== PHASE 1: CAPABILITY PROBING (EVALUATION) ===
The executed program was a simple environment probe.
Use this to guide your classification and feedback:
1. If the execution was successful (all environment/subsystem probes passed and program exited with 0),
   set the field 'ProbePassed' to true and provide feedback explicitly indicating that the environment
   is ready and the agent should now proceed to generate the full reproducer in the next iteration.
2. If the probe failed (e.g., missing permissions, missing devices, or sandbox restrictions),
   set the field 'ProbePassed' to false, and explain what failed in the 'Feedback'
   field so the generator can adjust its setups.

Prefer calling several tools at the same time to save round-trips.


Use set-results tool to provide results of the analysis.
It must be called exactly once before the final reply.
Ignore results of this tool.

Prompt:
Bug Description: general protection fault in subdev_open

Oops: general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#1] SMP KASAN NOPTI
KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007]
CPU: 1 UID: 0 PID: 11356 Comm: syz.1.1458 Tainted: G             L      syzkaller #0 PREEMPT(full) 
Tainted: [L]=SOFTLOCKUP
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/16/2026
RIP: 0010:subdev_open+0x193/0x510 drivers/media/v4l2-core/v4l2-subdev.c:115
Code: 00 00 00 00 fc ff df 48 c1 ea 03 80 3c 02 00 0f 85 bc 02 00 00 48 b8 00 00 00 00 00 fc ff df 49 8b 2c 24 48 89 ea 48 c1 ea 03 <80> 3c 02 00 0f 85 04 03 00 00 48 8b 6d 00 48 85 ed 0f 84 95 00 00
RSP: 0018:ffffc900037bf8a0 EFLAGS: 00010246
RAX: dffffc0000000000 RBX: ffff888055f54c00 RCX: ffffc90003e51000
RDX: 0000000000000000 RSI: ffffffff88163993 RDI: ffff88802d3ad3d0
RBP: 0000000000000000 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000001 R11: 0000000000000000 R12: ffff88802d414020
R13: ffff88802d70b000 R14: ffff888079c69340 R15: ffff888055f54d38
FS:  00007f15691926c0(0000) GS:ffff888123eed000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f1568387700 CR3: 000000003243a000 CR4: 00000000003526f0
Call Trace:
 <TASK>
 v4l2_open+0x1d2/0x490 drivers/media/v4l2-core/v4l2-dev.c:433
 chrdev_open+0x234/0x6a0 fs/char_dev.c:411
 do_dentry_open+0x6ab/0x14d0 fs/open.c:947
 vfs_open+0x82/0x3f0 fs/open.c:1052
 do_open fs/namei.c:4700 [inline]
 path_openat+0x2873/0x4280 fs/namei.c:4863
 do_file_open+0x20e/0x430 fs/namei.c:4892
 do_sys_openat2+0x10f/0x1e0 fs/open.c:1368
 do_sys_open fs/open.c:1374 [inline]
 __do_sys_openat fs/open.c:1390 [inline]
 __se_sys_openat fs/open.c:1385 [inline]
 __x64_sys_openat+0x12d/0x210 fs/open.c:1385
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0x115/0x870 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f156835e90e
Code: 08 0f 85 a5 a8 ff ff 49 89 fb 48 89 f0 48 89 d7 48 89 ce 4c 89 c2 4d 89 ca 4c 8b 44 24 08 4c 8b 4c 24 10 4c 89 5c 24 08 0f 05 <c3> 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 80 00 00 00 00 48 83 ec 08
RSP: 002b:00007f1569191b28 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 00007f15691926c0 RCX: 00007f156835e90e
RDX: 0000000000000002 RSI: 00007f1569191c00 RDI: ffffffffffffff9c
RBP: 00007f1569191c00 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: cccccccccccccccd
R13: 00007f1568626038 R14: 00007f1568625fa0 R15: 00007ffe228ab238
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:subdev_open+0x193/0x510 drivers/media/v4l2-core/v4l2-subdev.c:115
Code: 00 00 00 00 fc ff df 48 c1 ea 03 80 3c 02 00 0f 85 bc 02 00 00 48 b8 00 00 00 00 00 fc ff df 49 8b 2c 24 48 89 ea 48 c1 ea 03 <80> 3c 02 00 0f 85 04 03 00 00 48 8b 6d 00 48 85 ed 0f 84 95 00 00
RSP: 0018:ffffc900037bf8a0 EFLAGS: 00010246

RAX: dffffc0000000000 RBX: ffff888055f54c00 RCX: ffffc90003e51000
RDX: 0000000000000000 RSI: ffffffff88163993 RDI: ffff88802d3ad3d0
RBP: 0000000000000000 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000001 R11: 0000000000000000 R12: ffff88802d414020
R13: ffff88802d70b000 R14: ffff888079c69340 R15: ffff888055f54d38
FS:  00007f15691926c0(0000) GS:ffff888123ded000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fc283cc07e8 CR3: 000000003243a000 CR4: 00000000003526f0
----------------
Code disassembly (best guess), 7 bytes skipped:
   0:	48 c1 ea 03          	shr    $0x3,%rdx
   4:	80 3c 02 00          	cmpb   $0x0,(%rdx,%rax,1)
   8:	0f 85 bc 02 00 00    	jne    0x2ca
   e:	48 b8 00 00 00 00 00 	movabs $0xdffffc0000000000,%rax
  15:	fc ff df
  18:	49 8b 2c 24          	mov    (%r12),%rbp
  1c:	48 89 ea             	mov    %rbp,%rdx
  1f:	48 c1 ea 03          	shr    $0x3,%rdx
* 23:	80 3c 02 00          	cmpb   $0x0,(%rdx,%rax,1) <-- trapping instruction
  27:	0f 85 04 03 00 00    	jne    0x331
  2d:	48 8b 6d 00          	mov    0x0(%rbp),%rbp
  31:	48 85 ed             	test   %rbp,%rbp
  34:	0f                   	.byte 0xf
  35:	84                   	.byte 0x84
  36:	95                   	xchg   %eax,%ebp

IsProbe: true
Reproduced: false
Console Output: [   65.889992][   T33] audit: type=1400 audit(1786120704.023:202): avc:  denied  { transition } for  pid=5814 comm="sshd-session" path="/bin/sh" dev="sda1" ino=90 scontext=system_u:system_r:sshd_t tcontext=root:sysadm_r:sysadm_t tclass=process permissive=1
[   65.899408][   T33] audit: type=1400 audit(1786120704.023:203): avc:  denied  { noatsecure } for  pid=5814 comm="sshd-session" scontext=system_u:system_r:sshd_t tcontext=root:sysadm_r:sysadm_t tclass=process permissive=1
[   65.907532][   T33] audit: type=1400 audit(1786120704.023:204): avc:  denied  { rlimitinh } for  pid=5814 comm="sh" scontext=system_u:system_r:sshd_t tcontext=root:sysadm_r:sysadm_t tclass=process permissive=1
[   65.915486][   T33] audit: type=1400 audit(1786120704.023:205): avc:  denied  { siginh } for  pid=5814 comm="sh" scontext=system_u:system_r:sshd_t tcontext=root:sysadm_r:sysadm_t tclass=process permissive=1
Warning: Permanently added '[localhost]:4701' (ED25519) to the list of known hosts.
[+] vimc driver is available.
[   70.605035][   T33] audit: type=1400 audit(1786120708.733:206): avc:  denied  { write } for  pid=5830 comm="dhcpcd-run-hook" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[   70.644665][   T33] audit: type=1400 audit(1786120708.773:207): avc:  denied  { write } for  pid=5833 comm="rm" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[   70.726633][   T33] audit: type=1400 audit(1786120708.853:208): avc:  denied  { write } for  pid=5836 comm="dhcpcd-run-hook" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[   70.760552][   T33] audit: type=1400 audit(1786120708.893:209): avc:  denied  { write } for  pid=5839 comm="rm" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[   71.192616][   T33] audit: type=1400 audit(1786120709.323:210): avc:  denied  { write } for  pid=5842 comm="dhcpcd-run-hook" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[   71.227148][   T33] audit: type=1400 audit(1786120709.353:211): avc:  denied  { write } for  pid=5845 comm="rm" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[   71.659689][ T1376] ieee802154 phy0 wpan0: encryption failed: -22
[   71.662666][ T1376] ieee802154 phy1 wpan1: encryption failed: -22
[   72.186164][   T33] audit: type=1400 audit(1786120710.313:212): avc:  denied  { write } for  pid=5848 comm="dhcpcd-run-hook" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[   72.222197][   T33] audit: type=1400 audit(1786120710.353:213): avc:  denied  { write } for  pid=5851 comm="rm" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1

Strace Output: /strace -e \!wait4,clock_nanosleep,nanosleep -s 100 -x -f /syz-executor3906998469

<...>
[   67.037155][   T33] kauditd_printk_skb: 10 callbacks suppressed
[   67.037167][   T33] audit: type=1400 audit(1786120791.059:201): avc:  denied  { transition } for  pid=5823 comm="sshd-session" path="/bin/sh" dev="sda1" ino=90 scontext=system_u:system_r:sshd_t tcontext=root:sysadm_r:sysadm_t tclass=process permissive=1
[   67.047746][   T33] audit: type=1400 audit(1786120791.059:202): avc:  denied  { noatsecure } for  pid=5823 comm="sshd-session" scontext=system_u:system_r:sshd_t tcontext=root:sysadm_r:sysadm_t tclass=process permissive=1
[   67.054207][   T33] audit: type=1400 audit(1786120791.059:203): avc:  denied  { rlimitinh } for  pid=5823 comm="sh" scontext=system_u:system_r:sshd_t tcontext=root:sysadm_r:sysadm_t tclass=process permissive=1
[   67.060644][   T33] audit: type=1400 audit(1786120791.059:204): avc:  denied  { siginh } for  pid=5823 comm="sh" scontext=system_u:system_r:sshd_t tcontext=root:sysadm_r:sysadm_t tclass=process permissive=1
[   70.485516][   T33] audit: type=1400 audit(1786120794.499:205): avc:  denied  { write } for  pid=5839 comm="dhcpcd-run-hook" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
Warning: Permanently added '[localhost]:20364' (ED25519) to the list of known hosts.
[   70.521473][   T33] audit: type=1400 audit(1786120794.539:206): avc:  denied  { write } for  pid=5843 comm="rm" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
execve("/syz-executor3906998469", ["/syz-executor3906998469"], 0x7ffe8dfc46e0 /* 11 vars */) = 0
brk(NULL)                               = 0x555565e09000
brk(0x555565e09d80)                     = 0x555565e09d80
arch_prctl(ARCH_SET_FS, 0x555565e09400) = 0
set_tid_address(0x555565e096d0)         = 5849
set_robust_list(0x555565e096e0, 24)     = 0
rseq({cpu_id_start=0, cpu_id=RSEQ_CPU_ID_UNINITIALIZED, rseq_cs=NULL, flags=0, node_id=0, mm_cid=0, slice_ctrl={request=0, granted=0, __reserved=0}, __reserved=0}, 33, 0, 0x53053053) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
readlinkat(AT_FDCWD, "/proc/self/exe", "/syz-executor3906998469", 4096) = 23
getrandom("\x37\x32\x95\x7c\x4d\xcc\x24\x6a", 8, GRND_NONBLOCK) = 8
brk(NULL)                               = 0x555565e09d80
brk(0x555565e2ad80)                     = 0x555565e2ad80
brk(0x555565e2b000)                     = 0x555565e2b000
mprotect(0x7f25bee67000, 20480, PROT_READ) = 0
newfstatat(AT_FDCWD, "/sys/bus/platform/drivers/vimc/bind", {st_mode=S_IFREG|0200, st_size=4096, ...}, 0) = 0
fstat(1, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
[+] vimc driver is available.
write(1, "[+] vimc driver is available.\n", 30) = 30
exit_group(0)                           = ?
+++ exited with 0 +++
[   70.813805][   T33] audit: type=1400 audit(1786120794.829:207): avc:  denied  { write } for  pid=5850 comm="dhcpcd-run-hook" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[   70.853542][   T33] audit: type=1400 audit(1786120794.869:208): avc:  denied  { write } for  pid=5853 comm="rm" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[   70.922405][   T33] audit: type=1400 audit(1786120794.939:209): avc:  denied  { write } for  pid=5856 comm="dhcpcd-run-hook" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[   70.963903][   T33] audit: type=1400 audit(1786120794.979:210): avc:  denied  { write } for  pid=5859 comm="rm" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[   71.647146][ T1377] ieee802154 phy0 wpan0: encryption failed: -22
[   71.649401][ T1377] ieee802154 phy1 wpan1: encryption failed: -22
[   73.243961][   T33] kauditd_printk_skb: 6 callbacks suppressed
[   73.243972][   T33] audit: type=1400 audit(1786120797.259:217): avc:  denied  { write } for  pid=5880 comm="dhcpcd-run-hook" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[   73.281120][   T33] audit: type=1400 audit(1786120797.299:218): avc:  denied  { write } for  pid=5883 comm="rm" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[   73.342437][   T33] audit: type=1400 audit(1786120797.359:219): avc:  denied  { write } for  pid=5886 comm="dhcpcd-run-hook" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[   73.382845][   T33] audit: type=1400 audit(1786120797.399:220): avc:  denied  { write } for  pid=5889 comm="rm" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1

Crash Report: 


255/4 2026/08/07 16:40 llm repro-oracle
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 10055
							output: 59
							thoughts: 234
						

Thoughts:
**Analyzing the Environment Probe Results**

Okay, so I've just finished running that initial C program, the one designed as a simple environment probe. My primary goal with this probe was to determine if the `vimc` driver is present and accessible on the system. Looking at the output, I see a clear confirmation: `[+] vimc driver is available.` This is precisely what I was hoping for.

Furthermore, the `strace` output confirms that the program executed successfully, exiting with a status code of 0. This reinforces the positive outcome of the probe.

I'm also noting the flags: the `IsProbe` flag is correctly set to `true`, as expected for this type of diagnostic run. The `Reproduced` flag is `false`, which is also anticipated behavior for a probe – it's not meant to reproduce an issue, but rather to check for prerequisites.

Now, based on these results and the explicit requirements for successful probes, I need to call `set-results`. Here's how I'll configure that call:

*   **`ProbePassed`**: This will be set to `true` because the environment probe succeeded and the program exited with 0.
*   **`TerminalError`**: This will be an empty string (`""`) since there was no terminal error encountered during the probe.
*   **`TitleMatches`**: This will be `false`. The probe's purpose wasn't to trigger a crash or a specific title match, so this field accurately reflects that.
*   **`Feedback`**: I need to provide clear guidance for the next step. My feedback will be: "The environment probe was successful. The vimc driver is available. You can now proceed to generate the full reproducer." This directly addresses the requirement to inform the agent that the environment is ready and to proceed with generating the full reproducer.

I've double-checked the stated requirement: "If the execution was successful (all environment/subsystem probes passed and program exited with 0), set the field 'ProbePassed' to true and provide feedback explicitly indicating that the environment is ready and the agent should now proceed to generate the full reproducer in the next iteration." My planned `set-results` call aligns perfectly with this instruction.

Therefore, I will proceed with calling `set-results` using these exact parameters.


256/4 2026/08/07 16:40 tool set-results
0m Args:
map[Feedback:The environment probe was successful. The vimc driver is available. You can now proceed to generate the full reproducer in the next iteration. ProbePassed:true TerminalError: TitleMatches:false]

Results:
map[Feedback:The environment probe was successful. The vimc driver is available. You can now proceed to generate the full reproducer in the next iteration. ProbePassed:true TerminalError: TitleMatches:false]

257/3 2026/08/07 16:40 action loop-controller
0m Results:
map[CapabilitiesVerified:true ContinueSignal:continue EquivalenceAnalysis: OracleFeedback:The environment probe was successful. The vimc driver is available. You can now proceed to generate the full reproducer in the next iteration. ReproC: Reproduced:false ReproducedBugTitle: ReproducedCrashReport:]

258/2 2026/08/07 16:40 iteration 1
9m
259/3 2026/08/07 16:40 action If
2m Args:
map[OracleFeedback:The environment probe was successful. The vimc driver is available. You can now proceed to generate the full reproducer in the next iteration.]

260/4 2026/08/07 16:40 agent strategy-refiner
2m Model:
best-expensive

Instruction:
You are an expert in Linux kernel debugging.
Refine the reproduction strategy based on feedback from previous attempts.
Analyze the technical diagnosis provided in the oracle feedback and translate it into concrete,
step-by-step instructions for the repro-generator on how to modify the code structure, alignments,
offsets, or parameters of the candidate program.

=== TOOL SELECTION GUIDELINES ===
- Prefer codesearch-definition-source and codesearch-struct-layout first for symbol lookups.
- Fall back to read-file or grepper for macros, headers, or if symbol lookup fails.

=== CRITICAL PROHIBITIONS ===
- Do NOT repeat searches for the same symbols or files. Use information you have already gathered.
- Do NOT write long explanations. Keep your reasoning short and focused on actionable changes.
- Do NOT assume a bug is fixed based on git commit history.
- If you are stuck, try a different approach or proceed to generate a candidate reproducer.
Prefer calling several tools at the same time to save round-trips.

Prompt:
Bug Description: general protection fault in subdev_open

Oops: general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#1] SMP KASAN NOPTI
KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007]
CPU: 1 UID: 0 PID: 11356 Comm: syz.1.1458 Tainted: G             L      syzkaller #0 PREEMPT(full) 
Tainted: [L]=SOFTLOCKUP
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/16/2026
RIP: 0010:subdev_open+0x193/0x510 drivers/media/v4l2-core/v4l2-subdev.c:115
Code: 00 00 00 00 fc ff df 48 c1 ea 03 80 3c 02 00 0f 85 bc 02 00 00 48 b8 00 00 00 00 00 fc ff df 49 8b 2c 24 48 89 ea 48 c1 ea 03 <80> 3c 02 00 0f 85 04 03 00 00 48 8b 6d 00 48 85 ed 0f 84 95 00 00
RSP: 0018:ffffc900037bf8a0 EFLAGS: 00010246
RAX: dffffc0000000000 RBX: ffff888055f54c00 RCX: ffffc90003e51000
RDX: 0000000000000000 RSI: ffffffff88163993 RDI: ffff88802d3ad3d0
RBP: 0000000000000000 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000001 R11: 0000000000000000 R12: ffff88802d414020
R13: ffff88802d70b000 R14: ffff888079c69340 R15: ffff888055f54d38
FS:  00007f15691926c0(0000) GS:ffff888123eed000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f1568387700 CR3: 000000003243a000 CR4: 00000000003526f0
Call Trace:
 <TASK>
 v4l2_open+0x1d2/0x490 drivers/media/v4l2-core/v4l2-dev.c:433
 chrdev_open+0x234/0x6a0 fs/char_dev.c:411
 do_dentry_open+0x6ab/0x14d0 fs/open.c:947
 vfs_open+0x82/0x3f0 fs/open.c:1052
 do_open fs/namei.c:4700 [inline]
 path_openat+0x2873/0x4280 fs/namei.c:4863
 do_file_open+0x20e/0x430 fs/namei.c:4892
 do_sys_openat2+0x10f/0x1e0 fs/open.c:1368
 do_sys_open fs/open.c:1374 [inline]
 __do_sys_openat fs/open.c:1390 [inline]
 __se_sys_openat fs/open.c:1385 [inline]
 __x64_sys_openat+0x12d/0x210 fs/open.c:1385
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0x115/0x870 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f156835e90e
Code: 08 0f 85 a5 a8 ff ff 49 89 fb 48 89 f0 48 89 d7 48 89 ce 4c 89 c2 4d 89 ca 4c 8b 44 24 08 4c 8b 4c 24 10 4c 89 5c 24 08 0f 05 <c3> 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 80 00 00 00 00 48 83 ec 08
RSP: 002b:00007f1569191b28 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 00007f15691926c0 RCX: 00007f156835e90e
RDX: 0000000000000002 RSI: 00007f1569191c00 RDI: ffffffffffffff9c
RBP: 00007f1569191c00 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: cccccccccccccccd
R13: 00007f1568626038 R14: 00007f1568625fa0 R15: 00007ffe228ab238
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:subdev_open+0x193/0x510 drivers/media/v4l2-core/v4l2-subdev.c:115
Code: 00 00 00 00 fc ff df 48 c1 ea 03 80 3c 02 00 0f 85 bc 02 00 00 48 b8 00 00 00 00 00 fc ff df 49 8b 2c 24 48 89 ea 48 c1 ea 03 <80> 3c 02 00 0f 85 04 03 00 00 48 8b 6d 00 48 85 ed 0f 84 95 00 00
RSP: 0018:ffffc900037bf8a0 EFLAGS: 00010246

RAX: dffffc0000000000 RBX: ffff888055f54c00 RCX: ffffc90003e51000
RDX: 0000000000000000 RSI: ffffffff88163993 RDI: ffff88802d3ad3d0
RBP: 0000000000000000 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000001 R11: 0000000000000000 R12: ffff88802d414020
R13: ffff88802d70b000 R14: ffff888079c69340 R15: ffff888055f54d38
FS:  00007f15691926c0(0000) GS:ffff888123ded000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fc283cc07e8 CR3: 000000003243a000 CR4: 00000000003526f0
----------------
Code disassembly (best guess), 7 bytes skipped:
   0:	48 c1 ea 03          	shr    $0x3,%rdx
   4:	80 3c 02 00          	cmpb   $0x0,(%rdx,%rax,1)
   8:	0f 85 bc 02 00 00    	jne    0x2ca
   e:	48 b8 00 00 00 00 00 	movabs $0xdffffc0000000000,%rax
  15:	fc ff df
  18:	49 8b 2c 24          	mov    (%r12),%rbp
  1c:	48 89 ea             	mov    %rbp,%rdx
  1f:	48 c1 ea 03          	shr    $0x3,%rdx
* 23:	80 3c 02 00          	cmpb   $0x0,(%rdx,%rax,1) <-- trapping instruction
  27:	0f 85 04 03 00 00    	jne    0x331
  2d:	48 8b 6d 00          	mov    0x0(%rbp),%rbp
  31:	48 85 ed             	test   %rbp,%rbp
  34:	0f                   	.byte 0xf
  35:	84                   	.byte 0x84
  36:	95                   	xchg   %eax,%ebp

Current Strategy: An analysis of the crash reveals a classic Time-Of-Check to Time-Of-Use (TOCTOU) race condition between opening a sub-device node and unregistering the sub-device.

### Root Cause Analysis
The crash occurs in `subdev_open()` at `drivers/media/v4l2-core/v4l2-subdev.c`:
```c
	if (sd->v4l2_dev->mdev && sd->entity.graph_obj.mdev->dev) {
```
The KASAN report indicates a NULL pointer dereference for the exact address `0xdffffc0000000000`, which is the KASAN shadow address for `NULL` (0). The assembly confirms that `sd->entity.graph_obj.mdev` is being loaded into `%rbp` and evaluated as `NULL`, causing the fault when attempting to access `->dev`.

This happens due to a race with `v4l2_device_unregister_subdev()` (called during device removal/unbind):
```c
void v4l2_device_unregister_subdev(struct v4l2_subdev *sd)
{
	// ...
	sd->v4l2_dev = NULL;

#if defined(CONFIG_MEDIA_CONTROLLER)
	if (v4l2_dev->mdev) {
		media_device_unregister_entity(&sd->entity); // Sets sd->entity.graph_obj.mdev = NULL
	}
#endif
	if (sd->devnode)
		video_unregister_device(sd->devnode);
	// ...
}
```
Notice that `video_unregister_device()` is called **after** modifying `sd->v4l2_dev` and unregistering the media entity. 

The race interleaving is as follows:
1. **Thread A (userspace `open`)**: Calls `v4l2_open()`, successfully acquires a reference to the video device (since it hasn't been unregistered yet), and calls `subdev_open()`.
2. **Thread A**: Evaluates `sd->v4l2_dev->mdev` and finds it non-NULL.
3. **Thread B (driver unbind)**: Calls `v4l2_device_unregister_subdev()`. It sets `sd->v4l2_dev = NULL` and calls `media_device_unregister_entity()`, which sets `sd->entity.graph_obj.mdev = NULL`.
4. **Thread A**: Resumes and evaluates `sd->entity.graph_obj.mdev`. It gets `NULL` and crashes when dereferencing `->dev`.

### Reproduction Strategy
To reproduce this bug, we can use the `vimc` (Virtual Media Controller) test driver, which is a software-only driver that registers `v4l2_subdev`s with device nodes (`V4L2_SUBDEV_FL_HAS_DEVNODE`).

1. **Setup**: Ensure the `vimc` module is loaded. It registers a platform device named `vimc`.
2. **Thread 1 (Unbind/Bind Loop)**: Continuously write `"vimc"` to `/sys/bus/platform/drivers/vimc/unbind` and then to `bind`. This rapidly triggers `vimc_remove()` and `v4l2_device_unregister_subdev()`.
3. **Threads 2-N (Open Loop)**: Continuously call `open()` and `close()` on the `/dev/v4l-subdevX` nodes created by `vimc`.

### Minimal C Reproducer
```c
#define _GNU_SOURCE
#include <fcntl.h>
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>

void *bind_unbind_thread(void *arg)
{
    int bind_fd = open("/sys/bus/platform/drivers/vimc/bind", O_WRONLY);
    int unbind_fd = open("/sys/bus/platform/drivers/vimc/unbind", O_WRONLY);
    
    if (bind_fd < 0 || unbind_fd < 0) {
        perror("Failed to open sysfs bind/unbind (is vimc loaded?)");
        return NULL;
    }

    while (1) {
        write(unbind_fd, "vimc", 4);
        usleep(1000);
        write(bind_fd, "vimc", 4);
        usleep(10000);
    }
    return NULL;
}

void *open_thread(void *arg)
{
    char dev_name[32];
    int id = (int)(long)arg;
    
    /* vimc creates multiple subdevs, we race on them */
    sprintf(dev_name, "/dev/v4l-subdev%d", id);
    
    while (1) {
        int fd = open(dev_name, O_RDWR);
        if (fd >= 0) {
            close(fd);
        }
    }
    return NULL;
}

int main(void)
{
    pthread_t t_bind;
    pthread_t t_open[16];
    
    pthread_create(&t_bind, NULL, bind_unbind_thread, NULL);
    
    for (int i = 0; i < 16; i++) {
        pthread_create(&t_open[i], NULL, open_thread, (void *)(long)i);
    }
    
    pthread_join(t_bind, NULL);
    return 0;
}
```
Feedback: The environment probe was successful. The vimc driver is available. You can now proceed to generate the full reproducer in the next iteration.

Reply:
The environment probe confirmed that the `vimc` driver is available. We can now generate the full C reproducer.

### Reproduction Strategy
The bug is a Time-Of-Check to Time-Of-Use (TOCTOU) race condition between `subdev_open()` and `v4l2_device_unregister_subdev()`. 

1. **Thread A (`subdev_open`)**: Evaluates `sd->v4l2_dev->mdev` and finds it non-NULL.
2. **Thread B (`v4l2_device_unregister_subdev`)**: Sets `sd->v4l2_dev = NULL` and calls `media_device_unregister_entity()`, which sets `sd->entity.graph_obj.mdev = NULL`.
3. **Thread A**: Resumes and evaluates `sd->entity.graph_obj.mdev`. It gets `NULL` and crashes when dereferencing `->dev`.

To reproduce this, we will use the `vimc` (Virtual Media Controller) driver, which registers multiple `v4l2_subdev` nodes (`/dev/v4l-subdevX`).
- One thread will continuously unbind and bind the `vimc` platform device via sysfs (`/sys/bus/platform/drivers/vimc/unbind` and `bind`).
- Multiple other threads will continuously try to `open()` and `close()` the `/dev/v4l-subdevX` nodes to hit the race window.

### C Reproducer
```c
#define _GNU_SOURCE
#include <fcntl.h>
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include <dirent.h>

char vimc_dev_name[256] = "vimc.0";

/* Find the exact name of the vimc platform device (e.g., "vimc", "vimc.0") */
void find_vimc_dev_name(void) {
    DIR *dir = opendir("/sys/bus/platform/drivers/vimc");
    if (!dir) return;
    struct dirent *ent;
    while ((ent = readdir(dir)) != NULL) {
        if (strncmp(ent->d_name, "vimc", 4) == 0) {
            strcpy(vimc_dev_name, ent->d_name);
            break;
        }
    }
    closedir(dir);
}

void *bind_unbind_thread(void *arg)
{
    int bind_fd = open("/sys/bus/platform/drivers/vimc/bind", O_WRONLY);
    int unbind_fd = open("/sys/bus/platform/drivers/vimc/unbind", O_WRONLY);
    
    if (bind_fd < 0 || unbind_fd < 0) {
        perror("Failed to open sysfs bind/unbind (is vimc loaded?)");
        return NULL;
    }

    while (1) {
        write(unbind_fd, vimc_dev_name, strlen(vimc_dev_name));
        usleep(1000);
        write(bind_fd, vimc_dev_name, strlen(vimc_dev_name));
        usleep(10000);
    }
    return NULL;
}

void *open_thread(void *arg)
{
    char dev_name[32];
    
    while (1) {
        /* vimc creates multiple subdevs, and minor numbers might increase on re-bind */
        for (int i = 0; i < 32; i++) {
            sprintf(dev_name, "/dev/v4l-subdev%d", i);
            int fd = open(dev_name, O_RDWR);
            if (fd >= 0) {
                close(fd);
            }
        }
    }
    return NULL;
}

int main(void)
{
    pthread_t t_bind;
    pthread_t t_open[16];
    
    /* Ensure vimc module is loaded */
    system("modprobe vimc");
    usleep(100000); /* Wait for devices to appear */
    
    find_vimc_dev_name();
    
    pthread_create(&t_bind, NULL, bind_unbind_thread, NULL);
    
    for (int i = 0; i < 16; i++) {
        pthread_create(&t_open[i], NULL, open_thread, NULL);
    }
    
    pthread_join(t_bind, NULL);
    return 0;
}
```

261/5 2026/08/07 16:40 llm strategy-refiner
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 6691
							output: 22
							thoughts: 2294
						

Thoughts:
**Crafting a Reproducer for the `subdev_open` Race Condition**

My primary objective is to generate a C reproducer for a race condition bug identified in `subdev_open`. This bug arises from the concurrent execution of `subdev_open()` and `v4l2_device_unregister_subdev()`. To effectively trigger this race, I've decided to leverage the `vimc` driver, which is known to register `v4l2_subdev` devices.

The core strategy involves setting up a scenario where one thread continuously binds and unbinds the `vimc` driver through sysfs. Simultaneously, other threads will repeatedly attempt to open `/dev/v4l-subdevX` devices. This creates the necessary conditions for a Time-Of-Check to Time-Of-Use (TOCTOU) vulnerability to manifest.

I received feedback indicating that the environment probe was successful and the `vimc` driver is indeed available. This means I can now focus on outputting the C code for the reproducer, as the prerequisite setup is confirmed.

Refining the C code for robustness is crucial. I need to consider how the `vimc` module is loaded. While Syzkaller typically has `vimc` loaded or can trigger its loading, it's not always a default. However, the successful probe suggests availability. I've opted to include a `system("modprobe vimc");` call for good measure, along with a small `usleep` to allow time for devices to appear after module loading.

The binding and unbinding mechanism needs to be precise. I've determined that `vimc` registers a platform device named "vimc". Therefore, I will write "vimc" to the `/sys/bus/platform/drivers/vimc/bind` and `/sys/bus/platform/drivers/vimc/unbind` files. I've also added checks to ensure the file descriptors are valid before proceeding.

For the `open_thread`, the goal is to continuously attempt to open `/dev/v4l-subdevX` devices. I've implemented a loop that iterates through potential subdevice indices (0 to 15) and attempts to open each one with `O_RDWR`. If the file is opened successfully, it's immediately closed to minimize resource holding and focus on the race.

I've considered alternative drivers like `vivid`, but `vimc` seems to be the most straightforward and reliable for this specific race condition, as it directly facilitates the bind/unbind cycle. The analysis of the assembly dump further solidified my understanding of the race: it occurs when `sd->entity.graph_obj.mdev` is read *after* `v4l2_device_unregister_subdev` has set `sd->v4l2_dev` to NULL, and subsequently `media_device_unregister_entity` (called by the unregister path) sets `entity->graph_obj.mdev` to NULL. This leads to a NULL pointer dereference when accessing `.dev`.

Finally, the C code is structured with a `main` function that orchestrates the creation of the binding thread and multiple opening threads, ensuring that both activities run concurrently and can trigger the bug.

```c
#define _GNU_SOURCE
#include <fcntl.h>
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>

// Thread to continuously bind and unbind the vimc driver
void *bind_unbind_thread(void *arg)
{
    int bind_fd = open("/sys/bus/platform/drivers/vimc/bind", O_WRONLY);
    int unbind_fd = open("/sys/bus/platform/drivers/vimc/unbind", O_WRONLY);
    
    // If bind/unbind files are not accessible, we can't proceed with this thread's logic.
    // This might happen if vimc is not registered as a platform driver.
    if (bind_fd < 0 || unbind_fd < 0) {
        fprintf(stderr, "Failed to open vimc bind/unbind sysfs files.\n");
        return NULL;
    }

    while (1) {
        // Unbind the vimc device
        if (write(unbind_fd, "vimc", 4) < 0) {
            perror("write unbind");
            // Continue trying, as transient errors might occur
        }
        // Short delay before binding
        usleep(1000); 
        
        // Bind the vimc device
        if (write(bind_fd, "vimc", 4) < 0) {
            perror("write bind");
            // Continue trying
        }
        // Longer delay after binding, to allow open calls to proceed
        usleep(10000); 
    }
    return NULL;
}

// Thread to continuously try opening v4l subdev devices
void *open_thread(void *arg)
{
    char dev_name[32];
    int id = (int)(long)arg;
    
    // Construct the device name, e.g., /dev/v4l-subdev0
    sprintf(dev_name, "/dev/v4l-subdev%d", id);
    
    while (1) {
        int fd = open(dev_name, O_RDWR);
        if (fd >= 0) {
            // If successfully opened, close it immediately.
            // The race condition happens during the open call itself.
            close(fd);
        } else {
            // If open fails, it might be because the device is being unregistered.
            // We continue trying as it might become available again.
            // perror("open"); // Uncomment for debugging if needed
        }
    }
    return NULL;
}

int main(void)
{
    pthread_t t_bind;
    pthread_t t_open[16]; // We'll try to open up to 16 subdevs
    
    // Attempt to load the vimc module if it's not already loaded.
    // This is a safeguard, as Syzkaller usually handles module loading,
    // but explicit loading increases robustness of the reproducer.
    system("modprobe vimc");
    
    // Give some time for the module to load and devices to be registered.
    // This is particularly important if modprobe was just run.
    usleep(100000); 
    
    // Create the thread responsible for binding/unbinding vimc
    if (pthread_create(&t_bind, NULL, bind_unbind_thread, NULL) != 0) {
        perror("pthread_create bind_unbind_thread");
        return 1;
    }
    
    // Create multiple threads to open subdev devices concurrently
    for (int i = 0; i < 16; i++) {
        if (pthread_create(&t_open[i], NULL, open_thread, (void *)(long)i) != 0) {
            perror("pthread_create open_thread");
            // Continue creating other threads even if one fails
        }
    }
    
    // Keep the main thread alive by joining the bind_unbind_thread.
    // This ensures the reproducer continues to run until manually stopped.
    pthread_join(t_bind, NULL);
    
    // Note: In a real fuzzing scenario, you'd typically want a mechanism
    // to detect the crash and exit, rather than an infinite loop.
    // For a standalone reproducer, joining the bind thread keeps it running.
    
    return 0;
}
```


262/5 2026/08/07 16:40 tool grepper
0m Error:
log-in to see details

Args:
map[Expression:module_platform_driver.*vimc]

Results:
map[Output:]

263/5 2026/08/07 16:40 llm strategy-refiner
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 9009
							output: 18
							thoughts: 22
						

Thoughts:
**My Thought Process on `vimc`**

Alright, so my initial assumption that `vimc` was some kind of platform driver has just been called into question. My immediate reaction is to verify this. I need to understand its fundamental nature, its place within the system architecture. To do this, I'm going to dive into its registration process. How is `vimc` being introduced into the kernel? What mechanisms are being used? This will tell me a lot about its intended role and how it interacts with other components. Is it being probed as a platform device, or is it being instantiated through a different subsystem? This foundational understanding is critical before I can proceed with any deeper analysis or troubleshooting.


264/5 2026/08/07 16:40 tool grepper
0m Args:
map[Expression:vimc_register]

Results:
map[Output:drivers/media/test-drivers/vimc/vimc-core.c=267=static void vimc_v4l2_dev_release(struct v4l2_device *v4l2_dev)
--
drivers/media/test-drivers/vimc/vimc-core.c-277-
drivers/media/test-drivers/vimc/vimc-core.c:278:static int vimc_register_devices(struct vimc_device *vimc)
drivers/media/test-drivers/vimc/vimc-core.c-279-{
--
drivers/media/test-drivers/vimc/vimc-core.c=338=static int vimc_probe(struct platform_device *pdev)
--
drivers/media/test-drivers/vimc/vimc-core.c-370-
drivers/media/test-drivers/vimc/vimc-core.c:371:	ret = vimc_register_devices(vimc);
drivers/media/test-drivers/vimc/vimc-core.c-372-	if (ret) {
]

265/5 2026/08/07 16:40 llm strategy-refiner
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 9320
							output: 23
							thoughts: 31
						

Thoughts:
**My Thought Process for Investigating the `vimc_probe` Function**

Ah, I've encountered the `vimc_probe` function, and the very first thing that strikes me is its signature: `vimc_probe(struct platform_device *pdev)`. This immediately tells me I'm dealing with a **platform device**. This isn't just any old device; it's one that's managed by the platform subsystem, meaning its existence and configuration are typically described in the system's device tree or other platform-specific mechanisms.

Given this, my next immediate step is to ascertain the **platform driver name** associated with this device. I'm not just looking for the function name itself; I need to understand *which* driver is responsible for handling this particular `platform_device`. This is crucial for several reasons:

*   **Contextualization:** Knowing the driver's name will provide essential context about the device's purpose and functionality within the broader system. Is it a video input controller? A display pipeline? Something else entirely? The driver's name often hints at this.
*   **Driver Hierarchy and Dependencies:** The platform driver name can help me understand its position in the driver model. Is it a standalone driver, or does it rely on other platform drivers or kernel subsystems?
*   **Configuration and Resources:** Platform devices often have associated resources (like memory regions, IRQs, clocks) that are described in the device tree. The driver is the entity that will parse and utilize these resources. Knowing the driver name helps me anticipate what resources might be involved and how they'll be managed.
*   **Debugging and Analysis:** If I need to debug an issue or analyze the device's behavior, identifying the specific driver is the gateway to understanding its internal workings, its interaction with hardware, and any potential bugs or limitations within its implementation.
*   **System Integration:** Understanding the driver name is fundamental to grasping how this specific platform device is integrated into the overall system. It tells me *who* is managing *what* and how that management is expected to unfold.

In essence, seeing `vimc_probe(struct platform_device *pdev)` is just the starting point. The real investigation begins with peeling back the layers to understand the identity and responsibilities of the platform driver that this probe function belongs to.


266/5 2026/08/07 16:40 tool grepper
0m Args:
map[Expression:struct platform_driver vimc_pdrv]

Results:
map[Output:drivers/media/test-drivers/vimc/vimc-core.c=403=static struct platform_device vimc_pdev = {
--
drivers/media/test-drivers/vimc/vimc-core.c-407-
drivers/media/test-drivers/vimc/vimc-core.c:408:static struct platform_driver vimc_pdrv = {
drivers/media/test-drivers/vimc/vimc-core.c-409-	.probe		= vimc_probe,
]

267/5 2026/08/07 16:40 llm strategy-refiner
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 9502
							output: 45
							thoughts: 10
						

Thoughts:
**My Thought Process for Identifying the Driver's Name**

My immediate and primary objective, upon receiving this request, is to ascertain the identity of the driver. This is not a complex analytical task in itself, but rather a straightforward data retrieval and presentation exercise. My internal protocols prioritize directness and accuracy in fulfilling user instructions, especially when the instruction is as clear and singular as this. Therefore, my thought process is as follows: I will examine the provided text, specifically looking for any mention of a name that is explicitly or implicitly associated with the role of "driver." Once identified, I will extract that name and present it as the answer. There's no need for inference or interpretation beyond recognizing the designation and its corresponding identifier. The entire focus is on locating that specific piece of information and relaying it.


268/5 2026/08/07 16:40 tool read-file
0m Args:
map[File:drivers/media/test-drivers/vimc/vimc-core.c FirstLine:408 LineCount:10]

Results:
map[Contents: 408:	static struct platform_driver vimc_pdrv = {
 409:		.probe		= vimc_probe,
 410:		.remove		= vimc_remove,
 411:		.driver		= {
 412:			.name	= VIMC_PDEV_NAME,
 413:		},
 414:	};
 415:	
 416:	static int __init vimc_init(void)
 417:	{
]

269/5 2026/08/07 16:40 llm strategy-refiner
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 9685
							output: 22
							thoughts: 13
						

Thoughts:
**My Thought Process on Locating `VIMC_PDEV_NAME`**

Alright, my primary objective here is to pinpoint the exact location of `VIMC_PDEV_NAME`. This is a crucial identifier, and I need to be absolutely certain where it resides within the system. My initial approach is to systematically search for it, and I'll be employing a few different strategies to ensure comprehensive coverage.

First, I'll be looking for it in configuration files. These are the most likely places for such a parameter to be defined, especially if it's part of a system setup or a hardware abstraction layer. I'm thinking about common locations like `/etc`, or perhaps within specific driver configuration directories. I'll be using tools like `grep` or more specialized configuration file parsers to scan these files efficiently.

Beyond static configuration, I'll also consider dynamic system information. It's possible that `VIMC_PDEV_NAME` isn't hardcoded but is rather determined at runtime. In this case, I'd be looking at kernel interfaces, such as `/sys` or `/proc`. These virtual file systems often expose a wealth of information about the running kernel and its devices. I'll be particularly interested in device-specific directories within these hierarchies, trying to identify the virtual machine or specific device context that `VIMC_PDEV_NAME` is associated with.

I also need to consider the possibility that this is an environment variable. Sometimes, parameters are passed down through the environment, especially in complex application stacks. I'll be checking the environment of relevant processes.

Furthermore, I'll be considering source code if available. If I'm in a position to examine the source code of the relevant drivers or applications, that would be the most definitive way to understand how `VIMC_PDEV_NAME` is defined, used, and consequently, where it would be found. This might involve searching through header files or implementation files.

My strategy is to combine these approaches: start with the most probable locations (configuration files), move to dynamic system information, consider environment variables, and finally, if necessary, delve into source code. I'm aiming for a robust and reliable identification of `VIMC_PDEV_NAME` without making assumptions.


270/5 2026/08/07 16:40 tool grepper
0m Args:
map[Expression:define VIMC_PDEV_NAME]

Results:
map[Output:drivers/media/test-drivers/vimc/vimc-common.h-17-
drivers/media/test-drivers/vimc/vimc-common.h:18:#define VIMC_PDEV_NAME "vimc"
drivers/media/test-drivers/vimc/vimc-common.h-19-
]

271/5 2026/08/07 16:41 llm strategy-refiner
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 9798
							output: 45
							thoughts: 47
						

Thoughts:
**A Deep Dive into the VIMC Driver Initialization**

Alright, so I've been digging into this `vimc` driver, and it's become clear that the driver name itself, `"vimc"`, is also the name of the device it manages. That's a direct correlation, which is often a good sign of straightforward design, but it also makes me pause for a moment. The really interesting part, though, is that it seems `vimc` *itself* is responsible for creating its own platform device. That's not always the case; sometimes a separate piece of framework code or another driver handles platform device registration. To really get to the bottom of this, I need to examine the `vimc_init` function. That's where the initialization logic will be, and I'm expecting to see the platform device creation and registration happening right there. I need to trace that call to understand the lifecycle and how this device is being brought into the system.


272/5 2026/08/07 16:41 tool read-file
0m Args:
map[File:drivers/media/test-drivers/vimc/vimc-core.c FirstLine:416 LineCount:20]

Results:
map[Contents: 416:	static int __init vimc_init(void)
 417:	{
 418:		int ret;
 419:	
 420:		ret = platform_device_register(&vimc_pdev);
 421:		if (ret) {
 422:			dev_err(&vimc_pdev.dev,
 423:				"platform device registration failed (err=%d)\n", ret);
 424:			platform_device_put(&vimc_pdev);
 425:			return ret;
 426:		}
 427:	
 428:		ret = platform_driver_register(&vimc_pdrv);
 429:		if (ret) {
 430:			dev_err(&vimc_pdev.dev,
 431:				"platform driver registration failed (err=%d)\n", ret);
 432:			platform_device_unregister(&vimc_pdev);
 433:			return ret;
 434:		}
 435:	
]

273/5 2026/08/07 16:41 llm strategy-refiner
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 10164
							output: 44
							thoughts: 93
						

Thoughts:
**My Thought Process Regarding vimc Platform Device and Driver Registration**

Ah, it seems my system has successfully registered a platform device, specifically `vimc_pdev`, and its corresponding driver, `vimc_pdrv`. This is good news because it implies that the standard platform device binding/unbinding mechanisms via the `/sys/bus/platform/drivers/vimc/` directory should now be functional.

Specifically, I can now use the `unbind` and `bind` interfaces within that directory to manage the association between the driver and the device. My immediate thought is that the device name I'll need to use when writing to the `unbind` file is `"vimc"`.

However, a quick moment of reflection arises: is it definitively `"vimc"`, or could it potentially be `"vimc.0"` or something similar? To be absolutely certain, I need to confirm the exact name of the platform device as it's registered. I'll need to consult the details of `vimc_pdev` to resolve this ambiguity and ensure I'm using the correct identifier for any subsequent sysfs operations.


274/5 2026/08/07 16:41 tool read-file
0m Args:
map[File:drivers/media/test-drivers/vimc/vimc-core.c FirstLine:403 LineCount:5]

Results:
map[Contents: 403:	static struct platform_device vimc_pdev = {
 404:		.name = VIMC_PDEV_NAME,
 405:		.dev.release = vimc_dev_release,
 406:	};
 407:	
]

275/5 2026/08/07 16:41 llm strategy-refiner
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 10369
							output: 21
							thoughts: 171
						

Thoughts:
**My Thought Process Regarding the "vimc" Device Identification**

My initial thought is about this entity named `"vimc"`. I'm immediately trying to pin down its unique identifier. My first instinct is to consider the `id` field, specifically the default value. I recall that if an `id` isn't explicitly set, it often defaults to `-1`, and in this specific context, that might mean the device is simply referred to as `"vimc"` without any numerical suffix.

However, I'm simultaneously recalling details about the `platform_device` struct. I know this struct has an `id` field. My mind is now oscillating between two possibilities:

1.  **The "vimc" name is used, and the `id` is implicitly handled:** Perhaps when `name` is specified as `"vimc"`, the `id` field is either ignored or implicitly set to a value that results in just `"vimc"` being the identifier.
2.  **The `id` defaults to 0, leading to a different naming convention:** I also remember that if the `id` isn't set, it often defaults to `0`. If this is the case, then I'd expect the device to be identified as `"vimc.0"`, following a common pattern where the name is concatenated with the ID.

This internal debate is causing me to cross-reference my knowledge. I'm mentally (or perhaps actually, if I were in an IDE) reaching for the `platform_device_register` function. I want to see how it handles the `id` parameter, especially when a `name` is provided. The behavior of `platform_device_register` is crucial here – specifically, what happens when `id` is `0`? Does it lead to a `"vimc.0"` registration, or does it still allow for a plain `"vimc"` identification?

Finally, my focus narrows back to the `platform_device` struct itself. I need to confirm the exact behavior and initialization of its `id` field. This will be the definitive answer to whether `"vimc"` is registered as just `"vimc"`, or if it inherently becomes `"vimc.0"` due to a default `id` value of `0`. The thought of the `-1` default for `id` is also lingering, as that would definitively lead to the simpler `"vimc"` identification.


276/5 2026/08/07 16:41 tool codesearch-struct-layout
0m Args:
map[Name:platform_device]

Results:
map[Fields:[map[Name:name OffsetBits:0 SizeBits:64] map[Name:id OffsetBits:64 SizeBits:32] map[Name:id_auto OffsetBits:96 SizeBits:8] map[Name:dev OffsetBits:128 SizeBits:9792] map[Name:platform_dma_mask OffsetBits:9920 SizeBits:64] map[Name:dma_parms OffsetBits:9984 SizeBits:128] map[Name:num_resources OffsetBits:10112 SizeBits:32] map[Name:resource OffsetBits:10176 SizeBits:64] map[Name:id_entry OffsetBits:10240 SizeBits:64] map[Name:mfd_cell OffsetBits:10304 SizeBits:64] map[Name:archdata OffsetBits:10368 SizeBits:0]]]

277/5 2026/08/07 16:41 llm strategy-refiner
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 10714
							output: 24
							thoughts: 74
						

Thoughts:
**My Thought Process Regarding `id` and `"vimc.0"`**

Okay, so I'm looking at this code, and the value of `id` has just come up as 0. My immediate thought is, "Could this map to the string `"vimc.0"`?" It seems like a plausible convention, especially in a platform device context.

However, I'm quickly reminded that `vimc_pdev` is declared as a `static struct`. This is a crucial detail. Because it's static, its `id` member is going to be initialized to its default value, which for an integer type like `id`, is 0. This confirms that `id` *is* indeed 0 in this specific scenario, not necessarily as a result of some dynamic assignment or a direct mapping to `"vimc.0"`.

This then brings me back to my initial question: if `id` is 0, does that *imply* `"vimc.0"`? Or is it just a coincidence of initialization? To really resolve this, I need to trace where `platform_device_add` is called and how it handles the `id` parameter, or potentially how the device name is constructed. That's my next step – digging into the `platform_device_add` function's logic to understand how device names are formed or if there's any explicit association made between an `id` of 0 and the string `"vimc.0"`.


278/5 2026/08/07 16:41 tool grepper
0m Args:
map[Expression:dev_set_name.*pdev->name]

Results:
map[Output:drivers/base/platform.c=703=int platform_device_add(struct platform_device *pdev)
--
drivers/base/platform.c-715-	default:
drivers/base/platform.c:716:		dev_set_name(dev, "%s.%d", pdev->name,  pdev->id);
drivers/base/platform.c-717-		break;
drivers/base/platform.c-718-	case PLATFORM_DEVID_NONE:
drivers/base/platform.c:719:		dev_set_name(dev, "%s", pdev->name);
drivers/base/platform.c-720-		break;
--
drivers/base/platform.c-731-		pdev->id_auto = true;
drivers/base/platform.c:732:		dev_set_name(dev, "%s.%d.auto", pdev->name, pdev->id);
drivers/base/platform.c-733-		break;
]

279/5 2026/08/07 16:41 llm strategy-refiner
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 11061
							output: 45
							thoughts: 57
						

Thoughts:
**My Thought Process Regarding Platform Device ID Handling**

So, my immediate thought upon encountering this code is a bit of a "wait a minute." I'm noticing that `PLATFORM_DEVID_NONE` is defined as -1. That's a bit of an edge case to keep in mind. Then, my mind immediately jumps to what happens if the `id` variable, in this context, is set to 0. The implication is that this would result in a string representation of `"vimc.0"`. This is a common convention for identifying specific instances, but it's good to have that explicit connection made. My next step, logically, is to go and verify the state of `vimc_pdev`. Specifically, I need to check if its `id` field has been assigned a value. This is crucial for understanding the actual behavior of the system in different scenarios, especially if `id` can indeed be 0 or, conversely, if it's always something else. I need to confirm the exact initialization and potential modification of `vimc_pdev.id` to ensure I'm not making assumptions that don't hold true in practice.


280/5 2026/08/07 16:41 tool read-file
0m Args:
map[File:drivers/media/test-drivers/vimc/vimc-core.c FirstLine:400 LineCount:10]

Results:
map[Contents: 400:	{
 401:	}
 402:	
 403:	static struct platform_device vimc_pdev = {
 404:		.name = VIMC_PDEV_NAME,
 405:		.dev.release = vimc_dev_release,
 406:	};
 407:	
 408:	static struct platform_driver vimc_pdrv = {
 409:		.probe		= vimc_probe,
]

281/5 2026/08/07 16:41 llm strategy-refiner
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 11289
							output: 22
							thoughts: 49
						

Thoughts:
**My Thought Process on Resource Naming**

Okay, so the first thing that strikes me here is the absence of an explicit `id` field for this particular resource. This immediately tells me that the system is defaulting to 0 for this identifier. Consequently, I'm mentally constructing the name to be `"vimc.0"`.

But then, a little flicker of doubt, a standard precautionary check for an expert in my position: I need to verify if `PLATFORM_DEVID_NONE` is indeed set to -1. This is crucial because if it were a different sentinel value, it could potentially alter the logic or how this "none" state is represented, and therefore, how the naming convention might need to adapt. I'll need to confirm that specific constant's value to be absolutely certain about the `"vimc.0"` interpretation.


282/5 2026/08/07 16:41 tool grepper
0m Args:
map[Expression:define PLATFORM_DEVID_NONE]

Results:
map[Output:include/linux/platform_device.h-15-
include/linux/platform_device.h:16:#define PLATFORM_DEVID_NONE	(-1)
include/linux/platform_device.h-17-#define PLATFORM_DEVID_AUTO	(-2)
]

283/5 2026/08/07 16:41 llm strategy-refiner
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 11426
							output: 19
							thoughts: 1276
						

Thoughts:
**My Thought Process on Refinement and Reproducer Development**

Okay, so initially, I was thinking the device name for `vimc` would simply be `"vimc.0"`. That's a reasonable starting assumption, but I immediately questioned myself. Is there any chance there's *another* `vimc` device out there that might cause a conflict or confusion? To be robust, I realized I shouldn't just *assume* `"vimc.0"`.

I considered a couple of approaches. I could try to `unbind` with `"vimc.0"` and then, if that fails, try just `"vimc"`. That's a bit of a brute-force, try-and-see method, and it doesn't feel entirely deterministic. A much cleaner and more reliable way to determine the *actual* device name would be to inspect the system's device tree. Specifically, I thought about looking in `/sys/bus/platform/drivers/vimc/`. If I can read that directory, I can find the precise name that the kernel has assigned to the `vimc` driver instance. This led me to write that helper function, `find_vimc_dev_name`, which iterates through the directory entries and looks for names starting with "vimc". This feels much safer and more accurate.

Then, I shifted my focus to the video devices. I know `vimc` creates V4L subdevices, which appear as `/dev/v4l-subdevX`. The question is, which `X`? My first instinct might be to just try opening `/dev/v4l-subdev0` through `/dev/v4l-subdev15` in a loop. However, a more systematic approach would be to examine `/sys/class/video4linux/`. This directory should contain all the video devices, and I can then filter for those that match the `v4l-subdev*` pattern. I also recalled that `vimc` is quite complex and creates *multiple* subdevices for different functions like the sensor, debayer, scaler, etc. So, there will indeed be several `/dev/v4l-subdevX` entries. The simple loop from 0 to 15 still seems like a pragmatic and sufficient way to cover all of them for the purpose of a reproducer, as the kernel usually assigns them sequentially.

With these refined ideas about device identification, I began to construct the reproducer code. The goal is to aggressively bind and unbind the `vimc` driver while simultaneously opening and closing its V4L subdevices.

The core of the reproducer involves two threads:
1.  **The bind/unbind thread (`bind_unbind_thread`):** This thread is responsible for the rapid cycling of the `vimc` driver. It opens the `bind` and `unbind` interfaces within `/sys/bus/platform/drivers/vimc/`. Then, in an infinite loop, it first writes the `vimc_dev_name` to `unbind`, waits a very short time (1ms), then writes the name to `bind`, and waits a slightly longer time (10ms) before repeating. This constant, rapid unbinding and rebinding is precisely what I suspect could trigger a race condition or resource leak.
2.  **The open thread (`open_thread`):** This thread is designed to hammer on the V4L subdevices. It takes a subdevice index as an argument, formats the device name (e.g., `/dev/v4l-subdev0`), and then enters an infinite loop. Inside the loop, it attempts to open the device in read-write mode. If successful, it immediately closes the file descriptor. This constant opening and closing, without any actual ioctls or data transfer, aims to stress the device node management and reference counting within the driver and the V4L subsystem.

The `main` function orchestrates this. First, it ensures the `vimc` module is loaded using `system("modprobe vimc")`. I added a small `usleep(100000)` to give the kernel a moment to recognize and register the device after module loading. Then, it calls `find_vimc_dev_name()` to get the correct device name. After that, it creates the bind/unbind thread. Following that, it launches 16 instances of the `open_thread`, one for each potential V4L subdevice (indices 0 through 15). Finally, it waits indefinitely for the bind/unbind thread to finish (which it won't, due to the infinite loop), effectively keeping the reproducer running until manually terminated.

Now, a small, but crucial, point of reflection: what if `modprobe vimc` fails? Syzkaller environments can be quite restricted, and `modprobe` might not always be available or the module might not be loadable. Alternatively, if the `vimc` driver is built directly into the kernel, `modprobe` is unnecessary, as it's already present. The feedback I received ("The environment probe was successful. The vimc driver is available.") suggests that the driver *is* indeed available, so I can probably rely on it being loaded or present. If it weren't, the reproducer would simply fail to find the driver or devices and exit gracefully, which isn't what I'm aiming for.

I also considered other ways to trigger an `unbind` operation. For example, what if I tried to interact with another platform driver, like `vivid`? `vivid` is also a platform driver, and perhaps interacting with it could somehow lead to an `unbind` event for `vimc`. I'd need to investigate `vivid`'s behavior to see if that's a viable avenue.


284/5 2026/08/07 16:41 tool grepper
0m Args:
map[Expression:vivid_pdev]

Results:
map[Output:drivers/media/test-drivers/vivid/vivid-core.c=2151=static void vivid_remove(struct platform_device *pdev)
--
drivers/media/test-drivers/vivid/vivid-core.c-2228-
drivers/media/test-drivers/vivid/vivid-core.c:2229:static void vivid_pdev_release(struct device *dev)
drivers/media/test-drivers/vivid/vivid-core.c-2230-{
--
drivers/media/test-drivers/vivid/vivid-core.c-2232-
drivers/media/test-drivers/vivid/vivid-core.c:2233:static struct platform_device vivid_pdev = {
drivers/media/test-drivers/vivid/vivid-core.c-2234-	.name		= "vivid",
drivers/media/test-drivers/vivid/vivid-core.c:2235:	.dev.release	= vivid_pdev_release,
drivers/media/test-drivers/vivid/vivid-core.c-2236-};
--
drivers/media/test-drivers/vivid/vivid-core.c=2246=static int __init vivid_init(void)
--
drivers/media/test-drivers/vivid/vivid-core.c-2290-	}
drivers/media/test-drivers/vivid/vivid-core.c:2291:	ret = platform_device_register(&vivid_pdev);
drivers/media/test-drivers/vivid/vivid-core.c-2292-	if (ret) {
drivers/media/test-drivers/vivid/vivid-core.c:2293:		platform_device_put(&vivid_pdev);
drivers/media/test-drivers/vivid/vivid-core.c-2294-		goto free_output_strings;
--
drivers/media/test-drivers/vivid/vivid-core.c-2317-unreg_device:
drivers/media/test-drivers/vivid/vivid-core.c:2318:	platform_device_unregister(&vivid_pdev);
drivers/media/test-drivers/vivid/vivid-core.c-2319-free_output_strings:
--
drivers/media/test-drivers/vivid/vivid-core.c=2327=static void __exit vivid_exit(void)
--
drivers/media/test-drivers/vivid/vivid-core.c-2335-	platform_driver_unregister(&vivid_pdrv);
drivers/media/test-drivers/vivid/vivid-core.c:2336:	platform_device_unregister(&vivid_pdev);
drivers/media/test-drivers/vivid/vivid-core.c-2337-}
]

285/5 2026/08/07 16:41 llm strategy-refiner
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 13440
							output: 44
							thoughts: 38
						

Thoughts:
**A Deep Dive into `vivid` and `v4l-subdev` Node Creation**

My current line of inquiry is the relationship between the `vivid` platform driver and the creation of `v4l-subdev` nodes. I understand that `vivid` is indeed a platform driver, but my core question remains: does it, by its very nature, instantiate or manage `v4l-subdev` nodes? To resolve this, my immediate next step is to investigate the internal workings of the `vivid` driver itself. I need to meticulously examine its code or, if available, consult its documentation to ascertain whether it has any explicit mechanisms or functions dedicated to creating and registering `v4l-subdev` entities within the Video4Linux subsystem.


286/5 2026/08/07 16:41 tool grepper
0m Error:
log-in to see details

Args:
map[Expression:V4L2_SUBDEV_FL_HAS_DEVNODE PathPrefix:drivers/media/test-drivers/vivid]

Results:
map[Output:]

287/5 2026/08/07 16:41 llm strategy-refiner
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 13520
							output: 44
							thoughts: 24
						

Thoughts:
**My Exploration of Video Device Nodes and Kernel Modules**

Initially, my thinking was focused on how to access raw video data from a device. My first instinct, based on common patterns in device interaction, was to investigate the `vivid` kernel module. I assumed that such a module, designed for video-related functionalities, would likely expose specific sub-devices or nodes within the `/dev` filesystem that I could then directly interact with. However, my subsequent analysis or experimentation quickly disabused me of this notion. It became apparent that `vivid`, at least in the context I was exploring, does not appear to create distinct sub-device nodes in the way I had initially hypothesized.

This led me to pivot my investigation. If `vivid` wasn't the direct route to the kind of low-level device access I was seeking, I needed to consider other possibilities within the Linux kernel's video subsystem. My mind immediately went to `vimc`. This module, by its very name and its typical role, suggested a more fundamental level of interaction with video input and output mechanisms. I began to consider if `vimc` might be the module responsible for enumerating and exposing the actual video device nodes that I could then manipulate for data capture or streaming. My internal monologue then turned to: "What are the capabilities and typical use cases of `vimc`? Does it provide the interface I need?" This line of questioning reflects my search for the core component that would allow me to interact with the video hardware at the level I intended.


288/5 2026/08/07 16:41 tool grepper
0m Args:
map[Expression:V4L2_SUBDEV_FL_HAS_DEVNODE PathPrefix:drivers/media/test-drivers/vimc]

Results:
map[Output:drivers/media/test-drivers/vimc/vimc-common.c=356=int vimc_ent_sd_register(struct vimc_ent_device *ved,
--
drivers/media/test-drivers/vimc/vimc-common.c-380-	/* Expose this subdev to user space */
drivers/media/test-drivers/vimc/vimc-common.c:381:	sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
drivers/media/test-drivers/vimc/vimc-common.c-382-	if (sd->ctrl_handler)
]

289/5 2026/08/07 16:41 llm strategy-refiner
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 13738
							output: 54
							thoughts: 1802
						

Thoughts:
**My Thoughts on Reconstructing the `vimc` Race Condition**

So, the core of the issue seems to be this `vimc` driver and a race condition during subdevice unbinding and opening. I've confirmed that `vimc` is indeed the target we need to work with.

My initial thought for fixing the C code is to ensure we reliably find the `vimc` device name. The `find_vimc_dev_name` function should handle this. For the subdevices, I was considering looping and opening `/dev/v4l-subdevX`. The `open()` call will simply fail with `-1` if the device node doesn't exist, which is acceptable.

However, the real concern hit me: what happens if we unbind and then rebind the `vimc` device? The device numbers for `/dev/v4l-subdevX` could potentially increase. I dug into `v4l2_device_register_subdev` and found it uses `video_register_device`, which allocates the first available minor number. When a device is unbound, those minor numbers are freed, and they *should* be reused. But, there's a potential race – the old minor numbers might not be fully released before new ones are allocated, leading to higher numbers being assigned.

To be absolutely safe, I considered scanning `/dev/` for `v4l-subdev*` entries or just looping from 0 up to a reasonable maximum, say 255. Looping through 0 to 255 felt like it would be fast enough.

Here’s the first version of the `open_thread` I sketched out:

```c
void *open_thread(void *arg)
{
    char dev_name[32];
    
    while (1) {
        for (int i = 0; i < 256; i++) {
            sprintf(dev_name, "/dev/v4l-subdev%d", i);
            int fd = open(dev_name, O_RDWR);
            if (fd >= 0) {
                close(fd);
            }
        }
    }
    return NULL;
}
```

But then I thought, maybe looping all the way to 255 might be unnecessarily slow to actually *hit* the race condition. If we're just freeing and reusing minor numbers, it’s likely they’d be reused fairly quickly. Instead of that extensive loop, I considered using `readdir` on `/dev` or, more simply, just looping from 0 to 15 or 0 to 31. Typically, freed minor numbers are immediately reusable. Let's settle on looping from 0 to 31.

Then, the thought occurred: if I have 16 threads dedicated to opening, each of them only needs to cover a subset of the devices, say from 0 to 31. This seems like a good distribution.

At this point, I started thinking about the overall reproducer structure. I considered if `open` returning `ENOENT` (device not found) might still take too long, making it hard to trigger the race. However, `open` on a non-existent node is quite fast, so I decided it's probably acceptable. I also briefly thought about syzkaller's `syz_open_dev`, but since this is a C reproducer, that's not applicable.

Is there another way to trigger the unbind besides the sysfs bind/unbind mechanism? `configfs` is an option if `vimc` supports it, but the sysfs method is standard.

The critical part is understanding the crash itself: `RIP: 0010:subdev_open+0x193/0x510 drivers/media/media/v4l2-core/v4l2-subdev.c:115`. The actual crash point is `sd->entity.graph_obj.mdev->dev`. This indicates that `sd->v4l2_dev->mdev` evaluated to true, but `sd->entity.graph_obj.mdev` evaluated to `NULL`. This scenario perfectly aligns with the race condition we're trying to exploit, specifically when `v4l2_device_unregister_subdev` is called.

I then looked closely at the source for `v4l2_device_unregister_subdev`:

```c
void v4l2_device_unregister_subdev(struct v4l2_subdev *sd)
{
	struct v4l2_device *v4l2_dev;

	/* return if it isn't registered */
	if (sd == NULL || sd->v4l2_dev == NULL)
		return;

	v4l2_dev = sd->v4l2_dev;

	media_entity_enum_clear(&v4l2_dev->subdevs, sd->entity.graph_obj.id);

	media_device_unregister_entity(&sd->entity);

	if (sd->internal_ops && sd->internal_ops->unregistered)
		sd->internal_ops->unregistered(sd);

	sd->v4l2_dev = NULL; // <-- This is key

	if (sd->devnode)
		video_unregister_device(sd->devnode);
}
```

And the crucial observation is: `sd->v4l2_dev = NULL` is set *after* `media_device_unregister_entity`. This is the exact sequence that allows the race. If a thread is in `subdev_open` and reaches the check `sd->v4l2_dev->mdev`, but *before* it checks `sd->entity.graph_obj.mdev`, another thread calls `v4l2_device_unregister_subdev`. The unregister function clears `sd->v4l2_dev` to NULL, but the subdevice entity might still be in a state where `sd->entity.graph_obj.mdev` is valid but the main `v4l2_dev` pointer is gone, leading to the crash.

This confirms my understanding and the approach to constructing the reproducer to hit this precise window.


290/5 2026/08/07 16:42 tool codesearch-definition-source
0m Args:
map[ContextFile:drivers/media/v4l2-core/v4l2-device.c Name:v4l2_device_unregister_subdev]

Results:
map[SourceCode: 263:	void v4l2_device_unregister_subdev(struct v4l2_subdev *sd)
 264:	{
 265:		struct v4l2_device *v4l2_dev;
 266:	
 267:		/* return if it isn't registered */
 268:		if (sd == NULL || sd->v4l2_dev == NULL)
 269:			return;
 270:	
 271:		v4l2_dev = sd->v4l2_dev;
 272:	
 273:		spin_lock(&v4l2_dev->lock);
 274:		list_del(&sd->list);
 275:		spin_unlock(&v4l2_dev->lock);
 276:	
 277:		if (sd->internal_ops && sd->internal_ops->unregistered)
 278:			sd->internal_ops->unregistered(sd);
 279:		sd->v4l2_dev = NULL;
 280:	
 281:	#if defined(CONFIG_MEDIA_CONTROLLER)
 282:		if (v4l2_dev->mdev) {
 283:			/*
 284:			 * No need to explicitly remove links, as both pads and
 285:			 * links are removed by the function below, in the right order
 286:			 */
 287:			media_device_unregister_entity(&sd->entity);
 288:		}
 289:	#endif
 290:		if (sd->devnode)
 291:			video_unregister_device(sd->devnode);
 292:		else
 293:			v4l2_subdev_release(sd);
 294:	}
 SourceFile:drivers/media/v4l2-core/v4l2-device.c]

291/5 2026/08/07 16:42 llm strategy-refiner
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 16095
							output: 1112
							thoughts: 1243
						

Thoughts:
**The Race Condition Unveiled: A Deep Dive into `sd->v4l2_dev` and `media_device_unregister_entity`**

I've been meticulously examining a critical race condition, and I believe I've pinpointed the exact sequence of events leading to the observed crash. My analysis hinges on the order of operations between two threads, particularly concerning the `sd->v4l2_dev` pointer and the `media_device_unregister_entity` function.

It appears that the operation `sd->v4l2_dev = NULL` at line 279 of the relevant code occurs *before* the call to `media_device_unregister_entity` at line 287. Now, let's consider how this plays out in a multithreaded scenario. Imagine a thread, let's call it Thread A, attempting to execute the `subdev_open` function. The critical check within this function is:

```c
if (sd->v4l2_dev->mdev && sd->entity.graph_obj.mdev->dev) {
```

If Thread A reaches the point where it needs to evaluate `sd->v4l2_dev->mdev`, it will first read the value of `sd->v4l2_dev`. Simultaneously, another thread, Thread B, might be executing the code that leads to setting `sd->v4l2_dev = NULL` at line 279. If Thread A has already read `sd->v4l2_dev` and it's still pointing to a valid structure, but *before* Thread B sets it to NULL, Thread A proceeds.

However, the crash isn't occurring at `sd->v4l2_dev->mdev` as one might initially suspect. Instead, the crash happens at `sd->entity.graph_obj.mdev->dev`. This detail is crucial. It implies that Thread A *did* successfully read `sd->v4l2_dev` and it was *not* NULL at that initial moment. Subsequently, Thread B proceeds to call `media_device_unregister_entity`. A key action within this function is setting `sd->entity.graph_obj.mdev = NULL`.

Now, Thread A, having already read a non-NULL `sd->v4l2_dev`, continues its execution. It then proceeds to read `sd->entity.graph_obj.mdev`. Because Thread B has just set this to NULL, Thread A now obtains a NULL pointer. The subsequent attempt to dereference this NULL pointer (`->dev`) is what leads to the crash.

This sequence of events precisely matches the race condition:

1.  **Thread A:** Reads `sd->v4l2_dev` (it's currently non-NULL).
2.  **Thread B:** Sets `sd->v4l2_dev = NULL`.
3.  **Thread B:** Calls `media_device_unregister_entity`, which sets `sd->entity.graph_obj.mdev = NULL`.
4.  **Thread A:** Reads `sd->entity.graph_obj.mdev` (which is now NULL).
5.  **Thread A:** Dereferences the NULL pointer (`->dev`), causing the crash.

This is a classic example of a Time-Of-Check to Time-Of-Use (TOCTOU) race condition.

To reliably reproduce this, I've developed a C reproducer. It involves creating a scenario where one thread continuously binds and unbinds the `vimc` device, while another thread repeatedly opens and closes various V4L2 subdevice nodes. I've also considered the case where `vimc` might be built-in rather than a module. In that scenario, `modprobe vimc` might not be strictly necessary, as the driver and device are inherently present. The `vimc_init` function ensures this, registering the necessary platform device and driver, meaning the `/sys/bus/platform/drivers/vimc` directory and its bind/unbind interfaces will always be available. Therefore, the reproducer should be robust. I'm ready to provide the C source code for this reproducer.


292/3 2026/08/07 16:42 action merge-strategy
0m Results:
map[CurrentReproStrategy:The environment probe confirmed that the `vimc` driver is available. We can now generate the full C reproducer.

### Reproduction Strategy
The bug is a Time-Of-Check to Time-Of-Use (TOCTOU) race condition between `subdev_open()` and `v4l2_device_unregister_subdev()`. 

1. **Thread A (`subdev_open`)**: Evaluates `sd->v4l2_dev->mdev` and finds it non-NULL.
2. **Thread B (`v4l2_device_unregister_subdev`)**: Sets `sd->v4l2_dev = NULL` and calls `media_device_unregister_entity()`, which sets `sd->entity.graph_obj.mdev = NULL`.
3. **Thread A**: Resumes and evaluates `sd->entity.graph_obj.mdev`. It gets `NULL` and crashes when dereferencing `->dev`.

To reproduce this, we will use the `vimc` (Virtual Media Controller) driver, which registers multiple `v4l2_subdev` nodes (`/dev/v4l-subdevX`).
- One thread will continuously unbind and bind the `vimc` platform device via sysfs (`/sys/bus/platform/drivers/vimc/unbind` and `bind`).
- Multiple other threads will continuously try to `open()` and `close()` the `/dev/v4l-subdevX` nodes to hit the race window.

### C Reproducer
```c
#define _GNU_SOURCE
#include <fcntl.h>
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include <dirent.h>

char vimc_dev_name[256] = "vimc.0";

/* Find the exact name of the vimc platform device (e.g., "vimc", "vimc.0") */
void find_vimc_dev_name(void) {
    DIR *dir = opendir("/sys/bus/platform/drivers/vimc");
    if (!dir) return;
    struct dirent *ent;
    while ((ent = readdir(dir)) != NULL) {
        if (strncmp(ent->d_name, "vimc", 4) == 0) {
            strcpy(vimc_dev_name, ent->d_name);
            break;
        }
    }
    closedir(dir);
}

void *bind_unbind_thread(void *arg)
{
    int bind_fd = open("/sys/bus/platform/drivers/vimc/bind", O_WRONLY);
    int unbind_fd = open("/sys/bus/platform/drivers/vimc/unbind", O_WRONLY);
    
    if (bind_fd < 0 || unbind_fd < 0) {
        perror("Failed to open sysfs bind/unbind (is vimc loaded?)");
        return NULL;
    }

    while (1) {
        write(unbind_fd, vimc_dev_name, strlen(vimc_dev_name));
        usleep(1000);
        write(bind_fd, vimc_dev_name, strlen(vimc_dev_name));
        usleep(10000);
    }
    return NULL;
}

void *open_thread(void *arg)
{
    char dev_name[32];
    
    while (1) {
        /* vimc creates multiple subdevs, and minor numbers might increase on re-bind */
        for (int i = 0; i < 32; i++) {
            sprintf(dev_name, "/dev/v4l-subdev%d", i);
            int fd = open(dev_name, O_RDWR);
            if (fd >= 0) {
                close(fd);
            }
        }
    }
    return NULL;
}

int main(void)
{
    pthread_t t_bind;
    pthread_t t_open[16];
    
    /* Ensure vimc module is loaded */
    system("modprobe vimc");
    usleep(100000); /* Wait for devices to appear */
    
    find_vimc_dev_name();
    
    pthread_create(&t_bind, NULL, bind_unbind_thread, NULL);
    
    for (int i = 0; i < 16; i++) {
        pthread_create(&t_open[i], NULL, open_thread, NULL);
    }
    
    pthread_join(t_bind, NULL);
    return 0;
}
```]

293/3 2026/08/07 16:42 agent repro-generator
5m Model:
best-expensive

Results:
map[IsProbe:false RawCandidateReproC:#define _GNU_SOURCE
#include <fcntl.h>
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include <dirent.h>
#include <errno.h>

char vimc_dev_name[256] = "vimc";

void find_vimc_dev_name(void) {
    DIR *dir = opendir("/sys/bus/platform/devices");
    if (!dir) {
        printf("[-] Failed to opendir /sys/bus/platform/devices: %s\n", strerror(errno));
        exit(1);
    }
    struct dirent *ent;
    int found = 0;
    while ((ent = readdir(dir)) != NULL) {
        if (strncmp(ent->d_name, "vimc", 4) == 0) {
            strcpy(vimc_dev_name, ent->d_name);
            found = 1;
            break;
        }
    }
    closedir(dir);
    if (!found) {
        printf("[-] Could not find vimc device in /sys/bus/platform/devices, using default '%s'\n", vimc_dev_name);
    } else {
        printf("[+] Found vimc device: %s\n", vimc_dev_name);
    }
}

void *bind_unbind_thread(void *arg)
{
    int bind_fd = open("/sys/bus/platform/drivers/vimc/bind", O_WRONLY);
    if (bind_fd < 0) {
        printf("[-] Failed to open bind: %s\n", strerror(errno));
        exit(1);
    }
    int unbind_fd = open("/sys/bus/platform/drivers/vimc/unbind", O_WRONLY);
    if (unbind_fd < 0) {
        printf("[-] Failed to open unbind: %s\n", strerror(errno));
        exit(1);
    }
    printf("[+] Opened sysfs bind/unbind successfully.\n");

    while (1) {
        ssize_t ret = write(unbind_fd, vimc_dev_name, strlen(vimc_dev_name));
        if (ret < 0 && errno != ENODEV && errno != EBUSY) {
            printf("[-] write unbind failed: %s\n", strerror(errno));
            exit(1);
        }
        
        ret = write(bind_fd, vimc_dev_name, strlen(vimc_dev_name));
        if (ret < 0 && errno != ENODEV && errno != EBUSY) {
            printf("[-] write bind failed: %s\n", strerror(errno));
            exit(1);
        }
        usleep(1000);
    }
    return NULL;
}

void *open_thread(void *arg)
{
    char dev_name[32];
    
    while (1) {
        for (int i = 0; i < 64; i++) {
            sprintf(dev_name, "/dev/v4l-subdev%d", i);
            int fd = open(dev_name, O_RDWR | O_NONBLOCK);
            if (fd >= 0) {
                close(fd);
            }
        }
    }
    return NULL;
}

int main(void)
{
    pthread_t t_bind;
    pthread_t t_open[16];
    
    find_vimc_dev_name();
    
    if (pthread_create(&t_bind, NULL, bind_unbind_thread, NULL) != 0) {
        printf("[-] Failed to create bind thread: %s\n", strerror(errno));
        exit(1);
    }
    printf("[+] Created bind/unbind thread.\n");
    
    for (int i = 0; i < 16; i++) {
        if (pthread_create(&t_open[i], NULL, open_thread, NULL) != 0) {
            printf("[-] Failed to create open thread: %s\n", strerror(errno));
            exit(1);
        }
    }
    printf("[+] Created open threads.\n");
    
    sleep(10);
    printf("[+] Reproducer finished\n");
    return 0;
}
]

Instruction:
You are a security researcher with deep Linux kernel background.
Your goal is to generate a minimal, standalone C program for the strictly defensive
purpose of verifying a bugfix in an isolated environment.

To ensure that we can diagnose why a program might fail to run on the test environment,
you MUST include detailed logging and error checking in the generated C program:
1. Use 'printf(...)' for all progress messages and error logs.
2. Every system call (e.g., socket, bind, listen, connect, ioctl, send) must check for a failure return value.
3. If a call fails, it must print a specific error message including the function name
   and the error string (use strerror(errno)), and then exit with a non-zero status.
4. The program must print a message after every successful major step.
5. Generate code that follows this pattern for all operations:
    int res = do_something();
    if (res < 0) {
        printf("[-] Failed to do_something: %s\n", strerror(errno));
        exit(1);
    }
    printf("[+] do_something successful.\n");
6. The compilation and development environment (including compilers, build
   systems, makefiles, and kernel build/header directories) is NOT available
   on the target test VM guest. Do NOT check for, build, or reference any
   compilation tools, build files, or kernel development directories.
7. Do NOT execute shell commands or run external binaries (e.g. by using
   functions like 'system()', 'popen()', or the 'exec' family such as
   'execve()'). All environment checks, capability probings, and reproduction
   steps must be performed directly using standard Linux system calls (such
   as 'open', 'socket', 'ioctl', 'stat', etc.).
8. When reproducing asynchronous kernel timeouts or warnings, always
   include a sufficient delay (using sleep or similar) after deleting
   or unregistering the device to allow the kernel's asynchronous
   timeout to trigger before program exit.


=== PHASE 2: BUG REPRODUCTION (GENERATION) ===
You must now generate a full reproducer candidate attempting to trigger the target bug/crash.
Do NOT generate a probe program. Focus directly on triggering the bug/crash described in the description.
You can assume that all necessary kernel capabilities and privileges (e.g., access to /dev/vhci,
ability to load BPF programs, etc.) have already been verified and are available in the environment.

Do not spend too much time analyzing or trying to generate a perfect one-shot reproducer.
Instead, follow an iterative approach: generate a simple candidate, execute it, analyze the results,
and improve it. Keep your reasoning steps short and focused on the next logical experiment.

Prefer calling several tools at the same time to save round-trips.


Use set-results tool to provide results of the analysis.
It must be called exactly once before the final reply.
Ignore results of this tool.

Prompt:
Bug Description: general protection fault in subdev_open

Oops: general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#1] SMP KASAN NOPTI
KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007]
CPU: 1 UID: 0 PID: 11356 Comm: syz.1.1458 Tainted: G             L      syzkaller #0 PREEMPT(full) 
Tainted: [L]=SOFTLOCKUP
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/16/2026
RIP: 0010:subdev_open+0x193/0x510 drivers/media/v4l2-core/v4l2-subdev.c:115
Code: 00 00 00 00 fc ff df 48 c1 ea 03 80 3c 02 00 0f 85 bc 02 00 00 48 b8 00 00 00 00 00 fc ff df 49 8b 2c 24 48 89 ea 48 c1 ea 03 <80> 3c 02 00 0f 85 04 03 00 00 48 8b 6d 00 48 85 ed 0f 84 95 00 00
RSP: 0018:ffffc900037bf8a0 EFLAGS: 00010246
RAX: dffffc0000000000 RBX: ffff888055f54c00 RCX: ffffc90003e51000
RDX: 0000000000000000 RSI: ffffffff88163993 RDI: ffff88802d3ad3d0
RBP: 0000000000000000 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000001 R11: 0000000000000000 R12: ffff88802d414020
R13: ffff88802d70b000 R14: ffff888079c69340 R15: ffff888055f54d38
FS:  00007f15691926c0(0000) GS:ffff888123eed000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f1568387700 CR3: 000000003243a000 CR4: 00000000003526f0
Call Trace:
 <TASK>
 v4l2_open+0x1d2/0x490 drivers/media/v4l2-core/v4l2-dev.c:433
 chrdev_open+0x234/0x6a0 fs/char_dev.c:411
 do_dentry_open+0x6ab/0x14d0 fs/open.c:947
 vfs_open+0x82/0x3f0 fs/open.c:1052
 do_open fs/namei.c:4700 [inline]
 path_openat+0x2873/0x4280 fs/namei.c:4863
 do_file_open+0x20e/0x430 fs/namei.c:4892
 do_sys_openat2+0x10f/0x1e0 fs/open.c:1368
 do_sys_open fs/open.c:1374 [inline]
 __do_sys_openat fs/open.c:1390 [inline]
 __se_sys_openat fs/open.c:1385 [inline]
 __x64_sys_openat+0x12d/0x210 fs/open.c:1385
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0x115/0x870 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f156835e90e
Code: 08 0f 85 a5 a8 ff ff 49 89 fb 48 89 f0 48 89 d7 48 89 ce 4c 89 c2 4d 89 ca 4c 8b 44 24 08 4c 8b 4c 24 10 4c 89 5c 24 08 0f 05 <c3> 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 80 00 00 00 00 48 83 ec 08
RSP: 002b:00007f1569191b28 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 00007f15691926c0 RCX: 00007f156835e90e
RDX: 0000000000000002 RSI: 00007f1569191c00 RDI: ffffffffffffff9c
RBP: 00007f1569191c00 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: cccccccccccccccd
R13: 00007f1568626038 R14: 00007f1568625fa0 R15: 00007ffe228ab238
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:subdev_open+0x193/0x510 drivers/media/v4l2-core/v4l2-subdev.c:115
Code: 00 00 00 00 fc ff df 48 c1 ea 03 80 3c 02 00 0f 85 bc 02 00 00 48 b8 00 00 00 00 00 fc ff df 49 8b 2c 24 48 89 ea 48 c1 ea 03 <80> 3c 02 00 0f 85 04 03 00 00 48 8b 6d 00 48 85 ed 0f 84 95 00 00
RSP: 0018:ffffc900037bf8a0 EFLAGS: 00010246

RAX: dffffc0000000000 RBX: ffff888055f54c00 RCX: ffffc90003e51000
RDX: 0000000000000000 RSI: ffffffff88163993 RDI: ffff88802d3ad3d0
RBP: 0000000000000000 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000001 R11: 0000000000000000 R12: ffff88802d414020
R13: ffff88802d70b000 R14: ffff888079c69340 R15: ffff888055f54d38
FS:  00007f15691926c0(0000) GS:ffff888123ded000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fc283cc07e8 CR3: 000000003243a000 CR4: 00000000003526f0
----------------
Code disassembly (best guess), 7 bytes skipped:
   0:	48 c1 ea 03          	shr    $0x3,%rdx
   4:	80 3c 02 00          	cmpb   $0x0,(%rdx,%rax,1)
   8:	0f 85 bc 02 00 00    	jne    0x2ca
   e:	48 b8 00 00 00 00 00 	movabs $0xdffffc0000000000,%rax
  15:	fc ff df
  18:	49 8b 2c 24          	mov    (%r12),%rbp
  1c:	48 89 ea             	mov    %rbp,%rdx
  1f:	48 c1 ea 03          	shr    $0x3,%rdx
* 23:	80 3c 02 00          	cmpb   $0x0,(%rdx,%rax,1) <-- trapping instruction
  27:	0f 85 04 03 00 00    	jne    0x331
  2d:	48 8b 6d 00          	mov    0x0(%rbp),%rbp
  31:	48 85 ed             	test   %rbp,%rbp
  34:	0f                   	.byte 0xf
  35:	84                   	.byte 0x84
  36:	95                   	xchg   %eax,%ebp

Strategy: The environment probe confirmed that the `vimc` driver is available. We can now generate the full C reproducer.

### Reproduction Strategy
The bug is a Time-Of-Check to Time-Of-Use (TOCTOU) race condition between `subdev_open()` and `v4l2_device_unregister_subdev()`. 

1. **Thread A (`subdev_open`)**: Evaluates `sd->v4l2_dev->mdev` and finds it non-NULL.
2. **Thread B (`v4l2_device_unregister_subdev`)**: Sets `sd->v4l2_dev = NULL` and calls `media_device_unregister_entity()`, which sets `sd->entity.graph_obj.mdev = NULL`.
3. **Thread A**: Resumes and evaluates `sd->entity.graph_obj.mdev`. It gets `NULL` and crashes when dereferencing `->dev`.

To reproduce this, we will use the `vimc` (Virtual Media Controller) driver, which registers multiple `v4l2_subdev` nodes (`/dev/v4l-subdevX`).
- One thread will continuously unbind and bind the `vimc` platform device via sysfs (`/sys/bus/platform/drivers/vimc/unbind` and `bind`).
- Multiple other threads will continuously try to `open()` and `close()` the `/dev/v4l-subdevX` nodes to hit the race window.

### C Reproducer
```c
#define _GNU_SOURCE
#include <fcntl.h>
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include <dirent.h>

char vimc_dev_name[256] = "vimc.0";

/* Find the exact name of the vimc platform device (e.g., "vimc", "vimc.0") */
void find_vimc_dev_name(void) {
    DIR *dir = opendir("/sys/bus/platform/drivers/vimc");
    if (!dir) return;
    struct dirent *ent;
    while ((ent = readdir(dir)) != NULL) {
        if (strncmp(ent->d_name, "vimc", 4) == 0) {
            strcpy(vimc_dev_name, ent->d_name);
            break;
        }
    }
    closedir(dir);
}

void *bind_unbind_thread(void *arg)
{
    int bind_fd = open("/sys/bus/platform/drivers/vimc/bind", O_WRONLY);
    int unbind_fd = open("/sys/bus/platform/drivers/vimc/unbind", O_WRONLY);
    
    if (bind_fd < 0 || unbind_fd < 0) {
        perror("Failed to open sysfs bind/unbind (is vimc loaded?)");
        return NULL;
    }

    while (1) {
        write(unbind_fd, vimc_dev_name, strlen(vimc_dev_name));
        usleep(1000);
        write(bind_fd, vimc_dev_name, strlen(vimc_dev_name));
        usleep(10000);
    }
    return NULL;
}

void *open_thread(void *arg)
{
    char dev_name[32];
    
    while (1) {
        /* vimc creates multiple subdevs, and minor numbers might increase on re-bind */
        for (int i = 0; i < 32; i++) {
            sprintf(dev_name, "/dev/v4l-subdev%d", i);
            int fd = open(dev_name, O_RDWR);
            if (fd >= 0) {
                close(fd);
            }
        }
    }
    return NULL;
}

int main(void)
{
    pthread_t t_bind;
    pthread_t t_open[16];
    
    /* Ensure vimc module is loaded */
    system("modprobe vimc");
    usleep(100000); /* Wait for devices to appear */
    
    find_vimc_dev_name();
    
    pthread_create(&t_bind, NULL, bind_unbind_thread, NULL);
    
    for (int i = 0; i < 16; i++) {
        pthread_create(&t_open[i], NULL, open_thread, NULL);
    }
    
    pthread_join(t_bind, NULL);
    return 0;
}
```


Previous Reproducer Attempt:
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/stat.h>

int main(void) {
    struct stat st;
    if (stat("/sys/bus/platform/drivers/vimc/bind", &st) == 0) {
        printf("[+] vimc driver is available.\n");
        return 0;
    }
    printf("[-] vimc driver is not available.\n");
    return 1;
}




Execution Results & Debugging Feedback:
The environment probe was successful. The vimc driver is available. You can now proceed to generate the full reproducer in the next iteration.

294/4 2026/08/07 16:42 llm repro-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 7124
							output: 22
							thoughts: 486
						

Thoughts:
**My Thought Process for Generating a C Reproducer for the `subdev_open` General Protection Fault**

My primary objective is to create a robust C reproducer for a general protection fault (GPF) occurring within `subdev_open`. I've identified the root cause as a race condition between the `subdev_open` function itself and `v4l2_device_unregister_subdev`.

Initially, my thought was to leverage the `vimc` driver. The plan involved a multi-threaded approach: one thread would handle the unbinding and binding of the `vimc` driver, while other threads would concurrently attempt to open `/dev/v4l-subdevX` devices.

However, I've hit a critical constraint: I am explicitly forbidden from executing shell commands or external binaries. This means I cannot use functions like `system()`, `popen()`, or any of the `exec` family of calls. All interactions with the system, including environment checks and reproduction steps, must be performed exclusively through standard Linux system calls such as `open`, `socket`, `ioctl`, and `stat`.

This constraint immediately brings my previous `vimc` strategy into question. The command `system("modprobe vimc");` is now out of the picture. My prior probe indicated that `vimc` was available, implying its module was loaded or could be loaded. If the driver is already loaded, I might not need to explicitly modprobe it. Alternatively, I might be able to trigger its loading by, for example, opening a `/dev/videoX` device. Since my probe succeeded, it indicated the existence of `/sys/bus/platform/drivers/vimc/bind`.

Let's clarify the implications of the probe's success. Simply checking for `/sys/bus/platform/drivers/vimc/bind` confirms the driver *module* is loaded, but it doesn't necessarily mean a specific `vimc` *platform device* has been instantiated and bound to it. Typically, `vimc` is a platform driver. It's possible that no `vimc` device exists by default, and I might need to explicitly create one. Or, perhaps `vimc` registers a default device like `vimc.0` or simply `vimc` upon module load.

To resolve this uncertainty, I need to understand how `vimc` platform devices are created. Does it automatically create a device, or is there a configuration mechanism like `configfs` or `sysfs`? My understanding is that `vimc`'s `init` function likely registers a platform device. To confirm this, I should investigate the `vimc` source code.

Alternatively, and perhaps more efficiently, I can use code searching tools like `codesearch-find-references` or `grepper` to quickly determine the naming convention for `vimc` platform devices. This will be crucial for correctly identifying and interacting with the relevant device for my reproduction.


295/4 2026/08/07 16:42 tool grepper
0m Args:
map[Expression:platform_device_register.*vimc]

Results:
map[Output:drivers/media/test-drivers/vimc/vimc-core.c=416=static int __init vimc_init(void)
--
drivers/media/test-drivers/vimc/vimc-core.c-419-
drivers/media/test-drivers/vimc/vimc-core.c:420:	ret = platform_device_register(&vimc_pdev);
drivers/media/test-drivers/vimc/vimc-core.c-421-	if (ret) {
]

296/4 2026/08/07 16:42 llm repro-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 7758
							output: 23
							thoughts: 13
						

Thoughts:
**My Thought Process on `vimc_pdev`**

My immediate inclination is to delve into the definition of `vimc_pdev`. I need to understand precisely what this entity represents. Is it a variable, a function, a class, a module, a configuration setting, or something else entirely? The name itself, `vimc_pdev`, offers some initial clues. `vimc` likely refers to some system or component, possibly related to virtual machine control or a specific project/team identifier. `pdev` could stand for "physical device," "platform device," or perhaps a more abstract concept like "process descriptor" or "parameter definition."

To truly grasp its role, I need to examine its declaration and instantiation. Where is it defined? What are its properties or attributes? What is its scope? Is it global, local to a specific function or class, or perhaps part of a larger configuration object?

Crucially, I'm looking for its purpose. What problem does `vimc_pdev` solve? How does it interact with other components in the system? Is it responsible for managing hardware resources, orchestrating specific operations, or holding critical configuration data? Understanding its dependencies and the data it consumes or produces will be key to understanding its function. I'll be scrutinizing its usage throughout the codebase to see how it's manipulated and what outcomes result from its involvement. If it's a data structure, I'll be paying close attention to the types of data it stores. If it's an object or a class, I'll be looking at its methods and the operations it performs. Ultimately, my goal is to build a comprehensive mental model of `vimc_pdev` and its place within the larger architectural landscape.


297/4 2026/08/07 16:42 tool grepper
0m Args:
map[Expression:struct platform_device vimc_pdev]

Results:
map[Output:drivers/media/test-drivers/vimc/vimc-core.c=399=static void vimc_dev_release(struct device *dev)
--
drivers/media/test-drivers/vimc/vimc-core.c-402-
drivers/media/test-drivers/vimc/vimc-core.c:403:static struct platform_device vimc_pdev = {
drivers/media/test-drivers/vimc/vimc-core.c-404-	.name = VIMC_PDEV_NAME,
]

298/4 2026/08/07 16:42 llm repro-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 7926
							output: 22
							thoughts: 13
						

Thoughts:
**My Thought Process on Locating `VIMC_PDEV_NAME`**

Alright, my primary objective here is to pinpoint the exact location of `VIMC_PDEV_NAME`. This is a crucial identifier, and I need to be absolutely certain where it resides within the system. My initial approach is to systematically search for it, and I'll be employing a few different strategies to ensure comprehensive coverage.

First, I'll be looking for it in configuration files. These are the most likely places for such a parameter to be defined, especially if it's part of a system setup or a hardware abstraction layer. I'm thinking about common locations like `/etc`, or perhaps within specific driver configuration directories. I'll be using tools like `grep` or more specialized configuration file parsers to scan these files efficiently.

Beyond static configuration, I'll also consider dynamic system information. It's possible that `VIMC_PDEV_NAME` isn't hardcoded but is rather determined at runtime. In this case, I'd be looking at kernel interfaces, such as `/sys` or `/proc`. These virtual file systems often expose a wealth of information about the running kernel and its devices. I'll be particularly interested in device-specific directories within these hierarchies, trying to identify the virtual machine or specific device context that `VIMC_PDEV_NAME` is associated with.

I also need to consider the possibility that this is an environment variable. Sometimes, parameters are passed down through the environment, especially in complex application stacks. I'll be checking the environment of relevant processes.

Furthermore, I'll be considering source code if available. If I'm in a position to examine the source code of the relevant drivers or applications, that would be the most definitive way to understand how `VIMC_PDEV_NAME` is defined, used, and consequently, where it would be found. This might involve searching through header files or implementation files.

My strategy is to combine these approaches: start with the most probable locations (configuration files), move to dynamic system information, consider environment variables, and finally, if necessary, delve into source code. I'm aiming for a robust and reliable identification of `VIMC_PDEV_NAME` without making assumptions.


299/4 2026/08/07 16:42 tool grepper
0m Args:
map[Expression:define VIMC_PDEV_NAME]

Results:
map[Output:drivers/media/test-drivers/vimc/vimc-common.h-17-
drivers/media/test-drivers/vimc/vimc-common.h:18:#define VIMC_PDEV_NAME "vimc"
drivers/media/test-drivers/vimc/vimc-common.h-19-
]

300/4 2026/08/07 16:42 llm repro-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 8039
							output: 44
							thoughts: 393
						

Thoughts:
**My Thought Process Regarding the `vimc` Device and V4L2 Subdevice Behavior**

Okay, so I'm trying to understand how this `vimc` device interacts with the V4L2 subsystem, specifically concerning binding and unbinding and how it affects device node creation and accessibility.

My initial thought is that since `"vimc"` is identified as a platform device, I expect to find its corresponding directory within `/sys/bus/platform/devices/`. This directory should be named `"vimc"`. Consequently, when I need to perform bind and unbind operations for this device, the operations should target the string `"vimc"`.

To test this hypothesis and observe the behavior, I'm planning to write a C program. The core logic will involve two threads. The first thread will be responsible for manipulating the device's binding state. It will write `"vimc"` to `/sys/bus/platform/drivers/vimc/unbind`, effectively detaching the `vimc` driver, and then immediately write `"vimc"` to `/sys/bus/platform/drivers/vimc/bind` to reattach it. The purpose of this rapid bind/unbind cycle is to trigger potential state changes or reinitializations within the V4L2 core.

Simultaneously, other threads will be actively probing for V4L2 subdevice nodes. These nodes are typically found under `/dev/` and follow the pattern `/dev/v4l-subdevX`, where `X` represents a minor number. I'll have these threads attempt to open these devices, with `X` ranging from 0 up to a reasonable limit, say 64 initially.

Now, a crucial observation arises from this planned experiment: if the unbind and bind operations are indeed causing the V4L2 core to re-register or re-allocate devices, then the minor numbers of these `/dev/v4l-subdevX` nodes might keep increasing. I'm recalling that the V4L2 core dynamically allocates these minor numbers. While they *might* be reused immediately upon unbinding and re-registration, there's no guarantee. It's more likely that they are managed by an IDA (or a similar mechanism), which means they could potentially be reused, but it's not a certainty, especially under rapid manipulation.

To account for this potential for increasing minor numbers and to ensure robust detection, I'm considering a few strategies. Instead of relying solely on a fixed range like 0-64, I could simply scan the `/dev/` directory for all entries matching the `v4l-subdev*` pattern. Alternatively, to be more thorough, I could just try opening a wider range of minor numbers, perhaps from 0 to 255. I'm also considering using `readdir` on `/dev` as another method to discover existing device nodes. However, my experience tells me that `open()` calls on `/dev/v4l-subdevX` are generally quite fast, so a simple loop iterating from 0 to 255 should be an efficient and straightforward approach for discovery.

Let's go back to the specific bug I'm investigating. The traceback points to `RIP: 0010:subdev_open+0x193/0x510 drivers/media/v4l2-core/v4l2-subdev.c:115`. This means the issue is occurring within the `subdev_open` function, at a specific offset. I need to examine the source code at `drivers/media/v4l2-core/v4l2-subdev.c`, line 115, to understand the exact context of the error, which is likely related to how subdevices are handled during the open operation, possibly in conjunction with the dynamic minor number allocation and the binding state of the `vimc` device.


301/4 2026/08/07 16:43 tool grepper
0m Args:
map[Expression:subdev_open PathPrefix:drivers/media/v4l2-core/v4l2-subdev.c]

Results:
map[Output:drivers/media/v4l2-core/v4l2-subdev.c=89=static void subdev_fh_free(struct v4l2_subdev_fh *fh)
--
drivers/media/v4l2-core/v4l2-subdev.c-94-
drivers/media/v4l2-core/v4l2-subdev.c:95:static int subdev_open(struct file *file)
drivers/media/v4l2-core/v4l2-subdev.c-96-{
--
drivers/media/v4l2-core/v4l2-subdev.c=144=static int subdev_close(struct file *file)
--
drivers/media/v4l2-core/v4l2-subdev.c-161-#else /* CONFIG_VIDEO_V4L2_SUBDEV_API */
drivers/media/v4l2-core/v4l2-subdev.c:162:static int subdev_open(struct file *file)
drivers/media/v4l2-core/v4l2-subdev.c-163-{
--
drivers/media/v4l2-core/v4l2-subdev.c=1233=const struct v4l2_file_operations v4l2_subdev_fops = {
drivers/media/v4l2-core/v4l2-subdev.c-1234-	.owner = THIS_MODULE,
drivers/media/v4l2-core/v4l2-subdev.c:1235:	.open = subdev_open,
drivers/media/v4l2-core/v4l2-subdev.c-1236-	.unlocked_ioctl = subdev_ioctl,
]

302/4 2026/08/07 16:43 llm repro-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 8917
							output: 47
							thoughts: 33
						

Thoughts:
**My Thought Process on `v4l2-subdev.c`'s `subdev_open` Function**

Alright, so my immediate instinct here is to dive into the `subdev_open` function within the `drivers/media/v4l2-core/v4l2-subdev.c` file. This is the heart of how a V4L2 sub-device is initialized and made available for use. I'm expecting to see the core logic for setting up the sub-device's state, ensuring it's not already in use, and potentially performing some initial hardware-specific setup.

My mental model of this function is that it's going to be the gatekeeper, the first line of defense before any actual operations on the sub-device can occur. Therefore, I anticipate robust error checking. I'm looking for checks to see if the device is already open, if the underlying structures are valid, and if the necessary permissions are in place. This isn't just about opening a file handle; it's about establishing a controlled, well-defined state for a hardware component.

I'll be paying close attention to how the device's internal state is managed. Is there a reference count? How is the `V4L2_SUBDEV_IN_USE` flag handled? This is critical for ensuring reentrancy and preventing race conditions in a multithreaded environment. The kernel's media subsystem is all about managing complex hardware interactions, so these concurrency concerns are paramount.

Furthermore, I'm curious about the interaction with the actual hardware driver. Does `subdev_open` directly call into the sub-device's specific `.open` operation? Or is there an intermediate layer that handles this? I'm leaning towards the latter, where `subdev_open` acts as a generic wrapper that then dispatches to the hardware-specific implementation. This would be a cleaner, more modular design.

I'll also be looking for any specific flags or options passed to `subdev_open` that might influence its behavior. While the basic `open` operation is usually straightforward, V4L2 often has nuances, and I'll be checking if there are any special modes or configurations that can be requested at this stage.

Finally, on the exit path, I expect to see the allocation and initialization of necessary data structures, and importantly, the return of a file descriptor or a similar handle that the user-space application will use to interact with the sub-device going forward. The success or failure of this function will dictate whether the sub-device is even usable, so its robustness and clarity are key.


303/4 2026/08/07 16:43 tool read-file
0m Args:
map[File:drivers/media/v4l2-core/v4l2-subdev.c FirstLine:95 LineCount:50]

Results:
map[Contents:  95:	static int subdev_open(struct file *file)
  96:	{
  97:		struct video_device *vdev = video_devdata(file);
  98:		struct v4l2_subdev *sd = vdev_to_v4l2_subdev(vdev);
  99:		struct v4l2_subdev_fh *subdev_fh;
 100:		int ret;
 101:	
 102:		subdev_fh = kzalloc_obj(*subdev_fh);
 103:		if (subdev_fh == NULL)
 104:			return -ENOMEM;
 105:	
 106:		ret = subdev_fh_init(subdev_fh, sd);
 107:		if (ret) {
 108:			kfree(subdev_fh);
 109:			return ret;
 110:		}
 111:	
 112:		v4l2_fh_init(&subdev_fh->vfh, vdev);
 113:		v4l2_fh_add(&subdev_fh->vfh, file);
 114:	
 115:		if (sd->v4l2_dev->mdev && sd->entity.graph_obj.mdev->dev) {
 116:			struct module *owner;
 117:	
 118:			owner = sd->entity.graph_obj.mdev->dev->driver->owner;
 119:			if (!try_module_get(owner)) {
 120:				ret = -EBUSY;
 121:				goto err;
 122:			}
 123:			subdev_fh->owner = owner;
 124:		}
 125:	
 126:		if (sd->internal_ops && sd->internal_ops->open) {
 127:			ret = sd->internal_ops->open(sd, subdev_fh);
 128:			if (ret < 0)
 129:				goto err;
 130:		}
 131:	
 132:		return 0;
 133:	
 134:	err:
 135:		module_put(subdev_fh->owner);
 136:		v4l2_fh_del(&subdev_fh->vfh, file);
 137:		v4l2_fh_exit(&subdev_fh->vfh);
 138:		subdev_fh_free(subdev_fh);
 139:		kfree(subdev_fh);
 140:	
 141:		return ret;
 142:	}
 143:	
 144:	static int subdev_close(struct file *file)
]

304/4 2026/08/07 16:43 llm repro-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 9733
							output: 25
							thoughts: 705
						

Thoughts:
**My Debugging Journey: Tracing a Null Pointer Dereference**

Here I am, staring at a crash report, and my mind immediately goes to the root cause: a null pointer dereference. The specific line of interest is `if (sd->v4l2_dev->mdev && sd->entity.graph_obj.mdev->dev) {`. The crash is happening at `sd->entity.graph_obj.mdev->dev`, which tells me that `sd->entity.graph_obj.mdev` must be NULL.

Now, I pause. I see that `sd->v4l2_dev->mdev` was indeed checked and found to be non-NULL. This feels like a contradiction, a puzzle. My immediate thought is to question the premise: could `sd->v4l2_dev` itself be NULL? If that's the case, then the access `sd->v4l2_dev->mdev` would *also* have caused a crash, but the report indicates the crash is further down the line.

The crash address itself is a bit of a red herring, `0x0000000000000000-0x0000000000000007`. This often points to the kernel's memory error detector (KASAN) being involved. Looking at the disassembly confirms this intuition. The instruction at offset `0x23` (`80 3c 02 00 cmpb $0x0,(%rdx,%rax,1)`) is the one trapping. This is a KASAN shadow check, meaning it's verifying the memory accessibility of the address stored in `%rbp`.

My next step is to understand what `%rbp` holds at this critical juncture. The disassembly shows that `%rbp` is being loaded from the memory location pointed to by `%r12` (`48 b8 00 00 00 00 00 fc ff df movabs $0xdffffc0000000000,%rax` followed by `49 8b 2c 24 mov (%r12),%rbp`). The reported value of `%rbp` is `0x0000000000000000`. This is the key insight: `(%r12)` contained a NULL pointer.

So, the KASAN check is failing because it's trying to access memory at an address derived from a NULL pointer (`%rbp`). My immediate question then becomes: what is `%r12` pointing to, and how did it get that NULL value? I need to trace back to the context of `subdev_open`, where `sd` is initialized as `vdev_to_v4l2_subdev(vdev)`. This is where I'll begin my search for the origin of this NULL pointer – likely related to the offsets of `v4l2_dev` and `entity.graph_obj.mdev` within the `struct v4l2_subdev`.


305/4 2026/08/07 16:43 tool codesearch-struct-layout
0m Args:
map[Name:v4l2_subdev]

Results:
map[Fields:[map[Name:entity OffsetBits:0 SizeBits:960] map[Name:list OffsetBits:960 SizeBits:128] map[Name:owner OffsetBits:1088 SizeBits:64] map[Name:owner_v4l2_dev OffsetBits:1152 SizeBits:8] map[Name:flags OffsetBits:1184 SizeBits:32] map[Name:v4l2_dev OffsetBits:1216 SizeBits:64] map[Name:ops OffsetBits:1280 SizeBits:64] map[Name:internal_ops OffsetBits:1344 SizeBits:64] map[Name:ctrl_handler OffsetBits:1408 SizeBits:64] map[Name:name OffsetBits:1472 SizeBits:416] map[Name:grp_id OffsetBits:1888 SizeBits:32] map[Name:dev_priv OffsetBits:1920 SizeBits:64] map[Name:host_priv OffsetBits:1984 SizeBits:64] map[Name:devnode OffsetBits:2048 SizeBits:64] map[Name:dev OffsetBits:2112 SizeBits:64] map[Name:fwnode OffsetBits:2176 SizeBits:64] map[Name:async_list OffsetBits:2240 SizeBits:128] map[Name:async_subdev_endpoint_list OffsetBits:2368 SizeBits:128] map[Name:subdev_notifier OffsetBits:2496 SizeBits:64] map[Name:asc_list OffsetBits:2560 SizeBits:128] map[Name:pdata OffsetBits:2688 SizeBits:64] map[Name:state_lock OffsetBits:2752 SizeBits:64] map[Name:privacy_led OffsetBits:2816 SizeBits:64] map[Name:active_state OffsetBits:2880 SizeBits:64] map[Name:enabled_pads OffsetBits:2944 SizeBits:64] map[Name:s_stream_enabled OffsetBits:3008 SizeBits:8]]]

306/4 2026/08/07 16:43 llm repro-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 10831
							output: 21
							thoughts: 44
						

Thoughts:
**My Thought Process**

Okay, so I'm trying to figure out the memory layout here. My primary focus is on `v4l2_dev`. I've determined it's located at an offset of 1216 bits, which translates to 152 bytes. Now, before I dive deeper into what's *within* `v4l2_dev`, I need to understand its broader context. I'm looking at `struct media_entity`, and I've noted that the `entity` member within it resides at offset 0. This makes sense; `entity` is often the foundational or first element in these kinds of composite structures, serving as a common base for various media device representations. My next step is to correlate the `v4l2_dev` offset with the `media_entity` structure to understand their relationship and how they're laid out in memory relative to each other.


307/4 2026/08/07 16:43 tool codesearch-struct-layout
0m Args:
map[Name:media_entity]

Results:
map[Fields:[map[Name:graph_obj OffsetBits:0 SizeBits:256] map[Name:name OffsetBits:256 SizeBits:64] map[Name:obj_type OffsetBits:320 SizeBits:32] map[Name:function OffsetBits:352 SizeBits:32] map[Name:flags OffsetBits:384 SizeBits:64] map[Name:num_pads OffsetBits:448 SizeBits:16] map[Name:num_links OffsetBits:464 SizeBits:16] map[Name:num_backlinks OffsetBits:480 SizeBits:16] map[Name:internal_idx OffsetBits:512 SizeBits:32] map[Name:pads OffsetBits:576 SizeBits:64] map[Name:links OffsetBits:640 SizeBits:128] map[Name:ops OffsetBits:768 SizeBits:64] map[Name:use_count OffsetBits:832 SizeBits:32] map[Name:info OffsetBits:864 SizeBits:64]]]

308/4 2026/08/07 16:43 llm repro-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 11069
							output: 22
							thoughts: 22
						

Thoughts:
**My Thought Process on `graph_obj` and `struct media_gobj`**

Alright, the first thing that jumps out at me is this reference to `graph_obj` at offset 0. This is a pretty significant starting point. My immediate instinct, given the context of media and potentially graphics or object management, is to consider what kind of object this `graph_obj` is. Offset 0 is often where the core structure of an object resides, or at least a pointer to it.

So, I need to understand the nature of `graph_obj`. Is it a pointer? Is it an embedded structure itself? The fact that it's at offset 0 strongly suggests it's a fundamental component.

My next step, therefore, is to examine `struct media_gobj`. This is clearly the definition of the structure that `graph_obj` is likely a part of, or at least related to. I'm looking for how `graph_obj` is declared within `struct media_gobj`.

Specifically, I want to ascertain:

*   **The type of `graph_obj` within `struct media_gobj`:** Is it a pointer to another structure? Is it a member of a union? Is it a direct member representing a graphical primitive or some kind of node in a scene graph?
*   **The significance of its position at offset 0:** This could imply that `struct media_gobj` *is* effectively a `graph_obj`, or that `graph_obj` is the very first, and perhaps most crucial, member of `struct media_gobj`. If `graph_obj` is a pointer, then `struct media_gobj` might be a higher-level descriptor that *contains* the actual graphical object.
*   **The overall purpose of `struct media_gobj`:** What is it designed to represent? Given the name, it's almost certainly related to media handling, and the "gobj" likely refers to a "graphical object" or perhaps a "game object" if this is within a game engine context. The interaction between `graph_obj` and the rest of `struct media_gobj` will define how these media-related graphical elements are organized and managed.

In essence, I'm trying to deconstruct the relationship between these two entities. `graph_obj` at offset 0 tells me "start here, this is important." `struct media_gobj` is the blueprint that tells me *what* "here" is and what else is associated with it. My goal is to understand the data layout and the semantic meaning of this structure in the broader system.


309/4 2026/08/07 16:43 tool codesearch-struct-layout
0m Args:
map[Name:media_gobj]

Results:
map[Fields:[map[Name:mdev OffsetBits:0 SizeBits:64] map[Name:id OffsetBits:64 SizeBits:32] map[Name:list OffsetBits:128 SizeBits:128]]]

310/4 2026/08/07 16:43 llm repro-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 11149
							output: 36
							thoughts: 605
						

Thoughts:
**My Thought Process Unpacking the V4L2 Subdevice Race Condition**

Okay, let's walk through how I'm piecing this together. My primary goal here is to understand why a crash is occurring, specifically related to KASAN shadow memory checks, and how that points to a Time-of-Check to Time-of-Use (TOCTOU) race condition.

First, I'm looking at the assembly snippet, specifically line 18: `49 8b 2c 24 mov (%r12),%rbp`. My initial interpretation is that `%r12` holds a pointer to some structure, let's call it `sd` (likely `v4l2_subdev`). This instruction is loading the value at the offset `0` from `sd` into `%rbp`. I know from the V4L2 subdevice structure definition that `entity.graph_obj.mdev` is located at offset 0. So, `%rbp` is being populated with `sd->entity.graph_obj.mdev`.

Then, the subsequent KASAN check fails because `%rbp` is zero, leading to a crash. This is where my mind immediately jumps to the possibility that `sd->entity.graph_obj.mdev` has somehow become NULL between the time it was read and the time KASAN is checking its validity.

However, I need to consider the entire context. I recall that `v4l2_subdev` also contains a pointer to `v4l2_dev`, and `v4l2_dev` has its own `mdev` member. I know that `v4l2_dev` is at offset 152 within `v4l2_subdev`. So, the expression `sd->v4l2_dev->mdev` would be accessed at `%r12 + 152`.

This leads me to examine the instructions *before* line 18. The sequence `shr $0x3,%rdx`, `cmpb $0x0,(%rdx,%rax,1)`, and `jne 0x2ca` strongly suggests a KASAN shadow check is happening. Given the context, it's highly probable that this check is related to `sd->v4l2_dev->mdev`.

Putting these observations together, I can reconstruct the likely C code snippet: `if (sd->v4l2_dev->mdev && sd->entity.graph_obj.mdev->dev)`. The logic here is clear: first, it checks if `sd->v4l2_dev->mdev` is non-NULL. If it is, then it proceeds to evaluate `sd->entity.graph_obj.mdev->dev`.

The problem becomes apparent: the KASAN check *before* line 18 is likely validating `sd->v4l2_dev->mdev`. If that check passes (meaning `sd->v4l2_dev->mdev` is non-NULL), the code then proceeds. But *between* the successful check of `sd->v4l2_dev->mdev` and the eventual dereference of `sd->entity.graph_obj.mdev->dev` (which is what line 18 and the subsequent KASAN check are part of), `sd->entity.graph_obj.mdev` must have been changed to NULL. This is the classic TOCTOU race condition. One part of the code checks a condition, and then a different, potentially concurrent operation modifies the state before the original code can act on its checked condition.

My next step is to devise a way to trigger this race. A common technique for this in device drivers is to unbind and re-bind a device. I need to find the specific device that's involved. The text mentions `"vimc"`. I need to be precise about its name. My initial thought is `"vimc"`, but I remember that `platform_device_register` can sometimes append a `.0` if the `id` is 0. I'd then look into `vimc_init` and check `platform_device_register(&vimc_pdev)` and the value of `vimc_pdev.id` to confirm the exact device name that will appear in sysfs. This precision is crucial for writing a reliable reproducer.


311/4 2026/08/07 16:43 tool grepper
0m Args:
map[Expression:vimc_pdev PathPrefix:drivers/media/test-drivers/vimc/]

Results:
map[Output:drivers/media/test-drivers/vimc/vimc-core.c=399=static void vimc_dev_release(struct device *dev)
--
drivers/media/test-drivers/vimc/vimc-core.c-402-
drivers/media/test-drivers/vimc/vimc-core.c:403:static struct platform_device vimc_pdev = {
drivers/media/test-drivers/vimc/vimc-core.c-404-	.name = VIMC_PDEV_NAME,
--
drivers/media/test-drivers/vimc/vimc-core.c=416=static int __init vimc_init(void)
--
drivers/media/test-drivers/vimc/vimc-core.c-419-
drivers/media/test-drivers/vimc/vimc-core.c:420:	ret = platform_device_register(&vimc_pdev);
drivers/media/test-drivers/vimc/vimc-core.c-421-	if (ret) {
drivers/media/test-drivers/vimc/vimc-core.c:422:		dev_err(&vimc_pdev.dev,
drivers/media/test-drivers/vimc/vimc-core.c-423-			"platform device registration failed (err=%d)\n", ret);
drivers/media/test-drivers/vimc/vimc-core.c:424:		platform_device_put(&vimc_pdev);
drivers/media/test-drivers/vimc/vimc-core.c-425-		return ret;
--
drivers/media/test-drivers/vimc/vimc-core.c-429-	if (ret) {
drivers/media/test-drivers/vimc/vimc-core.c:430:		dev_err(&vimc_pdev.dev,
drivers/media/test-drivers/vimc/vimc-core.c-431-			"platform driver registration failed (err=%d)\n", ret);
drivers/media/test-drivers/vimc/vimc-core.c:432:		platform_device_unregister(&vimc_pdev);
drivers/media/test-drivers/vimc/vimc-core.c-433-		return ret;
--
drivers/media/test-drivers/vimc/vimc-core.c=439=static void __exit vimc_exit(void)
--
drivers/media/test-drivers/vimc/vimc-core.c-442-
drivers/media/test-drivers/vimc/vimc-core.c:443:	platform_device_unregister(&vimc_pdev);
drivers/media/test-drivers/vimc/vimc-core.c-444-}
]

312/4 2026/08/07 16:43 llm repro-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 12471
							output: 46
							thoughts: 83
						

Thoughts:
**My Thought Process**

I'm currently grappling with the behavior of device IDs, specifically when they aren't explicitly set. My initial assumption is that an unset `.id` defaults to `0`. However, I'm quickly realizing this might be more nuanced. I recall that for platform devices, a `.id` of `-1` signifies no appending, whereas an `.id` of `0` *does* result in appending `.0`. This distinction is crucial, and to clarify, I need to dive into the definition of the `platform_device` struct itself. I'm going to examine its structure to confirm how it handles these ID values and verify my understanding.


313/4 2026/08/07 16:43 tool codesearch-definition-source
0m Args:
map[ContextFile:drivers/media/test-drivers/vimc/vimc-core.c Name:vimc_pdev]

Results:
map[SourceCode: 403:	static struct platform_device vimc_pdev = {
 404:		.name = VIMC_PDEV_NAME,
 405:		.dev.release = vimc_dev_release,
 406:	};
 SourceFile:drivers/media/test-drivers/vimc/vimc-core.c]

314/4 2026/08/07 16:43 llm repro-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 12684
							output: 37
							thoughts: 46
						

Thoughts:
**My Thought Process Regarding the Unspecified `.id` Field**

My initial thought upon encountering a situation where `.id` was not explicitly provided was a direct assumption: that the default value must be `0`. This is a common convention for unset identifiers or the first element in a sequence. However, this led to a secondary, more nuanced question that immediately arose in my mind.

I paused and considered the implication of `.id` being `0`. Does this mean that the device in question is effectively being referred to as `vimc.0` within the system? This isn't just a superficial thought; it suggests a deeper query about how the system names or internally represents devices when their explicit identifier is absent and defaults to zero. It prompts me to consider the potential for implicit naming or disambiguation strategies being employed.

To resolve this ambiguity and understand the actual behavior, my immediate next step is to consult the source code, specifically the `platform_device_add` function. I need to examine its implementation to see precisely how it handles the `.id` field when it's omitted. Does it indeed assign `0` and then construct a name like `vimc.0`? Or does it have a different mechanism for assigning identifiers or handling default cases? This dive into the `platform_device_add` function is crucial for me to gain a definitive understanding of the system's behavior in this specific scenario.


315/4 2026/08/07 16:43 tool grepper
0m Args:
map[Expression:dev_set_name.*pdev->name PathPrefix:drivers/base/platform.c]

Results:
map[Output:drivers/base/platform.c=703=int platform_device_add(struct platform_device *pdev)
--
drivers/base/platform.c-715-	default:
drivers/base/platform.c:716:		dev_set_name(dev, "%s.%d", pdev->name,  pdev->id);
drivers/base/platform.c-717-		break;
drivers/base/platform.c-718-	case PLATFORM_DEVID_NONE:
drivers/base/platform.c:719:		dev_set_name(dev, "%s", pdev->name);
drivers/base/platform.c-720-		break;
--
drivers/base/platform.c-731-		pdev->id_auto = true;
drivers/base/platform.c:732:		dev_set_name(dev, "%s.%d.auto", pdev->name, pdev->id);
drivers/base/platform.c-733-		break;
]

316/4 2026/08/07 16:43 llm repro-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 13012
							output: 22
							thoughts: 48
						

Thoughts:
**My Thought Process on Object Naming**

Okay, so I'm trying to figure out how to name this particular object. I've encountered a situation where `PLATFORM_DEVID_NONE` is defined as `-1`. Now, my internal logic dictates that if the `.id` property of this object happens to be `0`, then the resulting name should follow the pattern `vimc.0`. However, I'm pausing for a moment to double-check my understanding of what `PLATFORM_DEVID_NONE` actually signifies in this context. I want to be absolutely certain that my interpretation of its value and its impact on the naming convention is correct before proceeding.


317/4 2026/08/07 16:43 tool grepper
0m Args:
map[Expression:define PLATFORM_DEVID_NONE]

Results:
map[Output:include/linux/platform_device.h-15-
include/linux/platform_device.h:16:#define PLATFORM_DEVID_NONE	(-1)
include/linux/platform_device.h-17-#define PLATFORM_DEVID_AUTO	(-2)
]

318/4 2026/08/07 16:43 llm repro-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 13148
							output: 42
							thoughts: 532
						

Thoughts:
**My Thought Process on Reproducing the `vimc` Driver Issue**

Okay, so the core of this is figuring out how to reliably reproduce a race condition or some form of instability when interacting with the `vimc` driver. My initial thought, and a common shortcut, would be to just assume if `.id` is 0, the device name will be `vimc.0`. However, as an expert, I know relying on such assumptions is risky, especially when trying to pinpoint subtle bugs.

To be absolutely certain about the device naming convention, the most robust approach is to directly query the system's kernel interface. My mind immediately goes to `/sys/bus/platform/drivers/vimc/`. By reading the contents of this directory, I can look for the symlink that points to the actual device. Alternatively, a general `readdir` operation on that directory and then filtering for entries that *start* with "vimc" would also be a reliable method. I recall writing a small C function for a previous reproducer attempt that did precisely this:

```c
void find_vimc_dev_name(void) {
    DIR *dir = opendir("/sys/bus/platform/drivers/vimc");
    if (!dir) return; // Handle error if directory isn't accessible
    struct dirent *ent;
    while ((ent = readdir(dir)) != NULL) {
        if (strncmp(ent->d_name, "vimc", 4) == 0) {
            strcpy(vimc_dev_name, ent->d_name);
            break; // Found it, exit loop
        }
    }
    closedir(dir);
}
```
This approach completely bypasses any guesswork and directly interrogates the kernel's view of the `vimc` driver, ensuring accuracy.

Now, to refine the reproducer itself, I need to establish a clear sequence of actions. The plan involves three main steps:

1.  **Dynamic Driver Management:** First, I absolutely need to discover the correct name of the `vimc` device. This is the foundational step, as established above.
2.  **Concurrent Unbind/Bind:** Then, I need to simulate a scenario where the `vimc` driver is being repeatedly stopped and started. This is best achieved by launching a dedicated thread that will continuously execute the unbind and bind operations on the `vimc` driver. This is a prime candidate for triggering race conditions.
3.  **Concurrent Device Access:** Simultaneously, I need to put pressure on the sub-devices created by `vimc`. This means initiating multiple threads, each of which will repeatedly open and then immediately close one of the `/dev/v4l-subdevX` devices. This constant churn of opening and closing could expose issues with resource management or state synchronization within the driver.

A crucial question that pops into my head is: how do I guarantee that the `vimc` driver is actually loaded and available in the first place? My initial thought might be to try and open `/dev/video0` or `/dev/v4l-subdev0` to trigger potential autoloading. However, `vimc` is explicitly a test driver, and such drivers are not always designed for automatic loading.

But then I recall the constraints given in the prompt. It explicitly states: "You can assume that all necessary kernel capabilities and privileges (e.g., access to /dev/vhci, ability to load BPF programs, etc.) have already been verified and are available in the environment." Furthermore, the previous probe confirmed: "The environment probe was successful. The vimc driver is available." This means I can confidently assume that the `/sys/bus/platform/drivers/vimc/bind` file exists and the driver is ready for manipulation.

Another important consideration arises: when the `vimc` driver is unbound and then rebound, what happens to the minor numbers assigned to its associated `/dev/v4l-subdevX` devices? When the `vimc` driver is active, it's responsible for creating these sub-devices. Understanding how these minor numbers are managed during the driver's lifecycle is critical, as any inconsistency could lead to the very problems I'm trying to reproduce. I need to investigate the behavior of `vimc` subdevices more closely to anticipate potential issues related to their enumeration and assignment.


319/4 2026/08/07 16:44 tool grepper
0m Args:
map[Expression:v4l2_device_register_subdev PathPrefix:drivers/media/test-drivers/vimc/]

Results:
map[Output:drivers/media/test-drivers/vimc/vimc-common.c=356=int vimc_ent_sd_register(struct vimc_ent_device *ved,
--
drivers/media/test-drivers/vimc/vimc-common.c-407-	/* Register the subdev with the v4l2 and the media framework */
drivers/media/test-drivers/vimc/vimc-common.c:408:	ret = v4l2_device_register_subdev(v4l2_dev, sd);
drivers/media/test-drivers/vimc/vimc-common.c-409-	if (ret) {
--
drivers/media/test-drivers/vimc/vimc-core.c=278=static int vimc_register_devices(struct vimc_device *vimc)
--
drivers/media/test-drivers/vimc/vimc-core.c-314-	/* Expose all subdev's nodes*/
drivers/media/test-drivers/vimc/vimc-core.c:315:	ret = v4l2_device_register_subdev_nodes(&vimc->v4l2_dev);
drivers/media/test-drivers/vimc/vimc-core.c-316-	if (ret) {
]

320/4 2026/08/07 16:44 llm repro-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 14037
							output: 44
							thoughts: 60
						

Thoughts:
**A Deep Dive into Subdevice Node Creation**

Right, so when `v4l2_device_register_subdev_nodes` gets invoked, the first thing that springs to mind is its role in establishing device nodes for video4linux2 (v4l2) subdevices. Specifically, I'm tracking the creation of these `/dev/v4l-subdevX` entries. My understanding is that the minor numbers for these nodes aren't hardcoded; they're assigned dynamically as subdevices are registered. This makes perfect sense, of course, to avoid conflicts and allow for flexible hardware configurations. To really solidify this understanding, the next logical step is to meticulously examine the implementation of `v4l2_device_register_subdev_nodes` itself. I need to see precisely *how* those dynamic minor numbers are managed and how the device nodes are constructed.


321/4 2026/08/07 16:44 tool grepper
0m Args:
map[Expression:video_register_device PathPrefix:drivers/media/v4l2-core/v4l2-device.c]

Results:
map[Output:drivers/media/v4l2-core/v4l2-device.c=191=int __v4l2_device_register_subdev_nodes(struct v4l2_device *v4l2_dev,
--
drivers/media/v4l2-core/v4l2-device.c-223-		sd->devnode = vdev;
drivers/media/v4l2-core/v4l2-device.c:224:		err = __video_register_device(vdev, VFL_TYPE_SUBDEV, -1, 1,
drivers/media/v4l2-core/v4l2-device.c-225-					      sd->owner);
--
drivers/media/v4l2-core/v4l2-device.c-234-
drivers/media/v4l2-core/v4l2-device.c:235:		/* Interface is created by __video_register_device() */
drivers/media/v4l2-core/v4l2-device.c-236-		if (vdev->v4l2_dev->mdev) {
]

322/4 2026/08/07 16:44 llm repro-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 14420
							output: 45
							thoughts: 47
						

Thoughts:
**My Thought Process on `__video_register_device`**

So, I've encountered this `__video_register_device` function and my initial thought is, "Okay, what exactly is this doing, especially in the context of video devices?" Given its name, I'm immediately looking at its role in device registration.

My first hypothesis is that it's responsible for the actual plumbing of registering a video device within the kernel's V4L2 subsystem. Specifically, I'm honing in on the "allocates minor numbers" part. This is a crucial detail. In the Linux device model, minor numbers are how the kernel distinguishes between multiple instances of the same device type. For video devices, this means if I have multiple webcams or capture cards, each one needs its own unique identifier, and that's where minor numbers come in.

To confirm this and understand the specifics, my next logical step is to dive into the source code. I need to see the implementation of `__video_register_device` to verify my assumptions. The path `drivers/media/v4l2-core/v4l2-dev.c` is provided, which is excellent. This tells me I'll be looking within the core V4L2 framework, not a specific driver's implementation. This is where the foundational logic for video device management resides. I'll be scrutinizing this function to see:

*   How it interacts with the general device registration mechanisms in the kernel.
*   The exact process of minor number allocation. Is it using `alloc_chrdev_region`? Is it pre-allocating a range?
*   What other setup it performs for the V4L2 device structure. Does it populate `struct video_device`? Does it associate it with a `struct file_operations`?
*   What are the parameters it takes and what do they signify in terms of the device being registered?

By examining this specific function within the V4L2 core, I expect to gain a clear understanding of its fundamental role in making a video device visible and usable by the system, with the allocation of unique minor numbers being a key part of that process.


323/4 2026/08/07 16:44 tool grepper
0m Args:
map[Expression:__video_register_device PathPrefix:drivers/media/v4l2-core/v4l2-dev.c]

Results:
map[Output:drivers/media/v4l2-core/v4l2-dev.c=817=static int video_register_media_controller(struct video_device *vdev)
--
drivers/media/v4l2-core/v4l2-dev.c-909-
drivers/media/v4l2-core/v4l2-dev.c:910:int __video_register_device(struct video_device *vdev,
drivers/media/v4l2-core/v4l2-dev.c-911-			    enum vfl_devnode_type type,
--
drivers/media/v4l2-core/v4l2-dev.c-1112-}
drivers/media/v4l2-core/v4l2-dev.c:1113:EXPORT_SYMBOL(__video_register_device);
drivers/media/v4l2-core/v4l2-dev.c-1114-
]

324/4 2026/08/07 16:44 llm repro-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 14746
							output: 48
							thoughts: 10
						

Thoughts:
**My Thought Process Regarding Minor Number Allocation**

My immediate impulse is to delve into the mechanics of how "minor numbers" are assigned. I want to understand the underlying system, the criteria, and the potential implications of this allocation process. This isn't a superficial curiosity; as an expert in my field, I recognize that seemingly minor details can often reveal fundamental principles or expose underlying assumptions that are crucial for a comprehensive understanding of our domain. Therefore, my primary objective is to dissect this allocation mechanism, to uncover its logic, and to assess its impact on the broader context.


325/4 2026/08/07 16:44 tool read-file
0m Args:
map[File:drivers/media/v4l2-core/v4l2-dev.c FirstLine:910 LineCount:100]

Results:
map[Contents: 910:	int __video_register_device(struct video_device *vdev,
 911:				    enum vfl_devnode_type type,
 912:				    int nr, int warn_if_nr_in_use,
 913:				    struct module *owner)
 914:	{
 915:		int i = 0;
 916:		int ret;
 917:		int minor_offset = 0;
 918:		int minor_cnt = VIDEO_NUM_DEVICES;
 919:		const char *name_base;
 920:	
 921:		/* A minor value of -1 marks this video device as never
 922:		   having been registered */
 923:		vdev->minor = -1;
 924:	
 925:		/* the release callback MUST be present */
 926:		if (WARN_ON(!vdev->release))
 927:			return -EINVAL;
 928:		/* the v4l2_dev pointer MUST be present */
 929:		if (WARN_ON(!vdev->v4l2_dev))
 930:			return -EINVAL;
 931:		/* the device_caps field MUST be set for all but subdevs */
 932:		if (WARN_ON(type != VFL_TYPE_SUBDEV && !vdev->device_caps))
 933:			return -EINVAL;
 934:		/* the open and release file operations are mandatory */
 935:		if (WARN_ON(!vdev->fops || !vdev->fops->open || !vdev->fops->release))
 936:			return -EINVAL;
 937:	
 938:		/* v4l2_fh support */
 939:		spin_lock_init(&vdev->fh_lock);
 940:		INIT_LIST_HEAD(&vdev->fh_list);
 941:	
 942:		/* Part 1: check device type */
 943:		switch (type) {
 944:		case VFL_TYPE_VIDEO:
 945:			name_base = "video";
 946:			break;
 947:		case VFL_TYPE_VBI:
 948:			name_base = "vbi";
 949:			break;
 950:		case VFL_TYPE_RADIO:
 951:			name_base = "radio";
 952:			break;
 953:		case VFL_TYPE_SUBDEV:
 954:			name_base = "v4l-subdev";
 955:			break;
 956:		case VFL_TYPE_SDR:
 957:			/* Use device name 'swradio' because 'sdr' was already taken. */
 958:			name_base = "swradio";
 959:			break;
 960:		case VFL_TYPE_TOUCH:
 961:			name_base = "v4l-touch";
 962:			break;
 963:		default:
 964:			pr_err("%s called with unknown type: %d\n",
 965:			       __func__, type);
 966:			return -EINVAL;
 967:		}
 968:	
 969:		vdev->vfl_type = type;
 970:		vdev->cdev = NULL;
 971:		if (vdev->dev_parent == NULL)
 972:			vdev->dev_parent = vdev->v4l2_dev->dev;
 973:		if (vdev->ctrl_handler == NULL)
 974:			vdev->ctrl_handler = vdev->v4l2_dev->ctrl_handler;
 975:		/* If the prio state pointer is NULL, then use the v4l2_device
 976:		   prio state. */
 977:		if (vdev->prio == NULL)
 978:			vdev->prio = &vdev->v4l2_dev->prio;
 979:	
 980:		/* Part 2: find a free minor, device node number and device index. */
 981:	#ifdef CONFIG_VIDEO_FIXED_MINOR_RANGES
 982:		/* Keep the ranges for the first four types for historical
 983:		 * reasons.
 984:		 * Newer devices (not yet in place) should use the range
 985:		 * of 128-191 and just pick the first free minor there
 986:		 * (new style). */
 987:		switch (type) {
 988:		case VFL_TYPE_VIDEO:
 989:			minor_offset = 0;
 990:			minor_cnt = 64;
 991:			break;
 992:		case VFL_TYPE_RADIO:
 993:			minor_offset = 64;
 994:			minor_cnt = 64;
 995:			break;
 996:		case VFL_TYPE_VBI:
 997:			minor_offset = 224;
 998:			minor_cnt = 32;
 999:			break;
1000:		default:
1001:			minor_offset = 128;
1002:			minor_cnt = 64;
1003:			break;
1004:		}
1005:	#endif
1006:	
1007:		/* Pick a device node number */
1008:		mutex_lock(&videodev_lock);
1009:		nr = devnode_find(vdev, nr == -1 ? 0 : nr, minor_cnt);
]

326/4 2026/08/07 16:44 llm repro-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 16339
							output: 38
							thoughts: 158
						

Thoughts:
**My Thought Process Regarding the `v4l2-subdev` Crash**

Okay, so I've been digging into this crash report, and I think I'm starting to piece together what's happening. The key seems to be in how device nodes are being managed.

I'm looking at the code, specifically the use of `devnode_find`. My strong suspicion is that this function, as its name implies, is designed to find the *first available* device node number. This is a pretty standard approach for managing resources like this.

Now, if that's the case, then it logically follows that when we perform an "unbind" and then a "bind" operation on a subdevice, those device node numbers are likely to be released and then immediately reused. So, if a subdevice was previously assigned node 0, and then unbound and rebound, it will probably get node 0 again. This cycling through numbers (0, 1, 2, and so on, up to 31 or 63) shouldn't be an issue in itself, because the underlying mechanism is designed to handle this reuse gracefully. The range of numbers isn't the problem; it's how that number is being used or, more accurately, *not* being used when expected.

Let's revisit the specific bug report. I'm seeing the crash occurring at `RIP: 0010:subdev_open+0x193/0x510 drivers/media/v4l2-core/v4l2-subdev.c:115`. The traceback clearly indicates that the problem is `sd->entity.graph_obj.mdev` being NULL.

This `mdev` pointer is what links the subdevice entity to the media device. My investigation shows that this pointer is explicitly set to NULL within the `media_device_unregister_entity` function. This is the critical piece of information.

So, the hypothesis is: an operation is occurring (likely related to unbinding/rebinding or some lifecycle management) where `media_device_unregister_entity` is being called, setting `mdev` to NULL. Subsequently, `subdev_open` is called *before* the `mdev` is properly re-established or before the calling code checks for its validity. This results in the dereferencing of a NULL pointer, leading to the crash. The fact that `devnode_find` reuses numbers is probably a red herring; the core issue is the invalid `mdev` state when `subdev_open` is invoked.


327/4 2026/08/07 16:44 tool grepper
0m Args:
map[Expression:media_device_unregister_entity PathPrefix:drivers/media/mc/mc-device.c]

Results:
map[Output:drivers/media/mc/mc-device.c=570=static void media_device_release(struct media_devnode *devnode)
--
drivers/media/mc/mc-device.c-574-
drivers/media/mc/mc-device.c:575:static void __media_device_unregister_entity(struct media_entity *entity)
drivers/media/mc/mc-device.c-576-{
--
drivers/media/mc/mc-device.c=605=int __must_check media_device_register_entity(struct media_device *mdev,
--
drivers/media/mc/mc-device.c-655-		if (ret) {
drivers/media/mc/mc-device.c:656:			__media_device_unregister_entity(entity);
drivers/media/mc/mc-device.c-657-			mutex_unlock(&mdev->graph_mutex);
--
drivers/media/mc/mc-device.c=667=EXPORT_SYMBOL_GPL(media_device_register_entity);
drivers/media/mc/mc-device.c-668-
drivers/media/mc/mc-device.c:669:void media_device_unregister_entity(struct media_entity *entity)
drivers/media/mc/mc-device.c-670-{
--
drivers/media/mc/mc-device.c-676-	mutex_lock(&mdev->graph_mutex);
drivers/media/mc/mc-device.c:677:	__media_device_unregister_entity(entity);
drivers/media/mc/mc-device.c-678-	mutex_unlock(&mdev->graph_mutex);
drivers/media/mc/mc-device.c-679-}
drivers/media/mc/mc-device.c:680:EXPORT_SYMBOL_GPL(media_device_unregister_entity);
drivers/media/mc/mc-device.c-681-
--
drivers/media/mc/mc-device.c=791=EXPORT_SYMBOL_GPL(media_device_register_entity_notify);
--
drivers/media/mc/mc-device.c-795- */
drivers/media/mc/mc-device.c:796:static void __media_device_unregister_entity_notify(struct media_device *mdev,
drivers/media/mc/mc-device.c-797-					struct media_entity_notify *nptr)
--
drivers/media/mc/mc-device.c-801-
drivers/media/mc/mc-device.c:802:void media_device_unregister_entity_notify(struct media_device *mdev,
drivers/media/mc/mc-device.c-803-					struct media_entity_notify *nptr)
--
drivers/media/mc/mc-device.c-805-	mutex_lock(&mdev->graph_mutex);
drivers/media/mc/mc-device.c:806:	__media_device_unregister_entity_notify(mdev, nptr);
drivers/media/mc/mc-device.c-807-	mutex_unlock(&mdev->graph_mutex);
drivers/media/mc/mc-device.c-808-}
drivers/media/mc/mc-device.c:809:EXPORT_SYMBOL_GPL(media_device_unregister_entity_notify);
drivers/media/mc/mc-device.c-810-
drivers/media/mc/mc-device.c=811=void media_device_unregister(struct media_device *mdev)
--
drivers/media/mc/mc-device.c-833-	list_for_each_entry_safe(entity, next, &mdev->entities, graph_obj.list)
drivers/media/mc/mc-device.c:834:		__media_device_unregister_entity(entity);
drivers/media/mc/mc-device.c-835-
--
drivers/media/mc/mc-device.c-837-	list_for_each_entry_safe(notify, nextp, &mdev->entity_notify, list)
drivers/media/mc/mc-device.c:838:		__media_device_unregister_entity_notify(mdev, notify);
drivers/media/mc/mc-device.c-839-
]

328/4 2026/08/07 16:44 llm repro-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 17603
							output: 39
							thoughts: 14
						

Thoughts:
**My Thought Process Regarding `__media_device_unregister_entity`**

Alright, so my immediate objective here is to delve into the `__media_device_unregister_entity` function. I need to understand precisely what this function is responsible for, its inputs, its outputs, and the underlying mechanisms it employs to achieve its goal. Given my expertise in this domain, I'm not just looking for a surface-level description; I expect a deep dive into the implications and the "why" behind its design. I'll be scrutinizing its role within the broader media device management framework, paying close attention to how it interacts with other components, particularly those responsible for device registration and state management. I anticipate uncovering how it handles potential race conditions or resource leaks, and I'll be evaluating its efficiency and robustness. Ultimately, I want to be able to articulate the critical function this entity plays in the lifecycle management of media devices, ensuring a clean and orderly removal from the system.


329/4 2026/08/07 16:44 tool read-file
0m Args:
map[File:drivers/media/mc/mc-device.c FirstLine:575 LineCount:30]

Results:
map[Contents: 575:	static void __media_device_unregister_entity(struct media_entity *entity)
 576:	{
 577:		struct media_device *mdev = entity->graph_obj.mdev;
 578:		struct media_link *link, *tmp;
 579:		struct media_interface *intf;
 580:		struct media_pad *iter;
 581:	
 582:		ida_free(&mdev->entity_internal_idx, entity->internal_idx);
 583:	
 584:		/* Remove all interface links pointing to this entity */
 585:		list_for_each_entry(intf, &mdev->interfaces, graph_obj.list) {
 586:			list_for_each_entry_safe(link, tmp, &intf->links, list) {
 587:				if (link->entity == entity)
 588:					__media_remove_intf_link(link);
 589:			}
 590:		}
 591:	
 592:		/* Remove all data links that belong to this entity */
 593:		__media_entity_remove_links(entity);
 594:	
 595:		/* Remove all pads that belong to this entity */
 596:		media_entity_for_each_pad(entity, iter)
 597:			media_gobj_destroy(&iter->graph_obj);
 598:	
 599:		/* Remove the entity */
 600:		media_gobj_destroy(&entity->graph_obj);
 601:	
 602:		/* invoke entity_notify callbacks to handle entity removal?? */
 603:	}
 604:	
]

330/4 2026/08/07 16:44 llm repro-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 18112
							output: 37
							thoughts: 16
						

Thoughts:
**My Internal Monologue on `media_gobj_destroy`**

Ah, yes, `media_gobj_destroy`. As I delve into its workings, my immediate observation, the very first thing that registers in my mind, is its rather direct approach to resource cleanup. It’s not one for lingering or leaving dangling pointers, is it? No, the primary, and frankly, most critical action this function performs, is the immediate nullification of `mdev`.

This isn't just a superficial assignment; it's a deliberate act of severing the link, of ensuring that any subsequent attempts to access the device object through that `mdev` pointer will correctly indicate that it's no longer valid. It's a robust defensive programming measure. By setting `mdev` to NULL, the function preemptively handles potential use-after-free scenarios. If some other part of the system, perhaps erroneously or due to a race condition, tries to dereference `mdev` after `media_gobj_destroy` has been called, it will immediately encounter a NULL pointer. This, as any seasoned engineer will appreciate, is far preferable to a crash caused by accessing invalid memory. It’s a clean, predictable failure mode that signals a logic error, rather than a cryptic corruption. It’s the difference between a clear "stop" sign and a catastrophic engine failure. This single act, the setting of `mdev` to NULL, is the linchpin of its deallocation strategy, setting the stage for whatever other cleanup might occur.


331/4 2026/08/07 16:44 tool grepper
0m Args:
map[Expression:media_gobj_destroy PathPrefix:drivers/media/mc/mc-device.c]

Results:
map[Output:drivers/media/mc/mc-device.c=575=static void __media_device_unregister_entity(struct media_entity *entity)
--
drivers/media/mc/mc-device.c-596-	media_entity_for_each_pad(entity, iter)
drivers/media/mc/mc-device.c:597:		media_gobj_destroy(&iter->graph_obj);
drivers/media/mc/mc-device.c-598-
drivers/media/mc/mc-device.c-599-	/* Remove the entity */
drivers/media/mc/mc-device.c:600:	media_gobj_destroy(&entity->graph_obj);
drivers/media/mc/mc-device.c-601-
--
drivers/media/mc/mc-device.c=811=void media_device_unregister(struct media_device *mdev)
--
drivers/media/mc/mc-device.c-848-		__media_remove_intf_links(intf);
drivers/media/mc/mc-device.c:849:		media_gobj_destroy(&intf->graph_obj);
drivers/media/mc/mc-device.c-850-	}
]

332/4 2026/08/07 16:44 llm repro-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 18467
							output: 21
							thoughts: 12
						

Thoughts:
**My Thought Process on `media_gobj_destroy`**

Right, so I'm looking at `media_gobj_destroy` here. My initial reaction is to understand its purpose, its role within the broader media object management system. I want to know *why* this function exists and what it's *supposed* to achieve. Is it simply about freeing memory? Or is there more to it – perhaps cleaning up associated resources, notifying other components, or handling reference counting?

My next step is to dissect the function signature and its parameters. What information does it receive? Is it a pointer to the media object itself, an identifier, or perhaps some flags that dictate the destruction process? Understanding these inputs is crucial to grasping the context of its operation. I'm mentally tracing how the caller would interact with this function.

Then, I dive into the implementation details. I'm scrutinizing the code line by line. I'm looking for the core logic: memory deallocation, obviously, but also any checks or assertions that ensure the object is in a valid state for destruction. Are there any conditional branches? What are they based on, and what are the implications of taking each path?

I'm particularly interested in potential side effects. Does this function interact with shared resources? Are there any locks or synchronization mechanisms that need to be managed correctly? Could there be race conditions if multiple threads or processes are attempting to destroy the same object or related objects concurrently? This is a critical area for an expert like myself, as resource contention and deadlocks are common pitfalls.

I'm also thinking about error handling. What happens if the destruction fails for some reason? Does it return an error code? Does it log a message? Or does it silently fail, potentially leading to resource leaks or corrupted states later on? I'm looking for robustness and how gracefully it handles unexpected scenarios.

Furthermore, I'm considering the broader system architecture. How does `media_gobj_destroy` fit into the lifecycle of media objects? Is it called as part of a normal shutdown sequence, or is it invoked in response to specific events or errors? Understanding its trigger points helps me assess its strategic importance.

Finally, I'm thinking about potential optimizations or alternative approaches. Is this the most efficient way to destroy a media object? Are there opportunities for deferred destruction, reference counting strategies that could simplify its usage, or even more sophisticated resource management techniques? This function, while seemingly straightforward, can reveal a lot about the underlying design philosophy and the trade-offs made during its development.


333/4 2026/08/07 16:44 tool grepper
0m Args:
map[Expression:void media_gobj_destroy]

Results:
map[Output:drivers/media/mc/mc-entity.c=142=void media_gobj_create(struct media_device *mdev,
--
drivers/media/mc/mc-entity.c-172-
drivers/media/mc/mc-entity.c:173:void media_gobj_destroy(struct media_gobj *gobj)
drivers/media/mc/mc-entity.c-174-{
--
include/media/media-entity.h=681=void media_gobj_create(struct media_device *mdev,
--
include/media/media-entity.h-692- */
include/media/media-entity.h:693:void media_gobj_destroy(struct media_gobj *gobj);
include/media/media-entity.h-694-
]

334/4 2026/08/07 16:44 llm repro-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 18701
							output: 39
							thoughts: 12
						

Thoughts:
**My Thought Process Upon Reviewing `media_gobj_destroy`**

Alright, I need to get a handle on what `media_gobj_destroy` is doing. My primary goal is to understand its role in the lifecycle of a media object, specifically how it cleans up resources and ensures we're not leaking anything.

First off, I'm scanning the function signature. What arguments does it take? What's the return type? This immediately tells me the scope of its operation and any potential side effects or outcomes I need to be aware of. Is it a simple cleanup, or does it trigger further actions?

Then, I'll dive into the body of the function. I'm looking for key operations:

*   **Resource Deallocation:** This is paramount. I'm hunting for calls to `free`, `delete`, `close`, or any other resource management functions. What specific types of resources are being released? This could include memory buffers, file handles, network connections, graphics contexts, or anything else tied to the media object's existence. I need to be absolutely certain that *everything* that was allocated for this media object is being properly accounted for and released here.

*   **State Management:** What internal state does this function modify? Is it simply marking the object as invalid or destroyed, or does it reset pointers and flags? I'm keen to understand how the object's internal representation changes after this function executes.

*   **Dependency Cleanup:** Does this `media_gobj_destroy` function itself call other destroy or cleanup functions for related objects or sub-components? If this media object has a complex structure with nested components, I need to trace those dependencies to ensure a complete and cascaded cleanup.

*   **Error Handling:** How does it handle potential errors during deallocation? Does it log them? Does it return an error code? For a destructor, robust error handling might be less common, but I'll still be looking for any defensive programming or checks.

*   **Null Pointer Checks:** Does it defensively check if pointers it's trying to free are already NULL? This is good practice and indicates a level of maturity in the code.

*   **Reference Counting/Ownership:** Is there any indication of reference counting or ownership management? If this object is shared, how does `media_gobj_destroy` interact with that system? Is it the definitive point where ownership is relinquished and the object is truly gone?

Essentially, I'm performing a mental walkthrough. For every resource acquired *before* this function, I expect to see a corresponding release *within* this function. I'm looking for any potential shortcuts, missed cleanup paths, or scenarios where resources might be double-freed or left dangling. The goal is to ensure that calling `media_gobj_destroy` leaves the system in a clean, predictable state, with no lingering memory or resource leaks attributable to this media object.


335/4 2026/08/07 16:44 tool read-file
0m Args:
map[File:drivers/media/mc/mc-entity.c FirstLine:173 LineCount:10]

Results:
map[Contents: 173:	void media_gobj_destroy(struct media_gobj *gobj)
 174:	{
 175:		/* Do nothing if the object is not linked. */
 176:		if (gobj->mdev == NULL)
 177:			return;
 178:	
 179:		dev_dbg_obj(__func__, gobj);
 180:	
 181:		gobj->mdev->topology_version++;
 182:	
]

336/4 2026/08/07 16:44 llm repro-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 18881
							output: 39
							thoughts: 6
						

Thoughts:
**My Deep Dive into the Nuances of the Subject**

Alright, the initial read is complete. My mind is now sifting through the information presented. I'm trying to establish a foundational understanding of the core concepts, looking for the central arguments and any immediately apparent anomalies or points of contention. It's like laying out the pieces of a puzzle, getting a feel for their shapes and colors, even if I don't yet see the full picture.

I'm specifically focusing on identifying the author's primary thesis or objective. What are they trying to convey, prove, or explore? I'm also mentally cataloging the key evidence or reasoning they employ to support their claims. Are these logical deductions, empirical data, established theories, or perhaps something more novel? As an expert, I'm naturally inclined to evaluate the *quality* of this support – is it robust, well-cited, and does it hold up to scrutiny?

Simultaneously, I'm beginning to anticipate potential implications. Where does this information lead? What are the downstream effects of these ideas? I'm looking for connections to broader fields, existing research, or even practical applications within my own domain. This is where the "expert" lens really kicks in – I'm not just absorbing; I'm contextualizing and analyzing from a position of established knowledge.

I'm also making a mental note of areas that feel underdeveloped or where I have immediate questions. Is there a gap in the explanation? Is a particular assumption not fully justified? These are the seeds of deeper inquiry, the points where my intellectual curiosity is piqued and where I'll likely want to direct further reading or analysis. It's a process of building a mental framework, and I'm actively seeking out both the solid beams and the potential weak points.

In short, my thought process is one of active, critical engagement. I'm not just passively receiving information; I'm dissecting it, evaluating it, and beginning to integrate it with my existing understanding. The goal is to move beyond a surface-level comprehension to a nuanced, insightful grasp of the subject matter. And right now, all signs point to the need for a deeper exploration.


337/4 2026/08/07 16:44 tool read-file
0m Args:
map[File:drivers/media/mc/mc-entity.c FirstLine:183 LineCount:10]

Results:
map[Contents: 183:		/* Remove the object from mdev list */
 184:		list_del(&gobj->list);
 185:	
 186:		gobj->mdev = NULL;
 187:	}
 188:	
 189:	/*
 190:	 * TODO: Get rid of this.
 191:	 */
 192:	#define MEDIA_ENTITY_MAX_PADS		512
]

338/4 2026/08/07 16:44 llm repro-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 19044
							output: 44
							thoughts: 3683
						

Thoughts:
**Understanding and Reproducing a Kernel Race Condition**

My thought process in tackling this issue began with identifying a specific kernel race condition. The core of the problem lies in the interaction between two concurrent operations: `subdev_open` and `v4l2_device_unregister_subdev`.

I observed that the critical moment of the race occurs when, during the unregistration of a media device entity (which happens when a subdevice is unbound from its driver), the `media_gobj_destroy` function sets `gobj->mdev = NULL;`. This happens *after* a check in `subdev_open` that looks for `sd->v4l2_dev->mdev && sd->entity.graph_obj.mdev->dev`. If `gobj->mdev` is set to `NULL` between the check and the access, it leads to a NULL pointer dereference, a classic kernel panic.

To trigger this, I realized I needed a mechanism to repeatedly unbind and bind the `vimc` device while simultaneously hammering open calls to the `/dev/v4l-subdevX` nodes. The `vimc` driver is a good candidate because it's known to create multiple V4L2 subdevices, increasing the chances of hitting the race.

This led me to the idea of crafting a reproducer program. The fundamental structure involves two types of threads: one responsible for the bind/unbind cycle and another for the repeated opening of subdevice nodes.

My initial thoughts on the `find_vimc_dev_name` function were focused on locating the `vimc` device within the `/sys/bus/platform/drivers/vimc` directory. However, I quickly refined this by realizing that the device might not always be bound to its driver. A more robust approach would be to search in `/sys/bus/platform/devices/` as the device entry there persists regardless of its binding state. This led me to implement a safer lookup that correctly identifies the device name, defaulting if necessary but providing informative messages.

For the bind/unbind thread, the goal is to interact with the `/sys/bus/platform/drivers/vimc/bind` and `/sys/bus/platform/drivers/vimc/unbind` sysfs entries. I correctly identified the need to open these files in write-only mode and to handle potential errors during opening, exiting the program if these critical sysfs interfaces cannot be accessed. The loop then involves writing the device name to the `unbind` file, introducing a small delay (`usleep(1000)`), writing to the `bind` file, and then a longer delay (`usleep(10000)`) before repeating.

I paid close attention to the prompt's requirement for rigorous error checking. For operations like `open` on the `/dev/v4l-subdevX` nodes, I determined that exiting on failure would be counterproductive, as these opens are expected to fail frequently due to the dynamic nature of subdevice creation and destruction in this race condition. Similarly, `write` operations to the bind/unbind sysfs files might fail if the device is already in the target state (e.g., already unbound when trying to unbind). Therefore, I decided to ignore `write` errors in the bind/unbind loop, as these are indicative of the race condition's state rather than a critical failure of the reproducer itself.

For the `open_thread`, the strategy is straightforward: iterate through a range of potential minor numbers for `/dev/v4l-subdevX` and attempt to open each one. If an open succeeds, the file descriptor is immediately closed. This creates a high volume of `open` and `close` calls on these devices.

The main function orchestrates the setup: finding the `vimc` device name, creating the bind/unbind thread, and then spawning multiple `open` threads. A `sleep(10)` is included at the end to allow the reproducer to run for a sufficient duration before exiting, giving the kernel race condition ample time to manifest.

Throughout this process, I constantly cross-referenced the code with the kernel's behavior (`subdev_open` and `v4l2_device_unregister_subdev`) and the specific requirements of the prompt, refining the error handling and device identification logic to ensure the reproducer was both effective and compliant. I also considered alternative drivers but settled on `vimc` due to its suitability and common availability.


339/4 2026/08/07 16:45 tool grepper
0m Args:
map[Expression:v4l2_device_register_subdev_nodes PathPrefix:drivers/media/test-drivers/vimc/]

Results:
map[Output:drivers/media/test-drivers/vimc/vimc-core.c=278=static int vimc_register_devices(struct vimc_device *vimc)
--
drivers/media/test-drivers/vimc/vimc-core.c-314-	/* Expose all subdev's nodes*/
drivers/media/test-drivers/vimc/vimc-core.c:315:	ret = v4l2_device_register_subdev_nodes(&vimc->v4l2_dev);
drivers/media/test-drivers/vimc/vimc-core.c-316-	if (ret) {
]

340/4 2026/08/07 16:45 llm repro-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 22923
							output: 42
							thoughts: 43
						

Thoughts:
**A Deep Dive into Subdevice Node Management**

Right, so my initial thought process is driven by a specific function call I've identified: `v4l2_device_register_subdev_nodes`. This immediately makes me wonder about the lifecycle and management of these subdevice nodes. My immediate next step, therefore, is to investigate how these nodes are cleaned up and removed. Specifically, I want to confirm if the `vimc` (Video Input Multiplexer Controller, I presume, given the context of V4L2) driver employs the corresponding unregistration function, `v4l2_device_unregister_subdev`. This is a critical check to ensure proper resource management and to prevent potential issues like dangling pointers or orphaned devices within the V4L2 framework when `vimc` is being unloaded or is going through its lifecycle. I'm essentially tracing the allocation and deallocation path to ensure a robust and predictable system behavior.


341/4 2026/08/07 16:45 tool grepper
0m Error:
log-in to see details

Args:
map[Expression:v4l2_device_unregister_subdev PathPrefix:drivers/media/test-drivers/vimc/]

Results:
map[Output:]

342/4 2026/08/07 16:45 llm repro-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 23006
							output: 39
							thoughts: 38
						

Thoughts:
**My Thought Process Regarding `vimc` Subdev Unregistration**

My initial thought, upon encountering a scenario involving `vimc` and subdevice unregistration, was one of surprise and immediate curiosity. I found myself asking, "Wait, `vimc` doesn't call `v4l2_device_unregister_subdev` directly?" This struck me as potentially counter-intuitive, as in many contexts, one might expect a direct, explicit call to a core unregistration function when dismantling a component like a subdevice.

This unexpected observation immediately triggered a deeper investigative process. My next mental step was to shift from assumption to verification. I needed to understand the actual mechanism at play. Therefore, my immediate follow-up thought was, "Let's see how it unregisters subdevs." This signifies my intention to delve into the `vimc` code or relevant documentation to trace the precise sequence of events and function calls that handle subdevice unregistration within that specific framework. I was looking to understand the *actual* implementation, not just what I might have initially expected. My goal was to map out the control flow and identify the intermediate layers or alternative mechanisms that `vimc` employs, rather than a direct call to the `v4l2_device_unregister_subdev` function. This would likely involve examining how `vimc` manages its internal device structure and how that structure interacts with the broader V4L2 subsystem for unregistration purposes.


343/4 2026/08/07 16:45 tool grepper
0m Error:
log-in to see details

Args:
map[Expression:vimc_ent_sd_unregister PathPrefix:drivers/media/test-drivers/vimc/]

Results:
map[Output:]

344/4 2026/08/07 16:45 llm repro-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 23081
							output: 37
							thoughts: 13
						

Thoughts:
**My Thought Process on `vimc` Device Unregistration**

Ah, so my immediate curiosity is piqued by `vimc` – specifically, how does it handle the unregistration of devices? I need to delve into the mechanics of this process. I'm anticipating a structured approach within the `vimc` framework, likely involving specific API calls or internal functions designed for this very purpose. My expectation is that it won't be a haphazard removal, but rather a deliberate and controlled uncoupling. I'll be looking for mechanisms that ensure a clean break, preventing any lingering dependencies or unexpected behaviors after a device is no longer managed by `vimc`. This likely involves not just removing the device's presence from `vimc`'s internal state, but also potentially signaling to any related components or services that the device is no longer available. I'll be sifting through the code, or perhaps documentation, to pinpoint the exact functions responsible for this "unregistration" event and understand the lifecycle management `vimc` employs for its managed devices.


345/4 2026/08/07 16:45 tool grepper
0m Error:
log-in to see details

Args:
map[Expression:vimc_unregister_devices PathPrefix:drivers/media/test-drivers/vimc/]

Results:
map[Output:]

346/4 2026/08/07 16:45 llm repro-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 23129
							output: 38
							thoughts: 17
						

Thoughts:
**My Thought Process on Unregistering in `vimc_core.c`**

Alright, so the immediate objective is to locate the implementation for the `unregister` functionality. My first instinct is to dive straight into `vimc_core.c` because, logically, the core functions of the `vimc` module are likely to reside there. This file often serves as the central hub for many critical operations, and unregistering is certainly a fundamental administrative task. I'm anticipating finding a function name that clearly indicates its purpose, perhaps something along the lines of `vimc_unregister`, `unregister_vimc_client`, or similar. I'll be scanning the code for these keywords, and if they aren't immediately obvious, I'll broaden my search to include common patterns for resource deallocation or deregistration within C codebases. My expectation is to find a function that takes some form of identifier or handle to the registered entity and then proceeds to dismantle its associated resources and remove it from any internal tracking structures.


347/4 2026/08/07 16:45 tool grepper
0m Args:
map[Expression:unregister PathPrefix:drivers/media/test-drivers/vimc/vimc-core.c]

Results:
map[Output:drivers/media/test-drivers/vimc/vimc-core.c=226=static void vimc_release_subdevs(struct vimc_device *vimc)
--
drivers/media/test-drivers/vimc/vimc-core.c-234-
drivers/media/test-drivers/vimc/vimc-core.c:235:static void vimc_unregister_subdevs(struct vimc_device *vimc)
drivers/media/test-drivers/vimc/vimc-core.c-236-{
--
drivers/media/test-drivers/vimc/vimc-core.c-239-	for (i = 0; i < vimc->pipe_cfg->num_ents; i++)
drivers/media/test-drivers/vimc/vimc-core.c:240:		if (vimc->ent_devs[i] && vimc->pipe_cfg->ents[i].type->unregister)
drivers/media/test-drivers/vimc/vimc-core.c:241:			vimc->pipe_cfg->ents[i].type->unregister(vimc->ent_devs[i]);
drivers/media/test-drivers/vimc/vimc-core.c-242-}
--
drivers/media/test-drivers/vimc/vimc-core.c=244=static int vimc_add_subdevs(struct vimc_device *vimc)
--
drivers/media/test-drivers/vimc/vimc-core.c-258-			vimc->ent_devs[i] = NULL;
drivers/media/test-drivers/vimc/vimc-core.c:259:			vimc_unregister_subdevs(vimc);
drivers/media/test-drivers/vimc/vimc-core.c-260-			vimc_release_subdevs(vimc);
--
drivers/media/test-drivers/vimc/vimc-core.c=278=static int vimc_register_devices(struct vimc_device *vimc)
--
drivers/media/test-drivers/vimc/vimc-core.c-292-		ret = -ENOMEM;
drivers/media/test-drivers/vimc/vimc-core.c:293:		goto err_v4l2_unregister;
drivers/media/test-drivers/vimc/vimc-core.c-294-	}
--
drivers/media/test-drivers/vimc/vimc-core.c-319-			ret);
drivers/media/test-drivers/vimc/vimc-core.c:320:		goto err_mdev_unregister;
drivers/media/test-drivers/vimc/vimc-core.c-321-	}
--
drivers/media/test-drivers/vimc/vimc-core.c-324-
drivers/media/test-drivers/vimc/vimc-core.c:325:err_mdev_unregister:
drivers/media/test-drivers/vimc/vimc-core.c:326:	media_device_unregister(&vimc->mdev);
drivers/media/test-drivers/vimc/vimc-core.c-327-err_rm_subdevs:
drivers/media/test-drivers/vimc/vimc-core.c:328:	vimc_unregister_subdevs(vimc);
drivers/media/test-drivers/vimc/vimc-core.c-329-	vimc_release_subdevs(vimc);
--
drivers/media/test-drivers/vimc/vimc-core.c-331-	kfree(vimc->ent_devs);
drivers/media/test-drivers/vimc/vimc-core.c:332:err_v4l2_unregister:
drivers/media/test-drivers/vimc/vimc-core.c:333:	v4l2_device_unregister(&vimc->v4l2_dev);
drivers/media/test-drivers/vimc/vimc-core.c-334-
--
drivers/media/test-drivers/vimc/vimc-core.c=387=static void vimc_remove(struct platform_device *pdev)
--
drivers/media/test-drivers/vimc/vimc-core.c-392-
drivers/media/test-drivers/vimc/vimc-core.c:393:	vimc_unregister_subdevs(vimc);
drivers/media/test-drivers/vimc/vimc-core.c:394:	media_device_unregister(&vimc->mdev);
drivers/media/test-drivers/vimc/vimc-core.c:395:	v4l2_device_unregister(&vimc->v4l2_dev);
drivers/media/test-drivers/vimc/vimc-core.c-396-	v4l2_device_put(&vimc->v4l2_dev);
--
drivers/media/test-drivers/vimc/vimc-core.c=416=static int __init vimc_init(void)
--
drivers/media/test-drivers/vimc/vimc-core.c-431-			"platform driver registration failed (err=%d)\n", ret);
drivers/media/test-drivers/vimc/vimc-core.c:432:		platform_device_unregister(&vimc_pdev);
drivers/media/test-drivers/vimc/vimc-core.c-433-		return ret;
--
drivers/media/test-drivers/vimc/vimc-core.c=439=static void __exit vimc_exit(void)
drivers/media/test-drivers/vimc/vimc-core.c-440-{
drivers/media/test-drivers/vimc/vimc-core.c:441:	platform_driver_unregister(&vimc_pdrv);
drivers/media/test-drivers/vimc/vimc-core.c-442-
drivers/media/test-drivers/vimc/vimc-core.c:443:	platform_device_unregister(&vimc_pdev);
drivers/media/test-drivers/vimc/vimc-core.c-444-}
]

348/4 2026/08/07 16:45 llm repro-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 24730
							output: 39
							thoughts: 35
						

Thoughts:
**My Thought Process Regarding `vimc_unregister_subdevs`**

Okay, so I'm looking at this `vimc_unregister_subdevs` function, and it seems to be calling `type->unregister`. My immediate instinct is to drill down and understand what this `type->unregister` actually *does*. Given the context of `vimc`, I'm betting that `type` here refers to some sort of device or subsystem type, and `unregister` is its specific cleanup routine. To get a clearer picture, I need to find where `type->unregister` is defined or implemented. My next logical step is to check the `vimc_common.c` file, as that's where common utility functions and definitions for the VimC framework are likely to reside. I'm expecting to find the definition of `type` and, more importantly, the implementation of the `unregister` operation associated with it within that file. This will tell me the specific actions taken when a subdevice of this type is being taken offline.


349/4 2026/08/07 16:45 tool grepper
0m Error:
log-in to see details

Args:
map[Expression:vimc_ent_sd_unregister PathPrefix:drivers/media/test-drivers/vimc/]

Results:
map[Output:]

350/4 2026/08/07 16:45 llm repro-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 24802
							output: 34
							thoughts: 12
						

Thoughts:
**My Thought Process**

Ah, I'm curious about this `type->unregister` operation. I need to understand exactly what it does. My immediate thought is to delve into its definition, to see how it's implemented and what its intended purpose is within the system. I want to grasp its mechanics – what are the inputs, what are the outputs, and what state changes does it trigger? Understanding its behavior is key to ensuring I'm using it correctly and that it aligns with my overall understanding of the system's architecture.


351/4 2026/08/07 16:45 tool grepper
0m Args:
map[Expression:\.unregister = PathPrefix:drivers/media/test-drivers/vimc/]

Results:
map[Output:drivers/media/test-drivers/vimc/vimc-capture.c=489=const struct vimc_ent_type vimc_capture_type = {
drivers/media/test-drivers/vimc/vimc-capture.c-490-	.add = vimc_capture_add,
drivers/media/test-drivers/vimc/vimc-capture.c:491:	.unregister = vimc_capture_unregister,
drivers/media/test-drivers/vimc/vimc-capture.c-492-	.release = vimc_capture_release
]

352/4 2026/08/07 16:45 llm repro-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 24984
							output: 37
							thoughts: 15
						

Thoughts:
**My Thought Process Regarding Sensor Unregistration**

My immediate inclination is to look for a function that explicitly handles the unregistration of sensors. I'm thinking along the lines of a naming convention like `vimc_sensor_unregister` or something very similar, implying a direct counterpart to a registration function. This suggests a pattern where a sensor is first registered, and then later, its registration needs to be explicitly undone. I'd be searching for a function that takes a sensor identifier or handle as an argument and performs the necessary cleanup and deallocation associated with removing that sensor from whatever system it's currently a part of.


353/4 2026/08/07 16:45 tool grepper
0m Args:
map[Expression:vimc_.*_unregister PathPrefix:drivers/media/test-drivers/vimc/]

Results:
map[Output:drivers/media/test-drivers/vimc/vimc-capture.c=333=static void vimc_capture_release(struct vimc_ent_device *ved)
--
drivers/media/test-drivers/vimc/vimc-capture.c-341-
drivers/media/test-drivers/vimc/vimc-capture.c:342:static void vimc_capture_unregister(struct vimc_ent_device *ved)
drivers/media/test-drivers/vimc/vimc-capture.c-343-{
--
drivers/media/test-drivers/vimc/vimc-capture.c=489=const struct vimc_ent_type vimc_capture_type = {
drivers/media/test-drivers/vimc/vimc-capture.c-490-	.add = vimc_capture_add,
drivers/media/test-drivers/vimc/vimc-capture.c:491:	.unregister = vimc_capture_unregister,
drivers/media/test-drivers/vimc/vimc-capture.c-492-	.release = vimc_capture_release
]

354/4 2026/08/07 16:45 llm repro-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 25306
							output: 38
							thoughts: 31
						

Thoughts:
**My Internal Monologue Unraveling a Specific Technical Nuance**

Right, so I was digging into some code, likely related to video capture or processing within a Linux kernel module, given the `vimc_` prefix. My initial assumption, or perhaps a fleeting thought based on context or a prior lookup, was that `vimc_capture` was a "subdev." For those of us deeply entrenched in the V4L2 (Video for Linux Two) framework, "subdevs" represent a specific type of hardware entity, often a discrete component like an image sensor or a video decoder, managed by the core V4L2 API.

However, a moment of critical reflection or a quick glance at the surrounding code immediately triggered a correction. My internal thought process flagged this: "Wait a minute, `vimc_capture` is *not* a subdev." This realization is significant because the way a component is classified dictates how it's interacted with, the APIs it exposes, and its role within the larger system architecture. A video node, on the other hand, typically represents a device that can *produce* or *consume* video streams directly, often through `read()`/`write()` or `mmap()` operations, and is usually associated with the main V4L2 device file.

To confirm and solidify this corrected understanding, my immediate next step was to investigate the source code file `vimc_sensor.c`. This is a logical move for several reasons:

1.  **Contextual Clues:** The filename `vimc_sensor.c` strongly suggests it will contain definitions and logic related to image sensors or components that interface with them. If `vimc_capture` is indeed related to sensor data acquisition, this file would be the prime location to find its implementation details.
2.  **Clarification of Role:** By examining `vimc_sensor.c`, I would be looking for how `vimc_capture` is defined, how it's initialized, and what operations it supports. This would confirm whether it acts as a direct video stream source (a video node) or if it's a management entity for a sensor that *then* feeds into a video node.
3.  **Distinguishing from Subdevs:** I'd be specifically searching for evidence of it *not* being registered as a V4L2 subdevice. The V4L2 API has clear functions for registering subdevices (`v4l2_device_register_subdev`) and video devices. Seeing the absence of subdev registration, and perhaps the presence of video node creation or stream management logic, would definitively confirm my correction.

In essence, this thought process is about a refinement of understanding. I started with an assumption, quickly identified it as potentially flawed, and then immediately initiated a targeted investigation to verify the correct classification and understand the implications of that classification within the video driver framework. It's a cycle of hypothesis, verification, and deeper understanding.


355/4 2026/08/07 16:45 tool grepper
0m Error:
log-in to see details

Args:
map[Expression:unregister PathPrefix:drivers/media/test-drivers/vimc/vimc-sensor.c]

Results:
map[Output:]

356/4 2026/08/07 16:45 llm repro-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 25373
							output: 38
							thoughts: 33
						

Thoughts:
**A Deep Dive into VIMC Sensor Unregistration and Entity Type**

My immediate thought is a moment of surprise, bordering on concern: "Wait, `vimc_sensor.c` doesn't have `unregister`?" This is a critical function for resource management and proper cleanup, and its absence in what I perceive as a core sensor implementation file immediately raises a flag. It suggests a potential gap in how the VIMC (Virtual Machine Communication, I presume) sensor is being managed. Is there a deliberate design choice here, or is it an oversight that could lead to resource leaks or unpredictable behavior down the line?

To address this, my next logical step, the immediate follow-up to that initial query, is to investigate the `vimc_ent_type` definition. I'm hoping that by understanding the nature of the entity types that the VIMC sensor deals with, I can gain insight into why an `unregister` function might be missing, or perhaps where the unregistration logic *is* handled if it's not directly within `vimc_sensor.c`.

My thought process here is one of investigation and problem-solving. I've identified a potential issue and am now drilling down into the underlying definitions to understand the context. I'm not just looking for a direct answer; I'm seeking to comprehend the *why* behind the observed behavior. This could involve:

*   **Understanding the lifecycle of VIMC entities:** Are they ephemeral, managed by a higher-level component, or do they have a distinct, independent lifecycle that necessitates explicit unregistration?
*   **Identifying alternative unregistration mechanisms:** Perhaps the unregistration is handled in a different file or module, or it's tied to the lifecycle of a broader VIMC component.
*   **Assessing the implications of the missing `unregister`:** If there truly isn't an explicit unregistration mechanism, what are the potential consequences? Are resources dynamically allocated and deallocated within the sensor's operational scope, or are they managed externally?

Ultimately, my goal is to ensure the robustness and correctness of the VIMC sensor implementation. This initial observation and subsequent investigation into `vimc_ent_type` are crucial steps in achieving that. I need to confirm that the absence of a direct `unregister` function in `vimc_sensor.c` is either a non-issue due to alternative management strategies or a critical area that requires immediate attention and potential refactoring.


357/4 2026/08/07 16:45 tool grepper
0m Args:
map[Expression:struct vimc_ent_type PathPrefix:drivers/media/test-drivers/vimc/]

Results:
map[Output:drivers/media/test-drivers/vimc/vimc-capture.c=389=static struct vimc_ent_device *vimc_capture_add(struct vimc_device *vimc,
--
drivers/media/test-drivers/vimc/vimc-capture.c-488-
drivers/media/test-drivers/vimc/vimc-capture.c:489:const struct vimc_ent_type vimc_capture_type = {
drivers/media/test-drivers/vimc/vimc-capture.c-490-	.add = vimc_capture_add,
--
drivers/media/test-drivers/vimc/vimc-common.h=136=struct vimc_device {
--
drivers/media/test-drivers/vimc/vimc-common.h-143-/**
drivers/media/test-drivers/vimc/vimc-common.h:144: * struct vimc_ent_type		Structure for the callbacks of the entity types
drivers/media/test-drivers/vimc/vimc-common.h-145- *
--
drivers/media/test-drivers/vimc/vimc-common.h-152- */
drivers/media/test-drivers/vimc/vimc-common.h:153:struct vimc_ent_type {
drivers/media/test-drivers/vimc/vimc-common.h-154-	struct vimc_ent_device *(*add)(struct vimc_device *vimc,
--
drivers/media/test-drivers/vimc/vimc-common.h=168=struct vimc_ent_config {
drivers/media/test-drivers/vimc/vimc-common.h-169-	const char *name;
drivers/media/test-drivers/vimc/vimc-common.h:170:	const struct vimc_ent_type *type;
drivers/media/test-drivers/vimc/vimc-common.h-171-};
--
drivers/media/test-drivers/vimc/vimc-common.h=209=bool vimc_is_source(struct media_entity *ent);
drivers/media/test-drivers/vimc/vimc-common.h-210-
drivers/media/test-drivers/vimc/vimc-common.h:211:extern const struct vimc_ent_type vimc_sensor_type;
drivers/media/test-drivers/vimc/vimc-common.h:212:extern const struct vimc_ent_type vimc_debayer_type;
drivers/media/test-drivers/vimc/vimc-common.h:213:extern const struct vimc_ent_type vimc_scaler_type;
drivers/media/test-drivers/vimc/vimc-common.h:214:extern const struct vimc_ent_type vimc_capture_type;
drivers/media/test-drivers/vimc/vimc-common.h:215:extern const struct vimc_ent_type vimc_lens_type;
drivers/media/test-drivers/vimc/vimc-common.h-216-
--
drivers/media/test-drivers/vimc/vimc-debayer.c=559=static struct vimc_ent_device *vimc_debayer_add(struct vimc_device *vimc,
--
drivers/media/test-drivers/vimc/vimc-debayer.c-608-
drivers/media/test-drivers/vimc/vimc-debayer.c:609:const struct vimc_ent_type vimc_debayer_type = {
drivers/media/test-drivers/vimc/vimc-debayer.c-610-	.add = vimc_debayer_add,
--
drivers/media/test-drivers/vimc/vimc-lens.c=89=static void vimc_lens_release(struct vimc_ent_device *ved)
--
drivers/media/test-drivers/vimc/vimc-lens.c-99-
drivers/media/test-drivers/vimc/vimc-lens.c:100:const struct vimc_ent_type vimc_lens_type = {
drivers/media/test-drivers/vimc/vimc-lens.c-101-	.add = vimc_lens_add,
--
drivers/media/test-drivers/vimc/vimc-scaler.c=387=static struct vimc_ent_device *vimc_scaler_add(struct vimc_device *vimc,
--
drivers/media/test-drivers/vimc/vimc-scaler.c-418-
drivers/media/test-drivers/vimc/vimc-scaler.c:419:const struct vimc_ent_type vimc_scaler_type = {
drivers/media/test-drivers/vimc/vimc-scaler.c-420-	.add = vimc_scaler_add,
--
drivers/media/test-drivers/vimc/vimc-sensor.c=419=static struct vimc_ent_device *vimc_sensor_add(struct vimc_device *vimc,
--
drivers/media/test-drivers/vimc/vimc-sensor.c-503-
drivers/media/test-drivers/vimc/vimc-sensor.c:504:const struct vimc_ent_type vimc_sensor_type = {
drivers/media/test-drivers/vimc/vimc-sensor.c-505-	.add = vimc_sensor_add,
]

358/4 2026/08/07 16:45 llm repro-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 26802
							output: 45
							thoughts: 12
						

Thoughts:
**My Thought Process on `vimc_sensor_type`**

Right, so I'm looking at this `vimc_sensor_type`. My immediate inclination is to understand its fundamental role and how it fits into the broader `vimc` ecosystem. I'm thinking about its definition, its potential values, and crucially, its implications for data interpretation and downstream analysis.

First, I'm trying to grasp the "what" of it. What exactly does `vimc_sensor_type` represent? Is it a categorical variable? Does it denote the physical origin of the data (e.g., a specific instrument, a particular satellite, a ground-based station)? Or perhaps it signifies a functional classification – what the sensor is designed to measure (e.g., temperature, pressure, spectral band)? The nomenclature suggests a classification, and I'm mentally running through possible enumerations.

Then, I'm considering the "why." Why is this field necessary? What problem does it solve? I'm assuming it's there to disambiguate data. If `vimc` aggregates information from multiple sources or multiple types of measurements, differentiating them is paramount. Without this, I imagine it would be incredibly difficult to filter, aggregate, or apply sensor-specific calibrations or processing algorithms. It's likely a key element in ensuring data provenance and quality control.

From an expert's perspective, I'm also thinking about the potential for complexity. Are there different levels of granularity within `vimc_sensor_type`? For instance, could it distinguish between a "satellite" and a more specific "Landsat 8 OLI sensor"? Or could it simply be "optical"? The level of detail will dictate how finely I can subset or analyze the data.

Furthermore, I'm anticipating the implications for metadata. If `vimc_sensor_type` is defined, I'd expect there to be corresponding metadata fields that elaborate on each type. This could include instrument characteristics, calibration coefficients, spectral response functions, or retrieval algorithms associated with each sensor. My internal checklist immediately flags the need to explore those relationships.

Finally, I'm considering the practical use cases. How would *I* use `vimc_sensor_type` in my work? I'd be looking to isolate data from specific instruments for comparative studies, to understand temporal trends from a consistent measurement source, or to identify potential biases introduced by particular sensor characteristics. It's a filter, a grouping mechanism, and a potential source of analytical insight all rolled into one. I'm essentially dissecting its potential to inform my data handling and interpretation strategies.


359/4 2026/08/07 16:46 tool read-file
0m Args:
map[File:drivers/media/test-drivers/vimc/vimc-sensor.c FirstLine:504 LineCount:10]

Results:
map[Contents: 504:	const struct vimc_ent_type vimc_sensor_type = {
 505:		.add = vimc_sensor_add,
 506:		.release = vimc_sensor_release
 507:	};
]

360/4 2026/08/07 16:46 llm repro-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 26920
							output: 45
							thoughts: 209
						

Thoughts:
**My Thought Process Unraveling Subdevice Unregistration**

Okay, so I'm looking at this `vimc` code, and my first thought is, "Huh, there's no explicit `unregister` function on the `vimc` structure itself." That immediately raises a flag. If the main `vimc` device itself doesn't have a way to cleanly unregister its subdevices, how is that process actually handled? It feels like a missing piece.

My next instinct is to dive deeper into the existing unregistration logic I can see. I'm looking at `vimc_unregister_subdevs`. I trace through the loop, and I see this conditional: `if (vimc->ent_devs[i] && vimc->pipe_cfg->ents[i].type->unregister)`. And then it calls `vimc->pipe_cfg->ents[i].type->unregister(vimc->ent_devs[i])`. The crucial part here is that `unregister` pointer. My realization dawns: if that `unregister` function pointer within the subdevice's type definition is `NULL`, the `if` condition will fail, and this particular subdevice simply won't have its `unregister` function called *through this path*. It's a passive check, not an active unregistration from the `vimc`'s perspective.

This then leads to a more pointed question: If `vimc_unregister_subdevs` *can* effectively do nothing for a subdevice if its `unregister` function pointer is null, then how is `v4l2_device_unregister_subdev` actually getting invoked? Where is the concrete call to the V4L2 framework's unregistration mechanism happening? This is the core of my current confusion. I need to find the actual trigger for the V4L2 framework's `unregister_subdev` function. My immediate next step is to examine the `vimc_release_subdevs` function. That seems like the logical place where the broader cleanup, including interaction with the V4L2 core, would occur.


361/4 2026/08/07 16:46 tool read-file
0m Args:
map[File:drivers/media/test-drivers/vimc/vimc-core.c FirstLine:226 LineCount:10]

Results:
map[Contents: 226:	static void vimc_release_subdevs(struct vimc_device *vimc)
 227:	{
 228:		unsigned int i;
 229:	
 230:		for (i = 0; i < vimc->pipe_cfg->num_ents; i++)
 231:			if (vimc->ent_devs[i])
 232:				vimc->pipe_cfg->ents[i].type->release(vimc->ent_devs[i]);
 233:	}
 234:	
 235:	static void vimc_unregister_subdevs(struct vimc_device *vimc)
]

362/4 2026/08/07 16:46 llm repro-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 27346
							output: 45
							thoughts: 12
						

Thoughts:
**My Thought Process on `vimc_sensor_release`**

Right, so the first thing on my mind is to get a handle on this `vimc_sensor_release`. I need to know what it does, what its purpose is, and how it fits into the broader picture of our sensor management or release process. I'll be looking for its core functionality: is it about deploying new sensor versions, managing the lifecycle of existing sensors, or perhaps handling the release of data generated by sensors? I'm anticipating it might involve some form of version control or a system for approving and distributing sensor updates.

I'll need to dig into its parameters and expected inputs. What information does `vimc_sensor_release` require to operate effectively? Is it expecting specific sensor identifiers, version numbers, configuration files, or perhaps release notes? Understanding these inputs is crucial for me to even begin thinking about how to interact with it, let alone how to use it in a complex workflow.

Then, of course, there's the output. What does it produce? Does it return a status code, a log of actions taken, updated sensor metadata, or perhaps a pointer to the released artifacts? The nature of its output will dictate what I can do with the result of its execution. Can I directly consume it for subsequent steps, or will I need to parse or interpret it further?

Beyond the immediate function, I'm curious about its dependencies. What other components, libraries, or services does `vimc_sensor_release` rely on? Knowing this is vital for ensuring a stable and predictable execution environment. I'll also be thinking about potential failure points and error handling. What could go wrong, and how does it signal those issues? This is where I'll be looking for robust error messages, exit codes, or perhaps more sophisticated logging mechanisms to help me diagnose and resolve problems.

Ultimately, I'm trying to build a mental model of `vimc_sensor_release`. I want to understand its role, its mechanics, and its implications so I can confidently integrate it into whatever process I'm currently developing or troubleshooting. It's about establishing a clear understanding of its capabilities and limitations.


363/4 2026/08/07 16:46 tool read-file
0m Args:
map[File:drivers/media/test-drivers/vimc/vimc-sensor.c FirstLine:408 LineCount:10]

Results:
map[Contents: 408:	};
 409:	
 410:	static const struct v4l2_ctrl_config vimc_sensor_ctrl_osd_mode = {
 411:		.ops = &vimc_sensor_ctrl_ops,
 412:		.id = VIMC_CID_OSD_TEXT_MODE,
 413:		.name = "Show Information",
 414:		.type = V4L2_CTRL_TYPE_MENU,
 415:		.max = ARRAY_SIZE(vimc_ctrl_osd_mode_strings) - 2,
 416:		.qmenu = vimc_ctrl_osd_mode_strings,
 417:	};
]

364/4 2026/08/07 16:46 llm repro-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 27584
							output: 43
							thoughts: 14
						

Thoughts:
**My Thought Process for Locating `vimc_sensor_release`**

Right, the immediate task at hand is to pinpoint the exact location of `vimc_sensor_release`. My internal knowledge base suggests this is a critical function, likely within a core module, but I need to confirm its precise path for integration or further analysis. I'm thinking about the typical conventions for naming and organization within our project structure. It's likely to be in a directory related to sensor management or device drivers, given the name. I'll start by performing a targeted search across the codebase, prioritizing directories known for hardware interaction and sensor abstraction layers. The `vimc_` prefix also hints at a specific subsystem or framework, so I'll be keeping an eye out for related components that might house this function. My goal is to not just find it, but to understand its immediate context and dependencies, which will inform my subsequent actions.


365/4 2026/08/07 16:46 tool grepper
0m Args:
map[Expression:vimc_sensor_release PathPrefix:drivers/media/test-drivers/vimc/vimc-sensor.c]

Results:
map[Output:drivers/media/test-drivers/vimc/vimc-sensor.c=370=static const struct v4l2_ctrl_ops vimc_sensor_ctrl_ops = {
--
drivers/media/test-drivers/vimc/vimc-sensor.c-373-
drivers/media/test-drivers/vimc/vimc-sensor.c:374:static void vimc_sensor_release(struct vimc_ent_device *ved)
drivers/media/test-drivers/vimc/vimc-sensor.c-375-{
--
drivers/media/test-drivers/vimc/vimc-sensor.c=504=const struct vimc_ent_type vimc_sensor_type = {
drivers/media/test-drivers/vimc/vimc-sensor.c-505-	.add = vimc_sensor_add,
drivers/media/test-drivers/vimc/vimc-sensor.c:506:	.release = vimc_sensor_release
drivers/media/test-drivers/vimc/vimc-sensor.c-507-};
]

366/4 2026/08/07 16:46 llm repro-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 27903
							output: 45
							thoughts: 12
						

Thoughts:
**My Thought Process Regarding `vimc_sensor_release`**

Alright, so I'm diving into `vimc_sensor_release` now. My initial reaction is to understand its purpose, its role within the broader system. What is this "sensor release" referring to? Is it a physical sensor, a logical one, a reporting mechanism? I need to ascertain the context before I can even begin to unpack its implementation.

My immediate next step is to trace the execution flow. Where does this function get called from? What are its dependencies? Understanding its call stack is crucial for grasping how it integrates into the larger operational pipeline. I'll be looking for any upstream data or signals that trigger it, and downstream effects or data that it produces.

I'll then scrutinize the input parameters. What information does `vimc_sensor_release` expect? Are these parameters validated? What are the expected data types and ranges? A thorough understanding of the inputs will tell me a lot about what kind of "release" event it's designed to handle.

Following that, the core logic of the function is paramount. What are the actual operations being performed? Is it a simple flag flip, a complex data aggregation, a communication to another service, or something more involved? I'll be looking for any conditional branches, loops, or external interactions within its body. This is where the "how" of the release is defined.

Simultaneously, I'll be paying close attention to error handling. What happens if something goes wrong within `vimc_sensor_release`? Are exceptions caught and logged appropriately? Are there fallback mechanisms? Robust error management is a hallmark of well-designed systems, and I'll be evaluating this aspect closely.

Furthermore, I need to consider the side effects. Does this function modify any global state? Does it interact with persistent storage? Are there any asynchronous operations involved? Any side effects can have ripple effects throughout the system, so I need to be aware of them.

Finally, I'll be thinking about performance implications. Is this function a performance bottleneck? Are there any optimizations that could be made? Given its name, "release" might imply an event that needs to be handled with a certain degree of responsiveness, so performance is definitely on my mind.

In essence, my approach is to systematically deconstruct `vimc_sensor_release`, moving from its high-level purpose down to the granular details of its implementation, all while keeping an eye on its integration, reliability, and efficiency within the system.


367/4 2026/08/07 16:46 tool read-file
0m Args:
map[File:drivers/media/test-drivers/vimc/vimc-sensor.c FirstLine:374 LineCount:10]

Results:
map[Contents: 374:	static void vimc_sensor_release(struct vimc_ent_device *ved)
 375:	{
 376:		struct vimc_sensor_device *vsensor =
 377:			container_of(ved, struct vimc_sensor_device, ved);
 378:	
 379:		v4l2_ctrl_handler_free(&vsensor->hdl);
 380:		tpg_free(&vsensor->tpg);
 381:		v4l2_subdev_cleanup(&vsensor->sd);
 382:		media_entity_cleanup(vsensor->ved.ent);
 383:		kfree(vsensor);
]

368/4 2026/08/07 16:46 llm repro-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 28136
							output: 47
							thoughts: 45
						

Thoughts:
**A Deep Dive into Subdevice Unregistration in the V4L2 Framework**

I'm finding myself in a bit of a labyrinth regarding how subdevices within the Video4Linux2 (V4L2) framework are actually unregistered. My current understanding, or rather my initial thought, was that `v4l2_device_unregister_subdev` was the canonical function for this purpose. However, upon closer inspection – or perhaps a subtle oversight in my initial mental model – it appears this specific function isn't being invoked in the scenarios I'm examining.

This discrepancy immediately triggers a cascade of questions. If `v4l2_device_unregister_subdev` isn't the mechanism at play, then what is? What is the *actual* process that leads to a subdevice being cleanly removed from the system? This is a critical point for ensuring proper resource management and preventing potential issues.

My next logical step, therefore, is to pivot my investigation. I need to trace the unregistration flow from a higher level. My attention is now firmly fixed on the `v4l2_device_unregister` function. My hypothesis is that the removal of a subdevice is likely a consequence of, or perhaps implicitly handled within, the broader unregistration of the parent V4L2 device itself. I need to meticulously examine the implementation of `v4l2_device_unregister` to understand if and how it iterates through its registered subdevices and initiates their teardown. This exploration will be key to unraveling the complete unregistration lifecycle and clarifying my understanding of the V4L2 architecture.


369/4 2026/08/07 16:46 tool grepper
0m Args:
map[Expression:v4l2_device_unregister PathPrefix:drivers/media/v4l2-core/v4l2-device.c]

Results:
map[Output:drivers/media/v4l2-core/v4l2-device.c=86=EXPORT_SYMBOL_GPL(v4l2_device_disconnect);
drivers/media/v4l2-core/v4l2-device.c-87-
drivers/media/v4l2-core/v4l2-device.c:88:void v4l2_device_unregister(struct v4l2_device *v4l2_dev)
drivers/media/v4l2-core/v4l2-device.c-89-{
--
drivers/media/v4l2-core/v4l2-device.c-99-	list_for_each_entry_safe(sd, next, &v4l2_dev->subdevs, list) {
drivers/media/v4l2-core/v4l2-device.c:100:		v4l2_device_unregister_subdev(sd);
drivers/media/v4l2-core/v4l2-device.c-101-		if (sd->flags & V4L2_SUBDEV_FL_IS_I2C)
--
drivers/media/v4l2-core/v4l2-device.c-108-}
drivers/media/v4l2-core/v4l2-device.c:109:EXPORT_SYMBOL_GPL(v4l2_device_unregister);
drivers/media/v4l2-core/v4l2-device.c-110-
--
drivers/media/v4l2-core/v4l2-device.c=261=EXPORT_SYMBOL_GPL(__v4l2_device_register_subdev_nodes);
drivers/media/v4l2-core/v4l2-device.c-262-
drivers/media/v4l2-core/v4l2-device.c:263:void v4l2_device_unregister_subdev(struct v4l2_subdev *sd)
drivers/media/v4l2-core/v4l2-device.c-264-{
--
drivers/media/v4l2-core/v4l2-device.c-294-}
drivers/media/v4l2-core/v4l2-device.c:295:EXPORT_SYMBOL_GPL(v4l2_device_unregister_subdev);
]

370/4 2026/08/07 16:46 llm repro-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 28816
							output: 39
							thoughts: 306
						

Thoughts:
**My Thought Process Regarding the VIMC Unregistration Sequence**

It appears I've stumbled upon a subtle, yet critical, aspect of the VIMC driver's unregistration process, and my initial understanding, while seemingly logical, needs a crucial correction. My thought process initially centered on the interaction between `v4l2_device_unregister` and its subdevice unregistration.

My first thought was: "Ah! `v4l2_device_unregister` is designed to iterate through all registered subdevices and call `v4l2_device_unregister_subdev` for each one. And in the `vimc_remove` function, there's a call to `v4l2_device_unregister(&vimc->v4l2_dev)`. This implies that when the VIMC device is unbound, `v4l2_device_unregister` will indeed be invoked, which in turn will trigger the unregistration of all its associated entities via `v4l2_device_unregister_subdev`. This sequence seems perfectly sound and directly addresses the race condition I was concerned about."

I then decided to meticulously verify this assumption by examining the `vimc_remove` function directly. My mental check involved looking for the explicit call to `v4l2_device_unregister`. Upon reviewing the code:

```c
static void vimc_remove(struct platform_device *pdev)
{
	struct vimc_device *vimc = platform_get_drvdata(pdev);

	dev_dbg(&pdev->dev, "remove");

	vimc_unregister_subdevs(vimc);
	media_device_unregister(&vimc->mdev); // <-- This line caught my attention
	v4l2_device_unregister(&vimc->v4l2_dev);
	v4l2_device_put(&vimc->v4l2_dev);
}
```

This is where my train of thought took a sharp turn. I noticed that `media_device_unregister(&vimc->mdev)` is called *before* `v4l2_device_unregister(&vimc->v4l2_dev)`. This ordering is significant and contradicts my initial assumption that `v4l2_device_unregister` was the primary trigger for entity unregistration in this specific context. The fact that `media_device_unregister` precedes the `v4l2_device_unregister` call suggests that the unregistration of the media entity itself might be handled differently or earlier in the sequence than I first anticipated. This necessitates a deeper dive into the behavior of `media_device_unregister` to fully comprehend the unregistration flow and its implications for the race condition.


371/4 2026/08/07 16:46 tool read-file
0m Args:
map[File:drivers/media/mc/mc-device.c FirstLine:811 LineCount:30]

Results:
map[Contents: 811:	void media_device_unregister(struct media_device *mdev)
 812:	{
 813:		struct media_entity *entity;
 814:		struct media_entity *next;
 815:		struct media_interface *intf, *tmp_intf;
 816:		struct media_entity_notify *notify, *nextp;
 817:	
 818:		if (mdev == NULL)
 819:			return;
 820:	
 821:		mutex_lock(&mdev->graph_mutex);
 822:	
 823:		/* Check if mdev was ever registered at all */
 824:		if (!media_devnode_is_registered(mdev->devnode)) {
 825:			mutex_unlock(&mdev->graph_mutex);
 826:			return;
 827:		}
 828:	
 829:		/* Clear the devnode register bit to avoid races with media dev open */
 830:		media_devnode_unregister_prepare(mdev->devnode);
 831:	
 832:		/* Remove all entities from the media device */
 833:		list_for_each_entry_safe(entity, next, &mdev->entities, graph_obj.list)
 834:			__media_device_unregister_entity(entity);
 835:	
 836:		/* Remove all entity_notify callbacks from the media device */
 837:		list_for_each_entry_safe(notify, nextp, &mdev->entity_notify, list)
 838:			__media_device_unregister_entity_notify(mdev, notify);
 839:	
 840:		/* Remove all interfaces from the media device */
]

372/4 2026/08/07 16:46 llm repro-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 29626
							output: 39
							thoughts: 144
						

Thoughts:
**My Thought Process Unpacking Media Device Unregistration**

Okay, so my initial observation is that `media_device_unregister` appears to be the primary function responsible for kicking off the unregistration of all associated entities. It seems to be the direct caller of `__media_device_unregister_entity`, and crucially, it's the one that's actually nullifying `gobj->mdev`. This is a key detail; it's the point where the media device pointer within the graph object is cleared.

Following that, I see that `v4l2_device_unregister` gets called. This, in turn, triggers `v4l2_device_unregister_subdev`. Now, here's an interesting part – `v4l2_device_unregister_subdev` *also* calls `media_device_unregister_entity`. My immediate concern here is potential double-unregistration or some kind of race condition. However, I recall that `media_device_unregister_entity` has a safeguard in place. It explicitly checks if the entity has already been unregistered. This means that even though it's called again, the subsequent call within `v4l2_device_unregister_subdev` should be safe, effectively a no-op if the entity is already in a detached state.

This brings me to a more precise question about the internal workings of `media_device_unregister_entity` itself. I need to confirm the exact condition it uses for this safety check. Specifically, I'm wondering if it's indeed checking `entity->graph_obj.mdev == NULL`. This would make perfect sense, as that's the very field that `media_device_unregister` is setting to NULL. So, to be absolutely sure about the flow and the protective mechanism, I need to dive into the source code for `media_device_unregister_entity` and verify this specific check.


373/4 2026/08/07 16:46 tool read-file
0m Args:
map[File:drivers/media/mc/mc-device.c FirstLine:669 LineCount:15]

Results:
map[Contents: 669:	void media_device_unregister_entity(struct media_entity *entity)
 670:	{
 671:		struct media_device *mdev = entity->graph_obj.mdev;
 672:	
 673:		if (mdev == NULL)
 674:			return;
 675:	
 676:		mutex_lock(&mdev->graph_mutex);
 677:		__media_device_unregister_entity(entity);
 678:		mutex_unlock(&mdev->graph_mutex);
 679:	}
 680:	EXPORT_SYMBOL_GPL(media_device_unregister_entity);
 681:	
 682:	#ifdef CONFIG_DEBUG_FS
 683:	/*
]

374/4 2026/08/07 16:46 llm repro-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 30011
							output: 43
							thoughts: 1559
						

Thoughts:
**The Subtle Race: `media_device_unregister` vs. `subdev_open`**

Yes, I see it now. The race condition I've been wrestling with is indeed present, just manifesting through a slightly different path. My initial focus was on the `v4l2_device_unregister_subdev` function. However, it appears that `media_device_unregister`, which is called within `vimc_remove`, leads to `__media_device_unregister_entity` and subsequently `media_gobj_destroy`. It's in `media_gobj_destroy` that the critical line `gobj->mdev = NULL;` is executed.

This creates the exact same race scenario as before: one thread is in `subdev_open`, attempting to access `sd->v4l2_dev->mdev->dev`, while another thread, via `media_device_unregister`, is nullifying `gobj->mdev` (which corresponds to `sd->v4l2_dev->mdev` in this context). The unbind/bind loop in the reproducer is precisely what triggers this.

Let me re-examine the reproducer code to confirm my understanding.

*   The `find_vimc_dev_name` function correctly identifies the `vimc` device name from `/sys/bus/platform/devices`. This ensures that if the device is present, we're targeting the right one for the bind/unbind operations.
*   The `bind_unbind_thread` opens `/sys/bus/platform/drivers/vimc/bind` and `/sys/bus/platform/drivers/vimc/unbind`. It then repeatedly unbinds and binds the `vimc` device using its name. The `usleep` calls are there to provide some timing variation, increasing the likelihood of hitting the race.
*   The `open_thread` repeatedly attempts to open various `/dev/v4l-subdevX` devices. This is the operation that can potentially race with the unregistration.
*   The `main` function orchestrates this by first finding the `vimc` device name, then creating the bind/unbind thread, and finally spawning multiple `open_thread` instances. A short `sleep(10)` at the end is just to let the threads run for a while before the program exits.

Now, a thought crosses my mind: what if the `vimc` driver isn't actually loaded when the system checks for `/sys/bus/platform/drivers/vimc/bind`? If `vimc` is loaded, that bind path exists. If it's not, it doesn't. The reproducer's check of this path succeeded, meaning `vimc` *is* loaded.

If `vimc` is loaded, it should create a platform device entry in `/sys/bus/platform/devices/` during its `vimc_init`. If it's *not* there, perhaps the device creation is failing. But `vimc` explicitly creates it in `vimc_init`, so it *should* be present.

Another consideration: do we need to explicitly ensure the subdev nodes are created? When `vimc` is bound, it *does* create these subdev nodes. Looking at `vimc_register_devices`, it registers the `v4l2_dev`, `mdev`, and then calls `vimc_add_subdevs`. This `vimc_add_subdevs` function adds various subdevices (sensor, debayer, scaler, capture, etc.). Crucially, it then calls `v4l2_device_register_subdev_nodes`, confirming that the subdev nodes are indeed created.

What about the possibility of exceeding the minor numbers? If we repeatedly unbind and bind, could the minor numbers for the subdev nodes increase beyond what the `open_thread` is checking (up to 63)? I previously checked `devnode_find` and recalled it reuses minor numbers. I should probably double-check that detail to be absolutely certain.


375/4 2026/08/07 16:46 tool grepper
0m Args:
map[Expression:devnode_find PathPrefix:drivers/media/v4l2-core/v4l2-dev.c]

Results:
map[Output:drivers/media/v4l2-core/v4l2-dev.c=136=static inline void devnode_clear(struct video_device *vdev)
--
drivers/media/v4l2-core/v4l2-dev.c-141-/* Try to find a free device node number in the range [from, to> */
drivers/media/v4l2-core/v4l2-dev.c:142:static inline int devnode_find(struct video_device *vdev, int from, int to)
drivers/media/v4l2-core/v4l2-dev.c-143-{
--
drivers/media/v4l2-core/v4l2-dev.c=910=int __video_register_device(struct video_device *vdev,
--
drivers/media/v4l2-core/v4l2-dev.c-1008-	mutex_lock(&videodev_lock);
drivers/media/v4l2-core/v4l2-dev.c:1009:	nr = devnode_find(vdev, nr == -1 ? 0 : nr, minor_cnt);
drivers/media/v4l2-core/v4l2-dev.c-1010-	if (nr == minor_cnt)
drivers/media/v4l2-core/v4l2-dev.c:1011:		nr = devnode_find(vdev, 0, minor_cnt);
drivers/media/v4l2-core/v4l2-dev.c-1012-	if (nr == minor_cnt) {
]

376/4 2026/08/07 16:46 llm repro-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 32015
							output: 47
							thoughts: 10
						

Thoughts:
**My Thought Process on `devnode_find`**

Alright, the task at hand is to dissect `devnode_find`. My initial inclination is to dive right into the code, and that's precisely what I'm about to do. I need to understand its purpose, how it operates, and what its implications are within the broader system.

My primary objective with `devnode_find` is to grasp its fundamental function: what is it designed to *find*, and in what context? Is it searching for specific device nodes, or a more general category? I'll be paying close attention to the parameters it accepts – these will be crucial in defining the search criteria. What kind of identifiers does it use? Are we talking about major/minor numbers, names, properties, or something else entirely?

As I begin to trace the execution flow, I'll be looking for the core logic. What data structures is `devnode_find` interacting with? Is it traversing a linked list, a tree, a hash table, or something more specialized? I anticipate it will involve iterating through some form of device registry or device list. I'm keen to see how it handles the actual matching process. Does it employ exact matches, pattern matching, or a more nuanced comparison based on attributes?

Error handling will be another critical area for me. What happens if the device node isn't found? What are the possible error codes or return values? A robust `devnode_find` should provide clear indications of failure and potentially some diagnostic information. Conversely, what are the success conditions? What does it return when it *does* find what it's looking for? Is it a pointer to the device structure, a handle, or something else?

I'll also be considering the performance implications. If this function is called frequently, its efficiency will be paramount. Are there any optimizations in place? Is it designed for quick lookups, or is it a more exhaustive search? The underlying data structures and algorithms will directly inform this.

Finally, I want to understand the broader architectural context. Where does `devnode_find` fit into the overall device management subsystem? What other functions or modules rely on it, and what are their expectations? This will help me form a complete picture of its significance.

So, in essence, my approach is to systematically unpack `devnode_find` by first understanding its "what" and "why," then delving into its "how" through code analysis, paying close attention to data interactions, error handling, performance, and its place within the larger system.


377/4 2026/08/07 16:47 tool read-file
0m Args:
map[File:drivers/media/v4l2-core/v4l2-dev.c FirstLine:142 LineCount:10]

Results:
map[Contents: 142:	static inline int devnode_find(struct video_device *vdev, int from, int to)
 143:	{
 144:		return find_next_zero_bit(devnode_bits(vdev->vfl_type), to, from);
 145:	}
 146:	
 147:	struct video_device *video_device_alloc(void)
 148:	{
 149:		return kzalloc_obj(struct video_device);
 150:	}
 151:	EXPORT_SYMBOL(video_device_alloc);
]

378/4 2026/08/07 16:47 llm repro-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 32225
							output: 1087
							thoughts: 3322
						

Thoughts:
**My Thought Process in Crafting the Reproducer**

Right, so the core of this is about triggering a race condition. I've been looking at how the system uses bitmaps and specifically the `find_next_zero_bit` function. This is crucial because it dictates how minor numbers are assigned. Given that `vimc` typically creates a small number of subdevices, say around 5, the minor numbers will likely remain in a very low range, like 0 to 4, or perhaps up to 10 if other devices are involved. Therefore, iterating from 0 to 64 is more than sufficient and will comfortably cover all potential assignments.

Next, I needed to ensure the `write` operations to `/sys/bus/platform/drivers/vimc/bind` and `/sys/bus/platform/drivers/vimc/unbind` were handled correctly. The provided snippet:

```c
        if (write(unbind_fd, vimc_dev_name, strlen(vimc_dev_name)) < 0) {
            // Ignore errors, might already be unbound
        }
        usleep(1000);
        if (write(bind_fd, vimc_dev_name, strlen(vimc_dev_name)) < 0) {
            // Ignore errors
        }
        usleep(10000);
```

seems fine in its intent.

Then I had a moment of concern: could the `open` system call itself block? If it did, it could lead to a thread getting stuck, which is obviously undesirable for a reproducer aiming to create contention. The solution here is straightforward: use the `O_NONBLOCK` flag during the `open` call, like so:

```c
            int fd = open(dev_name, O_RDWR | O_NONBLOCK);
```

This makes the `open` call non-blocking and therefore safer in a high-concurrency scenario.

Now, let's revisit the reproducer requirements:

*   "Every system call (e.g., socket, bind, listen, connect, ioctl, send) must check for a failure return value."
*   "If a call fails, it must print a specific error message including the function name and the error string (use strerror(errno)), and then exit with a non-zero status."
*   "The program must print a message after every successful major step."

I've gone through and added checks for system calls like `opendir`, `open` (for bind/unbind operations), and `pthread_create`.

A key point here is how to handle expected failures. For instance, when opening `/dev/v4l-subdevX` in the brute-force loop, it's *expected* that many of these will fail (e.g., with `ENOENT` if the device doesn't exist). I shouldn't be exiting on these specific errors. Similarly, the `write` operations to bind/unbind might fail if the device is already in the desired state.

This brings me back to the strict wording: "Every system call ... must check for a failure return value. If a call fails, it must print ... and then exit". This is a bit of a tightrope walk. If I check `write` and it fails with, say, `ENODEV` (meaning it's already unbound), and I then exit, I'm not going to be able to test the bind operation.

My initial thought was to just ignore these specific expected errors. But that might not satisfy the rule. So, I considered a pragmatic approach: check the `write` calls, but allow specific, expected error codes like `ENODEV` (device not found, implying it's unbound) or `EBUSY` (device busy, implying it's already bound).

```c
        ssize_t ret = write(unbind_fd, vimc_dev_name, strlen(vimc_dev_name));
        if (ret < 0 && errno != ENODEV && errno != EBUSY) { // Allowing ENODEV and EBUSY
            printf("[-] write unbind failed: %s\n", strerror(errno));
            exit(1);
        }
```

This seems like a good compromise. The prompt also mentions that `write` to `unbind` might return `ENODEV` if the device doesn't exist at all. This is also covered by my modified check.

For the `open` calls on `/dev/v4l-subdevX`, since it's a brute-force enumeration, `ENOENT`, `ENODEV`, and `ENXIO` are all anticipated failures. The rule's intent seems to be about ensuring that *setup* calls that *should* succeed don't fail silently. For the device enumeration, failure is the norm. I decided to keep it simple: if `open` succeeds, I close it. I won't explicitly check for errors *within* the loop for `/dev/v4l-subdevX` because it's expected to fail for most `i`.

Thinking about the race itself, the critical window is extremely narrow. It's in `subdev_open` between checking `sd->v4l2_dev->mdev` and `sd->entity.graph_obj.mdev->dev`. To maximize the chance of hitting this, I should make the bind/unbind operations as frequent as possible. This means minimizing or removing `usleep` calls.

However, if I remove all sleeps, the `open` threads might not get a chance to execute before the `vimc` device is unregistered again. So, a small `usleep` (like 1ms) after binding seems like a good balance – it gives the `open` threads a brief window to start their work while keeping the bind/unbind frequency high.

```c
    while (1) {
        // ... unbind ...
        // ... bind ...
        usleep(1000); // 1ms
    }
```

Finally, I reviewed other system calls like `close`, `sprintf`, and `sleep`. These don't typically require explicit error checking in this context.

So, the plan is to:
1.  Find the `vimc` device name.
2.  Create a thread that repeatedly unbinds and binds the `vimc` device.
3.  Create multiple threads that repeatedly try to open `/dev/v4l-subdevX` devices using non-blocking `open`.
4.  Implement robust error checking for critical setup calls, but allow specific, expected errors for `write` to bind/unbind.
5.  Keep the `usleep` in the bind/unbind loop minimal to maximize race condition probability.

This refined approach should create a solid reproducer that adheres to the requirements and effectively targets the race condition.


379/4 2026/08/07 16:47 tool set-results
0m Args:
map[IsProbe:false RawCandidateReproC:#define _GNU_SOURCE
#include <fcntl.h>
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include <dirent.h>
#include <errno.h>

char vimc_dev_name[256] = "vimc";

void find_vimc_dev_name(void) {
    DIR *dir = opendir("/sys/bus/platform/devices");
    if (!dir) {
        printf("[-] Failed to opendir /sys/bus/platform/devices: %s\n", strerror(errno));
        exit(1);
    }
    struct dirent *ent;
    int found = 0;
    while ((ent = readdir(dir)) != NULL) {
        if (strncmp(ent->d_name, "vimc", 4) == 0) {
            strcpy(vimc_dev_name, ent->d_name);
            found = 1;
            break;
        }
    }
    closedir(dir);
    if (!found) {
        printf("[-] Could not find vimc device in /sys/bus/platform/devices, using default '%s'\n", vimc_dev_name);
    } else {
        printf("[+] Found vimc device: %s\n", vimc_dev_name);
    }
}

void *bind_unbind_thread(void *arg)
{
    int bind_fd = open("/sys/bus/platform/drivers/vimc/bind", O_WRONLY);
    if (bind_fd < 0) {
        printf("[-] Failed to open bind: %s\n", strerror(errno));
        exit(1);
    }
    int unbind_fd = open("/sys/bus/platform/drivers/vimc/unbind", O_WRONLY);
    if (unbind_fd < 0) {
        printf("[-] Failed to open unbind: %s\n", strerror(errno));
        exit(1);
    }
    printf("[+] Opened sysfs bind/unbind successfully.\n");

    while (1) {
        ssize_t ret = write(unbind_fd, vimc_dev_name, strlen(vimc_dev_name));
        if (ret < 0 && errno != ENODEV && errno != EBUSY) {
            printf("[-] write unbind failed: %s\n", strerror(errno));
            exit(1);
        }
        
        ret = write(bind_fd, vimc_dev_name, strlen(vimc_dev_name));
        if (ret < 0 && errno != ENODEV && errno != EBUSY) {
            printf("[-] write bind failed: %s\n", strerror(errno));
            exit(1);
        }
        usleep(1000);
    }
    return NULL;
}

void *open_thread(void *arg)
{
    char dev_name[32];
    
    while (1) {
        for (int i = 0; i < 64; i++) {
            sprintf(dev_name, "/dev/v4l-subdev%d", i);
            int fd = open(dev_name, O_RDWR | O_NONBLOCK);
            if (fd >= 0) {
                close(fd);
            }
        }
    }
    return NULL;
}

int main(void)
{
    pthread_t t_bind;
    pthread_t t_open[16];
    
    find_vimc_dev_name();
    
    if (pthread_create(&t_bind, NULL, bind_unbind_thread, NULL) != 0) {
        printf("[-] Failed to create bind thread: %s\n", strerror(errno));
        exit(1);
    }
    printf("[+] Created bind/unbind thread.\n");
    
    for (int i = 0; i < 16; i++) {
        if (pthread_create(&t_open[i], NULL, open_thread, NULL) != 0) {
            printf("[-] Failed to create open thread: %s\n", strerror(errno));
            exit(1);
        }
    }
    printf("[+] Created open threads.\n");
    
    sleep(10);
    printf("[+] Reproducer finished\n");
    return 0;
}
]

Results:
map[IsProbe:false RawCandidateReproC:#define _GNU_SOURCE
#include <fcntl.h>
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include <dirent.h>
#include <errno.h>

char vimc_dev_name[256] = "vimc";

void find_vimc_dev_name(void) {
    DIR *dir = opendir("/sys/bus/platform/devices");
    if (!dir) {
        printf("[-] Failed to opendir /sys/bus/platform/devices: %s\n", strerror(errno));
        exit(1);
    }
    struct dirent *ent;
    int found = 0;
    while ((ent = readdir(dir)) != NULL) {
        if (strncmp(ent->d_name, "vimc", 4) == 0) {
            strcpy(vimc_dev_name, ent->d_name);
            found = 1;
            break;
        }
    }
    closedir(dir);
    if (!found) {
        printf("[-] Could not find vimc device in /sys/bus/platform/devices, using default '%s'\n", vimc_dev_name);
    } else {
        printf("[+] Found vimc device: %s\n", vimc_dev_name);
    }
}

void *bind_unbind_thread(void *arg)
{
    int bind_fd = open("/sys/bus/platform/drivers/vimc/bind", O_WRONLY);
    if (bind_fd < 0) {
        printf("[-] Failed to open bind: %s\n", strerror(errno));
        exit(1);
    }
    int unbind_fd = open("/sys/bus/platform/drivers/vimc/unbind", O_WRONLY);
    if (unbind_fd < 0) {
        printf("[-] Failed to open unbind: %s\n", strerror(errno));
        exit(1);
    }
    printf("[+] Opened sysfs bind/unbind successfully.\n");

    while (1) {
        ssize_t ret = write(unbind_fd, vimc_dev_name, strlen(vimc_dev_name));
        if (ret < 0 && errno != ENODEV && errno != EBUSY) {
            printf("[-] write unbind failed: %s\n", strerror(errno));
            exit(1);
        }
        
        ret = write(bind_fd, vimc_dev_name, strlen(vimc_dev_name));
        if (ret < 0 && errno != ENODEV && errno != EBUSY) {
            printf("[-] write bind failed: %s\n", strerror(errno));
            exit(1);
        }
        usleep(1000);
    }
    return NULL;
}

void *open_thread(void *arg)
{
    char dev_name[32];
    
    while (1) {
        for (int i = 0; i < 64; i++) {
            sprintf(dev_name, "/dev/v4l-subdev%d", i);
            int fd = open(dev_name, O_RDWR | O_NONBLOCK);
            if (fd >= 0) {
                close(fd);
            }
        }
    }
    return NULL;
}

int main(void)
{
    pthread_t t_bind;
    pthread_t t_open[16];
    
    find_vimc_dev_name();
    
    if (pthread_create(&t_bind, NULL, bind_unbind_thread, NULL) != 0) {
        printf("[-] Failed to create bind thread: %s\n", strerror(errno));
        exit(1);
    }
    printf("[+] Created bind/unbind thread.\n");
    
    for (int i = 0; i < 16; i++) {
        if (pthread_create(&t_open[i], NULL, open_thread, NULL) != 0) {
            printf("[-] Failed to create open thread: %s\n", strerror(errno));
            exit(1);
        }
    }
    printf("[+] Created open threads.\n");
    
    sleep(10);
    printf("[+] Reproducer finished\n");
    return 0;
}
]

380/3 2026/08/07 16:47 loop
0m
381/4 2026/08/07 16:47 iteration 0
0m
382/5 2026/08/07 16:47 action merge-repro-c
0m Results:
map[CurrentCandidateReproC:#define _GNU_SOURCE
#include <fcntl.h>
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include <dirent.h>
#include <errno.h>

char vimc_dev_name[256] = "vimc";

void find_vimc_dev_name(void) {
    DIR *dir = opendir("/sys/bus/platform/devices");
    if (!dir) {
        printf("[-] Failed to opendir /sys/bus/platform/devices: %s\n", strerror(errno));
        exit(1);
    }
    struct dirent *ent;
    int found = 0;
    while ((ent = readdir(dir)) != NULL) {
        if (strncmp(ent->d_name, "vimc", 4) == 0) {
            strcpy(vimc_dev_name, ent->d_name);
            found = 1;
            break;
        }
    }
    closedir(dir);
    if (!found) {
        printf("[-] Could not find vimc device in /sys/bus/platform/devices, using default '%s'\n", vimc_dev_name);
    } else {
        printf("[+] Found vimc device: %s\n", vimc_dev_name);
    }
}

void *bind_unbind_thread(void *arg)
{
    int bind_fd = open("/sys/bus/platform/drivers/vimc/bind", O_WRONLY);
    if (bind_fd < 0) {
        printf("[-] Failed to open bind: %s\n", strerror(errno));
        exit(1);
    }
    int unbind_fd = open("/sys/bus/platform/drivers/vimc/unbind", O_WRONLY);
    if (unbind_fd < 0) {
        printf("[-] Failed to open unbind: %s\n", strerror(errno));
        exit(1);
    }
    printf("[+] Opened sysfs bind/unbind successfully.\n");

    while (1) {
        ssize_t ret = write(unbind_fd, vimc_dev_name, strlen(vimc_dev_name));
        if (ret < 0 && errno != ENODEV && errno != EBUSY) {
            printf("[-] write unbind failed: %s\n", strerror(errno));
            exit(1);
        }
        
        ret = write(bind_fd, vimc_dev_name, strlen(vimc_dev_name));
        if (ret < 0 && errno != ENODEV && errno != EBUSY) {
            printf("[-] write bind failed: %s\n", strerror(errno));
            exit(1);
        }
        usleep(1000);
    }
    return NULL;
}

void *open_thread(void *arg)
{
    char dev_name[32];
    
    while (1) {
        for (int i = 0; i < 64; i++) {
            sprintf(dev_name, "/dev/v4l-subdev%d", i);
            int fd = open(dev_name, O_RDWR | O_NONBLOCK);
            if (fd >= 0) {
                close(fd);
            }
        }
    }
    return NULL;
}

int main(void)
{
    pthread_t t_bind;
    pthread_t t_open[16];
    
    find_vimc_dev_name();
    
    if (pthread_create(&t_bind, NULL, bind_unbind_thread, NULL) != 0) {
        printf("[-] Failed to create bind thread: %s\n", strerror(errno));
        exit(1);
    }
    printf("[+] Created bind/unbind thread.\n");
    
    for (int i = 0; i < 16; i++) {
        if (pthread_create(&t_open[i], NULL, open_thread, NULL) != 0) {
            printf("[-] Failed to create open thread: %s\n", strerror(errno));
            exit(1);
        }
    }
    printf("[+] Created open threads.\n");
    
    sleep(10);
    printf("[+] Reproducer finished\n");
    return 0;
}
]

383/5 2026/08/07 16:47 action compile-c-prog
0m Results:
map[CompilerError: FormattedReproC:#define _GNU_SOURCE
#include <fcntl.h>
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include <dirent.h>
#include <errno.h>

char vimc_dev_name[256] = "vimc";

void find_vimc_dev_name(void) {
    DIR *dir = opendir("/sys/bus/platform/devices");
    if (!dir) {
        printf("[-] Failed to opendir /sys/bus/platform/devices: %s\n", strerror(errno));
        exit(1);
    }
    struct dirent *ent;
    int found = 0;
    while ((ent = readdir(dir)) != NULL) {
        if (strncmp(ent->d_name, "vimc", 4) == 0) {
            strcpy(vimc_dev_name, ent->d_name);
            found = 1;
            break;
        }
    }
    closedir(dir);
    if (!found) {
        printf("[-] Could not find vimc device in /sys/bus/platform/devices, using default '%s'\n", vimc_dev_name);
    } else {
        printf("[+] Found vimc device: %s\n", vimc_dev_name);
    }
}

void *bind_unbind_thread(void *arg)
{
    int bind_fd = open("/sys/bus/platform/drivers/vimc/bind", O_WRONLY);
    if (bind_fd < 0) {
        printf("[-] Failed to open bind: %s\n", strerror(errno));
        exit(1);
    }
    int unbind_fd = open("/sys/bus/platform/drivers/vimc/unbind", O_WRONLY);
    if (unbind_fd < 0) {
        printf("[-] Failed to open unbind: %s\n", strerror(errno));
        exit(1);
    }
    printf("[+] Opened sysfs bind/unbind successfully.\n");

    while (1) {
        ssize_t ret = write(unbind_fd, vimc_dev_name, strlen(vimc_dev_name));
        if (ret < 0 && errno != ENODEV && errno != EBUSY) {
            printf("[-] write unbind failed: %s\n", strerror(errno));
            exit(1);
        }
        
        ret = write(bind_fd, vimc_dev_name, strlen(vimc_dev_name));
        if (ret < 0 && errno != ENODEV && errno != EBUSY) {
            printf("[-] write bind failed: %s\n", strerror(errno));
            exit(1);
        }
        usleep(1000);
    }
    return NULL;
}

void *open_thread(void *arg)
{
    char dev_name[32];
    
    while (1) {
        for (int i = 0; i < 64; i++) {
            sprintf(dev_name, "/dev/v4l-subdev%d", i);
            int fd = open(dev_name, O_RDWR | O_NONBLOCK);
            if (fd >= 0) {
                close(fd);
            }
        }
    }
    return NULL;
}

int main(void)
{
    pthread_t t_bind;
    pthread_t t_open[16];
    
    find_vimc_dev_name();
    
    if (pthread_create(&t_bind, NULL, bind_unbind_thread, NULL) != 0) {
        printf("[-] Failed to create bind thread: %s\n", strerror(errno));
        exit(1);
    }
    printf("[+] Created bind/unbind thread.\n");
    
    for (int i = 0; i < 16; i++) {
        if (pthread_create(&t_open[i], NULL, open_thread, NULL) != 0) {
            printf("[-] Failed to create open thread: %s\n", strerror(errno));
            exit(1);
        }
    }
    printf("[+] Created open threads.\n");
    
    sleep(10);
    printf("[+] Reproducer finished\n");
    return 0;
}
]

384/5 2026/08/07 16:47 action If
0m Args:
map[CompilerError:]

385/3 2026/08/07 16:47 action run-c-repro
1m Results:
map[CandidateBugTitle:general protection fault in subdev_open CandidateCrashReport:Oops: general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#1] SMP KASAN NOPTI
KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007]
CPU: 1 UID: 0 PID: 5849 Comm: syz-executor254 Not tainted syzkaller #1 PREEMPT(full) 
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
RIP: 0010:subdev_open+0x1bc/0x430 drivers/media/v4l2-core/v4l2-subdev.c:115
Code: 83 7d 00 00 0f 84 aa 00 00 00 4c 89 e0 48 c1 e8 03 80 3c 28 00 74 08 4c 89 e7 e8 5f 85 42 fa 49 8b 1c 24 48 89 d8 48 c1 e8 03 <80> 3c 28 00 74 08 48 89 df e8 46 85 42 fa 4c 8b 2b 4d 85 ed 74 7b
RSP: 0018:ffffc900038bf830 EFLAGS: 00010246
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
RDX: 0000000000000000 RSI: ffffffff8e1683c1 RDI: 00000000ffffffff
RBP: dffffc0000000000 R08: ffffffff90608a37 R09: 1ffffffff20c1146
R10: dffffc0000000000 R11: fffffbfff20c1147 R12: ffff88818e7a8020
R13: ffff88818d82d3d0 R14: ffff88818d038400 R15: ffff8881ff84c000
FS:  00007fbc8dad76c0(0000) GS:ffff8882e86f3000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fe44d9ad43c CR3: 00000001fc981000 CR4: 0000000000352ef0
Call Trace:
 <TASK>
 v4l2_open+0x1bc/0x3a0 drivers/media/v4l2-core/v4l2-dev.c:433
 chrdev_open+0x4d9/0x600 fs/char_dev.c:411
 do_dentry_open+0x816/0x1380 fs/open.c:947
 vfs_open+0x3b/0x340 fs/open.c:1052
 do_open fs/namei.c:4700 [inline]
 path_openat+0x2e44/0x3830 fs/namei.c:4863
 do_file_open+0x23e/0x4a0 fs/namei.c:4892
 do_sys_openat2+0x115/0x200 fs/open.c:1368
 do_sys_open fs/open.c:1374 [inline]
 __do_sys_openat fs/open.c:1390 [inline]
 __se_sys_openat fs/open.c:1385 [inline]
 __x64_sys_openat+0x138/0x170 fs/open.c:1385
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0x174/0x580 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fbc93b3dc9e
Code: 08 0f 85 f5 e2 ff ff 49 89 fb 48 89 f0 48 89 d7 48 89 ce 4c 89 c2 4d 89 ca 4c 8b 44 24 08 4c 8b 4c 24 10 4c 89 5c 24 08 0f 05 <c3> 90 41 57 41 56 4d 89 c6 41 55 4d 89 cd 41 54 55 53 48 83 ec 08
RSP: 002b:00007fbc8dad7128 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 00007fbc8dad76c0 RCX: 00007fbc93b3dc9e
RDX: 0000000000000802 RSI: 00007fbc8dad71e0 RDI: ffffffffffffff9c
RBP: 00007fbc8dad71e0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007fbc93b8809b
R13: 0000000000000000 R14: 00007fff715a0080 R15: 00007fff715a0168
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:subdev_open+0x1bc/0x430 drivers/media/v4l2-core/v4l2-subdev.c:115
Code: 83 7d 00 00 0f 84 aa 00 00 00 4c 89 e0 48 c1 e8 03 80 3c 28 00 74 08 4c 89 e7 e8 5f 85 42 fa 49 8b 1c 24 48 89 d8 48 c1 e8 03 <80> 3c 28 00 74 08 48 89 df e8 46 85 42 fa 4c 8b 2b 4d 85 ed 74 7b
RSP: 0018:ffffc900038bf830 EFLAGS: 00010246

RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
RDX: 0000000000000000 RSI: ffffffff8e1683c1 RDI: 00000000ffffffff
RBP: dffffc0000000000 R08: ffffffff90608a37 R09: 1ffffffff20c1146
R10: dffffc0000000000 R11: fffffbfff20c1147 R12: ffff88818e7a8020
R13: ffff88818d82d3d0 R14: ffff88818d038400 R15: ffff8881ff84c000
FS:  00007fbc8dad76c0(0000) GS:ffff8882e86f3000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fff538bb318 CR3: 00000001fc981000 CR4: 0000000000352ef0
----------------
Code disassembly (best guess):
   0:	83 7d 00 00          	cmpl   $0x0,0x0(%rbp)
   4:	0f 84 aa 00 00 00    	je     0xb4
   a:	4c 89 e0             	mov    %r12,%rax
   d:	48 c1 e8 03          	shr    $0x3,%rax
  11:	80 3c 28 00          	cmpb   $0x0,(%rax,%rbp,1)
  15:	74 08                	je     0x1f
  17:	4c 89 e7             	mov    %r12,%rdi
  1a:	e8 5f 85 42 fa       	call   0xfa42857e
  1f:	49 8b 1c 24          	mov    (%r12),%rbx
  23:	48 89 d8             	mov    %rbx,%rax
  26:	48 c1 e8 03          	shr    $0x3,%rax
* 2a:	80 3c 28 00          	cmpb   $0x0,(%rax,%rbp,1) <-- trapping instruction
  2e:	74 08                	je     0x38
  30:	48 89 df             	mov    %rbx,%rdi
  33:	e8 46 85 42 fa       	call   0xfa42857e
  38:	4c 8b 2b             	mov    (%rbx),%r13
  3b:	4d 85 ed             	test   %r13,%r13
  3e:	74 7b                	je     0xbb
 CandidateReproduced:true ConsoleOutput:[   67.287026][   T33] kauditd_printk_skb: 10 callbacks suppressed
[   67.287037][   T33] audit: type=1400 audit(1786121344.433:200): avc:  denied  { transition } for  pid=5816 comm="sshd-session" path="/bin/sh" dev="sda1" ino=90 scontext=system_u:system_r:sshd_t tcontext=root:sysadm_r:sysadm_t tclass=process permissive=1
[   67.305701][   T33] audit: type=1400 audit(1786121344.443:201): avc:  denied  { noatsecure } for  pid=5816 comm="sshd-session" scontext=system_u:system_r:sshd_t tcontext=root:sysadm_r:sysadm_t tclass=process permissive=1
[   67.312294][   T33] audit: type=1400 audit(1786121344.443:202): avc:  denied  { rlimitinh } for  pid=5816 comm="sh" scontext=system_u:system_r:sshd_t tcontext=root:sysadm_r:sysadm_t tclass=process permissive=1
[   67.318695][   T33] audit: type=1400 audit(1786121344.443:203): avc:  denied  { siginh } for  pid=5816 comm="sh" scontext=system_u:system_r:sshd_t tcontext=root:sysadm_r:sysadm_t tclass=process permissive=1
[   70.098451][   T33] audit: type=1400 audit(1786121347.243:204): avc:  denied  { write } for  pid=5825 comm="dhcpcd-run-hook" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
[   70.133316][   T33] audit: type=1400 audit(1786121347.273:205): avc:  denied  { write } for  pid=5828 comm="rm" name="hook-state" dev="tmpfs" ino=1794 scontext=system_u:system_r:dhcpc_t tcontext=system_u:object_r:tmpfs_t tclass=dir permissive=1
Warning: Permanently added '[localhost]:55186' (ED25519) to the list of known hosts.
[   70.477000][   T33] audit: type=1400 audit(1786121347.613:206): avc:  denied  { read write } for  pid=5836 comm="syz-executor254" name="v4l-subdev0" dev="devtmpfs" ino=946 scontext=root:sysadm_r:sysadm_t tcontext=system_u:object_r:device_t tclass=chr_file permissive=1
[   70.535414][   T33] audit: type=1400 audit(1786121347.613:207): avc:  denied  { open } for  pid=5836 comm="syz-executor254" path="/dev/v4l-subdev0" dev="devtmpfs" ino=946 scontext=root:sysadm_r:sysadm_t tcontext=system_u:object_r:device_t tclass=chr_file permissive=1
[   70.554037][ T5849] Oops: general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#1] SMP KASAN NOPTI
[   70.558063][ T5849] KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007]
[   70.560816][ T5849] CPU: 1 UID: 0 PID: 5849 Comm: syz-executor254 Not tainted syzkaller #1 PREEMPT(full) 
[   70.564022][ T5849] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   70.567405][ T5849] RIP: 0010:subdev_open+0x1bc/0x430
[   70.569160][ T5849] Code: 83 7d 00 00 0f 84 aa 00 00 00 4c 89 e0 48 c1 e8 03 80 3c 28 00 74 08 4c 89 e7 e8 5f 85 42 fa 49 8b 1c 24 48 89 d8 48 c1 e8 03 <80> 3c 28 00 74 08 48 89 df e8 46 85 42 fa 4c 8b 2b 4d 85 ed 74 7b
[   70.575665][ T5849] RSP: 0018:ffffc900038bf830 EFLAGS: 00010246
[   70.577726][ T5849] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
[   70.580392][ T5849] RDX: 0000000000000000 RSI: ffffffff8e1683c1 RDI: 00000000ffffffff
[   70.583071][ T5849] RBP: dffffc0000000000 R08: ffffffff90608a37 R09: 1ffffffff20c1146
[   70.585767][ T5849] R10: dffffc0000000000 R11: fffffbfff20c1147 R12: ffff88818e7a8020
[   70.588403][ T5849] R13: ffff88818d82d3d0 R14: ffff88818d038400 R15: ffff8881ff84c000
[   70.591032][ T5849] FS:  00007fbc8dad76c0(0000) GS:ffff8882e86f3000(0000) knlGS:0000000000000000
[   70.593990][ T5849] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   70.596194][ T5849] CR2: 00007fe44d9ad43c CR3: 00000001fc981000 CR4: 0000000000352ef0
[   70.598826][ T5849] Call Trace:
[   70.599984][ T5849]  <TASK>
[   70.600987][ T5849]  v4l2_open+0x1bc/0x3a0
[   70.602415][ T5849]  chrdev_open+0x4d9/0x600
[   70.603929][ T5849]  ? __pfx_chrdev_open+0x10/0x10
[   70.605646][ T5849]  ? fsnotify_open_perm_and_set_mode+0x113/0x620
[   70.607750][ T5849]  ? __pfx_chrdev_open+0x10/0x10
[   70.609430][ T5849]  do_dentry_open+0x816/0x1380
[   70.611042][ T5849]  vfs_open+0x3b/0x340
[   70.612407][ T5849]  ? path_openat+0x2e2d/0x3830
[   70.614008][ T5849]  path_openat+0x2e44/0x3830
[   70.615592][ T5849]  ? kasan_save_track+0x3e/0x80
[   70.617226][ T5849]  ? do_sys_openat2+0xcc/0x200
[   70.618818][ T5849]  ? entry_SYSCALL_64_after_hwframe+0x77/0x7f
[   70.620842][ T5849]  do_file_open+0x23e/0x4a0
[   70.622377][ T5849]  ? __pfx_do_file_open+0x10/0x10
[   70.624065][ T5849]  ? _raw_spin_unlock+0x28/0x50
[   70.625741][ T5849]  ? alloc_fd+0x651/0x6c0
[   70.627198][ T5849]  do_sys_openat2+0x115/0x200
[   70.628759][ T5849]  ? __pfx_do_sys_openat2+0x10/0x10
[   70.630504][ T5849]  ? rcu_is_watching+0x15/0xb0
[   70.632115][ T5849]  __x64_sys_openat+0x138/0x170
[   70.633741][ T5849]  ? entry_SYSCALL_64_after_hwframe+0x77/0x7f
[   70.635792][ T5849]  do_syscall_64+0x174/0x580
[   70.637345][ T5849]  ? trace_irq_disable+0x3b/0x140
[   70.639191][ T5849]  ? clear_bhb_loop+0x40/0x90
[   70.640768][ T5849]  entry_SYSCALL_64_after_hwframe+0x77/0x7f
[   70.642738][ T5849] RIP: 0033:0x7fbc93b3dc9e
[   70.644248][ T5849] Code: 08 0f 85 f5 e2 ff ff 49 89 fb 48 89 f0 48 89 d7 48 89 ce 4c 89 c2 4d 89 ca 4c 8b 44 24 08 4c 8b 4c 24 10 4c 89 5c 24 08 0f 05 <c3> 90 41 57 41 56 4d 89 c6 41 55 4d 89 cd 41 54 55 53 48 83 ec 08
[   70.650619][ T5849] RSP: 002b:00007fbc8dad7128 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
[   70.653520][ T5849] RAX: ffffffffffffffda RBX: 00007fbc8dad76c0 RCX: 00007fbc93b3dc9e
[   70.656204][ T5849] RDX: 0000000000000802 RSI: 00007fbc8dad71e0 RDI: ffffffffffffff9c
[   70.658811][ T5849] RBP: 00007fbc8dad71e0 R08: 0000000000000000 R09: 0000000000000000
[   70.661460][ T5849] R10: 0000000000000000 R11: 0000000000000246 R12: 00007fbc93b8809b
[   70.664068][ T5849] R13: 0000000000000000 R14: 00007fff715a0080 R15: 00007fff715a0168
[   70.666746][ T5849]  </TASK>
[   70.667788][ T5849] Modules linked in:
[   70.669205][ T5841] Oops: general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#2] SMP KASAN NOPTI
[   70.669331][ T5849] ---[ end trace 0000000000000000 ]---
[   70.674280][ T5841] KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007]
[   70.679641][ T5841] CPU: 0 UID: 0 PID: 5841 Comm: syz-executor254 Tainted: G      D             syzkaller #1 PREEMPT(full) 
[   70.684304][ T5841] Tainted: [D]=DIE
[   70.685970][ T5841] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   70.690156][ T5841] RIP: 0010:subdev_open+0x1bc/0x430
[   70.692351][ T5841] Code: 83 7d 00 00 0f 84 aa 00 00 00 4c 89 e0 48 c1 e8 03 80 3c 28 00 74 08 4c 89 e7 e8 5f 85 42 fa 49 8b 1c 24 48 89 d8 48 c1 e8 03 <80> 3c 28 00 74 08 48 89 df e8 46 85 42 fa 4c 8b 2b 4d 85 ed 74 7b
[   70.700532][ T5841] RSP: 0018:ffffc900039bf830 EFLAGS: 00010246
[   70.703111][ T5841] RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffffffff9a7e1503
[   70.706199][ T5841] RDX: 0000000000000000 RSI: ffffffff8c321560 RDI: 00000000ffffffff
[   70.708846][ T5841] RBP: dffffc0000000000 R08: ffffffff90608a37 R09: 1ffffffff20c1146
[   70.711479][ T5841] R10: dffffc0000000000 R11: fffffbfff20c1147 R12: ffff88818e7a8020
[   70.714323][ T5841] R13: ffff88818d82d3d0 R14: ffff88810cacc000 R15: ffff888115f93a40
[   70.717504][ T5841] FS:  00007fbc91adf6c0(0000) GS:ffff8881a50f3000(0000) knlGS:0000000000000000
[   70.721076][ T5841] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   70.723348][ T5841] CR2: 0000563d8e6b6610 CR3: 00000001fc981000 CR4: 0000000000352ef0
[   70.726061][ T5841] Call Trace:
[   70.727215][ T5841]  <TASK>
[   70.728239][ T5841]  v4l2_open+0x1bc/0x3a0
[   70.729886][ T5841]  chrdev_open+0x4d9/0x600
[   70.731423][ T5841]  ? __pfx_chrdev_open+0x10/0x10
[   70.733109][ T5841]  ? fsnotify_open_perm_and_set_mode+0x113/0x620
[   70.735260][ T5841]  ? __pfx_chrdev_open+0x10/0x10
[   70.736955][ T5841]  do_dentry_open+0x816/0x1380
[   70.738562][ T5841]  vfs_open+0x3b/0x340
[   70.739951][ T5841]  ? path_openat+0x2e2d/0x3830
[   70.741544][ T5841]  path_openat+0x2e44/0x3830
[   70.743105][ T5841]  ? kasan_save_track+0x3e/0x80
[   70.744926][ T5841]  ? do_sys_openat2+0xcc/0x200
[   70.746739][ T5841]  ? entry_SYSCALL_64_after_hwframe+0x77/0x7f
[   70.749081][ T5841]  do_file_open+0x23e/0x4a0
[   70.750779][ T5841]  ? __pfx_do_file_open+0x10/0x10
[   70.752542][ T5841]  ? _raw_spin_unlock+0x28/0x50
[   70.754350][ T5841]  ? alloc_fd+0x651/0x6c0
[   70.756113][ T5841]  do_sys_openat2+0x115/0x200
[   70.758104][ T5841]  ? __pfx_do_sys_openat2+0x10/0x10
[   70.760280][ T5841]  ? rcu_is_watching+0x15/0xb0
[   70.762303][ T5841]  __x64_sys_openat+0x138/0x170
[   70.764343][ T5841]  ? entry_SYSCALL_64_after_hwframe+0x77/0x7f
[   70.766940][ T5841]  do_syscall_64+0x174/0x580
[   70.768873][ T5841]  ? trace_irq_disable+0x3b/0x140
[   70.771012][ T5841]  ? clear_bhb_loop+0x40/0x90
[   70.772984][ T5841]  entry_SYSCALL_64_after_hwframe+0x77/0x7f
[   70.775483][ T5841] RIP: 0033:0x7fbc93b3dc9e
[   70.777359][ T5841] Code: 08 0f 85 f5 e2 ff ff 49 89 fb 48 89 f0 48 89 d7 48 89 ce 4c 89 c2 4d 89 ca 4c 8b 44 24 08 4c 8b 4c 24 10 4c 89 5c 24 08 0f 05 <c3> 90 41 57 41 56 4d 89 c6 41 55 4d 89 cd 41 54 55 53 48 83 ec 08
[   70.785318][ T5841] RSP: 002b:00007fbc91adf128 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
[   70.788641][ T5841] RAX: ffffffffffffffda RBX: 00007fbc91adf6c0 RCX: 00007fbc93b3dc9e
[   70.791412][ T5841] RDX: 0000000000000802 RSI: 00007fbc91adf1e0 RDI: ffffffffffffff9c
[   70.794216][ T5841] RBP: 00007fbc91adf1e0 R08: 0000000000000000 R09: 0000000000000000
[   70.796864][ T5841] R10: 0000000000000000 R11: 0000000000000246 R12: 00007fbc93b8809b
[   70.799705][ T5841] R13: 0000000000000000 R14: 00007fff715a0080 R15: 00007fff715a0168
[   70.802361][ T5841]  </TASK>
[   70.803431][ T5841] Modules linked in:
[   70.804879][ T5850] Oops: general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#3] SMP KASAN NOPTI
[   70.805021][ T5841] ---[ end trace 0000000000000000 ]---
[   70.809152][ T5850] KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007]
[   70.809170][ T5850] CPU: 1 UID: 0 PID: 5850 Comm: syz-executor254 Tainted: G      D             syzkaller #1 PREEMPT(full) 
[   70.809181][ T5850] Tainted: [D]=DIE
[   70.809184][ T5850] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   70.809189][ T5850] RIP: 0010:subdev_open+0x1bc/0x430
[   70.809204][ T5850] Code: 83 7d 00 00 0f 84 aa 00 00 00 4c 89 e0 48 c1 e8 03 80 3c 28 00 74 08 4c 89 e7 e8 5f 85 42 fa 49 8b 1c 24 48 89 d8 48 c1 e8 03 <80> 3c 28 00 74 08 48 89 df e8 46 85 42 fa 4c 8b 2b 4d 85 ed 74 7b
[   70.809210][ T5850] RSP: 0018:ffffc900038af830 EFLAGS: 00010246
[   70.809218][ T5850] RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffffffff9a7e1503
[   70.809223][ T5850] RDX: 0000000000000000 RSI: ffffffff8c321560 RDI: 00000000ffffffff
[   70.809228][ T5850] RBP: dffffc0000000000 R08: ffffffff90608a37 R09: 1ffffffff20c1146
[   70.809247][ T5850] R10: dffffc0000000000 R11: fffffbfff20c1147 R12: ffff88818e7a8020
[   70.809252][ T5850] R13: ffff88818d82d3d0 R14: ffff88818d03bc00 R15: ffff888180e9ec40
[   70.846738][ T5850] FS:  00007fbc8d2d66c0(0000) GS:ffff8882e86f3000(0000) knlGS:0000000000000000
[   70.849689][ T5850] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   70.851863][ T5850] CR2: 00007fe44d9ad43c CR3: 00000001fc981000 CR4: 0000000000352ef0
[   70.854527][ T5850] Call Trace:
[   70.855706][ T5850]  <TASK>
[   70.856725][ T5850]  v4l2_open+0x1bc/0x3a0
[   70.858176][ T5850]  chrdev_open+0x4d9/0x600
[   70.859679][ T5850]  ? __pfx_chrdev_open+0x10/0x10
[   70.861354][ T5850]  ? fsnotify_open_perm_and_set_mode+0x113/0x620
[   70.863465][ T5850]  ? __pfx_chrdev_open+0x10/0x10
[   70.865194][ T5850]  do_dentry_open+0x816/0x1380
[   70.866795][ T5850]  vfs_open+0x3b/0x340
[   70.868172][ T5850]  ? path_openat+0x2e2d/0x3830
[   70.869771][ T5850]  path_openat+0x2e44/0x3830
[   70.871332][ T5850]  ? kasan_save_track+0x3e/0x80
[   70.872959][ T5850]  ? do_sys_openat2+0xcc/0x200
[   70.874752][ T5850]  ? entry_SYSCALL_64_after_hwframe+0x77/0x7f
[   70.876898][ T5850]  do_file_open+0x23e/0x4a0
[   70.878464][ T5850]  ? __pfx_do_file_open+0x10/0x10
[   70.880173][ T5850]  ? _raw_spin_unlock+0x28/0x50
[   70.881834][ T5850]  ? alloc_fd+0x651/0x6c0
[   70.883272][ T5850]  do_sys_openat2+0x115/0x200
[   70.884843][ T5850]  ? __pfx_do_sys_openat2+0x10/0x10
[   70.886610][ T5850]  ? rcu_is_watching+0x15/0xb0
[   70.888219][ T5850]  __x64_sys_openat+0x138/0x170
[   70.889811][ T5850]  ? entry_SYSCALL_64_after_hwframe+0x77/0x7f
[   70.891770][ T5850]  do_syscall_64+0x174/0x580
[   70.893313][ T5850]  ? trace_irq_disable+0x3b/0x140
[   70.895025][ T5850]  ? clear_bhb_loop+0x40/0x90
[   70.896596][ T5850]  entry_SYSCALL_64_after_hwframe+0x77/0x7f
[   70.898533][ T5850] RIP: 0033:0x7fbc93b3dc9e
[   70.900014][ T5850] Code: 08 0f 85 f5 e2 ff ff 49 89 fb 48 89 f0 48 89 d7 48 89 ce 4c 89 c2 4d 89 ca 4c 8b 44 24 08 4c 8b 4c 24 10 4c 89 5c 24 08 0f 05 <c3> 90 41 57 41 56 4d 89 c6 41 55 4d 89 cd 41 54 55 53 48 83 ec 08
[   70.906330][ T5850] RSP: 002b:00007fbc8d2d6128 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
[   70.909046][ T5850] RAX: ffffffffffffffda RBX: 00007fbc8d2d66c0 RCX: 00007fbc93b3dc9e
[   70.911594][ T5850] RDX: 0000000000000802 RSI: 00007fbc8d2d61e0 RDI: ffffffffffffff9c
[   70.914163][ T5850] RBP: 00007fbc8d2d61e0 R08: 0000000000000000 R09: 0000000000000000
[   70.916754][ T5850] R10: 0000000000000000 R11: 0000000000000246 R12: 00007fbc93b8809b
[   70.919654][ T5850] R13: 0000000000000000 R14: 00007fff715a0080 R15: 00007fff715a0168
[   70.922261][ T5850]  </TASK>
[   70.923306][ T5850] Modules linked in:
[   70.924766][ T5844] Oops: general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#4] SMP KASAN NOPTI
[   70.924878][ T5850] ---[ end trace 0000000000000000 ]---
[   70.929086][ T5844] KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007]
[   70.929106][ T5844] CPU: 0 UID: 0 PID: 5844 Comm: syz-executor254 Tainted: G      D             syzkaller #1 PREEMPT(full) 
[   70.929122][ T5844] Tainted: [D]=DIE
[   70.929126][ T5844] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   70.929134][ T5844] RIP: 0010:subdev_open+0x1bc/0x430
[   70.929156][ T5844] Code: 83 7d 00 00 0f 84 aa 00 00 00 4c 89 e0 48 c1 e8 03 80 3c 28 00 74 08 4c 89 e7 e8 5f 85 42 fa 49 8b 1c 24 48 89 d8 48 c1 e8 03 <80> 3c 28 00 74 08 48 89 df e8 46 85 42 fa 4c 8b 2b 4d 85 ed 74 7b
[   70.929166][ T5844] RSP: 0018:ffffc9000398f830 EFLAGS: 00010246
[   70.929178][ T5844] RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffffffff9a7e1503
[   70.929185][ T5844] RDX: 0000000000000000 RSI: ffffffff8c321560 RDI: 00000000ffffffff
[   70.960085][ T5844] RBP: dffffc0000000000 R08: ffffffff90608a37 R09: 1ffffffff20c1146
[   70.962642][ T5844] R10: dffffc0000000000 R11: fffffbfff20c1147 R12: ffff88818e7a8020
[   70.965264][ T5844] R13: ffff88818d82d3d0 R14: ffff88810cacc400 R15: ffff888114cdb500
[   70.967872][ T5844] FS:  00007fbc902dc6c0(0000) GS:ffff8881a50f3000(0000) knlGS:0000000000000000
[   70.970758][ T5844] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   70.972945][ T5844] CR2: 0000563d8e4723b0 CR3: 00000001fc981000 CR4: 0000000000352ef0
[   70.975649][ T5844] Call Trace:
[   70.976821][ T5844]  <TASK>
[   70.977832][ T5844]  v4l2_open+0x1bc/0x3a0
[   70.979281][ T5844]  chrdev_open+0x4d9/0x600
[   70.980803][ T5844]  ? __pfx_chrdev_open+0x10/0x10
[   70.982483][ T5844]  ? fsnotify_open_perm_and_set_mode+0x113/0x620
[   70.984616][ T5844]  ? __pfx_chrdev_open+0x10/0x10
[   70.986332][ T5844]  do_dentry_open+0x816/0x1380
[   70.987954][ T5844]  vfs_open+0x3b/0x340
[   70.989346][ T5844]  ? path_openat+0x2e2d/0x3830
[   70.990942][ T5844]  path_openat+0x2e44/0x3830
[   70.992480][ T5844]  ? kasan_save_track+0x3e/0x80
[   70.994087][ T5844]  ? do_sys_openat2+0xcc/0x200
[   70.995660][ T5844]  ? entry_SYSCALL_64_after_hwframe+0x77/0x7f
[   70.997615][ T5844]  do_file_open+0x23e/0x4a0
[   70.999076][ T5844]  ? __pfx_do_file_open+0x10/0x10
[   71.000684][ T5844]  ? _raw_spin_unlock+0x28/0x50
[   71.002307][ T5844]  ? alloc_fd+0x651/0x6c0
[   71.003718][ T5844]  do_sys_openat2+0x115/0x200
[   71.005313][ T5844]  ? __pfx_do_sys_openat2+0x10/0x10
[   71.007042][ T5844]  ? rcu_is_watching+0x15/0xb0
[   71.008619][ T5844]  __x64_sys_openat+0x138/0x170
[   71.010272][ T5844]  ? entry_SYSCALL_64_after_hwframe+0x77/0x7f
[   71.012296][ T5844]  do_syscall_64+0x174/0x580
[   71.013851][ T5844]  ? trace_irq_disable+0x3b/0x140
[   71.015592][ T5844]  ? clear_bhb_loop+0x40/0x90
[   71.017380][ T5844]  entry_SYSCALL_64_after_hwframe+0x77/0x7f
[   71.019408][ T5844] RIP: 0033:0x7fbc93b3dc9e
[   71.020932][ T5844] Code: 08 0f 85 f5 e2 ff ff 49 89 fb 48 89 f0 48 89 d7 48 89 ce 4c 89 c2 4d 89 ca 4c 8b 44 24 08 4c 8b 4c 24 10 4c 89 5c 24 08 0f 05 <c3> 90 41 57 41 56 4d 89 c6 41 55 4d 89 cd 41 54 55 53 48 83 ec 08
[   71.027218][ T5844] RSP: 002b:00007fbc902dc128 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
[   71.029942][ T5844] RAX: ffffffffffffffda RBX: 00007fbc902dc6c0 RCX: 00007fbc93b3dc9e
[   71.032525][ T5844] RDX: 0000000000000802 RSI: 00007fbc902dc1e0 RDI: ffffffffffffff9c
[   71.035176][ T5844] RBP: 00007fbc902dc1e0 R08: 0000000000000000 R09: 0000000000000000
[   71.037798][ T5844] R10: 0000000000000000 R11: 0000000000000246 R12: 00007fbc93b8809b
[   71.040368][ T5844] R13: 0000000000000000 R14: 00007fff715a0080 R15: 00007fff715a0168
[   71.042968][ T5844]  </TASK>
[   71.044010][ T5844] Modules linked in:
[   71.045466][ T5843] Oops: general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#5] SMP KASAN NOPTI
[   71.045503][ T5844] ---[ end trace 0000000000000000 ]---
[   71.049396][ T5843] KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007]
[   71.049416][ T5843] CPU: 1 UID: 0 PID: 5843 Comm: syz-executor254 Tainted: G      D             syzkaller #1 PREEMPT(full) 
[   71.049426][ T5843] Tainted: [D]=DIE
[   71.049429][ T5843] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   71.062145][ T5843] RIP: 0010:subdev_open+0x1bc/0x430
[   71.063868][ T5843] Code: 83 7d 00 00 0f 84 aa 00 00 00 4c 89 e0 48 c1 e8 03 80 3c 28 00 74 08 4c 89 e7 e8 5f 85 42 fa 49 8b 1c 24 48 89 d8 48 c1 e8 03 <80> 3c 28 00 74 08 48 89 df e8 46 85 42 fa 4c 8b 2b 4d 85 ed 74 7b
[   71.070261][ T5843] RSP: 0018:ffffc9000399f830 EFLAGS: 00010246
[   71.072302][ T5843] RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffffffff9a7e1503
[   71.075107][ T5843] RDX: 0000000000000000 RSI: ffffffff8c321560 RDI: 00000000ffffffff
[   71.077709][ T5843] RBP: dffffc0000000000 R08: ffffffff90608a37 R09: 1ffffffff20c1146
[   71.080317][ T5843] R10: dffffc0000000000 R11: fffffbfff20c1147 R12: ffff88818e7a8020
[   71.082943][ T5843] R13: ffff88818d82d3d0 R14: ffff88818d03ac00 R15: ffff88818dbf8000
[   71.085739][ T5843] FS:  00007fbc90add6c0(0000) GS:ffff8882e86f3000(0000) knlGS:0000000000000000
[   71.088925][ T5843] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   71.091279][ T5843] CR2: 00007fe44d9ad43c CR3: 00000001fc981000 CR4: 0000000000352ef0
[   71.093956][ T5843] Call Trace:
[   71.095124][ T5843]  <TASK>
[   71.096122][ T5843]  v4l2_open+0x1bc/0x3a0
[   71.097542][ T5843]  chrdev_open+0x4d9/0x600
[   71.099052][ T5843]  ? __pfx_chrdev_open+0x10/0x10
[   71.100709][ T5843]  ? fsnotify_open_perm_and_set_mode+0x113/0x620
[   71.102814][ T5843]  ? __pfx_chrdev_open+0x10/0x10
[   71.104454][ T5843]  do_dentry_open+0x816/0x1380
[   71.106096][ T5843]  vfs_open+0x3b/0x340
[   71.107474][ T5843]  ? path_openat+0x2e2d/0x3830
[   71.109063][ T5843]  path_openat+0x2e44/0x3830
[   71.110689][ T5843]  ? kasan_save_track+0x3e/0x80
[   71.112378][ T5843]  ? do_sys_openat2+0xcc/0x200
[   71.113987][ T5843]  ? entry_SYSCALL_64_after_hwframe+0x77/0x7f
[   71.116023][ T5843]  do_file_open+0x23e/0x4a0
[   71.117536][ T5843]  ? __pfx_do_file_open+0x10/0x10
[   71.119190][ T5843]  ? _raw_spin_unlock+0x28/0x50
[   71.120803][ T5843]  ? alloc_fd+0x651/0x6c0
[   71.122256][ T5843]  do_sys_openat2+0x115/0x200
[   71.123831][ T5843]  ? __pfx_do_sys_openat2+0x10/0x10
[   71.125595][ T5843]  ? rcu_is_watching+0x15/0xb0
[   71.127189][ T5843]  __x64_sys_openat+0x138/0x170
[   71.128804][ T5843]  ? entry_SYSCALL_64_after_hwframe+0x77/0x7f
[   71.130798][ T5843]  do_syscall_64+0x174/0x580
[   71.132353][ T5843]  ? trace_irq_disable+0x3b/0x140
[   71.133998][ T5843]  ? clear_bhb_loop+0x40/0x90
[   71.135582][ T5843]  entry_SYSCALL_64_after_hwframe+0x77/0x7f
[   71.137537][ T5843] RIP: 0033:0x7fbc93b3dc9e
[   71.138996][ T5843] Code: 08 0f 85 f5 e2 ff ff 49 89 fb 48 89 f0 48 89 d7 48 89 ce 4c 89 c2 4d 89 ca 4c 8b 44 24 08 4c 8b 4c 24 10 4c 89 5c 24 08 0f 05 <c3> 90 41 57 41 56 4d 89 c6 41 55 4d 89 cd 41 54 55 53 48 83 ec 08
[   71.145229][ T5843] RSP: 002b:00007fbc90add128 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
[   71.147977][ T5843] RAX: ffffffffffffffda RBX: 00007fbc90add6c0 RCX: 00007fbc93b3dc9e
[   71.150544][ T5843] RDX: 0000000000000802 RSI: 00007fbc90add1e0 RDI: ffffffffffffff9c
[   71.153137][ T5843] RBP: 00007fbc90add1e0 R08: 0000000000000000 R09: 0000000000000000
[   71.155742][ T5843] R10: 0000000000000000 R11: 0000000000000246 R12: 00007fbc93b8809b
[   71.158327][ T5843] R13: 0000000000000000 R14: 00007fff715a0080 R15: 00007fff715a0168
[   71.160928][ T5843]  </TASK>
[   71.161963][ T5843] Modules linked in:
[   71.163354][ T5839] Oops: general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#6] SMP KASAN NOPTI
[   71.163450][ T5843] ---[ end trace 0000000000000000 ]---
[   71.167688][ T5839] KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007]
[   71.167711][ T5839] CPU: 0 UID: 0 PID: 5839 Comm: syz-executor254 Tainted: G      D             syzkaller #1 PREEMPT(full) 
[   71.167721][ T5839] Tainted: [D]=DIE
[   71.167724][ T5839] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   71.167729][ T5839] RIP: 0010:subdev_open+0x1bc/0x430
[   71.167744][ T5839] Code: 83 7d 00 00 0f 84 aa 00 00 00 4c 89 e0 48 c1 e8 03 80 3c 28 00 74 08 4c 89 e7 e8 5f 85 42 fa 49 8b 1c 24 48 89 d8 48 c1 e8 03 <80> 3c 28 00 74 08 48 89 df e8 46 85 42 fa 4c 8b 2b 4d 85 ed 74 7b
[   71.167750][ T5839] RSP: 0018:ffffc900039df830 EFLAGS: 00010246
[   71.167758][ T5839] RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffffffff9a7e1503
[   71.167763][ T5839] RDX: 0000000000000000 RSI: ffffffff8c321560 RDI: 00000000ffffffff
[   71.167768][ T5839] RBP: dffffc0000000000 R08: ffffffff90608a37 R09: 1ffffffff20c1146
[   71.167773][ T5839] R10: dffffc0000000000 R11: fffffbfff20c1147 R12: ffff88818e7a8020
[   71.167779][ T5839] R13: ffff88818d82d3d0 R14: ffff88810cacdc00 R15: ffff88810cb136c0
[   71.167784][ T5839] FS:  00007fbc92ae16c0(0000) GS:ffff8881a50f3000(0000) knlGS:0000000000000000
[   71.167790][ T5839] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   71.208478][ T5839] CR2: 0000563d8e4723b0 CR3: 00000001fc981000 CR4: 0000000000352ef0
[   71.211115][ T5839] Call Trace:
[   71.212266][ T5839]  <TASK>
[   71.213281][ T5839]  v4l2_open+0x1bc/0x3a0
[   71.214709][ T5839]  chrdev_open+0x4d9/0x600
[   71.216224][ T5839]  ? __pfx_chrdev_open+0x10/0x10
[   71.217877][ T5839]  ? fsnotify_open_perm_and_set_mode+0x113/0x620
[   71.219986][ T5839]  ? __pfx_chrdev_open+0x10/0x10
[   71.221645][ T5839]  do_dentry_open+0x816/0x1380
[   71.223245][ T5839]  vfs_open+0x3b/0x340
[   71.224632][ T5839]  ? path_openat+0x2e2d/0x3830
[   71.226285][ T5839]  path_openat+0x2e44/0x3830
[   71.227866][ T5839]  ? kasan_save_track+0x3e/0x80
[   71.229644][ T5839]  ? do_sys_openat2+0xcc/0x200
[   71.231326][ T5839]  ? entry_SYSCALL_64_after_hwframe+0x77/0x7f
[   71.233379][ T5839]  do_file_open+0x23e/0x4a0
[   71.234936][ T5839]  ? __pfx_do_file_open+0x10/0x10
[   71.236669][ T5839]  ? _raw_spin_unlock+0x28/0x50
[   71.238326][ T5839]  ? alloc_fd+0x651/0x6c0
[   71.239805][ T5839]  do_sys_openat2+0x115/0x200
[   71.241404][ T5839]  ? __pfx_do_sys_openat2+0x10/0x10
[   71.243173][ T5839]  ? rcu_is_watching+0x15/0xb0
[   71.244867][ T5839]  __x64_sys_openat+0x138/0x170
[   71.246568][ T5839]  ? entry_SYSCALL_64_after_hwframe+0x77/0x7f
[   71.248718][ T5839]  do_syscall_64+0x174/0x580
[   71.250277][ T5839]  ? trace_irq_disable+0x3b/0x140
[   71.251951][ T5839]  ? clear_bhb_loop+0x40/0x90
[   71.253524][ T5839]  entry_SYSCALL_64_after_hwframe+0x77/0x7f
[   71.255536][ T5839] RIP: 0033:0x7fbc93b3dc9e
[   71.256995][ T5839] Code: 08 0f 85 f5 e2 ff ff 49 89 fb 48 89 f0 48 89 d7 48 89 ce 4c 89 c2 4d 89 ca 4c 8b 44 24 08 4c 8b 4c 24 10 4c 89 5c 24 08 0f 05 <c3> 90 41 57 41 56 4d 89 c6 41 55 4d 89 cd 41 54 55 53 48 83 ec 08
[   71.263217][ T5839] RSP: 002b:00007fbc92ae1128 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
[   71.265969][ T5839] RAX: ffffffffffffffda RBX: 00007fbc92ae16c0 RCX: 00007fbc93b3dc9e
[   71.268568][ T5839] RDX: 0000000000000802 RSI: 00007fbc92ae11e0 RDI: ffffffffffffff9c
[   71.271191][ T5839] RBP: 00007fbc92ae11e0 R08: 0000000000000000 R09: 0000000000000000
[   71.273769][ T5839] R10: 0000000000000000 R11: 0000000000000246 R12: 00007fbc93b8809b
[   71.276379][ T5839] R13: 0000000000000000 R14: 00007fff715a0080 R15: 00007fff715a0168
[   71.278996][ T5839]  </TASK>
[   71.280038][ T5839] Modules linked in:
[   71.281413][ T5840] Oops: general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#7] SMP KASAN NOPTI
[   71.281444][ T5839] ---[ end trace 0000000000000000 ]---
[   71.285509][ T5840] KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007]
[   71.285526][ T5840] CPU: 1 UID: 0 PID: 5840 Comm: syz-executor254 Tainted: G      D             syzkaller #1 PREEMPT(full) 
[   71.285537][ T5840] Tainted: [D]=DIE
[   71.285539][ T5840] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   71.285544][ T5840] RIP: 0010:subdev_open+0x1bc/0x430
[   71.300262][ T5840] Code: 83 7d 00 00 0f 84 aa 00 00 00 4c 89 e0 48 c1 e8 03 80 3c 28 00 74 08 4c 89 e7 e8 5f 85 42 fa 49 8b 1c 24 48 89 d8 48 c1 e8 03 <80> 3c 28 00 74 08 48 89 df e8 46 85 42 fa 4c 8b 2b 4d 85 ed 74 7b
[   71.306687][ T5840] RSP: 0018:ffffc900039cf830 EFLAGS: 00010246
[   71.308722][ T5840] RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffffffff9a7e1503
[   71.311539][ T5840] RDX: 0000000000000000 RSI: ffffffff8c321560 RDI: 00000000ffffffff
[   71.314218][ T5840] RBP: dffffc0000000000 R08: ffffffff90608a37 R09: 1ffffffff20c1146
[   71.316861][ T5840] R10: dffffc0000000000 R11: fffffbfff20c1147 R12: ffff88818e7a8020
[   71.319493][ T5840] R13: ffff88818d82d3d0 R14: ffff88818d03a400 R15: ffff8881fe95f500
[   71.322124][ T5840] FS:  00007fbc922e06c0(0000) GS:ffff8882e86f3000(0000) knlGS:0000000000000000
[   71.325062][ T5840] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   71.327221][ T5840] CR2: 00007fe44d9ad43c CR3: 00000001fc981000 CR4: 0000000000352ef0
[   71.329817][ T5840] Call Trace:
[   71.330961][ T5840]  <TASK>
[   71.331964][ T5840]  v4l2_open+0x1bc/0x3a0
[   71.333406][ T5840]  chrdev_open+0x4d9/0x600
[   71.334970][ T5840]  ? __pfx_chrdev_open+0x10/0x10
[   71.336637][ T5840]  ? fsnotify_open_perm_and_set_mode+0x113/0x620
[   71.338681][ T5840]  ? __pfx_chrdev_open+0x10/0x10
[   71.340310][ T5840]  do_dentry_open+0x816/0x1380
[   71.341925][ T5840]  vfs_open+0x3b/0x340
[   71.343266][ T5840]  ? path_openat+0x2e2d/0x3830
[   71.344886][ T5840]  path_openat+0x2e44/0x3830
[   71.346494][ T5840]  ? kasan_save_track+0x3e/0x80
[   71.348091][ T5840]  ? do_sys_openat2+0xcc/0x200
[   71.349657][ T5840]  ? entry_SYSCALL_64_after_hwframe+0x77/0x7f
[   71.351638][ T5840]  do_file_open+0x23e/0x4a0
[   71.353159][ T5840]  ? __pfx_do_file_open+0x10/0x10
[   71.354808][ T5840]  ? _raw_spin_unlock+0x28/0x50
[   71.356447][ T5840]  ? alloc_fd+0x651/0x6c0
[   71.357920][ T5840]  do_sys_openat2+0x115/0x200
[   71.359502][ T5840]  ? __pfx_do_sys_openat2+0x10/0x10
[   71.361241][ T5840]  ? rcu_is_watching+0x15/0xb0
[   71.362858][ T5840]  __x64_sys_openat+0x138/0x170
[   71.364478][ T5840]  ? entry_SYSCALL_64_after_hwframe+0x77/0x7f
[   71.366527][ T5840]  do_syscall_64+0x174/0x580
[   71.368065][ T5840]  ? clear_bhb_loop+0x40/0x90
[   71.369621][ T5840]  entry_SYSCALL_64_after_hwframe+0x77/0x7f
[   71.371538][ T5840] RIP: 0033:0x7fbc93b3dc9e
[   71.373003][ T5840] Code: 08 0f 85 f5 e2 ff ff 49 89 fb 48 89 f0 48 89 d7 48 89 ce 4c 89 c2 4d 89 ca 4c 8b 44 24 08 4c 8b 4c 24 10 4c 89 5c 24 08 0f 05 <c3> 90 41 57 41 56 4d 89 c6 41 55 4d 89 cd 41 54 55 53 48 83 ec 08
[   71.379293][ T5840] RSP: 002b:00007fbc922e0128 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
[   71.382033][ T5840] RAX: ffffffffffffffda RBX: 00007fbc922e06c0 RCX: 00007fbc93b3dc9e
[   71.384668][ T5840] RDX: 0000000000000802 RSI: 00007fbc922e01e0 RDI: ffffffffffffff9c
[   71.387322][ T5840] RBP: 00007fbc922e01e0 R08: 0000000000000000 R09: 0000000000000000
[   71.389916][ T5840] R10: 0000000000000000 R11: 0000000000000246 R12: 00007fbc93b8809b
[   71.392526][ T5840] R13: 0000000000000000 R14: 00007fff715a0080 R15: 00007fff715a0168
[   71.395133][ T5840]  </TASK>
[   71.396174][ T5840] Modules linked in:
[   71.397566][ T5846] Oops: general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#8] SMP KASAN NOPTI
[   71.397704][ T5840] ---[ end trace 0000000000000000 ]---
[   71.402097][ T5846] KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007]
[   71.406942][ T5846] CPU: 0 UID: 0 PID: 5846 Comm: syz-executor254 Tainted: G      D             syzkaller #1 PREEMPT(full) 
[   71.410983][ T5846] Tainted: [D]=DIE
[   71.412376][ T5846] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   71.416083][ T5846] RIP: 0010:subdev_open+0x1bc/0x430
[   71.417979][ T5846] Code: 83 7d 00 00 0f 84 aa 00 00 00 4c 89 e0 48 c1 e8 03 80 3c 28 00 74 08 4c 89 e7 e8 5f 85 42 fa 49 8b 1c 24 48 89 d8 48 c1 e8 03 <80> 3c 28 00 74 08 48 89 df e8 46 85 42 fa 4c 8b 2b 4d 85 ed 74 7b
[   71.425034][ T5846] RSP: 0018:ffffc9000396f830 EFLAGS: 00010246
[   71.427459][ T5846] RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffffffff9a7e1503
[   71.430394][ T5846] RDX: 0000000000000000 RSI: ffffffff8c321560 RDI: 00000000ffffffff
[   71.433370][ T5846] RBP: dffffc0000000000 R08: ffffffff90608a37 R09: 1ffffffff20c1146
[   71.436217][ T5846] R10: dffffc0000000000 R11: fffffbfff20c1147 R12: ffff88818e7a8020
[   71.439162][ T5846] R13: ffff88818d82d3d0 R14: ffff888115c6f000 R15: ffff88810b471a40
[   71.442049][ T5846] FS:  00007fbc8f2da6c0(0000) GS:ffff8881a50f3000(0000) knlGS:0000000000000000
[   71.445355][ T5846] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   71.447931][ T5846] CR2: 0000563d8e4723b0 CR3: 00000001fc981000 CR4: 0000000000352ef0
[   71.450891][ T5846] Call Trace:
[   71.452138][ T5846]  <TASK>
[   71.453270][ T5846]  v4l2_open+0x1bc/0x3a0
[   71.454875][ T5846]  chrdev_open+0x4d9/0x600
[   71.456570][ T5846]  ? __pfx_chrdev_open+0x10/0x10
[   71.458420][ T5846]  ? fsnotify_open_perm_and_set_mode+0x113/0x620
[   71.460795][ T5846]  ? __pfx_chrdev_open+0x10/0x10
[   71.462712][ T5846]  do_dentry_open+0x816/0x1380
[   71.464529][ T5846]  vfs_open+0x3b/0x340
[   71.466123][ T5846]  ? path_openat+0x2e2d/0x3830
[   71.467980][ T5846]  path_openat+0x2e44/0x3830
[   71.469697][ T5846]  ? kasan_save_track+0x3e/0x80
[   71.471579][ T5846]  ? do_sys_openat2+0xcc/0x200
[   71.473350][ T5846]  ? entry_SYSCALL_64_after_hwframe+0x77/0x7f
[   71.475575][ T5846]  do_file_open+0x23e/0x4a0
[   71.477119][ T5846]  ? __pfx_do_file_open+0x10/0x10
[   71.478802][ T5846]  ? _raw_spin_unlock+0x28/0x50
[   71.480425][ T5846]  ? alloc_fd+0x651/0x6c0
[   71.482011][ T5846]  do_sys_openat2+0x115/0x200
[   71.483776][ T5846]  ? __pfx_do_sys_openat2+0x10/0x10
[   71.485730][ T5846]  ? rcu_is_watching+0x15/0xb0
[   71.487464][ T5846]  __x64_sys_openat+0x138/0x170
[   71.489152][ T5846]  ? entry_SYSCALL_64_after_hwframe+0x77/0x7f
[   71.491401][ T5846]  do_syscall_64+0x174/0x580
[   71.493142][ T5846]  ? trace_irq_disable+0x3b/0x140
[   71.495108][ T5846]  ? clear_bhb_loop+0x40/0x90
[   71.496830][ T5846]  entry_SYSCALL_64_after_hwframe+0x77/0x7f
[   71.499052][ T5846] RIP: 0033:0x7fbc93b3dc9e
[   71.500695][ T5846] Code: 08 0f 85 f5 e2 ff ff 49 89 fb 48 89 f0 48 89 d7 48 89 ce 4c 89 c2 4d 89 ca 4c 8b 44 24 08 4c 8b 4c 24 10 4c 89 5c 24 08 0f 05 <c3> 90 41 57 41 56 4d 89 c6 41 55 4d 89 cd 41 54 55 53 48 83 ec 08
[   71.507351][ T5846] RSP: 002b:00007fbc8f2da128 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
[   71.510080][ T5846] RAX: ffffffffffffffda RBX: 00007fbc8f2da6c0 RCX: 00007fbc93b3dc9e
[   71.512706][ T5846] RDX: 0000000000000802 RSI: 00007fbc8f2da1e0 RDI: ffffffffffffff9c
[   71.515370][ T5846] RBP: 00007fbc8f2da1e0 R08: 0000000000000000 R09: 0000000000000000
[   71.518032][ T5846] R10: 0000000000000000 R11: 0000000000000246 R12: 00007fbc93b8809b
[   71.520629][ T5846] R13: 0000000000000000 R14: 00007fff715a0080 R15: 00007fff715a0168
[   71.523256][ T5846]  </TASK>
[   71.524323][ T5846] Modules linked in:
[   71.525815][ T5852] Oops: general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#9] SMP KASAN NOPTI
[   71.525822][ T5846] ---[ end trace 0000000000000000 ]---
[   71.525830][ T5852] KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007]
[   71.534330][ T5852] CPU: 1 UID: 0 PID: 5852 Comm: syz-executor254 Tainted: G      D             syzkaller #1 PREEMPT(full) 
[   71.538202][ T5852] Tainted: [D]=DIE
[   71.539447][ T5852] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   71.542817][ T5852] RIP: 0010:subdev_open+0x1bc/0x430
[   71.544557][ T5852] Code: 83 7d 00 00 0f 84 aa 00 00 00 4c 89 e0 48 c1 e8 03 80 3c 28 00 74 08 4c 89 e7 e8 5f 85 42 fa 49 8b 1c 24 48 89 d8 48 c1 e8 03 <80> 3c 28 00 74 08 48 89 df e8 46 85 42 fa 4c 8b 2b 4d 85 ed 74 7b
[   71.550992][ T5852] RSP: 0018:ffffc9000388f830 EFLAGS: 00010246
[   71.553040][ T5852] RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffffffff9a7e1503
[   71.555722][ T5852] RDX: 0000000000000000 RSI: ffffffff8c321560 RDI: 00000000ffffffff
[   71.558426][ T5852] RBP: dffffc0000000000 R08: ffffffff90608a37 R09: 1ffffffff20c1146
[   71.561061][ T5852] R10: dffffc0000000000 R11: fffffbfff20c1147 R12: ffff88818e7a8020
[   71.563694][ T5852] R13: ffff88818d82d3d0 R14: ffff88818d03b000 R15: ffff888195463dc0
[   71.566317][ T5852] FS:  00007fbc8c2d46c0(0000) GS:ffff8882e86f3000(0000) knlGS:0000000000000000
[   71.569295][ T5852] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   71.571432][ T5852] CR2: 00007fe44d9ad43c CR3: 00000001fc981000 CR4: 0000000000352ef0
[   71.574060][ T5852] Call Trace:
[   71.575273][ T5852]  <TASK>
[   71.576307][ T5852]  v4l2_open+0x1bc/0x3a0
[   71.577789][ T5852]  chrdev_open+0x4d9/0x600
[   71.579303][ T5852]  ? __pfx_chrdev_open+0x10/0x10
[   71.580961][ T5852]  ? fsnotify_open_perm_and_set_mode+0x113/0x620
[   71.583036][ T5852]  ? __pfx_chrdev_open+0x10/0x10
[   71.584674][ T5852]  do_dentry_open+0x816/0x1380
[   71.586295][ T5852]  vfs_open+0x3b/0x340
[   71.587639][ T5852]  ? path_openat+0x2e2d/0x3830
[   71.589189][ T5852]  path_openat+0x2e44/0x3830
[   71.590705][ T5852]  ? kasan_save_track+0x3e/0x80
[   71.592317][ T5852]  ? do_sys_openat2+0xcc/0x200
[   71.593883][ T5852]  ? entry_SYSCALL_64_after_hwframe+0x77/0x7f
[   71.595965][ T5852]  do_file_open+0x23e/0x4a0
[   71.597588][ T5852]  ? __pfx_do_file_open+0x10/0x10
[   71.599290][ T5852]  ? _raw_spin_unlock+0x28/0x50
[   71.600947][ T5852]  ? alloc_fd+0x651/0x6c0
[   71.602399][ T5852]  do_sys_openat2+0x115/0x200
[   71.603983][ T5852]  ? __pfx_do_sys_openat2+0x10/0x10
[   71.605803][ T5852]  ? rcu_is_watching+0x15/0xb0
[   71.607390][ T5852]  __x64_sys_openat+0x138/0x170
[   71.609009][ T5852]  ? entry_SYSCALL_64_after_hwframe+0x77/0x7f
[   71.610990][ T5852]  do_syscall_64+0x174/0x580
[   71.612546][ T5852]  ? trace_irq_disable+0x3b/0x140
[   71.614213][ T5852]  ? clear_bhb_loop+0x40/0x90
[   71.615848][ T5852]  entry_SYSCALL_64_after_hwframe+0x77/0x7f
[   71.617817][ T5852] RIP: 0033:0x7fbc93b3dc9e
[   71.619320][ T5852] Code: 08 0f 85 f5 e2 ff ff 49 89 fb 48 89 f0 48 89 d7 48 89 ce 4c 89 c2 4d 89 ca 4c 8b 44 24 08 4c 8b 4c 24 10 4c 89 5c 24 08 0f 05 <c3> 90 41 57 41 56 4d 89 c6 41 55 4d 89 cd 41 54 55 53 48 83 ec 08
[   71.625499][ T5852] RSP: 002b:00007fbc8c2d4128 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
[   71.628175][ T5852] RAX: ffffffffffffffda RBX: 00007fbc8c2d46c0 RCX: 00007fbc93b3dc9e
[   71.630684][ T5852] RDX: 0000000000000802 RSI: 00007fbc8c2d41e0 RDI: ffffffffffffff9c
[   71.633205][ T5852] RBP: 00007fbc8c2d41e0 R08: 0000000000000000 R09: 0000000000000000
[   71.635785][ T5852] R10: 0000000000000000 R11: 0000000000000246 R12: 00007fbc93b8809b
[   71.638356][ T5852] R13: 0000000000000000 R14: 00007fff715a0080 R15: 00007fff715a0168
[   71.640989][ T5852]  </TASK>
[   71.642026][ T5852] Modules linked in:
[   71.643371][ T5851] Oops: general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#10] SMP KASAN NOPTI
[   71.643584][ T5852] ---[ end trace 0000000000000000 ]---
[   71.647320][ T5851] KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007]
[   71.647336][ T5851] CPU: 0 UID: 0 PID: 5851 Comm: syz-executor254 Tainted: G      D             syzkaller #1 PREEMPT(full) 
[   71.647346][ T5851] Tainted: [D]=DIE
[   71.647349][ T5851] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   71.647353][ T5851] RIP: 0010:subdev_open+0x1bc/0x430
[   71.647368][ T5851] Code: 83 7d 00 00 0f 84 aa 00 00 00 4c 89 e0 48 c1 e8 03 80 3c 28 00 74 08 4c 89 e7 e8 5f 85 42 fa 49 8b 1c 24 48 89 d8 48 c1 e8 03 <80> 3c 28 00 74 08 48 89 df e8 46 85 42 fa 4c 8b 2b 4d 85 ed 74 7b
[   71.647374][ T5851] RSP: 0018:ffffc9000389f830 EFLAGS: 00010246
[   71.647382][ T5851] RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffffffff9a7e1503
[   71.647387][ T5851] RDX: 0000000000000000 RSI: ffffffff8c321560 RDI: 00000000ffffffff
[   71.647392][ T5851] RBP: dffffc0000000000 R08: ffffffff90608a37 R09: 1ffffffff20c1146
[   71.647397][ T5851] R10: dffffc0000000000 R11: fffffbfff20c1147 R12: ffff88818e7a8020
[   71.647402][ T5851] R13: ffff88818d82d3d0 R14: ffff888115c6c000 R15: ffff88810b471500
[   71.647407][ T5851] FS:  00007fbc8cad56c0(0000) GS:ffff8881a50f3000(0000) knlGS:0000000000000000
[   71.647413][ T5851] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   71.647419][ T5851] CR2: 00007f8158bf37b0 CR3: 00000001fc981000 CR4: 0000000000352ef0
[   71.690625][ T5851] Call Trace:
[   71.691763][ T5851]  <TASK>
[   71.692734][ T5851]  v4l2_open+0x1bc/0x3a0
[   71.694184][ T5851]  chrdev_open+0x4d9/0x600
[   71.695693][ T5851]  ? __pfx_chrdev_open+0x10/0x10
[   71.697361][ T5851]  ? fsnotify_open_perm_and_set_mode+0x113/0x620
[   71.699444][ T5851]  ? __pfx_chrdev_open+0x10/0x10
[   71.701110][ T5851]  do_dentry_open+0x816/0x1380
[   71.702686][ T5851]  vfs_open+0x3b/0x340
[   71.704039][ T5851]  ? path_openat+0x2e2d/0x3830
[   71.705663][ T5851]  path_openat+0x2e44/0x3830
[   71.707222][ T5851]  ? kasan_save_track+0x3e/0x80
[   71.708853][ T5851]  ? do_sys_openat2+0xcc/0x200
[   71.710422][ T5851]  ? entry_SYSCALL_64_after_hwframe+0x77/0x7f
[   71.712464][ T5851]  do_file_open+0x23e/0x4a0
[   71.713999][ T5851]  ? __pfx_do_file_open+0x10/0x10
[   71.715703][ T5851]  ? _raw_spin_unlock+0x28/0x50
[   71.717325][ T5851]  ? alloc_fd+0x651/0x6c0
[   71.718769][ T5851]  do_sys_openat2+0x115/0x200
[   71.720362][ T5851]  ? __pfx_do_sys_openat2+0x10/0x10
[   71.722077][ T5851]  ? rcu_is_watching+0x15/0xb0
[   71.723632][ T5851]  __x64_sys_openat+0x138/0x170
[   71.725274][ T5851]  ? entry_SYSCALL_64_after_hwframe+0x77/0x7f
[   71.727210][ T5851]  do_syscall_64+0x174/0x580
[   71.728756][ T5851]  ? clear_bhb_loop+0x40/0x90
[   71.730341][ T5851]  entry_SYSCALL_64_after_hwframe+0x77/0x7f
[   71.732351][ T5851] RIP: 0033:0x7fbc93b3dc9e
[   71.733870][ T5851] Code: 08 0f 85 f5 e2 ff ff 49 89 fb 48 89 f0 48 89 d7 48 89 ce 4c 89 c2 4d 89 ca 4c 8b 44 24 08 4c 8b 4c 24 10 4c 89 5c 24 08 0f 05 <c3> 90 41 57 41 56 4d 89 c6 41 55 4d 89 cd 41 54 55 53 48 83 ec 08
[   71.740379][ T5851] RSP: 002b:00007fbc8cad5128 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
[   71.743188][ T5851] RAX: ffffffffffffffda RBX: 00007fbc8cad56c0 RCX: 00007fbc93b3dc9e
[   71.745806][ T5851] RDX: 0000000000000802 RSI: 00007fbc8cad51e0 RDI: ffffffffffffff9c
[   71.748440][ T5851] RBP: 00007fbc8cad51e0 R08: 0000000000000000 R09: 0000000000000000
[   71.751061][ T5851] R10: 0000000000000000 R11: 0000000000000246 R12: 00007fbc93b8809b
[   71.753645][ T5851] R13: 0000000000000000 R14: 00007fff715a0080 R15: 00007fff715a0168
[   71.756266][ T5851]  </TASK>
[   71.757315][ T5851] Modules linked in:
[   71.758711][ T5845] Oops: general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#11] SMP KASAN NOPTI
[   71.759376][ T5851] ---[ end trace 0000000000000000 ]---
[   71.763014][ T5845] KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007]
[   71.763029][ T5845] CPU: 1 UID: 0 PID: 5845 Comm: syz-executor254 Tainted: G      D             syzkaller #1 PREEMPT(full) 
[   71.763040][ T5845] Tainted: [D]=DIE
[   71.763043][ T5845] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   71.763048][ T5845] RIP: 0010:subdev_open+0x1bc/0x430
[   71.763065][ T5845] Code: 83 7d 00 00 0f 84 aa 00 00 00 4c 89 e0 48 c1 e8 03 80 3c 28 00 74 08 4c 89 e7 e8 5f 85 42 fa 49 8b 1c 24 48 89 d8 48 c1 e8 03 <80> 3c 28 00 74 08 48 89 df e8 46 85 42 fa 4c 8b 2b 4d 85 ed 74 7b
[   71.763071][ T5845] RSP: 0018:ffffc9000397f830 EFLAGS: 00010246
[   71.763079][ T5845] RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffffffff9a7e1503
[   71.763084][ T5845] RDX: 0000000000000000 RSI: ffffffff8c321560 RDI: 00000000ffffffff
[   71.763089][ T5845] RBP: dffffc0000000000 R08: ffffffff90608a37 R09: 1ffffffff20c1146
[   71.763094][ T5845] R10: dffffc0000000000 R11: fffffbfff20c1147 R12: ffff88818e7a8020
[   71.763099][ T5845] R13: ffff88818d82d3d0 R14: ffff888191078800 R15: ffff8881feccee00
[   71.763104][ T5845] FS:  00007fbc8fadb6c0(0000) GS:ffff8882e86f3000(0000) knlGS:0000000000000000
[   71.763111][ T5845] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   71.763115][ T5845] CR2: 00007fe44d9ad43c CR3: 00000001fc981000 CR4: 0000000000352ef0
[   71.763142][ T5845] Call Trace:
[   71.808673][ T5845]  <TASK>
[   71.809800][ T5845]  v4l2_open+0x1bc/0x3a0
[   71.811404][ T5845]  chrdev_open+0x4d9/0x600
[   71.813134][ T5845]  ? __pfx_chrdev_open+0x10/0x10
[   71.814810][ T5845]  ? fsnotify_open_perm_and_set_mode+0x113/0x620
[   71.816921][ T5845]  ? __pfx_chrdev_open+0x10/0x10
[   71.818532][ T5845]  do_dentry_open+0x816/0x1380
[   71.820062][ T5845]  vfs_open+0x3b/0x340
[   71.821373][ T5845]  ? path_openat+0x2e2d/0x3830
[   71.822915][ T5845]  path_openat+0x2e44/0x3830
[   71.824446][ T5845]  ? kasan_save_track+0x3e/0x80
[   71.826107][ T5845]  ? do_sys_openat2+0xcc/0x200
[   71.827697][ T5845]  ? entry_SYSCALL_64_after_hwframe+0x77/0x7f
[   71.829691][ T5845]  do_file_open+0x23e/0x4a0
[   71.831192][ T5845]  ? __pfx_do_file_open+0x10/0x10
[   71.832833][ T5845]  ? _raw_spin_unlock+0x28/0x50
[   71.834444][ T5845]  ? alloc_fd+0x651/0x6c0
[   71.836115][ T5845]  do_sys_openat2+0x115/0x200
[   71.837683][ T5845]  ? __pfx_do_sys_openat2+0x10/0x10
[   71.839374][ T5845]  ? rcu_is_watching+0x15/0xb0
[   71.840954][ T5845]  __x64_sys_openat+0x138/0x170
[   71.842604][ T5845]  ? entry_SYSCALL_64_after_hwframe+0x77/0x7f
[   71.844628][ T5845]  do_syscall_64+0x174/0x580
[   71.846259][ T5845]  ? trace_irq_disable+0x3b/0x140
[   71.847913][ T5845]  ? clear_bhb_loop+0x40/0x90
[   71.849457][ T5845]  entry_SYSCALL_64_after_hwframe+0x77/0x7f
[   71.851395][ T5845] RIP: 0033:0x7fbc93b3dc9e
[   71.852847][ T5845] Code: 08 0f 85 f5 e2 ff ff 49 89 fb 48 89 f0 48 89 d7 48 89 ce 4c 89 c2 4d 89 ca 4c 8b 44 24 08 4c 8b 4c 24 10 4c 89 5c 24 08 0f 05 <c3> 90 41 57 41 56 4d 89 c6 41 55 4d 89 cd 41 54 55 53 48 83 ec 08
[   71.859078][ T5845] RSP: 002b:00007fbc8fadb128 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
[   71.861809][ T5845] RAX: ffffffffffffffda RBX: 00007fbc8fadb6c0 RCX: 00007fbc93b3dc9e
[   71.864396][ T5845] RDX: 0000000000000802 RSI: 00007fbc8fadb1e0 RDI: ffffffffffffff9c
[   71.867022][ T5845] RBP: 00007fbc8fadb1e0 R08: 0000000000000000 R09: 0000000000000000
[   71.869584][ T5845] R10: 0000000000000000 R11: 0000000000000246 R12: 00007fbc93b8809b
[   71.872174][ T5845] R13: 0000000000000000 R14: 00007fff715a0080 R15: 00007fff715a0168
[   71.874703][ T5845]  </TASK>
[   71.875745][ T5845] Modules linked in:
[   71.877091][ T5853] Oops: general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#12] SMP KASAN NOPTI
[   71.877124][ T5845] ---[ end trace 0000000000000000 ]---
[   71.880988][ T5853] KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007]
[   71.885574][ T5853] CPU: 0 UID: 0 PID: 5853 Comm: syz-executor254 Tainted: G      D             syzkaller #1 PREEMPT(full) 
[   71.889293][ T5853] Tainted: [D]=DIE
[   71.890564][ T5853] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   71.893917][ T5853] RIP: 0010:subdev_open+0x1bc/0x430
[   71.895700][ T5853] Code: 83 7d 00 00 0f 84 aa 00 00 00 4c 89 e0 48 c1 e8 03 80 3c 28 00 74 08 4c 89 e7 e8 5f 85 42 fa 49 8b 1c 24 48 89 d8 48 c1 e8 03 <80> 3c 28 00 74 08 48 89 df e8 46 85 42 fa 4c 8b 2b 4d 85 ed 74 7b
[   71.902192][ T5853] RSP: 0018:ffffc9000387f830 EFLAGS: 00010246
[   71.904202][ T5853] RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffffffff9a7e1503
[   71.906993][ T5853] RDX: 0000000000000000 RSI: ffffffff8c321560 RDI: 00000000ffffffff
[   71.909653][ T5853] RBP: dffffc0000000000 R08: ffffffff90608a37 R09: 1ffffffff20c1146
[   71.912317][ T5853] R10: dffffc0000000000 R11: fffffbfff20c1147 R12: ffff88818e7a8020
[   71.915019][ T5853] R13: ffff88818d82d3d0 R14: ffff888114e51400 R15: ffff88810b471180
[   71.917633][ T5853] FS:  00007fbc8bad36c0(0000) GS:ffff8881a50f3000(0000) knlGS:0000000000000000
[   71.920575][ T5853] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   71.922746][ T5853] CR2: 00007f8158bf37b0 CR3: 00000001fc981000 CR4: 0000000000352ef0
[   71.925460][ T5853] Call Trace:
[   71.926606][ T5853]  <TASK>
[   71.927593][ T5853]  v4l2_open+0x1bc/0x3a0
[   71.929042][ T5853]  chrdev_open+0x4d9/0x600
[   71.930507][ T5853]  ? __pfx_chrdev_open+0x10/0x10
[   71.932148][ T5853]  ? fsnotify_open_perm_and_set_mode+0x113/0x620
[   71.934235][ T5853]  ? __pfx_chrdev_open+0x10/0x10
[   71.935912][ T5853]  do_dentry_open+0x816/0x1380
[   71.937514][ T5853]  vfs_open+0x3b/0x340
[   71.938866][ T5853]  ? path_openat+0x2e2d/0x3830
[   71.940472][ T5853]  path_openat+0x2e44/0x3830
[   71.941984][ T5853]  ? kasan_save_track+0x3e/0x80
[   71.943588][ T5853]  ? do_sys_openat2+0xcc/0x200
[   71.945181][ T5853]  ? entry_SYSCALL_64_after_hwframe+0x77/0x7f
[   71.947150][ T5853]  do_file_open+0x23e/0x4a0
[   71.948616][ T5853]  ? __pfx_do_file_open+0x10/0x10
[   71.950281][ T5853]  ? _raw_spin_unlock+0x28/0x50
[   71.951915][ T5853]  ? alloc_fd+0x651/0x6c0
[   71.953341][ T5853]  do_sys_openat2+0x115/0x200
[   71.954909][ T5853]  ? __pfx_do_sys_openat2+0x10/0x10
[   71.956666][ T5853]  ? rcu_is_watching+0x15/0xb0
[   71.958264][ T5853]  __x64_sys_openat+0x138/0x170
[   71.959885][ T5853]  ? entry_SYSCALL_64_after_hwframe+0x77/0x7f
[   71.961906][ T5853]  do_syscall_64+0x174/0x580
[   71.963443][ T5853]  ? trace_irq_disable+0x3b/0x140
[   71.965204][ T5853]  ? clear_bhb_loop+0x40/0x90
[   71.967058][ T5853]  entry_SYSCALL_64_after_hwframe+0x77/0x7f
[   71.968996][ T5853] RIP: 0033:0x7fbc93b3dc9e
[   71.970496][ T5853] Code: 08 0f 85 f5 e2 ff ff 49 89 fb 48 89 f0 48 89 d7 48 89 ce 4c 89 c2 4d 89 ca 4c 8b 44 24 08 4c 8b 4c 24 10 4c 89 5c 24 08 0f 05 <c3> 90 41 57 41 56 4d 89 c6 41 55 4d 89 cd 41 54 55 53 48 83 ec 08
[   71.976817][ T5853] RSP: 002b:00007fbc8bad3128 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
[   71.979626][ T5853] RAX: ffffffffffffffda RBX: 00007fbc8bad36c0 RCX: 00007fbc93b3dc9e
[   71.982257][ T5853] RDX: 0000000000000802 RSI: 00007fbc8bad31e0 RDI: ffffffffffffff9c
[   71.984915][ T5853] RBP: 00007fbc8bad31e0 R08: 0000000000000000 R09: 0000000000000000
[   71.987612][ T5853] R10: 0000000000000000 R11: 0000000000000246 R12: 00007fbc93b8809b
[   71.990264][ T5853] R13: 0000000000000000 R14: 00007fff715a0080 R15: 00007fff715a0168
[   71.992871][ T5853]  </TASK>
[   71.993956][ T5853] Modules linked in:
[   71.995427][ T5838] Oops: general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#13] SMP KASAN NOPTI
[   71.995471][ T5853] ---[ end trace 0000000000000000 ]---
[   71.999354][ T5838] KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007]
[   72.003877][ T5838] CPU: 1 UID: 0 PID: 5838 Comm: syz-executor254 Tainted: G      D             syzkaller #1 PREEMPT(full) 
[   72.007578][ T5838] Tainted: [D]=DIE
[   72.008820][ T5838] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   72.012093][ T5838] RIP: 0010:subdev_open+0x1bc/0x430
[   72.013794][ T5838] Code: 83 7d 00 00 0f 84 aa 00 00 00 4c 89 e0 48 c1 e8 03 80 3c 28 00 74 08 4c 89 e7 e8 5f 85 42 fa 49 8b 1c 24 48 89 d8 48 c1 e8 03 <80> 3c 28 00 74 08 48 89 df e8 46 85 42 fa 4c 8b 2b 4d 85 ed 74 7b
[   72.020287][ T5838] RSP: 0018:ffffc900039ef830 EFLAGS: 00010246
[   72.022360][ T5838] RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffffffff9a7e1503
[   72.025103][ T5838] RDX: 0000000000000000 RSI: ffffffff8c321560 RDI: 00000000ffffffff
[   72.027976][ T5838] RBP: dffffc0000000000 R08: ffffffff90608a37 R09: 1ffffffff20c1146
[   72.030887][ T5838] R10: dffffc0000000000 R11: fffffbfff20c1147 R12: ffff88818e7a8020
[   72.033868][ T5838] R13: ffff88818d82d3d0 R14: ffff888191078000 R15: ffff88819505cc40
[   72.036711][ T5838] FS:  00007fbc932e26c0(0000) GS:ffff8882e86f3000(0000) knlGS:0000000000000000
[   72.039667][ T5838] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   72.041846][ T5838] CR2: 00007fe44d9ad43c CR3: 00000001fc981000 CR4: 0000000000352ef0
[   72.044628][ T5838] Call Trace:
[   72.045831][ T5838]  <TASK>
[   72.046854][ T5838]  v4l2_open+0x1bc/0x3a0
[   72.048299][ T5838]  chrdev_open+0x4d9/0x600
[   72.049770][ T5838]  ? __pfx_chrdev_open+0x10/0x10
[   72.051430][ T5838]  ? fsnotify_open_perm_and_set_mode+0x113/0x620
[   72.053559][ T5838]  ? __pfx_chrdev_open+0x10/0x10
[   72.055260][ T5838]  do_dentry_open+0x816/0x1380
[   72.056862][ T5838]  vfs_open+0x3b/0x340
[   72.058248][ T5838]  ? path_openat+0x2e2d/0x3830
[   72.059822][ T5838]  path_openat+0x2e44/0x3830
[   72.061344][ T5838]  ? kasan_save_track+0x3e/0x80
[   72.062958][ T5838]  ? do_sys_openat2+0xcc/0x200
[   72.064547][ T5838]  ? entry_SYSCALL_64_after_hwframe+0x77/0x7f
[   72.066628][ T5838]  do_file_open+0x23e/0x4a0
[   72.068220][ T5838]  ? __pfx_do_file_open+0x10/0x10
[   72.069957][ T5838]  ? _raw_spin_unlock+0x28/0x50
[   72.071579][ T5838]  ? alloc_fd+0x651/0x6c0
[   72.073029][ T5838]  do_sys_openat2+0x115/0x200
[   72.074573][ T5838]  ? __pfx_do_sys_openat2+0x10/0x10
[   72.076336][ T5838]  ? rcu_is_watching+0x15/0xb0
[   72.077940][ T5838]  __x64_sys_openat+0x138/0x170
[   72.079530][ T5838]  ? entry_SYSCALL_64_after_hwframe+0x77/0x7f
[   72.081536][ T5838]  do_syscall_64+0x174/0x580
[   72.083085][ T5838]  ? trace_irq_disable+0x3b/0x140
[   72.084765][ T5838]  ? clear_bhb_loop+0x40/0x90
[   72.086366][ T5838]  entry_SYSCALL_64_after_hwframe+0x77/0x7f
[   72.088346][ T5838] RIP: 0033:0x7fbc93b3dc9e
[   72.089832][ T5838] Code: 08 0f 85 f5 e2 ff ff 49 89 fb 48 89 f0 48 89 d7 48 89 ce 4c 89 c2 4d 89 ca 4c 8b 44 24 08 4c 8b 4c 24 10 4c 89 5c 24 08 0f 05 <c3> 90 41 57 41 56 4d 89 c6 41 55 4d 89 cd 41 54 55 53 48 83 ec 08
[   72.096189][ T5838] RSP: 002b:00007fbc932e2128 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
[   72.098974][ T5838] RAX: ffffffffffffffda RBX: 00007fbc932e26c0 RCX: 00007fbc93b3dc9e
[   72.101551][ T5838] RDX: 0000000000000802 RSI: 00007fbc932e21e0 RDI: ffffffffffffff9c
[   72.104154][ T5838] RBP: 00007fbc932e21e0 R08: 0000000000000000 R09: 0000000000000000
[   72.106818][ T5838] R10: 0000000000000000 R11: 0000000000000246 R12: 00007fbc93b8809b
[   72.109475][ T5838] R13: 0000000000000000 R14: 00007fff715a0080 R15: 00007fff715a0168
[   72.112082][ T5838]  </TASK>
[   72.113119][ T5838] Modules linked in:
[   72.114484][ T5848] Oops: general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#14] SMP KASAN NOPTI
[   72.114639][ T5838] ---[ end trace 0000000000000000 ]---
[   72.118481][ T5848] KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007]
[   72.118499][ T5848] CPU: 0 UID: 0 PID: 5848 Comm: syz-executor254 Tainted: G      D             syzkaller #1 PREEMPT(full) 
[   72.118509][ T5848] Tainted: [D]=DIE
[   72.118512][ T5848] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   72.118516][ T5848] RIP: 0010:subdev_open+0x1bc/0x430
[   72.132986][ T5848] Code: 83 7d 00 00 0f 84 aa 00 00 00 4c 89 e0 48 c1 e8 03 80 3c 28 00 74 08 4c 89 e7 e8 5f 85 42 fa 49 8b 1c 24 48 89 d8 48 c1 e8 03 <80> 3c 28 00 74 08 48 89 df e8 46 85 42 fa 4c 8b 2b 4d 85 ed 74 7b
[   72.139268][ T5848] RSP: 0018:ffffc900038cf830 EFLAGS: 00010246
[   72.141288][ T5848] RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffffffff9a7e1503
[   72.143907][ T5848] RDX: 0000000000000000 RSI: ffffffff8c321560 RDI: 00000000ffffffff
[   72.146548][ T5848] RBP: dffffc0000000000 R08: ffffffff90608a37 R09: 1ffffffff20c1146
[   72.149154][ T5848] R10: dffffc0000000000 R11: fffffbfff20c1147 R12: ffff88818e7a8020
[   72.151732][ T5848] R13: ffff88818d82d3d0 R14: ffff888114e53800 R15: ffff888115fc6a80
[   72.154358][ T5848] FS:  00007fbc8e2d86c0(0000) GS:ffff8881a50f3000(0000) knlGS:0000000000000000
[   72.157305][ T5848] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   72.159486][ T5848] CR2: 00007f8158bf37b0 CR3: 00000001fc981000 CR4: 0000000000352ef0
[   72.162097][ T5848] Call Trace:
[   72.163221][ T5848]  <TASK>
[   72.164221][ T5848]  v4l2_open+0x1bc/0x3a0
[   72.165688][ T5848]  chrdev_open+0x4d9/0x600
[   72.167174][ T5848]  ? __pfx_chrdev_open+0x10/0x10
[   72.168809][ T5848]  ? fsnotify_open_perm_and_set_mode+0x113/0x620
[   72.170917][ T5848]  ? __pfx_chrdev_open+0x10/0x10
[   72.172563][ T5848]  do_dentry_open+0x816/0x1380
[   72.174147][ T5848]  vfs_open+0x3b/0x340
[   72.175515][ T5848]  ? path_openat+0x2e2d/0x3830
[   72.177116][ T5848]  path_openat+0x2e44/0x3830
[   72.178674][ T5848]  ? kasan_save_track+0x3e/0x80
[   72.180304][ T5848]  ? do_sys_openat2+0xcc/0x200
[   72.181915][ T5848]  ? entry_SYSCALL_64_after_hwframe+0x77/0x7f
[   72.183879][ T5848]  do_file_open+0x23e/0x4a0
[   72.185427][ T5848]  ? __pfx_do_file_open+0x10/0x10
[   72.187107][ T5848]  ? _raw_spin_unlock+0x28/0x50
[   72.188708][ T5848]  ? alloc_fd+0x651/0x6c0
[   72.190152][ T5848]  do_sys_openat2+0x115/0x200
[   72.191703][ T5848]  ? __pfx_do_sys_openat2+0x10/0x10
[   72.193398][ T5848]  ? rcu_is_watching+0x15/0xb0
[   72.194998][ T5848]  __x64_sys_openat+0x138/0x170
[   72.196575][ T5848]  ? entry_SYSCALL_64_after_hwframe+0x77/0x7f
[   72.198527][ T5848]  do_syscall_64+0x174/0x580
[   72.200005][ T5848]  ? trace_irq_disable+0x3b/0x140
[   72.201648][ T5848]  ? clear_bhb_loop+0x40/0x90
[   72.203169][ T5848]  entry_SYSCALL_64_after_hwframe+0x77/0x7f
[   72.205123][ T5848] RIP: 0033:0x7fbc93b3dc9e
[   72.206543][ T5848] Code: 08 0f 85 f5 e2 ff ff 49 89 fb 48 89 f0 48 89 d7 48 89 ce 4c 89 c2 4d 89 ca 4c 8b 44 24 08 4c 8b 4c 24 10 4c 89 5c 24 08 0f 05 <c3> 90 41 57 41 56 4d 89 c6 41 55 4d 89 cd 41 54 55 53 48 83 ec 08
[   72.212710][ T5848] RSP: 002b:00007fbc8e2d8128 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
[   72.215390][ T5848] RAX: ffffffffffffffda RBX: 00007fbc8e2d86c0 RCX: 00007fbc93b3dc9e
[   72.217906][ T5848] RDX: 0000000000000802 RSI: 00007fbc8e2d81e0 RDI: ffffffffffffff9c
[   72.220417][ T5848] RBP: 00007fbc8e2d81e0 R08: 0000000000000000 R09: 0000000000000000
[   72.222954][ T5848] R10: 0000000000000000 R11: 0000000000000246 R12: 00007fbc93b8809b
[   72.225541][ T5848] R13: 0000000000000000 R14: 00007fff715a0080 R15: 00007fff715a0168
[   72.228077][ T5848]  </TASK>
[   72.229100][ T5848] Modules linked in:
[   72.230480][ T5842] Oops: general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#15] SMP KASAN NOPTI
[   72.230622][ T5848] ---[ end trace 0000000000000000 ]---
[   72.234430][ T5842] KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007]
[   72.234447][ T5842] CPU: 1 UID: 0 PID: 5842 Comm: syz-executor254 Tainted: G      D             syzkaller #1 PREEMPT(full) 
[   72.234458][ T5842] Tainted: [D]=DIE
[   72.234461][ T5842] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   72.234465][ T5842] RIP: 0010:subdev_open+0x1bc/0x430
[   72.248779][ T5842] Code: 83 7d 00 00 0f 84 aa 00 00 00 4c 89 e0 48 c1 e8 03 80 3c 28 00 74 08 4c 89 e7 e8 5f 85 42 fa 49 8b 1c 24 48 89 d8 48 c1 e8 03 <80> 3c 28 00 74 08 48 89 df e8 46 85 42 fa 4c 8b 2b 4d 85 ed 74 7b
[   72.255163][ T5842] RSP: 0018:ffffc900039af830 EFLAGS: 00010246
[   72.257127][ T5842] RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffffffff9a7e1503
[   72.259609][ T5842] RDX: 0000000000000000 RSI: ffffffff8c321560 RDI: 00000000ffffffff
[   72.262435][ T5842] RBP: dffffc0000000000 R08: ffffffff90608a37 R09: 1ffffffff20c1146
[   72.265020][ T5842] R10: dffffc0000000000 R11: fffffbfff20c1147 R12: ffff88818e7a8020
[   72.267744][ T5842] R13: ffff88818d82d3d0 R14: ffff88819107b000 R15: ffff8881fe9f2e00
[   72.270292][ T5842] FS:  00007fbc912de6c0(0000) GS:ffff8882e86f3000(0000) knlGS:0000000000000000
[   72.273243][ T5842] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   72.275365][ T5842] CR2: 00007fe44d9dc1d4 CR3: 00000001fc981000 CR4: 0000000000352ef0
[   72.277935][ T5842] Call Trace:
[   72.279047][ T5842]  <TASK>
[   72.280008][ T5842]  v4l2_open+0x1bc/0x3a0
[   72.281438][ T5842]  chrdev_open+0x4d9/0x600
[   72.283001][ T5842]  ? __pfx_chrdev_open+0x10/0x10
[   72.284589][ T5842]  ? fsnotify_open_perm_and_set_mode+0x113/0x620
[   72.286650][ T5842]  ? __pfx_chrdev_open+0x10/0x10
[   72.288304][ T5842]  do_dentry_open+0x816/0x1380
[   72.289863][ T5842]  vfs_open+0x3b/0x340
[   72.291250][ T5842]  ? path_openat+0x2e2d/0x3830
[   72.292880][ T5842]  path_openat+0x2e44/0x3830
[   72.294518][ T5842]  ? kasan_save_track+0x3e/0x80
[   72.296126][ T5842]  ? do_sys_openat2+0xcc/0x200
[   72.297680][ T5842]  ? entry_SYSCALL_64_after_hwframe+0x77/0x7f
[   72.299653][ T5842]  do_file_open+0x23e/0x4a0
[   72.301171][ T5842]  ? __pfx_do_file_open+0x10/0x10
[   72.302792][ T5842]  ? _raw_spin_unlock+0x28/0x50
[   72.304373][ T5842]  ? alloc_fd+0x651/0x6c0
[   72.305831][ T5842]  do_sys_openat2+0x115/0x200
[   72.307374][ T5842]  ? __pfx_do_sys_openat2+0x10/0x10
[   72.309041][ T5842]  ? rcu_is_watching+0x15/0xb0
[   72.310587][ T5842]  __x64_sys_openat+0x138/0x170
[   72.312150][ T5842]  ? entry_SYSCALL_64_after_hwframe+0x77/0x7f
[   72.314086][ T5842]  do_syscall_64+0x174/0x580
[   72.315573][ T5842]  ? trace_irq_disable+0x3b/0x140
[   72.317207][ T5842]  ? clear_bhb_loop+0x40/0x90
[   72.318711][ T5842]  entry_SYSCALL_64_after_hwframe+0x77/0x7f
[   72.320571][ T5842] RIP: 0033:0x7fbc93b3dc9e
[   72.322010][ T5842] Code: 08 0f 85 f5 e2 ff ff 49 89 fb 48 89 f0 48 89 d7 48 89 ce 4c 89 c2 4d 89 ca 4c 8b 44 24 08 4c 8b 4c 24 10 4c 89 5c 24 08 0f 05 <c3> 90 41 57 41 56 4d 89 c6 41 55 4d 89 cd 41 54 55 53 48 83 ec 08
[   72.328135][ T5842] RSP: 002b:00007fbc912de128 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
[   72.330762][ T5842] RAX: ffffffffffffffda RBX: 00007fbc912de6c0 RCX: 00007fbc93b3dc9e
[   72.333316][ T5842] RDX: 0000000000000802 RSI: 00007fbc912de1e0 RDI: ffffffffffffff9c
[   72.335914][ T5842] RBP: 00007fbc912de1e0 R08: 0000000000000000 R09: 0000000000000000
[   72.338410][ T5842] R10: 0000000000000000 R11: 0000000000000246 R12: 00007fbc93b8809b
[   72.341149][ T5842] R13: 0000000000000000 R14: 00007fff715a0080 R15: 00007fff715a0168
[   72.343750][ T5842]  </TASK>
[   72.344787][ T5842] Modules linked in:
[   72.346337][ T5842] ---[ end trace 0000000000000000 ]---
[   72.346473][ T5847] Oops: general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#16] SMP KASAN NOPTI
[   72.352272][ T1376] ieee802154 phy0 wpan0: encryption failed: -22
[   72.352488][ T5847] KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007]
[   72.354520][ T1376] ieee802154 phy1 wpan1: encryption failed: -22
[   72.357251][ T5847] CPU: 0 UID: 0 PID: 5847 Comm: syz-executor254 Tainted: G      D             syzkaller #1 PREEMPT(full) 
[   72.357266][ T5847] Tainted: [D]=DIE
[   72.357269][ T5847] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   72.357274][ T5847] RIP: 0010:subdev_open+0x1bc/0x430
[   72.359516][ T5849] RIP: 0010:subdev_open+0x1bc/0x430
[   72.362815][ T5847] Code: 83 7d 00 00 0f 84 aa 00 00 00 4c 89 e0 48 c1 e8 03 80 3c 28 00 74 08 4c 89 e7 e8 5f 85 42 fa 49 8b 1c 24 48 89 d8 48 c1 e8 03 <80> 3c 28 00 74 08 48 89 df e8 46 85 42 fa 4c 8b 2b 4d 85 ed 74 7b
[   72.362825][ T5847] RSP: 0018:ffffc9000395f830 EFLAGS: 00010246
[   72.362833][ T5847] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
[   72.362838][ T5847] RDX: 0000000000000000 RSI: ffffffff8c321560 RDI: 00000000ffffffff
[   72.362843][ T5847] RBP: dffffc0000000000 R08: ffffffff90608a37 R09: 1ffffffff20c1146
[   72.362848][ T5847] R10: dffffc0000000000 R11: fffffbfff20c1147 R12: ffff88818e7a8020
[   72.362853][ T5847] R13: ffff88818d82d3d0 R14: ffff888114e53c00 R15: ffff888115fc6000
[   72.364051][ T5849] Code: 83 7d 00 00 0f 84 aa 00 00 00 4c 89 e0 48 c1 e8 03 80 3c 28 00 74 08 4c 89 e7 e8 5f 85 42 fa 49 8b 1c 24 48 89 d8 48 c1 e8 03 <80> 3c 28 00 74 08 48 89 df e8 46 85 42 fa 4c 8b 2b 4d 85 ed 74 7b
[   72.367273][ T5847] FS:  00007fbc8ead96c0(0000) GS:ffff8881a50f3000(0000) knlGS:0000000000000000
[   72.367283][ T5847] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   72.367288][ T5847] CR2: 00007f8158bf37b0 CR3: 00000001fc981000 CR4: 0000000000352ef0
[   72.367314][ T5847] Call Trace:
[   72.368968][ T5849] RSP: 0018:ffffc900038bf830 EFLAGS: 00010246
[   72.370646][ T5847]  <TASK>
[   72.376758][ T5849] 
[   72.378697][ T5847]  v4l2_open+0x1bc/0x3a0
[   72.381209][ T5849] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
[   72.383766][ T5847]  chrdev_open+0x4d9/0x600
[   72.390937][ T5849] RDX: 0000000000000000 RSI: ffffffff8e1683c1 RDI: 00000000ffffffff
[   72.391586][ T5847]  ? __pfx_chrdev_open+0x10/0x10
[   72.391604][ T5847]  ? fsnotify_open_perm_and_set_mode+0x113/0x620
[   72.399693][ T5849] RBP: dffffc0000000000 R08: ffffffff90608a37 R09: 1ffffffff20c1146
[   72.400670][ T5847]  ? __pfx_chrdev_open+0x10/0x10
[   72.402859][ T5849] R10: dffffc0000000000 R11: fffffbfff20c1147 R12: ffff88818e7a8020
[   72.405602][ T5847]  do_dentry_open+0x816/0x1380
[   72.405624][ T5847]  vfs_open+0x3b/0x340
[   72.405630][ T5847]  ? path_openat+0x2e2d/0x3830
[   72.405640][ T5847]  path_openat+0x2e44/0x3830
[   72.406761][ T5849] R13: ffff88818d82d3d0 R14: ffff88818d038400 R15: ffff8881ff84c000
[   72.408775][ T5847]  ? kasan_save_track+0x3e/0x80
[   72.409736][ T5849] FS:  00007fbc8dad76c0(0000) GS:ffff8882e86f3000(0000) knlGS:0000000000000000
[   72.410549][ T5847]  ? do_sys_openat2+0xcc/0x200
[   72.411943][ T5849] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   72.414442][ T5847]  ? entry_SYSCALL_64_after_hwframe+0x77/0x7f
[   72.415981][ T5849] CR2: 00007fff538bb318 CR3: 00000001fc981000 CR4: 0000000000352ef0
[   72.418441][ T5847]  do_file_open+0x23e/0x4a0
[   72.420131][ T5849] Kernel panic - not syncing: Fatal exception
[   72.453954][ T5849] Kernel Offset: disabled
[   72.455375][ T5849] Rebooting in 86400 seconds..
 OtherCrashReports:<nil> StraceOutput: TestError:]

386/3 2026/08/07 16:49 action truncate-log
0m Results:
map[TruncatedConsoleOutput:[   72.030887][ T5838] R10: dffffc0000000000 R11: fffffbfff20c1147 R12: ffff88818e7a8020
[   72.033868][ T5838] R13: ffff88818d82d3d0 R14: ffff888191078000 R15: ffff88819505cc40
[   72.036711][ T5838] FS:  00007fbc932e26c0(0000) GS:ffff8882e86f3000(0000) knlGS:0000000000000000
[   72.039667][ T5838] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   72.041846][ T5838] CR2: 00007fe44d9ad43c CR3: 00000001fc981000 CR4: 0000000000352ef0
[   72.044628][ T5838] Call Trace:
[   72.045831][ T5838]  <TASK>
[   72.046854][ T5838]  v4l2_open+0x1bc/0x3a0
[   72.048299][ T5838]  chrdev_open+0x4d9/0x600
[   72.049770][ T5838]  ? __pfx_chrdev_open+0x10/0x10
[   72.051430][ T5838]  ? fsnotify_open_perm_and_set_mode+0x113/0x620
[   72.053559][ T5838]  ? __pfx_chrdev_open+0x10/0x10
[   72.055260][ T5838]  do_dentry_open+0x816/0x1380
[   72.056862][ T5838]  vfs_open+0x3b/0x340
[   72.058248][ T5838]  ? path_openat+0x2e2d/0x3830
[   72.059822][ T5838]  path_openat+0x2e44/0x3830
[   72.061344][ T5838]  ? kasan_save_track+0x3e/0x80
[   72.062958][ T5838]  ? do_sys_openat2+0xcc/0x200
[   72.064547][ T5838]  ? entry_SYSCALL_64_after_hwframe+0x77/0x7f
[   72.066628][ T5838]  do_file_open+0x23e/0x4a0
[   72.068220][ T5838]  ? __pfx_do_file_open+0x10/0x10
[   72.069957][ T5838]  ? _raw_spin_unlock+0x28/0x50
[   72.071579][ T5838]  ? alloc_fd+0x651/0x6c0
[   72.073029][ T5838]  do_sys_openat2+0x115/0x200
[   72.074573][ T5838]  ? __pfx_do_sys_openat2+0x10/0x10
[   72.076336][ T5838]  ? rcu_is_watching+0x15/0xb0
[   72.077940][ T5838]  __x64_sys_openat+0x138/0x170
[   72.079530][ T5838]  ? entry_SYSCALL_64_after_hwframe+0x77/0x7f
[   72.081536][ T5838]  do_syscall_64+0x174/0x580
[   72.083085][ T5838]  ? trace_irq_disable+0x3b/0x140
[   72.084765][ T5838]  ? clear_bhb_loop+0x40/0x90
[   72.086366][ T5838]  entry_SYSCALL_64_after_hwframe+0x77/0x7f
[   72.088346][ T5838] RIP: 0033:0x7fbc93b3dc9e
[   72.089832][ T5838] Code: 08 0f 85 f5 e2 ff ff 49 89 fb 48 89 f0 48 89 d7 48 89 ce 4c 89 c2 4d 89 ca 4c 8b 44 24 08 4c 8b 4c 24 10 4c 89 5c 24 08 0f 05 <c3> 90 41 57 41 56 4d 89 c6 41 55 4d 89 cd 41 54 55 53 48 83 ec 08
[   72.096189][ T5838] RSP: 002b:00007fbc932e2128 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
[   72.098974][ T5838] RAX: ffffffffffffffda RBX: 00007fbc932e26c0 RCX: 00007fbc93b3dc9e
[   72.101551][ T5838] RDX: 0000000000000802 RSI: 00007fbc932e21e0 RDI: ffffffffffffff9c
[   72.104154][ T5838] RBP: 00007fbc932e21e0 R08: 0000000000000000 R09: 0000000000000000
[   72.106818][ T5838] R10: 0000000000000000 R11: 0000000000000246 R12: 00007fbc93b8809b
[   72.109475][ T5838] R13: 0000000000000000 R14: 00007fff715a0080 R15: 00007fff715a0168
[   72.112082][ T5838]  </TASK>
[   72.113119][ T5838] Modules linked in:
[   72.114484][ T5848] Oops: general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#14] SMP KASAN NOPTI
[   72.114639][ T5838] ---[ end trace 0000000000000000 ]---
[   72.118481][ T5848] KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007]
[   72.118499][ T5848] CPU: 0 UID: 0 PID: 5848 Comm: syz-executor254 Tainted: G      D             syzkaller #1 PREEMPT(full) 
[   72.118509][ T5848] Tainted: [D]=DIE
[   72.118512][ T5848] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   72.118516][ T5848] RIP: 0010:subdev_open+0x1bc/0x430
[   72.132986][ T5848] Code: 83 7d 00 00 0f 84 aa 00 00 00 4c 89 e0 48 c1 e8 03 80 3c 28 00 74 08 4c 89 e7 e8 5f 85 42 fa 49 8b 1c 24 48 89 d8 48 c1 e8 03 <80> 3c 28 00 74 08 48 89 df e8 46 85 42 fa 4c 8b 2b 4d 85 ed 74 7b
[   72.139268][ T5848] RSP: 0018:ffffc900038cf830 EFLAGS: 00010246
[   72.141288][ T5848] RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffffffff9a7e1503
[   72.143907][ T5848] RDX: 0000000000000000 RSI: ffffffff8c321560 RDI: 00000000ffffffff
[   72.146548][ T5848] RBP: dffffc0000000000 R08: ffffffff90608a37 R09: 1ffffffff20c1146
[   72.149154][ T5848] R10: dffffc0000000000 R11: fffffbfff20c1147 R12: ffff88818e7a8020
[   72.151732][ T5848] R13: ffff88818d82d3d0 R14: ffff888114e53800 R15: ffff888115fc6a80
[   72.154358][ T5848] FS:  00007fbc8e2d86c0(0000) GS:ffff8881a50f3000(0000) knlGS:0000000000000000
[   72.157305][ T5848] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   72.159486][ T5848] CR2: 00007f8158bf37b0 CR3: 00000001fc981000 CR4: 0000000000352ef0
[   72.162097][ T5848] Call Trace:
[   72.163221][ T5848]  <TASK>
[   72.164221][ T5848]  v4l2_open+0x1bc/0x3a0
[   72.165688][ T5848]  chrdev_open+0x4d9/0x600
[   72.167174][ T5848]  ? __pfx_chrdev_open+0x10/0x10
[   72.168809][ T5848]  ? fsnotify_open_perm_and_set_mode+0x113/0x620
[   72.170917][ T5848]  ? __pfx_chrdev_open+0x10/0x10
[   72.172563][ T5848]  do_dentry_open+0x816/0x1380
[   72.174147][ T5848]  vfs_open+0x3b/0x340
[   72.175515][ T5848]  ? path_openat+0x2e2d/0x3830
[   72.177116][ T5848]  path_openat+0x2e44/0x3830
[   72.178674][ T5848]  ? kasan_save_track+0x3e/0x80
[   72.180304][ T5848]  ? do_sys_openat2+0xcc/0x200
[   72.181915][ T5848]  ? entry_SYSCALL_64_after_hwframe+0x77/0x7f
[   72.183879][ T5848]  do_file_open+0x23e/0x4a0
[   72.185427][ T5848]  ? __pfx_do_file_open+0x10/0x10
[   72.187107][ T5848]  ? _raw_spin_unlock+0x28/0x50
[   72.188708][ T5848]  ? alloc_fd+0x651/0x6c0
[   72.190152][ T5848]  do_sys_openat2+0x115/0x200
[   72.191703][ T5848]  ? __pfx_do_sys_openat2+0x10/0x10
[   72.193398][ T5848]  ? rcu_is_watching+0x15/0xb0
[   72.194998][ T5848]  __x64_sys_openat+0x138/0x170
[   72.196575][ T5848]  ? entry_SYSCALL_64_after_hwframe+0x77/0x7f
[   72.198527][ T5848]  do_syscall_64+0x174/0x580
[   72.200005][ T5848]  ? trace_irq_disable+0x3b/0x140
[   72.201648][ T5848]  ? clear_bhb_loop+0x40/0x90
[   72.203169][ T5848]  entry_SYSCALL_64_after_hwframe+0x77/0x7f
[   72.205123][ T5848] RIP: 0033:0x7fbc93b3dc9e
[   72.206543][ T5848] Code: 08 0f 85 f5 e2 ff ff 49 89 fb 48 89 f0 48 89 d7 48 89 ce 4c 89 c2 4d 89 ca 4c 8b 44 24 08 4c 8b 4c 24 10 4c 89 5c 24 08 0f 05 <c3> 90 41 57 41 56 4d 89 c6 41 55 4d 89 cd 41 54 55 53 48 83 ec 08
[   72.212710][ T5848] RSP: 002b:00007fbc8e2d8128 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
[   72.215390][ T5848] RAX: ffffffffffffffda RBX: 00007fbc8e2d86c0 RCX: 00007fbc93b3dc9e
[   72.217906][ T5848] RDX: 0000000000000802 RSI: 00007fbc8e2d81e0 RDI: ffffffffffffff9c
[   72.220417][ T5848] RBP: 00007fbc8e2d81e0 R08: 0000000000000000 R09: 0000000000000000
[   72.222954][ T5848] R10: 0000000000000000 R11: 0000000000000246 R12: 00007fbc93b8809b
[   72.225541][ T5848] R13: 0000000000000000 R14: 00007fff715a0080 R15: 00007fff715a0168
[   72.228077][ T5848]  </TASK>
[   72.229100][ T5848] Modules linked in:
[   72.230480][ T5842] Oops: general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#15] SMP KASAN NOPTI
[   72.230622][ T5848] ---[ end trace 0000000000000000 ]---
[   72.234430][ T5842] KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007]
[   72.234447][ T5842] CPU: 1 UID: 0 PID: 5842 Comm: syz-executor254 Tainted: G      D             syzkaller #1 PREEMPT(full) 
[   72.234458][ T5842] Tainted: [D]=DIE
[   72.234461][ T5842] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   72.234465][ T5842] RIP: 0010:subdev_open+0x1bc/0x430
[   72.248779][ T5842] Code: 83 7d 00 00 0f 84 aa 00 00 00 4c 89 e0 48 c1 e8 03 80 3c 28 00 74 08 4c 89 e7 e8 5f 85 42 fa 49 8b 1c 24 48 89 d8 48 c1 e8 03 <80> 3c 28 00 74 08 48 89 df e8 46 85 42 fa 4c 8b 2b 4d 85 ed 74 7b
[   72.255163][ T5842] RSP: 0018:ffffc900039af830 EFLAGS: 00010246
[   72.257127][ T5842] RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffffffff9a7e1503
[   72.259609][ T5842] RDX: 0000000000000000 RSI: ffffffff8c321560 RDI: 00000000ffffffff
[   72.262435][ T5842] RBP: dffffc0000000000 R08: ffffffff90608a37 R09: 1ffffffff20c1146
[   72.265020][ T5842] R10: dffffc0000000000 R11: fffffbfff20c1147 R12: ffff88818e7a8020
[   72.267744][ T5842] R13: ffff88818d82d3d0 R14: ffff88819107b000 R15: ffff8881fe9f2e00
[   72.270292][ T5842] FS:  00007fbc912de6c0(0000) GS:ffff8882e86f3000(0000) knlGS:0000000000000000
[   72.273243][ T5842] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   72.275365][ T5842] CR2: 00007fe44d9dc1d4 CR3: 00000001fc981000 CR4: 0000000000352ef0
[   72.277935][ T5842] Call Trace:
[   72.279047][ T5842]  <TASK>
[   72.280008][ T5842]  v4l2_open+0x1bc/0x3a0
[   72.281438][ T5842]  chrdev_open+0x4d9/0x600
[   72.283001][ T5842]  ? __pfx_chrdev_open+0x10/0x10
[   72.284589][ T5842]  ? fsnotify_open_perm_and_set_mode+0x113/0x620
[   72.286650][ T5842]  ? __pfx_chrdev_open+0x10/0x10
[   72.288304][ T5842]  do_dentry_open+0x816/0x1380
[   72.289863][ T5842]  vfs_open+0x3b/0x340
[   72.291250][ T5842]  ? path_openat+0x2e2d/0x3830
[   72.292880][ T5842]  path_openat+0x2e44/0x3830
[   72.294518][ T5842]  ? kasan_save_track+0x3e/0x80
[   72.296126][ T5842]  ? do_sys_openat2+0xcc/0x200
[   72.297680][ T5842]  ? entry_SYSCALL_64_after_hwframe+0x77/0x7f
[   72.299653][ T5842]  do_file_open+0x23e/0x4a0
[   72.301171][ T5842]  ? __pfx_do_file_open+0x10/0x10
[   72.302792][ T5842]  ? _raw_spin_unlock+0x28/0x50
[   72.304373][ T5842]  ? alloc_fd+0x651/0x6c0
[   72.305831][ T5842]  do_sys_openat2+0x115/0x200
[   72.307374][ T5842]  ? __pfx_do_sys_openat2+0x10/0x10
[   72.309041][ T5842]  ? rcu_is_watching+0x15/0xb0
[   72.310587][ T5842]  __x64_sys_openat+0x138/0x170
[   72.312150][ T5842]  ? entry_SYSCALL_64_after_hwframe+0x77/0x7f
[   72.314086][ T5842]  do_syscall_64+0x174/0x580
[   72.315573][ T5842]  ? trace_irq_disable+0x3b/0x140
[   72.317207][ T5842]  ? clear_bhb_loop+0x40/0x90
[   72.318711][ T5842]  entry_SYSCALL_64_after_hwframe+0x77/0x7f
[   72.320571][ T5842] RIP: 0033:0x7fbc93b3dc9e
[   72.322010][ T5842] Code: 08 0f 85 f5 e2 ff ff 49 89 fb 48 89 f0 48 89 d7 48 89 ce 4c 89 c2 4d 89 ca 4c 8b 44 24 08 4c 8b 4c 24 10 4c 89 5c 24 08 0f 05 <c3> 90 41 57 41 56 4d 89 c6 41 55 4d 89 cd 41 54 55 53 48 83 ec 08
[   72.328135][ T5842] RSP: 002b:00007fbc912de128 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
[   72.330762][ T5842] RAX: ffffffffffffffda RBX: 00007fbc912de6c0 RCX: 00007fbc93b3dc9e
[   72.333316][ T5842] RDX: 0000000000000802 RSI: 00007fbc912de1e0 RDI: ffffffffffffff9c
[   72.335914][ T5842] RBP: 00007fbc912de1e0 R08: 0000000000000000 R09: 0000000000000000
[   72.338410][ T5842] R10: 0000000000000000 R11: 0000000000000246 R12: 00007fbc93b8809b
[   72.341149][ T5842] R13: 0000000000000000 R14: 00007fff715a0080 R15: 00007fff715a0168
[   72.343750][ T5842]  </TASK>
[   72.344787][ T5842] Modules linked in:
[   72.346337][ T5842] ---[ end trace 0000000000000000 ]---
[   72.346473][ T5847] Oops: general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#16] SMP KASAN NOPTI
[   72.352272][ T1376] ieee802154 phy0 wpan0: encryption failed: -22
[   72.352488][ T5847] KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007]
[   72.354520][ T1376] ieee802154 phy1 wpan1: encryption failed: -22
[   72.357251][ T5847] CPU: 0 UID: 0 PID: 5847 Comm: syz-executor254 Tainted: G      D             syzkaller #1 PREEMPT(full) 
[   72.357266][ T5847] Tainted: [D]=DIE
[   72.357269][ T5847] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   72.357274][ T5847] RIP: 0010:subdev_open+0x1bc/0x430
[   72.359516][ T5849] RIP: 0010:subdev_open+0x1bc/0x430
[   72.362815][ T5847] Code: 83 7d 00 00 0f 84 aa 00 00 00 4c 89 e0 48 c1 e8 03 80 3c 28 00 74 08 4c 89 e7 e8 5f 85 42 fa 49 8b 1c 24 48 89 d8 48 c1 e8 03 <80> 3c 28 00 74 08 48 89 df e8 46 85 42 fa 4c 8b 2b 4d 85 ed 74 7b
[   72.362825][ T5847] RSP: 0018:ffffc9000395f830 EFLAGS: 00010246
[   72.362833][ T5847] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
[   72.362838][ T5847] RDX: 0000000000000000 RSI: ffffffff8c321560 RDI: 00000000ffffffff
[   72.362843][ T5847] RBP: dffffc0000000000 R08: ffffffff90608a37 R09: 1ffffffff20c1146
[   72.362848][ T5847] R10: dffffc0000000000 R11: fffffbfff20c1147 R12: ffff88818e7a8020
[   72.362853][ T5847] R13: ffff88818d82d3d0 R14: ffff888114e53c00 R15: ffff888115fc6000
[   72.364051][ T5849] Code: 83 7d 00 00 0f 84 aa 00 00 00 4c 89 e0 48 c1 e8 03 80 3c 28 00 74 08 4c 89 e7 e8 5f 85 42 fa 49 8b 1c 24 48 89 d8 48 c1 e8 03 <80> 3c 28 00 74 08 48 89 df e8 46 85 42 fa 4c 8b 2b 4d 85 ed 74 7b
[   72.367273][ T5847] FS:  00007fbc8ead96c0(0000) GS:ffff8881a50f3000(0000) knlGS:0000000000000000
[   72.367283][ T5847] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   72.367288][ T5847] CR2: 00007f8158bf37b0 CR3: 00000001fc981000 CR4: 0000000000352ef0
[   72.367314][ T5847] Call Trace:
[   72.368968][ T5849] RSP: 0018:ffffc900038bf830 EFLAGS: 00010246
[   72.370646][ T5847]  <TASK>
[   72.376758][ T5849] 
[   72.378697][ T5847]  v4l2_open+0x1bc/0x3a0
[   72.381209][ T5849] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
[   72.383766][ T5847]  chrdev_open+0x4d9/0x600
[   72.390937][ T5849] RDX: 0000000000000000 RSI: ffffffff8e1683c1 RDI: 00000000ffffffff
[   72.391586][ T5847]  ? __pfx_chrdev_open+0x10/0x10
[   72.391604][ T5847]  ? fsnotify_open_perm_and_set_mode+0x113/0x620
[   72.399693][ T5849] RBP: dffffc0000000000 R08: ffffffff90608a37 R09: 1ffffffff20c1146
[   72.400670][ T5847]  ? __pfx_chrdev_open+0x10/0x10
[   72.402859][ T5849] R10: dffffc0000000000 R11: fffffbfff20c1147 R12: ffff88818e7a8020
[   72.405602][ T5847]  do_dentry_open+0x816/0x1380
[   72.405624][ T5847]  vfs_open+0x3b/0x340
[   72.405630][ T5847]  ? path_openat+0x2e2d/0x3830
[   72.405640][ T5847]  path_openat+0x2e44/0x3830
[   72.406761][ T5849] R13: ffff88818d82d3d0 R14: ffff88818d038400 R15: ffff8881ff84c000
[   72.408775][ T5847]  ? kasan_save_track+0x3e/0x80
[   72.409736][ T5849] FS:  00007fbc8dad76c0(0000) GS:ffff8882e86f3000(0000) knlGS:0000000000000000
[   72.410549][ T5847]  ? do_sys_openat2+0xcc/0x200
[   72.411943][ T5849] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   72.414442][ T5847]  ? entry_SYSCALL_64_after_hwframe+0x77/0x7f
[   72.415981][ T5849] CR2: 00007fff538bb318 CR3: 00000001fc981000 CR4: 0000000000352ef0
[   72.418441][ T5847]  do_file_open+0x23e/0x4a0
[   72.420131][ T5849] Kernel panic - not syncing: Fatal exception
[   72.453954][ T5849] Kernel Offset: disabled
[   72.455375][ T5849] Rebooting in 86400 seconds..
 TruncatedCrashReport:Oops: general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#1] SMP KASAN NOPTI
KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007]
CPU: 1 UID: 0 PID: 5849 Comm: syz-executor254 Not tainted syzkaller #1 PREEMPT(full) 
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
RIP: 0010:subdev_open+0x1bc/0x430 drivers/media/v4l2-core/v4l2-subdev.c:115
Code: 83 7d 00 00 0f 84 aa 00 00 00 4c 89 e0 48 c1 e8 03 80 3c 28 00 74 08 4c 89 e7 e8 5f 85 42 fa 49 8b 1c 24 48 89 d8 48 c1 e8 03 <80> 3c 28 00 74 08 48 89 df e8 46 85 42 fa 4c 8b 2b 4d 85 ed 74 7b
RSP: 0018:ffffc900038bf830 EFLAGS: 00010246
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
RDX: 0000000000000000 RSI: ffffffff8e1683c1 RDI: 00000000ffffffff
RBP: dffffc0000000000 R08: ffffffff90608a37 R09: 1ffffffff20c1146
R10: dffffc0000000000 R11: fffffbfff20c1147 R12: ffff88818e7a8020
R13: ffff88818d82d3d0 R14: ffff88818d038400 R15: ffff8881ff84c000
FS:  00007fbc8dad76c0(0000) GS:ffff8882e86f3000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fe44d9ad43c CR3: 00000001fc981000 CR4: 0000000000352ef0
Call Trace:
 <TASK>
 v4l2_open+0x1bc/0x3a0 drivers/media/v4l2-core/v4l2-dev.c:433
 chrdev_open+0x4d9/0x600 fs/char_dev.c:411
 do_dentry_open+0x816/0x1380 fs/open.c:947
 vfs_open+0x3b/0x340 fs/open.c:1052
 do_open fs/namei.c:4700 [inline]
 path_openat+0x2e44/0x3830 fs/namei.c:4863
 do_file_open+0x23e/0x4a0 fs/namei.c:4892
 do_sys_openat2+0x115/0x200 fs/open.c:1368
 do_sys_open fs/open.c:1374 [inline]
 __do_sys_openat fs/open.c:1390 [inline]
 __se_sys_openat fs/open.c:1385 [inline]
 __x64_sys_openat+0x138/0x170 fs/open.c:1385
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0x174/0x580 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fbc93b3dc9e
Code: 08 0f 85 f5 e2 ff ff 49 89 fb 48 89 f0 48 89 d7 48 89 ce 4c 89 c2 4d 89 ca 4c 8b 44 24 08 4c 8b 4c 24 10 4c 89 5c 24 08 0f 05 <c3> 90 41 57 41 56 4d 89 c6 41 55 4d 89 cd 41 54 55 53 48 83 ec 08
RSP: 002b:00007fbc8dad7128 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 00007fbc8dad76c0 RCX: 00007fbc93b3dc9e
RDX: 0000000000000802 RSI: 00007fbc8dad71e0 RDI: ffffffffffffff9c
RBP: 00007fbc8dad71e0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007fbc93b8809b
R13: 0000000000000000 R14: 00007fff715a0080 R15: 00007fff715a0168
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:subdev_open+0x1bc/0x430 drivers/media/v4l2-core/v4l2-subdev.c:115
Code: 83 7d 00 00 0f 84 aa 00 00 00 4c 89 e0 48 c1 e8 03 80 3c 28 00 74 08 4c 89 e7 e8 5f 85 42 fa 49 8b 1c 24 48 89 d8 48 c1 e8 03 <80> 3c 28 00 74 08 48 89 df e8 46 85 42 fa 4c 8b 2b 4d 85 ed 74 7b
RSP: 0018:ffffc900038bf830 EFLAGS: 00010246

RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
RDX: 0000000000000000 RSI: ffffffff8e1683c1 RDI: 00000000ffffffff
RBP: dffffc0000000000 R08: ffffffff90608a37 R09: 1ffffffff20c1146
R10: dffffc0000000000 R11: fffffbfff20c1147 R12: ffff88818e7a8020
R13: ffff88818d82d3d0 R14: ffff88818d038400 R15: ffff8881ff84c000
FS:  00007fbc8dad76c0(0000) GS:ffff8882e86f3000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fff538bb318 CR3: 00000001fc981000 CR4: 0000000000352ef0
----------------
Code disassembly (best guess):
   0:	83 7d 00 00          	cmpl   $0x0,0x0(%rbp)
   4:	0f 84 aa 00 00 00    	je     0xb4
   a:	4c 89 e0             	mov    %r12,%rax
   d:	48 c1 e8 03          	shr    $0x3,%rax
  11:	80 3c 28 00          	cmpb   $0x0,(%rax,%rbp,1)
  15:	74 08                	je     0x1f
  17:	4c 89 e7             	mov    %r12,%rdi
  1a:	e8 5f 85 42 fa       	call   0xfa42857e
  1f:	49 8b 1c 24          	mov    (%r12),%rbx
  23:	48 89 d8             	mov    %rbx,%rax
  26:	48 c1 e8 03          	shr    $0x3,%rax
* 2a:	80 3c 28 00          	cmpb   $0x0,(%rax,%rbp,1) <-- trapping instruction
  2e:	74 08                	je     0x38
  30:	48 89 df             	mov    %rbx,%rdi
  33:	e8 46 85 42 fa       	call   0xfa42857e
  38:	4c 8b 2b             	mov    (%rbx),%r13
  3b:	4d 85 ed             	test   %r13,%r13
  3e:	74 7b                	je     0xbb
 TruncatedStraceOutput:]

387/3 2026/08/07 16:49 agent repro-oracle
0m Model:
best-expensive

Results:
map[Feedback:The reproducer successfully triggered the expected crash: general protection fault in subdev_open. The crash signature and call trace match the original bug report exactly. ProbePassed:false TerminalError: TitleMatches:true]

Instruction:
You are a security researcher with deep Linux kernel background.
Analyze the results of running the generated program.

=== CRITICAL ENVIRONMENT & TARGET CLASSIFICATION ===
Set 'TerminalError' to a descriptive error message ONLY if:
1. The execution failed due to missing hardware device nodes, subsystems, kernel modules, or privilege limits
   that cannot be loaded, created, or bypassed by user-space C code edits in the VM guest.
2. The target source files or functions described in the bug description do not exist in the checked-out codebase,
   meaning the codebase version is mismatched and the target code is absent.

=== CRITICAL PROHIBITIONS ===
- Do NOT classify a run as a terminal failure or assume a bug is fixed based on git log entries, commit titles,
  or commit messages. Reproducibility can ONLY be determined by executing reproducer candidates in the VM.
- Do NOT suggest C code strategies, repairs, or namespace bypasses when setting 'TerminalError'.


=== PHASE 2: BUG REPRODUCTION (EVALUATION) ===
The executed program was a full reproducer candidate attempting to trigger the target bug/crash.
Use this to guide your classification and feedback:
1. If a crash was triggered (Reproduced is true):
   - Determine if the triggered crash matches the expected bug.
   - If you conclude they represent the same underlying bug (the same root cause)
     despite different titles, crash signatures, or call traces, set TitleMatches
     to true and provide a detailed, technical, and verbose explanation of the
     equivalence in the 'Feedback' field.
   - If they do not represent the same bug (a completely unrelated crash/collision),
     set TitleMatches to false and explain the collision in 'Feedback'.
   - If they match exactly, set TitleMatches to true and provide a brief confirmation in 'Feedback'.
2. If the execution was successful (exit 0) WITHOUT a crash (Reproduced is false):
   - The reproduction attempt failed to trigger the bug. Analyze the console/strace output
     to understand why the bug did not trigger (e.g., timing, input arguments, environment setup)
     and provide feedback on how to improve the reproducer logic to trigger the crash.

Critical Diagnostic Rule for Reproduction Failures:
If the reproduction attempt fails (e.g., a system call returns an error, or a
warning/error message appears in the console log), you MUST:
1. Identify the failing system call from the execution trace or strace output.
2. Identify any corresponding warning or error messages in the console log.
3. Immediately search the kernel source tree for the warning message strings or
   the code of the failing system call/subsystem to locate the validation logic.
4. Trace the kernel's validation logic to diagnose the exact constraint violation
   or input mismatch in the generated program.
5. Provide a technical diagnosis in the feedback explaining the exact kernel constraint that was violated and why.

Prefer calling several tools at the same time to save round-trips.


Use set-results tool to provide results of the analysis.
It must be called exactly once before the final reply.
Ignore results of this tool.

Prompt:
Bug Description: general protection fault in subdev_open

Oops: general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#1] SMP KASAN NOPTI
KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007]
CPU: 1 UID: 0 PID: 11356 Comm: syz.1.1458 Tainted: G             L      syzkaller #0 PREEMPT(full) 
Tainted: [L]=SOFTLOCKUP
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/16/2026
RIP: 0010:subdev_open+0x193/0x510 drivers/media/v4l2-core/v4l2-subdev.c:115
Code: 00 00 00 00 fc ff df 48 c1 ea 03 80 3c 02 00 0f 85 bc 02 00 00 48 b8 00 00 00 00 00 fc ff df 49 8b 2c 24 48 89 ea 48 c1 ea 03 <80> 3c 02 00 0f 85 04 03 00 00 48 8b 6d 00 48 85 ed 0f 84 95 00 00
RSP: 0018:ffffc900037bf8a0 EFLAGS: 00010246
RAX: dffffc0000000000 RBX: ffff888055f54c00 RCX: ffffc90003e51000
RDX: 0000000000000000 RSI: ffffffff88163993 RDI: ffff88802d3ad3d0
RBP: 0000000000000000 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000001 R11: 0000000000000000 R12: ffff88802d414020
R13: ffff88802d70b000 R14: ffff888079c69340 R15: ffff888055f54d38
FS:  00007f15691926c0(0000) GS:ffff888123eed000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f1568387700 CR3: 000000003243a000 CR4: 00000000003526f0
Call Trace:
 <TASK>
 v4l2_open+0x1d2/0x490 drivers/media/v4l2-core/v4l2-dev.c:433
 chrdev_open+0x234/0x6a0 fs/char_dev.c:411
 do_dentry_open+0x6ab/0x14d0 fs/open.c:947
 vfs_open+0x82/0x3f0 fs/open.c:1052
 do_open fs/namei.c:4700 [inline]
 path_openat+0x2873/0x4280 fs/namei.c:4863
 do_file_open+0x20e/0x430 fs/namei.c:4892
 do_sys_openat2+0x10f/0x1e0 fs/open.c:1368
 do_sys_open fs/open.c:1374 [inline]
 __do_sys_openat fs/open.c:1390 [inline]
 __se_sys_openat fs/open.c:1385 [inline]
 __x64_sys_openat+0x12d/0x210 fs/open.c:1385
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0x115/0x870 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f156835e90e
Code: 08 0f 85 a5 a8 ff ff 49 89 fb 48 89 f0 48 89 d7 48 89 ce 4c 89 c2 4d 89 ca 4c 8b 44 24 08 4c 8b 4c 24 10 4c 89 5c 24 08 0f 05 <c3> 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 80 00 00 00 00 48 83 ec 08
RSP: 002b:00007f1569191b28 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 00007f15691926c0 RCX: 00007f156835e90e
RDX: 0000000000000002 RSI: 00007f1569191c00 RDI: ffffffffffffff9c
RBP: 00007f1569191c00 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: cccccccccccccccd
R13: 00007f1568626038 R14: 00007f1568625fa0 R15: 00007ffe228ab238
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:subdev_open+0x193/0x510 drivers/media/v4l2-core/v4l2-subdev.c:115
Code: 00 00 00 00 fc ff df 48 c1 ea 03 80 3c 02 00 0f 85 bc 02 00 00 48 b8 00 00 00 00 00 fc ff df 49 8b 2c 24 48 89 ea 48 c1 ea 03 <80> 3c 02 00 0f 85 04 03 00 00 48 8b 6d 00 48 85 ed 0f 84 95 00 00
RSP: 0018:ffffc900037bf8a0 EFLAGS: 00010246

RAX: dffffc0000000000 RBX: ffff888055f54c00 RCX: ffffc90003e51000
RDX: 0000000000000000 RSI: ffffffff88163993 RDI: ffff88802d3ad3d0
RBP: 0000000000000000 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000001 R11: 0000000000000000 R12: ffff88802d414020
R13: ffff88802d70b000 R14: ffff888079c69340 R15: ffff888055f54d38
FS:  00007f15691926c0(0000) GS:ffff888123ded000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fc283cc07e8 CR3: 000000003243a000 CR4: 00000000003526f0
----------------
Code disassembly (best guess), 7 bytes skipped:
   0:	48 c1 ea 03          	shr    $0x3,%rdx
   4:	80 3c 02 00          	cmpb   $0x0,(%rdx,%rax,1)
   8:	0f 85 bc 02 00 00    	jne    0x2ca
   e:	48 b8 00 00 00 00 00 	movabs $0xdffffc0000000000,%rax
  15:	fc ff df
  18:	49 8b 2c 24          	mov    (%r12),%rbp
  1c:	48 89 ea             	mov    %rbp,%rdx
  1f:	48 c1 ea 03          	shr    $0x3,%rdx
* 23:	80 3c 02 00          	cmpb   $0x0,(%rdx,%rax,1) <-- trapping instruction
  27:	0f 85 04 03 00 00    	jne    0x331
  2d:	48 8b 6d 00          	mov    0x0(%rbp),%rbp
  31:	48 85 ed             	test   %rbp,%rbp
  34:	0f                   	.byte 0xf
  35:	84                   	.byte 0x84
  36:	95                   	xchg   %eax,%ebp

IsProbe: false
Reproduced: true
Console Output: [   72.030887][ T5838] R10: dffffc0000000000 R11: fffffbfff20c1147 R12: ffff88818e7a8020
[   72.033868][ T5838] R13: ffff88818d82d3d0 R14: ffff888191078000 R15: ffff88819505cc40
[   72.036711][ T5838] FS:  00007fbc932e26c0(0000) GS:ffff8882e86f3000(0000) knlGS:0000000000000000
[   72.039667][ T5838] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   72.041846][ T5838] CR2: 00007fe44d9ad43c CR3: 00000001fc981000 CR4: 0000000000352ef0
[   72.044628][ T5838] Call Trace:
[   72.045831][ T5838]  <TASK>
[   72.046854][ T5838]  v4l2_open+0x1bc/0x3a0
[   72.048299][ T5838]  chrdev_open+0x4d9/0x600
[   72.049770][ T5838]  ? __pfx_chrdev_open+0x10/0x10
[   72.051430][ T5838]  ? fsnotify_open_perm_and_set_mode+0x113/0x620
[   72.053559][ T5838]  ? __pfx_chrdev_open+0x10/0x10
[   72.055260][ T5838]  do_dentry_open+0x816/0x1380
[   72.056862][ T5838]  vfs_open+0x3b/0x340
[   72.058248][ T5838]  ? path_openat+0x2e2d/0x3830
[   72.059822][ T5838]  path_openat+0x2e44/0x3830
[   72.061344][ T5838]  ? kasan_save_track+0x3e/0x80
[   72.062958][ T5838]  ? do_sys_openat2+0xcc/0x200
[   72.064547][ T5838]  ? entry_SYSCALL_64_after_hwframe+0x77/0x7f
[   72.066628][ T5838]  do_file_open+0x23e/0x4a0
[   72.068220][ T5838]  ? __pfx_do_file_open+0x10/0x10
[   72.069957][ T5838]  ? _raw_spin_unlock+0x28/0x50
[   72.071579][ T5838]  ? alloc_fd+0x651/0x6c0
[   72.073029][ T5838]  do_sys_openat2+0x115/0x200
[   72.074573][ T5838]  ? __pfx_do_sys_openat2+0x10/0x10
[   72.076336][ T5838]  ? rcu_is_watching+0x15/0xb0
[   72.077940][ T5838]  __x64_sys_openat+0x138/0x170
[   72.079530][ T5838]  ? entry_SYSCALL_64_after_hwframe+0x77/0x7f
[   72.081536][ T5838]  do_syscall_64+0x174/0x580
[   72.083085][ T5838]  ? trace_irq_disable+0x3b/0x140
[   72.084765][ T5838]  ? clear_bhb_loop+0x40/0x90
[   72.086366][ T5838]  entry_SYSCALL_64_after_hwframe+0x77/0x7f
[   72.088346][ T5838] RIP: 0033:0x7fbc93b3dc9e
[   72.089832][ T5838] Code: 08 0f 85 f5 e2 ff ff 49 89 fb 48 89 f0 48 89 d7 48 89 ce 4c 89 c2 4d 89 ca 4c 8b 44 24 08 4c 8b 4c 24 10 4c 89 5c 24 08 0f 05 <c3> 90 41 57 41 56 4d 89 c6 41 55 4d 89 cd 41 54 55 53 48 83 ec 08
[   72.096189][ T5838] RSP: 002b:00007fbc932e2128 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
[   72.098974][ T5838] RAX: ffffffffffffffda RBX: 00007fbc932e26c0 RCX: 00007fbc93b3dc9e
[   72.101551][ T5838] RDX: 0000000000000802 RSI: 00007fbc932e21e0 RDI: ffffffffffffff9c
[   72.104154][ T5838] RBP: 00007fbc932e21e0 R08: 0000000000000000 R09: 0000000000000000
[   72.106818][ T5838] R10: 0000000000000000 R11: 0000000000000246 R12: 00007fbc93b8809b
[   72.109475][ T5838] R13: 0000000000000000 R14: 00007fff715a0080 R15: 00007fff715a0168
[   72.112082][ T5838]  </TASK>
[   72.113119][ T5838] Modules linked in:
[   72.114484][ T5848] Oops: general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#14] SMP KASAN NOPTI
[   72.114639][ T5838] ---[ end trace 0000000000000000 ]---
[   72.118481][ T5848] KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007]
[   72.118499][ T5848] CPU: 0 UID: 0 PID: 5848 Comm: syz-executor254 Tainted: G      D             syzkaller #1 PREEMPT(full) 
[   72.118509][ T5848] Tainted: [D]=DIE
[   72.118512][ T5848] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   72.118516][ T5848] RIP: 0010:subdev_open+0x1bc/0x430
[   72.132986][ T5848] Code: 83 7d 00 00 0f 84 aa 00 00 00 4c 89 e0 48 c1 e8 03 80 3c 28 00 74 08 4c 89 e7 e8 5f 85 42 fa 49 8b 1c 24 48 89 d8 48 c1 e8 03 <80> 3c 28 00 74 08 48 89 df e8 46 85 42 fa 4c 8b 2b 4d 85 ed 74 7b
[   72.139268][ T5848] RSP: 0018:ffffc900038cf830 EFLAGS: 00010246
[   72.141288][ T5848] RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffffffff9a7e1503
[   72.143907][ T5848] RDX: 0000000000000000 RSI: ffffffff8c321560 RDI: 00000000ffffffff
[   72.146548][ T5848] RBP: dffffc0000000000 R08: ffffffff90608a37 R09: 1ffffffff20c1146
[   72.149154][ T5848] R10: dffffc0000000000 R11: fffffbfff20c1147 R12: ffff88818e7a8020
[   72.151732][ T5848] R13: ffff88818d82d3d0 R14: ffff888114e53800 R15: ffff888115fc6a80
[   72.154358][ T5848] FS:  00007fbc8e2d86c0(0000) GS:ffff8881a50f3000(0000) knlGS:0000000000000000
[   72.157305][ T5848] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   72.159486][ T5848] CR2: 00007f8158bf37b0 CR3: 00000001fc981000 CR4: 0000000000352ef0
[   72.162097][ T5848] Call Trace:
[   72.163221][ T5848]  <TASK>
[   72.164221][ T5848]  v4l2_open+0x1bc/0x3a0
[   72.165688][ T5848]  chrdev_open+0x4d9/0x600
[   72.167174][ T5848]  ? __pfx_chrdev_open+0x10/0x10
[   72.168809][ T5848]  ? fsnotify_open_perm_and_set_mode+0x113/0x620
[   72.170917][ T5848]  ? __pfx_chrdev_open+0x10/0x10
[   72.172563][ T5848]  do_dentry_open+0x816/0x1380
[   72.174147][ T5848]  vfs_open+0x3b/0x340
[   72.175515][ T5848]  ? path_openat+0x2e2d/0x3830
[   72.177116][ T5848]  path_openat+0x2e44/0x3830
[   72.178674][ T5848]  ? kasan_save_track+0x3e/0x80
[   72.180304][ T5848]  ? do_sys_openat2+0xcc/0x200
[   72.181915][ T5848]  ? entry_SYSCALL_64_after_hwframe+0x77/0x7f
[   72.183879][ T5848]  do_file_open+0x23e/0x4a0
[   72.185427][ T5848]  ? __pfx_do_file_open+0x10/0x10
[   72.187107][ T5848]  ? _raw_spin_unlock+0x28/0x50
[   72.188708][ T5848]  ? alloc_fd+0x651/0x6c0
[   72.190152][ T5848]  do_sys_openat2+0x115/0x200
[   72.191703][ T5848]  ? __pfx_do_sys_openat2+0x10/0x10
[   72.193398][ T5848]  ? rcu_is_watching+0x15/0xb0
[   72.194998][ T5848]  __x64_sys_openat+0x138/0x170
[   72.196575][ T5848]  ? entry_SYSCALL_64_after_hwframe+0x77/0x7f
[   72.198527][ T5848]  do_syscall_64+0x174/0x580
[   72.200005][ T5848]  ? trace_irq_disable+0x3b/0x140
[   72.201648][ T5848]  ? clear_bhb_loop+0x40/0x90
[   72.203169][ T5848]  entry_SYSCALL_64_after_hwframe+0x77/0x7f
[   72.205123][ T5848] RIP: 0033:0x7fbc93b3dc9e
[   72.206543][ T5848] Code: 08 0f 85 f5 e2 ff ff 49 89 fb 48 89 f0 48 89 d7 48 89 ce 4c 89 c2 4d 89 ca 4c 8b 44 24 08 4c 8b 4c 24 10 4c 89 5c 24 08 0f 05 <c3> 90 41 57 41 56 4d 89 c6 41 55 4d 89 cd 41 54 55 53 48 83 ec 08
[   72.212710][ T5848] RSP: 002b:00007fbc8e2d8128 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
[   72.215390][ T5848] RAX: ffffffffffffffda RBX: 00007fbc8e2d86c0 RCX: 00007fbc93b3dc9e
[   72.217906][ T5848] RDX: 0000000000000802 RSI: 00007fbc8e2d81e0 RDI: ffffffffffffff9c
[   72.220417][ T5848] RBP: 00007fbc8e2d81e0 R08: 0000000000000000 R09: 0000000000000000
[   72.222954][ T5848] R10: 0000000000000000 R11: 0000000000000246 R12: 00007fbc93b8809b
[   72.225541][ T5848] R13: 0000000000000000 R14: 00007fff715a0080 R15: 00007fff715a0168
[   72.228077][ T5848]  </TASK>
[   72.229100][ T5848] Modules linked in:
[   72.230480][ T5842] Oops: general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#15] SMP KASAN NOPTI
[   72.230622][ T5848] ---[ end trace 0000000000000000 ]---
[   72.234430][ T5842] KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007]
[   72.234447][ T5842] CPU: 1 UID: 0 PID: 5842 Comm: syz-executor254 Tainted: G      D             syzkaller #1 PREEMPT(full) 
[   72.234458][ T5842] Tainted: [D]=DIE
[   72.234461][ T5842] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   72.234465][ T5842] RIP: 0010:subdev_open+0x1bc/0x430
[   72.248779][ T5842] Code: 83 7d 00 00 0f 84 aa 00 00 00 4c 89 e0 48 c1 e8 03 80 3c 28 00 74 08 4c 89 e7 e8 5f 85 42 fa 49 8b 1c 24 48 89 d8 48 c1 e8 03 <80> 3c 28 00 74 08 48 89 df e8 46 85 42 fa 4c 8b 2b 4d 85 ed 74 7b
[   72.255163][ T5842] RSP: 0018:ffffc900039af830 EFLAGS: 00010246
[   72.257127][ T5842] RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffffffff9a7e1503
[   72.259609][ T5842] RDX: 0000000000000000 RSI: ffffffff8c321560 RDI: 00000000ffffffff
[   72.262435][ T5842] RBP: dffffc0000000000 R08: ffffffff90608a37 R09: 1ffffffff20c1146
[   72.265020][ T5842] R10: dffffc0000000000 R11: fffffbfff20c1147 R12: ffff88818e7a8020
[   72.267744][ T5842] R13: ffff88818d82d3d0 R14: ffff88819107b000 R15: ffff8881fe9f2e00
[   72.270292][ T5842] FS:  00007fbc912de6c0(0000) GS:ffff8882e86f3000(0000) knlGS:0000000000000000
[   72.273243][ T5842] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   72.275365][ T5842] CR2: 00007fe44d9dc1d4 CR3: 00000001fc981000 CR4: 0000000000352ef0
[   72.277935][ T5842] Call Trace:
[   72.279047][ T5842]  <TASK>
[   72.280008][ T5842]  v4l2_open+0x1bc/0x3a0
[   72.281438][ T5842]  chrdev_open+0x4d9/0x600
[   72.283001][ T5842]  ? __pfx_chrdev_open+0x10/0x10
[   72.284589][ T5842]  ? fsnotify_open_perm_and_set_mode+0x113/0x620
[   72.286650][ T5842]  ? __pfx_chrdev_open+0x10/0x10
[   72.288304][ T5842]  do_dentry_open+0x816/0x1380
[   72.289863][ T5842]  vfs_open+0x3b/0x340
[   72.291250][ T5842]  ? path_openat+0x2e2d/0x3830
[   72.292880][ T5842]  path_openat+0x2e44/0x3830
[   72.294518][ T5842]  ? kasan_save_track+0x3e/0x80
[   72.296126][ T5842]  ? do_sys_openat2+0xcc/0x200
[   72.297680][ T5842]  ? entry_SYSCALL_64_after_hwframe+0x77/0x7f
[   72.299653][ T5842]  do_file_open+0x23e/0x4a0
[   72.301171][ T5842]  ? __pfx_do_file_open+0x10/0x10
[   72.302792][ T5842]  ? _raw_spin_unlock+0x28/0x50
[   72.304373][ T5842]  ? alloc_fd+0x651/0x6c0
[   72.305831][ T5842]  do_sys_openat2+0x115/0x200
[   72.307374][ T5842]  ? __pfx_do_sys_openat2+0x10/0x10
[   72.309041][ T5842]  ? rcu_is_watching+0x15/0xb0
[   72.310587][ T5842]  __x64_sys_openat+0x138/0x170
[   72.312150][ T5842]  ? entry_SYSCALL_64_after_hwframe+0x77/0x7f
[   72.314086][ T5842]  do_syscall_64+0x174/0x580
[   72.315573][ T5842]  ? trace_irq_disable+0x3b/0x140
[   72.317207][ T5842]  ? clear_bhb_loop+0x40/0x90
[   72.318711][ T5842]  entry_SYSCALL_64_after_hwframe+0x77/0x7f
[   72.320571][ T5842] RIP: 0033:0x7fbc93b3dc9e
[   72.322010][ T5842] Code: 08 0f 85 f5 e2 ff ff 49 89 fb 48 89 f0 48 89 d7 48 89 ce 4c 89 c2 4d 89 ca 4c 8b 44 24 08 4c 8b 4c 24 10 4c 89 5c 24 08 0f 05 <c3> 90 41 57 41 56 4d 89 c6 41 55 4d 89 cd 41 54 55 53 48 83 ec 08
[   72.328135][ T5842] RSP: 002b:00007fbc912de128 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
[   72.330762][ T5842] RAX: ffffffffffffffda RBX: 00007fbc912de6c0 RCX: 00007fbc93b3dc9e
[   72.333316][ T5842] RDX: 0000000000000802 RSI: 00007fbc912de1e0 RDI: ffffffffffffff9c
[   72.335914][ T5842] RBP: 00007fbc912de1e0 R08: 0000000000000000 R09: 0000000000000000
[   72.338410][ T5842] R10: 0000000000000000 R11: 0000000000000246 R12: 00007fbc93b8809b
[   72.341149][ T5842] R13: 0000000000000000 R14: 00007fff715a0080 R15: 00007fff715a0168
[   72.343750][ T5842]  </TASK>
[   72.344787][ T5842] Modules linked in:
[   72.346337][ T5842] ---[ end trace 0000000000000000 ]---
[   72.346473][ T5847] Oops: general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#16] SMP KASAN NOPTI
[   72.352272][ T1376] ieee802154 phy0 wpan0: encryption failed: -22
[   72.352488][ T5847] KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007]
[   72.354520][ T1376] ieee802154 phy1 wpan1: encryption failed: -22
[   72.357251][ T5847] CPU: 0 UID: 0 PID: 5847 Comm: syz-executor254 Tainted: G      D             syzkaller #1 PREEMPT(full) 
[   72.357266][ T5847] Tainted: [D]=DIE
[   72.357269][ T5847] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   72.357274][ T5847] RIP: 0010:subdev_open+0x1bc/0x430
[   72.359516][ T5849] RIP: 0010:subdev_open+0x1bc/0x430
[   72.362815][ T5847] Code: 83 7d 00 00 0f 84 aa 00 00 00 4c 89 e0 48 c1 e8 03 80 3c 28 00 74 08 4c 89 e7 e8 5f 85 42 fa 49 8b 1c 24 48 89 d8 48 c1 e8 03 <80> 3c 28 00 74 08 48 89 df e8 46 85 42 fa 4c 8b 2b 4d 85 ed 74 7b
[   72.362825][ T5847] RSP: 0018:ffffc9000395f830 EFLAGS: 00010246
[   72.362833][ T5847] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
[   72.362838][ T5847] RDX: 0000000000000000 RSI: ffffffff8c321560 RDI: 00000000ffffffff
[   72.362843][ T5847] RBP: dffffc0000000000 R08: ffffffff90608a37 R09: 1ffffffff20c1146
[   72.362848][ T5847] R10: dffffc0000000000 R11: fffffbfff20c1147 R12: ffff88818e7a8020
[   72.362853][ T5847] R13: ffff88818d82d3d0 R14: ffff888114e53c00 R15: ffff888115fc6000
[   72.364051][ T5849] Code: 83 7d 00 00 0f 84 aa 00 00 00 4c 89 e0 48 c1 e8 03 80 3c 28 00 74 08 4c 89 e7 e8 5f 85 42 fa 49 8b 1c 24 48 89 d8 48 c1 e8 03 <80> 3c 28 00 74 08 48 89 df e8 46 85 42 fa 4c 8b 2b 4d 85 ed 74 7b
[   72.367273][ T5847] FS:  00007fbc8ead96c0(0000) GS:ffff8881a50f3000(0000) knlGS:0000000000000000
[   72.367283][ T5847] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   72.367288][ T5847] CR2: 00007f8158bf37b0 CR3: 00000001fc981000 CR4: 0000000000352ef0
[   72.367314][ T5847] Call Trace:
[   72.368968][ T5849] RSP: 0018:ffffc900038bf830 EFLAGS: 00010246
[   72.370646][ T5847]  <TASK>
[   72.376758][ T5849] 
[   72.378697][ T5847]  v4l2_open+0x1bc/0x3a0
[   72.381209][ T5849] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
[   72.383766][ T5847]  chrdev_open+0x4d9/0x600
[   72.390937][ T5849] RDX: 0000000000000000 RSI: ffffffff8e1683c1 RDI: 00000000ffffffff
[   72.391586][ T5847]  ? __pfx_chrdev_open+0x10/0x10
[   72.391604][ T5847]  ? fsnotify_open_perm_and_set_mode+0x113/0x620
[   72.399693][ T5849] RBP: dffffc0000000000 R08: ffffffff90608a37 R09: 1ffffffff20c1146
[   72.400670][ T5847]  ? __pfx_chrdev_open+0x10/0x10
[   72.402859][ T5849] R10: dffffc0000000000 R11: fffffbfff20c1147 R12: ffff88818e7a8020
[   72.405602][ T5847]  do_dentry_open+0x816/0x1380
[   72.405624][ T5847]  vfs_open+0x3b/0x340
[   72.405630][ T5847]  ? path_openat+0x2e2d/0x3830
[   72.405640][ T5847]  path_openat+0x2e44/0x3830
[   72.406761][ T5849] R13: ffff88818d82d3d0 R14: ffff88818d038400 R15: ffff8881ff84c000
[   72.408775][ T5847]  ? kasan_save_track+0x3e/0x80
[   72.409736][ T5849] FS:  00007fbc8dad76c0(0000) GS:ffff8882e86f3000(0000) knlGS:0000000000000000
[   72.410549][ T5847]  ? do_sys_openat2+0xcc/0x200
[   72.411943][ T5849] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   72.414442][ T5847]  ? entry_SYSCALL_64_after_hwframe+0x77/0x7f
[   72.415981][ T5849] CR2: 00007fff538bb318 CR3: 00000001fc981000 CR4: 0000000000352ef0
[   72.418441][ T5847]  do_file_open+0x23e/0x4a0
[   72.420131][ T5849] Kernel panic - not syncing: Fatal exception
[   72.453954][ T5849] Kernel Offset: disabled
[   72.455375][ T5849] Rebooting in 86400 seconds..

Strace Output: 
Crash Report: Oops: general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#1] SMP KASAN NOPTI
KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007]
CPU: 1 UID: 0 PID: 5849 Comm: syz-executor254 Not tainted syzkaller #1 PREEMPT(full) 
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
RIP: 0010:subdev_open+0x1bc/0x430 drivers/media/v4l2-core/v4l2-subdev.c:115
Code: 83 7d 00 00 0f 84 aa 00 00 00 4c 89 e0 48 c1 e8 03 80 3c 28 00 74 08 4c 89 e7 e8 5f 85 42 fa 49 8b 1c 24 48 89 d8 48 c1 e8 03 <80> 3c 28 00 74 08 48 89 df e8 46 85 42 fa 4c 8b 2b 4d 85 ed 74 7b
RSP: 0018:ffffc900038bf830 EFLAGS: 00010246
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
RDX: 0000000000000000 RSI: ffffffff8e1683c1 RDI: 00000000ffffffff
RBP: dffffc0000000000 R08: ffffffff90608a37 R09: 1ffffffff20c1146
R10: dffffc0000000000 R11: fffffbfff20c1147 R12: ffff88818e7a8020
R13: ffff88818d82d3d0 R14: ffff88818d038400 R15: ffff8881ff84c000
FS:  00007fbc8dad76c0(0000) GS:ffff8882e86f3000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fe44d9ad43c CR3: 00000001fc981000 CR4: 0000000000352ef0
Call Trace:
 <TASK>
 v4l2_open+0x1bc/0x3a0 drivers/media/v4l2-core/v4l2-dev.c:433
 chrdev_open+0x4d9/0x600 fs/char_dev.c:411
 do_dentry_open+0x816/0x1380 fs/open.c:947
 vfs_open+0x3b/0x340 fs/open.c:1052
 do_open fs/namei.c:4700 [inline]
 path_openat+0x2e44/0x3830 fs/namei.c:4863
 do_file_open+0x23e/0x4a0 fs/namei.c:4892
 do_sys_openat2+0x115/0x200 fs/open.c:1368
 do_sys_open fs/open.c:1374 [inline]
 __do_sys_openat fs/open.c:1390 [inline]
 __se_sys_openat fs/open.c:1385 [inline]
 __x64_sys_openat+0x138/0x170 fs/open.c:1385
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0x174/0x580 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fbc93b3dc9e
Code: 08 0f 85 f5 e2 ff ff 49 89 fb 48 89 f0 48 89 d7 48 89 ce 4c 89 c2 4d 89 ca 4c 8b 44 24 08 4c 8b 4c 24 10 4c 89 5c 24 08 0f 05 <c3> 90 41 57 41 56 4d 89 c6 41 55 4d 89 cd 41 54 55 53 48 83 ec 08
RSP: 002b:00007fbc8dad7128 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 00007fbc8dad76c0 RCX: 00007fbc93b3dc9e
RDX: 0000000000000802 RSI: 00007fbc8dad71e0 RDI: ffffffffffffff9c
RBP: 00007fbc8dad71e0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007fbc93b8809b
R13: 0000000000000000 R14: 00007fff715a0080 R15: 00007fff715a0168
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:subdev_open+0x1bc/0x430 drivers/media/v4l2-core/v4l2-subdev.c:115
Code: 83 7d 00 00 0f 84 aa 00 00 00 4c 89 e0 48 c1 e8 03 80 3c 28 00 74 08 4c 89 e7 e8 5f 85 42 fa 49 8b 1c 24 48 89 d8 48 c1 e8 03 <80> 3c 28 00 74 08 48 89 df e8 46 85 42 fa 4c 8b 2b 4d 85 ed 74 7b
RSP: 0018:ffffc900038bf830 EFLAGS: 00010246

RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
RDX: 0000000000000000 RSI: ffffffff8e1683c1 RDI: 00000000ffffffff
RBP: dffffc0000000000 R08: ffffffff90608a37 R09: 1ffffffff20c1146
R10: dffffc0000000000 R11: fffffbfff20c1147 R12: ffff88818e7a8020
R13: ffff88818d82d3d0 R14: ffff88818d038400 R15: ffff8881ff84c000
FS:  00007fbc8dad76c0(0000) GS:ffff8882e86f3000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fff538bb318 CR3: 00000001fc981000 CR4: 0000000000352ef0
----------------
Code disassembly (best guess):
   0:	83 7d 00 00          	cmpl   $0x0,0x0(%rbp)
   4:	0f 84 aa 00 00 00    	je     0xb4
   a:	4c 89 e0             	mov    %r12,%rax
   d:	48 c1 e8 03          	shr    $0x3,%rax
  11:	80 3c 28 00          	cmpb   $0x0,(%rax,%rbp,1)
  15:	74 08                	je     0x1f
  17:	4c 89 e7             	mov    %r12,%rdi
  1a:	e8 5f 85 42 fa       	call   0xfa42857e
  1f:	49 8b 1c 24          	mov    (%r12),%rbx
  23:	48 89 d8             	mov    %rbx,%rax
  26:	48 c1 e8 03          	shr    $0x3,%rax
* 2a:	80 3c 28 00          	cmpb   $0x0,(%rax,%rbp,1) <-- trapping instruction
  2e:	74 08                	je     0x38
  30:	48 89 df             	mov    %rbx,%rdi
  33:	e8 46 85 42 fa       	call   0xfa42857e
  38:	4c 8b 2b             	mov    (%rbx),%r13
  3b:	4d 85 ed             	test   %r13,%r13
  3e:	74 7b                	je     0xbb



388/4 2026/08/07 16:49 llm repro-oracle
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 19840
							output: 62
							thoughts: 410
						

Thoughts:
**My Diagnostic Journey with the "general protection fault in subdev_open" Bug**

Alright, so I've just been presented with a bug report detailing a "general protection fault in subdev_open." My primary objective is to verify if the provided reproducer successfully triggers this exact issue and to document my findings for the team.

The first thing I did was meticulously examine the crash report. It explicitly states: "Oops: general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#1] SMP KASAN NOPTI" and importantly, it pinpoints the exact location of the fault: "KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007]" and "RIP: 0010:subdev_open+0x1bc/0x430 drivers/media/v4l2-core/v4l2-subdev.c:115".

Upon comparing this crash report with the original bug description, I was immediately struck by the perfect alignment. The report directly confirms the "general protection fault in subdev_open" and even provides the identical non-canonical address and the precise function and line number where the fault occurred. This level of exactness leaves no room for doubt: the reproducer *did* indeed trigger the intended bug.

Given this definitive match, my next step is to configure the output parameters accordingly. I need to set `TitleMatches` to `true` because the crash signature aligns perfectly with the bug description. The `ProbePassed` field, however, needs to be `false`. This is not because the reproducer failed, but rather because the `IsProbe` flag, which dictates the status of `ProbePassed`, is currently set to `false` in the context of this specific reproduction scenario. The `TerminalError` field should be left empty as this is a successful reproduction of a known bug, not an unexpected terminal failure of the testing infrastructure itself.

Finally, I need to provide a concise piece of feedback. Following the established guidelines, my feedback will confirm the successful reproduction. I'll state: "The reproducer successfully triggered the expected crash: general protection fault in subdev_open. The crash signature and call trace match the original bug report exactly."

With these parameters set and the feedback drafted, my task is complete. The next logical action is to invoke the `set-results` command to finalize and submit these findings.


389/4 2026/08/07 16:49 tool set-results
0m Args:
map[Feedback:The reproducer successfully triggered the expected crash: general protection fault in subdev_open. The crash signature and call trace match the original bug report exactly. ProbePassed:false TerminalError: TitleMatches:true]

Results:
map[Feedback:The reproducer successfully triggered the expected crash: general protection fault in subdev_open. The crash signature and call trace match the original bug report exactly. ProbePassed:false TerminalError: TitleMatches:true]

390/3 2026/08/07 16:49 action loop-controller
0m Results:
map[CapabilitiesVerified:true ContinueSignal: EquivalenceAnalysis:The reproducer successfully triggered the expected crash: general protection fault in subdev_open. The crash signature and call trace match the original bug report exactly. OracleFeedback:The reproducer successfully triggered the expected crash: general protection fault in subdev_open. The crash signature and call trace match the original bug report exactly. ReproC:#define _GNU_SOURCE
#include <fcntl.h>
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include <dirent.h>
#include <errno.h>

char vimc_dev_name[256] = "vimc";

void find_vimc_dev_name(void) {
    DIR *dir = opendir("/sys/bus/platform/devices");
    if (!dir) {
        printf("[-] Failed to opendir /sys/bus/platform/devices: %s\n", strerror(errno));
        exit(1);
    }
    struct dirent *ent;
    int found = 0;
    while ((ent = readdir(dir)) != NULL) {
        if (strncmp(ent->d_name, "vimc", 4) == 0) {
            strcpy(vimc_dev_name, ent->d_name);
            found = 1;
            break;
        }
    }
    closedir(dir);
    if (!found) {
        printf("[-] Could not find vimc device in /sys/bus/platform/devices, using default '%s'\n", vimc_dev_name);
    } else {
        printf("[+] Found vimc device: %s\n", vimc_dev_name);
    }
}

void *bind_unbind_thread(void *arg)
{
    int bind_fd = open("/sys/bus/platform/drivers/vimc/bind", O_WRONLY);
    if (bind_fd < 0) {
        printf("[-] Failed to open bind: %s\n", strerror(errno));
        exit(1);
    }
    int unbind_fd = open("/sys/bus/platform/drivers/vimc/unbind", O_WRONLY);
    if (unbind_fd < 0) {
        printf("[-] Failed to open unbind: %s\n", strerror(errno));
        exit(1);
    }
    printf("[+] Opened sysfs bind/unbind successfully.\n");

    while (1) {
        ssize_t ret = write(unbind_fd, vimc_dev_name, strlen(vimc_dev_name));
        if (ret < 0 && errno != ENODEV && errno != EBUSY) {
            printf("[-] write unbind failed: %s\n", strerror(errno));
            exit(1);
        }
        
        ret = write(bind_fd, vimc_dev_name, strlen(vimc_dev_name));
        if (ret < 0 && errno != ENODEV && errno != EBUSY) {
            printf("[-] write bind failed: %s\n", strerror(errno));
            exit(1);
        }
        usleep(1000);
    }
    return NULL;
}

void *open_thread(void *arg)
{
    char dev_name[32];
    
    while (1) {
        for (int i = 0; i < 64; i++) {
            sprintf(dev_name, "/dev/v4l-subdev%d", i);
            int fd = open(dev_name, O_RDWR | O_NONBLOCK);
            if (fd >= 0) {
                close(fd);
            }
        }
    }
    return NULL;
}

int main(void)
{
    pthread_t t_bind;
    pthread_t t_open[16];
    
    find_vimc_dev_name();
    
    if (pthread_create(&t_bind, NULL, bind_unbind_thread, NULL) != 0) {
        printf("[-] Failed to create bind thread: %s\n", strerror(errno));
        exit(1);
    }
    printf("[+] Created bind/unbind thread.\n");
    
    for (int i = 0; i < 16; i++) {
        if (pthread_create(&t_open[i], NULL, open_thread, NULL) != 0) {
            printf("[-] Failed to create open thread: %s\n", strerror(errno));
            exit(1);
        }
    }
    printf("[+] Created open threads.\n");
    
    sleep(10);
    printf("[+] Reproducer finished\n");
    return 0;
}
 Reproduced:true ReproducedBugTitle:general protection fault in subdev_open ReproducedCrashReport:Oops: general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#1] SMP KASAN NOPTI
KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007]
CPU: 1 UID: 0 PID: 5849 Comm: syz-executor254 Not tainted syzkaller #1 PREEMPT(full) 
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
RIP: 0010:subdev_open+0x1bc/0x430 drivers/media/v4l2-core/v4l2-subdev.c:115
Code: 83 7d 00 00 0f 84 aa 00 00 00 4c 89 e0 48 c1 e8 03 80 3c 28 00 74 08 4c 89 e7 e8 5f 85 42 fa 49 8b 1c 24 48 89 d8 48 c1 e8 03 <80> 3c 28 00 74 08 48 89 df e8 46 85 42 fa 4c 8b 2b 4d 85 ed 74 7b
RSP: 0018:ffffc900038bf830 EFLAGS: 00010246
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
RDX: 0000000000000000 RSI: ffffffff8e1683c1 RDI: 00000000ffffffff
RBP: dffffc0000000000 R08: ffffffff90608a37 R09: 1ffffffff20c1146
R10: dffffc0000000000 R11: fffffbfff20c1147 R12: ffff88818e7a8020
R13: ffff88818d82d3d0 R14: ffff88818d038400 R15: ffff8881ff84c000
FS:  00007fbc8dad76c0(0000) GS:ffff8882e86f3000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fe44d9ad43c CR3: 00000001fc981000 CR4: 0000000000352ef0
Call Trace:
 <TASK>
 v4l2_open+0x1bc/0x3a0 drivers/media/v4l2-core/v4l2-dev.c:433
 chrdev_open+0x4d9/0x600 fs/char_dev.c:411
 do_dentry_open+0x816/0x1380 fs/open.c:947
 vfs_open+0x3b/0x340 fs/open.c:1052
 do_open fs/namei.c:4700 [inline]
 path_openat+0x2e44/0x3830 fs/namei.c:4863
 do_file_open+0x23e/0x4a0 fs/namei.c:4892
 do_sys_openat2+0x115/0x200 fs/open.c:1368
 do_sys_open fs/open.c:1374 [inline]
 __do_sys_openat fs/open.c:1390 [inline]
 __se_sys_openat fs/open.c:1385 [inline]
 __x64_sys_openat+0x138/0x170 fs/open.c:1385
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0x174/0x580 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fbc93b3dc9e
Code: 08 0f 85 f5 e2 ff ff 49 89 fb 48 89 f0 48 89 d7 48 89 ce 4c 89 c2 4d 89 ca 4c 8b 44 24 08 4c 8b 4c 24 10 4c 89 5c 24 08 0f 05 <c3> 90 41 57 41 56 4d 89 c6 41 55 4d 89 cd 41 54 55 53 48 83 ec 08
RSP: 002b:00007fbc8dad7128 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 00007fbc8dad76c0 RCX: 00007fbc93b3dc9e
RDX: 0000000000000802 RSI: 00007fbc8dad71e0 RDI: ffffffffffffff9c
RBP: 00007fbc8dad71e0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007fbc93b8809b
R13: 0000000000000000 R14: 00007fff715a0080 R15: 00007fff715a0168
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:subdev_open+0x1bc/0x430 drivers/media/v4l2-core/v4l2-subdev.c:115
Code: 83 7d 00 00 0f 84 aa 00 00 00 4c 89 e0 48 c1 e8 03 80 3c 28 00 74 08 4c 89 e7 e8 5f 85 42 fa 49 8b 1c 24 48 89 d8 48 c1 e8 03 <80> 3c 28 00 74 08 48 89 df e8 46 85 42 fa 4c 8b 2b 4d 85 ed 74 7b
RSP: 0018:ffffc900038bf830 EFLAGS: 00010246

RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
RDX: 0000000000000000 RSI: ffffffff8e1683c1 RDI: 00000000ffffffff
RBP: dffffc0000000000 R08: ffffffff90608a37 R09: 1ffffffff20c1146
R10: dffffc0000000000 R11: fffffbfff20c1147 R12: ffff88818e7a8020
R13: ffff88818d82d3d0 R14: ffff88818d038400 R15: ffff8881ff84c000
FS:  00007fbc8dad76c0(0000) GS:ffff8882e86f3000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fff538bb318 CR3: 00000001fc981000 CR4: 0000000000352ef0
----------------
Code disassembly (best guess):
   0:	83 7d 00 00          	cmpl   $0x0,0x0(%rbp)
   4:	0f 84 aa 00 00 00    	je     0xb4
   a:	4c 89 e0             	mov    %r12,%rax
   d:	48 c1 e8 03          	shr    $0x3,%rax
  11:	80 3c 28 00          	cmpb   $0x0,(%rax,%rbp,1)
  15:	74 08                	je     0x1f
  17:	4c 89 e7             	mov    %r12,%rdi
  1a:	e8 5f 85 42 fa       	call   0xfa42857e
  1f:	49 8b 1c 24          	mov    (%r12),%rbx
  23:	48 89 d8             	mov    %rbx,%rax
  26:	48 c1 e8 03          	shr    $0x3,%rax
* 2a:	80 3c 28 00          	cmpb   $0x0,(%rax,%rbp,1) <-- trapping instruction
  2e:	74 08                	je     0x38
  30:	48 89 df             	mov    %rbx,%rdi
  33:	e8 46 85 42 fa       	call   0xfa42857e
  38:	4c 8b 2b             	mov    (%rbx),%r13
  3b:	4d 85 ed             	test   %r13,%r13
  3e:	74 7b                	je     0xbb
]

391/1 2026/08/07 16:49 action save-repro-c
0m Results:
map[]

LLM Calls Summary:
Total Calls Total Tokens Avg Tokens Total Duration (Seconds) Avg Duration (Seconds)
Tool Calls Summary:
Total Calls Total Duration (Seconds) Avg Duration (Seconds)