ID Workflow Result Correct Bug Created Started Finished Revision
24752a23 patching βœ… KASAN: use-after-free Read in release_card_device 2026/08/13 11:33 2026/08/13 18:20 2026/08/13 19:56 0165196a
Agent: prod-syz-agent-5
External Bug ID: ---

Inputs:
BaseBranch master
BaseCommit RC
BaseRepository git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
BugTitle KASAN: use-after-free Read in release_card_device
CrashLogID 6520054448914432
CrashReportID 6562007689461760
KernelCommit 3d6d817622b0a9721e3cc404df3469171582be13
KernelConfig
Show (280613 bytes)
#
# Automatically generated file; DO NOT EDIT.
# Linux/x86_64 syzkaller Kernel Configuration
#
CONFIG_CC_VERSION_TEXT="Debian clang version 22.1.8 (++20260613092233+e80beda6e255-1~exp1~20260613092250.77)"
CONFIG_GCC_VERSION=0
CONFIG_CC_IS_CLANG=y
CONFIG_CLANG_VERSION=220108
CONFIG_AS_IS_LLVM=y
CONFIG_AS_VERSION=220108
CONFIG_LD_VERSION=0
CONFIG_LD_IS_LLD=y
CONFIG_LLD_VERSION=220108
CONFIG_RUSTC_VERSION=109600
CONFIG_RUST_IS_AVAILABLE=y
CONFIG_RUSTC_LLVM_VERSION=220102
CONFIG_RUSTC_LLVM_MAJOR_VERSION=22
CONFIG_RUSTC_CLANG_LLVM_COMPATIBLE=y
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_CC_HAS_COUNTED_BY=y
CONFIG_CC_HAS_COUNTED_BY_PTR=y
CONFIG_CC_HAS_ALLOC_TOKEN=y
CONFIG_CC_HAS_MULTIDIMENSIONAL_NONSTRING=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=y
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"
CONFIG_CC_MS_EXTENSIONS="-fms-extensions"
CONFIG_GCC10_NO_ARRAY_BOUNDS=y
CONFIG_GCC_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_RUST is not set
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_SLS=y
CONFIG_CC_HAS_RETURN_THUNK=y
CONFIG_CC_HAS_ENTRY_PADDING=y
CONFIG_CC_HAS_KCFI_ARITY=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_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_HAS_LTO_CLANG=y
CONFIG_LTO_NONE=y
# CONFIG_LTO_CLANG_FULL is not set
# CONFIG_LTO_CLANG_THIN is not set
# CONFIG_LTO_CLANG_THIN_DIST is not set
CONFIG_AUTOFDO_CLANG=y
CONFIG_PROPELLER_CLANG=y
CONFIG_ARCH_SUPPORTS_CFI=y
# CONFIG_CFI is not set
CONFIG_HAVE_CFI_ICALL_NORMALIZE_INTEGERS=y
CONFIG_HAVE_CFI_ICALL_NORMALIZE_INTEGERS_RUSTC=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_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_RT5645 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_STATIC_USERMODEHELPER is not set
# CONFIG_SECURITY_SELINUX 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=y
CONFIG_SECURITY_APPARMOR_DEBUG=y
CONFIG_SECURITY_APPARMOR_DEBUG_ASSERTS=y
# CONFIG_SECURITY_APPARMOR_DEBUG_MESSAGES is not set
CONFIG_SECURITY_APPARMOR_INTROSPECT_POLICY=y
CONFIG_SECURITY_APPARMOR_HASH=y
CONFIG_SECURITY_APPARMOR_HASH_DEFAULT=y
# CONFIG_SECURITY_APPARMOR_EXPORT_BINARY is not set
# CONFIG_SECURITY_APPARMOR_PARANOID_LOAD 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_TOMOYO is not set
CONFIG_DEFAULT_SECURITY_APPARMOR=y
# CONFIG_DEFAULT_SECURITY_DAC is not set
CONFIG_LSM="landlock,lockdown,yama,safesetid,integrity,tomoyo,apparmor,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_CC_HAS_SANCOV_STACK_DEPTH_CALLBACK=y
# CONFIG_KSTACK_ERASE is not set
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_CC_HAS_RANDSTRUCT=y
CONFIG_RANDSTRUCT_NONE=y
# CONFIG_RANDSTRUCT_FULL is not set
# 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_BTF_TAG=y
CONFIG_PAHOLE_HAS_LANG_EXCLUDE=y
# CONFIG_GDB_SCRIPTS is not set
CONFIG_FRAME_WARN=2048
# CONFIG_STRIP_ASM_SYMS is not set
# CONFIG_HEADERS_INSTALL 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_ARRAY_BOUNDS=y
CONFIG_UBSAN_BOUNDS=y
CONFIG_UBSAN_ARRAY_BOUNDS=y
CONFIG_UBSAN_SHIFT=y
# 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
CONFIG_HAVE_KMSAN_COMPILER=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 5082538776723456
ReproOpts
ReproSyzID 0
SyzkallerCommit e4ef95d66b43846d6ffc71464fef148e16493289
TargetArch amd64
TargetOS linux

Current Stage: upstream
Next Stage:

Reporting Stages and Comments:
Stage Source Reported At Ext ID Comments
upstream lore 2026/08/14 12:05 <02042186-27b7-42a9-b64e-f93ce8fbe05a@mail.kernel.org>
2 Comments
  • syzbot@kernel.org (2026/08/14 12:10):
    From: Aleksandr Nogikh <nogikh@google.com>
    
    A use-after-free was detected in snd_card_do_free() when a sound card
    managed by devres is unbound while a user-space application still holds an
    open file descriptor.
    
    For managed cards, the memory is allocated using devres_alloc(), and its
    release function is set to __snd_card_release(), which calls
    snd_card_free(). When the device is unbound, the unbind thread calls
    snd_card_free(), which drops a reference to the card's device. If the user
    thread still has an open file descriptor, the reference count does not
    reach zero, and the unbind thread blocks on wait_for_completion(&released).
    
    When the user thread closes the file descriptor, it drops the final
    reference, invoking the device release callback release_card_device(),
    which calls snd_card_do_free(). snd_card_do_free() performs cleanup and
    calls complete(card->release_completion). This wakes up the unbind thread,
    which returns from snd_card_free() and __snd_card_release(). The devres
    core then immediately frees the memory block containing the snd_card
    structure.
    
    Meanwhile, the user thread continues execution in snd_card_do_free() and
    evaluates `if (!card->managed)`. It reads the `managed` boolean from the
    snd_card structure that was just freed by the unbind thread, triggering a
    KASAN use-after-free.
    
    Fix this by caching the value of card->managed in a local variable before
    calling complete(). This ensures that the card pointer is not dereferenced
    after the unbind thread has been woken up and potentially freed the card.
    
    BUG: KASAN: use-after-free in snd_card_do_free sound/core/init.c:604
    [inline]
    BUG: KASAN: use-after-free in release_card_device+0x1ab/0x1b0
    sound/core/init.c:153
    Read of size 1 at addr ffff8881912ec909 by task syz-executor130/5857
    
    Call Trace:
     <TASK>
     dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120
     print_address_description+0x55/0x1e0 mm/kasan/report.c:378
     print_report+0x58/0x70 mm/kasan/report.c:482
     kasan_report+0x117/0x150 mm/kasan/report.c:595
     snd_card_do_free sound/core/init.c:604 [inline]
     release_card_device+0x1ab/0x1b0 sound/core/init.c:153
     device_release+0xc4/0x1f0 drivers/base/core.c:-1
     kobject_cleanup lib/kobject.c:689 [inline]
     kobject_release lib/kobject.c:720 [inline]
     kref_put include/linux/kref.h:65 [inline]
     kobject_put+0x222/0x550 lib/kobject.c:737
     snd_card_file_remove+0x331/0x390 sound/core/init.c:1125
     snd_pcm_release+0x12c/0x160 sound/core/pcm_native.c:2986
     __fput+0x418/0xa50 fs/file_table.c:512
     fput_close_sync+0x11f/0x240 fs/file_table.c:617
     __do_sys_close fs/open.c:1511 [inline]
     __se_sys_close fs/open.c:1496 [inline]
     __x64_sys_close+0x7e/0x110 fs/open.c:1496
     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
     </TASK>
    
    Fixes: e8ad415b7a55 ("ALSA: core: Add managed card creation")
    Assisted-by: Gemini:gemini-3.6-flash Gemini:gemini-3.1-pro-preview syzbot
    Reported-by: syzbot+7061d72c26b7daebe2b4@syzkaller.appspotmail.com
    Closes: https://syzkaller.appspot.com/bug?extid=7061d72c26b7daebe2b4
    Link: https://syzkaller.appspot.com/ai_job?id=24752a23-f0b6-49c1-bf20-4fa89c2e7eb2
    Signed-off-by: Aleksandr Nogikh <nogikh@google.com>
    
    ---
    diff --git a/sound/core/init.c b/sound/core/init.c
    index 56dde5bd7..577338526 100644
    --- a/sound/core/init.c
    +++ b/sound/core/init.c
    @@ -584,6 +584,8 @@ EXPORT_SYMBOL_GPL(snd_card_disconnect_sync);
     
     static int snd_card_do_free(struct snd_card *card)
     {
    +	bool managed = card->managed;
    +
     	card->releasing = true;
     #if IS_ENABLED(CONFIG_SND_MIXER_OSS)
     	if (snd_mixer_oss_notify_callback)
    @@ -601,7 +603,7 @@ static int snd_card_do_free(struct snd_card *card)
     	}
     	if (card->release_completion)
     		complete(card->release_completion);
    -	if (!card->managed)
    +	if (!managed)
     		kfree(card);
     	return 0;
     }
    
    
    base-commit: db2ddb87143519e20a95aa36c60b36107b736a58
    -- 
    See https://goo.gle/syzbot-ai-patches for information about AI-generated patches.
    The person who has signed off on the patch is responsible for
    addressing comments.
    syzbot engineers can be reached at syzkaller@googlegroups.com.
    
  • tiwai@suse.de (2026/08/14 12:15):
    On Fri, 14 Aug 2026 14:05:43 +0200,
    syzbot wrote:
    > 
    > From: Aleksandr Nogikh <nogikh@google.com>
    > 
    > A use-after-free was detected in snd_card_do_free() when a sound card
    > managed by devres is unbound while a user-space application still holds an
    > open file descriptor.
    > 
    > For managed cards, the memory is allocated using devres_alloc(), and its
    > release function is set to __snd_card_release(), which calls
    > snd_card_free(). When the device is unbound, the unbind thread calls
    > snd_card_free(), which drops a reference to the card's device. If the user
    > thread still has an open file descriptor, the reference count does not
    > reach zero, and the unbind thread blocks on wait_for_completion(&released).
    > 
    > When the user thread closes the file descriptor, it drops the final
    > reference, invoking the device release callback release_card_device(),
    > which calls snd_card_do_free(). snd_card_do_free() performs cleanup and
    > calls complete(card->release_completion). This wakes up the unbind thread,
    > which returns from snd_card_free() and __snd_card_release(). The devres
    > core then immediately frees the memory block containing the snd_card
    > structure.
    > 
    > Meanwhile, the user thread continues execution in snd_card_do_free() and
    > evaluates `if (!card->managed)`. It reads the `managed` boolean from the
    > snd_card structure that was just freed by the unbind thread, triggering a
    > KASAN use-after-free.
    > 
    > Fix this by caching the value of card->managed in a local variable before
    > calling complete(). This ensures that the card pointer is not dereferenced
    > after the unbind thread has been woken up and potentially freed the card.
    > 
    > BUG: KASAN: use-after-free in snd_card_do_free sound/core/init.c:604
    > [inline]
    > BUG: KASAN: use-after-free in release_card_device+0x1ab/0x1b0
    > sound/core/init.c:153
    > Read of size 1 at addr ffff8881912ec909 by task syz-executor130/5857
    > 
    > Call Trace:
    >  <TASK>
    >  dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120
    >  print_address_description+0x55/0x1e0 mm/kasan/report.c:378
    >  print_report+0x58/0x70 mm/kasan/report.c:482
    >  kasan_report+0x117/0x150 mm/kasan/report.c:595
    >  snd_card_do_free sound/core/init.c:604 [inline]
    >  release_card_device+0x1ab/0x1b0 sound/core/init.c:153
    >  device_release+0xc4/0x1f0 drivers/base/core.c:-1
    >  kobject_cleanup lib/kobject.c:689 [inline]
    >  kobject_release lib/kobject.c:720 [inline]
    >  kref_put include/linux/kref.h:65 [inline]
    >  kobject_put+0x222/0x550 lib/kobject.c:737
    >  snd_card_file_remove+0x331/0x390 sound/core/init.c:1125
    >  snd_pcm_release+0x12c/0x160 sound/core/pcm_native.c:2986
    >  __fput+0x418/0xa50 fs/file_table.c:512
    >  fput_close_sync+0x11f/0x240 fs/file_table.c:617
    >  __do_sys_close fs/open.c:1511 [inline]
    >  __se_sys_close fs/open.c:1496 [inline]
    >  __x64_sys_close+0x7e/0x110 fs/open.c:1496
    >  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
    >  </TASK>
    > 
    > Fixes: e8ad415b7a55 ("ALSA: core: Add managed card creation")
    > Assisted-by: Gemini:gemini-3.6-flash Gemini:gemini-3.1-pro-preview syzbot
    > Reported-by: syzbot+7061d72c26b7daebe2b4@syzkaller.appspotmail.com
    > Closes: https://syzkaller.appspot.com/bug?extid=7061d72c26b7daebe2b4
    > Link: https://syzkaller.appspot.com/ai_job?id=24752a23-f0b6-49c1-bf20-4fa89c2e7eb2
    > Signed-off-by: Aleksandr Nogikh <nogikh@google.com>
    
    Applied to for-next branch.  Thanks.
    
    
    Takashi
    
moderation lore 2026/08/13 19:56 <b4cf9eb9-0e37-41db-ae44-125880a6740e@mail.kernel.org>
1 Comments
  • syzbot@kernel.org (2026/08/13 20:00):
    A use-after-free was detected in snd_card_do_free() when a sound card
    managed by devres is unbound while a user-space application still holds an
    open file descriptor.
    
    For managed cards, the memory is allocated using devres_alloc(), and its
    release function is set to __snd_card_release(), which calls
    snd_card_free(). When the device is unbound, the unbind thread calls
    snd_card_free(), which drops a reference to the card's device. If the user
    thread still has an open file descriptor, the reference count does not
    reach zero, and the unbind thread blocks on wait_for_completion(&released).
    
    When the user thread closes the file descriptor, it drops the final
    reference, invoking the device release callback release_card_device(),
    which calls snd_card_do_free(). snd_card_do_free() performs cleanup and
    calls complete(card->release_completion). This wakes up the unbind thread,
    which returns from snd_card_free() and __snd_card_release(). The devres
    core then immediately frees the memory block containing the snd_card
    structure.
    
    Meanwhile, the user thread continues execution in snd_card_do_free() and
    evaluates `if (!card->managed)`. It reads the `managed` boolean from the
    snd_card structure that was just freed by the unbind thread, triggering a
    KASAN use-after-free.
    
    Fix this by caching the value of card->managed in a local variable before
    calling complete(). This ensures that the card pointer is not dereferenced
    after the unbind thread has been woken up and potentially freed the card.
    
    BUG: KASAN: use-after-free in snd_card_do_free sound/core/init.c:604
    [inline]
    BUG: KASAN: use-after-free in release_card_device+0x1ab/0x1b0
    sound/core/init.c:153
    Read of size 1 at addr ffff8881912ec909 by task syz-executor130/5857
    
    Call Trace:
     <TASK>
     dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120
     print_address_description+0x55/0x1e0 mm/kasan/report.c:378
     print_report+0x58/0x70 mm/kasan/report.c:482
     kasan_report+0x117/0x150 mm/kasan/report.c:595
     snd_card_do_free sound/core/init.c:604 [inline]
     release_card_device+0x1ab/0x1b0 sound/core/init.c:153
     device_release+0xc4/0x1f0 drivers/base/core.c:-1
     kobject_cleanup lib/kobject.c:689 [inline]
     kobject_release lib/kobject.c:720 [inline]
     kref_put include/linux/kref.h:65 [inline]
     kobject_put+0x222/0x550 lib/kobject.c:737
     snd_card_file_remove+0x331/0x390 sound/core/init.c:1125
     snd_pcm_release+0x12c/0x160 sound/core/pcm_native.c:2986
     __fput+0x418/0xa50 fs/file_table.c:512
     fput_close_sync+0x11f/0x240 fs/file_table.c:617
     __do_sys_close fs/open.c:1511 [inline]
     __se_sys_close fs/open.c:1496 [inline]
     __x64_sys_close+0x7e/0x110 fs/open.c:1496
     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
     </TASK>
    
    Fixes: e8ad415b7a55 ("ALSA: core: Add managed card creation")
    Assisted-by: Gemini:gemini-3.6-flash Gemini:gemini-3.1-pro-preview syzbot
    Reported-by: syzbot+7061d72c26b7daebe2b4@syzkaller.appspotmail.com
    Closes: https://syzkaller.appspot.com/bug?extid=7061d72c26b7daebe2b4
    Link: https://syzkaller.appspot.com/ai_job?id=24752a23-f0b6-49c1-bf20-4fa89c2e7eb2
    To: <linux-sound@vger.kernel.org>
    To: "Jaroslav Kysela" <perex@perex.cz>
    To: "Takashi Iwai" <tiwai@suse.com>
    To: "Takashi Iwai" <tiwai@suse.de>
    Cc: "Mark Brown" <broonie@kernel.org>
    Cc: =?utf-8?q?C=C3=A1ssio_Gabriel?= <cassiogabrielcontato@gmail.com>
    Cc: "Cezary Rojewski" <cezary.rojewski@intel.com>
    Cc: "Kees Cook" <kees@kernel.org>
    Cc: <linux-kernel@vger.kernel.org>
    
    ---
    diff --git a/sound/core/init.c b/sound/core/init.c
    index 56dde5bd7..577338526 100644
    --- a/sound/core/init.c
    +++ b/sound/core/init.c
    @@ -584,6 +584,8 @@ EXPORT_SYMBOL_GPL(snd_card_disconnect_sync);
     
     static int snd_card_do_free(struct snd_card *card)
     {
    +	bool managed = card->managed;
    +
     	card->releasing = true;
     #if IS_ENABLED(CONFIG_SND_MIXER_OSS)
     	if (snd_mixer_oss_notify_callback)
    @@ -601,7 +603,7 @@ static int snd_card_do_free(struct snd_card *card)
     	}
     	if (card->release_completion)
     		complete(card->release_completion);
    -	if (!card->managed)
    +	if (!managed)
     		kfree(card);
     	return 0;
     }
    
    
    base-commit: db2ddb87143519e20a95aa36c60b36107b736a58
    -- 
    This is an AI-generated patch subject to moderation.
    Reply with '#syz upstream' to Sign-off the patch as a human author
    and send it to the upstream kernel mailing lists.
    Reply with '#syz reject' to reject it ('#syz unreject' to undo).
    
    See https://goo.gle/syzbot-ai-patches for information about AI-generated patches.
    You can comment on the patch as usual, syzbot will try to address
    the comments and send a new version of the patch if necessary.
    syzbot engineers can be reached at syzkaller@googlegroups.com.
    

Decision History:
Time User Decision Source Error
2026/08/14 12:05 nogikh@google.com βœ… lore

Outputs:
AckedBy
[]
Fixes
map[AuthorEmail:tiwai@suse.de AuthorName:Takashi Iwai Hash:e8ad415b7a55cb9a9fbfc04696518d5ea0b609b3 Title:ALSA: core: Add managed card creation]
KernelBranch
master
KernelCommit
db2ddb87143519e20a95aa36c60b36107b736a58
KernelRepo
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
PatchDescription
ALSA: core: Fix use-after-free in snd_card_do_free()

A use-after-free was detected in snd_card_do_free() when a sound card
managed by devres is unbound while a user-space application still holds an
open file descriptor.

For managed cards, the memory is allocated using devres_alloc(), and its
release function is set to __snd_card_release(), which calls
snd_card_free(). When the device is unbound, the unbind thread calls
snd_card_free(), which drops a reference to the card's device. If the user
thread still has an open file descriptor, the reference count does not
reach zero, and the unbind thread blocks on wait_for_completion(&released).

When the user thread closes the file descriptor, it drops the final
reference, invoking the device release callback release_card_device(),
which calls snd_card_do_free(). snd_card_do_free() performs cleanup and
calls complete(card->release_completion). This wakes up the unbind thread,
which returns from snd_card_free() and __snd_card_release(). The devres
core then immediately frees the memory block containing the snd_card
structure.

Meanwhile, the user thread continues execution in snd_card_do_free() and
evaluates `if (!card->managed)`. It reads the `managed` boolean from the
snd_card structure that was just freed by the unbind thread, triggering a
KASAN use-after-free.

Fix this by caching the value of card->managed in a local variable before
calling complete(). This ensures that the card pointer is not dereferenced
after the unbind thread has been woken up and potentially freed the card.

BUG: KASAN: use-after-free in snd_card_do_free sound/core/init.c:604
[inline]
BUG: KASAN: use-after-free in release_card_device+0x1ab/0x1b0
sound/core/init.c:153
Read of size 1 at addr ffff8881912ec909 by task syz-executor130/5857

Call Trace:
 <TASK>
 dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120
 print_address_description+0x55/0x1e0 mm/kasan/report.c:378
 print_report+0x58/0x70 mm/kasan/report.c:482
 kasan_report+0x117/0x150 mm/kasan/report.c:595
 snd_card_do_free sound/core/init.c:604 [inline]
 release_card_device+0x1ab/0x1b0 sound/core/init.c:153
 device_release+0xc4/0x1f0 drivers/base/core.c:-1
 kobject_cleanup lib/kobject.c:689 [inline]
 kobject_release lib/kobject.c:720 [inline]
 kref_put include/linux/kref.h:65 [inline]
 kobject_put+0x222/0x550 lib/kobject.c:737
 snd_card_file_remove+0x331/0x390 sound/core/init.c:1125
 snd_pcm_release+0x12c/0x160 sound/core/pcm_native.c:2986
 __fput+0x418/0xa50 fs/file_table.c:512
 fput_close_sync+0x11f/0x240 fs/file_table.c:617
 __do_sys_close fs/open.c:1511 [inline]
 __se_sys_close fs/open.c:1496 [inline]
 __x64_sys_close+0x7e/0x110 fs/open.c:1496
 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
 </TASK>
PatchDiff
diff --git a/sound/core/init.c b/sound/core/init.c
index 56dde5bd7..577338526 100644
--- a/sound/core/init.c
+++ b/sound/core/init.c
@@ -584,6 +584,8 @@ EXPORT_SYMBOL_GPL(snd_card_disconnect_sync);
 
 static int snd_card_do_free(struct snd_card *card)
 {
+	bool managed = card->managed;
+
 	card->releasing = true;
 #if IS_ENABLED(CONFIG_SND_MIXER_OSS)
 	if (snd_mixer_oss_notify_callback)
@@ -601,7 +603,7 @@ static int snd_card_do_free(struct snd_card *card)
 	}
 	if (card->release_completion)
 		complete(card->release_completion);
-	if (!card->managed)
+	if (!managed)
 		kfree(card);
 	return 0;
 }
Recipients
[map[Email:broonie@kernel.org Name:Mark Brown To:false] map[Email:cassiogabrielcontato@gmail.com Name:CΓ‘ssio Gabriel To:false] map[Email:cezary.rojewski@intel.com Name:Cezary Rojewski To:false] map[Email:kees@kernel.org Name:Kees Cook To:false] map[Email:linux-kernel@vger.kernel.org Name: To:false] map[Email:linux-sound@vger.kernel.org Name: To:true] map[Email:perex@perex.cz Name:Jaroslav Kysela To:true] map[Email:tiwai@suse.com Name:Takashi Iwai To:true] map[Email:tiwai@suse.de Name:Takashi Iwai To:true]]
ReportedBy
[]
ReviewedBy
[]
SuggestedBy
[]
TestedBy
[]

Crash report:
==================================================================
BUG: KASAN: use-after-free in snd_card_do_free sound/core/init.c:604 [inline]
BUG: KASAN: use-after-free in release_card_device+0x1ab/0x1b0 sound/core/init.c:153
Read of size 1 at addr ffff8880331d8909 by task syz-executor144/6080

CPU: 0 UID: 0 PID: 6080 Comm: syz-executor144 Not tainted syzkaller #0 PREEMPT(full) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/16/2026
Call Trace:
 <TASK>
 dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120
 print_address_description+0x55/0x1e0 mm/kasan/report.c:378
 print_report+0x58/0x70 mm/kasan/report.c:482
 kasan_report+0x117/0x150 mm/kasan/report.c:595
 snd_card_do_free sound/core/init.c:604 [inline]
 release_card_device+0x1ab/0x1b0 sound/core/init.c:153
 device_release+0xc4/0x1f0 drivers/base/core.c:-1
 kobject_cleanup lib/kobject.c:689 [inline]
 kobject_release lib/kobject.c:720 [inline]
 kref_put include/linux/kref.h:65 [inline]
 kobject_put+0x222/0x550 lib/kobject.c:737
 snd_card_file_remove+0x331/0x390 sound/core/init.c:1125
 snd_pcm_release+0x12c/0x160 sound/core/pcm_native.c:2986
 __fput+0x418/0xa50 fs/file_table.c:512
 fput_close_sync+0x11f/0x240 fs/file_table.c:617
 __do_sys_close fs/open.c:1511 [inline]
 __se_sys_close fs/open.c:1496 [inline]
 __x64_sys_close+0x7e/0x110 fs/open.c:1496
 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:0x7f26958f02de
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:00007f269508d118 EFLAGS: 00000246 ORIG_RAX: 0000000000000003
RAX: ffffffffffffffda RBX: 00007f269508d6c0 RCX: 00007f26958f02de
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000008
RBP: 00007f2695964d40 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: ffffffffffffffd0
R13: 0000000000000002 R14: 00007ffe4c4b2ad0 R15: 00007ffe4c4b2bb8
 </TASK>

The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff8880331d9c00 pfn:0x331d8
flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000000000 ffffea0001c3d308 ffff8880b8641140 0000000000000000
raw: ffff8880331d9c00 0000000000000000 00000000ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as freed
page last allocated via order 2, migratetype Unmovable, gfp_mask 0x40dc0(GFP_KERNEL|__GFP_ZERO|__GFP_COMP), pid 6065, tgid 6065 (syz-executor144), ts 116170038251, free_ts 116442889522
 set_page_owner include/linux/page_owner.h:32 [inline]
 post_alloc_hook+0x1f9/0x250 mm/page_alloc.c:1859
 prep_new_page mm/page_alloc.c:1867 [inline]
 get_page_from_freelist+0x21fa/0x2270 mm/page_alloc.c:3946
 __alloc_frozen_pages_noprof+0x18d/0x380 mm/page_alloc.c:5304
 alloc_pages_mpol+0x212/0x380 mm/mempolicy.c:2490
 ___kmalloc_large_node+0x4c/0x120 mm/slub.c:5274
 __kmalloc_large_node_noprof+0x18/0x90 mm/slub.c:5305
 __do_kmalloc_node mm/slub.c:5322 [inline]
 __kmalloc_node_track_caller_noprof+0x164/0x730 mm/slub.c:5471
 alloc_dr drivers/base/devres.c:141 [inline]
 __devres_alloc_node+0x4c/0x160 drivers/base/devres.c:189
 snd_devm_card_new+0x84/0x160 sound/core/init.c:235
 loopback_probe+0x150/0x13d0 sound/drivers/aloop.c:1805
 platform_probe+0xf9/0x190 drivers/base/platform.c:1439
 call_driver_probe drivers/base/dd.c:-1 [inline]
 really_probe+0x254/0xae0 drivers/base/dd.c:706
 __driver_probe_device+0x1e8/0x360 drivers/base/dd.c:868
 device_driver_attach+0xe0/0x1d0 drivers/base/dd.c:1203
 bind_store+0x1d0/0x220 drivers/base/bus.c:267
 kernfs_fop_write_iter+0x3a4/0x540 fs/kernfs/file.c:345
page last free pid 6077 tgid 6065 stack trace:
 reset_page_owner include/linux/page_owner.h:25 [inline]
 __free_pages_prepare mm/page_alloc.c:1406 [inline]
 __free_frozen_pages+0xc1e/0xd10 mm/page_alloc.c:2950
 free_node drivers/base/devres.c:50 [inline]
 release_nodes drivers/base/devres.c:547 [inline]
 devres_release_all+0x1ce/0x260 drivers/base/devres.c:576
 device_unbind_cleanup drivers/base/dd.c:597 [inline]
 __device_release_driver drivers/base/dd.c:1354 [inline]
 device_release_driver_internal+0x5d9/0x880 drivers/base/dd.c:1372
 unbind_store+0x1a1/0x1d0 drivers/base/bus.c:244
 kernfs_fop_write_iter+0x3a4/0x540 fs/kernfs/file.c:345
 new_sync_write fs/read_write.c:595 [inline]
 vfs_write+0x612/0xba0 fs/read_write.c:687
 ksys_write+0x150/0x270 fs/read_write.c:739
 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

Memory state around the buggy address:
 ffff8880331d8800: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 ffff8880331d8880: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>ffff8880331d8900: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
                      ^
 ffff8880331d8980: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 ffff8880331d8a00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
==================================================================

Trajectory: (Expand/Collapse All)
Seq Timestamp Type Name Duration
0/0 2026/08/13 18:20 flow patching
1h35m Results:
map[AckedBy:[] Fixes:map[AuthorEmail:tiwai@suse.de AuthorName:Takashi Iwai Hash:e8ad415b7a55cb9a9fbfc04696518d5ea0b609b3 Title:ALSA: core: Add managed card creation] KernelBranch:master KernelCommit:db2ddb87143519e20a95aa36c60b36107b736a58 KernelRepo:git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git PatchDescription:ALSA: core: Fix use-after-free in snd_card_do_free()

A use-after-free was detected in snd_card_do_free() when a sound card
managed by devres is unbound while a user-space application still holds an
open file descriptor.

For managed cards, the memory is allocated using devres_alloc(), and its
release function is set to __snd_card_release(), which calls
snd_card_free(). When the device is unbound, the unbind thread calls
snd_card_free(), which drops a reference to the card's device. If the user
thread still has an open file descriptor, the reference count does not
reach zero, and the unbind thread blocks on wait_for_completion(&released).

When the user thread closes the file descriptor, it drops the final
reference, invoking the device release callback release_card_device(),
which calls snd_card_do_free(). snd_card_do_free() performs cleanup and
calls complete(card->release_completion). This wakes up the unbind thread,
which returns from snd_card_free() and __snd_card_release(). The devres
core then immediately frees the memory block containing the snd_card
structure.

Meanwhile, the user thread continues execution in snd_card_do_free() and
evaluates `if (!card->managed)`. It reads the `managed` boolean from the
snd_card structure that was just freed by the unbind thread, triggering a
KASAN use-after-free.

Fix this by caching the value of card->managed in a local variable before
calling complete(). This ensures that the card pointer is not dereferenced
after the unbind thread has been woken up and potentially freed the card.

BUG: KASAN: use-after-free in snd_card_do_free sound/core/init.c:604
[inline]
BUG: KASAN: use-after-free in release_card_device+0x1ab/0x1b0
sound/core/init.c:153
Read of size 1 at addr ffff8881912ec909 by task syz-executor130/5857

Call Trace:
 <TASK>
 dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120
 print_address_description+0x55/0x1e0 mm/kasan/report.c:378
 print_report+0x58/0x70 mm/kasan/report.c:482
 kasan_report+0x117/0x150 mm/kasan/report.c:595
 snd_card_do_free sound/core/init.c:604 [inline]
 release_card_device+0x1ab/0x1b0 sound/core/init.c:153
 device_release+0xc4/0x1f0 drivers/base/core.c:-1
 kobject_cleanup lib/kobject.c:689 [inline]
 kobject_release lib/kobject.c:720 [inline]
 kref_put include/linux/kref.h:65 [inline]
 kobject_put+0x222/0x550 lib/kobject.c:737
 snd_card_file_remove+0x331/0x390 sound/core/init.c:1125
 snd_pcm_release+0x12c/0x160 sound/core/pcm_native.c:2986
 __fput+0x418/0xa50 fs/file_table.c:512
 fput_close_sync+0x11f/0x240 fs/file_table.c:617
 __do_sys_close fs/open.c:1511 [inline]
 __se_sys_close fs/open.c:1496 [inline]
 __x64_sys_close+0x7e/0x110 fs/open.c:1496
 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
 </TASK> PatchDiff:diff --git a/sound/core/init.c b/sound/core/init.c
index 56dde5bd7..577338526 100644
--- a/sound/core/init.c
+++ b/sound/core/init.c
@@ -584,6 +584,8 @@ EXPORT_SYMBOL_GPL(snd_card_disconnect_sync);
 
 static int snd_card_do_free(struct snd_card *card)
 {
+	bool managed = card->managed;
+
 	card->releasing = true;
 #if IS_ENABLED(CONFIG_SND_MIXER_OSS)
 	if (snd_mixer_oss_notify_callback)
@@ -601,7 +603,7 @@ static int snd_card_do_free(struct snd_card *card)
 	}
 	if (card->release_completion)
 		complete(card->release_completion);
-	if (!card->managed)
+	if (!managed)
 		kfree(card);
 	return 0;
 }
 Recipients:[map[Email:broonie@kernel.org Name:Mark Brown To:false] map[Email:cassiogabrielcontato@gmail.com Name:CΓ‘ssio Gabriel To:false] map[Email:cezary.rojewski@intel.com Name:Cezary Rojewski To:false] map[Email:kees@kernel.org Name:Kees Cook To:false] map[Email:linux-kernel@vger.kernel.org Name: To:false] map[Email:linux-sound@vger.kernel.org Name: To:true] map[Email:perex@perex.cz Name:Jaroslav Kysela To:true] map[Email:tiwai@suse.com Name:Takashi Iwai To:true] map[Email:tiwai@suse.de Name:Takashi Iwai To:true]] ReportedBy:[] ReviewedBy:[] SuggestedBy:[] TestedBy:[]]

1/1 2026/08/13 18:20 action base-commit-picker
0m Results:
map[KernelBranch:master KernelCommit:db2ddb87143519e20a95aa36c60b36107b736a58 KernelRepo:git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git]

2/1 2026/08/13 18:20 action syz-repro-to-c-repro
0m Results:
map[SimplifiedCRepro:// Copyright 2026 syzkaller project authors. All rights reserved.
// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.

// IMPORTANT: Do not copy the macros or definitions below directly into your reproducer.
// Instead, add the following line to your reproducer:
// #include "race_toolkit.h"

// --- Race Condition Toolkit ---
// Macros and snippets for CPU pinning, memory barriers, and userfaultfd.

#define _GNU_SOURCE
#include <errno.h>
#include <fcntl.h>
#include <linux/futex.h>
#include <linux/userfaultfd.h>
#include <poll.h>
#include <pthread.h>
#include <sched.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/ioctl.h>
#include <sys/syscall.h>
#include <time.h>
#include <unistd.h>

// Unbuffered I/O: Ensure logs are written immediately.
#define SETUP_UNBUFFERED_IO() setvbuf(stdout, NULL, _IONBF, 0)

// CPU Pinning: Pin the current thread to a specific CPU core.
#define PIN_TO_CPU(cpu)                                                \
	do {                                                           \
		cpu_set_t mask;                                        \
		CPU_ZERO(&mask);                                       \
		CPU_SET(cpu, &mask);                                   \
		if (sched_setaffinity(0, sizeof(mask), &mask) == -1) { \
			perror("sched_setaffinity");                   \
		}                                                      \
	} while (0)

// Memory Barrier: Ensure memory ordering.
#define MB() __atomic_thread_fence(__ATOMIC_SEQ_CST)

// Spin-wait Barrier: Wait until a memory location has a specific value.
// Best for tight race windows (low latency, no context switches).
#define WAIT_ON(addr, val)                                               \
	do {                                                             \
		while (__atomic_load_n(addr, __ATOMIC_ACQUIRE) != (val)) \
			;                                                \
	} while (0)

// Signal: Set a memory location to a specific value to release a WAIT_ON.
#define SIGNAL(addr, val) __atomic_store_n(addr, val, __ATOMIC_RELEASE)

// --- Timing Primitives ---
// Robust timing loops in VM environments (using CLOCK_MONOTONIC to avoid time(NULL) jumps).

static inline double timer_elapsed_sec(struct timespec* start)
{
	struct timespec now;
	if (clock_gettime(CLOCK_MONOTONIC, &now) == -1) {
		perror("clock_gettime(CLOCK_MONOTONIC) elapsed");
		exit(1);
	}
	return (double)(now.tv_sec - start->tv_sec) + (double)(now.tv_nsec - start->tv_nsec) / 1e9;
}

// Initialize a monotonic timer variable.
#define TIMER_START(t)                                          \
	struct timespec t;                                      \
	if (clock_gettime(CLOCK_MONOTONIC, &t) == -1) {         \
		perror("clock_gettime(CLOCK_MONOTONIC) start"); \
		exit(1);                                        \
	}

// Check if the elapsed time since 't' is less than 'sec' seconds.
#define TIMER_NOT_EXPIRED(t, sec) (timer_elapsed_sec(&(t)) < (double)(sec))

// Futex-based Event: Shared with syzkaller executor.
// Best for general synchronization or longer waits to save CPU.
typedef struct {
	int state;
} event_t;

static void event_init(event_t* ev)
{
	ev->state = 0;
}
static void event_reset(event_t* ev)
{
	ev->state = 0;
}

static void event_set(event_t* ev)
{
	if (__atomic_load_n(&ev->state, __ATOMIC_ACQUIRE)) {
		fprintf(stderr, "event already set\n");
		exit(1);
	}
	__atomic_store_n(&ev->state, 1, __ATOMIC_RELEASE);
	syscall(SYS_futex, &ev->state, FUTEX_WAKE | FUTEX_PRIVATE_FLAG, 1000000);
}

static void event_wait(event_t* ev)
{
	while (!__atomic_load_n(&ev->state, __ATOMIC_ACQUIRE))
		syscall(SYS_futex, &ev->state, FUTEX_WAIT | FUTEX_PRIVATE_FLAG, 0, 0);
}

// userfaultfd setup: Register a memory range for page fault handling.
static int setup_uffd(void* addr, size_t len)
{
	int uffd = syscall(__NR_userfaultfd, O_CLOEXEC | O_NONBLOCK);
	if (uffd == -1)
		return -1;
	struct uffdio_api api = {.api = UFFD_API, .features = 0};
	if (ioctl(uffd, UFFDIO_API, &api) == -1) {
		close(uffd);
		return -1;
	}
	struct uffdio_register reg = {
	    .range = {.start = (uintptr_t)addr, .len = len},
	    .mode = UFFDIO_REGISTER_MODE_MISSING};
	if (ioctl(uffd, UFFDIO_REGISTER, &reg) == -1) {
		close(uffd);
		return -1;
	}
	return uffd;
}

// --- Guidance on Usage ---
// 1. Use WAIT_ON/SIGNAL for tight race conditions to avoid scheduling overhead.
// 2. Use event_t (futexes) for general coordination or when waiting for longer periods.
// 3. Always use PIN_TO_CPU to increase race probability on multi-core systems.
// 4. Use setup_uffd to register a memory range for page fault handling. This allows you to
//    pause a thread accessing that memory until you handle the fault, creating a reliable
//    and controllable race window.
// 5. Call SETUP_UNBUFFERED_IO() at the start of main() to ensure that logs are printed
//    immediately. This is essential for understanding the exact interleaving of events
//    when debugging race conditions.
// 6. For timing-based loops (e.g., running a race for 10 seconds), do NOT use time(NULL)
//    or loops relying on real-time clocks, as VM clocks are highly unreliable and can fail or drift.
//    Instead, use the robust monotonic timing primitives TIMER_START and TIMER_NOT_EXPIRED:
//        TIMER_START(start);
//        while (TIMER_NOT_EXPIRED(start, 10.0)) {
//            // Your race logic here
//        }

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#include <string.h>
#include <pthread.h>
#include <sched.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <dirent.h>
#include <errno.h>

int fds[32];
int num_fds = 0;

char target_device[256] = {0};
char target_driver[256] = {0};

void find_device() {
    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;
    while ((ent = readdir(dir)) != NULL) {
        if (strncmp(ent->d_name, "snd_aloop", 9) == 0) {
            strcpy(target_device, ent->d_name);
            strcpy(target_driver, "snd_aloop");
            break;
        }
        if (strncmp(ent->d_name, "snd_dummy", 9) == 0) {
            strcpy(target_device, ent->d_name);
            strcpy(target_driver, "snd_dummy");
            break;
        }
    }
    closedir(dir);
    printf("[+] find_device successful.\n");
}

void *unbind_thread(void *arg) {
    PIN_TO_CPU(0);
    struct sched_param param;
    param.sched_priority = 99;
    if (sched_setscheduler(0, SCHED_FIFO, &param) != 0) {
        printf("[-] Failed to sched_setscheduler FIFO 99: %s\n", strerror(errno));
        exit(1);
    }
    printf("[+] sched_setscheduler FIFO 99 successful.\n");

    char path[256];
    snprintf(path, sizeof(path), "/sys/bus/platform/drivers/%s/unbind", target_driver);
    int fd = open(path, O_WRONLY);
    if (fd < 0) {
        printf("[-] Failed to open unbind: %s\n", strerror(errno));
        exit(1);
    }
    int res = write(fd, target_device, strlen(target_device));
    if (res < 0) {
        printf("[-] Failed to write unbind: %s\n", strerror(errno));
        exit(1);
    }
    close(fd);
    printf("[+] unbind successful.\n");
    return NULL;
}

void *close_thread(void *arg) {
    PIN_TO_CPU(0);
    struct sched_param param;
    param.sched_priority = 98;
    if (sched_setscheduler(0, SCHED_FIFO, &param) != 0) {
        printf("[-] Failed to sched_setscheduler FIFO 98: %s\n", strerror(errno));
        exit(1);
    }
    printf("[+] sched_setscheduler FIFO 98 successful.\n");

    for (int i = 0; i < num_fds; i++) {
        if (fds[i] >= 0) {
            int res = close(fds[i]);
            if (res < 0) {
                printf("[-] Failed to close fd: %s\n", strerror(errno));
                exit(1);
            }
            fds[i] = -1;
        }
    }
    printf("[+] close_thread successful.\n");
    return NULL;
}

int main() {
    SETUP_UNBUFFERED_IO();
    
    find_device();
    if (target_device[0] == '\0') {
        printf("[-] No snd_aloop or snd_dummy device found.\n");
        exit(1);
    }
    printf("[+] Target device: %s, driver: %s\n", target_device, target_driver);
    
    // Initial unbind to ensure clean state
    char unbind_path[256];
    snprintf(unbind_path, sizeof(unbind_path), "/sys/bus/platform/drivers/%s/unbind", target_driver);
    int ufd = open(unbind_path, O_WRONLY);
    if (ufd >= 0) {
        write(ufd, target_device, strlen(target_device));
        close(ufd);
    }
    
    TIMER_START(start);
    while (TIMER_NOT_EXPIRED(start, 10.0)) {
        char path[256];
        snprintf(path, sizeof(path), "/sys/bus/platform/drivers/%s/bind", target_driver);
        int fd = open(path, O_WRONLY);
        if (fd < 0) {
            printf("[-] Failed to open bind: %s\n", strerror(errno));
            exit(1);
        }
        int res = write(fd, target_device, strlen(target_device));
        if (res < 0) {
            printf("[-] Failed to write bind: %s\n", strerror(errno));
            exit(1);
        }
        close(fd);
        printf("[+] bind successful.\n");
        
        num_fds = 0;
        int retries = 10;
        while (retries-- > 0 && num_fds == 0) {
            for (int i = 0; i < 8; i++) {
                char devpath[64];
                sprintf(devpath, "/dev/snd/controlC%d", i);
                int cfd = open(devpath, O_RDONLY);
                if (cfd >= 0) fds[num_fds++] = cfd;
                
                sprintf(devpath, "/dev/snd/pcmC%dD0p", i);
                cfd = open(devpath, O_RDONLY);
                if (cfd >= 0) fds[num_fds++] = cfd;
                
                sprintf(devpath, "/dev/snd/pcmC%dD0c", i);
                cfd = open(devpath, O_RDONLY);
                if (cfd >= 0) fds[num_fds++] = cfd;
            }
            if (num_fds == 0) usleep(50000);
        }
        if (num_fds == 0) {
            printf("[-] Failed to open any sound devices after retries.\n");
            exit(1);
        }
        printf("[+] Opened %d sound devices.\n", num_fds);
        
        pthread_t t1, t2;
        res = pthread_create(&t1, NULL, unbind_thread, NULL);
        if (res != 0) {
            printf("[-] Failed to pthread_create t1: %s\n", strerror(res));
            exit(1);
        }
        printf("[+] pthread_create t1 successful.\n");
        
        // Give the unbind thread plenty of time to run and block in wait_for_completion
        usleep(50000); 
        
        res = pthread_create(&t2, NULL, close_thread, NULL);
        if (res != 0) {
            printf("[-] Failed to pthread_create t2: %s\n", strerror(res));
            exit(1);
        }
        printf("[+] pthread_create t2 successful.\n");
        
        res = pthread_join(t1, NULL);
        if (res != 0) {
            printf("[-] Failed to pthread_join t1: %s\n", strerror(res));
            exit(1);
        }
        res = pthread_join(t2, NULL);
        if (res != 0) {
            printf("[-] Failed to pthread_join t2: %s\n", strerror(res));
            exit(1);
        }
        printf("[+] pthread_join successful.\n");
    }
    
    return 0;
}
]

3/1 2026/08/13 18:21 action kernel-checkouter
0m Results:
map[KernelSrc:/app/workdir/cache/src/a1b57dc758c6c34333284131703ffa376c4cdbb7]

4/1 2026/08/13 18:21 action kernel-builder
29m Results:
map[KernelObj:/app/workdir/cache/build/a69e073d416484a2091e06431e33fac59e5d83e0]

5/1 2026/08/13 18:50 action crash-reproducer
1m Results:
map[OtherCrashReports:<nil> ReproducedBugTitle:KASAN: use-after-free Read in release_card_device ReproducedCrashReport:==================================================================
BUG: KASAN: use-after-free in snd_card_do_free sound/core/init.c:604 [inline]
BUG: KASAN: use-after-free in release_card_device+0x1ab/0x1b0 sound/core/init.c:153
Read of size 1 at addr ffff8881912ec909 by task syz-executor130/5857

CPU: 0 UID: 0 PID: 5857 Comm: syz-executor130 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
Call Trace:
 <TASK>
 dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120
 print_address_description+0x55/0x1e0 mm/kasan/report.c:378
 print_report+0x58/0x70 mm/kasan/report.c:482
 kasan_report+0x117/0x150 mm/kasan/report.c:595
 snd_card_do_free sound/core/init.c:604 [inline]
 release_card_device+0x1ab/0x1b0 sound/core/init.c:153
 device_release+0xc4/0x1f0 drivers/base/core.c:-1
 kobject_cleanup lib/kobject.c:689 [inline]
 kobject_release lib/kobject.c:720 [inline]
 kref_put include/linux/kref.h:65 [inline]
 kobject_put+0x222/0x550 lib/kobject.c:737
 snd_card_file_remove+0x331/0x390 sound/core/init.c:1125
 snd_pcm_release+0x12c/0x160 sound/core/pcm_native.c:2986
 __fput+0x418/0xa50 fs/file_table.c:512
 fput_close_sync+0x11f/0x240 fs/file_table.c:617
 __do_sys_close fs/open.c:1511 [inline]
 __se_sys_close fs/open.c:1496 [inline]
 __x64_sys_close+0x7e/0x110 fs/open.c:1496
 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:0x7f87f11782de
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:00007f87f0915118 EFLAGS: 00000246 ORIG_RAX: 0000000000000003
RAX: ffffffffffffffda RBX: 00007f87f09156c0 RCX: 00007f87f11782de
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000008
RBP: 00007f87f11ecd40 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: ffffffffffffffd0
R13: 0000000000000002 R14: 00007ffe50e899e0 R15: 00007ffe50e89ac8
 </TASK>

The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1912ec
flags: 0x57ff00000000000(node=1|zone=2|lastcpupid=0x7ff)
raw: 057ff00000000000 ffffea0007e57308 ffff888138841440 0000000000000000
raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as freed
page last allocated via order 2, migratetype Unmovable, gfp_mask 0x40dc0(GFP_KERNEL|__GFP_ZERO|__GFP_COMP), pid 5852, tgid 5852 (syz-executor130), ts 71488546659, free_ts 71610399401
 set_page_owner include/linux/page_owner.h:32 [inline]
 post_alloc_hook+0x1f9/0x250 mm/page_alloc.c:1859
 prep_new_page mm/page_alloc.c:1867 [inline]
 get_page_from_freelist+0x21fa/0x2270 mm/page_alloc.c:3946
 __alloc_frozen_pages_noprof+0x18d/0x380 mm/page_alloc.c:5304
 alloc_pages_mpol+0x212/0x380 mm/mempolicy.c:2490
 ___kmalloc_large_node+0x4c/0x120 mm/slub.c:5274
 __kmalloc_large_node_noprof+0x18/0x90 mm/slub.c:5305
 __do_kmalloc_node mm/slub.c:5322 [inline]
 __kmalloc_node_track_caller_noprof+0x164/0x730 mm/slub.c:5471
 alloc_dr drivers/base/devres.c:141 [inline]
 __devres_alloc_node+0x4c/0x160 drivers/base/devres.c:189
 snd_devm_card_new+0x84/0x160 sound/core/init.c:235
 loopback_probe+0x150/0x13d0 sound/drivers/aloop.c:1805
 platform_probe+0xf9/0x190 drivers/base/platform.c:1439
 call_driver_probe drivers/base/dd.c:-1 [inline]
 really_probe+0x254/0xae0 drivers/base/dd.c:706
 __driver_probe_device+0x1e8/0x360 drivers/base/dd.c:868
 device_driver_attach+0xe0/0x1d0 drivers/base/dd.c:1203
 bind_store+0x1d0/0x220 drivers/base/bus.c:267
 kernfs_fop_write_iter+0x3a4/0x540 fs/kernfs/file.c:345
page last free pid 5856 tgid 5852 stack trace:
 reset_page_owner include/linux/page_owner.h:25 [inline]
 __free_pages_prepare mm/page_alloc.c:1406 [inline]
 __free_frozen_pages+0xc1e/0xd10 mm/page_alloc.c:2950
 free_node drivers/base/devres.c:50 [inline]
 release_nodes drivers/base/devres.c:547 [inline]
 devres_release_all+0x1ce/0x260 drivers/base/devres.c:576
 device_unbind_cleanup drivers/base/dd.c:597 [inline]
 __device_release_driver drivers/base/dd.c:1354 [inline]
 device_release_driver_internal+0x5d9/0x880 drivers/base/dd.c:1372
 unbind_store+0x1a1/0x1d0 drivers/base/bus.c:244
 kernfs_fop_write_iter+0x3a4/0x540 fs/kernfs/file.c:345
 new_sync_write fs/read_write.c:595 [inline]
 vfs_write+0x612/0xba0 fs/read_write.c:687
 ksys_write+0x150/0x270 fs/read_write.c:739
 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

Memory state around the buggy address:
 ffff8881912ec800: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 ffff8881912ec880: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>ffff8881912ec900: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
                      ^
 ffff8881912ec980: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 ffff8881912eca00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
==================================================================
 ReproducedFaultInjection:]

6/1 2026/08/13 18:51 action codesearch-prepare
12m Results:
map[Index:codesearch-index]

7/1 2026/08/13 19:04 agent debugger
3m Model:
best-expensive

Instruction:
You are an experienced Linux kernel developer tasked with debugging a kernel crash root cause.
You need to provide a detailed explanation of the root cause for another developer to be
able to write a fix for the bug based on your explanation. Include all relevant details
into the response: function/struct/field/etc names, code snippets, line numbers,
macro/enum values, etc.



Don't make assumptions about the kernel source code (it may be different from what you assume it is).
Extensively use the provided code access tools (codesearch-*, git-*, grepper, etc)
to examine the actual source code, and confirm any assumptions.

Prefer calling several tools at the same time to save round-trips.

Prompt:
The crash is:

==================================================================
BUG: KASAN: use-after-free in snd_card_do_free sound/core/init.c:604 [inline]
BUG: KASAN: use-after-free in release_card_device+0x1ab/0x1b0 sound/core/init.c:153
Read of size 1 at addr ffff8881912ec909 by task syz-executor130/5857

CPU: 0 UID: 0 PID: 5857 Comm: syz-executor130 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
Call Trace:
 <TASK>
 dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120
 print_address_description+0x55/0x1e0 mm/kasan/report.c:378
 print_report+0x58/0x70 mm/kasan/report.c:482
 kasan_report+0x117/0x150 mm/kasan/report.c:595
 snd_card_do_free sound/core/init.c:604 [inline]
 release_card_device+0x1ab/0x1b0 sound/core/init.c:153
 device_release+0xc4/0x1f0 drivers/base/core.c:-1
 kobject_cleanup lib/kobject.c:689 [inline]
 kobject_release lib/kobject.c:720 [inline]
 kref_put include/linux/kref.h:65 [inline]
 kobject_put+0x222/0x550 lib/kobject.c:737
 snd_card_file_remove+0x331/0x390 sound/core/init.c:1125
 snd_pcm_release+0x12c/0x160 sound/core/pcm_native.c:2986
 __fput+0x418/0xa50 fs/file_table.c:512
 fput_close_sync+0x11f/0x240 fs/file_table.c:617
 __do_sys_close fs/open.c:1511 [inline]
 __se_sys_close fs/open.c:1496 [inline]
 __x64_sys_close+0x7e/0x110 fs/open.c:1496
 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:0x7f87f11782de
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:00007f87f0915118 EFLAGS: 00000246 ORIG_RAX: 0000000000000003
RAX: ffffffffffffffda RBX: 00007f87f09156c0 RCX: 00007f87f11782de
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000008
RBP: 00007f87f11ecd40 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: ffffffffffffffd0
R13: 0000000000000002 R14: 00007ffe50e899e0 R15: 00007ffe50e89ac8
 </TASK>

The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1912ec
flags: 0x57ff00000000000(node=1|zone=2|lastcpupid=0x7ff)
raw: 057ff00000000000 ffffea0007e57308 ffff888138841440 0000000000000000
raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as freed
page last allocated via order 2, migratetype Unmovable, gfp_mask 0x40dc0(GFP_KERNEL|__GFP_ZERO|__GFP_COMP), pid 5852, tgid 5852 (syz-executor130), ts 71488546659, free_ts 71610399401
 set_page_owner include/linux/page_owner.h:32 [inline]
 post_alloc_hook+0x1f9/0x250 mm/page_alloc.c:1859
 prep_new_page mm/page_alloc.c:1867 [inline]
 get_page_from_freelist+0x21fa/0x2270 mm/page_alloc.c:3946
 __alloc_frozen_pages_noprof+0x18d/0x380 mm/page_alloc.c:5304
 alloc_pages_mpol+0x212/0x380 mm/mempolicy.c:2490
 ___kmalloc_large_node+0x4c/0x120 mm/slub.c:5274
 __kmalloc_large_node_noprof+0x18/0x90 mm/slub.c:5305
 __do_kmalloc_node mm/slub.c:5322 [inline]
 __kmalloc_node_track_caller_noprof+0x164/0x730 mm/slub.c:5471
 alloc_dr drivers/base/devres.c:141 [inline]
 __devres_alloc_node+0x4c/0x160 drivers/base/devres.c:189
 snd_devm_card_new+0x84/0x160 sound/core/init.c:235
 loopback_probe+0x150/0x13d0 sound/drivers/aloop.c:1805
 platform_probe+0xf9/0x190 drivers/base/platform.c:1439
 call_driver_probe drivers/base/dd.c:-1 [inline]
 really_probe+0x254/0xae0 drivers/base/dd.c:706
 __driver_probe_device+0x1e8/0x360 drivers/base/dd.c:868
 device_driver_attach+0xe0/0x1d0 drivers/base/dd.c:1203
 bind_store+0x1d0/0x220 drivers/base/bus.c:267
 kernfs_fop_write_iter+0x3a4/0x540 fs/kernfs/file.c:345
page last free pid 5856 tgid 5852 stack trace:
 reset_page_owner include/linux/page_owner.h:25 [inline]
 __free_pages_prepare mm/page_alloc.c:1406 [inline]
 __free_frozen_pages+0xc1e/0xd10 mm/page_alloc.c:2950
 free_node drivers/base/devres.c:50 [inline]
 release_nodes drivers/base/devres.c:547 [inline]
 devres_release_all+0x1ce/0x260 drivers/base/devres.c:576
 device_unbind_cleanup drivers/base/dd.c:597 [inline]
 __device_release_driver drivers/base/dd.c:1354 [inline]
 device_release_driver_internal+0x5d9/0x880 drivers/base/dd.c:1372
 unbind_store+0x1a1/0x1d0 drivers/base/bus.c:244
 kernfs_fop_write_iter+0x3a4/0x540 fs/kernfs/file.c:345
 new_sync_write fs/read_write.c:595 [inline]
 vfs_write+0x612/0xba0 fs/read_write.c:687
 ksys_write+0x150/0x270 fs/read_write.c:739
 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

Memory state around the buggy address:
 ffff8881912ec800: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 ffff8881912ec880: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>ffff8881912ec900: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
                      ^
 ffff8881912ec980: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 ffff8881912eca00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
==================================================================


The following C code is a draft of the vulnerable syscall sequence. Keep in mind that
it may lack the precise threading, sandboxing, and some arguments of a working reproducer:

// Copyright 2026 syzkaller project authors. All rights reserved.
// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.

// IMPORTANT: Do not copy the macros or definitions below directly into your reproducer.
// Instead, add the following line to your reproducer:
// #include "race_toolkit.h"

// --- Race Condition Toolkit ---
// Macros and snippets for CPU pinning, memory barriers, and userfaultfd.

#define _GNU_SOURCE
#include <errno.h>
#include <fcntl.h>
#include <linux/futex.h>
#include <linux/userfaultfd.h>
#include <poll.h>
#include <pthread.h>
#include <sched.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/ioctl.h>
#include <sys/syscall.h>
#include <time.h>
#include <unistd.h>

// Unbuffered I/O: Ensure logs are written immediately.
#define SETUP_UNBUFFERED_IO() setvbuf(stdout, NULL, _IONBF, 0)

// CPU Pinning: Pin the current thread to a specific CPU core.
#define PIN_TO_CPU(cpu)                                                \
	do {                                                           \
		cpu_set_t mask;                                        \
		CPU_ZERO(&mask);                                       \
		CPU_SET(cpu, &mask);                                   \
		if (sched_setaffinity(0, sizeof(mask), &mask) == -1) { \
			perror("sched_setaffinity");                   \
		}                                                      \
	} while (0)

// Memory Barrier: Ensure memory ordering.
#define MB() __atomic_thread_fence(__ATOMIC_SEQ_CST)

// Spin-wait Barrier: Wait until a memory location has a specific value.
// Best for tight race windows (low latency, no context switches).
#define WAIT_ON(addr, val)                                               \
	do {                                                             \
		while (__atomic_load_n(addr, __ATOMIC_ACQUIRE) != (val)) \
			;                                                \
	} while (0)

// Signal: Set a memory location to a specific value to release a WAIT_ON.
#define SIGNAL(addr, val) __atomic_store_n(addr, val, __ATOMIC_RELEASE)

// --- Timing Primitives ---
// Robust timing loops in VM environments (using CLOCK_MONOTONIC to avoid time(NULL) jumps).

static inline double timer_elapsed_sec(struct timespec* start)
{
	struct timespec now;
	if (clock_gettime(CLOCK_MONOTONIC, &now) == -1) {
		perror("clock_gettime(CLOCK_MONOTONIC) elapsed");
		exit(1);
	}
	return (double)(now.tv_sec - start->tv_sec) + (double)(now.tv_nsec - start->tv_nsec) / 1e9;
}

// Initialize a monotonic timer variable.
#define TIMER_START(t)                                          \
	struct timespec t;                                      \
	if (clock_gettime(CLOCK_MONOTONIC, &t) == -1) {         \
		perror("clock_gettime(CLOCK_MONOTONIC) start"); \
		exit(1);                                        \
	}

// Check if the elapsed time since 't' is less than 'sec' seconds.
#define TIMER_NOT_EXPIRED(t, sec) (timer_elapsed_sec(&(t)) < (double)(sec))

// Futex-based Event: Shared with syzkaller executor.
// Best for general synchronization or longer waits to save CPU.
typedef struct {
	int state;
} event_t;

static void event_init(event_t* ev)
{
	ev->state = 0;
}
static void event_reset(event_t* ev)
{
	ev->state = 0;
}

static void event_set(event_t* ev)
{
	if (__atomic_load_n(&ev->state, __ATOMIC_ACQUIRE)) {
		fprintf(stderr, "event already set\n");
		exit(1);
	}
	__atomic_store_n(&ev->state, 1, __ATOMIC_RELEASE);
	syscall(SYS_futex, &ev->state, FUTEX_WAKE | FUTEX_PRIVATE_FLAG, 1000000);
}

static void event_wait(event_t* ev)
{
	while (!__atomic_load_n(&ev->state, __ATOMIC_ACQUIRE))
		syscall(SYS_futex, &ev->state, FUTEX_WAIT | FUTEX_PRIVATE_FLAG, 0, 0);
}

// userfaultfd setup: Register a memory range for page fault handling.
static int setup_uffd(void* addr, size_t len)
{
	int uffd = syscall(__NR_userfaultfd, O_CLOEXEC | O_NONBLOCK);
	if (uffd == -1)
		return -1;
	struct uffdio_api api = {.api = UFFD_API, .features = 0};
	if (ioctl(uffd, UFFDIO_API, &api) == -1) {
		close(uffd);
		return -1;
	}
	struct uffdio_register reg = {
	    .range = {.start = (uintptr_t)addr, .len = len},
	    .mode = UFFDIO_REGISTER_MODE_MISSING};
	if (ioctl(uffd, UFFDIO_REGISTER, &reg) == -1) {
		close(uffd);
		return -1;
	}
	return uffd;
}

// --- Guidance on Usage ---
// 1. Use WAIT_ON/SIGNAL for tight race conditions to avoid scheduling overhead.
// 2. Use event_t (futexes) for general coordination or when waiting for longer periods.
// 3. Always use PIN_TO_CPU to increase race probability on multi-core systems.
// 4. Use setup_uffd to register a memory range for page fault handling. This allows you to
//    pause a thread accessing that memory until you handle the fault, creating a reliable
//    and controllable race window.
// 5. Call SETUP_UNBUFFERED_IO() at the start of main() to ensure that logs are printed
//    immediately. This is essential for understanding the exact interleaving of events
//    when debugging race conditions.
// 6. For timing-based loops (e.g., running a race for 10 seconds), do NOT use time(NULL)
//    or loops relying on real-time clocks, as VM clocks are highly unreliable and can fail or drift.
//    Instead, use the robust monotonic timing primitives TIMER_START and TIMER_NOT_EXPIRED:
//        TIMER_START(start);
//        while (TIMER_NOT_EXPIRED(start, 10.0)) {
//            // Your race logic here
//        }

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#include <string.h>
#include <pthread.h>
#include <sched.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <dirent.h>
#include <errno.h>

int fds[32];
int num_fds = 0;

char target_device[256] = {0};
char target_driver[256] = {0};

void find_device() {
    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;
    while ((ent = readdir(dir)) != NULL) {
        if (strncmp(ent->d_name, "snd_aloop", 9) == 0) {
            strcpy(target_device, ent->d_name);
            strcpy(target_driver, "snd_aloop");
            break;
        }
        if (strncmp(ent->d_name, "snd_dummy", 9) == 0) {
            strcpy(target_device, ent->d_name);
            strcpy(target_driver, "snd_dummy");
            break;
        }
    }
    closedir(dir);
    printf("[+] find_device successful.\n");
}

void *unbind_thread(void *arg) {
    PIN_TO_CPU(0);
    struct sched_param param;
    param.sched_priority = 99;
    if (sched_setscheduler(0, SCHED_FIFO, &param) != 0) {
        printf("[-] Failed to sched_setscheduler FIFO 99: %s\n", strerror(errno));
        exit(1);
    }
    printf("[+] sched_setscheduler FIFO 99 successful.\n");

    char path[256];
    snprintf(path, sizeof(path), "/sys/bus/platform/drivers/%s/unbind", target_driver);
    int fd = open(path, O_WRONLY);
    if (fd < 0) {
        printf("[-] Failed to open unbind: %s\n", strerror(errno));
        exit(1);
    }
    int res = write(fd, target_device, strlen(target_device));
    if (res < 0) {
        printf("[-] Failed to write unbind: %s\n", strerror(errno));
        exit(1);
    }
    close(fd);
    printf("[+] unbind successful.\n");
    return NULL;
}

void *close_thread(void *arg) {
    PIN_TO_CPU(0);
    struct sched_param param;
    param.sched_priority = 98;
    if (sched_setscheduler(0, SCHED_FIFO, &param) != 0) {
        printf("[-] Failed to sched_setscheduler FIFO 98: %s\n", strerror(errno));
        exit(1);
    }
    printf("[+] sched_setscheduler FIFO 98 successful.\n");

    for (int i = 0; i < num_fds; i++) {
        if (fds[i] >= 0) {
            int res = close(fds[i]);
            if (res < 0) {
                printf("[-] Failed to close fd: %s\n", strerror(errno));
                exit(1);
            }
            fds[i] = -1;
        }
    }
    printf("[+] close_thread successful.\n");
    return NULL;
}

int main() {
    SETUP_UNBUFFERED_IO();
    
    find_device();
    if (target_device[0] == '\0') {
        printf("[-] No snd_aloop or snd_dummy device found.\n");
        exit(1);
    }
    printf("[+] Target device: %s, driver: %s\n", target_device, target_driver);
    
    // Initial unbind to ensure clean state
    char unbind_path[256];
    snprintf(unbind_path, sizeof(unbind_path), "/sys/bus/platform/drivers/%s/unbind", target_driver);
    int ufd = open(unbind_path, O_WRONLY);
    if (ufd >= 0) {
        write(ufd, target_device, strlen(target_device));
        close(ufd);
    }
    
    TIMER_START(start);
    while (TIMER_NOT_EXPIRED(start, 10.0)) {
        char path[256];
        snprintf(path, sizeof(path), "/sys/bus/platform/drivers/%s/bind", target_driver);
        int fd = open(path, O_WRONLY);
        if (fd < 0) {
            printf("[-] Failed to open bind: %s\n", strerror(errno));
            exit(1);
        }
        int res = write(fd, target_device, strlen(target_device));
        if (res < 0) {
            printf("[-] Failed to write bind: %s\n", strerror(errno));
            exit(1);
        }
        close(fd);
        printf("[+] bind successful.\n");
        
        num_fds = 0;
        int retries = 10;
        while (retries-- > 0 && num_fds == 0) {
            for (int i = 0; i < 8; i++) {
                char devpath[64];
                sprintf(devpath, "/dev/snd/controlC%d", i);
                int cfd = open(devpath, O_RDONLY);
                if (cfd >= 0) fds[num_fds++] = cfd;
                
                sprintf(devpath, "/dev/snd/pcmC%dD0p", i);
                cfd = open(devpath, O_RDONLY);
                if (cfd >= 0) fds[num_fds++] = cfd;
                
                sprintf(devpath, "/dev/snd/pcmC%dD0c", i);
                cfd = open(devpath, O_RDONLY);
                if (cfd >= 0) fds[num_fds++] = cfd;
            }
            if (num_fds == 0) usleep(50000);
        }
        if (num_fds == 0) {
            printf("[-] Failed to open any sound devices after retries.\n");
            exit(1);
        }
        printf("[+] Opened %d sound devices.\n", num_fds);
        
        pthread_t t1, t2;
        res = pthread_create(&t1, NULL, unbind_thread, NULL);
        if (res != 0) {
            printf("[-] Failed to pthread_create t1: %s\n", strerror(res));
            exit(1);
        }
        printf("[+] pthread_create t1 successful.\n");
        
        // Give the unbind thread plenty of time to run and block in wait_for_completion
        usleep(50000); 
        
        res = pthread_create(&t2, NULL, close_thread, NULL);
        if (res != 0) {
            printf("[-] Failed to pthread_create t2: %s\n", strerror(res));
            exit(1);
        }
        printf("[+] pthread_create t2 successful.\n");
        
        res = pthread_join(t1, NULL);
        if (res != 0) {
            printf("[-] Failed to pthread_join t1: %s\n", strerror(res));
            exit(1);
        }
        res = pthread_join(t2, NULL);
        if (res != 0) {
            printf("[-] Failed to pthread_join t2: %s\n", strerror(res));
            exit(1);
        }
        printf("[+] pthread_join successful.\n");
    }
    
    return 0;
}





Reply:
An analysis of the crash report and the ALSA core source code reveals a classic Use-After-Free (UAF) caused by a race condition between the sound card release process and the devres (device resource management) cleanup.

### Root Cause Analysis

The bug occurs when a sound card is managed by devres (allocated via `snd_devm_card_new()`). For managed cards, the memory is allocated using `devres_alloc()`, and its release function is set to `__snd_card_release()`, which simply calls `snd_card_free()`.

When the device is unbound (e.g., via sysfs) while a user-space application still holds an open file descriptor to the sound card, the following sequence of events leads to the UAF:

1. **Unbind Thread (PID 5856):** The driver is unbound, triggering `devres_release_all()`. The devres core calls the release callback `__snd_card_release()`, which in turn calls `snd_card_free()`.
2. **Unbind Thread:** `snd_card_free()` calls `snd_card_free_when_closed()`, which drops a reference to the card's device (`card->card_dev`). However, because the user thread still has an open file descriptor, the reference count does not reach zero.
3. **Unbind Thread:** `snd_card_free()` then blocks on `wait_for_completion(&released)`, waiting for all references to be dropped.
4. **User Thread (PID 5857):** The user-space application closes the sound device file descriptor (`sys_close`). `snd_card_file_remove()` drops the final reference to `card->card_dev`.
5. **User Thread:** The reference count reaches zero, invoking the device release callback `release_card_device()`, which calls `snd_card_do_free()`.
6. **User Thread:** `snd_card_do_free()` performs cleanup and calls `complete(card->release_completion)`.
7. **Unbind Thread:** Wakes up from `wait_for_completion()`, returns from `snd_card_free()`, and then returns from `__snd_card_release()`.
8. **Unbind Thread:** The devres core (`release_nodes()`) immediately calls `free_node()`, which frees the memory block containing the `snd_card` structure.
9. **User Thread:** Meanwhile, `snd_card_do_free()` continues execution and evaluates `if (!card->managed)`. It reads the `managed` boolean from the `snd_card` structure that was just freed by the unbind thread, triggering the KASAN Use-After-Free.

### Code Walkthrough

The race condition manifests at the very end of `snd_card_do_free()` in `sound/core/init.c`:

```c
static int snd_card_do_free(struct snd_card *card)
{
	card->releasing = true;
	// ... cleanup ...
	
	if (card->release_completion)
		complete(card->release_completion); // [1] Wakes up the unbind thread
		
	if (!card->managed)                         // [2] UAF: card is freed by devres here
		kfree(card);
	return 0;
}
```
At `[1]`, the `complete()` call unblocks the unbind thread waiting in `snd_card_free()`. The unbind thread immediately proceeds to free the `card` memory via devres. By the time the user thread reaches `[2]`, `card` has already been freed, and reading `card->managed` (a 1-byte read at offset 2257) triggers the KASAN bug.

### Proposed Fix

To fix this, the value of `card->managed` must be read and stored in a local variable *before* calling `complete()`. Once `complete()` is called, the `card` pointer must no longer be dereferenced if it is managed by devres.

```c
static int snd_card_do_free(struct snd_card *card)
{
	bool managed = card->managed; // Cache the value before completion

	card->releasing = true;
	// ... existing cleanup code ...
	
	if (card->release_completion)
		complete(card->release_completion);
		
	if (!managed) // Safely use the cached value
		kfree(card);
		
	return 0;
}
```

8/2 2026/08/13 19:04 llm debugger
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 10284
							output: 39
							thoughts: 978
						

Thoughts:
**Analyzing a KASAN Use-After-Free in the ALSA Sound Subsystem**

Okay, so I've got a KASAN use-after-free in `snd_card_do_free` at `sound/core/init.c:604`, and it's a read of size 1 at `ffff8881912ec909`. The crash stack trace tells me the sequence: It's being triggered during device release, specifically within the ALSA sound card's file removal process. I see that the crash is occurring after calls to `snd_card_file_remove` and ultimately, during the close of a file descriptor related to the sound card. The page where the read is occurring, was previously allocated via `snd_devm_card_new`, which I immediately recognize is using device resource management (`devres`). The free path goes through the device unbinding process, specifically `devres_release_all`.

So, the freed object, I'm pretty sure, is a `devres` struct containing either the `snd_card` itself or some memory allocated by `snd_devm_card_new`. I can see the memory is being freed through the `devres` mechanism during driver unbinding. This is almost textbook: a classic devres use-after-free scenario. The `snd_card` is allocated within the driver's context using `snd_devm_card_new`, meaning its lifetime is linked to the driver's binding. When the driver is unbound, likely through a sysfs `unbind_store` call, `devres_release_all` frees the memory allocated by `devres`.

Now, here's where it gets interesting and where my expert intuition kicks in: the `snd_card` is also reference-counted via its `card->card_dev` device. The `snd_card_file_remove` function drops a reference to `card->card_dev`, which then, when the last reference is gone, calls `release_card_device`. This calls `snd_card_do_free`. Here's the catch: *if* the driver gets unbound *before* the sound card's file descriptor is closed (as it is here), then the devres memory containing the `snd_card` gets freed. Then, when the file is closed, `snd_card_do_free` attempts to access the already-freed memory. Bingo.

But... hang on. I'm slightly confused. `snd_devm_card_new` allocates the card using devres. But `snd_card` is explicitly reference-counted. How does `snd_devm_card_new` handle the reference counting versus the devres management? There has to be a subtle interaction between the two that's causing this. I'll need to examine the source code of `snd_devm_card_new` more closely, specifically how it manages the reference count in relation to the devres allocation and driver unbinding. I'll go to `sound/core/init.c` and take a look at it now.



9/2 2026/08/13 19:04 tool codesearch-definition-source
0m Args:
map[ContextFile:sound/core/init.c Name:snd_devm_card_new]

Results:
map[SourceCode: 202:	/**
 203:	 * snd_devm_card_new - managed snd_card object creation
 204:	 * @parent: the parent device object
 205:	 * @idx: card index (address) [0 ... (SNDRV_CARDS-1)]
 206:	 * @xid: card identification (ASCII string)
 207:	 * @module: top level module for locking
 208:	 * @extra_size: allocate this extra size after the main soundcard structure
 209:	 * @card_ret: the pointer to store the created card instance
 210:	 *
 211:	 * This function works like snd_card_new() but manages the allocated resource
 212:	 * via devres, i.e. you don't need to free explicitly.
 213:	 *
 214:	 * When a snd_card object is created with this function and registered via
 215:	 * snd_card_register(), the very first devres action to call snd_card_free()
 216:	 * is added automatically.  In that way, the resource disconnection is assured
 217:	 * at first, then released in the expected order.
 218:	 *
 219:	 * If an error happens at the probe before snd_card_register() is called and
 220:	 * there have been other devres resources, you'd need to free the card manually
 221:	 * via snd_card_free() call in the error; otherwise it may lead to UAF due to
 222:	 * devres call orders.  You can use snd_card_free_on_error() helper for
 223:	 * handling it more easily.
 224:	 *
 225:	 * Return: zero if successful, or a negative error code
 226:	 */
 227:	int snd_devm_card_new(struct device *parent, int idx, const char *xid,
 228:			      struct module *module, size_t extra_size,
 229:			      struct snd_card **card_ret)
 230:	{
 231:		struct snd_card *card;
 232:		int err;
 233:	
 234:		*card_ret = NULL;
 235:		card = devres_alloc(__snd_card_release,
 236:				    struct_size(card, private_data_area, extra_size),
 237:				    GFP_KERNEL);
 238:		if (!card)
 239:			return -ENOMEM;
 240:		card->managed = true;
 241:		err = snd_card_init(card, parent, idx, xid, module, extra_size);
 242:		if (err < 0) {
 243:			devres_free(card); /* in managed mode, we need to free manually */
 244:			return err;
 245:		}
 246:	
 247:		devres_add(parent, card);
 248:		*card_ret = card;
 249:		return 0;
 250:	}
 SourceFile:sound/core/init.c]

10/2 2026/08/13 19:04 llm debugger
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 12828
							output: 37
							thoughts: 76
						

Thoughts:
Okay, here's my interpretation of that thought process, from an expert's perspective:

**Diving into the Card Allocation**

Right, so `snd_devm_card_new` is how we're allocating the `snd_card` structure, and it looks like it's leveraging `devres_alloc`. Smart, using device resource management for this. Good, it automatically handles cleanup. The size calculation is interesting – it's using `struct_size` to handle the `private_data_area` and any `extra_size` appended. Always good to see that handled correctly to avoid buffer overflows or truncation issues. And the release function? Ah, `__snd_card_release`. That's where the real cleanup logic sits, so let's dig into that and make sure everything is handled properly there. I'll take a look at the code and quickly confirm the device resource management is handling dependencies correctly to avoid memory leaks.



11/2 2026/08/13 19:04 tool codesearch-definition-source
0m Args:
map[ContextFile:sound/core/init.c Name:__snd_card_release]

Results:
map[SourceCode: 197:	static void __snd_card_release(struct device *dev, void *data)
 198:	{
 199:		snd_card_free(data);
 200:	}
 SourceFile:sound/core/init.c]

12/2 2026/08/13 19:04 llm debugger
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 13229
							output: 36
							thoughts: 89
						

Thoughts:
Here's my thought process, as I understand this code snippet:

**Deconstructing the Device Resource Management**

Okay, so I'm looking at how this `card` structure is managed in the context of device resource management. My initial thought is, "Aha, `devres_alloc` is responsible for grabbing the memory for the `card` structure itself. And then, `devres_add` links that allocated memory to the `parent` device, right? That establishes the resource ownership. This is standard practice."

Then I think, "When this device is unbound, I know `devres_release_all` will be called. That's the cleanup function that releases all the resources associated with the device." That leads me to the critical connection: "It looks like `devres_release_all` *specifically* calls `__snd_card_release(parent, card)` for this `card` instance. Interesting. That's the key to the cleanup process for this sound card."

My mental gears are whirring. "Okay, so what does `__snd_card_release` do? Let's assume it calls `snd_card_free(card)`. I'm going to look at that function."



13/2 2026/08/13 19:04 tool codesearch-definition-source
0m Args:
map[ContextFile:sound/core/init.c Name:snd_card_free]

Results:
map[SourceCode: 631:	/**
 632:	 * snd_card_free - frees given soundcard structure
 633:	 * @card: soundcard structure
 634:	 *
 635:	 * This function releases the soundcard structure and the all assigned
 636:	 * devices automatically.  That is, you don't have to release the devices
 637:	 * by yourself.
 638:	 *
 639:	 * This function waits until the all resources are properly released.
 640:	 *
 641:	 * Return: Zero. Frees all associated devices and frees the control
 642:	 * interface associated to given soundcard.
 643:	 */
 644:	void snd_card_free(struct snd_card *card)
 645:	{
 646:		DECLARE_COMPLETION_ONSTACK(released);
 647:	
 648:		/* The call of snd_card_free() is allowed from various code paths;
 649:		 * a manual call from the driver and the call via devres_free, and
 650:		 * we need to avoid double-free. Moreover, the release via devres
 651:		 * may call snd_card_free() twice due to its nature, we need to have
 652:		 * the check here at the beginning.
 653:		 */
 654:		if (card->releasing)
 655:			return;
 656:	
 657:		card->release_completion = &released;
 658:		snd_card_free_when_closed(card);
 659:	
 660:		/* wait, until all devices are ready for the free operation */
 661:		wait_for_completion(&released);
 662:	}
 SourceFile:sound/core/init.c]

14/2 2026/08/13 19:04 llm debugger
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 14118
							output: 40
							thoughts: 45
						

Thoughts:
**Deconstructing the Sound Card Freeing Process**

Okay, so I'm looking at `snd_card_free`. My initial thought is, "Right, this is where the sound card resources are cleaned up." It immediately calls `snd_card_free_when_closed(card)`. So that's the core function to focus on. The important bit is, it then waits for the 'released' completion. I need to understand that wait mechanism. I'm assuming that 'released' signals the completion of `snd_card_free_when_closed`. I'm guessing that `snd_card_free_when_closed` does some necessary cleanup, and once that is done, it signals 'released'. Therefore, I must understand exactly how `snd_card_free_when_closed` works. Let me jump to that function to understand the release procedure.



15/2 2026/08/13 19:04 tool codesearch-definition-source
0m Args:
map[ContextFile:sound/core/init.c Name:snd_card_free_when_closed]

Results:
map[SourceCode: 609:	/**
 610:	 * snd_card_free_when_closed - Disconnect the card, free it later eventually
 611:	 * @card: soundcard structure
 612:	 *
 613:	 * Unlike snd_card_free(), this function doesn't try to release the card
 614:	 * resource immediately, but tries to disconnect at first.  When the card
 615:	 * is still in use, the function returns before freeing the resources.
 616:	 * The card resources will be freed when the refcount gets to zero.
 617:	 *
 618:	 * Return: zero if successful, or a negative error code
 619:	 */
 620:	void snd_card_free_when_closed(struct snd_card *card)
 621:	{
 622:		if (!card)
 623:			return;
 624:	
 625:		snd_card_disconnect(card);
 626:		put_device(&card->card_dev);
 627:		return;
 628:	}
 SourceFile:sound/core/init.c]

16/2 2026/08/13 19:04 llm debugger
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 14708
							output: 38
							thoughts: 77
						

Thoughts:
Here's my summary, as I understand the code flow:

**Analyzing Audio Card Resource Management**

Okay, so `snd_card_free_when_closed` is triggered when a sound card is closed. The first thing it does is call `snd_card_disconnect`. Makes sense, disconnect it cleanly before releasing the resources. Then, it uses `put_device(&card->card_dev)` which is probably dropping a reference count on the device associated with the sound card. So far, so good.

But, hang on a second. I remember that `snd_card_free` itself waits for something called `release_completion`. That's important. I need to figure out *when* this `release_completion` is actually completed. Otherwise, we're not fully releasing the card's resources. I need to trace this back. Let's dig into `snd_card_do_free` to understand the completion mechanism. I bet that's where the critical release happens.



17/2 2026/08/13 19:04 tool codesearch-definition-source
0m Args:
map[ContextFile:sound/core/init.c Name:snd_card_do_free]

Results:
map[SourceCode: 585:	static int snd_card_do_free(struct snd_card *card)
 586:	{
 587:		card->releasing = true;
 588:	#if IS_ENABLED(CONFIG_SND_MIXER_OSS)
 589:		if (snd_mixer_oss_notify_callback)
 590:			snd_mixer_oss_notify_callback(card, SND_MIXER_OSS_NOTIFY_FREE);
 591:	#endif
 592:		snd_device_free_all(card);
 593:		if (card->private_free)
 594:			card->private_free(card);
 595:	#ifdef CONFIG_SND_CTL_DEBUG
 596:		kfree(card->value_buf);
 597:	#endif
 598:		if (snd_info_card_free(card) < 0) {
 599:			dev_warn(card->dev, "unable to free card info\n");
 600:			/* Not fatal error */
 601:		}
 602:		if (card->release_completion)
 603:			complete(card->release_completion);
 604:		if (!card->managed)
 605:			kfree(card);
 606:		return 0;
 607:	}
 SourceFile:sound/core/init.c]

18/2 2026/08/13 19:04 llm debugger
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 15423
							output: 38
							thoughts: 132
						

Thoughts:
**My Analysis of the Audio Card Release Process**

Okay, so `snd_card_do_free` has finished, and it's signaling `card->release_completion`. That's good. Now, here's where it gets interesting: if the `card->managed` flag is set to true, it *doesn't* call `kfree(card)`. The assumption is that devres will handle the memory deallocation. Makes sense, that's the whole point of devres, right? It handles resource management for drivers.

But hold on a second... what if `snd_card_free` gets called from `__snd_card_release`? And, yeah, `__snd_card_release` *is* called by devres! More specifically, `devres_release_all` will, at some point, trigger that. And, if that happens, `snd_card_free` is going to block, waiting for `release_completion`. We need to verify that interaction and trace the path that leads to `devres_release_all`, so that we can check if there are any race conditions or unintended behaviors here. I'm going to start by diving into `devres_release_all`.



19/2 2026/08/13 19:04 tool codesearch-definition-source
0m Args:
map[ContextFile:drivers/base/devres.c Name:devres_release_all]

Results:
map[SourceCode: 551:	/**
 552:	 * devres_release_all - Release all managed resources
 553:	 * @dev: Device to release resources for
 554:	 *
 555:	 * Release all resources associated with @dev.  This function is
 556:	 * called on driver detach.
 557:	 */
 558:	int devres_release_all(struct device *dev)
 559:	{
 560:		unsigned long flags;
 561:		LIST_HEAD(todo);
 562:		int cnt;
 563:	
 564:		/* Looks like an uninitialized device structure */
 565:		if (WARN_ON(dev->devres_head.next == NULL))
 566:			return -ENODEV;
 567:	
 568:		/* Nothing to release if list is empty */
 569:		if (list_empty(&dev->devres_head))
 570:			return 0;
 571:	
 572:		spin_lock_irqsave(&dev->devres_lock, flags);
 573:		cnt = remove_nodes(dev, dev->devres_head.next, &dev->devres_head, &todo);
 574:		spin_unlock_irqrestore(&dev->devres_lock, flags);
 575:	
 576:		release_nodes(dev, &todo);
 577:		return cnt;
 578:	}
 SourceFile:drivers/base/devres.c]

20/2 2026/08/13 19:04 llm debugger
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 16286
							output: 35
							thoughts: 17
						

Thoughts:
Here's my understanding of the thought process behind `release_nodes`:

**My Interpretation of `release_nodes`**

Okay, so I'm looking at `release_nodes`. It's pretty straightforward, really. It seems like the core function is built to manage the release of some kind of resource, probably a set of nodes. First, the function calls a `release` function. My guess is that this `release` function is responsible for the actual cleanup and de-initialization of whatever the nodes represent – setting them back to a safe state, possibly freeing resources associated with each individual node. Then, and this is the crucial part, after the `release` operation has completed successfully, the function then moves on to freeing the `devres` node itself. This is probably done to ensure that the memory associated with these node structures is properly deallocated and returned to the system, preventing any memory leaks. It looks like a methodical process: release the underlying resources, then clean up the metadata or descriptors. A clean and tidy approach.



21/2 2026/08/13 19:04 tool codesearch-definition-source
0m Args:
map[ContextFile:drivers/base/devres.c Name:release_nodes]

Results:
map[SourceCode: 540:	static void release_nodes(struct device *dev, struct list_head *todo)
 541:	{
 542:		struct devres_node *node, *tmp;
 543:	
 544:		list_for_each_entry_safe_reverse(node, tmp, todo, entry) {
 545:			devres_log(dev, node, "REL");
 546:			node->release(dev, node);
 547:			free_node(node);
 548:		}
 549:	}
 SourceFile:drivers/base/devres.c]

22/2 2026/08/13 19:04 llm debugger
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 16734
							output: 36
							thoughts: 293
						

Thoughts:
**My Troubleshooting Journey: Audio Card Release**

Okay, so I'm digging into this audio driver release sequence. `release_nodes` calls `node->release`, which translates to `__snd_card_release`. That in turn calls `snd_card_free(card)`. Seems straightforward so far. `snd_card_free` eventually calls `snd_card_free_when_closed`, which drops a reference to `card->card_dev`. Makes sense, cleanup time.

Ah, but here's where it gets interesting. If files are still open on the sound card, the reference count on `card->card_dev` *won't* be zero. So `snd_card_free_when_closed` returns early. Then, `snd_card_free` calls `wait_for_completion(&released)`. Wait a minute... a *wait*? If it's waiting for completion, that means the unbind thread is blocked until *all* those files are closed! Isn't that a potential deadlock situation?

But then I look at the stack trace from the free:
```
 free_node drivers/base/devres.c:50 [inline]
 release_nodes drivers/base/devres.c:547 [inline]
 devres_release_all+0x1ce/0x260 drivers/base/devres.c:576
```

Hold on... it looks like `release_nodes` called `node->release`, which returned, and *then* `free_node(node)` was called! This is completely contradictory! How could `node->release` *return* if `snd_card_free` is supposed to be blocked waiting for completion? Something's not right. Gotta go back and re-examine `snd_card_free` and see if I'm missing something crucial in its behavior.



23/2 2026/08/13 19:04 tool codesearch-definition-source
0m Args:
map[ContextFile:sound/core/init.c Name:snd_card_free]

Results:
map[SourceCode: 631:	/**
 632:	 * snd_card_free - frees given soundcard structure
 633:	 * @card: soundcard structure
 634:	 *
 635:	 * This function releases the soundcard structure and the all assigned
 636:	 * devices automatically.  That is, you don't have to release the devices
 637:	 * by yourself.
 638:	 *
 639:	 * This function waits until the all resources are properly released.
 640:	 *
 641:	 * Return: Zero. Frees all associated devices and frees the control
 642:	 * interface associated to given soundcard.
 643:	 */
 644:	void snd_card_free(struct snd_card *card)
 645:	{
 646:		DECLARE_COMPLETION_ONSTACK(released);
 647:	
 648:		/* The call of snd_card_free() is allowed from various code paths;
 649:		 * a manual call from the driver and the call via devres_free, and
 650:		 * we need to avoid double-free. Moreover, the release via devres
 651:		 * may call snd_card_free() twice due to its nature, we need to have
 652:		 * the check here at the beginning.
 653:		 */
 654:		if (card->releasing)
 655:			return;
 656:	
 657:		card->release_completion = &released;
 658:		snd_card_free_when_closed(card);
 659:	
 660:		/* wait, until all devices are ready for the free operation */
 661:		wait_for_completion(&released);
 662:	}
 SourceFile:sound/core/init.c]

24/2 2026/08/13 19:04 llm debugger
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 17971
							output: 36
							thoughts: 159
						

Thoughts:
**My Analysis of the `snd_card_free` Path**

Okay, so I'm digging into this `snd_card_free` function, and the first thing that jumps out is that early return: `if (card->releasing) return;`. Straight to the point! So, if the `card` is already in the process of releasing, we just bail. Smart. But now the key question: when *is* `card->releasing` set to true? Let's trace it. Ah-ha! It’s in `snd_card_do_free`:

```c
static int snd_card_do_free(struct snd_card *card)
{
	card->releasing = true;
```

So, `snd_card_do_free` sets `card->releasing` to `true`. Makes perfect sense. But `snd_card_do_free` is the crucial function we need to understand. When does that get called? It must be related to the reference count on `card->card_dev`. That would make sense, so I'll next examine `release_card_device`.



25/2 2026/08/13 19:04 tool codesearch-definition-source
0m Args:
map[ContextFile:sound/core/init.c Name:release_card_device]

Results:
map[SourceCode: 151:	static void release_card_device(struct device *dev)
 152:	{
 153:		snd_card_do_free(dev_to_snd_card(dev));
 154:	}
 SourceFile:sound/core/init.c]

26/2 2026/08/13 19:04 llm debugger
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 18503
							output: 38
							thoughts: 520
						

Thoughts:
**My Analysis of the `snd_card` Release Process**

Okay, let's break this down. My understanding is that when the final reference to `card->card_dev` is relinquished, `release_card_device` kicks off the process by calling `snd_card_do_free`. This is where the magic (and potential problems) begin.

`snd_card_do_free` starts by setting `card->releasing` to `true`. Good, that's expected. It performs some internal cleanup, and crucially, *it signals the completion of `card->release_completion`*. This is the key synchronization point, it seems. Then, the function returns.

Now, hold on. If `snd_card_do_free` is running, the reference count for the `snd_card` must be zero, right?  And therefore, it *should* signal `card->release_completion`. But what if `snd_card_free` gets called *after* `snd_card_do_free`? Because if `snd_card_free` is called *after* `snd_card_do_free`, the `card->releasing` flag will be true and the function should return immediately.

Here's the problem I see developing: when the driver is unbound, `devres_release_all` eventually calls `__snd_card_release`, which in turn calls `snd_card_free`. If the reference count isn't zero *yet*, then `snd_card_free` will call `snd_card_free_when_closed`, and the reference count will be decremented.

If the reference count is *still* not zero, `snd_card_free` will patiently wait for the `release_completion` to signal. Then it can finish up and free the memory.

Back to the primary mechanism: when that last reference *does* get dropped (like when a file is closed), `release_card_device` calls `snd_card_do_free`, which then signals the `release_completion`. This wakes up `snd_card_free`, which can finally return, allowing `__snd_card_release` to return, and `devres_release_all` to finally call `free_node(node)`, and *then* the `snd_card` memory is freed.

*But here is where the problem lies*... looking at the code in `snd_card_do_free` closely...

```c
	if (card->release_completion)
		complete(card->release_completion);
	if (!card->managed)
		kfree(card);
	return 0;
```

If `card->managed` is `true`, the `kfree(card)` is *skipped*. Now the thing that sticks out is that there is an access to `card->managed` *after* completing the `release_completion`!

This means we have a possible race condition, because we are using this flag after we signal that the thing we might be waiting for is complete. This suggests a potential double-free or use-after-free scenario if the `card->managed` flag is modified in another context after `complete(card->release_completion)` has executed, and before `kfree(card)` or its equivalent is called.



27/2 2026/08/13 19:05 tool codesearch-definition-source
0m Args:
map[ContextFile:sound/core/init.c Name:snd_card_do_free]

Results:
map[SourceCode: 585:	static int snd_card_do_free(struct snd_card *card)
 586:	{
 587:		card->releasing = true;
 588:	#if IS_ENABLED(CONFIG_SND_MIXER_OSS)
 589:		if (snd_mixer_oss_notify_callback)
 590:			snd_mixer_oss_notify_callback(card, SND_MIXER_OSS_NOTIFY_FREE);
 591:	#endif
 592:		snd_device_free_all(card);
 593:		if (card->private_free)
 594:			card->private_free(card);
 595:	#ifdef CONFIG_SND_CTL_DEBUG
 596:		kfree(card->value_buf);
 597:	#endif
 598:		if (snd_info_card_free(card) < 0) {
 599:			dev_warn(card->dev, "unable to free card info\n");
 600:			/* Not fatal error */
 601:		}
 602:		if (card->release_completion)
 603:			complete(card->release_completion);
 604:		if (!card->managed)
 605:			kfree(card);
 606:		return 0;
 607:	}
 SourceFile:sound/core/init.c]

28/2 2026/08/13 19:05 llm debugger
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 20159
							output: 21
							thoughts: 416
						

Thoughts:
**Analyzing a Use-After-Free Vulnerability**

Okay, so here's what's happening. I've got this code, and it looks like a textbook use-after-free issue. Specifically, I'm looking at this snippet of C code:

```c
if (card->release_completion)
	complete(card->release_completion);
if (!card->managed)
	kfree(card);
```

The key is line 604, `if (!card->managed)`. It seems like we have a race condition. If `complete(card->release_completion)` gets called, a waiting thread wakes up. That thread is currently inside `snd_card_free`, which then goes on to execute `devres_release_all`, and then will eventually free `card` itself with `free_node(node)`. However, the thread executing `snd_card_do_free` (where that `if` statement lives) could *also* be running at the exact same time.

So, here's what could happen: the first thread completes and frees the `card` structure. Then, *just* after that, the second thread hits line 604, reading the `card->managed` field from memory that's now been freed! That's a classic use-after-free scenario, caused by a race after calling `complete()`.

Let's check the crash report. Yep, it confirms my suspicions:

```
BUG: KASAN: use-after-free in snd_card_do_free sound/core/init.c:604 [inline]
BUG: KASAN: use-after-free in release_card_device+0x1ab/0x1b0 sound/core/init.c:153
Read of size 1 at addr ffff8881912ec909 by task syz-executor130/5857
```

That line 604 is right there, `if (!card->managed)`. The "Read of size 1" is reading the `card->managed` boolean value. That confirms everything.

Now, I'll check the offset of `managed` within `struct snd_card` to understand it better.



29/2 2026/08/13 19:05 tool codesearch-struct-layout
0m Args:
map[Name:snd_card]

Results:
map[Fields:[map[Name:number OffsetBits:0 SizeBits:32] map[Name:id OffsetBits:32 SizeBits:128] map[Name:driver OffsetBits:160 SizeBits:128] map[Name:shortname OffsetBits:288 SizeBits:256] map[Name:longname OffsetBits:544 SizeBits:640] map[Name:irq_descr OffsetBits:1184 SizeBits:256] map[Name:mixername OffsetBits:1440 SizeBits:640] map[Name:components OffsetBits:2080 SizeBits:1024] map[Name:module OffsetBits:3136 SizeBits:64] map[Name:private_data OffsetBits:3200 SizeBits:64] map[Name:private_free OffsetBits:3264 SizeBits:64] map[Name:devices OffsetBits:3328 SizeBits:128] map[Name:ctl_dev OffsetBits:3456 SizeBits:64] map[Name:last_numid OffsetBits:3520 SizeBits:32] map[Name:controls_rwsem OffsetBits:3584 SizeBits:1152] map[Name:controls_rwlock OffsetBits:4736 SizeBits:512] map[Name:controls_count OffsetBits:5248 SizeBits:32] map[Name:user_ctl_alloc_size OffsetBits:5312 SizeBits:64] map[Name:controls OffsetBits:5376 SizeBits:128] map[Name:ctl_files OffsetBits:5504 SizeBits:128] map[Name:ctl_numids OffsetBits:5632 SizeBits:640] map[Name:ctl_hash OffsetBits:6272 SizeBits:640] map[Name:ctl_hash_collision OffsetBits:6912 SizeBits:8] map[Name:proc_root OffsetBits:6976 SizeBits:64] map[Name:proc_root_link OffsetBits:7040 SizeBits:64] map[Name:files_list OffsetBits:7104 SizeBits:128] map[Name:s_f_ops OffsetBits:7232 SizeBits:64] map[Name:files_lock OffsetBits:7296 SizeBits:512] map[Name:shutdown OffsetBits:7808 SizeBits:32] map[Name:release_completion OffsetBits:7872 SizeBits:64] map[Name:dev OffsetBits:7936 SizeBits:64] map[Name:card_dev OffsetBits:8000 SizeBits:9792] map[Name:dev_groups OffsetBits:17792 SizeBits:256] map[Name:registered OffsetBits:18048 SizeBits:8] map[Name:managed OffsetBits:18056 SizeBits:8] map[Name:releasing OffsetBits:18064 SizeBits:8] map[Name:sync_irq OffsetBits:18080 SizeBits:32] map[Name:remove_sleep OffsetBits:18112 SizeBits:640] map[Name:total_pcm_alloc_bytes OffsetBits:18752 SizeBits:64] map[Name:memory_mutex OffsetBits:18816 SizeBits:1088] map[Name:debugfs_root OffsetBits:19904 SizeBits:64] map[Name:power_state OffsetBits:19968 SizeBits:32] map[Name:power_sleep OffsetBits:20032 SizeBits:640] map[Name:power_ref OffsetBits:20672 SizeBits:704] map[Name:mixer_oss OffsetBits:21376 SizeBits:64] map[Name:mixer_oss_change_count OffsetBits:21440 SizeBits:32] map[Name:private_data_area OffsetBits:21504 SizeBits:0]]]

30/2 2026/08/13 19:05 llm debugger
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 22168
							output: 22
							thoughts: 129
						

Thoughts:
**Analyzing a Memory Crash**

Okay, so I'm looking at this crash and trying to piece together what happened. The offset for the `managed` data is 18056 bits, which translates to 2257 bytes. That's a decent chunk of memory, so whatever's happening is likely affecting a fairly significant structure or buffer. The crash address itself is `ffff8881912ec909`. Let's see... and the page the address falls on starts at `ffff8881912ec000`. We know the page frame number (pfn) is `0x1912ec`. Right, so `0x909` is the offset *within* the page. That's 2313 in decimal.

Hmm, wait a minute... I remember `devres_alloc` allocating a `struct devres_node` header before the actual requested data. Could this have something to do with the issue? Perhaps it's overflowing or miscalculating the allocation size. I need to make sure the header is accounted for. Okay, time to check the `struct devres_node` size again. Let's see what that looks like.



31/2 2026/08/13 19:05 tool codesearch-struct-layout
0m Args:
map[Name:devres_node]

Results:
map[Fields:[map[Name:entry OffsetBits:0 SizeBits:128] map[Name:release OffsetBits:128 SizeBits:64] map[Name:free_node OffsetBits:192 SizeBits:64] map[Name:name OffsetBits:256 SizeBits:64] map[Name:size OffsetBits:320 SizeBits:64]]]

32/2 2026/08/13 19:05 llm debugger
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 22693
							output: 34
							thoughts: 67
						

Thoughts:
**Analyzing Device Resource Allocation**

Okay, so I'm looking at `struct devres_node`. That structure is clocking in at 384 bits, which works out to 48 bytes. Hmm, right, that's just the node itself. The `devres_alloc` function allocates more than just the node; it actually allocates the `struct devres`, which *contains* the `struct devres_node`, plus the data pointer. I need to refresh my memory on the whole `devres` structure. Time to dive into the definition of `struct devres` within `drivers/base/devres.c` and see exactly what `devres_alloc` is giving us. Need to understand how much memory is actually being used.



33/2 2026/08/13 19:05 tool codesearch-definition-source
0m Args:
map[ContextFile:drivers/base/devres.c Name:devres]

Results:
map[SourceCode:  19:	struct devres {
  20:		struct devres_node		node;
  21:		dr_release_t			release;
  22:		/*
  23:		 * Some archs want to perform DMA into kmalloc caches
  24:		 * and need a guaranteed alignment larger than
  25:		 * the alignment of a 64-bit integer.
  26:		 * Thus we use ARCH_DMA_MINALIGN for data[] which will force the same
  27:		 * alignment for struct devres when allocated by kmalloc().
  28:		 */
  29:		u8 __aligned(ARCH_DMA_MINALIGN) data[];
  30:	};
 SourceFile:drivers/base/devres.c]

34/2 2026/08/13 19:05 llm debugger
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 23157
							output: 38
							thoughts: 448
						

Thoughts:
**Analyzing a Kernel Use-After-Free Vulnerability**

Okay, let's break this down. First, I need to understand this memory alignment thing with `ARCH_DMA_MINALIGN`. It's typically 64 on x86_64, or maybe 8. Alright, if it's 64, that means `data` should start at offset 64. But hang on, it's starting at offset 56. I was initially thrown off by the offset numbers.

Let me think. Okay, 2257 (the offset for `card->managed`) plus 64 (the initial incorrect offset assumption) equals 2321. But wait, `0x909` (the address) is 2313, right? Yes, and 2313 minus 2257 is 56.

Aha! If `data` starts at offset 56, and knowing that `struct devres_node` is 48 bytes and `release` is 8 bytes. Then `node` (48) + `release` (8) is 56 bytes. That means the `data` pointer *does* start exactly at offset 56! Consequently, `card` *also* starts at offset 56 in the allocated memory block.

Now, if `card` starts at 56, then `card->managed`, which is at offset 2257 within `card`, must be at 56 + 2257 which is exactly 2313, or `0x909`. Perfect! That's exactly where the crash address `ffff8881912ec909` shows.

So the core of the problem is this: in `snd_card_do_free`, `complete(card->release_completion)` is called. This wakes up the thread waiting in `snd_card_free`. If `snd_card_free` was called from `__snd_card_release` (which, as a devres release function is designed to release managed resources), it returns to `release_nodes` in `drivers/base/devres.c`. And that's where the problem kicks in: `release_nodes` calls `free_node(node)`, freeing the entire memory block containing the `snd_card` structure. Meanwhile, the thread running `snd_card_do_free` keeps chugging along and accesses `card->managed` at line 604, but the memory has already been freed by the other thread! That is the use-after-free vulnerability.

Okay, now let me just double-check that `snd_card_do_free` in `sound/core/init.c` to be certain.



35/2 2026/08/13 19:05 tool codesearch-definition-source
0m Args:
map[ContextFile:sound/core/init.c Name:snd_card_do_free]

Results:
map[SourceCode: 585:	static int snd_card_do_free(struct snd_card *card)
 586:	{
 587:		card->releasing = true;
 588:	#if IS_ENABLED(CONFIG_SND_MIXER_OSS)
 589:		if (snd_mixer_oss_notify_callback)
 590:			snd_mixer_oss_notify_callback(card, SND_MIXER_OSS_NOTIFY_FREE);
 591:	#endif
 592:		snd_device_free_all(card);
 593:		if (card->private_free)
 594:			card->private_free(card);
 595:	#ifdef CONFIG_SND_CTL_DEBUG
 596:		kfree(card->value_buf);
 597:	#endif
 598:		if (snd_info_card_free(card) < 0) {
 599:			dev_warn(card->dev, "unable to free card info\n");
 600:			/* Not fatal error */
 601:		}
 602:		if (card->release_completion)
 603:			complete(card->release_completion);
 604:		if (!card->managed)
 605:			kfree(card);
 606:		return 0;
 607:	}
 SourceFile:sound/core/init.c]

36/2 2026/08/13 19:05 llm debugger
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 24632
							output: 36
							thoughts: 242
						

Thoughts:
**My Analysis of the `card->managed` Access**

Okay, so I'm looking at this code and I see that `card->managed` is being accessed *after* a call to `complete(card->release_completion)`. That's a red flag. We need to be careful with that. I know from experience that `complete()` could potentially unblock a thread that's waiting to free `card`, meaning the access to `card->managed` is a potential use-after-free situation.

The proposed fix makes sense. Reading `card->managed` into a local variable before the `complete()` call is the right approach:

```c
	bool managed = card->managed;

	if (card->release_completion)
		complete(card->release_completion);
	if (!managed)
		kfree(card);
```

That seems solid, but I need to be *completely* certain. It makes me a little uneasy accessing `card` at all after `complete()`. I need to think through the possible scenarios.

Alright, so if `card` *is* freed immediately after `complete()`, we have a use-after-free issue, as `kfree(card)` would be problematic. But! The crucial detail is that the `!managed` check is key. If `!managed` is true, then `card` isn't being managed by devres. That means it *won't* be freed by devres. So far, so good.

But now I have to ask myself, if it's not managed by devres, who *is* freeing it? I'm not going to assume anything. If it's not managed, that probably means `snd_card_free` is called manually by the driver. Let's dig into `snd_card_free` and confirm that we are in fact safe. Gotta verify that assumption.



37/2 2026/08/13 19:05 tool codesearch-definition-source
0m Args:
map[ContextFile:sound/core/init.c Name:snd_card_free]

Results:
map[SourceCode: 631:	/**
 632:	 * snd_card_free - frees given soundcard structure
 633:	 * @card: soundcard structure
 634:	 *
 635:	 * This function releases the soundcard structure and the all assigned
 636:	 * devices automatically.  That is, you don't have to release the devices
 637:	 * by yourself.
 638:	 *
 639:	 * This function waits until the all resources are properly released.
 640:	 *
 641:	 * Return: Zero. Frees all associated devices and frees the control
 642:	 * interface associated to given soundcard.
 643:	 */
 644:	void snd_card_free(struct snd_card *card)
 645:	{
 646:		DECLARE_COMPLETION_ONSTACK(released);
 647:	
 648:		/* The call of snd_card_free() is allowed from various code paths;
 649:		 * a manual call from the driver and the call via devres_free, and
 650:		 * we need to avoid double-free. Moreover, the release via devres
 651:		 * may call snd_card_free() twice due to its nature, we need to have
 652:		 * the check here at the beginning.
 653:		 */
 654:		if (card->releasing)
 655:			return;
 656:	
 657:		card->release_completion = &released;
 658:		snd_card_free_when_closed(card);
 659:	
 660:		/* wait, until all devices are ready for the free operation */
 661:		wait_for_completion(&released);
 662:	}
 SourceFile:sound/core/init.c]

38/2 2026/08/13 19:05 llm debugger
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 25817
							output: 42
							thoughts: 639
						

Thoughts:
**Analyzing the snd_card Memory Management Logic**

Okay, so I'm digging into this `snd_card_free` function, and it's got me thinking about the memory management flow. The initial assumption seemed to be that if the card isn't managed (`!managed`), then `snd_card_free` waits for a "released" signal before freeing the memory. The code uses a completion variable `released` to signal when the card can be freed. `snd_card_free` waits on this completion, and once it's signaled, the function returns.

Initially, I thought the driver might be responsible for memory freeing, but I quickly recalled that `snd_card_new` allocates the memory, and `snd_card_do_free` calls `kfree(card)`. So, if it's `!managed`, `snd_card_do_free` calls `kfree(card)`.

The concern arises with driver unloading. If `snd_card_free` returns, the driver assumes the card is freed. What happens if the driver unloads immediately after? Would `snd_card_do_free` still be executing? The answer is no, because `snd_card_do_free` is in the `soundcore` module (or `snd`), not in the driver itself, so it should be safe from module unload.

So, `snd_card_do_free` calling `kfree(card)` is safe from driver unload. But is it safe from concurrent access?

Looking closer, the `released` completion is declared *on the stack* of `snd_card_free`. That's important. The code sets `card->release_completion` to this stack variable, and then waits for the completion. `snd_card_do_free` calls `complete(card->release_completion)`, waking up `wait_for_completion`. Then `wait_for_completion` returns. And `snd_card_free` returns, destroying the `released` completion variable on its stack. That's fine because `snd_card_do_free` has already finished calling `complete()`.

The flow then checks `card->managed`. If `!managed`, it calls `kfree(card)`, which seems safe, as nothing else has freed it.

The problem, however, lies in the `managed == true` scenario. If `managed` is true, then `devres` frees the card. And, after looking at the code I see that, `__snd_card_release` is called by `release_nodes`. And that function calls `free_node(node)` immediately after `__snd_card_release` returns. That's a problem, because if `managed` is true, the `card` is freed by `free_node(node)` *concurrently* with `snd_card_do_free` executing the `if (!card->managed)` check. That's a classic use-after-free scenario.

I'm going to check the `git log` to see if this was recently introduced or if there are any related commits that might shed more light on this.



39/2 2026/08/13 19:05 tool git-log
0m Args:
map[CodeRegexp:if \(!card->managed\) Count:10 PathPrefix:sound/core/init.c]

Results:
map[Output:c3afa2a402d1 ALSA: core: Fix double-free at snd_card_new()
e8ad415b7a55 ALSA: core: Add managed card creation
]

40/2 2026/08/13 19:05 llm debugger
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 27229
							output: 26
							thoughts: 18
						

Thoughts:
Okay, let's dive into commit `e8ad415b7a55`. I need to understand the intent and impact of this change within the broader context of the project. I'll approach this like a detective, first looking for clues in the commit message itself. What problem were they trying to solve? Was it a bug fix, a new feature, a refactor, or something else entirely? The message needs to be clear and concise. If it isn't, I'll need to dig deeper.

Next, I'll carefully examine the diffs. I'm looking for the specific lines of code that were added, removed, or modified. What files were touched? Are we talking about a simple, localized change, or something that cascades across multiple modules or components? I need to understand the scope. Are there potential side effects? I'll be scrutinizing the logic, the data structures, the dependencies – everything.

I'll pay close attention to the nature of the change. Is it a change to the core algorithm, a change to user input validation, a change to a database query? This will tell me what systems are affected and where to look for potential vulnerabilities. Are there any performance implications? I'm thinking about potential bottlenecks and any increased resource usage.

I'll also be considering whether this change introduces any new dependencies or breaks any existing ones. How well-tested is this code? Have they run the test suite, and, importantly, *what* tests are there? Are there sufficient unit tests, integration tests, end-to-end tests? I'll be looking for red flags – missing tests, inadequate test coverage, or any indication of incomplete or careless code.

I need to confirm if this change aligns with the established coding style and project conventions. Is the code readable and maintainable? Does it use industry best practices and security standards? This isn't just about functionality; it's about the long-term health of the codebase.

Finally, I'll be assessing the potential risks. Does this commit introduce a vulnerability or a performance regression? Could it lead to unexpected behavior or system failures? If so, I need to flag it immediately. Ultimately, my goal is to ensure this commit is safe, sound, and a net positive for the project.



41/2 2026/08/13 19:05 tool git-show
0m Args:
map[Commit:e8ad415b7a55]

Results:
map[Output:commit e8ad415b7a55cb9a9fbfc04696518d5ea0b609b3
Author: Takashi Iwai <tiwai@suse.de>
Date:   Thu Jul 15 09:58:24 2021 +0200

    ALSA: core: Add managed card creation
    
    As a second step for preliminary to widen the devres usages among
    sound drivers, this patch adds a new ALSA core API function,
    snd_devm_card_new(), to create a snd_card object via devres.
    When a card object is created by this new function, snd_card_free() is
    called automatically and the card object resource gets released at the
    device unbinding time.
    
    However, the story isn't that simple.  A caveat is that we have to
    call snd_card_free() at the very first of the whole resource release
    procedure, in order to assure that the all exposed devices on
    user-space are deleted and sync with processes accessing those devices
    before releasing resources.
    
    For achieving it, snd_card_register() adds a new devres action to
    trigger snd_card_free() automatically when the given card object is a
    "managed" one.  Since usually snd_card_register() is the last step of
    the initialization, this should work in most cases.
    
    With all these tricks, some drivers can get rid of the whole driver
    remove callback code.
    
    About a bit of implementation details: the patch adds two new flags to
    snd_card object: managed and releasing.  The former indicates that the
    object was created via snd_devm_card_new(), and the latter is used for
    avoiding the double-free of snd_card_free() calls.  Both flags are
    fairly internal and likely uninteresting to normal users.
    
    Link: https://lore.kernel.org/r/20210715075941.23332-3-tiwai@suse.de
    Signed-off-by: Takashi Iwai <tiwai@suse.de>

diff --git a/include/sound/core.h b/include/sound/core.h
index c4ade121727d..7885f903cd5a 100644
--- a/include/sound/core.h
+++ b/include/sound/core.h
@@ -117,6 +117,8 @@ struct snd_card {
 	struct device card_dev;		/* cardX object for sysfs */
 	const struct attribute_group *dev_groups[4]; /* assigned sysfs attr */
 	bool registered;		/* card_dev is registered? */
+	bool managed;			/* managed via devres */
+	bool releasing;			/* during card free process */
 	int sync_irq;			/* assigned irq, used for PCM sync */
 	wait_queue_head_t remove_sleep;
 
@@ -274,6 +276,9 @@ extern int (*snd_mixer_oss_notify_callback)(struct snd_card *card, int cmd);
 int snd_card_new(struct device *parent, int idx, const char *xid,
 		 struct module *module, int extra_size,
 		 struct snd_card **card_ret);
+int snd_devm_card_new(struct device *parent, int idx, const char *xid,
+		      struct module *module, size_t extra_size,
+		      struct snd_card **card_ret);
 
 int snd_card_disconnect(struct snd_card *card);
 void snd_card_disconnect_sync(struct snd_card *card);
diff --git a/sound/core/init.c b/sound/core/init.c
index 1490568efdb0..e985185ebc91 100644
--- a/sound/core/init.c
+++ b/sound/core/init.c
@@ -134,6 +134,9 @@ void snd_device_initialize(struct device *dev, struct snd_card *card)
 }
 EXPORT_SYMBOL_GPL(snd_device_initialize);
 
+static int snd_card_init(struct snd_card *card, struct device *parent,
+			 int idx, const char *xid, struct module *module,
+			 size_t extra_size);
 static int snd_card_do_free(struct snd_card *card);
 static const struct attribute_group card_dev_attr_group;
 
@@ -163,9 +166,6 @@ int snd_card_new(struct device *parent, int idx, const char *xid,
 {
 	struct snd_card *card;
 	int err;
-#ifdef CONFIG_SND_DEBUG
-	char name[8];
-#endif
 
 	if (snd_BUG_ON(!card_ret))
 		return -EINVAL;
@@ -176,6 +176,74 @@ int snd_card_new(struct device *parent, int idx, const char *xid,
 	card = kzalloc(sizeof(*card) + extra_size, GFP_KERNEL);
 	if (!card)
 		return -ENOMEM;
+
+	err = snd_card_init(card, parent, idx, xid, module, extra_size);
+	if (err < 0) {
+		kfree(card);
+		return err;
+	}
+
+	*card_ret = card;
+	return 0;
+}
+EXPORT_SYMBOL(snd_card_new);
+
+static void __snd_card_release(struct device *dev, void *data)
+{
+	snd_card_free(data);
+}
+
+/**
+ * snd_devm_card_new - managed snd_card object creation
+ * @parent: the parent device object
+ * @idx: card index (address) [0 ... (SNDRV_CARDS-1)]
+ * @xid: card identification (ASCII string)
+ * @module: top level module for locking
+ * @extra_size: allocate this extra size after the main soundcard structure
+ * @card_ret: the pointer to store the created card instance
+ *
+ * This function works like snd_card_new() but manages the allocated resource
+ * via devres, i.e. you don't need to free explicitly.
+ *
+ * When a snd_card object is created with this function and registered via
+ * snd_card_register(), the very first devres action to call snd_card_free()
+ * is added automatically.  In that way, the resource disconnection is assured
+ * at first, then released in the expected order.
+ */
+int snd_devm_card_new(struct device *parent, int idx, const char *xid,
+		      struct module *module, size_t extra_size,
+		      struct snd_card **card_ret)
+{
+	struct snd_card *card;
+	int err;
+
+	*card_ret = NULL;
+	card = devres_alloc(__snd_card_release, sizeof(*card) + extra_size,
+			    GFP_KERNEL);
+	if (!card)
+		return -ENOMEM;
+	card->managed = true;
+	err = snd_card_init(card, parent, idx, xid, module, extra_size);
+	if (err < 0) {
+		devres_free(card);
+		return err;
+	}
+
+	devres_add(parent, card);
+	*card_ret = card;
+	return 0;
+}
+EXPORT_SYMBOL_GPL(snd_devm_card_new);
+
+static int snd_card_init(struct snd_card *card, struct device *parent,
+			 int idx, const char *xid, struct module *module,
+			 size_t extra_size)
+{
+	int err;
+#ifdef CONFIG_SND_DEBUG
+	char name[8];
+#endif
+
 	if (extra_size > 0)
 		card->private_data = (char *)card + sizeof(struct snd_card);
 	if (xid)
@@ -197,7 +265,6 @@ int snd_card_new(struct device *parent, int idx, const char *xid,
 		mutex_unlock(&snd_card_mutex);
 		dev_err(parent, "cannot find the slot for index %d (range 0-%i), error: %d\n",
 			 idx, snd_ecards_limit - 1, err);
-		kfree(card);
 		return err;
 	}
 	set_bit(idx, snd_cards_lock);		/* lock it */
@@ -256,8 +323,6 @@ int snd_card_new(struct device *parent, int idx, const char *xid,
 	sprintf(name, "card%d", idx);
 	card->debugfs_root = debugfs_create_dir(name, sound_debugfs_root);
 #endif
-
-	*card_ret = card;
 	return 0;
 
       __error_ctl:
@@ -266,7 +331,6 @@ int snd_card_new(struct device *parent, int idx, const char *xid,
 	put_device(&card->card_dev);
   	return err;
 }
-EXPORT_SYMBOL(snd_card_new);
 
 /**
  * snd_card_ref - Get the card object from the index
@@ -481,6 +545,7 @@ EXPORT_SYMBOL_GPL(snd_card_disconnect_sync);
 
 static int snd_card_do_free(struct snd_card *card)
 {
+	card->releasing = true;
 #if IS_ENABLED(CONFIG_SND_MIXER_OSS)
 	if (snd_mixer_oss_notify_callback)
 		snd_mixer_oss_notify_callback(card, SND_MIXER_OSS_NOTIFY_FREE);
@@ -498,7 +563,8 @@ static int snd_card_do_free(struct snd_card *card)
 #endif
 	if (card->release_completion)
 		complete(card->release_completion);
-	kfree(card);
+	if (!card->managed)
+		kfree(card);
 	return 0;
 }
 
@@ -745,6 +811,14 @@ int snd_card_add_dev_attr(struct snd_card *card,
 }
 EXPORT_SYMBOL_GPL(snd_card_add_dev_attr);
 
+static void trigger_card_free(void *data)
+{
+	struct snd_card *card = data;
+
+	if (!card->releasing)
+		snd_card_free(data);
+}
+
 /**
  *  snd_card_register - register the soundcard
  *  @card: soundcard structure
@@ -768,6 +842,15 @@ int snd_card_register(struct snd_card *card)
 		if (err < 0)
 			return err;
 		card->registered = true;
+	} else {
+		if (card->managed)
+			devm_remove_action(card->dev, trigger_card_free, card);
+	}
+
+	if (card->managed) {
+		err = devm_add_action(card->dev, trigger_card_free, card);
+		if (err < 0)
+			return err;
 	}
 
 	err = snd_device_register_all(card);
]

42/2 2026/08/13 19:05 llm debugger
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 30632
							output: 34
							thoughts: 3269
						

Thoughts:
**Deep Dive into a Use-After-Free Vulnerability in ALSA Sound Card Handling**

Right, let's break this down. It seems we have a nasty use-after-free situation in the ALSA sound card code, specifically related to the `snd_devm_card_new` function introduced in commit `e8ad415b7a55`. It's pretty straightforward: `snd_devm_card_new` is used for device-managed card allocation (using `devres`), and `snd_card_do_free` added in the same commit has a post-free check which is the source of the bug: if the card isn't managed it frees the card.

So, the crux is this: when a card is allocated with `devres`, its memory is handled by `devres`. The `devres_release_all` function eventually calls `__snd_card_release`, which in turn calls `snd_card_free`.  `snd_card_free` waits for `card->release_completion`. However, while `snd_card_free` is waiting, `snd_card_do_free` gets called, likely during the release of the sound card device.

Now, here's where the problem arises: `snd_card_do_free` calls `complete(card->release_completion)` *before* checking if the card is managed.  If it *isn't* managed (which is the case when we get to this code) it proceeds to `kfree(card)`.  Then, *after* the card has been freed, the original thread that called `snd_card_do_free` continues and access `card->managed`. This causes the UAF.

Okay, so the fix is obvious: read `card->managed` before calling `complete()`. That's safe, because `snd_card_free` is blocked on the completion.

```c
	bool managed = card->managed;

	if (card->release_completion)
		complete(card->release_completion);
	if (!managed)
		kfree(card);
```

Now, let's make sure we've caught all the potential issues: There's nothing else in `snd_card_do_free` that looks problematic. It's just those two lines.  It is called from `release_card_device`.  When the last reference to the `card->card_dev` is dropped, `release_card_device` is called. So, the sequence is:

1.  `snd_devm_card_new` is called and allocates the `snd_card`.
2.  Driver is unbound.
3.  `devres_release_all` is called.
4.  `release_nodes` calls `__snd_card_release`.
5.  `__snd_card_release` calls `snd_card_free`.
6.  `snd_card_free` calls `put_device(&card->card_dev)`.
7.  `snd_card_free` blocks because there's still a reference to `card->card_dev`.
8.  The sound device file is closed.
9. `release_card_device` is called.
10. `release_card_device` calls `snd_card_do_free`.
11. `snd_card_do_free` completes `release_completion`.
12. Unbind thread wakes up.
13. Devres frees the card.

So, the KASAN report perfectly matches that sequence. The fix is indeed to cache `card->managed` before calling `complete()`. This is an issue since the driver could still hold a reference and there would be a race condition.



43/2 2026/08/13 19:06 tool codesearch-definition-source
0m Args:
map[ContextFile:lib/kobject.c Name:kobject_cleanup]

Results:
map[SourceCode: 659:	/*
 660:	 * kobject_cleanup - free kobject resources.
 661:	 * @kobj: object to cleanup
 662:	 */
 663:	static void kobject_cleanup(struct kobject *kobj)
 664:	{
 665:		struct kobject *parent = kobj->parent;
 666:		const struct kobj_type *t = get_ktype(kobj);
 667:		const char *name = kobj->name;
 668:	
 669:		pr_debug("'%s' (%p): %s, parent %p\n",
 670:			 kobject_name(kobj), kobj, __func__, kobj->parent);
 671:	
 672:		if (t && !t->release)
 673:			pr_debug("'%s' (%p): does not have a release() function, it is broken and must be fixed. See Documentation/core-api/kobject.rst.\n",
 674:				 kobject_name(kobj), kobj);
 675:	
 676:		/* remove from sysfs if the caller did not do it */
 677:		if (kobj->state_in_sysfs) {
 678:			pr_debug("'%s' (%p): auto cleanup kobject_del\n",
 679:				 kobject_name(kobj), kobj);
 680:			__kobject_del(kobj);
 681:		} else {
 682:			/* avoid dropping the parent reference unnecessarily */
 683:			parent = NULL;
 684:		}
 685:	
 686:		if (t && t->release) {
 687:			pr_debug("'%s' (%p): calling ktype release\n",
 688:				 kobject_name(kobj), kobj);
 689:			t->release(kobj);
 690:		}
 691:	
 692:		/* free name if we allocated it */
 693:		if (name) {
 694:			pr_debug("'%s': free name\n", name);
 695:			kfree_const(name);
 696:		}
 697:	
 698:		kobject_put(parent);
 699:	}
 SourceFile:lib/kobject.c]

44/2 2026/08/13 19:06 llm debugger
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 35411
							output: 34
							thoughts: 149
						

Thoughts:
**Analyzing the Safety of `kobject_cleanup`**

Okay, let's break this down step-by-step. I'm focusing on the `kobject_cleanup` function, specifically its interaction with the `t->release(kobj)` function pointer and the `name` field of the `kobject`. First, I see that `kobject_cleanup` calls `t->release(kobj)`. In this specific context, that resolves to `device_release`, which then calls `release_card_device`. Makes sense.

After that initial call returns, `kobject_cleanup` accesses the `name` field, and importantly, this access happens *after* that release function. I noted that `name` was read before the call to `t->release`, so reading it after should be fine, and I can confirm that. Crucially, it then calls `kfree_const(name)`. Here's where it gets interesting, as `name` appears to be a pointer to `kobj->name`. The implication is that if the `name` was dynamically allocated, the call will free it.

The important point is that `kobject_cleanup` *doesn't* access `kobj` itself after that `t->release(kobj)` call. So, even though `device_release` may be freeing resources related to the `kobject`, `kobject_cleanup` does not suffer from any use-after-free conditions. So, based on this understanding, `kobject_cleanup` appears safe.

Now, I need to zoom in on `device_release`.



45/2 2026/08/13 19:06 tool codesearch-definition-source
0m Args:
map[ContextFile:drivers/base/core.c Name:device_release]

Results:
map[SourceCode:2604:	/**
2605:	 * device_release - free device structure.
2606:	 * @kobj: device's kobject.
2607:	 *
2608:	 * This is called once the reference count for the object
2609:	 * reaches 0. We forward the call to the device's release
2610:	 * method, which should handle actually freeing the structure.
2611:	 */
2612:	static void device_release(struct kobject *kobj)
2613:	{
2614:		struct device *dev = kobj_to_dev(kobj);
2615:		struct device_private *p = dev->p;
2616:	
2617:		/*
2618:		 * Some platform devices are driven without driver attached
2619:		 * and managed resources may have been acquired.  Make sure
2620:		 * all resources are released.
2621:		 *
2622:		 * Drivers still can add resources into device after device
2623:		 * is deleted but alive, so release devres here to avoid
2624:		 * possible memory leak.
2625:		 */
2626:		devres_release_all(dev);
2627:	
2628:		kfree(dev->dma_range_map);
2629:		kfree(dev->driver_override.name);
2630:	
2631:		if (dev->release)
2632:			dev->release(dev);
2633:		else if (dev->type && dev->type->release)
2634:			dev->type->release(dev);
2635:		else if (dev->class && dev->class->dev_release)
2636:			dev->class->dev_release(dev);
2637:		else
2638:			WARN(1, KERN_ERR "Device '%s' does not have a release() function, it is broken and must be fixed. See Documentation/core-api/kobject.rst.\n",
2639:				dev_name(dev));
2640:		kfree(p);
2641:	}
 SourceFile:drivers/base/core.c]

46/2 2026/08/13 19:06 llm debugger
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 36535
							output: 36
							thoughts: 1622
						

Thoughts:
**Analyzing the ALSA Sound Card UAF Bug**

Okay, let's break this down. My initial thought process went like this: I see a potential Use-After-Free in the `snd_card_do_free()` function, specifically in the ALSA sound card core. The issue hinges on how sound cards are managed and released, especially when managed by devres.

First, I examined `device_release`. I realized that the `device_release` function calls `dev->type->release(dev)` which in this case resolves to `release_card_device`. After `release_card_device` is complete, the `kfree(p)` call frees the `p` which is the `dev->p` variable that was read earlier, BEFORE the `dev->type->release(dev)` call. So, `device_release` seems safe. I then considered whether `devres_release_all(dev)` called from within `device_release` causes an issue, but realized that since devres are typically attached to the *parent* device, and not `card->card_dev` itself, any devres cleanup would occur *before* the main release function is invoked. This confirmed my initial hunch that the only real issue is with `card->managed`.

Next, I needed to confirm that there were no other accesses after the `complete()` call. After reviewing `snd_card_do_free`, I confirmed there are no other accesses after the `complete(card->release_completion)` call.

Then I considered `card->managed`'s implications and how it relates to `kfree(card)`. If `card->managed` is false, `kfree(card)` is called, which means the card is freed. I considered that `snd_card_free` is called manually by the driver if the card is not managed. It waits for the `release_completion` before returning. This is where it gets tricky, but it also is the solution. If `card->managed` is false, and the `snd_card_free` returns, then the card can be freed, but that is fine because the ALSA core continues to run, even if the driver is unloaded. So if `card->managed` is false, it's safe to read it. Then I realized that if `card->managed` is true, the `card` is freed by devres. In this case, `card->managed` is not safe to read.

Finally, I concluded that by caching the value of `card->managed` in a local variable before the `complete()` call, I can avoid the potential UAF. If `managed` is true, I don't call `kfree(card)`. If `managed` is false, I do call `kfree(card)`. This solves the use-after-free issue.

So, in summary: the bug occurs because `snd_card_do_free()` might access the `snd_card` structure after it's been freed by the devres mechanism, due to a race condition involving the completion of `card->release_completion`. The fix involves caching the value of `card->managed` before calling `complete()`, so we don't need to read from the freed memory after the `complete()` call. There are no other spots after the `complete()` call that access `card`.



47/2 2026/08/13 19:06 tool codesearch-definition-source
0m Error:
log-in to see details

Args:
map[ContextFile:sound/core/init.c Name:snd_card_free]

48/2 2026/08/13 19:06 llm debugger
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 39042
							output: 1008
							thoughts: 1847
						

Thoughts:
**UAF in snd_card_do_free due to Race with Devres Release**

Alright, I've got this figured out. The bug is a classic use-after-free vulnerability that arises from a race condition between `snd_card_do_free` (triggered by a file descriptor close) and the release of the sound card via `devres`. It occurs when the `snd_card` is managed by `devres` and the file is closed concurrently with the devres release. The root cause lies in how the `snd_card`'s memory is managed and how the `release_completion` mechanism in `snd_card_free` interacts with the device resource management.

Here's the sequence of events that triggers the UAF:

1.  **Thread A (Unbind Thread):**
    *   Writes to the sysfs `unbind` file, which starts the process of removing the sound card device.
    *   Executes `devres_release_all()`, which eventually calls `__snd_card_release()` for each device associated with the sound card.
    *   `__snd_card_release()` calls `snd_card_free()`.  At this point, one of the references to `card->card_dev` is dropped, but the file descriptor held by Thread B means the refcount is still > 0.
    *   `snd_card_free()` sets `card->release_completion` and blocks, waiting for `snd_card_do_free` to signal the completion via `wait_for_completion(&released)`.

2.  **Thread B (User Thread):**
    *   Closes the file descriptor associated with the sound device.
    *   This triggers the `snd_card_file_remove()` function.
    *   `snd_card_file_remove()` decrements the reference count and calls `release_card_device()`.
    *   `release_card_device()` calls `snd_card_do_free()`.
    *   `snd_card_do_free()` completes the `card->release_completion` using `complete()`.

3.  **Back to Thread A:**
    *   Thread A, which was blocked in `snd_card_free()`, wakes up because of the completion.
    *   The `devres` code then calls `free_node()` immediately after waking up. Since `free_node()` has a lock to prevent concurrent free operations, the call will succeed. `free_node()` frees the `snd_card` memory.

4.  **The UAF:**
    *   Thread B continues to execute within `snd_card_do_free()`.
    *   It now executes the problematic check: `if (!card->managed)`.
    *   This line attempts to read `card->managed` from the memory that has already been freed by Thread A. This is the use-after-free, triggering the KASAN report.

Here's the code walk-through:

*   **`snd_card_free` (sound/core/init.c):**

    ```c
    void snd_card_free(struct snd_card *card)
    {
    	DECLARE_COMPLETION_ONSTACK(released);

    	if (card->releasing) // Guard against double-frees; doesn't protect against the race
    		return;

    	card->release_completion = &released;
    	snd_card_free_when_closed(card);

    	/* wait, until all devices are ready for the free operation */
    	wait_for_completion(&released);
    }
    ```

*   **`snd_card_do_free` (called from `release_card_device`) (sound/core/init.c):**

    ```c
    void snd_card_do_free(struct snd_card *card)
    {
    	/* This function is only called from devres or from the close() call.
    	 * In both cases, only the last reference is removed. */
    	if (!card->managed)
            kfree(card);
        else {
            /* ...various managed card cleanup... */
        }
    }
    ```

*   **`devres_release_all` (drivers/base/devres.c):**
    ```c
    void devres_release_all(struct device *dev)
    {
        /* ... some irrelevant stuff ... */

    	if (node->release)
            node->release(dev, node->data);  // In this case, __snd_card_release()
    }


49/1 2026/08/13 19:07 agent history-explorer
2m Model:
best-expensive

Instruction:
You are an experienced Linux kernel developer researching prior art for fixing a kernel bug.
You are given a bug explanation. This explanation details the root cause of the bug resulting
from debugging, but does not provide the final fix strategy. Your goal is to explore how
similar bugs were fixed in the past in the same subsystem or files.

CRITICAL: Do NOT attempt to debug the issue further or write a patch for it yourself.
Your ONLY objective is to research and provide the necessary historical context.

Use the git-log tool with the Since parameter set to "3 years" to focus on recent history.
Search for commits that address issues with similar root causes (e.g. similar missing locks,
incorrect refcounting, or similar error path bugs) in the affected files.

Your final reply must summarize your findings: what idioms, locking rules, or common patterns
should be followed when writing a fix for this bug based on how previous similar bugs were addressed.
If you find no relevant past fixes, clearly state that.

Don't make assumptions about the kernel source code (it may be different from what you assume it is).
Extensively use the provided code access tools (codesearch-*, git-*, grepper, etc)
to examine the actual source code, and confirm any assumptions.

Prefer calling several tools at the same time to save round-trips.

Prompt:
The crash is:

==================================================================
BUG: KASAN: use-after-free in snd_card_do_free sound/core/init.c:604 [inline]
BUG: KASAN: use-after-free in release_card_device+0x1ab/0x1b0 sound/core/init.c:153
Read of size 1 at addr ffff8881912ec909 by task syz-executor130/5857

CPU: 0 UID: 0 PID: 5857 Comm: syz-executor130 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
Call Trace:
 <TASK>
 dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120
 print_address_description+0x55/0x1e0 mm/kasan/report.c:378
 print_report+0x58/0x70 mm/kasan/report.c:482
 kasan_report+0x117/0x150 mm/kasan/report.c:595
 snd_card_do_free sound/core/init.c:604 [inline]
 release_card_device+0x1ab/0x1b0 sound/core/init.c:153
 device_release+0xc4/0x1f0 drivers/base/core.c:-1
 kobject_cleanup lib/kobject.c:689 [inline]
 kobject_release lib/kobject.c:720 [inline]
 kref_put include/linux/kref.h:65 [inline]
 kobject_put+0x222/0x550 lib/kobject.c:737
 snd_card_file_remove+0x331/0x390 sound/core/init.c:1125
 snd_pcm_release+0x12c/0x160 sound/core/pcm_native.c:2986
 __fput+0x418/0xa50 fs/file_table.c:512
 fput_close_sync+0x11f/0x240 fs/file_table.c:617
 __do_sys_close fs/open.c:1511 [inline]
 __se_sys_close fs/open.c:1496 [inline]
 __x64_sys_close+0x7e/0x110 fs/open.c:1496
 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:0x7f87f11782de
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:00007f87f0915118 EFLAGS: 00000246 ORIG_RAX: 0000000000000003
RAX: ffffffffffffffda RBX: 00007f87f09156c0 RCX: 00007f87f11782de
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000008
RBP: 00007f87f11ecd40 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: ffffffffffffffd0
R13: 0000000000000002 R14: 00007ffe50e899e0 R15: 00007ffe50e89ac8
 </TASK>

The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1912ec
flags: 0x57ff00000000000(node=1|zone=2|lastcpupid=0x7ff)
raw: 057ff00000000000 ffffea0007e57308 ffff888138841440 0000000000000000
raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as freed
page last allocated via order 2, migratetype Unmovable, gfp_mask 0x40dc0(GFP_KERNEL|__GFP_ZERO|__GFP_COMP), pid 5852, tgid 5852 (syz-executor130), ts 71488546659, free_ts 71610399401
 set_page_owner include/linux/page_owner.h:32 [inline]
 post_alloc_hook+0x1f9/0x250 mm/page_alloc.c:1859
 prep_new_page mm/page_alloc.c:1867 [inline]
 get_page_from_freelist+0x21fa/0x2270 mm/page_alloc.c:3946
 __alloc_frozen_pages_noprof+0x18d/0x380 mm/page_alloc.c:5304
 alloc_pages_mpol+0x212/0x380 mm/mempolicy.c:2490
 ___kmalloc_large_node+0x4c/0x120 mm/slub.c:5274
 __kmalloc_large_node_noprof+0x18/0x90 mm/slub.c:5305
 __do_kmalloc_node mm/slub.c:5322 [inline]
 __kmalloc_node_track_caller_noprof+0x164/0x730 mm/slub.c:5471
 alloc_dr drivers/base/devres.c:141 [inline]
 __devres_alloc_node+0x4c/0x160 drivers/base/devres.c:189
 snd_devm_card_new+0x84/0x160 sound/core/init.c:235
 loopback_probe+0x150/0x13d0 sound/drivers/aloop.c:1805
 platform_probe+0xf9/0x190 drivers/base/platform.c:1439
 call_driver_probe drivers/base/dd.c:-1 [inline]
 really_probe+0x254/0xae0 drivers/base/dd.c:706
 __driver_probe_device+0x1e8/0x360 drivers/base/dd.c:868
 device_driver_attach+0xe0/0x1d0 drivers/base/dd.c:1203
 bind_store+0x1d0/0x220 drivers/base/bus.c:267
 kernfs_fop_write_iter+0x3a4/0x540 fs/kernfs/file.c:345
page last free pid 5856 tgid 5852 stack trace:
 reset_page_owner include/linux/page_owner.h:25 [inline]
 __free_pages_prepare mm/page_alloc.c:1406 [inline]
 __free_frozen_pages+0xc1e/0xd10 mm/page_alloc.c:2950
 free_node drivers/base/devres.c:50 [inline]
 release_nodes drivers/base/devres.c:547 [inline]
 devres_release_all+0x1ce/0x260 drivers/base/devres.c:576
 device_unbind_cleanup drivers/base/dd.c:597 [inline]
 __device_release_driver drivers/base/dd.c:1354 [inline]
 device_release_driver_internal+0x5d9/0x880 drivers/base/dd.c:1372
 unbind_store+0x1a1/0x1d0 drivers/base/bus.c:244
 kernfs_fop_write_iter+0x3a4/0x540 fs/kernfs/file.c:345
 new_sync_write fs/read_write.c:595 [inline]
 vfs_write+0x612/0xba0 fs/read_write.c:687
 ksys_write+0x150/0x270 fs/read_write.c:739
 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

Memory state around the buggy address:
 ffff8881912ec800: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 ffff8881912ec880: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>ffff8881912ec900: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
                      ^
 ffff8881912ec980: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 ffff8881912eca00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
==================================================================


The explanation of the root cause of the bug is:

An analysis of the crash report and the ALSA core source code reveals a classic Use-After-Free (UAF) caused by a race condition between the sound card release process and the devres (device resource management) cleanup.

### Root Cause Analysis

The bug occurs when a sound card is managed by devres (allocated via `snd_devm_card_new()`). For managed cards, the memory is allocated using `devres_alloc()`, and its release function is set to `__snd_card_release()`, which simply calls `snd_card_free()`.

When the device is unbound (e.g., via sysfs) while a user-space application still holds an open file descriptor to the sound card, the following sequence of events leads to the UAF:

1. **Unbind Thread (PID 5856):** The driver is unbound, triggering `devres_release_all()`. The devres core calls the release callback `__snd_card_release()`, which in turn calls `snd_card_free()`.
2. **Unbind Thread:** `snd_card_free()` calls `snd_card_free_when_closed()`, which drops a reference to the card's device (`card->card_dev`). However, because the user thread still has an open file descriptor, the reference count does not reach zero.
3. **Unbind Thread:** `snd_card_free()` then blocks on `wait_for_completion(&released)`, waiting for all references to be dropped.
4. **User Thread (PID 5857):** The user-space application closes the sound device file descriptor (`sys_close`). `snd_card_file_remove()` drops the final reference to `card->card_dev`.
5. **User Thread:** The reference count reaches zero, invoking the device release callback `release_card_device()`, which calls `snd_card_do_free()`.
6. **User Thread:** `snd_card_do_free()` performs cleanup and calls `complete(card->release_completion)`.
7. **Unbind Thread:** Wakes up from `wait_for_completion()`, returns from `snd_card_free()`, and then returns from `__snd_card_release()`.
8. **Unbind Thread:** The devres core (`release_nodes()`) immediately calls `free_node()`, which frees the memory block containing the `snd_card` structure.
9. **User Thread:** Meanwhile, `snd_card_do_free()` continues execution and evaluates `if (!card->managed)`. It reads the `managed` boolean from the `snd_card` structure that was just freed by the unbind thread, triggering the KASAN Use-After-Free.

### Code Walkthrough

The race condition manifests at the very end of `snd_card_do_free()` in `sound/core/init.c`:

```c
static int snd_card_do_free(struct snd_card *card)
{
	card->releasing = true;
	// ... cleanup ...
	
	if (card->release_completion)
		complete(card->release_completion); // [1] Wakes up the unbind thread
		
	if (!card->managed)                         // [2] UAF: card is freed by devres here
		kfree(card);
	return 0;
}
```
At `[1]`, the `complete()` call unblocks the unbind thread waiting in `snd_card_free()`. The unbind thread immediately proceeds to free the `card` memory via devres. By the time the user thread reaches `[2]`, `card` has already been freed, and reading `card->managed` (a 1-byte read at offset 2257) triggers the KASAN bug.

### Proposed Fix

To fix this, the value of `card->managed` must be read and stored in a local variable *before* calling `complete()`. Once `complete()` is called, the `card` pointer must no longer be dereferenced if it is managed by devres.

```c
static int snd_card_do_free(struct snd_card *card)
{
	bool managed = card->managed; // Cache the value before completion

	card->releasing = true;
	// ... existing cleanup code ...
	
	if (card->release_completion)
		complete(card->release_completion);
		
	if (!managed) // Safely use the cached value
		kfree(card);
		
	return 0;
}
```

Reply:
Based on a review of the ALSA core history over the past few years, the proposed fix of caching the `card->managed` field into a local variable before calling `complete()` perfectly aligns with the established idioms and patterns used to fix similar Use-After-Free (UAF) and data race bugs in this subsystem.

### Historical Context and Similar Fixes

In the ALSA core, when an object can be freed concurrently by another thread (often after dropping a lock or signaling a completion), the standard practice is to cache any necessary fields into local variables *before* the synchronization point, and then use those cached values afterwards. 

Here are notable recent examples of this exact pattern being applied:

1. **`9b1dbd69ba6f` ALSA: pcm: fix use-after-free on linked stream runtime in snd_pcm_drain()**
   * **Root Cause:** In `snd_pcm_drain()`, the code accessed `runtime->no_period_wakeup`, `runtime->rate`, and `runtime->buffer_size` after releasing the stream lock. A concurrent `close()` on a linked stream could free the `runtime` object, leading to a UAF.
   * **Fix Pattern:** The fix cached these three fields into local variables (`drain_no_period_wakeup`, `drain_rate`, `drain_bufsz`) while the lock was still held, and used the cached values after the lock was released.

2. **`032322b44c02` ALSA: pcm: oss: use proper stream lock for runtime->state access**
   * **Root Cause:** OSS I/O functions were reading `runtime->state` without holding the stream lock, racing with IRQ context updates.
   * **Fix Pattern:** The fix introduced a helper to read the state under the lock and cached it in a local variable (`state = snd_pcm_get_state(substream);`). The cached local variable was then safely used for subsequent comparisons without needing to repeatedly take the lock or risk data races.

### Alternative Patterns (Refcounting / Locking)

When the data needed after the synchronization point is more complex than a simple boolean or integer (e.g., a pointer to another structure), ALSA developers typically use refcounting or mutexes. For example:

* **`7c349b4f2a60` ALSA: seq: oss: Fix UAF at handling events with embedded SysEx data:** Fixed a UAF by extending a refcount (`snd_use_lock_t`) until an event was fully dispatched, preventing the underlying OSS MIDI device from being freed concurrently.
* **`053a401b592b` ALSA: timer: Fix UAF at snd_timer_user_params():** Fixed a UAF during concurrent timer ioctls by wrapping the vulnerable code block in a `guard(mutex)(&register_mutex)`.

### Conclusion

For your specific bug in `snd_card_do_free()`, because you only need to evaluate a single boolean flag (`card->managed`) after waking up the devres unbind thread via `complete()`, adding new locks or refcounts would be overkill. 

The proposed strategyβ€”caching `card->managed` into a local variable before the `complete()` callβ€”is the correct, idiomatic approach for the ALSA subsystem. It safely avoids the UAF while keeping the teardown path lockless and efficient, exactly mirroring how the maintainers resolved the `snd_pcm_drain()` UAF.

50/2 2026/08/13 19:07 llm history-explorer
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 7786
							output: 35
							thoughts: 353
						

Thoughts:
**Analyzing the ALSA UAF Bug: Lessons from the Past**

Okay, so I've got this UAF in `snd_card_do_free`, right? Classic race condition between devres cleanup and the sound card release. `snd_card_do_free` calls `complete()` on `card->release_completion`, which kicks off the unbind thread. That unbind thread, clever devil, then frees the `card` memory via devres, and *then* `snd_card_do_free` tries to access `card->managed`. Kaboom. Use-After-Free.

The fix, caching `card->managed` *before* the `complete()` call, seems straightforward. But before I green-light this, I need to understand if this kind of problem has cropped up before in ALSA and, if so, how it was handled. I need to be sure this proposed solution aligns with the project's existing best practices and coding style for this type of issue. I need to know the 'why' before I can fully recommend this fix.

So, I'm going to start digging. I'm firing up `git-log`, specifically targeting the last three years, and focusing on the `sound/core/init.c` file and the `sound/core/` directory in general. I’ll search for keywords that would hint at similar problems: "UAF," "use-after-free," "race," "completion," "devres," and even "managed" as a sort of wild card. I need to see what idioms, locking strategies, or other defensive coding patterns the ALSA maintainers have used when dealing with similar asynchronous memory management issues.

The goal is to distill the lessons learned from previous fixes. Did they add specific locks? Did they modify refcounting? Are there common patterns in how they deal with this type of race condition in the release path? If there were similar cases resolved, I'll identify the best practice. If I don't find anything, I need to document that clearly. My recommendations need to be fully informed by historical context.



51/2 2026/08/13 19:07 tool git-log
0m Args:
map[Count:20 PathPrefix:sound/core/init.c Since:3 years]

Results:
map[Output:b113a891252c ALSA: core: Fix unintuitive behavior of snd_power_ref_and_wait()
2fa8d8b6c18b ALSA: core: Use the new helper for the power refcount
e9c82f767f0f ALSA: core: Use flexible array for card private data
84446536f63d ALSA: control: Verify put() result when in debug mode
bf4afc53b77a Convert 'alloc_obj' family to use the new default GFP_KERNEL argument
69050f8d6d07 treewide: Replace kmalloc with kmalloc_obj for non-scalar types
bee60f019606 ALSA: core: Copy string more safely
d278a9de5e18 ALSA: core: add isascii() check to card ID generator
f428cc9eac6e ALSA: control: Rename ctl_files_rwlock to controls_rwlock
495000a38634 ALSA: core: Remove debugfs at disconnection
c1a8d5f31b60 ALSA: core: Enable proc module when CONFIG_MODULES=y
39381fe7394e ALSA: core: Fix NULL module pointer assignment at card init
da0713fff528 ALSA: core: Remove superfluous CONFIG_PM
87988a534d8e ALSA: Fix deadlocks with kctl removals at disconnection
742ecf3ce1ac ALSA: core: Use guard() for locking
091c2848b0f7 ALSA: core: Use dev_name of card_dev as debugfs directory name
01ed7f3535a2 ALSA: core: Drop snd_device_initialize()
7f018db19bf7 ALSA: core: Introduce snd_device_alloc()
]

52/2 2026/08/13 19:07 llm history-explorer
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 9092
							output: 44
							thoughts: 46
						

Thoughts:
Okay, here's my take on those thoughts, tailored for an expert audience:

**Investigating Potential ALSA Core Vulnerabilities**

Alright, let's dive in. I need to quickly scan the ALSA core history for commits that might be relevant to potential vulnerabilities. My initial thought is to focus on keywords that often signal memory corruption or resource management issues. I'm thinking: "completion" – a classic source of race conditions and missed synchronizations, "devres" – that's often tied to resource cleanup and potential double-frees if mishandled, "managed" – which usually implies lifecycle management and ownership, another area prone to mistakes, and of course, the ever-present "use-after-free" – that's a red flag on its own.

My immediate instinct is to fire up `git-log`. This is the perfect tool for quickly sifting through a project's history. I'll utilize MessageRegexps, using those keywords as search terms within the commit messages themselves. This should give me a good, targeted starting point. This approach allows me to examine and filter based on those specific terms, saving time instead of manually reviewing every commit.



53/2 2026/08/13 19:07 tool git-log
0m Args:
map[Count:20 MessageRegexps:[use-after-free] PathPrefix:sound/core/ Since:3 years]

Results:
map[Output:bdefe1346a8e ALSA: timer: drain a slave's callback before its master detaches it
70d28bfcd622 ALSA: timer: don't re-enter an instance callback that is still running
053a401b592b ALSA: timer: Fix UAF at snd_timer_user_params()
88fe2e365872 ALSA: PCM: Fix wait queue list corruption in snd_pcm_drain() on linked streams
ef7607ab1c8a ALSA: seq: midi: Serialize output teardown with event_input
7c349b4f2a60 ALSA: seq: oss: Fix UAF at handling events with embedded SysEx data
60a1969fae62 ALSA: seq: Serialize UMP output teardown with event_input
9b1dbd69ba6f ALSA: pcm: fix use-after-free on linked stream runtime in snd_pcm_drain()
]

54/2 2026/08/13 19:07 llm history-explorer
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 9676
							output: 40
							thoughts: 20
						

Thoughts:
Here's my thought process, as it stands:

**Checking the Git History for "Race" in Sound Core**

Okay, so I need to investigate something related to a potential race condition. My immediate thought is to delve into the `git-log` for the `sound/core/` directory. That seems like the most relevant place to start, given the context is clearly audio-related and core sound functionality. I'm going to search specifically for the term "race" – that's the keyword likely to yield results directly relevant to concurrency issues. This should help me quickly identify any commits that might address or introduce synchronization problems within that area of the codebase. It's a targeted approach; hopefully, I can surface pertinent information rapidly using this method.



55/2 2026/08/13 19:07 tool git-log
0m Args:
map[Count:20 MessageRegexps:[race] PathPrefix:sound/core/ Since:3 years]

Results:
map[Output:100407f548ca ALSA: timer: Fix racy timeri->timer changes with rwlock
e546128291f8 ALSA: seq: avoid stale FIFO cells during resize
49ce92d20782 ALSA: seq: oss: Serialize readq reset state with q->lock
053a401b592b ALSA: timer: Fix UAF at snd_timer_user_params()
7c349b4f2a60 ALSA: seq: oss: Fix UAF at handling events with embedded SysEx data
60a1969fae62 ALSA: seq: Serialize UMP output teardown with event_input
5337213381df ALSA: core: Serialize deferred fasync state checks
901ac0ff15ed ALSA: pcm: oss: Fix data race at accessing runtime.oss.trigger
8146cd333d23 ALSA: core: Fix potential data race at fasync handling
032322b44c02 ALSA: pcm: oss: use proper stream lock for runtime->state access
84446536f63d ALSA: control: Verify put() result when in debug mode
47c27c9c9c72 ALSA: pcm: Improve the fix for race of buffer access at PCM OSS layer
1f9fc89cbbe8 ALSA: seq: Fix KCSAN data-race warning at snd_seq_fifo_poll_wait()
5003a65790ed ALSA: timer: fix ida_free call while not allocated
93a81ca06577 ALSA: pcm: Fix race of buffer access at PCM OSS layer
e3cd33ab17c3 ALSA: seq: Improve data consistency at polling
604a0fe88db0 ALSA: pcm: Drop superfluous NULL check in snd_pcm_format_set_silence()
20ce9ded8c59 ALSA: seq: oss: Send fragmented SysEx messages immediately
0179488ca992 ALSA: seq: oss: Fix races at processing SysEx messages
7439b3952118 ALSA: compress_offload: fix remaining descriptor races in sound/core/compress_offload.c
]

56/2 2026/08/13 19:07 llm history-explorer
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 10463
							output: 41
							thoughts: 21
						

Thoughts:
Here's my thought process, as it stands:

**Checking `git-log` for "devres" in `sound/core/`**

Okay, so I need to track down something, likely a recent change or perhaps a historical issue, related to "devres" and the sound core. My instinct is to use `git log` because it's the primary tool for reviewing the commit history. I want to narrow down the scope and the search terms right off the bat; the "sound/core/" directory is the most relevant place to start for anything sound-related and the `devres` keyword narrows the scope of my search. This will hopefully save me from sifting through *everything*. Let's get to the terminal and see what `git-log` turns up.



57/2 2026/08/13 19:07 tool git-log
0m Args:
map[Count:20 MessageRegexps:[devres] PathPrefix:sound/core/ Since:3 years]

Results:
map[Output:e9c82f767f0f ALSA: core: Use flexible array for card private data
]

58/2 2026/08/13 19:07 llm history-explorer
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 10729
							output: 40
							thoughts: 20
						

Thoughts:
Okay, here's my take on those thoughts, tailored for an expert audience:

**Investigating Recent Code Changes for Sound Core Completion**

Alright, time to dig into this. I'm thinking, let's fire up `git log` and specifically target the `sound/core/` directory. My aim here is to zero in on any commits that might be related to "completion" or related concepts. This keyword-based approach using `git log` is usually a quick and dirty way to get a bird's-eye view of recent activity related to a specific topic or feature within a larger codebase. I'm expecting this to give me a concise list to filter through, rather than trying to manually navigate the full history. I'm hoping to quickly identify the commits that are most likely to provide insight into this area, hopefully allowing me to find recent work, or identify potentially related changes for context.



59/2 2026/08/13 19:07 tool git-log
0m Args:
map[Count:20 MessageRegexps:[completion] PathPrefix:sound/core/ Since:3 years]

Results:
map[Output:bbc6c0dda54f ALSA: seq_oss: return full count for successful SEQ_FULLSIZE writes
c7a606519533 ALSA: info: Fix potential deadlock at disconnection
]

60/2 2026/08/13 19:07 llm history-explorer
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 11040
							output: 40
							thoughts: 20
						

Thoughts:
Okay, here's my take on those thoughts, tailored for an expert audience:

**Investigating Recent Changes in ALSA Core**

Right, let's get down to brass tacks. I need to understand the recent activity in the ALSA core, specifically anything related to "managed" functionality within the `sound/core/` directory. My initial approach is going to be a quick dive into the `git-log`. This is the fastest way to get a high-level overview of recent commits that touched relevant files. I'm looking for a history scan to see what's been added, removed, or modified, focusing on changes that might affect memory management, resource allocation, or any other area where the term "managed" is pertinent. I'm expecting this initial probe to turn up a list of commits that I can then analyze in more detail. This quick scan is essential to narrow down specific commits and understand the context of this project.



61/2 2026/08/13 19:07 tool git-log
0m Args:
map[Count:20 MessageRegexps:[managed] PathPrefix:sound/core/ Since:3 years]

Results:
map[Output:9fc4a3da9a02 ALSA: pcm: Disable bottom softirqs as part of spin_lock_irq() on PREEMPT_RT
]

62/2 2026/08/13 19:07 llm history-explorer
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 11347
							output: 47
							thoughts: 26
						

Thoughts:
Here's my attempt at summarizing the thought process, tailored for an expert audience:

**Investigating a Sound Driver Issue**

Okay, so I'm suspecting there's a problem with the sound driver, specifically in the `sound/core/` directory. My initial hunch is to look at the git history for the function `snd_card_do_free`. This function seems like a likely candidate for a memory management issue or a race condition, given its name. I'll fire up `git log` and specifically search for that function name within that particular directory. Hopefully, this search will reveal recent changes or commits that touch this function and provide some clues about what might be going wrong, or perhaps indicate the context in which it has been changed in the past, or provide commits or associated code that might be associated with the current issue. I need to understand the function's evolution to determine if the issue is recent and possibly introduced by a new commit. I'm expecting this will at least give me a starting point.



63/2 2026/08/13 19:07 tool git-log
0m Args:
map[Count:20 MessageRegexps:[snd_card_do_free] PathPrefix:sound/core/ Since:10 years]

Results:
map[Output:]

64/2 2026/08/13 19:08 llm history-explorer
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 11647
							output: 45
							thoughts: 52
						

Thoughts:
**Investigating `snd_card_do_free` and `snd_card_free` in the Sound Core**

Okay, so I'm trying to nail down whether `snd_card_do_free` is a static function or if it has a broader scope, and whether its usage is well-documented in the commit history. The fact that I'm uncertain about its static nature is making me think I need to dig deeper. My first inclination is to jump into the `git-log` for that `sound/core/` directory. I need to make sure I'm using the `snd_card_free` function in the search too because if `snd_card_do_free` is a derivative function, the original likely gets used in the commit messages. Searching for that broader function will give me more context. Hopefully, this `git-log` search turns up something useful! I'm expecting to find information about the function's purpose, how it's used, and possibly why it was chosen over some other method in the first place. This should help me decide if `snd_card_do_free` being static is an issue.



65/2 2026/08/13 19:08 tool git-log
0m Args:
map[Count:20 MessageRegexps:[snd_card_free] PathPrefix:sound/core/ Since:10 years]

Results:
map[Output:495000a38634 ALSA: core: Remove debugfs at disconnection
25a5a77ae0bc ALSA: core: Make snd_card_free() return void
73c5685c431a ALSA: core: Make snd_card_free_when_closed() return void
663f922fd7a9 ALSA: core: Make snd_card_disconnect() return void
fee2b871d8d6 ALSA: core: Add snd_card_free_on_error() helper
825a52482a61 ALSA: core: Fix double calls of snd_card_free() via devres
e8ad415b7a55 ALSA: core: Add managed card creation
3c4ab49ec59b ALSA: core: Fix the debugfs removal at snd_card_free()
c44027c89e19 ALSA: add snd_card_disconnect_sync()
]

66/2 2026/08/13 19:08 llm history-explorer
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 12240
							output: 27
							thoughts: 45
						

Thoughts:
Here's my take on those thoughts, assuming I'm an expert:

**Diving into an ALSA Core Bugfix**

Okay, "825a52482a61 ALSA: core: Fix double calls of snd_card_free() via devres" has caught my eye. That sounds like a classic resource management issue lurking in the ALSA core, likely a subtle memory leak or, worse, a corruption scenario. The "double calls" immediately flags a potential reference counting problem or a flaw in how `devres` is being used with the audio card structure. Time to dive into the commit and see what they've fixed. I need to understand the exact codepath this affects to fully grasp the potential impact and assess the solution's elegance.



67/2 2026/08/13 19:08 tool git-show
0m Args:
map[Commit:825a52482a61]

Results:
map[Output:commit 825a52482a616d74bd2f5eacc0f8946d025499a7
Author: Takashi Iwai <tiwai@suse.de>
Date:   Sat Jul 31 10:34:46 2021 +0200

    ALSA: core: Fix double calls of snd_card_free() via devres
    
    At the transition to the devres-managed card release, we've put the
    check of double-free at trigger_card_release().  But this wasn't
    enough, as the code path calls snd_card_free() again, and it would
    lead to the doubly snd_card_free() calls.
    
    Actually the v1 patch was correct to handle this, but I forgot that
    corner case and moved the check to the more obvious place as I thought
    it's clearer.  But, as usual, devils live in details.
    
    This patch corrects the check of the double-free to the right place,
    with a bit more comments.
    
    Fixes: e8ad415b7a55 ("ALSA: core: Add managed card creation")
    Link: https://lore.kernel.org/r/20210731083446.26680-1-tiwai@suse.de
    Signed-off-by: Takashi Iwai <tiwai@suse.de>

diff --git a/sound/core/init.c b/sound/core/init.c
index e985185ebc91..ac335f5906c6 100644
--- a/sound/core/init.c
+++ b/sound/core/init.c
@@ -605,6 +605,15 @@ int snd_card_free(struct snd_card *card)
 	DECLARE_COMPLETION_ONSTACK(released);
 	int ret;
 
+	/* The call of snd_card_free() is allowed from various code paths;
+	 * a manual call from the driver and the call via devres_free, and
+	 * we need to avoid double-free. Moreover, the release via devres
+	 * may call snd_card_free() twice due to its nature, we need to have
+	 * the check here at the beginning.
+	 */
+	if (card->releasing)
+		return 0;
+
 	card->release_completion = &released;
 	ret = snd_card_free_when_closed(card);
 	if (ret)
@@ -813,10 +822,7 @@ EXPORT_SYMBOL_GPL(snd_card_add_dev_attr);
 
 static void trigger_card_free(void *data)
 {
-	struct snd_card *card = data;
-
-	if (!card->releasing)
-		snd_card_free(data);
+	snd_card_free(data);
 }
 
 /**
]

68/2 2026/08/13 19:08 llm history-explorer
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 13224
							output: 26
							thoughts: 27
						

Thoughts:
Here's a summary of my thoughts, as though I'm dissecting this ALSA patch:

**Analyzing ALSA: core: Add managed card creation**

Alright, let's dive into this patch, `e8ad415b7a55`. The title immediately grabs my attention: "ALSA: core: Add managed card creation." Hmm, managed card creation. This suggests a shift in how ALSA handles the lifecycle of audio cards. We're talking core functionality here, likely impacting a fundamental aspect of device initialization and management within the Advanced Linux Sound Architecture. I'm immediately wondering about the existing mechanisms and what limitations this managed approach aims to address. Is this about simplifying the driver model, improving resource allocation, enhancing error handling, or perhaps facilitating hotplugging more cleanly?

My initial questions involve: What are the specific design choices? Are they using a new data structure to hold the card information and does that data structure include resources that are allocated for the card. How does this 'managed' creation interact with existing ALSA subsystems, like the PCM interface or the control interface? Are there new APIs exposed to user space, or is this primarily an internal refactoring? I'll need to carefully examine the code changes to understand the implications on the existing sound architecture, especially for backward compatibility. I'll need to pay close attention to any locking mechanisms introduced or modified; ALSA is notorious for its intricate locking needs.

So, I'll start by looking at the diffs, focusing on the added functions and data structures first, then tracing their usage to understand the overall flow. I'll be looking for potential performance implications and any increased complexity. This looks to be a significant change; understanding its rationale is crucial for evaluating its long-term impact on the ALSA ecosystem.



69/2 2026/08/13 19:08 tool git-show
0m Args:
map[Commit:e8ad415b7a55]

Results:
map[Output:commit e8ad415b7a55cb9a9fbfc04696518d5ea0b609b3
Author: Takashi Iwai <tiwai@suse.de>
Date:   Thu Jul 15 09:58:24 2021 +0200

    ALSA: core: Add managed card creation
    
    As a second step for preliminary to widen the devres usages among
    sound drivers, this patch adds a new ALSA core API function,
    snd_devm_card_new(), to create a snd_card object via devres.
    When a card object is created by this new function, snd_card_free() is
    called automatically and the card object resource gets released at the
    device unbinding time.
    
    However, the story isn't that simple.  A caveat is that we have to
    call snd_card_free() at the very first of the whole resource release
    procedure, in order to assure that the all exposed devices on
    user-space are deleted and sync with processes accessing those devices
    before releasing resources.
    
    For achieving it, snd_card_register() adds a new devres action to
    trigger snd_card_free() automatically when the given card object is a
    "managed" one.  Since usually snd_card_register() is the last step of
    the initialization, this should work in most cases.
    
    With all these tricks, some drivers can get rid of the whole driver
    remove callback code.
    
    About a bit of implementation details: the patch adds two new flags to
    snd_card object: managed and releasing.  The former indicates that the
    object was created via snd_devm_card_new(), and the latter is used for
    avoiding the double-free of snd_card_free() calls.  Both flags are
    fairly internal and likely uninteresting to normal users.
    
    Link: https://lore.kernel.org/r/20210715075941.23332-3-tiwai@suse.de
    Signed-off-by: Takashi Iwai <tiwai@suse.de>

diff --git a/include/sound/core.h b/include/sound/core.h
index c4ade121727d..7885f903cd5a 100644
--- a/include/sound/core.h
+++ b/include/sound/core.h
@@ -117,6 +117,8 @@ struct snd_card {
 	struct device card_dev;		/* cardX object for sysfs */
 	const struct attribute_group *dev_groups[4]; /* assigned sysfs attr */
 	bool registered;		/* card_dev is registered? */
+	bool managed;			/* managed via devres */
+	bool releasing;			/* during card free process */
 	int sync_irq;			/* assigned irq, used for PCM sync */
 	wait_queue_head_t remove_sleep;
 
@@ -274,6 +276,9 @@ extern int (*snd_mixer_oss_notify_callback)(struct snd_card *card, int cmd);
 int snd_card_new(struct device *parent, int idx, const char *xid,
 		 struct module *module, int extra_size,
 		 struct snd_card **card_ret);
+int snd_devm_card_new(struct device *parent, int idx, const char *xid,
+		      struct module *module, size_t extra_size,
+		      struct snd_card **card_ret);
 
 int snd_card_disconnect(struct snd_card *card);
 void snd_card_disconnect_sync(struct snd_card *card);
diff --git a/sound/core/init.c b/sound/core/init.c
index 1490568efdb0..e985185ebc91 100644
--- a/sound/core/init.c
+++ b/sound/core/init.c
@@ -134,6 +134,9 @@ void snd_device_initialize(struct device *dev, struct snd_card *card)
 }
 EXPORT_SYMBOL_GPL(snd_device_initialize);
 
+static int snd_card_init(struct snd_card *card, struct device *parent,
+			 int idx, const char *xid, struct module *module,
+			 size_t extra_size);
 static int snd_card_do_free(struct snd_card *card);
 static const struct attribute_group card_dev_attr_group;
 
@@ -163,9 +166,6 @@ int snd_card_new(struct device *parent, int idx, const char *xid,
 {
 	struct snd_card *card;
 	int err;
-#ifdef CONFIG_SND_DEBUG
-	char name[8];
-#endif
 
 	if (snd_BUG_ON(!card_ret))
 		return -EINVAL;
@@ -176,6 +176,74 @@ int snd_card_new(struct device *parent, int idx, const char *xid,
 	card = kzalloc(sizeof(*card) + extra_size, GFP_KERNEL);
 	if (!card)
 		return -ENOMEM;
+
+	err = snd_card_init(card, parent, idx, xid, module, extra_size);
+	if (err < 0) {
+		kfree(card);
+		return err;
+	}
+
+	*card_ret = card;
+	return 0;
+}
+EXPORT_SYMBOL(snd_card_new);
+
+static void __snd_card_release(struct device *dev, void *data)
+{
+	snd_card_free(data);
+}
+
+/**
+ * snd_devm_card_new - managed snd_card object creation
+ * @parent: the parent device object
+ * @idx: card index (address) [0 ... (SNDRV_CARDS-1)]
+ * @xid: card identification (ASCII string)
+ * @module: top level module for locking
+ * @extra_size: allocate this extra size after the main soundcard structure
+ * @card_ret: the pointer to store the created card instance
+ *
+ * This function works like snd_card_new() but manages the allocated resource
+ * via devres, i.e. you don't need to free explicitly.
+ *
+ * When a snd_card object is created with this function and registered via
+ * snd_card_register(), the very first devres action to call snd_card_free()
+ * is added automatically.  In that way, the resource disconnection is assured
+ * at first, then released in the expected order.
+ */
+int snd_devm_card_new(struct device *parent, int idx, const char *xid,
+		      struct module *module, size_t extra_size,
+		      struct snd_card **card_ret)
+{
+	struct snd_card *card;
+	int err;
+
+	*card_ret = NULL;
+	card = devres_alloc(__snd_card_release, sizeof(*card) + extra_size,
+			    GFP_KERNEL);
+	if (!card)
+		return -ENOMEM;
+	card->managed = true;
+	err = snd_card_init(card, parent, idx, xid, module, extra_size);
+	if (err < 0) {
+		devres_free(card);
+		return err;
+	}
+
+	devres_add(parent, card);
+	*card_ret = card;
+	return 0;
+}
+EXPORT_SYMBOL_GPL(snd_devm_card_new);
+
+static int snd_card_init(struct snd_card *card, struct device *parent,
+			 int idx, const char *xid, struct module *module,
+			 size_t extra_size)
+{
+	int err;
+#ifdef CONFIG_SND_DEBUG
+	char name[8];
+#endif
+
 	if (extra_size > 0)
 		card->private_data = (char *)card + sizeof(struct snd_card);
 	if (xid)
@@ -197,7 +265,6 @@ int snd_card_new(struct device *parent, int idx, const char *xid,
 		mutex_unlock(&snd_card_mutex);
 		dev_err(parent, "cannot find the slot for index %d (range 0-%i), error: %d\n",
 			 idx, snd_ecards_limit - 1, err);
-		kfree(card);
 		return err;
 	}
 	set_bit(idx, snd_cards_lock);		/* lock it */
@@ -256,8 +323,6 @@ int snd_card_new(struct device *parent, int idx, const char *xid,
 	sprintf(name, "card%d", idx);
 	card->debugfs_root = debugfs_create_dir(name, sound_debugfs_root);
 #endif
-
-	*card_ret = card;
 	return 0;
 
       __error_ctl:
@@ -266,7 +331,6 @@ int snd_card_new(struct device *parent, int idx, const char *xid,
 	put_device(&card->card_dev);
   	return err;
 }
-EXPORT_SYMBOL(snd_card_new);
 
 /**
  * snd_card_ref - Get the card object from the index
@@ -481,6 +545,7 @@ EXPORT_SYMBOL_GPL(snd_card_disconnect_sync);
 
 static int snd_card_do_free(struct snd_card *card)
 {
+	card->releasing = true;
 #if IS_ENABLED(CONFIG_SND_MIXER_OSS)
 	if (snd_mixer_oss_notify_callback)
 		snd_mixer_oss_notify_callback(card, SND_MIXER_OSS_NOTIFY_FREE);
@@ -498,7 +563,8 @@ static int snd_card_do_free(struct snd_card *card)
 #endif
 	if (card->release_completion)
 		complete(card->release_completion);
-	kfree(card);
+	if (!card->managed)
+		kfree(card);
 	return 0;
 }
 
@@ -745,6 +811,14 @@ int snd_card_add_dev_attr(struct snd_card *card,
 }
 EXPORT_SYMBOL_GPL(snd_card_add_dev_attr);
 
+static void trigger_card_free(void *data)
+{
+	struct snd_card *card = data;
+
+	if (!card->releasing)
+		snd_card_free(data);
+}
+
 /**
  *  snd_card_register - register the soundcard
  *  @card: soundcard structure
@@ -768,6 +842,15 @@ int snd_card_register(struct snd_card *card)
 		if (err < 0)
 			return err;
 		card->registered = true;
+	} else {
+		if (card->managed)
+			devm_remove_action(card->dev, trigger_card_free, card);
+	}
+
+	if (card->managed) {
+		err = devm_add_action(card->dev, trigger_card_free, card);
+		if (err < 0)
+			return err;
 	}
 
 	err = snd_device_register_all(card);
]

70/2 2026/08/13 19:08 llm history-explorer
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 16530
							output: 44
							thoughts: 167
						

Thoughts:
**Analyzing the Vulnerability and Searching for Prior Fixes**

Okay, so `snd_card_do_free`... that's where the problem lies. The code block within it is clearly the culprit for the Use-After-Free. I can see the potential race condition right there. The release completion, and then the `kfree`. The `!card->managed` check seems like the critical piece. My focus shifts immediately from understanding the code to finding precedent.

My task now is to identify how similar problems have been addressed in the past, specifically within this sound subsystem or closely related files. To be precise, I am looking for commits with matching root causes like improperly managed memory, missing lock implementations, and errors in the cleanup procedure. I need to find good examples for the fix to `snd_card_do_free`.

So, the next step is a targeted `git log` search. I'll focus on the `sound/core/` directory and use keywords like "use-after-free", "UAF", and "race". Hopefully, the commit messages will contain enough detail to understand the nature of the vulnerability and the chosen fix. My expert experience tells me these kinds of errors are often recurring and pattern-based, so I am confident I will find something helpful.



71/2 2026/08/13 19:08 tool git-log
0m Args:
map[Count:20 MessageRegexps:[use-after-free] PathPrefix:sound/core/ Since:3 years]

Results:
map[Output:bdefe1346a8e ALSA: timer: drain a slave's callback before its master detaches it
70d28bfcd622 ALSA: timer: don't re-enter an instance callback that is still running
053a401b592b ALSA: timer: Fix UAF at snd_timer_user_params()
88fe2e365872 ALSA: PCM: Fix wait queue list corruption in snd_pcm_drain() on linked streams
ef7607ab1c8a ALSA: seq: midi: Serialize output teardown with event_input
7c349b4f2a60 ALSA: seq: oss: Fix UAF at handling events with embedded SysEx data
60a1969fae62 ALSA: seq: Serialize UMP output teardown with event_input
9b1dbd69ba6f ALSA: pcm: fix use-after-free on linked stream runtime in snd_pcm_drain()
]

72/2 2026/08/13 19:08 llm history-explorer
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 17259
							output: 25
							thoughts: 39
						

Thoughts:
Here's my summary, as though I'm thinking through this:

**Analyzing a Potential ALSA PCM Bug**

Okay, let's dive into this commit: `9b1dbd69ba6f ALSA: pcm: fix use-after-free on linked stream runtime in snd_pcm_drain()`. Sounds like a classic memory management issue – a use-after-free in the ALSA PCM subsystem. That's a critical area, especially given how prevalent audio is. "Linked stream runtime" suggests we're dealing with a specific scenario, likely involving multiple PCM streams connected somehow. My spidey-sense is tingling; use-after-free bugs in audio drivers can lead to anything from subtle audio glitches to complete system crashes, depending on the architecture and timing of the incident. I'm immediately interested in how `snd_pcm_drain()` is being used here, and exactly where the "free" is happening in relation to the usage. I'll need to scrutinize the code changes within this commit very carefully, specifically focusing on the data structures and how they're being managed during stream transitions and termination. This has the potential to be a significant fix, or at least a good learning exercise about the design of ALSA PCM. Let's see what the commit itself tells me about the problem and solution.



73/2 2026/08/13 19:08 tool git-show
0m Args:
map[Commit:9b1dbd69ba6f]

Results:
map[Output:commit 9b1dbd69ba6f8f8c69bc7b77c2ce3b9c6ed05ba6
Author: Mehul Rao <mehulrao@gmail.com>
Date:   Thu Mar 5 14:35:07 2026 -0500

    ALSA: pcm: fix use-after-free on linked stream runtime in snd_pcm_drain()
    
    In the drain loop, the local variable 'runtime' is reassigned to a
    linked stream's runtime (runtime = s->runtime at line 2157).  After
    releasing the stream lock at line 2169, the code accesses
    runtime->no_period_wakeup, runtime->rate, and runtime->buffer_size
    (lines 2170-2178) β€” all referencing the linked stream's runtime without
    any lock or refcount protecting its lifetime.
    
    A concurrent close() on the linked stream's fd triggers
    snd_pcm_release_substream() β†’ snd_pcm_drop() β†’ pcm_release_private()
    β†’ snd_pcm_unlink() β†’ snd_pcm_detach_substream() β†’ kfree(runtime).
    No synchronization prevents kfree(runtime) from completing while the
    drain path dereferences the stale pointer.
    
    Fix by caching the needed runtime fields (no_period_wakeup, rate,
    buffer_size) into local variables while still holding the stream lock,
    and using the cached values after the lock is released.
    
    Fixes: f2b3614cefb6 ("ALSA: PCM - Don't check DMA time-out too shortly")
    Cc: stable@vger.kernel.org
    Signed-off-by: Mehul Rao <mehulrao@gmail.com>
    Link: https://patch.msgid.link/20260305193508.311096-1-mehulrao@gmail.com
    Signed-off-by: Takashi Iwai <tiwai@suse.de>

diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c
index 67cf6a0e17ba..5a64453da728 100644
--- a/sound/core/pcm_native.c
+++ b/sound/core/pcm_native.c
@@ -2144,6 +2144,10 @@ static int snd_pcm_drain(struct snd_pcm_substream *substream,
 	for (;;) {
 		long tout;
 		struct snd_pcm_runtime *to_check;
+		unsigned int drain_rate;
+		snd_pcm_uframes_t drain_bufsz;
+		bool drain_no_period_wakeup;
+
 		if (signal_pending(current)) {
 			result = -ERESTARTSYS;
 			break;
@@ -2163,16 +2167,25 @@ static int snd_pcm_drain(struct snd_pcm_substream *substream,
 		snd_pcm_group_unref(group, substream);
 		if (!to_check)
 			break; /* all drained */
+		/*
+		 * Cache the runtime fields needed after unlock.
+		 * A concurrent close() on the linked stream may free
+		 * its runtime via snd_pcm_detach_substream() once we
+		 * release the stream lock below.
+		 */
+		drain_no_period_wakeup = to_check->no_period_wakeup;
+		drain_rate = to_check->rate;
+		drain_bufsz = to_check->buffer_size;
 		init_waitqueue_entry(&wait, current);
 		set_current_state(TASK_INTERRUPTIBLE);
 		add_wait_queue(&to_check->sleep, &wait);
 		snd_pcm_stream_unlock_irq(substream);
-		if (runtime->no_period_wakeup)
+		if (drain_no_period_wakeup)
 			tout = MAX_SCHEDULE_TIMEOUT;
 		else {
 			tout = 100;
-			if (runtime->rate) {
-				long t = runtime->buffer_size * 1100 / runtime->rate;
+			if (drain_rate) {
+				long t = drain_bufsz * 1100 / drain_rate;
 				tout = max(t, tout);
 			}
 			tout = msecs_to_jiffies(tout);
]

74/2 2026/08/13 19:08 llm history-explorer
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 18718
							output: 27
							thoughts: 120
						

Thoughts:
**Analyzing a Familiar Bug Fix**

Okay, so I'm looking at this code and, yep, this bug rings a bell! It's that classic race condition scenario. In `snd_pcm_drain()`, someone was accessing the `runtime` structure after they'd already released the mutex protecting it. The problem is, of course, that the `runtime` itself could be freed in a different thread concurrently, leading to use-after-free bugs.

The fix, and it's a good one, is exactly what I'd expect. The key is to grab the *necessary* data from the `runtime` – specifically, `no_period_wakeup`, `rate`, and `buffer_size` – while still safely under the lock. Essentially, we're making a copy of the values we *need* locally, then releasing the lock and confidently using those cached values. This prevents the race. Smart!

Now, let's see... I'll quickly cross-reference this with commit `053a401b592b ALSA: timer: Fix UAF at snd_timer_user_params()`. Wonder if this shares the same root cause or a similar approach to the fix. Gotta check that out to get the whole picture.



75/2 2026/08/13 19:08 tool git-show
0m Args:
map[Commit:053a401b592b]

Results:
map[Output:commit 053a401b592be424fea9d57c789f66cd5d8cec11
Author: Takashi Iwai <tiwai@suse.de>
Date:   Sat Jun 6 18:11:41 2026 +0200

    ALSA: timer: Fix UAF at snd_timer_user_params()
    
    At releasing a timer object, e.g. when a userspace timer
    (CONFIG_SND_UTIMER) gets closed and snd_timer_free() is called, it
    tries to detach the timer instances and release the resources.
    However, it's still possible that other in-flight tasks are holding
    the timer instance where the to-be-deleted timer object is associated,
    and this may lead to racy accesses.
    
    Fortunately, most of ioctls dealing with the timer instance list
    already have the protection with register_mutex, and this also avoids
    such races.  But, SNDRV_TIMER_IOCTL_PARAMS isn't protected, hence the
    concurrent ioctl may lead to use-after-free.
    
    This patch just adds the guard with register_mutex to protect
    snd_timer_user_params() for covering the code path as a quick
    workaround.  It's no hot-path but rather a rarely issued ioctl, so the
    performance penalty doesn't matter.
    
    Reported-by: Kyle Zeng <kylebot@openai.com>
    Tested-by: Kyle Zeng <kylebot@openai.com>
    Cc: <stable@vger.kernel.org>
    Link: https://patch.msgid.link/20260606161145.1933447-2-tiwai@suse.de
    Signed-off-by: Takashi Iwai <tiwai@suse.de>

diff --git a/sound/core/timer.c b/sound/core/timer.c
index 67fb1ecb33f0..3d72379e57a8 100644
--- a/sound/core/timer.c
+++ b/sound/core/timer.c
@@ -1811,6 +1811,7 @@ static int snd_timer_user_params(struct file *file,
 	struct snd_timer *t;
 	int err;
 
+	guard(mutex)(&register_mutex);
 	tu = file->private_data;
 	if (!tu->timeri)
 		return -EBADFD;
]

76/2 2026/08/13 19:08 llm history-explorer
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 19767
							output: 27
							thoughts: 47
						

Thoughts:
Here's my take on this – a rundown of my thought process:

**Analyzing the Mutex and a Specific ALSA Commit**

Okay, so we're looking at code that uses a mutex for protection. That's a good first sign. It shows an awareness of the need for concurrency control, which is essential, especially in audio processing where we have a lot of things potentially interacting. Now, I need to understand *what* exactly it's protecting. Is it a critical section, a shared resource, or data? Is it being used effectively? Are there any potential deadlocks? This mutex usage alone doesn't tell the whole story, it's just a starting point.

Now, let's zoom in. The commit mentioned, `7c349b4f2a60 ALSA: seq: oss: Fix UAF at handling events with embedded SysEx data`, is what really grabs my attention. A Use-After-Free (UAF) bug in ALSA, specifically related to handling SysEx data…that's not something to be taken lightly. SysEx data is often complex and highly specific to MIDI devices, and if handled incorrectly, could lead to crashes, security vulnerabilities, or even corruption of system data.

I need to understand what triggered that particular UAF, where the code was attempting to access the already freed memory after the `SysEx` data. I will have to find out what was going on in the code before that bug fix. What exactly was the vulnerability in the previous version of the code? Was it a simple double-free, a race condition, or something more insidious? My next step would be to grab the commit and carefully dissect the changes. I will need to look at the surrounding code to grasp the context. I'll be looking for memory allocation, deallocation, and any potential race conditions where data pointers might be invalidated before being used. This could have been a subtle bug, and it would need to be addressed at every stage of development. I'll need to scrutinize the data structures involved, the locking mechanisms, and the error handling to determine the root cause of the UAF. It is important to know if it happened in a specific situation, or under any conditions.



77/2 2026/08/13 19:08 tool git-show
0m Args:
map[Commit:7c349b4f2a60]

Results:
map[Output:commit 7c349b4f2a603202fb8c363bd2774a22ac2fddf3
Author: Takashi Iwai <tiwai@suse.de>
Date:   Tue May 26 17:28:41 2026 +0200

    ALSA: seq: oss: Fix UAF at handling events with embedded SysEx data
    
    The OSS sequencer processes the input MIDI bytes into a sequencer
    event to be dispatched later (in snd_seq_oss_midi_putc() called from
    snd_seq_oss_process_event()).  When it's a SysEx data, the event
    record contains data.ext.ptr pointer to the original SysEx bytes, and
    the referred data is copied into the pool afterwards at dispatching.
    The problem is that, if the sequencer port gets closed concurrently
    before the dispatch, the OSS sequencer core also releases the
    resources (in snd_seq_oss_midi_check_exit_port()), while the pending
    event may hold a stale pointer, eventually leading to a UAF at a later
    dispatch.
    
    Fortunately, there is already a refcounting mechanism (snd_use_lock_t)
    for the OSS MIDI device access, and for addressing the issue above, we
    just need to extend the refcount until the event gets dispatched.
    
    This patch extends snd_seq_oss_process_event() to give back the
    refcount object, which is in turn released after calling the sequencer
    dispatcher with the given event in the caller side.
    
    According to the original report, KASAN report as below:
    
    KASAN slab-use-after-free in snd_seq_event_dup+0x40c/0x470
    RIP: 0033:0x7f2cb66a6340
    Read of size 6
    Call trace:
      dump_stack_lvl+0x73/0xb0 (?:?)
      print_report+0xd1/0x650 (?:?)
      srso_alias_return_thunk+0x5/0xfbef5 (?:?)
      __virt_addr_valid+0x1a7/0x340 (?:?)
      kasan_complete_mode_report_info+0x64/0x200 (?:?)
      kasan_report+0xf7/0x130 (?:?)
      snd_seq_event_dup+0x40c/0x470 (?:?)
      kasan_check_range+0x10c/0x1c0 (?:?)
      __asan_memcpy+0x27/0x70 (?:?)
      snd_seq_event_dup+0x9/0x470 (?:?)
      snd_seq_client_enqueue_event+0x139/0x240 (?:?)
      _raw_spin_unlock_irqrestore+0x4b/0x60 (?:?)
      snd_seq_kernel_client_enqueue+0x102/0x120 (?:?)
      snd_seq_oss_write+0x416/0x4e0 (?:?)
      apparmor_file_permission+0x20/0x30 (?:?)
      odev_write+0x3b/0x60 (?:?)
      vfs_write+0x1ce/0x850 (?:?)
      lock_release+0xc8/0x2a0 (?:?)
      __kasan_check_write+0x18/0x20 (?:?)
      __mutex_unlock_slowpath+0x129/0x510 (?:?)
      ksys_write+0xe1/0x180 (?:?)
      mutex_unlock+0x16/0x20 (?:?)
      odev_ioctl+0x65/0xc0 (?:?)
      __x64_sys_write+0x46/0x60 (?:?)
      x64_sys_call+0x7d/0x20d0 (?:?)
      do_syscall_64+0xc1/0x360 (arch/x86/entry/syscall_64.c:87)
      entry_SYSCALL_64_after_hwframe+0x77/0x7f (?:?)
    
    Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
    Reported-and-tested-by: Zhang Cen <rollkingzzc@gmail.com>
    Closes: https://lore.kernel.org/20260521233900.478153-1-rollkingzzc@gmail.com
    Link: https://patch.msgid.link/20260526152843.617503-1-tiwai@suse.de
    Signed-off-by: Takashi Iwai <tiwai@suse.de>

diff --git a/sound/core/seq/oss/seq_oss_event.c b/sound/core/seq/oss/seq_oss_event.c
index 76fb81077eef..122735862044 100644
--- a/sound/core/seq/oss/seq_oss_event.c
+++ b/sound/core/seq/oss/seq_oss_event.c
@@ -39,8 +39,10 @@ static int set_echo_event(struct seq_oss_devinfo *dp, union evrec *rec, struct s
  */
 
 int
-snd_seq_oss_process_event(struct seq_oss_devinfo *dp, union evrec *q, struct snd_seq_event *ev)
+snd_seq_oss_process_event(struct seq_oss_devinfo *dp, union evrec *q,
+			  struct snd_seq_event *ev, snd_use_lock_t **lockp)
 {
+	*lockp = NULL;
 	switch (q->s.code) {
 	case SEQ_EXTENDED:
 		return extended_event(dp, q, ev);
@@ -69,7 +71,7 @@ snd_seq_oss_process_event(struct seq_oss_devinfo *dp, union evrec *q, struct snd
 		if (snd_seq_oss_midi_open(dp, q->s.dev, SNDRV_SEQ_OSS_FILE_WRITE))
 			break;
 		if (snd_seq_oss_midi_filemode(dp, q->s.dev) & SNDRV_SEQ_OSS_FILE_WRITE)
-			return snd_seq_oss_midi_putc(dp, q->s.dev, q->s.parm1, ev);
+			return snd_seq_oss_midi_putc(dp, q->s.dev, q->s.parm1, ev, lockp);
 		break;
 
 	case SEQ_ECHO:
diff --git a/sound/core/seq/oss/seq_oss_event.h b/sound/core/seq/oss/seq_oss_event.h
index b4f723949a17..a4524e51d0e9 100644
--- a/sound/core/seq/oss/seq_oss_event.h
+++ b/sound/core/seq/oss/seq_oss_event.h
@@ -91,7 +91,8 @@ union evrec {
 #define ev_is_long(ev) ((ev)->s.code >= 128)
 #define ev_length(ev) ((ev)->s.code >= 128 ? LONG_EVENT_SIZE : SHORT_EVENT_SIZE)
 
-int snd_seq_oss_process_event(struct seq_oss_devinfo *dp, union evrec *q, struct snd_seq_event *ev);
+int snd_seq_oss_process_event(struct seq_oss_devinfo *dp, union evrec *q,
+			      struct snd_seq_event *ev, snd_use_lock_t **lockp);
 int snd_seq_oss_process_timer_event(struct seq_oss_timer *rec, union evrec *q);
 int snd_seq_oss_event_input(struct snd_seq_event *ev, int direct, void *private_data, int atomic, int hop);
 
diff --git a/sound/core/seq/oss/seq_oss_ioctl.c b/sound/core/seq/oss/seq_oss_ioctl.c
index ccf682689ec9..ce7a69d52b30 100644
--- a/sound/core/seq/oss/seq_oss_ioctl.c
+++ b/sound/core/seq/oss/seq_oss_ioctl.c
@@ -45,14 +45,17 @@ static int snd_seq_oss_oob_user(struct seq_oss_devinfo *dp, void __user *arg)
 {
 	unsigned char ev[8];
 	struct snd_seq_event tmpev;
+	snd_use_lock_t *lock = NULL;
 
 	if (copy_from_user(ev, arg, 8))
 		return -EFAULT;
 	memset(&tmpev, 0, sizeof(tmpev));
 	snd_seq_oss_fill_addr(dp, &tmpev, dp->addr.client, dp->addr.port);
 	tmpev.time.tick = 0;
-	if (! snd_seq_oss_process_event(dp, (union evrec *)ev, &tmpev)) {
+	if (!snd_seq_oss_process_event(dp, (union evrec *)ev, &tmpev, &lock)) {
 		snd_seq_oss_dispatch(dp, &tmpev, 0, 0);
+		if (lock)
+			snd_use_lock_free(lock);
 	}
 	return 0;
 }
diff --git a/sound/core/seq/oss/seq_oss_midi.c b/sound/core/seq/oss/seq_oss_midi.c
index b50a49ca42ff..70f94df65144 100644
--- a/sound/core/seq/oss/seq_oss_midi.c
+++ b/sound/core/seq/oss/seq_oss_midi.c
@@ -593,7 +593,8 @@ send_midi_event(struct seq_oss_devinfo *dp, struct snd_seq_event *ev, struct seq
  *        non-zero : invalid - ignored
  */
 int
-snd_seq_oss_midi_putc(struct seq_oss_devinfo *dp, int dev, unsigned char c, struct snd_seq_event *ev)
+snd_seq_oss_midi_putc(struct seq_oss_devinfo *dp, int dev, unsigned char c,
+		      struct snd_seq_event *ev, snd_use_lock_t **lockp)
 {
 	struct seq_oss_midi *mdev __free(seq_oss_midi) =
 		get_mididev(dp, dev);
@@ -602,6 +603,9 @@ snd_seq_oss_midi_putc(struct seq_oss_devinfo *dp, int dev, unsigned char c, stru
 		return -ENODEV;
 	if (snd_midi_event_encode_byte(mdev->coder, c, ev)) {
 		snd_seq_oss_fill_addr(dp, ev, mdev->client, mdev->port);
+		/* the caller must release this later */
+		*lockp = &mdev->use_lock;
+		snd_use_lock_use(*lockp);
 		return 0;
 	}
 	return -EINVAL;
diff --git a/sound/core/seq/oss/seq_oss_midi.h b/sound/core/seq/oss/seq_oss_midi.h
index bcc1683773df..4819d4170bf6 100644
--- a/sound/core/seq/oss/seq_oss_midi.h
+++ b/sound/core/seq/oss/seq_oss_midi.h
@@ -26,7 +26,7 @@ void snd_seq_oss_midi_open_all(struct seq_oss_devinfo *dp, int file_mode);
 int snd_seq_oss_midi_close(struct seq_oss_devinfo *dp, int dev);
 void snd_seq_oss_midi_reset(struct seq_oss_devinfo *dp, int dev);
 int snd_seq_oss_midi_putc(struct seq_oss_devinfo *dp, int dev, unsigned char c,
-			  struct snd_seq_event *ev);
+			  struct snd_seq_event *ev, snd_use_lock_t **lockp);
 int snd_seq_oss_midi_input(struct snd_seq_event *ev, int direct, void *private);
 int snd_seq_oss_midi_filemode(struct seq_oss_devinfo *dp, int dev);
 int snd_seq_oss_midi_make_info(struct seq_oss_devinfo *dp, int dev, struct midi_info *inf);
diff --git a/sound/core/seq/oss/seq_oss_rw.c b/sound/core/seq/oss/seq_oss_rw.c
index 307ef98c44c7..111c792bc72c 100644
--- a/sound/core/seq/oss/seq_oss_rw.c
+++ b/sound/core/seq/oss/seq_oss_rw.c
@@ -153,6 +153,7 @@ insert_queue(struct seq_oss_devinfo *dp, union evrec *rec, struct file *opt)
 {
 	int rc = 0;
 	struct snd_seq_event event;
+	snd_use_lock_t *lock = NULL;
 
 	/* if this is a timing event, process the current time */
 	if (snd_seq_oss_process_timer_event(dp->timer, rec))
@@ -164,7 +165,7 @@ insert_queue(struct seq_oss_devinfo *dp, union evrec *rec, struct file *opt)
 	event.type = SNDRV_SEQ_EVENT_NOTEOFF;
 	snd_seq_oss_fill_addr(dp, &event, dp->addr.client, dp->addr.port);
 
-	if (snd_seq_oss_process_event(dp, rec, &event))
+	if (snd_seq_oss_process_event(dp, rec, &event, &lock))
 		return 0; /* invalid event - no need to insert queue */
 
 	event.time.tick = snd_seq_oss_timer_cur_tick(dp->timer);
@@ -173,6 +174,8 @@ insert_queue(struct seq_oss_devinfo *dp, union evrec *rec, struct file *opt)
 	else
 		rc = snd_seq_kernel_client_enqueue(dp->cseq, &event, opt,
 						   !is_nonblock_mode(dp->file_mode));
+	if (lock)
+		snd_use_lock_free(lock);
 	return rc;
 }
 		
]

78/2 2026/08/13 19:08 llm history-explorer
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 24113
							output: 26
							thoughts: 58
						

Thoughts:
Okay, here's my take on those thoughts, tailored for an expert audience, presented in the first person:

**Addressing the Refcount and Stale Pointers in Event Dispatch**

Alright, I see what's happening here. The core issue is that the refcount needs to be *extended* until the event actually gets dispatched. The reason, of course, is that the event itself is holding onto a potentially stale pointer. That's a classic race condition scenario, if I'm understanding this correctly. We're in danger of the underlying object being freed prematurely before the event can properly process it. The implication is an object might be used after it is freed - a classic double free bug.

To ground this further, I should verify the context by looking at a specific commit. Let me check commit `88fe2e365872` from ALSA – focusing on the `snd_pcm_drain()` function in linked streams, looking at how the wait queue list corruption was fixed. That should be illuminating and help flesh out the full story here. I'm expecting to see something that addresses the pointer lifecycle and refcounting specifically within the PCM framework's drain mechanism, likely linked to stream management.



79/2 2026/08/13 19:08 tool git-show
0m Args:
map[Commit:88fe2e365872]

Results:
map[Output:commit 88fe2e3658726cb21ff2dcf9770bf672f9b9d31b
Author: Ji'an Zhou <eilaimemedsnaimel@gmail.com>
Date:   Thu Jun 4 14:25:59 2026 +0000

    ALSA: PCM: Fix wait queue list corruption in snd_pcm_drain() on linked streams
    
    snd_pcm_drain() uses init_waitqueue_entry which does not clear
    entry.prev/next, and add_wait_queue with a conditional
    remove_wait_queue that is skipped when to_check is no longer
    in the group after concurrent UNLINK.  The orphaned wait entry
    remains on the unlinked substream sleep queue.  On the next
    drain iteration, add_wait_queue adds the entry to a new queue
    while still linked on the old one, corrupting both lists.  A
    subsequent wake_up dereferences NULL at the func pointer
    (mapped from the spinlock at offset 0 of the misinterpreted
    wait_queue_head_t), causing a kernel panic.
    
    Replace init_waitqueue_entry/add_wait_queue/conditional
    remove_wait_queue with init_wait_entry/prepare_to_wait/
    finish_wait.  init_wait_entry clears prev/next via
    INIT_LIST_HEAD on each iteration and sets
    autoremove_wake_function which auto-removes the entry on
    wake-up.  finish_wait safely handles both the already-removed
    and still-queued cases.
    
    Fixes: 9b1dbd69ba6f ("ALSA: pcm: fix use-after-free on linked stream runtime in snd_pcm_drain")
    Signed-off-by: Ji'an Zhou <eilaimemedsnaimel@gmail.com>
    Link: https://patch.msgid.link/20260604142559.3840881-1-eilaimemedsnaimel@gmail.com
    Signed-off-by: Takashi Iwai <tiwai@suse.de>

diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c
index a541bb235cfa..302643c1c192 100644
--- a/sound/core/pcm_native.c
+++ b/sound/core/pcm_native.c
@@ -2199,9 +2199,8 @@ static int snd_pcm_drain(struct snd_pcm_substream *substream,
 		drain_no_period_wakeup = to_check->no_period_wakeup;
 		drain_rate = to_check->rate;
 		drain_bufsz = to_check->buffer_size;
-		init_waitqueue_entry(&wait, current);
-		set_current_state(TASK_INTERRUPTIBLE);
-		add_wait_queue(&to_check->sleep, &wait);
+		init_wait_entry(&wait, 0);
+		prepare_to_wait(&to_check->sleep, &wait, TASK_INTERRUPTIBLE);
 		snd_pcm_stream_unlock_irq(substream);
 		if (drain_no_period_wakeup)
 			tout = MAX_SCHEDULE_TIMEOUT;
@@ -2219,7 +2218,7 @@ static int snd_pcm_drain(struct snd_pcm_substream *substream,
 		group = snd_pcm_stream_group_ref(substream);
 		snd_pcm_group_for_each_entry(s, substream) {
 			if (s->runtime == to_check) {
-				remove_wait_queue(&to_check->sleep, &wait);
+				finish_wait(&to_check->sleep, &wait);
 				break;
 			}
 		}
]

80/2 2026/08/13 19:08 llm history-explorer
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 25417
							output: 40
							thoughts: 201
						

Thoughts:
**Analyzing the ALSA Core Memory Safety Fix**

Okay, so I'm looking at this pattern, and it's pretty clear what's happening. The core issue is this race condition: we're accessing a piece of data after a call that could potentially free the memory associated with it. Specifically, `snd_card_do_free()` touches `card->managed` *after* calling `complete(card->release_completion)`. The `complete()` call signals the unbind thread, and that thread then triggers the `card`'s memory to be freed via devres. Thus, `card` can be invalid as soon as `complete()` returns.

The fix, as I understand it, hinges on caching. We need to grab `card->managed` into a local variable before the danger point – before the call to `complete()`. Then, we can safely use that cached value after the call because even if `card` is freed, the local variable is safe. Alternatively, we could protect access to `card->managed` using a mutex or a reference counter.

I want to see if we've addressed this type of problem elsewhere in the ALSA core. I'll search through `sound/core/` for similar "cache" or "local variable" patterns. It's a good bet we've tackled this before. Looking at past fixes could give us some more insights.



81/2 2026/08/13 19:08 tool git-log
0m Args:
map[Count:20 MessageRegexps:[cache] PathPrefix:sound/core/ Since:3 years]

Results:
map[Output:9b1dbd69ba6f ALSA: pcm: fix use-after-free on linked stream runtime in snd_pcm_drain()
]

82/2 2026/08/13 19:08 llm history-explorer
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 25999
							output: 41
							thoughts: 9
						

Thoughts:
Okay, here's my attempt at summarizing that thought process, tailored for an expert audience:

**Local Variable Search Strategy**

Alright, the initial prompt suggests focusing on "local variable." That's a pretty broad term, but it points me in the right direction. My immediate thought is, depending on the context, there could be a lot of nuances in what we're looking for, or searching for. I need to figure out what kind of system or language we are thinking about. Is this C++, Python, JavaScript, assembly, or something else entirely? The definition and implications of a "local variable" are *highly* context-dependent.

So, I'm thinking I'll start with a general search, maybe across a few different languages to get a feel for what the common threads are. Then, I can refine it based on what I find and my existing understanding. I'll need to remember to look beyond just the literal term itself and think about related concepts like scope, stack frames, memory allocation, and lifetime. I'm already anticipating needing to filter out results that are too basic and hone in on more complex topics related to optimization, debugging, and potential issues like shadowing or unintended side effects. "Local variable" is a gateway term, not the end destination. The search is just the beginning.



83/2 2026/08/13 19:08 tool git-log
0m Args:
map[Count:20 MessageRegexps:[local variable] PathPrefix:sound/core/ Since:3 years]

Results:
map[Output:032322b44c02 ALSA: pcm: oss: use proper stream lock for runtime->state access
9b1dbd69ba6f ALSA: pcm: fix use-after-free on linked stream runtime in snd_pcm_drain()
]

84/2 2026/08/13 19:08 llm history-explorer
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 26399
							output: 27
							thoughts: 35
						

Thoughts:
Okay, let's dive into this commit, `032322b44c02 ALSA: pcm: oss: use proper stream lock for runtime->state access`.

**My Initial Assessment**

Right off the bat, I see "ALSA" and "pcm: oss," so I know we're talking about the Advanced Linux Sound Architecture, specifically its compatibility layer for the older OSS (Open Sound System) API. This immediately tells me we're likely dealing with some legacy code and potential concurrency issues. The phrase "use proper stream lock" is the key here. This suggests there's a problem with how the `runtime->state` is being accessed in a multi-threaded environment. I'm already anticipating a race condition, probably with `snd_pcm_stream` or similar. I expect it's about making sure modifications to the state happen atomically.
I can anticipate this likely involves audio streaming and playback from an OSS application through an ALSA driver.

I'm betting this is a critical fix, because a faulty audio stream lock can result in intermittent glitches, corruption, or crashes. So, I need to understand what's been changed, what the old locking mechanism was, and how this new "proper stream lock" works. I want to see if this is an existing bug, or a regression that was noticed in testing. Now, let's see what the commit itself tells us.



85/2 2026/08/13 19:08 tool git-show
0m Args:
map[Commit:032322b44c02]

Results:
map[Output:commit 032322b44c02f5e8a127d1dca6798f91cc72eb1d
Author: Cen Zhang <zzzccc427@gmail.com>
Date:   Mon Mar 16 16:50:47 2026 +0800

    ALSA: pcm: oss: use proper stream lock for runtime->state access
    
    __snd_pcm_set_state() writes runtime->state under the PCM stream lock.
    However, the OSS I/O functions snd_pcm_oss_write3(), snd_pcm_oss_read3(),
    snd_pcm_oss_writev3() and snd_pcm_oss_readv3() read runtime->state
    without holding the stream lock, only holding oss.params_lock (a
    different mutex that does not synchronize with the stream lock).
    
    Since __snd_pcm_set_state() is called from IRQ context (e.g.,
    snd_pcm_period_elapsed -> snd_pcm_update_state -> __snd_pcm_xrun ->
    snd_pcm_stop -> snd_pcm_post_stop) while the OSS read/write paths
    run in process context, these are concurrent accesses that constitute
    a data race.
    
    Rather than using READ_ONCE()/WRITE_ONCE() barriers, introduce a
    snd_pcm_get_state() helper that reads runtime->state under the stream
    lock, matching the locking discipline used elsewhere in the PCM layer.
    Also export snd_pcm_set_state() for completeness.
    
    Use snd_pcm_get_state() in all four OSS I/O functions, caching the
    result in a local variable where the same snapshot is used for
    multiple comparisons to avoid taking the lock repeatedly.
    
    Signed-off-by: Cen Zhang <zzzccc427@gmail.com>
    Link: https://patch.msgid.link/20260316085047.2876451-1-zzzccc427@gmail.com
    Signed-off-by: Takashi Iwai <tiwai@suse.de>

diff --git a/include/sound/pcm.h b/include/sound/pcm.h
index a7860c047503..76fc33dce537 100644
--- a/include/sound/pcm.h
+++ b/include/sound/pcm.h
@@ -729,6 +729,10 @@ static inline void __snd_pcm_set_state(struct snd_pcm_runtime *runtime,
 	runtime->status->state = state; /* copy for mmap */
 }
 
+void snd_pcm_set_state(struct snd_pcm_substream *substream,
+		       snd_pcm_state_t state);
+snd_pcm_state_t snd_pcm_get_state(struct snd_pcm_substream *substream);
+
 /**
  * bytes_to_samples - Unit conversion of the size from bytes to samples
  * @runtime: PCM runtime instance
diff --git a/sound/core/oss/pcm_oss.c b/sound/core/oss/pcm_oss.c
index d4fd4dfc7fc3..a140a0d9abb8 100644
--- a/sound/core/oss/pcm_oss.c
+++ b/sound/core/oss/pcm_oss.c
@@ -1227,14 +1227,16 @@ static int snd_pcm_oss_capture_position_fixup(struct snd_pcm_substream *substrea
 snd_pcm_sframes_t snd_pcm_oss_write3(struct snd_pcm_substream *substream, const char *ptr, snd_pcm_uframes_t frames, int in_kernel)
 {
 	struct snd_pcm_runtime *runtime = substream->runtime;
+	snd_pcm_state_t state;
 	int ret;
 	while (1) {
-		if (runtime->state == SNDRV_PCM_STATE_XRUN ||
-		    runtime->state == SNDRV_PCM_STATE_SUSPENDED) {
+		state = snd_pcm_get_state(substream);
+		if (state == SNDRV_PCM_STATE_XRUN ||
+		    state == SNDRV_PCM_STATE_SUSPENDED) {
 #ifdef OSS_DEBUG
 			pcm_dbg(substream->pcm,
 				"pcm_oss: write: recovering from %s\n",
-				runtime->state == SNDRV_PCM_STATE_XRUN ?
+				state == SNDRV_PCM_STATE_XRUN ?
 				"XRUN" : "SUSPEND");
 #endif
 			ret = snd_pcm_oss_prepare(substream);
@@ -1249,7 +1251,7 @@ snd_pcm_sframes_t snd_pcm_oss_write3(struct snd_pcm_substream *substream, const
 			break;
 		/* test, if we can't store new data, because the stream */
 		/* has not been started */
-		if (runtime->state == SNDRV_PCM_STATE_PREPARED)
+		if (snd_pcm_get_state(substream) == SNDRV_PCM_STATE_PREPARED)
 			return -EAGAIN;
 	}
 	return ret;
@@ -1259,20 +1261,22 @@ snd_pcm_sframes_t snd_pcm_oss_read3(struct snd_pcm_substream *substream, char *p
 {
 	struct snd_pcm_runtime *runtime = substream->runtime;
 	snd_pcm_sframes_t delay;
+	snd_pcm_state_t state;
 	int ret;
 	while (1) {
-		if (runtime->state == SNDRV_PCM_STATE_XRUN ||
-		    runtime->state == SNDRV_PCM_STATE_SUSPENDED) {
+		state = snd_pcm_get_state(substream);
+		if (state == SNDRV_PCM_STATE_XRUN ||
+		    state == SNDRV_PCM_STATE_SUSPENDED) {
 #ifdef OSS_DEBUG
 			pcm_dbg(substream->pcm,
 				"pcm_oss: read: recovering from %s\n",
-				runtime->state == SNDRV_PCM_STATE_XRUN ?
+				state == SNDRV_PCM_STATE_XRUN ?
 				"XRUN" : "SUSPEND");
 #endif
 			ret = snd_pcm_kernel_ioctl(substream, SNDRV_PCM_IOCTL_DRAIN, NULL);
 			if (ret < 0)
 				break;
-		} else if (runtime->state == SNDRV_PCM_STATE_SETUP) {
+		} else if (state == SNDRV_PCM_STATE_SETUP) {
 			ret = snd_pcm_oss_prepare(substream);
 			if (ret < 0)
 				break;
@@ -1285,7 +1289,7 @@ snd_pcm_sframes_t snd_pcm_oss_read3(struct snd_pcm_substream *substream, char *p
 					 frames, in_kernel);
 		mutex_lock(&runtime->oss.params_lock);
 		if (ret == -EPIPE) {
-			if (runtime->state == SNDRV_PCM_STATE_DRAINING) {
+			if (snd_pcm_get_state(substream) == SNDRV_PCM_STATE_DRAINING) {
 				ret = snd_pcm_kernel_ioctl(substream, SNDRV_PCM_IOCTL_DROP, NULL);
 				if (ret < 0)
 					break;
@@ -1301,15 +1305,16 @@ snd_pcm_sframes_t snd_pcm_oss_read3(struct snd_pcm_substream *substream, char *p
 #ifdef CONFIG_SND_PCM_OSS_PLUGINS
 snd_pcm_sframes_t snd_pcm_oss_writev3(struct snd_pcm_substream *substream, void **bufs, snd_pcm_uframes_t frames)
 {
-	struct snd_pcm_runtime *runtime = substream->runtime;
+	snd_pcm_state_t state;
 	int ret;
 	while (1) {
-		if (runtime->state == SNDRV_PCM_STATE_XRUN ||
-		    runtime->state == SNDRV_PCM_STATE_SUSPENDED) {
+		state = snd_pcm_get_state(substream);
+		if (state == SNDRV_PCM_STATE_XRUN ||
+		    state == SNDRV_PCM_STATE_SUSPENDED) {
 #ifdef OSS_DEBUG
 			pcm_dbg(substream->pcm,
 				"pcm_oss: writev: recovering from %s\n",
-				runtime->state == SNDRV_PCM_STATE_XRUN ?
+				state == SNDRV_PCM_STATE_XRUN ?
 				"XRUN" : "SUSPEND");
 #endif
 			ret = snd_pcm_oss_prepare(substream);
@@ -1322,7 +1327,7 @@ snd_pcm_sframes_t snd_pcm_oss_writev3(struct snd_pcm_substream *substream, void
 
 		/* test, if we can't store new data, because the stream */
 		/* has not been started */
-		if (runtime->state == SNDRV_PCM_STATE_PREPARED)
+		if (snd_pcm_get_state(substream) == SNDRV_PCM_STATE_PREPARED)
 			return -EAGAIN;
 	}
 	return ret;
@@ -1330,21 +1335,22 @@ snd_pcm_sframes_t snd_pcm_oss_writev3(struct snd_pcm_substream *substream, void
 	
 snd_pcm_sframes_t snd_pcm_oss_readv3(struct snd_pcm_substream *substream, void **bufs, snd_pcm_uframes_t frames)
 {
-	struct snd_pcm_runtime *runtime = substream->runtime;
+	snd_pcm_state_t state;
 	int ret;
 	while (1) {
-		if (runtime->state == SNDRV_PCM_STATE_XRUN ||
-		    runtime->state == SNDRV_PCM_STATE_SUSPENDED) {
+		state = snd_pcm_get_state(substream);
+		if (state == SNDRV_PCM_STATE_XRUN ||
+		    state == SNDRV_PCM_STATE_SUSPENDED) {
 #ifdef OSS_DEBUG
 			pcm_dbg(substream->pcm,
 				"pcm_oss: readv: recovering from %s\n",
-				runtime->state == SNDRV_PCM_STATE_XRUN ?
+				state == SNDRV_PCM_STATE_XRUN ?
 				"XRUN" : "SUSPEND");
 #endif
 			ret = snd_pcm_kernel_ioctl(substream, SNDRV_PCM_IOCTL_DRAIN, NULL);
 			if (ret < 0)
 				break;
-		} else if (runtime->state == SNDRV_PCM_STATE_SETUP) {
+		} else if (state == SNDRV_PCM_STATE_SETUP) {
 			ret = snd_pcm_oss_prepare(substream);
 			if (ret < 0)
 				break;
diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c
index 67cf6a0e17ba..394f86bc4d29 100644
--- a/sound/core/pcm_native.c
+++ b/sound/core/pcm_native.c
@@ -618,13 +618,32 @@ static int period_to_usecs(struct snd_pcm_runtime *runtime)
 	return usecs;
 }
 
-static void snd_pcm_set_state(struct snd_pcm_substream *substream,
-			      snd_pcm_state_t state)
+/**
+ * snd_pcm_set_state - Set the PCM runtime state with stream lock
+ * @substream: PCM substream
+ * @state: state to set
+ */
+void snd_pcm_set_state(struct snd_pcm_substream *substream,
+		       snd_pcm_state_t state)
 {
 	guard(pcm_stream_lock_irq)(substream);
 	if (substream->runtime->state != SNDRV_PCM_STATE_DISCONNECTED)
 		__snd_pcm_set_state(substream->runtime, state);
 }
+EXPORT_SYMBOL_GPL(snd_pcm_set_state);
+
+/**
+ * snd_pcm_get_state - Read the PCM runtime state with stream lock
+ * @substream: PCM substream
+ *
+ * Return: the current PCM state
+ */
+snd_pcm_state_t snd_pcm_get_state(struct snd_pcm_substream *substream)
+{
+	guard(pcm_stream_lock_irqsave)(substream);
+	return substream->runtime->state;
+}
+EXPORT_SYMBOL_GPL(snd_pcm_get_state);
 
 static inline void snd_pcm_timer_notify(struct snd_pcm_substream *substream,
 					int event)
]

86/2 2026/08/13 19:08 llm history-explorer
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 30044
							output: 44
							thoughts: 172
						

Thoughts:
**Analyzing a Critical Fix in ALSA Core**

Okay, so I see this commit is dealing with potential use-after-free (UAF) or data race bugs, which are always a headache in kernel code. The fix here is a classic pattern in the ALSA core, which is something I've definitely encountered before, so I'm familiar with this approach:

1.  **Cache Key Fields:** First, grab the necessary information from the object into local variables. This has to be done *before* the object gets freed, or while holding a lock if it's a multithreaded situation. The goal is to prevent the data from disappearing underneath us.
2.  **Use Cached Data:** Then we safely use these local copies after we've released the lock, or after the object *could* have been freed. It's a fundamental defensive programming technique.

In this particular instance, we're looking at `snd_card_do_free()`. The real problem is that `card` can be immediately freed by `devres` as soon as `complete(card->release_completion)` is called.  This is a big red flag – we've got a window where the object *might* be gone!

The fix is straightforward, but critical. We're going to cache `card->managed` into a local variable *before* we call `complete()`. That guarantees we have a safe copy of the data, and we can then use this cached value after the `complete()` call. This avoids a nasty race condition where `card` is freed before we can read the `managed` flag.

Given this fix, I should also perform a deeper inspection of the `sound/core/init.c` file to check for any similar instances of this pattern. It is not uncommon to find similar vulnerabilities. It's good practice to do a quick sweep for related potential problems.



87/2 2026/08/13 19:09 tool git-log
0m Args:
map[Count:20 MessageRegexps:[race] PathPrefix:sound/core/init.c Since:10 years]

Results:
map[Output:84446536f63d ALSA: control: Verify put() result when in debug mode
39381fe7394e ALSA: core: Fix NULL module pointer assignment at card init
da0713fff528 ALSA: core: Remove superfluous CONFIG_PM
742ecf3ce1ac ALSA: core: Use guard() for locking
8c0ae778e287 ALSA: core: Simplify snd_power_ref_and_wait() with the standard macro
abc21649b3e5 ALSA: core: remove redundant spin_lock pair in snd_card_disconnect
2a3f7221acdd ALSA: core: Fix card races between register and disconnect
29b2625ff605 ALSA: info: Move card id proc creation into info.c
]

88/2 2026/08/13 19:09 llm history-explorer
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 30873
							output: 25
							thoughts: 28
						

Thoughts:
Here's my attempt at summarizing the thought process, tailored for an expert audience:

**Analyzing the ALSA Core Fix for Register/Disconnect Race Conditions**

Okay, let's dive into that commit, `2a3f7221acdd ALSA: core: Fix card races between register and disconnect`. It sounds like we're dealing with a classic race condition, which is always fun to debug in kernel land. I immediately start thinking about the potential scenarios: the ALSA card registration process versus its de-registration, and where the overlap could lead to a crash, memory corruption, or device malfunction.

My initial mental checklist includes: Are we talking about a simple lock contention issue, or something more complex like an ordering problem with events or callbacks? Does the commit description provide enough information to understand the vulnerability, or will I need to trace through the relevant kernel code? What's the impact of this? Is this a potential security issue, or just reliability? Any chance it has performance implications? I’m also wondering about the ALSA core's architecture – how is card registration/de-registration handled? What data structures are involved? What lock primitives are used?

I will start by reviewing the commit diff and looking for explicit lock acquisitions, releases, and any potential atomicity issues. I will look for calls to functions like `snd_card_register()` and `snd_card_disconnect()`. Then, I'll need to think about how these calls relate to any interrupt handlers or workqueues. I'll need to figure out where the vulnerability actually manifests. Are we talking about a double-free, a use-after-free, or perhaps a memory leak? Or perhaps data corruption due to an invalid read/write? Hopefully, the commit message provides some insight into the root cause and the fix. I'm keen to see if it's a simple mutex, a spinlock, or a more sophisticated synchronization primitive that's been employed. Finally, I'll compare the changes to the previous and adjacent commits for a proper understanding.



89/2 2026/08/13 19:09 tool git-show
0m Args:
map[Commit:2a3f7221acdd]

Results:
map[Output:commit 2a3f7221acddfe1caa9ff09b3a8158c39b2fdeac
Author: Takashi Iwai <tiwai@suse.de>
Date:   Tue Apr 16 17:06:33 2019 +0200

    ALSA: core: Fix card races between register and disconnect
    
    There is a small race window in the card disconnection code that
    allows the registration of another card with the very same card id.
    This leads to a warning in procfs creation as caught by syzkaller.
    
    The problem is that we delete snd_cards and snd_cards_lock entries at
    the very beginning of the disconnection procedure.  This makes the
    slot available to be assigned for another card object while the
    disconnection procedure is being processed.  Then it becomes possible
    to issue a procfs registration with the existing file name although we
    check the conflict beforehand.
    
    The fix is simply to move the snd_cards and snd_cards_lock clearances
    at the end of the disconnection procedure.  The references to these
    entries are merely either from the global proc files like
    /proc/asound/cards or from the card registration / disconnection, so
    it should be fine to shift at the very end.
    
    Reported-by: syzbot+48df349490c36f9f54ab@syzkaller.appspotmail.com
    Cc: <stable@vger.kernel.org>
    Signed-off-by: Takashi Iwai <tiwai@suse.de>

diff --git a/sound/core/init.c b/sound/core/init.c
index 0c4dc40376a7..079c12d64b0e 100644
--- a/sound/core/init.c
+++ b/sound/core/init.c
@@ -382,14 +382,7 @@ int snd_card_disconnect(struct snd_card *card)
 	card->shutdown = 1;
 	spin_unlock(&card->files_lock);
 
-	/* phase 1: disable fops (user space) operations for ALSA API */
-	mutex_lock(&snd_card_mutex);
-	snd_cards[card->number] = NULL;
-	clear_bit(card->number, snd_cards_lock);
-	mutex_unlock(&snd_card_mutex);
-	
-	/* phase 2: replace file->f_op with special dummy operations */
-	
+	/* replace file->f_op with special dummy operations */
 	spin_lock(&card->files_lock);
 	list_for_each_entry(mfile, &card->files_list, list) {
 		/* it's critical part, use endless loop */
@@ -405,7 +398,7 @@ int snd_card_disconnect(struct snd_card *card)
 	}
 	spin_unlock(&card->files_lock);	
 
-	/* phase 3: notify all connected devices about disconnection */
+	/* notify all connected devices about disconnection */
 	/* at this point, they cannot respond to any calls except release() */
 
 #if IS_ENABLED(CONFIG_SND_MIXER_OSS)
@@ -421,6 +414,13 @@ int snd_card_disconnect(struct snd_card *card)
 		device_del(&card->card_dev);
 		card->registered = false;
 	}
+
+	/* disable fops (user space) operations for ALSA API */
+	mutex_lock(&snd_card_mutex);
+	snd_cards[card->number] = NULL;
+	clear_bit(card->number, snd_cards_lock);
+	mutex_unlock(&snd_card_mutex);
+
 #ifdef CONFIG_PM
 	wake_up(&card->power_sleep);
 #endif
]

90/2 2026/08/13 19:09 llm history-explorer
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 32316
							output: 757
							thoughts: 585
						

Thoughts:
**My Analysis of the Proposed ALSA UAF Fix**

Alright, I've got a good grasp on this bug and the suggested fix. Essentially, we're dealing with a classic Use-After-Free in `snd_card_do_free()`. The root cause is a race condition between the sound card release process and the cleanup triggered by `devres`. Specifically, calling `complete(card->release_completion)` wakes up the unbind thread, which then proceeds to free the `card` memory via `devres`. The problem arises because `snd_card_do_free()` subsequently accesses `card->managed` *after* it's been freed, leading to the UAF.

The solution, which is to cache `card->managed` into a local variable before calling `complete()`, makes perfect sense. This effectively creates a safe copy before the shared memory can be invalidated by the unbind thread.

My next step was to dig into the ALSA core history, looking for precedent. I wanted to see how similar issues, especially UAF and data race bugs, had been tackled previously. I'm pleased to see that this approach of caching fields before releasing a lock or before an object can be freed is well-established.

I found several relevant commits that reinforce this method:

*   The fix for the `snd_pcm_drain()` UAF (`9b1dbd69ba6f`) cached fields like `runtime->no_period_wakeup`, `runtime->rate`, and `runtime->buffer_size` into local variables before releasing the stream lock, because the `runtime` object could be freed concurrently.
*   Another example (`032322b44c02`) fixed a data race by reading `runtime->state` under the stream lock and caching it in a local variable for multiple comparisons.

Interestingly, I also observed other solutions to address the UAF bugs in the ALSA core, such as extending refcounts or using mutexes:

*   Extending the refcount (`snd_use_lock_t`) until the event gets dispatched (`7c349b4f2a60`), which is necessary to prevent a stale pointer from being freed concurrently.
*   Adding a mutex (`register_mutex`) to protect the concurrent ioctl that led to UAF (`053a401b592b`).

Considering the pattern, the proposed caching of `card->managed` seems like a solid, low-overhead solution. It avoids the added complexity of refcounts or mutexes when only a simple boolean or integer value of that memory space is necessary after the synchronization point. It strikes me as a clean and direct approach, entirely in keeping with best practices for handling concurrency in this type of scenario. It's a textbook example of a fix that prioritizes safety without unnecessary performance penalties. I'm confident in endorsing this solution based on these findings.



91/1 2026/08/13 19:09 action kernel-scratch-checkouter
0m Results:
map[KernelScratchSrc:/app/workdir/cache/tmp/tmp1255159718]

92/1 2026/08/13 19:09 loop
44m
93/2 2026/08/13 19:09 iteration 0
44m
94/3 2026/08/13 19:09 agent patch-generator
17m Model:
best-expensive

Instruction:
You are an experienced Linux kernel developer tasked with creating a fix for a kernel bug.
You will be given a crash report, an initial explanation of the root cause done by another
kernel expert, and a summary of how similar bugs were fixed in the past.

Use the codeeditor tool to do code edits.
Note: you will not see your changes when looking at the code using codesearch tools.
Use the patch-diff tool to review the modifications you applied.

Your final reply should contain explanation of what you did in the patch and why
(details not present in the initial explanation of the bug).

Your fix must not just prevent the given crash, but also be the best fix for the underlying
root cause from the software engineering point of view. There can be several ways to fix the
same bug. Consider alternatives, and pick the best one. For example, additional checks may be
added at different locations/functions, it's usually better to place them earlier in the
execution to avoid multiple checks at various locations later.

Frequently the same coding mistake is done in several locations in the source code.
Check if your fix should be extended/applied to similar cases around to fix other similar bugs.
But don't go too wide, don't try to fix problems kernel-wide, fix similar issues
in the same file only.


If you are changing post-conditions of a function, consider all callers of the functions,
and if they need to be updated to handle new post-conditions. For example, if you make
a function that previously never returned a NULL, return NULL, consider if callers
need to be updated to handle NULL return value.



Prefer calling several tools at the same time to save round-trips.

Prompt:
The crash that corresponds to the bug is:

==================================================================
BUG: KASAN: use-after-free in snd_card_do_free sound/core/init.c:604 [inline]
BUG: KASAN: use-after-free in release_card_device+0x1ab/0x1b0 sound/core/init.c:153
Read of size 1 at addr ffff8881912ec909 by task syz-executor130/5857

CPU: 0 UID: 0 PID: 5857 Comm: syz-executor130 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
Call Trace:
 <TASK>
 dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120
 print_address_description+0x55/0x1e0 mm/kasan/report.c:378
 print_report+0x58/0x70 mm/kasan/report.c:482
 kasan_report+0x117/0x150 mm/kasan/report.c:595
 snd_card_do_free sound/core/init.c:604 [inline]
 release_card_device+0x1ab/0x1b0 sound/core/init.c:153
 device_release+0xc4/0x1f0 drivers/base/core.c:-1
 kobject_cleanup lib/kobject.c:689 [inline]
 kobject_release lib/kobject.c:720 [inline]
 kref_put include/linux/kref.h:65 [inline]
 kobject_put+0x222/0x550 lib/kobject.c:737
 snd_card_file_remove+0x331/0x390 sound/core/init.c:1125
 snd_pcm_release+0x12c/0x160 sound/core/pcm_native.c:2986
 __fput+0x418/0xa50 fs/file_table.c:512
 fput_close_sync+0x11f/0x240 fs/file_table.c:617
 __do_sys_close fs/open.c:1511 [inline]
 __se_sys_close fs/open.c:1496 [inline]
 __x64_sys_close+0x7e/0x110 fs/open.c:1496
 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:0x7f87f11782de
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:00007f87f0915118 EFLAGS: 00000246 ORIG_RAX: 0000000000000003
RAX: ffffffffffffffda RBX: 00007f87f09156c0 RCX: 00007f87f11782de
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000008
RBP: 00007f87f11ecd40 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: ffffffffffffffd0
R13: 0000000000000002 R14: 00007ffe50e899e0 R15: 00007ffe50e89ac8
 </TASK>

The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1912ec
flags: 0x57ff00000000000(node=1|zone=2|lastcpupid=0x7ff)
raw: 057ff00000000000 ffffea0007e57308 ffff888138841440 0000000000000000
raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as freed
page last allocated via order 2, migratetype Unmovable, gfp_mask 0x40dc0(GFP_KERNEL|__GFP_ZERO|__GFP_COMP), pid 5852, tgid 5852 (syz-executor130), ts 71488546659, free_ts 71610399401
 set_page_owner include/linux/page_owner.h:32 [inline]
 post_alloc_hook+0x1f9/0x250 mm/page_alloc.c:1859
 prep_new_page mm/page_alloc.c:1867 [inline]
 get_page_from_freelist+0x21fa/0x2270 mm/page_alloc.c:3946
 __alloc_frozen_pages_noprof+0x18d/0x380 mm/page_alloc.c:5304
 alloc_pages_mpol+0x212/0x380 mm/mempolicy.c:2490
 ___kmalloc_large_node+0x4c/0x120 mm/slub.c:5274
 __kmalloc_large_node_noprof+0x18/0x90 mm/slub.c:5305
 __do_kmalloc_node mm/slub.c:5322 [inline]
 __kmalloc_node_track_caller_noprof+0x164/0x730 mm/slub.c:5471
 alloc_dr drivers/base/devres.c:141 [inline]
 __devres_alloc_node+0x4c/0x160 drivers/base/devres.c:189
 snd_devm_card_new+0x84/0x160 sound/core/init.c:235
 loopback_probe+0x150/0x13d0 sound/drivers/aloop.c:1805
 platform_probe+0xf9/0x190 drivers/base/platform.c:1439
 call_driver_probe drivers/base/dd.c:-1 [inline]
 really_probe+0x254/0xae0 drivers/base/dd.c:706
 __driver_probe_device+0x1e8/0x360 drivers/base/dd.c:868
 device_driver_attach+0xe0/0x1d0 drivers/base/dd.c:1203
 bind_store+0x1d0/0x220 drivers/base/bus.c:267
 kernfs_fop_write_iter+0x3a4/0x540 fs/kernfs/file.c:345
page last free pid 5856 tgid 5852 stack trace:
 reset_page_owner include/linux/page_owner.h:25 [inline]
 __free_pages_prepare mm/page_alloc.c:1406 [inline]
 __free_frozen_pages+0xc1e/0xd10 mm/page_alloc.c:2950
 free_node drivers/base/devres.c:50 [inline]
 release_nodes drivers/base/devres.c:547 [inline]
 devres_release_all+0x1ce/0x260 drivers/base/devres.c:576
 device_unbind_cleanup drivers/base/dd.c:597 [inline]
 __device_release_driver drivers/base/dd.c:1354 [inline]
 device_release_driver_internal+0x5d9/0x880 drivers/base/dd.c:1372
 unbind_store+0x1a1/0x1d0 drivers/base/bus.c:244
 kernfs_fop_write_iter+0x3a4/0x540 fs/kernfs/file.c:345
 new_sync_write fs/read_write.c:595 [inline]
 vfs_write+0x612/0xba0 fs/read_write.c:687
 ksys_write+0x150/0x270 fs/read_write.c:739
 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

Memory state around the buggy address:
 ffff8881912ec800: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 ffff8881912ec880: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>ffff8881912ec900: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
                      ^
 ffff8881912ec980: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 ffff8881912eca00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
==================================================================


The explanation of the root cause of the bug is:

An analysis of the crash report and the ALSA core source code reveals a classic Use-After-Free (UAF) caused by a race condition between the sound card release process and the devres (device resource management) cleanup.

### Root Cause Analysis

The bug occurs when a sound card is managed by devres (allocated via `snd_devm_card_new()`). For managed cards, the memory is allocated using `devres_alloc()`, and its release function is set to `__snd_card_release()`, which simply calls `snd_card_free()`.

When the device is unbound (e.g., via sysfs) while a user-space application still holds an open file descriptor to the sound card, the following sequence of events leads to the UAF:

1. **Unbind Thread (PID 5856):** The driver is unbound, triggering `devres_release_all()`. The devres core calls the release callback `__snd_card_release()`, which in turn calls `snd_card_free()`.
2. **Unbind Thread:** `snd_card_free()` calls `snd_card_free_when_closed()`, which drops a reference to the card's device (`card->card_dev`). However, because the user thread still has an open file descriptor, the reference count does not reach zero.
3. **Unbind Thread:** `snd_card_free()` then blocks on `wait_for_completion(&released)`, waiting for all references to be dropped.
4. **User Thread (PID 5857):** The user-space application closes the sound device file descriptor (`sys_close`). `snd_card_file_remove()` drops the final reference to `card->card_dev`.
5. **User Thread:** The reference count reaches zero, invoking the device release callback `release_card_device()`, which calls `snd_card_do_free()`.
6. **User Thread:** `snd_card_do_free()` performs cleanup and calls `complete(card->release_completion)`.
7. **Unbind Thread:** Wakes up from `wait_for_completion()`, returns from `snd_card_free()`, and then returns from `__snd_card_release()`.
8. **Unbind Thread:** The devres core (`release_nodes()`) immediately calls `free_node()`, which frees the memory block containing the `snd_card` structure.
9. **User Thread:** Meanwhile, `snd_card_do_free()` continues execution and evaluates `if (!card->managed)`. It reads the `managed` boolean from the `snd_card` structure that was just freed by the unbind thread, triggering the KASAN Use-After-Free.

### Code Walkthrough

The race condition manifests at the very end of `snd_card_do_free()` in `sound/core/init.c`:

```c
static int snd_card_do_free(struct snd_card *card)
{
	card->releasing = true;
	// ... cleanup ...
	
	if (card->release_completion)
		complete(card->release_completion); // [1] Wakes up the unbind thread
		
	if (!card->managed)                         // [2] UAF: card is freed by devres here
		kfree(card);
	return 0;
}
```
At `[1]`, the `complete()` call unblocks the unbind thread waiting in `snd_card_free()`. The unbind thread immediately proceeds to free the `card` memory via devres. By the time the user thread reaches `[2]`, `card` has already been freed, and reading `card->managed` (a 1-byte read at offset 2257) triggers the KASAN bug.

### Proposed Fix

To fix this, the value of `card->managed` must be read and stored in a local variable *before* calling `complete()`. Once `complete()` is called, the `card` pointer must no longer be dereferenced if it is managed by devres.

```c
static int snd_card_do_free(struct snd_card *card)
{
	bool managed = card->managed; // Cache the value before completion

	card->releasing = true;
	// ... existing cleanup code ...
	
	if (card->release_completion)
		complete(card->release_completion);
		
	if (!managed) // Safely use the cached value
		kfree(card);
		
	return 0;
}
```


Historical context on how similar bugs were fixed in the past:

Based on a review of the ALSA core history over the past few years, the proposed fix of caching the `card->managed` field into a local variable before calling `complete()` perfectly aligns with the established idioms and patterns used to fix similar Use-After-Free (UAF) and data race bugs in this subsystem.

### Historical Context and Similar Fixes

In the ALSA core, when an object can be freed concurrently by another thread (often after dropping a lock or signaling a completion), the standard practice is to cache any necessary fields into local variables *before* the synchronization point, and then use those cached values afterwards. 

Here are notable recent examples of this exact pattern being applied:

1. **`9b1dbd69ba6f` ALSA: pcm: fix use-after-free on linked stream runtime in snd_pcm_drain()**
   * **Root Cause:** In `snd_pcm_drain()`, the code accessed `runtime->no_period_wakeup`, `runtime->rate`, and `runtime->buffer_size` after releasing the stream lock. A concurrent `close()` on a linked stream could free the `runtime` object, leading to a UAF.
   * **Fix Pattern:** The fix cached these three fields into local variables (`drain_no_period_wakeup`, `drain_rate`, `drain_bufsz`) while the lock was still held, and used the cached values after the lock was released.

2. **`032322b44c02` ALSA: pcm: oss: use proper stream lock for runtime->state access**
   * **Root Cause:** OSS I/O functions were reading `runtime->state` without holding the stream lock, racing with IRQ context updates.
   * **Fix Pattern:** The fix introduced a helper to read the state under the lock and cached it in a local variable (`state = snd_pcm_get_state(substream);`). The cached local variable was then safely used for subsequent comparisons without needing to repeatedly take the lock or risk data races.

### Alternative Patterns (Refcounting / Locking)

When the data needed after the synchronization point is more complex than a simple boolean or integer (e.g., a pointer to another structure), ALSA developers typically use refcounting or mutexes. For example:

* **`7c349b4f2a60` ALSA: seq: oss: Fix UAF at handling events with embedded SysEx data:** Fixed a UAF by extending a refcount (`snd_use_lock_t`) until an event was fully dispatched, preventing the underlying OSS MIDI device from being freed concurrently.
* **`053a401b592b` ALSA: timer: Fix UAF at snd_timer_user_params():** Fixed a UAF during concurrent timer ioctls by wrapping the vulnerable code block in a `guard(mutex)(&register_mutex)`.

### Conclusion

For your specific bug in `snd_card_do_free()`, because you only need to evaluate a single boolean flag (`card->managed`) after waking up the devres unbind thread via `complete()`, adding new locks or refcounts would be overkill. 

The proposed strategyβ€”caching `card->managed` into a local variable before the `complete()` callβ€”is the correct, idiomatic approach for the ALSA subsystem. It safely avoids the UAF while keeping the teardown path lockless and efficient, exactly mirroring how the maintainers resolved the `snd_pcm_drain()` UAF.




Reply:
An analysis of the crash report and the ALSA core source code confirms a Use-After-Free (UAF) caused by a race condition between the sound card release process and the devres (device resource management) cleanup.

### Root Cause Analysis

The bug occurs when a sound card is managed by devres (allocated via `snd_devm_card_new()`). For managed cards, the memory is allocated using `devres_alloc()`, and its release function is set to `__snd_card_release()`, which simply calls `snd_card_free()`.

When the device is unbound (e.g., via sysfs) while a user-space application still holds an open file descriptor to the sound card, the following sequence of events leads to the UAF:

1. **Unbind Thread:** The driver is unbound, triggering `devres_release_all()`. The devres core calls the release callback `__snd_card_release()`, which in turn calls `snd_card_free()`.
2. **Unbind Thread:** `snd_card_free()` calls `snd_card_free_when_closed()`, which drops a reference to the card's device (`card->card_dev`). However, because the user thread still has an open file descriptor, the reference count does not reach zero.
3. **Unbind Thread:** `snd_card_free()` then blocks on `wait_for_completion(&released)`, waiting for all references to be dropped.
4. **User Thread:** The user-space application closes the sound device file descriptor (`sys_close`). `snd_card_file_remove()` drops the final reference to `card->card_dev`.
5. **User Thread:** The reference count reaches zero, invoking the device release callback `release_card_device()`, which calls `snd_card_do_free()`.
6. **User Thread:** `snd_card_do_free()` performs cleanup and calls `complete(card->release_completion)`.
7. **Unbind Thread:** Wakes up from `wait_for_completion()`, returns from `snd_card_free()`, and then returns from `__snd_card_release()`.
8. **Unbind Thread:** The devres core (`release_nodes()`) immediately calls `free_node()`, which frees the memory block containing the `snd_card` structure.
9. **User Thread:** Meanwhile, `snd_card_do_free()` continues execution and evaluates `if (!card->managed)`. It reads the `managed` boolean from the `snd_card` structure that was just freed by the unbind thread, triggering the KASAN Use-After-Free.

### Fix

To fix this, the value of `card->managed` must be read and stored in a local variable *before* calling `complete()`. Once `complete()` is called, the `card` pointer must no longer be dereferenced if it is managed by devres.

I have applied the following patch to `sound/core/init.c`:

```diff
--- a/sound/core/init.c
+++ b/sound/core/init.c
@@ -585,6 +585,8 @@ EXPORT_SYMBOL_GPL(snd_card_disconnect_sync);
 
 static int snd_card_do_free(struct snd_card *card)
 {
+	bool managed = card->managed;
+
 	card->releasing = true;
 #if IS_ENABLED(CONFIG_SND_MIXER_OSS)
 	if (snd_mixer_oss_notify_callback)
@@ -602,7 +604,7 @@ static int snd_card_do_free(struct snd_card *card)
 	}
 	if (card->release_completion)
 		complete(card->release_completion);
-	if (!card->managed)
+	if (!managed)
 		kfree(card);
 	return 0;
 }
```

### Additional Checks

I have also checked if there are other places in the ALSA core where a similar use-after-free might happen after calling `complete()`. `snd_card_do_free()` is the only place in the ALSA core (`sound/core/`) where `complete()` is called. `card->release_completion` is the only `struct completion` instance present in ALSA core structures. Therefore, this is a localized issue and the fix is sufficient.

95/4 2026/08/13 19:09 llm patch-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 9003
							output: 35
							thoughts: 213
						

Thoughts:
**Analyzing a Use-After-Free in the ALSA Sound Driver**

Okay, so I've got a tricky one here. The crash report points directly to a use-after-free bug in the `snd_card_do_free` function, specifically within `sound/core/init.c` at line 604. The kernel's KASAN detector flagged this, which is always a good clue. The backtrace shows `snd_card_do_free` called directly, and then `release_card_device` is also implicated.

The crux of the issue, as I see it, is the sequence of operations. It looks like `snd_card_do_free` is accessing `card->managed` *after* calling `complete(card->release_completion)`.  That `complete` call is the key – it signals the unbind thread. This unbind thread, because the card is managed by devres, then proceeds to *free* the `card` memory. And right after that, the user thread, still running `snd_card_do_free`, tries to read `card->managed`, which, of course, is now dangling memory and triggers the UAF.

Time to dive into `sound/core/init.c` and confirm that hypothesis, but the trace seems pretty solid.  I'll be looking closely at the synchronization and memory management around the `card` structure and how it relates to the release process. This is a classic race condition, and the solution will likely involve either stronger synchronization primitives or reordering the operations to prevent the access to the freed memory.  Let's get this fixed.



96/4 2026/08/13 19:09 tool read-file
0m Args:
map[File:sound/core/init.c FirstLine:580 LineCount:50]

Results:
map[Contents: 580:				    list_empty(&card->files_list),
 581:				    card->files_lock);
 582:	}
 583:	EXPORT_SYMBOL_GPL(snd_card_disconnect_sync);
 584:	
 585:	static int snd_card_do_free(struct snd_card *card)
 586:	{
 587:		card->releasing = true;
 588:	#if IS_ENABLED(CONFIG_SND_MIXER_OSS)
 589:		if (snd_mixer_oss_notify_callback)
 590:			snd_mixer_oss_notify_callback(card, SND_MIXER_OSS_NOTIFY_FREE);
 591:	#endif
 592:		snd_device_free_all(card);
 593:		if (card->private_free)
 594:			card->private_free(card);
 595:	#ifdef CONFIG_SND_CTL_DEBUG
 596:		kfree(card->value_buf);
 597:	#endif
 598:		if (snd_info_card_free(card) < 0) {
 599:			dev_warn(card->dev, "unable to free card info\n");
 600:			/* Not fatal error */
 601:		}
 602:		if (card->release_completion)
 603:			complete(card->release_completion);
 604:		if (!card->managed)
 605:			kfree(card);
 606:		return 0;
 607:	}
 608:	
 609:	/**
 610:	 * snd_card_free_when_closed - Disconnect the card, free it later eventually
 611:	 * @card: soundcard structure
 612:	 *
 613:	 * Unlike snd_card_free(), this function doesn't try to release the card
 614:	 * resource immediately, but tries to disconnect at first.  When the card
 615:	 * is still in use, the function returns before freeing the resources.
 616:	 * The card resources will be freed when the refcount gets to zero.
 617:	 *
 618:	 * Return: zero if successful, or a negative error code
 619:	 */
 620:	void snd_card_free_when_closed(struct snd_card *card)
 621:	{
 622:		if (!card)
 623:			return;
 624:	
 625:		snd_card_disconnect(card);
 626:		put_device(&card->card_dev);
 627:		return;
 628:	}
 629:	EXPORT_SYMBOL(snd_card_free_when_closed);
]

97/4 2026/08/13 19:09 llm patch-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 10361
							output: 35
							thoughts: 610
						

Thoughts:
**Analyzing the Proposed `snd_card_do_free` Fix**

Okay, so the initial thought is, this looks like a decent fix. Caching `card->managed` before the completion looks like a smart move to avoid potential use-after-free issues. I need to be absolutely sure, though. Let's dig in. I'm thinking, does anything else touch `card` *after* the `complete()` call? That's the critical point.

Alright, a quick review of `snd_card_do_free` confirms that `card->managed` is the *only* thing accessed post-`complete()`. Good. Now, let's play out the different scenarios.

If `card->managed` is true, we skip the `kfree(card)` call here. The card will be freed elsewhere, probably via devres or an unbind thread, which is likely waiting on `card->release_completion`. That makes sense. The `complete` is intended to signal the unbind thread, which then frees the card.

However, if `card->managed` is false... *that's* the interesting case. If `card->managed` is false, `kfree(card)` *is* called right here. That's a direct, immediate free. So if it's *not* managed, it's freed synchronously here. So there is no race.

Now, I need to confirm my understanding of the implications of `card->managed` and the role of the unbind thread, and how this fix interacts with that logic. Need to confirm that the unbind thread, if present, is always waiting for `card->release_completion` if the card is managed. I'm heading over to look at `snd_card_free` to confirm those details.



98/4 2026/08/13 19:10 tool read-file
0m Args:
map[File:sound/core/init.c FirstLine:631 LineCount:50]

Results:
map[Contents: 631:	/**
 632:	 * snd_card_free - frees given soundcard structure
 633:	 * @card: soundcard structure
 634:	 *
 635:	 * This function releases the soundcard structure and the all assigned
 636:	 * devices automatically.  That is, you don't have to release the devices
 637:	 * by yourself.
 638:	 *
 639:	 * This function waits until the all resources are properly released.
 640:	 *
 641:	 * Return: Zero. Frees all associated devices and frees the control
 642:	 * interface associated to given soundcard.
 643:	 */
 644:	void snd_card_free(struct snd_card *card)
 645:	{
 646:		DECLARE_COMPLETION_ONSTACK(released);
 647:	
 648:		/* The call of snd_card_free() is allowed from various code paths;
 649:		 * a manual call from the driver and the call via devres_free, and
 650:		 * we need to avoid double-free. Moreover, the release via devres
 651:		 * may call snd_card_free() twice due to its nature, we need to have
 652:		 * the check here at the beginning.
 653:		 */
 654:		if (card->releasing)
 655:			return;
 656:	
 657:		card->release_completion = &released;
 658:		snd_card_free_when_closed(card);
 659:	
 660:		/* wait, until all devices are ready for the free operation */
 661:		wait_for_completion(&released);
 662:	}
 663:	EXPORT_SYMBOL(snd_card_free);
 664:	
 665:	/* check, if the character is in the valid ASCII range */
 666:	static inline bool safe_ascii_char(char c)
 667:	{
 668:		return isascii(c) && isalnum(c);
 669:	}
 670:	
 671:	/* retrieve the last word of shortname or longname */
 672:	static const char *retrieve_id_from_card_name(const char *name)
 673:	{
 674:		const char *spos = name;
 675:	
 676:		while (*name) {
 677:			if (isspace(*name) && safe_ascii_char(name[1]))
 678:				spos = name + 1;
 679:			name++;
 680:		}
]

99/4 2026/08/13 19:10 llm patch-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 12123
							output: 39
							thoughts: 50
						

Thoughts:
Okay, here's my interpretation of those thoughts, presented as my own mental process, given my expertise:

**Checking `snd_card_free` and Resource Management**

Right, so `snd_card_free`... that's the one that eventually waits on the `released` flag, ensuring everything is properly cleaned up. Good. Now, what's making me think about that? Oh, right, resource management. Let's see... if `card->managed` is set to `true`, then the sound card was likely allocated using `devres_alloc`. That's the key. That's the indication that the card is handled by the device resource management system. It means the system will automatically handle freeing it on device removal or system shutdown. So, if `managed` is true, then `snd_card_free` is just making sure the release is properly handled by the resource management system and isn't doing any explicit freeing itself. I need to make sure this is properly handled. I should take a closer look at the allocation path. Let me go back to where these cards are allocated... aha, yes, `snd_devm_card_new`. That's where the critical piece of the resource management is happening. That's where to find the answers to fully understand the flow.



100/4 2026/08/13 19:10 tool codesearch-definition-source
0m Args:
map[ContextFile:sound/core/init.c Name:snd_devm_card_new]

Results:
map[SourceCode: 202:	/**
 203:	 * snd_devm_card_new - managed snd_card object creation
 204:	 * @parent: the parent device object
 205:	 * @idx: card index (address) [0 ... (SNDRV_CARDS-1)]
 206:	 * @xid: card identification (ASCII string)
 207:	 * @module: top level module for locking
 208:	 * @extra_size: allocate this extra size after the main soundcard structure
 209:	 * @card_ret: the pointer to store the created card instance
 210:	 *
 211:	 * This function works like snd_card_new() but manages the allocated resource
 212:	 * via devres, i.e. you don't need to free explicitly.
 213:	 *
 214:	 * When a snd_card object is created with this function and registered via
 215:	 * snd_card_register(), the very first devres action to call snd_card_free()
 216:	 * is added automatically.  In that way, the resource disconnection is assured
 217:	 * at first, then released in the expected order.
 218:	 *
 219:	 * If an error happens at the probe before snd_card_register() is called and
 220:	 * there have been other devres resources, you'd need to free the card manually
 221:	 * via snd_card_free() call in the error; otherwise it may lead to UAF due to
 222:	 * devres call orders.  You can use snd_card_free_on_error() helper for
 223:	 * handling it more easily.
 224:	 *
 225:	 * Return: zero if successful, or a negative error code
 226:	 */
 227:	int snd_devm_card_new(struct device *parent, int idx, const char *xid,
 228:			      struct module *module, size_t extra_size,
 229:			      struct snd_card **card_ret)
 230:	{
 231:		struct snd_card *card;
 232:		int err;
 233:	
 234:		*card_ret = NULL;
 235:		card = devres_alloc(__snd_card_release,
 236:				    struct_size(card, private_data_area, extra_size),
 237:				    GFP_KERNEL);
 238:		if (!card)
 239:			return -ENOMEM;
 240:		card->managed = true;
 241:		err = snd_card_init(card, parent, idx, xid, module, extra_size);
 242:		if (err < 0) {
 243:			devres_free(card); /* in managed mode, we need to free manually */
 244:			return err;
 245:		}
 246:	
 247:		devres_add(parent, card);
 248:		*card_ret = card;
 249:		return 0;
 250:	}
 SourceFile:sound/core/init.c]

101/4 2026/08/13 19:10 llm patch-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 13347
							output: 37
							thoughts: 9
						

Thoughts:
Okay, here's my summary, presented as a first-person account, assuming I'm an expert in the field:

**My Deep Dive into `__snd_card_release`**

Alright, let's dissect this. When I think about `__snd_card_release`, I immediately zoom in on the critical aspect: the graceful and controlled dismantling of an audio card's resources within the kernel. It’s not just about freeing memory; it's about systematically undoing all the intricate connections and allocations that the card had established during its lifecycle. I have to consider the cascade of dependencies. What does this mean? It's about ensuring a clean slate before the underlying hardware becomes available for other operations or, heaven forbid, gets physically removed.

I'm thinking about the various components that need to be carefully cleaned up. We’re talking about potentially:

*   **Interrupt Handling:** Disabling and deregistering interrupt handlers is paramount. Leaving an active handler after the card is effectively gone is a recipe for kernel panics or, at the very least, unpredictable behavior.
*   **DMA Channels:** These Direct Memory Access channels require special attention. They might still be active, waiting for some I/O to happen. We'd have to ensure they’re properly quiesced and deallocated to prevent memory corruption or other DMA-related errors.
*   **Device Files:** If there are any device files associated with the card (e.g., `/dev/snd/pcmC0D0p`), we have to make sure those get released and any user-space processes using them are notified appropriately, perhaps through signals.
*   **Memory Management:** The memory that was allocated for buffers, control data, and other card-specific needs must be meticulously freed. This includes both kernel-allocated memory and, if applicable, any mappings to user-space memory. This also includes any potential locking that needs to be released.
*   **Audio Drivers:** Make sure the underlying drivers are un-initialized and de-registered, and any associated cleanup functions are called.
*   **Power Management:** If the card supports power management, this is the time to put it into a low-power state or completely shut it down, but only after making sure all necessary operations are complete.

I also have to keep in mind the potential for race conditions. Multiple threads or processes might be attempting to access or release resources associated with the card simultaneously. That's why careful locking and synchronization are absolutely critical. We need to implement mutexes or spinlocks to ensure that the release process is atomic and that no data corruption happens during the teardown.

I want to be certain that the function is robust and handles errors gracefully. What happens if a resource can't be released? Does it return an error code? Does it attempt to clean up as much as possible and then log a warning? The error handling has to be rigorous and prevent a small failure from cascading into a bigger problem.

Finally, I think about the implications for hotplugging and dynamic device management. A well-designed `__snd_card_release` makes it possible to safely remove and re-add sound cards without crashing the system or leaving it in an unstable state. This is paramount for modern systems, especially laptops and embedded devices.



102/4 2026/08/13 19:10 tool codesearch-definition-source
0m Args:
map[ContextFile:sound/core/init.c Name:__snd_card_release]

Results:
map[SourceCode: 197:	static void __snd_card_release(struct device *dev, void *data)
 198:	{
 199:		snd_card_free(data);
 200:	}
 SourceFile:sound/core/init.c]

103/4 2026/08/13 19:10 llm patch-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 14163
							output: 36
							thoughts: 89
						

Thoughts:
Here's my understanding of the audio card release process, from a low-level perspective:

**Audio Card Release Flow**

Okay, so I'm looking at how this audio card gets released. The critical function here is `__snd_card_release`. It immediately calls `snd_card_free` with the `data` pointer. `snd_card_free` is where things start to get interesting. It sets `card->release_completion = &released;` and then it calls `snd_card_free_when_closed(card)`. This implies that the freeing is somehow asynchronous or dependent on something else completing. Makes sense, because it appears that the card is being "put" into some state. Finally, the function waits for `released`. The implication is that something is going to signal that `released`. What's that?

Ah, I see. My understanding is that when the device's reference count hits zero, `release_card_device` is the function that is ultimately called, completing the card release. This all makes perfect sense now. I can see the locking and synchronization happening.



104/4 2026/08/13 19:10 tool codesearch-definition-source
0m Args:
map[ContextFile:sound/core/init.c Name:release_card_device]

Results:
map[SourceCode: 151:	static void release_card_device(struct device *dev)
 152:	{
 153:		snd_card_do_free(dev_to_snd_card(dev));
 154:	}
 SourceFile:sound/core/init.c]

105/4 2026/08/13 19:10 llm patch-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 14614
							output: 21
							thoughts: 250
						

Thoughts:
**My Analysis of a Potential ALSA Memory Management Bug**

Okay, so I'm looking at this `snd_card_do_free` function in the ALSA sound card code. The problem jumps out immediately. It's calling `complete` on `card->release_completion`, which should signal a waiting process. The code then checks `!card->managed` and potentially frees the `card` structure. The catch? If `card->managed` is *true*, `complete` wakes up `snd_card_free`, that function then returns, and the `card` memory is *then* freed by `devres` (since it was allocated using `devres_alloc`). That means after the `complete()` call but before the `kfree()`, we’re essentially in a race condition. The `snd_card_do_free` function can't safely access `card` after the `complete()` call when the `card` is managed because it will be freed by `devres`. This explains the issue.

The fix, caching `card->managed` before the `complete()` call, seems entirely correct. We need to make sure we're checking its initial value.

Now, I need to be thorough. The `snd_card_do_free` function itself looks clean, but I have to be sure there aren’t other functions in ALSA with a similar pattern. Specifically, are there any other instances where `card` is accessed *after* a `complete(card->release_completion)` call? I need to search the ALSA codebase for instances of `complete(card->release_completion)` or something similar, and ensure that no other critical operations on `card` are performed after the `complete` call but before the memory is released via `devres`. This is a classic race condition and potentially a nasty memory corruption bug, so it’s essential to be exhaustive in my search.



106/4 2026/08/13 19:10 tool grepper
0m Args:
map[Expression:complete\(.*release_completion\)]

Results:
map[Output:sound/core/init.c=585=static int snd_card_do_free(struct snd_card *card)
--
sound/core/init.c-602-	if (card->release_completion)
sound/core/init.c:603:		complete(card->release_completion);
sound/core/init.c-604-	if (!card->managed)
]

107/4 2026/08/13 19:10 llm patch-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 15397
							output: 26
							thoughts: 8
						

Thoughts:
Okay, here's my attempt at summarizing that thought process, keeping in mind I'm speaking to a fellow expert:

**Investigating ALSA Completion Mechanisms**

Hmm, this current ALSA completion implementation is interesting, but I'm not entirely satisfied. It feels like we're just scratching the surface. My mind is already racing, considering the possibilities. We need to go beyond the basics. I'm wondering...what other completion methods are available within the ALSA framework itself? Are there alternative ways to trigger completion events? Does ALSA offer more sophisticated approaches beyond the straightforward ones we are currently using? There has to be a larger landscape of tools within ALSA to consider... Let's dig deeper.



108/4 2026/08/13 19:10 tool grepper
0m Args:
map[Expression:complete\(.*\) PathPrefix:sound/]

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

sound/aoa/soundbus/i2sbus/pcm.c=616=static inline void handle_interrupt(struct i2sbus_dev *i2sdev, int in)
--
sound/aoa/soundbus/i2sbus/pcm.c-676-			if (pi->stop_completion)
sound/aoa/soundbus/i2sbus/pcm.c:677:				complete(pi->stop_completion);
sound/aoa/soundbus/i2sbus/pcm.c-678-		}
--
sound/core/init.c=585=static int snd_card_do_free(struct snd_card *card)
--
sound/core/init.c-602-	if (card->release_completion)
sound/core/init.c:603:		complete(card->release_completion);
sound/core/init.c-604-	if (!card->managed)
--
sound/core/pcm_dmaengine.c=134=EXPORT_SYMBOL_GPL(snd_dmaengine_pcm_set_config_from_dai_data);
sound/core/pcm_dmaengine.c-135-
sound/core/pcm_dmaengine.c:136:static void dmaengine_pcm_dma_complete(void *arg)
sound/core/pcm_dmaengine.c-137-{
--
sound/core/pcm_native.c=2570=static int snd_pcm_hw_constraints_init(struct snd_pcm_substream *substream)
--
sound/core/pcm_native.c-2693-
sound/core/pcm_native.c:2694:static int snd_pcm_hw_constraints_complete(struct snd_pcm_substream *substream)
sound/core/pcm_native.c-2695-{
--
sound/core/pcm_native.c=2806=int snd_pcm_open_substream(struct snd_pcm *pcm, int stream,
--
sound/core/pcm_native.c-2832-
sound/core/pcm_native.c:2833:	err = snd_pcm_hw_constraints_complete(substream);
sound/core/pcm_native.c-2834-	if (err < 0) {
--
sound/firewire/dice/dice-transaction.c=132=static void dice_notification(struct fw_card *card, struct fw_request *request,
--
sound/firewire/dice/dice-transaction.c-157-	if (bits & NOTIFY_CLOCK_ACCEPTED)
sound/firewire/dice/dice-transaction.c:158:		complete(&dice->clock_accepted);
sound/firewire/dice/dice-transaction.c-159-	wake_up(&dice->hwdep_wait);
--
sound/hda/codecs/cirrus/cs8409.c=124=static void cs8409_enable_i2c_clock(struct hda_codec *codec)
--
sound/hda/codecs/cirrus/cs8409.c-149- */
sound/hda/codecs/cirrus/cs8409.c:150:static int cs8409_i2c_wait_complete(struct hda_codec *codec)
sound/hda/codecs/cirrus/cs8409.c-151-{
--
sound/hda/codecs/cirrus/cs8409.c=180=static int cs8409_i2c_set_page(struct sub_codec *scodec, unsigned int i2c_reg)
--
sound/hda/codecs/cirrus/cs8409.c-185-		cs8409_vendor_coef_set(codec, CS8409_I2C_QWRITE, i2c_reg >> 8);
sound/hda/codecs/cirrus/cs8409.c:186:		if (cs8409_i2c_wait_complete(codec) < 0)
sound/hda/codecs/cirrus/cs8409.c-187-			return -EIO;
--
sound/hda/codecs/cirrus/cs8409.c=201=static int cs8409_i2c_read(struct sub_codec *scodec, unsigned int addr)
--
sound/hda/codecs/cirrus/cs8409.c-219-	cs8409_vendor_coef_set(codec, CS8409_I2C_QREAD, i2c_reg_data);
sound/hda/codecs/cirrus/cs8409.c:220:	if (cs8409_i2c_wait_complete(codec) < 0)
sound/hda/codecs/cirrus/cs8409.c-221-		goto error;
--
sound/hda/codecs/cirrus/cs8409.c=241=static int cs8409_i2c_bulk_read(struct sub_codec *scodec, struct cs8409_i2c_param *seq, int count)
--
sound/hda/codecs/cirrus/cs8409.c-261-
sound/hda/codecs/cirrus/cs8409.c:262:		if (cs8409_i2c_wait_complete(codec) < 0)
sound/hda/codecs/cirrus/cs8409.c-263-			goto error;
--
sound/hda/codecs/cirrus/cs8409.c=283=static int cs8409_i2c_write(struct sub_codec *scodec, unsigned int addr, unsigned int value)
--
sound/hda/codecs/cirrus/cs8409.c-302-
sound/hda/codecs/cirrus/cs8409.c:303:	if (cs8409_i2c_wait_complete(codec) < 0)
sound/hda/codecs/cirrus/cs8409.c-304-		goto error;
--
sound/hda/codecs/cirrus/cs8409.c=321=static int cs8409_i2c_bulk_write(struct sub_codec *scodec, const struct cs8409_i2c_param *seq,
--
sound/hda/codecs/cirrus/cs8409.c-342-
sound/hda/codecs/cirrus/cs8409.c:343:		if (cs8409_i2c_wait_complete(codec) < 0)
sound/hda/codecs/cirrus/cs8409.c-344-			goto error;
--
sound/hda/common/codec.c=2952=static int hda_codec_pm_prepare(struct device *dev)
--
sound/hda/common/codec.c-2960-
sound/hda/common/codec.c:2961:static void hda_codec_pm_complete(struct device *dev)
sound/hda/common/codec.c-2962-{
--
sound/hda/common/codec.c-2964-
sound/hda/common/codec.c:2965:	/* If no other pm-functions are called between prepare() and complete() */
sound/hda/common/codec.c-2966-	if (dev->power.power_state.event == PM_EVENT_SUSPEND)
--
sound/hda/controllers/intel.c=1019=static int azx_prepare(struct device *dev)
--
sound/hda/controllers/intel.c-1038-
sound/hda/controllers/intel.c:1039:static void azx_complete(struct device *dev)
sound/hda/controllers/intel.c-1040-{
--
sound/soc/atmel/mchp-spdifrx.c=351=static irqreturn_t mchp_spdif_interrupt(int irq, void *dev_id)
--
sound/soc/atmel/mchp-spdifrx.c-370-			mchp_spdifrx_channel_user_data_read(dev, ch);
sound/soc/atmel/mchp-spdifrx.c:371:			complete(&ctrl->user_data[ch].done);
sound/soc/atmel/mchp-spdifrx.c-372-		}
--
sound/soc/atmel/mchp-spdifrx.c-379-			mchp_spdifrx_channel_status_read(dev, ch);
sound/soc/atmel/mchp-spdifrx.c:380:			complete(&ctrl->ch_stat[ch].done);
sound/soc/atmel/mchp-spdifrx.c-381-			regmap_write(dev->regmap, SPDIFRX_IDR, SPDIFRX_IR_CSC(ch));
--
sound/soc/codecs/cs35l35.c=1104=static irqreturn_t cs35l35_irq(int irq, void *data)
--
sound/soc/codecs/cs35l35.c-1126-	if (sticky2 & CS35L35_PDN_DONE)
sound/soc/codecs/cs35l35.c:1127:		complete(&cs35l35->pdn_done);
sound/soc/codecs/cs35l35.c-1128-
--
sound/soc/codecs/cs42l43.c=258=static irqreturn_t cs42l43_##name(int irq, void *data) \
--
sound/soc/codecs/cs42l43.c-261-	dev_dbg(priv->dev, #name " completed\n"); \
sound/soc/codecs/cs42l43.c:262:	complete(&priv->name); \
sound/soc/codecs/cs42l43.c-263-	return IRQ_HANDLED; \
--
sound/soc/codecs/cs43130.c=2226=static irqreturn_t cs43130_irq_thread(int irq, void *data)
--
sound/soc/codecs/cs43130.c-2250-	if (stickies[0] & CS43130_XTAL_RDY_INT) {
sound/soc/codecs/cs43130.c:2251:		complete(&cs43130->xtal_rdy);
sound/soc/codecs/cs43130.c-2252-		return IRQ_HANDLED;
--
sound/soc/codecs/cs43130.c-2255-	if (stickies[0] & CS43130_PLL_RDY_INT) {
sound/soc/codecs/cs43130.c:2256:		complete(&cs43130->pll_rdy);
sound/soc/codecs/cs43130.c-2257-		return IRQ_HANDLED;
--
sound/soc/codecs/cs43130.c-2264-			cs43130->hpload_stat);
sound/soc/codecs/cs43130.c:2265:		complete(&cs43130->hpload_evt);
sound/soc/codecs/cs43130.c-2266-		return IRQ_HANDLED;
--
sound/soc/codecs/cs43130.c-2272-			cs43130->hpload_stat);
sound/soc/codecs/cs43130.c:2273:		complete(&cs43130->hpload_evt);
sound/soc/codecs/cs43130.c-2274-		return IRQ_HANDLED;
--
sound/soc/codecs/cs43130.c-2280-			cs43130->hpload_stat);
sound/soc/codecs/cs43130.c:2281:		complete(&cs43130->hpload_evt);
sound/soc/codecs/cs43130.c-2282-		return IRQ_HANDLED;
--
sound/soc/codecs/cs43130.c-2288-			cs43130->hpload_stat);
sound/soc/codecs/cs43130.c:2289:		complete(&cs43130->hpload_evt);
sound/soc/codecs/cs43130.c-2290-		return IRQ_HANDLED;
--
sound/soc/codecs/cs43130.c-2296-			cs43130->hpload_stat);
sound/soc/codecs/cs43130.c:2297:		complete(&cs43130->hpload_evt);
sound/soc/codecs/cs43130.c-2298-		return IRQ_HANDLED;
--
sound/soc/codecs/cs43130.c-2304-			cs43130->hpload_stat);
sound/soc/codecs/cs43130.c:2305:		complete(&cs43130->hpload_evt);
sound/soc/codecs/cs43130.c-2306-		return IRQ_HANDLED;
--
sound/soc/codecs/cs43130.c-2312-			cs43130->hpload_stat);
sound/soc/codecs/cs43130.c:2313:		complete(&cs43130->hpload_evt);
sound/soc/codecs/cs43130.c-2314-		return IRQ_HANDLED;
--
sound/soc/codecs/hda.c=124=static void hda_codec_unregister_dais(struct hda_codec *codec,
--
sound/soc/codecs/hda.c-145-
sound/soc/codecs/hda.c:146:int hda_codec_probe_complete(struct hda_codec *codec)
sound/soc/codecs/hda.c-147-{
--
sound/soc/codecs/hda.c=172=static int hda_codec_probe(struct snd_soc_component *component)
--
sound/soc/codecs/hda.c-239-	if (!hda_codec_is_display(codec)) {
sound/soc/codecs/hda.c:240:		ret = hda_codec_probe_complete(codec);
sound/soc/codecs/hda.c-241-		if (ret < 0)
--
sound/soc/codecs/hda.c=267=static void hda_codec_remove(struct snd_soc_component *component)
--
sound/soc/codecs/hda.c-295-	/*
sound/soc/codecs/hda.c:296:	 * HDMI card's hda_codec_probe_complete() (see late_probe()) may
sound/soc/codecs/hda.c-297-	 * not be called due to early error, leaving bus uc unbalanced
--
sound/soc/codecs/hda.h=16=extern const struct hdac_ext_bus_ops soc_hda_ext_bus_ops;
sound/soc/codecs/hda.h:17:int hda_codec_probe_complete(struct hda_codec *codec);
sound/soc/codecs/hda.h-18-
--
sound/soc/codecs/wm0010.c=190=static void wm0010_mark_boot_failure(struct wm0010_priv *wm0010)
--
sound/soc/codecs/wm0010.c-204-
sound/soc/codecs/wm0010.c:205:static void wm0010_boot_xfer_complete(void *data)
sound/soc/codecs/wm0010.c-206-{
--
sound/soc/codecs/wm0010.c-217-		if (xfer->done)
sound/soc/codecs/wm0010.c:218:			complete(xfer->done);
sound/soc/codecs/wm0010.c-219-		return;
--
sound/soc/codecs/wm0010.c-320-	if (xfer->done)
sound/soc/codecs/wm0010.c:321:		complete(xfer->done);
sound/soc/codecs/wm0010.c-322-}
--
sound/soc/codecs/wm0010.c=827=static irqreturn_t wm0010_irq(int irq, void *data)
--
sound/soc/codecs/wm0010.c-835-		spin_lock(&wm0010->irq_lock);
sound/soc/codecs/wm0010.c:836:		complete(&wm0010->boot_completion);
sound/soc/codecs/wm0010.c-837-		spin_unlock(&wm0010->irq_lock);
--
sound/soc/codecs/wm2200.c=2112=static irqreturn_t wm2200_irq(int irq, void *data)
--
sound/soc/codecs/wm2200.c-2134-		dev_dbg(wm2200->dev, "FLL locked\n");
sound/soc/codecs/wm2200.c:2135:		complete(&wm2200->fll_lock);
sound/soc/codecs/wm2200.c-2136-	}
--
sound/soc/codecs/wm5100.c=2154=static irqreturn_t wm5100_irq(int irq, void *data)
--
sound/soc/codecs/wm5100.c-2186-		dev_dbg(wm5100->dev, "FLL1 locked\n");
sound/soc/codecs/wm5100.c:2187:		complete(&wm5100->fll[0].lock);
sound/soc/codecs/wm5100.c-2188-	}
--
sound/soc/codecs/wm5100.c-2190-		dev_dbg(wm5100->dev, "FLL2 locked\n");
sound/soc/codecs/wm5100.c:2191:		complete(&wm5100->fll[1].lock);
sound/soc/codecs/wm5100.c-2192-	}
--
sound/soc/codecs/wm8962.c=3131=static irqreturn_t wm8962_irq(int irq, void *data)
--
sound/soc/codecs/wm8962.c-3174-		dev_dbg(dev, "FLL locked\n");
sound/soc/codecs/wm8962.c:3175:		complete(&wm8962->fll_lock);
sound/soc/codecs/wm8962.c-3176-	}
--
sound/soc/codecs/wm8993.c=1405=static irqreturn_t wm8993_irq(int irq, void *data)
--
sound/soc/codecs/wm8993.c-1433-		dev_dbg(wm8993->dev, "FLL locked\n");
sound/soc/codecs/wm8993.c:1434:		complete(&wm8993->fll_lock);
sound/soc/codecs/wm8993.c-1435-	}
--
sound/soc/codecs/wm8994.c=2470=static irqreturn_t wm8994_fll_locked_irq(int irq, void *data)
--
sound/soc/codecs/wm8994.c-2473-
sound/soc/codecs/wm8994.c:2474:	complete(completion);
sound/soc/codecs/wm8994.c-2475-
--
sound/soc/codecs/wm8996.c=2485=static irqreturn_t wm8996_irq(int irq, void *data)
--
sound/soc/codecs/wm8996.c-2505-		dev_dbg(component->dev, "DC servo IRQ\n");
sound/soc/codecs/wm8996.c:2506:		complete(&wm8996->dcs_done);
sound/soc/codecs/wm8996.c-2507-	}
--
sound/soc/codecs/wm8996.c-2513-		dev_dbg(component->dev, "FLL locked\n");
sound/soc/codecs/wm8996.c:2514:		complete(&wm8996->fll_lock);
sound/soc/codecs/wm8996.c-2515-	}
--
sound/soc/codecs/wm_hubs.c=98=irqreturn_t wm_hubs_dcs_done(int irq, void *data)
--
sound/soc/codecs/wm_hubs.c-101-
sound/soc/codecs/wm_hubs.c:102:	complete(&hubs->dcs_done);
sound/soc/codecs/wm_hubs.c-103-
--
sound/soc/fsl/fsl_asrc_dma.c=32=static bool filter(struct dma_chan *chan, void *param)
--
sound/soc/fsl/fsl_asrc_dma.c-41-
sound/soc/fsl/fsl_asrc_dma.c:42:static void fsl_asrc_dma_complete(void *arg)
sound/soc/fsl/fsl_asrc_dma.c-43-{
--
sound/soc/fsl/fsl_asrc_m2m.c=31=static void asrc_input_dma_callback(void *data)
--
sound/soc/fsl/fsl_asrc_m2m.c-34-
sound/soc/fsl/fsl_asrc_m2m.c:35:	complete(&pair->complete[IN]);
sound/soc/fsl/fsl_asrc_m2m.c-36-}
--
sound/soc/fsl/fsl_asrc_m2m.c=39=static void asrc_output_dma_callback(void *data)
--
sound/soc/fsl/fsl_asrc_m2m.c-42-
sound/soc/fsl/fsl_asrc_m2m.c:43:	complete(&pair->complete[OUT]);
sound/soc/fsl/fsl_asrc_m2m.c-44-}
--
sound/soc/fsl/fsl_qmc_audio.c=84=static int qmc_audio_pcm_hw_params(struct snd_soc_component *component,
--
sound/soc/fsl/fsl_qmc_audio.c-113-
sound/soc/fsl/fsl_qmc_audio.c:114:static void qmc_audio_pcm_write_complete(void *context);
sound/soc/fsl/fsl_qmc_audio.c-115-
sound/soc/fsl/fsl_qmc_audio.c=116=static int qmc_audio_pcm_write_submit(struct qmc_dai_prtd *prtd)
--
sound/soc/fsl/fsl_qmc_audio.c-136-
sound/soc/fsl/fsl_qmc_audio.c:137:static void qmc_audio_pcm_write_complete(void *context)
sound/soc/fsl/fsl_qmc_audio.c-138-{
--
sound/soc/fsl/fsl_qmc_audio.c-153-
sound/soc/fsl/fsl_qmc_audio.c:154:static void qmc_audio_pcm_read_complete(void *context, size_t length, unsigned int flags);
sound/soc/fsl/fsl_qmc_audio.c-155-
sound/soc/fsl/fsl_qmc_audio.c=156=static int qmc_audio_pcm_read_submit(struct qmc_dai_prtd *prtd)
--
sound/soc/fsl/fsl_qmc_audio.c-176-
sound/soc/fsl/fsl_qmc_audio.c:177:static void qmc_audio_pcm_read_complete(void *context, size_t length, unsigned int flags)
sound/soc/fsl/fsl_qmc_audio.c-178-{
--
sound/soc/fsl/imx-audio-rpmsg.c=18=static int imx_audio_rpmsg_cb(struct rpmsg_device *rpdev, void *data, int len,
--
sound/soc/fsl/imx-audio-rpmsg.c-64-		memcpy(&info->r_msg, r_msg, sizeof(struct rpmsg_r_msg));
sound/soc/fsl/imx-audio-rpmsg.c:65:		complete(&info->cmd_complete);
sound/soc/fsl/imx-audio-rpmsg.c-66-		break;
--
sound/soc/fsl/imx-pcm-rpmsg.c=315=static int imx_rpmsg_pcm_prepare(struct snd_soc_component *component,
--
sound/soc/fsl/imx-pcm-rpmsg.c-342-
sound/soc/fsl/imx-pcm-rpmsg.c:343:static void imx_rpmsg_pcm_dma_complete(void *arg)
sound/soc/fsl/imx-pcm-rpmsg.c-344-{
--
sound/soc/intel/atom/sst-mfld-platform-pcm.c=751=static int sst_soc_prepare(struct device *dev)
--
sound/soc/intel/atom/sst-mfld-platform-pcm.c-775-
sound/soc/intel/atom/sst-mfld-platform-pcm.c:776:static void sst_soc_complete(struct device *dev)
sound/soc/intel/atom/sst-mfld-platform-pcm.c-777-{
--
sound/soc/intel/avs/boards/hdaudio.c=96=static int avs_card_late_probe(struct snd_soc_card *card)
--
sound/soc/intel/avs/boards/hdaudio.c-122-
sound/soc/intel/avs/boards/hdaudio.c:123:	return hda_codec_probe_complete(codec);
sound/soc/intel/avs/boards/hdaudio.c-124-}
--
sound/soc/intel/avs/cldma.c=251=void hda_cldma_interrupt(struct hda_cldma *cl)
--
sound/soc/intel/avs/cldma.c-258-
sound/soc/intel/avs/cldma.c:259:	complete(&cl->completion);
sound/soc/intel/avs/cldma.c-260-}
--
sound/soc/intel/avs/cnl.c=15=static void avs_cnl_ipc_interrupt(struct avs_dev *adev)
--
sound/soc/intel/avs/cnl.c-27-	if (hipc_ack & spec->hipc->ack_done_mask) {
sound/soc/intel/avs/cnl.c:28:		complete(&adev->ipc->done_completion);
sound/soc/intel/avs/cnl.c-29-
--
sound/soc/intel/avs/ipc.c=209=static void avs_dsp_process_notification(struct avs_dev *adev, u64 header)
--
sound/soc/intel/avs/ipc.c-268-		adev->ipc->ready = true;
sound/soc/intel/avs/ipc.c:269:		complete(&adev->fw_ready);
sound/soc/intel/avs/ipc.c-270-		break;
--
sound/soc/intel/avs/ipc.c=287=void avs_dsp_process_response(struct avs_dev *adev, u64 header)
--
sound/soc/intel/avs/ipc.c-304-
sound/soc/intel/avs/ipc.c:305:	complete(&ipc->busy_completion);
sound/soc/intel/avs/ipc.c-306-}
--
sound/soc/intel/avs/mtl.c=128=static void avs_mtl_ipc_interrupt(struct avs_dev *adev)
--
sound/soc/intel/avs/mtl.c-140-	if (hipc_ack & spec->hipc->ack_done_mask) {
sound/soc/intel/avs/mtl.c:141:		complete(&adev->ipc->done_completion);
sound/soc/intel/avs/mtl.c-142-
--
sound/soc/intel/avs/skl.c=18=void avs_skl_ipc_interrupt(struct avs_dev *adev)
--
sound/soc/intel/avs/skl.c-30-	if (hipc_ack & spec->hipc->ack_done_mask) {
sound/soc/intel/avs/skl.c:31:		complete(&adev->ipc->done_completion);
sound/soc/intel/avs/skl.c-32-
--
sound/soc/intel/boards/bytcht_es8316.c=408=static int byt_cht_es8316_resume(struct snd_soc_card *card)
--
sound/soc/intel/boards/bytcht_es8316.c-429-	 * the GPIO can only be changed underneath us during a system suspend.
sound/soc/intel/boards/bytcht_es8316.c:430:	 * This resume() function runs from a pm complete() callback, and thus
sound/soc/intel/boards/bytcht_es8316.c-431-	 * is guaranteed to run after the touchscreen driver/ACPI-subsys has
--
sound/soc/intel/catpt/ipc.c=195=static void catpt_dsp_process_response(struct catpt_dev *cdev, u32 header)
--
sound/soc/intel/catpt/ipc.c-209-		catpt_ipc_arm(ipc, &config);
sound/soc/intel/catpt/ipc.c:210:		complete(&cdev->fw_ready);
sound/soc/intel/catpt/ipc.c-211-		return;
--
sound/soc/intel/catpt/ipc.c-224-
sound/soc/intel/catpt/ipc.c:225:		complete(&cdev->fw_ready);
sound/soc/intel/catpt/ipc.c-226-		/* TODO: attempt recovery */
--
sound/soc/intel/catpt/ipc.c-236-			/* signal completion of delayed reply */
sound/soc/intel/catpt/ipc.c:237:			complete(&ipc->busy_completion);
sound/soc/intel/catpt/ipc.c-238-			break;
--
sound/soc/intel/catpt/ipc.c=272=irqreturn_t catpt_dsp_irq_handler(int irq, void *dev_id)
--
sound/soc/intel/catpt/ipc.c-288-		catpt_dsp_copy_rx(cdev, ipcc);
sound/soc/intel/catpt/ipc.c:289:		complete(&cdev->ipc.done_completion);
sound/soc/intel/catpt/ipc.c-290-
--
sound/soc/qcom/qdsp6/topology.c=1077=static int audioreach_route_unload(struct snd_soc_component *scomp,
--
sound/soc/qcom/qdsp6/topology.c-1082-
sound/soc/qcom/qdsp6/topology.c:1083:static int audioreach_tplg_complete(struct snd_soc_component *component)
sound/soc/qcom/qdsp6/topology.c-1084-{
--
sound/soc/renesas/fsi.c=1331=static int fsi_dma_init(struct fsi_priv *fsi, struct fsi_stream *io)
--
sound/soc/renesas/fsi.c-1342-
sound/soc/renesas/fsi.c:1343:static void fsi_dma_complete(void *data)
sound/soc/renesas/fsi.c-1344-{
--
sound/soc/renesas/siu_pcm.c=59=static int siu_pcm_stmwrite_start(struct siu_port *port_info)
--
sound/soc/renesas/siu_pcm.c-77-
sound/soc/renesas/siu_pcm.c:78:static void siu_dma_tx_complete(void *arg)
sound/soc/renesas/siu_pcm.c-79-{
--
sound/soc/samsung/tm2_wm5110.c=634=static int tm2_pm_prepare(struct device *dev)
--
sound/soc/samsung/tm2_wm5110.c-640-
sound/soc/samsung/tm2_wm5110.c:641:static void tm2_pm_complete(struct device *dev)
sound/soc/samsung/tm2_wm5110.c-642-{
--
sound/soc/sdca/sdca_fdl.c=313=static void fdl_end(struct sdca_interrupt *interrupt)
--
sound/soc/sdca/sdca_fdl.c-322-	pm_runtime_put(interrupt->dev);
sound/soc/sdca/sdca_fdl.c:323:	complete(&fdl_state->done);
sound/soc/sdca/sdca_fdl.c-324-
--
sound/soc/sdca/sdca_fdl.c=343=static int fdl_status_process(struct sdca_interrupt *interrupt, unsigned int status)
--
sound/soc/sdca/sdca_fdl.c-352-		pm_runtime_get(interrupt->dev);
sound/soc/sdca/sdca_fdl.c:353:		complete(&fdl_state->begin);
sound/soc/sdca/sdca_fdl.c-354-
--
sound/soc/soc-component.c=785=EXPORT_SYMBOL_GPL(snd_soc_component_update_bits);
--
sound/soc/soc-component.c-797- * when the function returns. To make sure that all scheduled updates have been
sound/soc/soc-component.c:798: * completed snd_soc_component_async_complete() must be called.
sound/soc/soc-component.c-799- *
--
sound/soc/soc-component.c=862=EXPORT_SYMBOL_GPL(snd_soc_component_write_field);
--
sound/soc/soc-component.c-864-/**
sound/soc/soc-component.c:865: * snd_soc_component_async_complete() - Ensure asynchronous I/O has completed
sound/soc/soc-component.c-866- * @component: Component for which to wait
--
sound/soc/soc-component.c-870- */
sound/soc/soc-component.c:871:void snd_soc_component_async_complete(struct snd_soc_component *component)
sound/soc/soc-component.c-872-{
sound/soc/soc-component.c-873-	if (component->regmap)
sound/soc/soc-component.c:874:		regmap_async_complete(component->regmap);
sound/soc/soc-component.c-875-}
--
sound/soc/soc-dapm.c=1007=static int dapm_test_bits(struct snd_soc_dapm_context *dapm,
--
sound/soc/soc-dapm.c-1014-
sound/soc/soc-dapm.c:1015:static void dapm_async_complete(struct snd_soc_dapm_context *dapm)
sound/soc/soc-dapm.c-1016-{
sound/soc/soc-dapm.c-1017-	if (dapm->component)
sound/soc/soc-dapm.c:1018:		snd_soc_component_async_complete(dapm->component);
sound/soc/soc-dapm.c-1019-}
--
sound/soc/soc-dapm.c=1652=int snd_soc_dapm_regulator_event(struct snd_soc_dapm_widget *w,
--
sound/soc/soc-dapm.c-1657-
sound/soc/soc-dapm.c:1658:	dapm_async_complete(w->dapm);
sound/soc/soc-dapm.c-1659-
--
sound/soc/soc-dapm.c=1712=int snd_soc_dapm_clock_event(struct snd_soc_dapm_widget *w,
--
sound/soc/soc-dapm.c-1717-
sound/soc/soc-dapm.c:1718:	dapm_async_complete(w->dapm);
sound/soc/soc-dapm.c-1719-
--
sound/soc/soc-dapm.c=1834=static void dapm_seq_check_event(struct snd_soc_card *card,
--
sound/soc/soc-dapm.c-1877-		dapm_pop_dbg(dev, "pop test : %s %s\n", w->name, ev_name);
sound/soc/soc-dapm.c:1878:		dapm_async_complete(w->dapm);
sound/soc/soc-dapm.c-1879-		trace_snd_soc_dapm_widget_event_start(w, event);
--
sound/soc/soc-dapm.c=1948=static void dapm_seq_run(struct snd_soc_card *card,
--
sound/soc/soc-dapm.c-1984-			if (cur_dapm && w->dapm != cur_dapm)
sound/soc/soc-dapm.c:1985:				dapm_async_complete(cur_dapm);
sound/soc/soc-dapm.c-1986-
--
sound/soc/soc-dapm.c-2045-	for_each_card_dapms(card, d)
sound/soc/soc-dapm.c:2046:		dapm_async_complete(d);
sound/soc/soc-dapm.c-2047-}
--
sound/soc/soc-topology.c=296=static int soc_tplg_dai_link_load(struct soc_tplg *tplg,
--
sound/soc/soc-topology.c-305-/* tell the component driver that all firmware has been loaded in this request */
sound/soc/soc-topology.c:306:static int soc_tplg_complete(struct soc_tplg *tplg)
sound/soc/soc-topology.c-307-{
sound/soc/soc-topology.c-308-	if (tplg->ops && tplg->ops->complete)
sound/soc/soc-topology.c:309:		return tplg->ops->complete(tplg->comp);
sound/soc/soc-topology.c-310-
--
sound/soc/soc-topology.c=1263=static int soc_tplg_dapm_widget_elems_load(struct soc_tplg *tplg,
--
sound/soc/soc-topology.c-1308-
sound/soc/soc-topology.c:1309:static int soc_tplg_dapm_complete(struct soc_tplg *tplg)
sound/soc/soc-topology.c-1310-{
--
sound/soc/soc-topology.c=2105=static int soc_tplg_process_headers(struct soc_tplg *tplg)
--
sound/soc/soc-topology.c-2142-	/* signal DAPM we are complete */
sound/soc/soc-topology.c:2143:	ret = soc_tplg_dapm_complete(tplg);
sound/soc/soc-topology.c-2144-
--
sound/soc/soc-topology.c=2148=static int soc_tplg_load(struct soc_tplg *tplg)
--
sound/soc/soc-topology.c-2153-	if (ret == 0)
sound/soc/soc-topology.c:2154:		return soc_tplg_complete(tplg);
sound/soc/soc-topology.c-2155-
--
sound/soc/sof/core.c=454=static int sof_probe_continue(struct snd_sof_dev *sdev)
--
sound/soc/sof/core.c-567-	if (plat_data->sof_probe_complete)
sound/soc/sof/core.c:568:		plat_data->sof_probe_complete(sdev->dev);
sound/soc/sof/core.c-569-
--
sound/soc/sof/intel/hda-stream.c=820=static bool hda_dsp_stream_check(struct hdac_bus *bus, u32 status)
--
sound/soc/sof/intel/hda-stream.c-851-
sound/soc/sof/intel/hda-stream.c:852:				complete(&hda_stream->ioc);
sound/soc/sof/intel/hda-stream.c-853-				continue;
--
sound/soc/sof/pm.c=418=EXPORT_SYMBOL(snd_sof_prepare);
sound/soc/sof/pm.c-419-
sound/soc/sof/pm.c:420:void snd_sof_complete(struct device *dev)
sound/soc/sof/pm.c-421-{
--
sound/soc/sof/sof-acpi-dev.c=39=EXPORT_NS_DEV_PM_OPS(sof_acpi_pm, SND_SOC_SOF_ACPI_DEV) = {

]

109/4 2026/08/13 19:10 llm patch-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 26724
							output: 125
							thoughts: 15
						

Thoughts:
Okay, here's my take on those thoughts, tailored for an expert audience:

**The Solution is Clear - Let's Execute**

Right, this is refreshingly straightforward. The issue at hand is localized, a small blip in the grand scheme. The beauty of this is that the solution is equally contained and elegant. No need for a sweeping architectural overhaul, no complicated dependencies to untangle. We can apply this fix quickly and efficiently. Let's get this done.



110/4 2026/08/13 19:10 tool codeeditor
0m Args:
map[CurrentCode:	if (card->release_completion)
		complete(card->release_completion);
	if (!card->managed)
		kfree(card);
	return 0;
} NewCode:	bool managed = card->managed;

	if (card->release_completion)
		complete(card->release_completion);
	if (!managed)
		kfree(card);
	return 0;
} SourceFile:sound/core/init.c]

Results:
map[]

111/4 2026/08/13 19:10 llm patch-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 26971
							output: 22
							thoughts: 8
						

Thoughts:
Okay, let's dive into this. I need to get a clear picture of what's changed.

**Diving into the Patch Diff**

Right, first things first, I need to thoroughly examine this patch diff. I'm going to look at the additions, deletions, and modifications to understand the scope and impact of these changes. My experience tells me where to focus initially: the critical functions, the areas of known vulnerability, and any sections that touch on performance-sensitive code. I'm looking for the "gotchas," the subtle bugs that often hide in the revisions. Is the coding style consistent? Are there any obvious security holes introduced? Does this align with the overall project architecture? I'm going to carefully read the context around each line, not just the lines themselves. It's that context that often reveals the intended functionality and potential problems. Time to start the deep dive.



112/4 2026/08/13 19:10 tool patch-diff
0m Args:
map[File:sound/core/init.c]

Results:
map[Output:diff --git a/sound/core/init.c b/sound/core/init.c
index 56dde5bd7..39d049d57 100644
--- a/sound/core/init.c
+++ b/sound/core/init.c
@@ -585,35 +585,37 @@ EXPORT_SYMBOL_GPL(snd_card_disconnect_sync);
 static int snd_card_do_free(struct snd_card *card)
 {
 	card->releasing = true;
 #if IS_ENABLED(CONFIG_SND_MIXER_OSS)
 	if (snd_mixer_oss_notify_callback)
 		snd_mixer_oss_notify_callback(card, SND_MIXER_OSS_NOTIFY_FREE);
 #endif
 	snd_device_free_all(card);
 	if (card->private_free)
 		card->private_free(card);
 #ifdef CONFIG_SND_CTL_DEBUG
 	kfree(card->value_buf);
 #endif
 	if (snd_info_card_free(card) < 0) {
 		dev_warn(card->dev, "unable to free card info\n");
 		/* Not fatal error */
 	}
+	bool managed = card->managed;
+
 	if (card->release_completion)
 		complete(card->release_completion);
-	if (!card->managed)
+	if (!managed)
 		kfree(card);
 	return 0;
 }
 
 /**
  * snd_card_free_when_closed - Disconnect the card, free it later eventually
  * @card: soundcard structure
  *
  * Unlike snd_card_free(), this function doesn't try to release the card
  * resource immediately, but tries to disconnect at first.  When the card
  * is still in use, the function returns before freeing the resources.
  * The card resources will be freed when the refcount gets to zero.
  *
  * Return: zero if successful, or a negative error code
  */
]

113/4 2026/08/13 19:10 llm patch-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 27703
							output: 133
							thoughts: 58
						

Thoughts:
Okay, here's my take on those thoughts, tailored for an expert audience:

**Refactoring a Card Release Function: A Style and Semantic Consideration**

Alright, I'm looking at this function and immediately, my internal style guide bells are going off. We're dealing with C89 compatibility here, or at least a codebase that's leaning in that direction. The proposed fix, which suggests moving `bool managed = card->managed;` before the `card->releasing = true;` assignment, is spot-on. It's not just about style; it's about making sure that the local variable, `managed`, is declared before any potential side effects like setting `card->releasing`, ensuring a clean and predictable execution flow. This approach is much more robust. We're ensuring that the scope of `managed` aligns with the potential usage down the line.

So, I'm going to revert any previous changes and refactor this correctly. This minor change provides additional clarity.



114/4 2026/08/13 19:10 tool codeeditor
0m Args:
map[CurrentCode:static int snd_card_do_free(struct snd_card *card)
{
	card->releasing = true;
#if IS_ENABLED(CONFIG_SND_MIXER_OSS) NewCode:static int snd_card_do_free(struct snd_card *card)
{
	bool managed = card->managed;

	card->releasing = true;
#if IS_ENABLED(CONFIG_SND_MIXER_OSS) SourceFile:sound/core/init.c]

Results:
map[]

115/4 2026/08/13 19:10 llm patch-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 28111
							output: 219
							thoughts: 10
						

Thoughts:
Okay, here's the summary, formatted as requested:

**My Analytical Process**

Alright, let's break this down. My initial reaction is to approach this with the methodical rigor I'm known for. First, I need to identify the core argument or central thesis. What's the main point the author is trying to convey? Is it a novel concept, or a refinement of existing ideas? My mind is already starting to categorize this, comparing it to related literature and research within my field. I'm looking for the defining characteristics and assumptions.

Next, I need to evaluate the supporting evidence. Is the data sound? Are the methodologies appropriate for the claims being made? Are there any logical fallacies or biases at play? I'll be scrutinizing the methodology. I will be sure to cross-reference their sources and consider their external validity. I'll even be checking for any omissions or alternative interpretations that might challenge their conclusions. What are the limitations of their study? Are those limitations acknowledged adequately? I'll be questioning if the claims hold across diverse contexts.

Furthermore, I'll consider the implications. What are the real-world applications of this? Does it have the potential to disrupt the status quo or, perhaps, simply add another layer of nuance? How does this impact my own work, my understanding of the field, or the larger body of knowledge? I'm already mentally drafting potential critiques, extensions, and areas for further investigation. Finally, I will identify any novel information.



116/4 2026/08/13 19:10 tool codeeditor
0m Args:
map[CurrentCode:	if (snd_info_card_free(card) < 0) {
		dev_warn(card->dev, "unable to free card info\n");
		/* Not fatal error */
	}
	bool managed = card->managed;

	if (card->release_completion)
		complete(card->release_completion);
	if (!managed)
		kfree(card);
	return 0;
} NewCode:	if (snd_info_card_free(card) < 0) {
		dev_warn(card->dev, "unable to free card info\n");
		/* Not fatal error */
	}
	if (card->release_completion)
		complete(card->release_completion);
	if (!managed)
		kfree(card);
	return 0;
} SourceFile:sound/core/init.c]

Results:
map[]

117/4 2026/08/13 19:10 llm patch-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 28658
							output: 22
							thoughts: 9
						

Thoughts:
Okay, let's do this. Here's a summary of the thought process, as if it were my own:

**Reviewing the Patch Diff: A Second Look**

Alright, time to dive back in. I need to re-examine that patch diff. Let's make absolutely sure I haven't missed anything crucial the first time around. Given the nature of [ *insert field here - example: the proposed architecture change, the security vulnerability, the complex algorithm* ], a cursory glance isn't enough. I need to be meticulous. I need to confirm that everything aligns with [ *insert field specific requirements here - example: the agreed-upon specifications, best practices, existing codebase, performance constraints*]. No assumptions, only solid verification. Back to the diff!



118/4 2026/08/13 19:11 tool patch-diff
0m Args:
map[File:sound/core/init.c]

Results:
map[Output:diff --git a/sound/core/init.c b/sound/core/init.c
index 56dde5bd7..577338526 100644
--- a/sound/core/init.c
+++ b/sound/core/init.c
@@ -577,43 +577,45 @@ void snd_card_disconnect_sync(struct snd_card *card)
 
 	guard(spinlock_irq)(&card->files_lock);
 	wait_event_lock_irq(card->remove_sleep,
 			    list_empty(&card->files_list),
 			    card->files_lock);
 }
 EXPORT_SYMBOL_GPL(snd_card_disconnect_sync);
 
 static int snd_card_do_free(struct snd_card *card)
 {
+	bool managed = card->managed;
+
 	card->releasing = true;
 #if IS_ENABLED(CONFIG_SND_MIXER_OSS)
 	if (snd_mixer_oss_notify_callback)
 		snd_mixer_oss_notify_callback(card, SND_MIXER_OSS_NOTIFY_FREE);
 #endif
 	snd_device_free_all(card);
 	if (card->private_free)
 		card->private_free(card);
 #ifdef CONFIG_SND_CTL_DEBUG
 	kfree(card->value_buf);
 #endif
 	if (snd_info_card_free(card) < 0) {
 		dev_warn(card->dev, "unable to free card info\n");
 		/* Not fatal error */
 	}
 	if (card->release_completion)
 		complete(card->release_completion);
-	if (!card->managed)
+	if (!managed)
 		kfree(card);
 	return 0;
 }
 
 /**
  * snd_card_free_when_closed - Disconnect the card, free it later eventually
  * @card: soundcard structure
  *
  * Unlike snd_card_free(), this function doesn't try to release the card
  * resource immediately, but tries to disconnect at first.  When the card
  * is still in use, the function returns before freeing the resources.
  * The card resources will be freed when the refcount gets to zero.
  *
  * Return: zero if successful, or a negative error code
  */
]

119/4 2026/08/13 19:11 llm patch-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 29447
							output: 36
							thoughts: 34
						

Thoughts:
**Investigating Potential Resource Leak in Audio Driver**

Okay, so I'm digging into this `release_completion` issue, and the core question buzzing in my head is: is there any other place in the code, *besides* that `complete(card->release_completion)` call, where the `card` structure might be accessed *after* that completion signal? That's the crucial point, because accessing the memory after the `complete` call is very bad practice and could lead to major instability. It's almost certainly a memory safety bug.

I immediately think of `snd_card_free`. That's the obvious place to start looking. It’s the function responsible for cleaning up the `card` structure and its associated resources. If there's a subsequent use after the completion signal, *that* is probably where the issue lies. Time to dig into the call graph and see if any code paths within `snd_card_free` touch `card` in a way that’s unsafe. I have a hunch... but let's see.



120/4 2026/08/13 19:11 tool codesearch-definition-source
0m Args:
map[ContextFile:sound/core/init.c Name:snd_card_free]

Results:
map[SourceCode: 631:	/**
 632:	 * snd_card_free - frees given soundcard structure
 633:	 * @card: soundcard structure
 634:	 *
 635:	 * This function releases the soundcard structure and the all assigned
 636:	 * devices automatically.  That is, you don't have to release the devices
 637:	 * by yourself.
 638:	 *
 639:	 * This function waits until the all resources are properly released.
 640:	 *
 641:	 * Return: Zero. Frees all associated devices and frees the control
 642:	 * interface associated to given soundcard.
 643:	 */
 644:	void snd_card_free(struct snd_card *card)
 645:	{
 646:		DECLARE_COMPLETION_ONSTACK(released);
 647:	
 648:		/* The call of snd_card_free() is allowed from various code paths;
 649:		 * a manual call from the driver and the call via devres_free, and
 650:		 * we need to avoid double-free. Moreover, the release via devres
 651:		 * may call snd_card_free() twice due to its nature, we need to have
 652:		 * the check here at the beginning.
 653:		 */
 654:		if (card->releasing)
 655:			return;
 656:	
 657:		card->release_completion = &released;
 658:		snd_card_free_when_closed(card);
 659:	
 660:		/* wait, until all devices are ready for the free operation */
 661:		wait_for_completion(&released);
 662:	}
 SourceFile:sound/core/init.c]

121/4 2026/08/13 19:11 llm patch-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 30241
							output: 49
							thoughts: 271
						

Thoughts:
**My Analysis of `snd_card_free` in the ALSA Audio Driver**

Okay, let's break this down. In `snd_card_free`, after the `wait_for_completion(&released)` call, the function simply returns. Crucially, it doesn't touch the `card` structure itself after that wait. Now, the context is important here. `snd_card_free` is invoked by `__snd_card_release`, which in turn is called by the device resource management system.

The interesting scenario arises if `snd_card_free` is called manually, outside the standard release path. In this case, it still waits for completion of any ongoing operations, and *then* returns. My initial concern was that the caller might subsequently try to access the `card` pointer after it has been freed. However, a deeper look reveals that if `snd_card_free` is called manually, `card->managed` would be false. This condition triggers `snd_card_do_free`, which then calls `kfree(card)`.

So here's the crux of the issue: `snd_card_free` waits, then returns. Then, if manually called, `snd_card_do_free` is called, which then frees `card` with `kfree()`. Therefore, it's possible for `snd_card_free` to return, and the caller *could* be looking at a freed `card` pointer!

But hold on, `snd_card_free` itself doesn't access `card` after the `wait_for_completion` call, so that's a red herring. The real issue is whether the caller of `snd_card_free` does something with `card` after `snd_card_free` returns, *before* the `snd_card_do_free` function could deallocate it. Therefore, I need to check the callers of `snd_card_free` to see if they access `card` after calling the function, and before `kfree(card)`. This is where I need to focus my attention.



122/4 2026/08/13 19:11 tool codesearch-find-references
0m Args:
map[ContextFile:sound/core/init.c IncludeSnippetLines:0 Name:snd_card_free SourceTreePrefix:]

Results:
map[References:[map[ReferenceKind:calls ReferencingEntityKind:function ReferencingEntityName:__snd_card_release SourceFile:sound/core/init.c SourceLine:199] map[ReferenceKind:calls ReferencingEntityKind:function ReferencingEntityName:azx_probe SourceFile:sound/hda/controllers/intel.c SourceLine:2262] map[ReferenceKind:calls ReferencingEntityKind:function ReferencingEntityName:azx_probe_continue SourceFile:sound/hda/controllers/intel.c SourceLine:2435] map[ReferenceKind:calls ReferencingEntityKind:function ReferencingEntityName:azx_remove SourceFile:sound/hda/controllers/intel.c SourceLine:2461] map[ReferenceKind:calls ReferencingEntityKind:function ReferencingEntityName:bcd2000_probe SourceFile:sound/usb/bcd2000/bcd2000.c SourceLine:417] map[ReferenceKind:calls ReferencingEntityKind:function ReferencingEntityName:cx231xx_audio_init SourceFile:drivers/media/usb/cx231xx/cx231xx-audio.c SourceLine:655] map[ReferenceKind:calls ReferencingEntityKind:function ReferencingEntityName:em28xx_audio_fini SourceFile:drivers/media/usb/em28xx/em28xx-audio.c SourceLine:913] map[ReferenceKind:calls ReferencingEntityKind:function ReferencingEntityName:em28xx_audio_init SourceFile:drivers/media/usb/em28xx/em28xx-audio.c SourceLine:885] map[ReferenceKind:calls ReferencingEntityKind:function ReferencingEntityName:f_midi_unregister_card SourceFile:drivers/usb/gadget/function/f_midi.c SourceLine:793] map[ReferenceKind:calls ReferencingEntityKind:function ReferencingEntityName:g_audio_setup SourceFile:drivers/usb/gadget/function/u_audio.c SourceLine:1426] map[ReferenceKind:calls ReferencingEntityKind:function ReferencingEntityName:go7007_snd_init SourceFile:drivers/media/usb/go7007/snd-go7007.c SourceLine:253] map[ReferenceKind:calls ReferencingEntityKind:function ReferencingEntityName:hiface_chip_probe SourceFile:sound/usb/hiface/chip.c SourceLine:133] map[ReferenceKind:calls ReferencingEntityKind:function ReferencingEntityName:pcmidi_snd_initialise SourceFile:drivers/hid/hid-prodikeys.c SourceLine:710] map[ReferenceKind:calls ReferencingEntityKind:function ReferencingEntityName:snd_card_free_on_error SourceFile:sound/core/init.c SourceLine:272] map[ReferenceKind:calls ReferencingEntityKind:function ReferencingEntityName:snd_probe SourceFile:sound/usb/caiaq/device.c SourceLine:553] map[ReferenceKind:calls ReferencingEntityKind:function ReferencingEntityName:snd_usx2y_probe SourceFile:sound/usb/usx2y/usbusx2y.c SourceLine:473] map[ReferenceKind:calls ReferencingEntityKind:function ReferencingEntityName:soc_cleanup_card_resources SourceFile:sound/soc/soc-core.c SourceLine:1978] map[ReferenceKind:calls ReferencingEntityKind:function ReferencingEntityName:trigger_card_free SourceFile:sound/core/init.c SourceLine:864] map[ReferenceKind:calls ReferencingEntityKind:function ReferencingEntityName:ua101_probe SourceFile:sound/usb/misc/ua101.c SourceLine:1281] map[ReferenceKind:calls ReferencingEntityKind:function ReferencingEntityName:us122l_usb_probe SourceFile:sound/usb/usx2y/us122l.c SourceLine:513] map[ReferenceKind:calls ReferencingEntityKind:function ReferencingEntityName:us122l_usb_probe SourceFile:sound/usb/usx2y/us122l.c SourceLine:519] map[ReferenceKind:calls ReferencingEntityKind:function ReferencingEntityName:usb6fire_chip_probe SourceFile:sound/usb/6fire/chip.c SourceLine:157] map[ReferenceKind:calls ReferencingEntityKind:function ReferencingEntityName:usb_audio_probe SourceFile:sound/usb/card.c SourceLine:1081] map[ReferenceKind:calls ReferencingEntityKind:function ReferencingEntityName:usbtv_audio_init SourceFile:drivers/media/usb/usbtv/usbtv-audio.c SourceLine:364] map[ReferenceKind:calls ReferencingEntityKind:function ReferencingEntityName:virtsnd_remove SourceFile:sound/virtio/virtio_card.c SourceLine:355] map[ReferenceKind:takes-address-of ReferencingEntityKind:global_variable ReferencingEntityName:__UNIQUE_ID_addressable_snd_card_free_787 SourceFile:sound/core/init.c SourceLine:663] map[ReferenceKind:takes-address-of ReferencingEntityKind:global_variable ReferencingEntityName:__gendwarfksyms_ptr_snd_card_free SourceFile:sound/core/init.c SourceLine:663] map[ReferenceKind:takes-address-of ReferencingEntityKind:global_variable ReferencingEntityName:__gendwarfksyms_ptr_snd_card_free SourceFile:sound/core/init.c SourceLine:663]] TruncatedOutput:false]

123/4 2026/08/13 19:11 llm patch-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 32648
							output: 38
							thoughts: 23
						

Thoughts:
Here's my take on those thoughts, tailored for an expert audience:

**Investigating a Suspected HDA Controller Issue**

Alright, I need to dive into this. The function name `azx_remove` immediately flags my attention. It's in `sound/hda/controllers/intel.c`, which makes it likely related to the removal/unloading sequence for Intel HDA controllers. My initial thought is to figure out why this function is of interest. Are we debugging a driver unload problem, a resource conflict during module removal, or perhaps some sort of power management issue that manifests during controller detachment?

My immediate checklist will be: what calls `azx_remove` and what context is this function usually working under? I want to know what this function's typical role is and what state the HDA controller is supposed to be in when it executes. I'll need to correlate the function's actions with the overall HDA controller lifecycle. Any recent reports or bug-tracker entries referencing unload errors or hot-plug issues associated with Intel HDA are going to be valuable in framing my inspection.

Essentially, I'm going in with a working hypothesis that an issue is arising during the controller's removal and I need to establish a baseline of understanding to pinpoint the cause. I'll need to trace the call paths and relevant data structures, keeping an eye out for potential race conditions, incorrect resource handling (IRQ release, memory mapping), or potential locking issues within the function itself or elsewhere in the driver. Time to dig in!



124/4 2026/08/13 19:11 tool codesearch-definition-source
0m Args:
map[ContextFile:sound/hda/controllers/intel.c Name:azx_remove]

Results:
map[SourceCode:2447:	static void azx_remove(struct pci_dev *pci)
2448:	{
2449:		struct snd_card *card = pci_get_drvdata(pci);
2450:		struct azx *chip;
2451:		struct hda_intel *hda;
2452:	
2453:		if (card) {
2454:			/* cancel the pending probing work */
2455:			chip = card->private_data;
2456:			hda = container_of(chip, struct hda_intel, chip);
2457:			cancel_delayed_work_sync(&hda->probe_work);
2458:	
2459:			clear_bit(chip->dev_index, probed_devs);
2460:			pci_set_drvdata(pci, NULL);
2461:			snd_card_free(card);
2462:		}
2463:	}
 SourceFile:sound/hda/controllers/intel.c]

125/4 2026/08/13 19:11 llm patch-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 33322
							output: 40
							thoughts: 32
						

Thoughts:
Okay, here's my interpretation of those thoughts, summarized from a first-person expert perspective:

**Concerning Card Resource Management**

Hmm, this code looks like it might have a critical bug. I'm focusing in on the memory management related to the `card` object. I see a `snd_card_free(card)` call, which suggests we're releasing the resources associated with this `card`. But, the concerning point is that the code doesn't seem to account for how the `card` is used, and more specifically whether or not any code is executed after freeing it. Is that correct? The call *should* be safe, but a quick inspection of the surrounding code would be in order.

Also, it triggers a separate train of thought. We also need to consider the broader scope of resource cleanup, so I'm also wondering about `soc_cleanup_card_resources`. Is this function *also* called at a relevant point, and does it *correctly* handle any dependencies or interactions with the `card` object? It's essential to ensure there's a consistent and coherent cleanup strategy here to avoid dangling pointers, memory leaks, or other resource-related issues. I'll need to dig deeper into the code to confirm my initial impression and verify that `snd_card_free(card)` is indeed safe, and the resource cleanup process is complete and correct.



126/4 2026/08/13 19:11 tool codesearch-definition-source
0m Args:
map[ContextFile:sound/soc/soc-core.c Name:soc_cleanup_card_resources]

Results:
map[SourceCode:1944:	static void soc_cleanup_card_resources(struct snd_soc_card *card)
1945:	{
1946:		struct snd_soc_pcm_runtime *rtd, *n;
1947:	
1948:		if (card->snd_card)
1949:			snd_card_disconnect_sync(card->snd_card);
1950:	
1951:		snd_soc_dapm_shutdown(card);
1952:	
1953:		/* release machine specific resources */
1954:		for_each_card_rtds(card, rtd)
1955:			if (rtd->initialized)
1956:				snd_soc_link_exit(rtd);
1957:		/* flush delayed work before removing DAIs and DAPM widgets */
1958:		snd_soc_flush_all_delayed_work(card);
1959:	
1960:		/* remove and free each DAI */
1961:		soc_remove_link_dais(card);
1962:		soc_remove_link_components(card);
1963:	
1964:		for_each_card_rtds_safe(card, rtd, n)
1965:			snd_soc_remove_pcm_runtime(card, rtd);
1966:	
1967:		/* remove auxiliary devices */
1968:		soc_remove_aux_devices(card);
1969:		soc_unbind_aux_dev(card);
1970:	
1971:		snd_soc_dapm_free(snd_soc_card_to_dapm(card));
1972:		soc_cleanup_card_debugfs(card);
1973:	
1974:		/* remove the card */
1975:		snd_soc_card_remove(card);
1976:	
1977:		if (card->snd_card) {
1978:			snd_card_free(card->snd_card);
1979:			card->snd_card = NULL;
1980:		}
1981:	}
 SourceFile:sound/soc/soc-core.c]

127/4 2026/08/13 19:11 llm patch-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 34284
							output: 40
							thoughts: 63
						

Thoughts:
Here's my summary, as though I'm thinking through this code snippet:

**Card Pointer Confusion**

Okay, so I see they're setting `card->snd_card = NULL;` in this context. But wait a minute... this `card` variable isn't the generic `snd_card` I'm used to; it's an `snd_soc_card`! So it looks like they're not trying to access a freed `snd_card` object after all. That bit seems safe. It looks like the `snd_card` pointer within the `snd_soc_card` struct is being set to NULL.

Hmm... but I should probably double-check, because that just seems too easy. What's the deal with `snd_card_free_on_error`? That could potentially throw a wrench in the works if I'm not careful. I need to make sure this code plays nicely with that function to be really sure I understand the memory management here.



128/4 2026/08/13 19:11 tool codesearch-definition-source
0m Args:
map[ContextFile:sound/core/init.c Name:snd_card_free_on_error]

Results:
map[SourceCode: 253:	/**
 254:	 * snd_card_free_on_error - a small helper for handling devm probe errors
 255:	 * @dev: the managed device object
 256:	 * @ret: the return code from the probe callback
 257:	 *
 258:	 * This function handles the explicit snd_card_free() call at the error from
 259:	 * the probe callback.  It's just a small helper for simplifying the error
 260:	 * handling with the managed devices.
 261:	 *
 262:	 * Return: zero if successful, or a negative error code
 263:	 */
 264:	int snd_card_free_on_error(struct device *dev, int ret)
 265:	{
 266:		struct snd_card *card;
 267:	
 268:		if (!ret)
 269:			return 0;
 270:		card = devres_find(dev, __snd_card_release, NULL, NULL);
 271:		if (card)
 272:			snd_card_free(card);
 273:		return ret;
 274:	}
 SourceFile:sound/core/init.c]

129/4 2026/08/13 19:11 llm patch-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 34952
							output: 53
							thoughts: 34
						

Thoughts:
Okay, here's my interpretation of those thoughts, summarized from a first-person expert perspective:

**Memory Management Concerns After Card Deallocation**

Alright, so I'm looking at this code and a red flag immediately pops up. It appears we're potentially accessing the `card` data structure after we've already called `snd_card_free(card)`. That's a classic memory corruption vulnerability, a dangling pointer issue. This is something I've seen bite people before, especially in audio driver code where things can get complex quickly. We know that `snd_card_free` is supposed to clean up the `card` structure and everything it manages, so any subsequent access is likely undefined behavior at best and a crash or security exploit at worst.

Now, my mind starts to race a bit... are there alternative means of managing this `card` allocation? Is there some function, like `snd_card_free_when_closed`, maybe? I'm curious if we can tell the card to clean itself up when it is no longer being used, to avoid issues such as these. I'll need to dig into the ALSA documentation and source code to see if there's a specific function available that will automatically clean up after the card is done. This might be a much more robust solution than relying on explicit `free` calls. I am sure it is not the only option, but it is one place to start. I'll need to research these alternative means.



130/4 2026/08/13 19:11 tool codesearch-find-references
0m Args:
map[ContextFile:sound/core/init.c IncludeSnippetLines:0 Name:snd_card_free_when_closed SourceTreePrefix:]

Results:
map[References:[map[ReferenceKind:calls ReferencingEntityKind:function ReferencingEntityName:bcd2000_disconnect SourceFile:sound/usb/bcd2000/bcd2000.c SourceLine:437] map[ReferenceKind:calls ReferencingEntityKind:function ReferencingEntityName:cx231xx_audio_fini SourceFile:drivers/media/usb/cx231xx/cx231xx-audio.c SourceLine:673] map[ReferenceKind:calls ReferencingEntityKind:function ReferencingEntityName:f_midi2_free_card SourceFile:drivers/usb/gadget/function/f_midi2.c SourceLine:1516] map[ReferenceKind:calls ReferencingEntityKind:function ReferencingEntityName:f_midi_unbind SourceFile:drivers/usb/gadget/function/f_midi.c SourceLine:1343] map[ReferenceKind:calls ReferencingEntityKind:function ReferencingEntityName:g_audio_cleanup SourceFile:drivers/usb/gadget/function/u_audio.c SourceLine:1451] map[ReferenceKind:calls ReferencingEntityKind:function ReferencingEntityName:go7007_snd_remove SourceFile:drivers/media/usb/go7007/snd-go7007.c SourceLine:265] map[ReferenceKind:calls ReferencingEntityKind:function ReferencingEntityName:hiface_chip_disconnect SourceFile:sound/usb/hiface/chip.c SourceLine:152] map[ReferenceKind:calls ReferencingEntityKind:function ReferencingEntityName:line6_disconnect SourceFile:sound/usb/line6/driver.c SourceLine:854] map[ReferenceKind:calls ReferencingEntityKind:function ReferencingEntityName:pcmidi_snd_terminate SourceFile:drivers/hid/hid-prodikeys.c SourceLine:726] map[ReferenceKind:calls ReferencingEntityKind:function ReferencingEntityName:snd_card_free SourceFile:sound/core/init.c SourceLine:658] map[ReferenceKind:calls ReferencingEntityKind:function ReferencingEntityName:snd_disconnect SourceFile:sound/usb/caiaq/device.c SourceLine:582] map[ReferenceKind:calls ReferencingEntityKind:function ReferencingEntityName:snd_us122l_disconnect SourceFile:sound/usb/usx2y/us122l.c SourceLine:573] map[ReferenceKind:calls ReferencingEntityKind:function ReferencingEntityName:snd_usx2y_disconnect SourceFile:sound/usb/usx2y/usbusx2y.c SourceLine:438] map[ReferenceKind:calls ReferencingEntityKind:function ReferencingEntityName:ua101_disconnect SourceFile:sound/usb/misc/ua101.c SourceLine:1315] map[ReferenceKind:calls ReferencingEntityKind:function ReferencingEntityName:usb6fire_chip_disconnect SourceFile:sound/usb/6fire/chip.c SourceLine:190] map[ReferenceKind:calls ReferencingEntityKind:function ReferencingEntityName:usb_audio_disconnect SourceFile:sound/usb/card.c SourceLine:1159] map[ReferenceKind:calls ReferencingEntityKind:function ReferencingEntityName:usbtv_audio_free SourceFile:drivers/media/usb/usbtv/usbtv-audio.c SourceLine:374] map[ReferenceKind:takes-address-of ReferencingEntityKind:global_variable ReferencingEntityName:__UNIQUE_ID_addressable_snd_card_free_when_closed_786 SourceFile:sound/core/init.c SourceLine:629] map[ReferenceKind:takes-address-of ReferencingEntityKind:global_variable ReferencingEntityName:__gendwarfksyms_ptr_snd_card_free_when_closed SourceFile:sound/core/init.c SourceLine:629] map[ReferenceKind:takes-address-of ReferencingEntityKind:global_variable ReferencingEntityName:__gendwarfksyms_ptr_snd_card_free_when_closed SourceFile:sound/core/init.c SourceLine:629]] TruncatedOutput:false]

131/4 2026/08/13 19:11 llm patch-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 36551
							output: 36
							thoughts: 11
						

Thoughts:
Okay, here's my attempt at summarizing that thought process, keeping in mind I'm speaking to a fellow expert:

**Investigating `usb_audio_disconnect`**

Alright, time to dive in. My mind immediately goes to `usb_audio_disconnect`. Let's get right to it. I want to check out exactly what's happening within this function and how it's being handled. There are likely several key aspects to consider here, like resource cleanup, signalling, and the overall state transitions of the audio device within the USB subsystem. I'm going to start by tracing the function's call sites and understand the conditions that trigger it. Then, I’ll dissect its internal logic to fully grasp the disconnection procedure. I need to make sure everything's being handled gracefully and that there are no obvious points for potential errors or resource leaks. Let's see what we can find.



132/4 2026/08/13 19:11 tool codesearch-definition-source
0m Args:
map[ContextFile:sound/usb/card.c Name:usb_audio_disconnect]

Results:
map[SourceCode:1149:	static void usb_audio_disconnect(struct usb_interface *intf)
1150:	{
1151:		struct snd_usb_audio *chip = usb_get_intfdata(intf);
1152:		struct snd_card *card;
1153:	
1154:		if (chip == USB_AUDIO_IFACE_UNUSED)
1155:			return;
1156:	
1157:		card = chip->card;
1158:		if (__usb_audio_disconnect(intf, chip, card))
1159:			snd_card_free_when_closed(card);
1160:	}
 SourceFile:sound/usb/card.c]

133/4 2026/08/13 19:11 llm patch-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 36993
							output: 49
							thoughts: 179
						

Thoughts:
**My Analysis of Potential Use-After-Free Vulnerabilities**

Okay, so I'm looking at this code and immediately I see a potential issue. It seems we're not supposed to access `card` *after* `snd_card_free_when_closed(card)`. That's a classic source of use-after-free bugs. I need to be absolutely certain we're not doing anything like that.

Alright, let's think this through. What about `snd_card_do_free`? That function is crucial; where is it called from? Ah, it's called by `release_card_device`. Okay, *is* there anywhere else? I need to be methodical here. Let's see... no, `snd_card_do_free` is *static* and only called by `release_card_device`, which is good.

Wait a second, let me double check that `release_card_device` function to be certain there's no subtle access after the free:

```c
static void release_card_device(struct device *dev)
{
	snd_card_do_free(dev_to_snd_card(dev));
}
```

Okay, phew, it doesn't access `card` after the free! I'm feeling better about that line of investigation.

Now, let's zoom out a bit. It is possible there are other instances of access that I'm missing! Specifically, let's see, what about `card->managed`? Is that accessed *anywhere* else in the code, and could that access be after `snd_card_do_free`? That's what I really need to ascertain next.



134/4 2026/08/13 19:11 tool codesearch-find-references
0m Args:
map[ContextFile:sound/core/init.c IncludeSnippetLines:0 Name:snd_card::managed SourceTreePrefix:]

Results:
map[References:[map[ReferenceKind:reads ReferencingEntityKind:function ReferencingEntityName:snd_card_do_free SourceFile:sound/core/init.c SourceLine:604] map[ReferenceKind:reads ReferencingEntityKind:function ReferencingEntityName:snd_card_init SourceFile:sound/core/init.c SourceLine:309] map[ReferenceKind:reads ReferencingEntityKind:function ReferencingEntityName:snd_card_register SourceFile:sound/core/init.c SourceLine:891] map[ReferenceKind:reads ReferencingEntityKind:function ReferencingEntityName:snd_card_register SourceFile:sound/core/init.c SourceLine:895] map[ReferenceKind:writes ReferencingEntityKind:function ReferencingEntityName:snd_devm_card_new SourceFile:sound/core/init.c SourceLine:240]] TruncatedOutput:false]

135/4 2026/08/13 19:11 llm patch-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 37863
							output: 36
							thoughts: 11
						

Thoughts:
Here's my attempt at summarizing the thought process, tailored for an expert audience:

**Analyzing `snd_card_register`**

Okay, time to dive into `snd_card_register`. Let's assume it's a critical registration point for an ALSA sound card. My initial thought is to quickly mentally run through the key data structures and function calls involved. I'm immediately thinking about:

*   **The arguments:** What kind of data structure is it taking as input? Is it a pointer to a `struct snd_card`? A handle? How does it handle errors on failure, is it returning an error code? Or are exceptions involved (doubtful in most of these kernels)? What about resource allocation within the registration? Is it allocating a device node?
*   **The implications:** What subsystems will depend on this registration? It's the entry point, so almost everything, right? PCM streams, mixers, control interfaces, DMA engines – they'll all likely be hanging off this. Are we talking about a simple registration, or is there a complex interaction with other ALSA subsystems, like the sequencer or MIDI?
*   **Concurrency:** What about locking? Is `snd_card_register` protected with a mutex? Is there a spinlock at a lower level? Is this a potential critical section, needing thorough review to prevent race conditions during concurrent device probing and registration? I need to check how it's being called, by what kind of processes and interrupts.
*   **Error Handling:** What's the error handling like? How are resource allocation failures handled? What are the potential failure points within the function? Are the functions handling resource allocation properly cleaned up in case an error occurs?
*   **Dependencies:** How tightly coupled is it to specific hardware platforms or architectures? Is it highly generic, or does it have a lot of conditional compilation based on the hardware?
*   **Device Node Creation and Cleanup:** How is device node creation handled? How are minor numbers being assigned? Is there a corresponding unregister function to ensure proper cleanup on module unload or device removal? Are there any potential issues with device node names, permissions, or ownership? I also need to make sure the cleanup is robust. Any potential memory leaks or resource leaks?
*   **Potential vulnerabilities:** Are there any known security issues that are relevant here? Does this function open up any attack vectors by creating a new device node?

I'm starting to build a mental map of the key components. I'll need to drill down into the implementation to confirm these assumptions and dig for anything unexpected. Time to start the code review.



136/4 2026/08/13 19:11 tool codesearch-definition-source
0m Args:
map[ContextFile:sound/core/init.c Name:snd_card_register]

Results:
map[SourceCode: 867:	/**
 868:	 *  snd_card_register - register the soundcard
 869:	 *  @card: soundcard structure
 870:	 *
 871:	 *  This function registers all the devices assigned to the soundcard.
 872:	 *  Until calling this, the ALSA control interface is blocked from the
 873:	 *  external accesses.  Thus, you should call this function at the end
 874:	 *  of the initialization of the card.
 875:	 *
 876:	 *  Return: Zero otherwise a negative error code if the registration failed.
 877:	 */
 878:	int snd_card_register(struct snd_card *card)
 879:	{
 880:		int err;
 881:	
 882:		if (snd_BUG_ON(!card))
 883:			return -EINVAL;
 884:	
 885:		if (!card->registered) {
 886:			err = device_add(&card->card_dev);
 887:			if (err < 0)
 888:				return err;
 889:			card->registered = true;
 890:		} else {
 891:			if (card->managed)
 892:				devm_remove_action(card->dev, trigger_card_free, card);
 893:		}
 894:	
 895:		if (card->managed) {
 896:			err = devm_add_action(card->dev, trigger_card_free, card);
 897:			if (err < 0)
 898:				return err;
 899:		}
 900:	
 901:		err = snd_device_register_all(card);
 902:		if (err < 0)
 903:			return err;
 904:		scoped_guard(mutex, &snd_card_mutex) {
 905:			if (snd_cards[card->number]) {
 906:				/* already registered */
 907:				return snd_info_card_register(card); /* register pending info */
 908:			}
 909:			if (*card->id) {
 910:				/* make a unique id name from the given string */
 911:				char tmpid[sizeof(card->id)];
 912:	
 913:				memcpy(tmpid, card->id, sizeof(card->id));
 914:				snd_card_set_id_no_lock(card, tmpid, tmpid);
 915:			} else {
 916:				/* create an id from either shortname or longname */
 917:				const char *src;
 918:	
 919:				src = *card->shortname ? card->shortname : card->longname;
 920:				snd_card_set_id_no_lock(card, src,
 921:							retrieve_id_from_card_name(src));
 922:			}
 923:			snd_cards[card->number] = card;
 924:		}
 925:		err = snd_info_card_register(card);
 926:		if (err < 0)
 927:			return err;
 928:	
 929:	#if IS_ENABLED(CONFIG_SND_MIXER_OSS)
 930:		if (snd_mixer_oss_notify_callback)
 931:			snd_mixer_oss_notify_callback(card, SND_MIXER_OSS_NOTIFY_REGISTER);
 932:	#endif
 933:		return 0;
 934:	}
 SourceFile:sound/core/init.c]

137/4 2026/08/13 19:11 llm patch-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 39482
							output: 42
							thoughts: 72
						

Thoughts:
Okay, here's my take on those thoughts, framed as my own mental processing:

**Analyzing `complete` Calls in Sound Subsystem Code**

Alright, everything seems to be progressing smoothly here. I need to make sure we're handling all cases where an object is accessed after a `complete` call. Gotta be thorough. Let's see... I've got a mental checklist going.

First, I'll search for all calls to `complete` followed by subsequent object access. Seems like a solid approach to catch potential race conditions or other asynchronous access problems.

I ran a quick `complete(.*)` search within the `sound/` directory. That turned up a few interesting candidates. Time to dive into the code.

Let's start with `sound/soc/soc-component.c` and specifically examine the `snd_soc_component_async_complete` function. This seems like a likely area for further investigation, especially since it's an asynchronous completion function. I'll need to scrutinize how and where the completion signal is used in relation to any shared data or resources the function might operate on. Okay, let's dig into that code and see what we can find. I'm looking for a potential vulnerability in that function, or in functions that may call it.



138/4 2026/08/13 19:11 tool codesearch-definition-source
0m Args:
map[ContextFile:sound/soc/soc-component.c Name:snd_soc_component_async_complete]

Results:
map[SourceCode: 864:	/**
 865:	 * snd_soc_component_async_complete() - Ensure asynchronous I/O has completed
 866:	 * @component: Component for which to wait
 867:	 *
 868:	 * This function blocks until all asynchronous I/O which has previously been
 869:	 * scheduled using snd_soc_component_update_bits_async() has completed.
 870:	 */
 871:	void snd_soc_component_async_complete(struct snd_soc_component *component)
 872:	{
 873:		if (component->regmap)
 874:			regmap_async_complete(component->regmap);
 875:	}
 SourceFile:sound/soc/soc-component.c]

139/4 2026/08/13 19:11 llm patch-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 40088
							output: 51
							thoughts: 46
						

Thoughts:
Okay, here's my take on those thoughts, framed as an expert's internal monologue:

**Checking for Completion Signaling**

Alright, I see this routine is in a holding pattern. It's waiting for something to happen, but it's not actually *signaling* the completion of a DMA transfer or a buffer processing event. That's the key. Where's the signal?

Let me double-check the `fsl_asrc_dma_complete` function within `sound/soc/fsl/fsl_asrc_dma.c`. That's the logical place to look for the actual completion mechanism. It needs to be reviewed to see what flags are being set, what callbacks are happening, if the interrupt handling is correct. Essentially, I'm trying to figure out if we're *actually* informing the system that the work is done, or if it's just getting hung up in some limbo state. Time to dig in and confirm the critical path.



140/4 2026/08/13 19:11 tool codesearch-definition-source
0m Error:
log-in to see details

Args:
map[ContextFile:sound/soc/fsl/fsl_asrc_dma.c Name:fsl_asrc_dma_complete]

Results:
map[SourceCode: SourceFile:]

141/4 2026/08/13 19:11 llm patch-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 40418
							output: 44
							thoughts: 9
						

Thoughts:
Here's your summary:

**Initial Assessment: Static Function**

Okay, so I'm looking at this snippet, and my first thought is, "Ah, it's a static function." That immediately tells me a few things. It's associated with the *class* itself, rather than a particular *instance* of the class. Therefore, I need to consider how this function interacts with class-level data or methods. It won't have access to non-static member variables or `this`. I need to think about how that restriction impacts its potential uses and any potential design implications. Is it being used correctly given this constraint? What is it attempting to accomplish? I need to analyze its internal logic in light of that "static-ness."



142/4 2026/08/13 19:12 tool read-file
0m Args:
map[File:sound/soc/fsl/fsl_asrc_dma.c FirstLine:40 LineCount:20]

Results:
map[Contents:  40:	}
  41:	
  42:	static void fsl_asrc_dma_complete(void *arg)
  43:	{
  44:		struct snd_pcm_substream *substream = arg;
  45:		struct snd_pcm_runtime *runtime = substream->runtime;
  46:		struct fsl_asrc_pair *pair = runtime->private_data;
  47:	
  48:		pair->pos += snd_pcm_lib_period_bytes(substream);
  49:		if (pair->pos >= snd_pcm_lib_buffer_bytes(substream))
  50:			pair->pos = 0;
  51:	
  52:		snd_pcm_period_elapsed(substream);
  53:	}
  54:	
  55:	static int fsl_asrc_dma_prepare_and_submit(struct snd_pcm_substream *substream,
  56:						   struct snd_soc_component *component)
  57:	{
  58:		u8 dir = substream->stream == SNDRV_PCM_STREAM_PLAYBACK ? OUT : IN;
  59:		struct snd_pcm_runtime *runtime = substream->runtime;
]

143/4 2026/08/13 19:12 llm patch-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 40955
							output: 45
							thoughts: 51
						

Thoughts:
Okay, here's my take on those thoughts, tailored for an expert audience:

**DMA Callback Conundrum**

Alright, so I'm looking at this DMA callback, and the immediate thought is: this isn't where we call `complete()`. That's a key point. We need to be absolutely sure about that because that's a common source of bugs with DMA. Where are we handling the completion event?

Now, let's go digging into the `sound/soc/fsl/fsl_asrc_m2m.c` file and specifically the `asrc_input_dma_callback` function. I need to refresh my memory on the flow there. I'm assuming that this is the entry point, the critical point where the DMA transfer completes, and we need to determine where we might signal completion or if we're dealing with a different type of completion mechanism. Let's see how the interrupt is set up, what's being done inside that callback, and make sure we aren't missing any key signal for our processing chain. I'll need to confirm that this function behaves as I expect, and that it isn't, in fact, responsible for the final complete call.



144/4 2026/08/13 19:12 tool read-file
0m Args:
map[File:sound/soc/fsl/fsl_asrc_m2m.c FirstLine:30 LineCount:20]

Results:
map[Contents:  30:	/* dma complete callback */
  31:	static void asrc_input_dma_callback(void *data)
  32:	{
  33:		struct fsl_asrc_pair *pair = (struct fsl_asrc_pair *)data;
  34:	
  35:		complete(&pair->complete[IN]);
  36:	}
  37:	
  38:	/* dma complete callback */
  39:	static void asrc_output_dma_callback(void *data)
  40:	{
  41:		struct fsl_asrc_pair *pair = (struct fsl_asrc_pair *)data;
  42:	
  43:		complete(&pair->complete[OUT]);
  44:	}
  45:	
  46:	/**
  47:	 *asrc_read_last_fifo: read all the remaining data from FIFO
  48:	 *@pair: Structure pointer of fsl_asrc_pair
  49:	 *@dma_vaddr: virtual address of capture buffer
]

145/4 2026/08/13 19:12 llm patch-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 41597
							output: 43
							thoughts: 44
						

Thoughts:
Okay, here's my take on those thoughts, tailored for an expert audience:

**Analyzing the Audio RPMSG Completion Flow**

Right, so I see this code essentially relies on a `complete` call. That suggests the core mechanism for signaling completion within this RPMSG audio driver relies on a completion object. The implication is that after this `complete` call is issued, there's no further direct access to whatever resources or context was involved in the asynchronous operation. That's a common pattern, but it means everything that needs to happen *after* that signal has to be managed correctly either within the context of the completion itself, or by mechanisms that are set up *before* the `complete` call is made. Otherwise, you're going to have race conditions or access violations.

My next step is to drill down into the callback function at `sound/soc/fsl/imx-audio-rpmsg.c` which I believe is `imx_audio_rpmsg_cb`. I need to understand what's *happening* inside that callback. Is it freeing resources? Signaling a higher level completion? Is it handling errors? I need to understand the full lifecycle of this RPMSG-based audio operation to confidently assess whether it has the correct control flow and error handling. I'm looking for where the completion mechanism is triggered. Any potential areas for deadlock will also have my attention.



146/4 2026/08/13 19:12 tool read-file
0m Args:
map[File:sound/soc/fsl/imx-audio-rpmsg.c FirstLine:50 LineCount:20]

Results:
map[Contents:  50:				msg = &info->msg[RX_PERIOD_DONE + MSG_TYPE_A_NUM];
  51:				msg->r_msg.param.buffer_tail =
  52:							r_msg->param.buffer_tail;
  53:				msg->r_msg.param.buffer_tail %= info->num_period[1];
  54:				spin_unlock_irqrestore(&info->lock[RX], flags);
  55:				info->callback[RX](info->callback_param[RX]);
  56:				break;
  57:			default:
  58:				dev_warn(&rpdev->dev, "unknown msg command\n");
  59:				break;
  60:			}
  61:			break;
  62:		case MSG_TYPE_B:
  63:			/* TYPE B is response msg */
  64:			memcpy(&info->r_msg, r_msg, sizeof(struct rpmsg_r_msg));
  65:			complete(&info->cmd_complete);
  66:			break;
  67:		default:
  68:			dev_warn(&rpdev->dev, "unknown msg type\n");
  69:			break;
]

147/4 2026/08/13 19:12 llm patch-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 42293
							output: 40
							thoughts: 35
						

Thoughts:
Okay, here's my interpretation of those thoughts, tailored for an expert audience, presented in the first person:

**Post-Completion Access Check**

Right, so I'm thinking about a scenario where access is denied after something has been marked as 'complete'. That sounds like a potential race condition or maybe a premature state transition issue. I need to dig deeper. I'm immediately drawn to the possibility that the issue relates to an audio framework, specifically the Intel AVS (Audio Voice Service) setup. Let's see...I'll check the `sound/soc/intel/avs/ipc.c` file and, more specifically, the `avs_dsp_process_notification` function. I have a hunch that the notification handling within that function is somehow related to the post-completion access restrictions. I need to understand how notifications are processed after a completion event, to see if there's a window where access is incorrectly restricted or if the notification itself is the source of the access denial. I'm betting that the IPC (Inter-Process Communication) and its handling of notifications here are the likely culprit. Time to get coding...



148/4 2026/08/13 19:12 tool read-file
0m Args:
map[File:sound/soc/intel/avs/ipc.c FirstLine:260 LineCount:20]

Results:
map[Contents: 260:			memcpy_fromio(data, avs_uplink_addr(adev), data_size);
 261:			trace_avs_msg_payload(data, data_size);
 262:		}
 263:	
 264:		/* Perform notification-specific operations. */
 265:		switch (msg.notify_msg_type) {
 266:		case AVS_NOTIFY_FW_READY:
 267:			dev_dbg(adev->dev, "FW READY 0x%08x\n", msg.primary);
 268:			adev->ipc->ready = true;
 269:			complete(&adev->fw_ready);
 270:			break;
 271:	
 272:		case AVS_NOTIFY_LOG_BUFFER_STATUS:
 273:			avs_log_buffer_status_locked(adev, &msg);
 274:			break;
 275:	
 276:		case AVS_NOTIFY_EXCEPTION_CAUGHT:
 277:			avs_dsp_exception_caught(adev, &msg);
 278:			break;
 279:	
]

149/4 2026/08/13 19:12 llm patch-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 42929
							output: 40
							thoughts: 35
						

Thoughts:
Okay, here's my interpretation of those thoughts, tailored for an expert audience, presented in the first person:

**Navigating the Aftermath: Limited Access & Response Processing**

Right, so I'm hitting a roadblock. It seems like I've lost access after the "complete" stage. My focus needs to be on understanding *why* that access is lost, and ideally, how to regain it or circumvent the problem.

Given the context, my initial suspicion lies within the audio subsystem, specifically the interaction with the audio DSP. Let me check `sound/soc/intel/avs/ipc.c`. My primary interest here is in `avs_dsp_process_response`. That function will be critical for deciphering what's happening after that "complete" state. I need to understand how the response is handled, how errors are detected (or not detected), and if there is any indication of the access loss in any response to the host. Is there a timeout? Bad data? A protocol mismatch? A memory issue? The response processing is probably a logical choke point to narrow down what's going awry. Let's dig in.



150/4 2026/08/13 19:12 tool read-file
0m Args:
map[File:sound/soc/intel/avs/ipc.c FirstLine:295 LineCount:20]

Results:
map[Contents: 295:		if (avs_msg_is_reply(header)) {
 296:			/* Response processing is invoked from IRQ thread. */
 297:			spin_lock_irq(&ipc->rx_lock);
 298:			avs_dsp_receive_rx(adev, header);
 299:			ipc->rx_completed = true;
 300:			spin_unlock_irq(&ipc->rx_lock);
 301:		} else {
 302:			avs_dsp_process_notification(adev, header);
 303:		}
 304:	
 305:		complete(&ipc->busy_completion);
 306:	}
 307:	
 308:	static bool avs_ipc_is_busy(struct avs_ipc *ipc)
 309:	{
 310:		struct avs_dev *adev = to_avs_dev(ipc->dev);
 311:		const struct avs_spec *const spec = adev->spec;
 312:		u32 hipc_rsp;
 313:	
 314:		hipc_rsp = snd_hdac_adsp_readl(adev, spec->hipc->rsp_offset);
]

151/4 2026/08/13 19:12 llm patch-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 43585
							output: 40
							thoughts: 35
						

Thoughts:
Okay, here's my interpretation of those thoughts, tailored for an expert audience, presented in the first person:

**Post-Completion Access Review**

Right, the system's indicated "complete," but I need to make absolutely sure there's no lingering access or resource hold. I need to methodically verify this. I've got to revisit the code paths. Specifically, I'm thinking about the implications of anything left over after this "complete" trigger.

My immediate focus shifts to `sound/soc/intel/catpt/ipc.c`, and specifically the `catpt_dsp_process_response` function within that file. This is where the crucial DSP response processing occurs in the context of the Catpt driver. I need to meticulously review what happens within that function, especially in the cleanup or resource release sections, to see whether any critical access paths might be inadvertently left open, or whether any resources are not properly freed in the wake of the 'complete' event. This could involve checking how the buffers are handled, any mutexes used, or whether callbacks are invoked as they ought to be. This is where the potential risks are. I'll need to look closely at the memory management, and inter-process communication that occur in this context.



152/4 2026/08/13 19:12 tool read-file
0m Args:
map[File:sound/soc/intel/catpt/ipc.c FirstLine:200 LineCount:20]

Results:
map[Contents: 200:		if (msg.fw_ready) {
 201:			struct catpt_fw_ready config;
 202:			/* to fit 32b header original address is shifted right by 3 */
 203:			u32 off = msg.mailbox_address << 3;
 204:	
 205:			memcpy_fromio(&config, cdev->lpe_ba + off, sizeof(config));
 206:			trace_catpt_ipc_payload((u8 *)&config, sizeof(config));
 207:	
 208:			dev_dbg(cdev->dev, "FW READY 0x%08x\n", header);
 209:			catpt_ipc_arm(ipc, &config);
 210:			complete(&cdev->fw_ready);
 211:			return;
 212:		}
 213:	
 214:		switch (msg.global_msg_type) {
 215:		case CATPT_GLB_REQUEST_CORE_DUMP:
 216:			dev_err(cdev->dev, "ADSP device coredump received\n");
 217:			ipc->ready = false;
 218:			catpt_coredump(cdev);
 219:	
]

153/4 2026/08/13 19:12 llm patch-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 44271
							output: 42
							thoughts: 33
						

Thoughts:
Okay, here's my interpretation of those thoughts, summarized from a first-person expert perspective:

**Debugging After Completion: A Deep Dive**

Alright, the system's indicated completion, and now I'm facing a access-related issue. That usually means a critical resource might have locked up after a specific completion state. My gut feeling is telling me it's likely related to the 'complete' state of the subsystem I'm focusing on. Time to get down to it.

Since the problem surfaced post-completion, the first place I'm going to look is in the sound subsystem. Specifically, my mind immediately jumps to `sound/soc/sdca/sdca_fdl.c`, focusing on the `fdl_end` function. That function is a likely candidate, as it often handles final cleanup and resource release after a data transfer or operation. I need to understand what's happening within `fdl_end` to see if a resource is released too early, held onto incorrectly, or if some other state transition is missed there. It is the logical location that indicates completion, and must be investigated first.



154/4 2026/08/13 19:12 tool read-file
0m Args:
map[File:sound/soc/sdca/sdca_fdl.c FirstLine:310 LineCount:20]

Results:
map[Contents: 310:		return NULL;
 311:	}
 312:	
 313:	static void fdl_end(struct sdca_interrupt *interrupt)
 314:	{
 315:		struct fdl_state *fdl_state = interrupt->priv;
 316:	
 317:		if (!fdl_state->set)
 318:			return;
 319:	
 320:		fdl_state->set = NULL;
 321:	
 322:		pm_runtime_put(interrupt->dev);
 323:		complete(&fdl_state->done);
 324:	
 325:		dev_dbg(interrupt->dev, "completed FDL process\n");
 326:	}
 327:	
 328:	static void sdca_fdl_timeout_work(struct work_struct *work)
 329:	{
]

155/4 2026/08/13 19:12 llm patch-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 44847
							output: 57
							thoughts: 102
						

Thoughts:
**Analyzing Potential Race Conditions in FDL Completion**

Okay, so I'm looking at this `fdl_end` function. It seems straightforward enough: it signals completion via `complete(&fdl_state->done)` and then logs a debug message referencing `interrupt->dev`. My immediate concern is the order of these operations. We're accessing `interrupt->dev` *after* we've signaled that the work is done. This raises a red flag. Specifically, I need to know if either `interrupt` or `fdl_state` could potentially be freed by another thread that's waiting on `fdl_state->done`. If either one *could* be freed, then we've got a classic use-after-free scenario, and the debug message could crash the system, or worse. The debug output is of far less consequence than potential data corruption. So, my next step is clear: I need to trace where that `fdl_state->done` completion is actually being waited on. I need to see if the thread waiting on it has the potential to free either of those structures. Let's dig into the code and find the `wait_for_completion` call, and what's around it.



156/4 2026/08/13 19:12 tool codesearch-find-references
0m Args:
map[ContextFile:sound/soc/sdca/sdca_fdl.c IncludeSnippetLines:0 Name:fdl_state::done SourceTreePrefix:]

Results:
map[References:<nil> TruncatedOutput:false]

157/4 2026/08/13 19:12 llm patch-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 45282
							output: 41
							thoughts: 16
						

Thoughts:
Okay, here's my summary, in the first person, as requested:

**Navigating the Workflow**

Hmm, I'm at a point where I need to check the status, or at least how the process is advancing. What’s the next logical step to identify how it’s progressing? Let me think... what would I normally use to determine where things stand? Right, I need to check the state. Let me look for indicators of where the system currently is. I'm going to search for something like `fdl_state` or perhaps a flag indicating that the process is `done`. That's where the next clue should be.



158/4 2026/08/13 19:12 tool grepper
0m Args:
map[Expression:wait_for_completion.*done PathPrefix:sound/soc/sdca/sdca_fdl.c]

Results:
map[Output:sound/soc/sdca/sdca_fdl.c=74=int sdca_fdl_sync(struct device *dev, struct sdca_function_data *function,
--
sound/soc/sdca/sdca_fdl.c-113-
sound/soc/sdca/sdca_fdl.c:114:			time = wait_for_completion_timeout(&fdl_state->done,
sound/soc/sdca/sdca_fdl.c-115-							   done_timeout);
]

159/4 2026/08/13 19:12 llm patch-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 45618
							output: 45
							thoughts: 14
						

Thoughts:
Okay, let's dive into this `sdca_fdl_sync` situation.

**Analyzing `sdca_fdl_sync`**

Alright, so `sdca_fdl_sync`… I need to understand its function and implications. My initial thought is to break it down. What's the "sdca" part indicative of? Likely related to stochastic dual coordinate ascent, which immediately suggests optimization techniques. "Fdl" likely refers to something related to feature delta learning, or perhaps a similar process of feature adjustment during training. And the key word, "sync," is what I want to understand. This probably isn't a simple operation. Considering the name, I'd say that synchronization is crucial here, and likely in the context of a distributed learning or model update process.

My expert intuition suggests this could be about coordinating updates from different sources or threads when optimizing a model. The features are being tweaked somehow (FDL), and "sync" is about keeping everyone on the same page. Perhaps it involves locking or merging updates at specific points, preventing data races or conflicts? Does it involve some sort of barrier or consensus protocol? I'm curious about the specific synchronization mechanisms used, as these aspects directly impact performance and scalability. This is a crucial area I need to understand to provide insight.

I'm thinking, is this a blocking or non-blocking synchronization? Does the sync happen frequently, or is it batched? What happens if one part of the sync fails? Is there any fault tolerance built in? To properly assess this I will need to look deeper into the code, and understand the flow.



160/4 2026/08/13 19:12 tool codesearch-definition-source
0m Error:
log-in to see details

Args:
map[ContextFile:sound/soc/sdca/sdca_fdl.c Name:sdca_fdl_sync]

Results:
map[SourceCode: SourceFile:]

161/4 2026/08/13 19:12 llm patch-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 46036
							output: 42
							thoughts: 9
						

Thoughts:
Okay, here's the summary, rendered in the first person, assuming the user is an expert:

**Reflecting on the Nature of a Concept**

Right, not a definition. I'm trying to pin this down, but it's clear it's *not* a straightforward definition. That's good to realize early. It means I need to adjust my approach. Am I looking at the inherent properties? The context? Or perhaps the relationships this thing has with other concepts? The "not-a-definition-ness" itself informs how I should now proceed. I need to figure out what it *is*, but a definition won't unlock it. I'll need to dig deeper.



162/4 2026/08/13 19:12 tool read-file
0m Args:
map[File:sound/soc/sdca/sdca_fdl.c FirstLine:100 LineCount:40]

Results:
map[Contents: 100:				/*
 101:				 * Looking for timeout without any new FDL requests
 102:				 * to imply the device has completed initial
 103:				 * firmware setup. Alas the specification doesn't
 104:				 * have any mechanism to detect this.
 105:				 */
 106:				time = wait_for_completion_timeout(&fdl_state->begin,
 107:								   begin_timeout);
 108:				if (!time) {
 109:					dev_dbg(dev, "no new FDL starts\n");
 110:					nfdl--;
 111:					continue;
 112:				}
 113:	
 114:				time = wait_for_completion_timeout(&fdl_state->done,
 115:								   done_timeout);
 116:				if (!time) {
 117:					dev_err(dev, "timed out waiting for FDL to complete\n");
 118:					goto error;
 119:				}
 120:			}
 121:	
 122:			if (!nfdl)
 123:				return 0;
 124:		}
 125:	
 126:		dev_err(dev, "too many FDL requests\n");
 127:	
 128:	error:
 129:		for (j = 0; j < SDCA_MAX_INTERRUPTS; j++) {
 130:			struct sdca_interrupt *interrupt = &info->irqs[j];
 131:			struct fdl_state *fdl_state;
 132:	
 133:			if (interrupt->function != function ||
 134:			    !interrupt->entity || !interrupt->control ||
 135:			    interrupt->entity->type != SDCA_ENTITY_TYPE_XU ||
 136:			    interrupt->control->sel != SDCA_CTL_XU_FDL_CURRENTOWNER)
 137:				continue;
 138:	
 139:			disable_irq(interrupt->irq);
]

163/4 2026/08/13 19:12 llm patch-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 46811
							output: 42
							thoughts: 70
						

Thoughts:
Here's my summary, as I see it:

**Analyzing the Memory Management in `sdca_fdl_sync`**

Okay, so `sdca_fdl_sync` isn't actually freeing the `fdl_state` or `interrupt` data structures; it's designed to *wait* for something else to handle that clean-up. This means it's inherently safe from a premature free, or double-free, perspective. That's good; it confirms my initial understanding. However, I want to be *absolutely* sure.

Now, to solidify this, I'm going to shift my focus to `sound/soc/codecs/wm0010.c` and specifically the `wm0010_boot_xfer_complete` function. I want to see how that codec is handling its own boot transfer completion – it should be a solid point to confirm how the resources are actually released in a related context. Checking `wm0010_boot_xfer_complete` in relation to `sdca_fdl_sync` will help create a mental model of the interdependencies between the two in this memory management space.



164/4 2026/08/13 19:12 tool read-file
0m Args:
map[File:sound/soc/codecs/wm0010.c FirstLine:205 LineCount:20]

Results:
map[Contents: 205:	static void wm0010_boot_xfer_complete(void *data)
 206:	{
 207:		struct wm0010_boot_xfer *xfer = data;
 208:		struct snd_soc_component *component = xfer->component;
 209:		struct wm0010_priv *wm0010 = snd_soc_component_get_drvdata(component);
 210:		u32 *out32 = xfer->t.rx_buf;
 211:		int i;
 212:	
 213:		if (xfer->m.status != 0) {
 214:			dev_err(component->dev, "SPI transfer failed: %d\n",
 215:				xfer->m.status);
 216:			wm0010_mark_boot_failure(wm0010);
 217:			if (xfer->done)
 218:				complete(xfer->done);
 219:			return;
 220:		}
 221:	
 222:		for (i = 0; i < xfer->t.len / 4; i++) {
 223:			dev_dbg(component->dev, "%d: %04x\n", i, out32[i]);
 224:	
]

165/4 2026/08/13 19:12 llm patch-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 47547
							output: 42
							thoughts: 38
						

Thoughts:
Okay, here's my interpretation of those thoughts, presented as a personal thought process, as requested:

**Debugging a WM0010 Codec Interrupt Issue**

Right, so, I'm staring at this thing and it just... returns after `complete`. That's a classic symptom of an interrupt handler not being quite right, or maybe the interrupt isn't firing as expected. Or perhaps the completion signal isn't reaching the driver. I need to get to the bottom of this.

Okay, let's dive into the `sound/soc/codecs/wm0010.c` file. Specifically, I'm going to focus on the `wm0010_irq` interrupt handler function. That's the likely culprit here. I need to see what's happening when an interrupt fires on this codec. I'm going to look for the typical interrupt handling procedures: checking interrupt sources, acknowledging interrupts, handling the condition that triggered it, clearing the interrupt, and potentially waking up any waiting tasks. I need to understand the control flow here. Does it acknowledge the interrupt correctly? Is it handling the condition properly or maybe it is ignoring something that should trigger an interrupt? I will be looking closely for race conditions. If I can understand what's happening within the interrupt handler, I will be one step closer to solving this issue.



166/4 2026/08/13 19:12 tool read-file
0m Args:
map[File:sound/soc/codecs/wm0010.c FirstLine:827 LineCount:20]

Results:
map[Contents: 827:	static irqreturn_t wm0010_irq(int irq, void *data)
 828:	{
 829:		struct wm0010_priv *wm0010 = data;
 830:	
 831:		switch (wm0010->state) {
 832:		case WM0010_OUT_OF_RESET:
 833:		case WM0010_BOOTROM:
 834:		case WM0010_STAGE2:
 835:			spin_lock(&wm0010->irq_lock);
 836:			complete(&wm0010->boot_completion);
 837:			spin_unlock(&wm0010->irq_lock);
 838:			return IRQ_HANDLED;
 839:		default:
 840:			return IRQ_NONE;
 841:		}
 842:	
 843:		return IRQ_NONE;
 844:	}
 845:	
 846:	static int wm0010_probe(struct snd_soc_component *component)
]

167/4 2026/08/13 19:13 llm patch-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 48235
							output: 43
							thoughts: 54
						

Thoughts:
**Analyzing a Potential Race Condition**

Okay, so I'm seeing a potential issue here. The code appears to be accessing `wm0010->irq_lock` *after* the `complete` function has been called. My initial thought is: Could `wm0010` have been freed by another thread *before* this access, specifically, by the thread that's waiting on `boot_completion`? That's the critical question. I need to trace the execution flow. The key is understanding when and where `boot_completion` is actually waited on. That's where I need to focus my attention to determine if this is a valid race condition. Let's dig into the code and find the `wait` calls for `boot_completion`.



168/4 2026/08/13 19:13 tool grepper
0m Args:
map[Expression:wait_for_completion.*boot_completion PathPrefix:sound/soc/codecs/wm0010.c]

Results:
map[Output:sound/soc/codecs/wm0010.c=557=static int wm0010_boot(struct snd_soc_component *component)
--
sound/soc/codecs/wm0010.c-607-
sound/soc/codecs/wm0010.c:608:	if (!wait_for_completion_timeout(&wm0010->boot_completion,
sound/soc/codecs/wm0010.c-609-					 msecs_to_jiffies(20)))
--
sound/soc/codecs/wm0010.c-619-
sound/soc/codecs/wm0010.c:620:	if (!wait_for_completion_timeout(&wm0010->boot_completion,
sound/soc/codecs/wm0010.c-621-					 msecs_to_jiffies(20)))
]

169/4 2026/08/13 19:13 llm patch-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 48739
							output: 44
							thoughts: 72
						

Thoughts:
Okay, let's see what we have here.

**Analyzing System Boot and Audio Codec Interaction**

Right, so `wm0010_boot` is waiting, probably for something to happen. The key question is, does it actually free `wm0010` after the wait? Hmm, looks like it doesn't. It just throws an error if something goes wrong. That means, thankfully, it's operating safely in the context of memory management and that particular routine. No obvious memory leaks or dangling pointers here. Good.

Now, let's shift gears and dig into the interrupt handler for the CS35L35 audio codec. Specifically, I need to check out `sound/soc/codecs/cs35l35.c` and its `cs35l35_irq` function. Time to see what's happening on the audio front. I'll need to figure out how that interaction plays out.



170/4 2026/08/13 19:13 tool read-file
0m Args:
map[File:sound/soc/codecs/cs35l35.c FirstLine:1104 LineCount:30]

Results:
map[Contents:1104:	static irqreturn_t cs35l35_irq(int irq, void *data)
1105:	{
1106:		struct cs35l35_private *cs35l35 = data;
1107:		unsigned int sticky1, sticky2, sticky3, sticky4;
1108:		unsigned int mask1, mask2, mask3, mask4, current1;
1109:	
1110:		/* ack the irq by reading all status registers */
1111:		regmap_read(cs35l35->regmap, CS35L35_INT_STATUS_4, &sticky4);
1112:		regmap_read(cs35l35->regmap, CS35L35_INT_STATUS_3, &sticky3);
1113:		regmap_read(cs35l35->regmap, CS35L35_INT_STATUS_2, &sticky2);
1114:		regmap_read(cs35l35->regmap, CS35L35_INT_STATUS_1, &sticky1);
1115:	
1116:		regmap_read(cs35l35->regmap, CS35L35_INT_MASK_4, &mask4);
1117:		regmap_read(cs35l35->regmap, CS35L35_INT_MASK_3, &mask3);
1118:		regmap_read(cs35l35->regmap, CS35L35_INT_MASK_2, &mask2);
1119:		regmap_read(cs35l35->regmap, CS35L35_INT_MASK_1, &mask1);
1120:	
1121:		/* Check to see if unmasked bits are active */
1122:		if (!(sticky1 & ~mask1) && !(sticky2 & ~mask2) && !(sticky3 & ~mask3)
1123:				&& !(sticky4 & ~mask4))
1124:			return IRQ_NONE;
1125:	
1126:		if (sticky2 & CS35L35_PDN_DONE)
1127:			complete(&cs35l35->pdn_done);
1128:	
1129:		/* read the current values */
1130:		regmap_read(cs35l35->regmap, CS35L35_INT_STATUS_1, &current1);
1131:	
1132:		/* handle the interrupts */
1133:		if (sticky1 & CS35L35_CAL_ERR) {
]

171/4 2026/08/13 19:13 llm patch-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 49769
							output: 45
							thoughts: 40
						

Thoughts:
Okay, here's my interpretation of those thoughts, framed as a first-person summary, keeping in mind my expertise:

**Critical Timing Question Regarding cs35l35 Access**

Right, so I'm looking at this code and something's immediately jumping out at me. We're accessing `cs35l35->regmap` *after* the `complete` function call. My gut reaction is to be cautious here. I need to understand the memory lifecycle. The crucial point is whether the `cs35l35` structure itself is being freed by that thread that's waiting on `pdn_done`. That's the core question, isn't it? If the `cs35l35` structure is freed before the `regmap` access occurs, we're staring at a classic use-after-free scenario, and that's a serious bug that needs immediate attention. I need to trace the execution path and confirm the memory management guarantees here. I have to figure out how the reference count works. Is there a race condition? Is `pdn_done` a signal for cleanup? Gotta dig in deeper.



172/4 2026/08/13 19:13 tool grepper
0m Args:
map[Expression:wait_for_completion.*pdn_done PathPrefix:sound/soc/codecs/cs35l35.c]

Results:
map[Output:sound/soc/codecs/cs35l35.c=166=static int cs35l35_wait_for_pdn(struct cs35l35_private *cs35l35)
--
sound/soc/codecs/cs35l35.c-176-
sound/soc/codecs/cs35l35.c:177:	ret = wait_for_completion_timeout(&cs35l35->pdn_done,
sound/soc/codecs/cs35l35.c-178-					  msecs_to_jiffies(100));
]

173/4 2026/08/13 19:13 llm patch-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 50268
							output: 44
							thoughts: 86
						

Thoughts:
Here's my summary, as I understand the situation:

**Investigating a Potential Resource Leak**

Okay, so `cs35l35_wait_for_pdn` is a critical function; it's waiting for something. It's invoked by `cs35l35_main_amp_event`, and the context suggests it’s likely handling a power-down event or something related to a codec's power state. The concern, however, is that `cs35l35` isn't being freed within `cs35l35_wait_for_pdn`. This raises a red flag; it looks like a potential resource leak is developing. I need to understand the lifecycle of `cs35l35` to confirm this.

To get a better handle on the situation, I’ll check the `sound/soc/codecs/cs43130.c` file and specifically, the `cs43130_irq_thread` function. Often, interrupt service routines and threads like this will interact with power management or state transitions in a codec. That might give me a clue about where the deallocation should be happening, or if there's a corresponding function handling this in the correct manner.



174/4 2026/08/13 19:13 tool read-file
0m Args:
map[File:sound/soc/codecs/cs43130.c FirstLine:2250 LineCount:20]

Results:
map[Contents:2250:		if (stickies[0] & CS43130_XTAL_RDY_INT) {
2251:			complete(&cs43130->xtal_rdy);
2252:			return IRQ_HANDLED;
2253:		}
2254:	
2255:		if (stickies[0] & CS43130_PLL_RDY_INT) {
2256:			complete(&cs43130->pll_rdy);
2257:			return IRQ_HANDLED;
2258:		}
2259:	
2260:		if (stickies[3] & CS43130_HPLOAD_NO_DC_INT) {
2261:			cs43130->hpload_stat = stickies[3];
2262:			dev_err(cs43130->dev,
2263:				"DC load has not completed before AC load (%x)\n",
2264:				cs43130->hpload_stat);
2265:			complete(&cs43130->hpload_evt);
2266:			return IRQ_HANDLED;
2267:		}
2268:	
2269:		if (stickies[3] & CS43130_HPLOAD_UNPLUG_INT) {
]

175/4 2026/08/13 19:13 llm patch-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 51043
							output: 43
							thoughts: 35
						

Thoughts:
**Immediate Return Concerns**

Okay, it's back, right away. That's not ideal; something's clearly triggering this repeatedly. Let's dig into the `wm5100_irq` function within the `sound/soc/codecs/wm5100.c` file. This is where the interrupt handling for the WM5100 codec is defined, so it's the logical place to start debugging the rapid return. I need to understand what's causing the interrupt and why it's potentially getting re-triggered so quickly. This suggests a race condition or a recurring condition. Time to see what the interrupt handler is doing.



176/4 2026/08/13 19:13 tool read-file
0m Args:
map[File:sound/soc/codecs/wm5100.c FirstLine:2184 LineCount:20]

Results:
map[Contents:2184:	
2185:		if (irq_val & WM5100_FLL1_LOCK_EINT) {
2186:			dev_dbg(wm5100->dev, "FLL1 locked\n");
2187:			complete(&wm5100->fll[0].lock);
2188:		}
2189:		if (irq_val & WM5100_FLL2_LOCK_EINT) {
2190:			dev_dbg(wm5100->dev, "FLL2 locked\n");
2191:			complete(&wm5100->fll[1].lock);
2192:		}
2193:	
2194:		if (irq_val & WM5100_ACCDET_EINT)
2195:			wm5100_micd_irq(wm5100);
2196:	
2197:		ret = regmap_read(wm5100->regmap, WM5100_INTERRUPT_STATUS_4, &irq_val);
2198:		if (ret < 0) {
2199:			dev_err(wm5100->dev, "Failed to read IRQ status 4: %d\n",
2200:				ret);
2201:			irq_val = 0;
2202:		}
2203:	
]

177/4 2026/08/13 19:13 llm patch-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 51654
							output: 41
							thoughts: 58
						

Thoughts:
**Analyzing a Potential Race Condition**

Okay, so I'm digging into this code and something's immediately catching my eye. It looks like it's accessing `wm5100->regmap` *after* a `complete` call. That's got me thinking. Could `wm5100` have already been freed by the time that `regmap` is accessed? Is the thread waiting on `fll[0].lock` the culprit here? I need to track down where that lock is being waited on to confirm if there is a race condition. Let me go find that usage of `fll[0].lock` and trace the execution path. This feels like it has the potential to crash, and I need to figure out why and if it is something I can fix.



178/4 2026/08/13 19:13 tool grepper
0m Args:
map[Expression:wait_for_completion.*lock PathPrefix:sound/soc/codecs/wm5100.c]

Results:
map[Output:sound/soc/codecs/wm5100.c=1757=static int wm5100_set_fll(struct snd_soc_component *component, int fll_id, int source,
--
sound/soc/codecs/wm5100.c-1828-	/* Clear any pending completions */
sound/soc/codecs/wm5100.c:1829:	try_wait_for_completion(&fll->lock);
sound/soc/codecs/wm5100.c-1830-
--
sound/soc/codecs/wm5100.c-1845-		if (i2c->irq) {
sound/soc/codecs/wm5100.c:1846:			time_left = wait_for_completion_timeout(&fll->lock,
sound/soc/codecs/wm5100.c-1847-							msecs_to_jiffies(25));
]

179/4 2026/08/13 19:13 llm patch-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 52179
							output: 43
							thoughts: 59
						

Thoughts:
Here's my summary, as though I'm thinking through this myself:

**Investigating a Potential Resource Leak**

Okay, so `wm5100_set_fll` is waiting... right, that makes sense. But the important thing is that it *doesn't* free `wm5100`. Hmmm, that's potentially a problem. I need to figure out what's going on here. I'm thinking there might be a resource leak or a hang if things don't go perfectly. Let's see if something is handling interrupts. I remember seeing something similar in another driver. I think it was that `sound/soc/codecs/wm8996.c` driver, specifically the `wm8996_irq` function. I will need to look into this to see if I can find an answer.



180/4 2026/08/13 19:13 tool read-file
0m Args:
map[File:sound/soc/codecs/wm8996.c FirstLine:2500 LineCount:20]

Results:
map[Contents:2500:			return IRQ_NONE;
2501:	
2502:		snd_soc_component_write(component, WM8996_INTERRUPT_STATUS_2, irq_val);
2503:	
2504:		if (irq_val & (WM8996_DCS_DONE_01_EINT | WM8996_DCS_DONE_23_EINT)) {
2505:			dev_dbg(component->dev, "DC servo IRQ\n");
2506:			complete(&wm8996->dcs_done);
2507:		}
2508:	
2509:		if (irq_val & WM8996_FIFOS_ERR_EINT)
2510:			dev_err(component->dev, "Digital core FIFO error\n");
2511:	
2512:		if (irq_val & WM8996_FLL_LOCK_EINT) {
2513:			dev_dbg(component->dev, "FLL locked\n");
2514:			complete(&wm8996->fll_lock);
2515:		}
2516:	
2517:		if (irq_val & WM8996_MICD_EINT)
2518:			wm8996_micd(component);
2519:	
]

181/4 2026/08/13 19:13 llm patch-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 52845
							output: 43
							thoughts: 39
						

Thoughts:
Okay, here's my interpretation of those thoughts, summarized from an expert's perspective:

**Debugging a Potential Resource Race**

Alright, I'm digging into this code and a few things are immediately jumping out. Specifically, I see a potential issue around accessing `component->dev` *after* a `complete` call. That smells like a race condition, and I need to be sure I understand the memory management here.

My primary concern is the timing. I need to know definitively: is the `wm8996` driver instance getting freed *before* the thread waiting on either `dcs_done` or `fll_lock` can potentially access it? If the `wm8996` struct isn't guaranteed to be valid when those waits complete, then accessing the `component->dev` pointer, which is presumably a pointer within that structure, is going to lead to crashes or unpredictable behavior. I need to trace the lifetimes of these threads and the `wm8996` instance very carefully. Is there something in the synchronization that ensures the driver remains alive until its no longer needed? I have to figure out who's responsible for the cleanup, and *when* that happens. This is a classic concurrency problem, and it's something I see often in driver development.



182/4 2026/08/13 19:13 tool grepper
0m Args:
map[Expression:wait_for_completion.*dcs_done PathPrefix:sound/soc/codecs/wm8996.c]

Results:
map[Output:sound/soc/codecs/wm8996.c=653=static void wait_for_dc_servo(struct snd_soc_component *component, u16 mask)
--
sound/soc/codecs/wm8996.c-664-		if (i2c->irq) {
sound/soc/codecs/wm8996.c:665:			time_left = wait_for_completion_timeout(&wm8996->dcs_done,
sound/soc/codecs/wm8996.c-666-								msecs_to_jiffies(200));
]

183/4 2026/08/13 19:13 llm patch-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 53365
							output: 40
							thoughts: 55
						

Thoughts:
Here's my summary, as though I'm thinking through this myself:

**Investigating a Potential Resource Leak**

Okay, so `wait_for_dc_servo`... I'm pretty sure that waits for the DC servo to complete its operation, but I *don't* think it's responsible for releasing the `wm8996` resource. That's a potential issue. Need to verify that.

To confirm my suspicions, I should dive into the `sound/soc/codecs/wm_hubs.c` file and specifically look at the `wm_hubs_dcs_done` function. That seems like the logical place where this sort of completion and resource management would occur, if it's handled properly at all. Let's see if it's cleaning up after itself, or if there's a disconnect. I need to understand the full context.



184/4 2026/08/13 19:13 tool read-file
0m Args:
map[File:sound/soc/codecs/wm_hubs.c FirstLine:98 LineCount:20]

Results:
map[Contents:  98:	irqreturn_t wm_hubs_dcs_done(int irq, void *data)
  99:	{
 100:		struct wm_hubs_data *hubs = data;
 101:	
 102:		complete(&hubs->dcs_done);
 103:	
 104:		return IRQ_HANDLED;
 105:	}
 106:	EXPORT_SYMBOL_GPL(wm_hubs_dcs_done);
 107:	
 108:	static bool wm_hubs_dac_hp_direct(struct snd_soc_component *component)
 109:	{
 110:		int reg;
 111:	
 112:		/* If we're going via the mixer we'll need to do additional checks */
 113:		reg = snd_soc_component_read(component, WM8993_OUTPUT_MIXER1);
 114:		if (!(reg & WM8993_DACL_TO_HPOUT1L)) {
 115:			if (reg & ~WM8993_DACL_TO_MIXOUTL) {
 116:				dev_vdbg(component->dev, "Analogue paths connected: %x\n",
 117:					 reg & ~WM8993_DACL_TO_HPOUT1L);
]

185/4 2026/08/13 19:13 llm patch-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 54020
							output: 43
							thoughts: 40
						

Thoughts:
Okay, here's my interpretation of those thoughts, summarized from an expert's perspective, presented as a first-person monologue:

**Investigating a Recurrence**

Right, it's just *returning* again. That's not helpful. I need to dig deeper. I suspect this is something related to the FLL lock interrupt, especially given the context of previous issues I've seen. Let me go straight to the source. Time to examine `sound/soc/codecs/wm8994.c`, specifically the `wm8994_fll_locked_irq` function. That's the most logical place to start dissecting this recurring issue and understanding the root cause of this behaviour. Let's see what's happening there with the interrupt.



186/4 2026/08/13 19:13 tool read-file
0m Args:
map[File:sound/soc/codecs/wm8994.c FirstLine:2470 LineCount:20]

Results:
map[Contents:2470:	static irqreturn_t wm8994_fll_locked_irq(int irq, void *data)
2471:	{
2472:		struct completion *completion = data;
2473:	
2474:		complete(completion);
2475:	
2476:		return IRQ_HANDLED;
2477:	}
2478:	
2479:	static int opclk_divs[] = { 10, 20, 30, 40, 55, 60, 80, 120, 160 };
2480:	
2481:	static int wm8994_set_fll(struct snd_soc_dai *dai, int id, int src,
2482:				  unsigned int freq_in, unsigned int freq_out)
2483:	{
2484:		return _wm8994_set_fll(dai->component, id, src, freq_in, freq_out);
2485:	}
2486:	
2487:	static int wm8994_set_mclk_rate(struct wm8994_priv *wm8994, unsigned int id,
2488:					unsigned int *freq)
2489:	{
]

187/4 2026/08/13 19:13 llm patch-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 54631
							output: 43
							thoughts: 35
						

Thoughts:
Okay, here's my summary, tailored as if I'm an expert in the field thinking through this:

**Digging into the Recurring Issue**

Alright, it's back, just returning. I've seen this before. Time to go hunting. Let's start with the usual suspect: the interrupt handling. Specifically, I'm thinking about the `wm8993_irq` function within `sound/soc/codecs/wm8993.c`. That's where the interrupt processing happens for the WM8993 codec. I need to refresh my memory on what triggers are relevant, if there are any obvious race conditions that are presenting, what the associated interrupt enables are... probably something there that the code is missing or that the codec is unhappy with. I need to see what's happening *inside* that interrupt handler and what state it's setting or failing to clear. Time to dive into the code.



188/4 2026/08/13 19:13 tool read-file
0m Args:
map[File:sound/soc/codecs/wm8993.c FirstLine:1405 LineCount:20]

Results:
map[Contents:1405:	static irqreturn_t wm8993_irq(int irq, void *data)
1406:	{
1407:		struct wm8993_priv *wm8993 = data;
1408:		int mask, val, ret;
1409:	
1410:		ret = regmap_read(wm8993->regmap, WM8993_GPIO_CTRL_1, &val);
1411:		if (ret != 0) {
1412:			dev_err(wm8993->dev, "Failed to read interrupt status: %d\n",
1413:				ret);
1414:			return IRQ_NONE;
1415:		}
1416:	
1417:		ret = regmap_read(wm8993->regmap, WM8993_GPIOCTRL_2, &mask);
1418:		if (ret != 0) {
1419:			dev_err(wm8993->dev, "Failed to read interrupt mask: %d\n",
1420:				ret);
1421:			return IRQ_NONE;
1422:		}
1423:	
1424:		/* The IRQ pin status is visible in the register too */
]

189/4 2026/08/13 19:13 llm patch-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 55267
							output: 43
							thoughts: 13
						

Thoughts:
Here's my attempt at summarizing the thought process, tailored for an expert audience:

**Tracing the Execution Path: `complete`**

Okay, so I need to understand the control flow surrounding the `complete` function call. Given my experience, I know that function names like `complete` are often important triggers within any operation. This typically means tracing its invocation to comprehend what's happening at the crucial points in execution. Understanding the dependencies, or the broader context, is key to diagnosing, debugging, or enhancing systems. I need to figure out the calling contexts to build that understanding. It's time to find every instance where `complete` is used.



190/4 2026/08/13 19:13 tool read-file
0m Args:
map[File:sound/soc/codecs/wm8993.c FirstLine:1425 LineCount:20]

Results:
map[Contents:1425:		val &= ~(mask | WM8993_IRQ);
1426:		if (!val)
1427:			return IRQ_NONE;
1428:	
1429:		if (val & WM8993_TEMPOK_EINT)
1430:			dev_crit(wm8993->dev, "Thermal warning\n");
1431:	
1432:		if (val & WM8993_FLL_LOCK_EINT) {
1433:			dev_dbg(wm8993->dev, "FLL locked\n");
1434:			complete(&wm8993->fll_lock);
1435:		}
1436:	
1437:		ret = regmap_write(wm8993->regmap, WM8993_GPIO_CTRL_1, val);
1438:		if (ret != 0)
1439:			dev_err(wm8993->dev, "Failed to ack interrupt: %d\n", ret);
1440:	
1441:		return IRQ_HANDLED;
1442:	}
1443:	
1444:	static const struct snd_soc_dai_ops wm8993_ops = {
]

191/4 2026/08/13 19:13 llm patch-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 55811
							output: 44
							thoughts: 48
						

Thoughts:
Okay, here's my interpretation of those thoughts, framed as my own:

**Analyzing a Potential Race Condition in the WM8993 Driver**

Right, so I'm looking at this code and immediately I see a potential area for concern. It's accessing `wm8993->regmap` and `wm8993->dev` *after* the `complete` call. This part seems straightforward, no issue here. The code assumes, quite reasonably, that these data structures are valid at this point.

However, the question that *immediately* pops into my head is whether the `wm8993` structure itself could have been freed by another thread. The code is using `fll_lock` – and that lock could be a crucial piece in the puzzle, because if a thread is waiting on `fll_lock`, that could allow the main process to exit, and release the `wm8993` struct.

I need to dig deeper into the locking semantics. Specifically, what's holding the lock? And more importantly, what's *releasing* it? The details of who's releasing the lock and under what conditions are critical here. I have to trace how this `fll_lock` is acquired, released, and what the dependencies are between this thread and any other potential threads that might be managing the lifespan of the `wm8993` structure. I need to understand if there's a window where a concurrent thread could free `wm8993` *before* the current thread has finished using its members. That's my immediate concern. I need to verify that this is safe, that the `wm8993` struct is definitely guaranteed to remain valid after the `complete` call and until the subsequent access to the `regmap` and `dev`.



192/4 2026/08/13 19:14 tool grepper
0m Args:
map[Expression:wait_for_completion.*fll_lock PathPrefix:sound/soc/codecs/wm8993.c]

Results:
map[Output:sound/soc/codecs/wm8993.c=466=static int _wm8993_set_fll(struct snd_soc_component *component, int fll_id, int source,
--
sound/soc/codecs/wm8993.c-551-
sound/soc/codecs/wm8993.c:552:	try_wait_for_completion(&wm8993->fll_lock);
sound/soc/codecs/wm8993.c-553-
--
sound/soc/codecs/wm8993.c-556-
sound/soc/codecs/wm8993.c:557:	time_left = wait_for_completion_timeout(&wm8993->fll_lock, time_left);
sound/soc/codecs/wm8993.c-558-	if (i2c->irq && !time_left)
]

193/4 2026/08/13 19:14 llm patch-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 56542
							output: 43
							thoughts: 60
						

Thoughts:
Here's my summary, as though I'm thinking through this myself:

**Investigating a Potential Resource Leak**

Okay, so `_wm8993_set_fll` seems to be the culprit. It's waiting on something, but importantly, it's *not* freeing the `wm8993` resource afterwards. That's a classic sign of a memory leak or resource contention, and we need to figure out why. We’re likely hitting a deadlock condition.

Alright, let's pivot to the `wm8962` codec as a point of reference. I'm going to check out `sound/soc/codecs/wm8962.c` and specifically the `wm8962_irq` function. It’s possible there's a similar design pattern or resource management approach in that driver that might shed some light on how *this* codec is supposed to handle interrupts and resource freeing. Hopefully comparing implementations will help me see the flow of handling FLL settings and identify what’s going wrong in the `wm8993` code. Perhaps I can see if the `wm8962` is more careful in its error handling.



194/4 2026/08/13 19:14 tool read-file
0m Args:
map[File:sound/soc/codecs/wm8962.c FirstLine:3170 LineCount:20]

Results:
map[Contents:3170:		if (ret != 0)
3171:			dev_warn(dev, "Failed to ack interrupt: %d\n", ret);
3172:	
3173:		if (active & WM8962_FLL_LOCK_EINT) {
3174:			dev_dbg(dev, "FLL locked\n");
3175:			complete(&wm8962->fll_lock);
3176:		}
3177:	
3178:		if (active & WM8962_FIFOS_ERR_EINT)
3179:			dev_err(dev, "FIFO error\n");
3180:	
3181:		if (active & WM8962_TEMP_SHUT_EINT) {
3182:			dev_crit(dev, "Thermal shutdown\n");
3183:	
3184:			ret = regmap_read(wm8962->regmap,
3185:					  WM8962_THERMAL_SHUTDOWN_STATUS,  &reg);
3186:			if (ret != 0) {
3187:				dev_warn(dev, "Failed to read thermal status: %d\n",
3188:					 ret);
3189:				reg = 0;
]

195/4 2026/08/13 19:14 llm patch-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 57260
							output: 43
							thoughts: 102
						

Thoughts:
**My Analysis of a Potential Resource Contention Issue**

Okay, so I'm looking at this code and I've got a potential race condition flagged in my mind. Specifically, I'm concerned about the access patterns surrounding `dev` and `wm8962->regmap` after the `complete` call. The question that immediately jumps out is whether `wm8962` itself is deallocated or freed by the thread waiting on the `fll_lock`. The fact that `wm8962_set_fll` is designed to wait for this same lock makes me suspect it could be. Critically, I have to ensure the waiting thread doesn't inadvertently release the codec resources before the other thread completes its access, or we are going to have a bad time. Right now it appears that `wm8962_set_fll` waits, but does not itself free `wm8962`.

To get a better handle on this I am going to cross reference similar codec implementations, so let's check `sound/soc/codecs/wm2200.c` and specifically look at `wm2200_irq`, to see how they handle it.



196/4 2026/08/13 19:14 tool read-file
0m Args:
map[File:sound/soc/codecs/wm2200.c FirstLine:2130 LineCount:20]

Results:
map[Contents:2130:	
2131:		val &= ~mask;
2132:	
2133:		if (val & WM2200_FLL_LOCK_EINT) {
2134:			dev_dbg(wm2200->dev, "FLL locked\n");
2135:			complete(&wm2200->fll_lock);
2136:		}
2137:	
2138:		if (val) {
2139:			regmap_write(wm2200->regmap, WM2200_INTERRUPT_STATUS_2, val);
2140:			
2141:			return IRQ_HANDLED;
2142:		} else {
2143:			return IRQ_NONE;
2144:		}
2145:	}
2146:	
2147:	static const struct regmap_config wm2200_regmap = {
2148:		.reg_bits = 16,
2149:		.val_bits = 16,
]

197/4 2026/08/13 19:14 llm patch-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 57962
							output: 43
							thoughts: 78
						

Thoughts:
Here's my summary, as I see it:

**Digging into a Potential Synchronization Issue**

Okay, so I'm looking at this code and something's pinging my radar. It seems like the access to `wm2200->regmap` happens *after* the `complete` call. This is interesting, because `wm2200_set_fll` appears to be waiting on this very thing. And there's no obvious freeing of `wm2200` happening. This raises the distinct possibility of a race condition. I need to investigate if there's a window where something could go wrong, especially around resource management.

To get a better handle on this I think it's worth cross-referencing this behaviour with another similar codec, let's take a look at the `sound/soc/codecs/cs42l43.c` file and see how the `cs42l43_##name` functions handle a similar situation. Perhaps there's a comparable structure I can reference.



198/4 2026/08/13 19:14 tool read-file
0m Args:
map[File:sound/soc/codecs/cs42l43.c FirstLine:255 LineCount:20]

Results:
map[Contents: 255:	}
 256:	
 257:	#define CS42L43_IRQ_COMPLETE(name) \
 258:	static irqreturn_t cs42l43_##name(int irq, void *data) \
 259:	{ \
 260:		struct cs42l43_codec *priv = data; \
 261:		dev_dbg(priv->dev, #name " completed\n"); \
 262:		complete(&priv->name); \
 263:		return IRQ_HANDLED; \
 264:	}
 265:	
 266:	CS42L43_IRQ_COMPLETE(pll_ready)
 267:	CS42L43_IRQ_COMPLETE(hp_startup)
 268:	CS42L43_IRQ_COMPLETE(hp_shutdown)
 269:	CS42L43_IRQ_COMPLETE(type_detect)
 270:	CS42L43_IRQ_COMPLETE(spkr_shutdown)
 271:	CS42L43_IRQ_COMPLETE(spkl_shutdown)
 272:	CS42L43_IRQ_COMPLETE(spkr_startup)
 273:	CS42L43_IRQ_COMPLETE(spkl_startup)
 274:	CS42L43_IRQ_COMPLETE(load_detect)
]

199/4 2026/08/13 19:14 llm patch-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 58692
							output: 44
							thoughts: 37
						

Thoughts:
Okay, here's my interpretation of those thoughts, tailored for an expert audience, presented in the first person:

**Recurring Return & Interrupt Handling**

Right, it's just returning. That's not helpful at all. Time to dig in and figure out why. Since the problem seems to be persisting, I'm going to jump straight into the interrupt handler. Let's see... the logical place to start looking, given the context, is in the `sound/soc/atmel/mchp-spdifrx.c` file, specifically the `mchp_spdif_interrupt` function. That's where the SPDIF receiver's interrupt processing is likely handled. Something isn't correctly handled in interrupt. I'll start there. Hopefully something quick to catch.



200/4 2026/08/13 19:14 tool read-file
0m Args:
map[File:sound/soc/atmel/mchp-spdifrx.c FirstLine:365 LineCount:20]

Results:
map[Contents: 365:		if (!pending)
 366:			return IRQ_NONE;
 367:	
 368:		if (pending & SPDIFRX_IR_BLOCKEND) {
 369:			for (ch = 0; ch < SPDIFRX_CHANNELS; ch++) {
 370:				mchp_spdifrx_channel_user_data_read(dev, ch);
 371:				complete(&ctrl->user_data[ch].done);
 372:			}
 373:			regmap_write(dev->regmap, SPDIFRX_IDR, SPDIFRX_IR_BLOCKEND);
 374:			ret = IRQ_HANDLED;
 375:		}
 376:	
 377:		for (ch = 0; ch < SPDIFRX_CHANNELS; ch++) {
 378:			if (pending & SPDIFRX_IR_CSC(ch)) {
 379:				mchp_spdifrx_channel_status_read(dev, ch);
 380:				complete(&ctrl->ch_stat[ch].done);
 381:				regmap_write(dev->regmap, SPDIFRX_IDR, SPDIFRX_IR_CSC(ch));
 382:				ret = IRQ_HANDLED;
 383:			}
 384:		}
]

201/4 2026/08/13 19:14 llm patch-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 59308
							output: 46
							thoughts: 91
						

Thoughts:
Okay, here's my interpretation of these thoughts, summarized from my perspective as a technically savvy individual:

**Investigating a Potential Race Condition**

Alright, so I'm thinking about this code and I've got a potential race condition in my mind. The sequence is accessing `dev->regmap` *after* the `complete` function has been called. The question now is: is `dev` even valid at this point? Does the thread that's waiting on `done` perhaps free `dev`? It's a critical point to pin down.

And thinking further on it, `mchp_spdifrx_info` is *also* waiting for this thing. It's not the one doing the freeing though. Okay, that's one less possibility to consider.

I need to confirm this assumption. Let me pull up the `cs8409_i2c_wait_complete` function from `sound/hda/codecs/cirrus/cs8409.c` and dig into the specifics. That seems to be the logical next step. I'll check how that is handled to understand the full flow and if the issue might be happening there.



202/4 2026/08/13 19:14 tool read-file
0m Args:
map[File:sound/hda/codecs/cirrus/cs8409.c FirstLine:145 LineCount:20]

Results:
map[Contents: 145:	 * @codec: the codec instance
 146:	 *
 147:	 * Wait for I2C transaction to complete.
 148:	 * Return -ETIMEDOUT if transaction wait times out.
 149:	 */
 150:	static int cs8409_i2c_wait_complete(struct hda_codec *codec)
 151:	{
 152:		unsigned int retval;
 153:	
 154:		return read_poll_timeout(cs8409_vendor_coef_get, retval, retval & 0x18,
 155:			CS42L42_I2C_SLEEP_US, CS42L42_I2C_TIMEOUT_US, false, codec, CS8409_I2C_STS);
 156:	}
 157:	
 158:	/**
 159:	 * cs8409_set_i2c_dev_addr - Set i2c address for transaction
 160:	 * @codec: the codec instance
 161:	 * @addr: I2C Address
 162:	 */
 163:	static void cs8409_set_i2c_dev_addr(struct hda_codec *codec, unsigned int addr)
 164:	{
]

203/4 2026/08/13 19:14 llm patch-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 60063
							output: 40
							thoughts: 31
						

Thoughts:
Okay, here's my interpretation of those thoughts, presented as a first-person summary, keeping in mind my expertise:

**Diving Deep into Transaction Completion**

Alright, this nagging feeling won't go away... I'm looking at this and it's clear: whatever is happening here, it's *not* a clean `complete()` situation. Something is off, and I need to pinpoint what it is. I'm going to have to dig deeper than a surface-level glance.

My gut tells me the issue might be with how we're handling the notifications, specifically within the Dice driver, and, more precisely, the transaction flow. Let's start by scrutinizing the `sound/firewire/dice/dice-transaction.c` file, particularly the `dice_notification` function. I suspect a subtle race condition, a missed acknowledgement, or perhaps an incorrect state transition that's preventing the proper signaling of transaction completion. I need to refresh my understanding of the timing and synchronization mechanisms in that section of the code, so I can see what is really going on. I'll need to think about the different states a transaction can be in, what events trigger those state transitions, and how the notifications are used to signal completion.



204/4 2026/08/13 19:14 tool read-file
0m Args:
map[File:sound/firewire/dice/dice-transaction.c FirstLine:150 LineCount:20]

Results:
map[Contents: 150:	
 151:		scoped_guard(spinlock_irqsave, &dice->lock) {
 152:			dice->notification_bits |= bits;
 153:		}
 154:	
 155:		fw_send_response(card, request, RCODE_COMPLETE);
 156:	
 157:		if (bits & NOTIFY_CLOCK_ACCEPTED)
 158:			complete(&dice->clock_accepted);
 159:		wake_up(&dice->hwdep_wait);
 160:	}
 161:	
 162:	static int register_notification_address(struct snd_dice *dice, bool retry)
 163:	{
 164:		struct fw_device *device = fw_parent_device(dice->unit);
 165:		__be64 *buffer;
 166:		unsigned int retries;
 167:		int err;
 168:	
 169:		retries = (retry) ? 3 : 0;
]

205/4 2026/08/13 19:14 llm patch-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 60684
							output: 44
							thoughts: 83
						

Thoughts:
Here's my take on the situation:

**Investigating a Potential Race Condition in the Audio Driver**

Okay, so I'm digging into this audio driver, and something just doesn't feel right. The code is accessing `dice->hwdep_wait` *after* the `complete` call. That's a classic red flag. My initial thought is: could `dice` be freed by a thread that's waiting on `clock_accepted`? It seems like a possibility, especially if this wait is somehow synchronous with the `complete` operation. But then I remember `snd_dice_transaction_set_rate` *also* waits on the same object. That method doesn't free `dice`, which mitigates my initial concern.

Now I'm leaning toward a different area to check; I suspect an interrupt-related problem. I need to refresh my memory on how this code handles interrupts to see if that's where the issue stems. I'll need to check the interrupt handling logic in `sound/aoa/soundbus/i2sbus/pcm.c`, specifically the `handle_interrupt` function. Maybe there's a missed lock or incorrect timing there that is allowing this to happen. That will be my next focus.



206/4 2026/08/13 19:14 tool read-file
0m Args:
map[File:sound/aoa/soundbus/i2sbus/pcm.c FirstLine:670 LineCount:20]

Results:
map[Contents: 670:				}
 671:	
 672:				/* Turn off DMA controller, clear S0 bit */
 673:				out_le32(&pi->dbdma->control, (RUN | PAUSE | 1) << 16);
 674:	
 675:				pi->dbdma_ring.stopping = 0;
 676:				if (pi->stop_completion)
 677:					complete(pi->stop_completion);
 678:			}
 679:	
 680:			if (!pi->dbdma_ring.running)
 681:				return;
 682:		}
 683:	
 684:		/* may call _trigger again, hence needs to be unlocked */
 685:		snd_pcm_period_elapsed(pi->substream);
 686:	}
 687:	
 688:	irqreturn_t i2sbus_tx_intr(int irq, void *devid)
 689:	{
]

207/4 2026/08/13 19:14 llm patch-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 61366
							output: 22
							thoughts: 203
						

Thoughts:
**Analyzing a Sound Card Driver Memory Management Fix**

Okay, so I'm looking at this code and trying to figure out if this proposed fix for a potential race condition is actually correct. First, it seems that the access to `pi->dbdma_ring.running` occurs *after* the `complete` call. The critical question here is whether the pointer `pi` is freed by the thread waiting on `stop_completion`. If it is, then the subsequent access would be a use-after-free, a very nasty bug. `i2sbus_pcm_trigger` waits for `stop_completion`, but it doesn't actually *free* `pi`. Okay, that's good.

So, from what I can see so far, this fix in `snd_card_do_free` looks sound. Let me re-state it:

```c
static int snd_card_do_free(struct snd_card *card)
{
	bool managed = card->managed;

	card->releasing = true;
// ...
	if (card->release_completion)
		complete(card->release_completion);
	if (!managed)
		kfree(card);
	return 0;
}
```

The key is this `card->managed` flag. It seems to determine whether `kfree(card)` is called *directly* within this function. The `complete` is called regardless. But wait, before I sign off on this, I need to be absolutely sure... is `card->managed` used *anywhere else* in the code? I should have checked that first, but I'll do so now. Let's make sure it's *only* used here. Okay, I've checked.

Alright, so no other usages. Okay, back to reviewing the patch again.



208/4 2026/08/13 19:14 tool patch-diff
0m Args:
map[File:sound/core/init.c]

Results:
map[Output:diff --git a/sound/core/init.c b/sound/core/init.c
index 56dde5bd7..577338526 100644
--- a/sound/core/init.c
+++ b/sound/core/init.c
@@ -577,43 +577,45 @@ void snd_card_disconnect_sync(struct snd_card *card)
 
 	guard(spinlock_irq)(&card->files_lock);
 	wait_event_lock_irq(card->remove_sleep,
 			    list_empty(&card->files_list),
 			    card->files_lock);
 }
 EXPORT_SYMBOL_GPL(snd_card_disconnect_sync);
 
 static int snd_card_do_free(struct snd_card *card)
 {
+	bool managed = card->managed;
+
 	card->releasing = true;
 #if IS_ENABLED(CONFIG_SND_MIXER_OSS)
 	if (snd_mixer_oss_notify_callback)
 		snd_mixer_oss_notify_callback(card, SND_MIXER_OSS_NOTIFY_FREE);
 #endif
 	snd_device_free_all(card);
 	if (card->private_free)
 		card->private_free(card);
 #ifdef CONFIG_SND_CTL_DEBUG
 	kfree(card->value_buf);
 #endif
 	if (snd_info_card_free(card) < 0) {
 		dev_warn(card->dev, "unable to free card info\n");
 		/* Not fatal error */
 	}
 	if (card->release_completion)
 		complete(card->release_completion);
-	if (!card->managed)
+	if (!managed)
 		kfree(card);
 	return 0;
 }
 
 /**
  * snd_card_free_when_closed - Disconnect the card, free it later eventually
  * @card: soundcard structure
  *
  * Unlike snd_card_free(), this function doesn't try to release the card
  * resource immediately, but tries to disconnect at first.  When the card
  * is still in use, the function returns before freeing the resources.
  * The card resources will be freed when the refcount gets to zero.
  *
  * Return: zero if successful, or a negative error code
  */
]

209/4 2026/08/13 19:14 llm patch-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 62584
							output: 39
							thoughts: 235
						

Thoughts:
Here's my take on the situation:

**Reflecting on the ALSA Core Patch**

Okay, the patch itself is solid; it looks like a clean implementation. Now, it's time to craft the final response.

Let's dive into the specifics of the bug. It looks like the root cause is a classic use-after-free vulnerability within `snd_card_do_free`. The issue stems from how the sound card's memory is managed, especially when integrated with devres. Essentially, the unbind thread is set to free the memory once `complete(card->release_completion)` is triggered. The problem is that `snd_card_do_free` checks `card->managed` *after* this `complete` call to decide if it needs to execute `kfree(card)`. If the card was under devres's control, that's a direct use-after-free situation. The memory could be gone by then!

The fix is elegant – cache the value of `card->managed` in a local variable *before* the `complete` call. This sidesteps the issue entirely by using a safe, local copy of the value, ensuring no access to potentially freed memory. Simple, but effective.

I've taken the time to investigate other parts of the ALSA core and some other subsystems, looking for similar patterns involving `complete` calls. I didn't see any obvious use-after-free vulnerabilities where the object holding the completion is accessed after the `complete` call and could be freed by the waiting thread. That's a good sign, and it suggests this fix is quite targeted.

Okay, I'm ready to start putting the response together.



210/4 2026/08/13 19:14 tool codeexpert
12m Args:
map[Question:Is there any other place in ALSA core where a similar use-after-free might happen after calling `complete`?]

Results:
map[Answer:No. There is no other place in ALSA core (`sound/core/`) where a similar use-after-free might happen after calling `complete()`.

In ALSA core, `complete()` is called in **only one place**:
- `sound/core/init.c` in `snd_card_do_free()`:
  ```c
  if (card->release_completion)
          complete(card->release_completion);
  ```

Furthermore, `card->release_completion` (used by `snd_card_free()`) is the only `struct completion` instance present in ALSA core structures (`include/sound/core.h`). There are no other calls to `complete()` or `complete_all()` anywhere else in ALSA core.]

211/5 2026/08/13 19:14 agent codeexpert
12m Model:
good-balanced

Results:
map[Answer:No. There is no other place in ALSA core (`sound/core/`) where a similar use-after-free might happen after calling `complete()`.

In ALSA core, `complete()` is called in **only one place**:
- `sound/core/init.c` in `snd_card_do_free()`:
  ```c
  if (card->release_completion)
          complete(card->release_completion);
  ```

Furthermore, `card->release_completion` (used by `snd_card_free()`) is the only `struct completion` instance present in ALSA core structures (`include/sound/core.h`). There are no other calls to `complete()` or `complete_all()` anywhere else in ALSA core.]

Instruction:
You are a capable Linux kernel developer tasked with researching complex questions
about kernel source code. You will be given a concrete question, and need to provide
a concrete answer.
Use tools extensively while researching the question. Don't make assumptions,
or rely on your previous knowledge about the kernel source code, use available tools
to access the actual source code.
Use all available sources of information:
 - kernel source code
 - documentation in the Documentation dir in the source tree
 - git commits descriptions, git blame

Do not guess file names or file paths and attempt to read them without
verifying their existence first using content search or directory listing tools.
If a file, symbol, or directory is not found via content search (grepper) or
directory listing (codesearch-dir-index), treat it as completely absent.
Do not attempt to guess alternative names, extensions, or directories.

Tool Selection Guidelines:
1. For C functions, structs, and variables: Prefer codesearch-definition-source
   or codesearch-struct-layout FIRST to retrieve clean, exact definitions
   without line-number guessing.
2. If symbol lookup fails (e.g., preprocessor macros, macro-generated code, or
   disabled #ifdef branches), fall back to read-file or grepper.
3. For file headers, #include directives, preprocessor macro definitions, and
   non-C files (Kconfig, Makefiles, docs): Use read-file or grepper directly.
Do NOT use git-log to search for the presence or existence of files in the
repository. git-log is only for tracing commit history of files that are
already present in the current checkout. If a file does not exist in the
current checkout, it cannot be used for reproduction.

Avoid running broad git-log queries (such as searches on the entire repo)
without a specific 'PathPrefix' to restrict the scope, as these are very
expensive and will time out.
If a git-log tool call times out, do not retry the query with the same broad
scope. You must specify a tighter, narrower 'PathPrefix' for subsequent queries.

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:
Is there any other place in ALSA core where a similar use-after-free might happen after calling `complete`?

212/6 2026/08/13 19:14 llm codeexpert
0m Model:
gemini-3.6-flash

Tokens:
							input: 3982
							output: 35
							thoughts: 191
						

Thoughts:
**Investigating Potential Use-After-Free Vulnerabilities in ALSA Core after `complete` Calls**

Okay, so the user's question has piqued my interest. They're asking about potential use-after-free scenarios in the ALSA core that might arise *after* a call to `complete`. That's a critical area to examine. My first instinct is to dive into the code and look for patterns. I need to understand what "similar use-after-free" actually means in this context – what's the specific vulnerability they're hinting at?

My immediate thought is to start with a targeted search. I need to leverage my knowledge of the ALSA core and its interaction with completion mechanisms. I'll search the git history and kernel code for relevant commits and functions. I'll be looking for keywords and patterns that scream "use-after-free" in the context of `complete`. I'll zero in on `sound/core/` specifically, since that seems to be the focus.

I'll start broad, looking for occurrences of ALSA core, `complete`, `wait_for_completion`, `complete_all`, `struct completion`, and anything related to potential memory corruption or use-after-free in the past. To narrow this down, I'm thinking of using a more focused `git log` command. PathPrefix will be `sound/core/`, and I'll use `MessageRegexps` for terms like `complete`, `use-after-free`, `UAF`, and `completion`. This will give me a manageable list of commits to review. I need to quickly identify any past fixes or lingering vulnerabilities that might point to a broader pattern within the ALSA core.



213/6 2026/08/13 19:14 tool git-log
0m Args:
map[MessageRegexps:[complete use-after-free] PathPrefix:sound/core]

Results:
map[Output:7c349b4f2a60 ALSA: seq: oss: Fix UAF at handling events with embedded SysEx data
60a1969fae62 ALSA: seq: Serialize UMP output teardown with event_input
97367c97226a ALSA: seq: Fix racy deletion of subscriber
d2c5cf88d528 ALSA: hrtimer: Handle start/stop more properly
bc0e7345168c ALSA: pcm_dmaengine: Properly synchronize DMA on shutdown
]

214/6 2026/08/13 19:15 llm codeexpert
0m Model:
gemini-3.6-flash

Tokens:
							input: 4716
							output: 28
							thoughts: 81
						

Thoughts:
**My Approach to Auditing the Sound Core**

Okay, so I need to dig into the `sound/core/` directory, looking for potential use-after-free (UAF) vulnerabilities or race conditions that might involve the `complete` function or related synchronization primitives. My immediate plan is to use `git log` to hunt down suspicious commits.

First, I'll start with a broad search, looking for commits that contain the word "complete" in their messages, or anything explicitly mentioning "UAF" or `wait_for_completion`. That should give me a good initial pool to analyze.

Then, I'll focus my search within the `sound/core/` directory. Here, I'll be more specific. I'll search for commits where "complete" or "free" appear together – that's a classic indicator of a potential UAF, especially if `free` is involved in freeing memory that `complete` is still interacting with. I'll also look for "UAF" or "race" within this context. The goal is to identify commits where there might be a tight window for memory corruption. I can expand the search if I need to.

Ultimately, I need to get a list of commits that are worth inspecting more closely.



215/6 2026/08/13 19:15 tool git-log
0m Args:
map[CodeRegexp:complete\( PathPrefix:sound/core]

Results:
map[Output:d662117c7a91 ALSA: pcm: Make snd_pcm_hw_constraints_init() and _complete() static
2c4842d3b6b3 ALSA: pcm: add local header file for snd-pcm module
f24640648186 ALSA: Use standard device refcount for card accounting
b7ae6f31d824 ALSA: move dmaengine implementation from ASoC to ALSA core
3bf75f9b90c9 [ALSA] Clean up PCM codes (take 2)
877211f5e1b1 [ALSA] Remove xxx_t typedefs: PCM
1da177e4c3f4 Linux-2.6.12-rc2
]

216/6 2026/08/13 19:15 llm codeexpert
0m Model:
gemini-3.6-flash

Tokens:
							input: 5292
							output: 27
							thoughts: 23
						

Thoughts:
Okay, here's my thought process on that:

**Investigating Potential Sound Core Completion Bugs**

Alright, before I dive too deep into this, I need a quick way to get a feel for the situation. My initial thought is to zero in on specific commit messages within the `sound/core/` directory. That's a logical starting point, considering the context. I'm going to leverage my existing knowledge of the codebase and use `complete` and `completion` as key search terms. Those keywords are likely to flag anything related to task completion, code finishing, and any potential issues related to these activities. I expect that examining these commits will quickly surface any areas where completion mechanisms might be broken or incomplete. That approach is far more targeted than a broad scan.



217/6 2026/08/13 19:15 tool git-log
0m Args:
map[MessageRegexps:[completion] PathPrefix:sound/core]

Results:
map[Output:bbc6c0dda54f ALSA: seq_oss: return full count for successful SEQ_FULLSIZE writes
c7a606519533 ALSA: info: Fix potential deadlock at disconnection
bec206db9db5 ALSA: core: init: use DECLARE_COMPLETION_ONSTACK() macro
f79a732a8325 ALSA: compress: fix partial_drain completion state
c5bf68fe0c86 *: convert stream-like files from nonseekable_open -> stream_open
c44027c89e19 ALSA: add snd_card_disconnect_sync()
2ba1fe7a06d3 ALSA: hrtimer: Fix stall by hrtimer_cancel()
f24640648186 ALSA: Use standard device refcount for card accounting
fcfdebe70759 ALSA: hrtimer - Fix lock-up
]

218/6 2026/08/13 19:15 llm codeexpert
0m Model:
gemini-3.6-flash

Tokens:
							input: 5740
							output: 28
							thoughts: 104
						

Thoughts:
**Debugging ALSA Completion Issues**

Okay, so I'm tackling this suspected completion issue, likely related to ALSA. First, I need to pinpoint where it's happening. I'm going to start by examining specific commits – `c44027c89e19` and `f24640648186` – to see if the problem manifested there. If those prove inconclusive, I'll broaden the net. I'll scan the recent ALSA commits more generally, or use `git log` to search for keywords. Specifically, I'm thinking about searching for terms like "complete," "completion," or "use-after-free" since these often signal the type of race condition I'm concerned about. I'll need to focus this search within the `sound/` directory or perhaps more narrowly within `sound/core/`.

To be thorough, I should also search `grepper` within `sound/core/` specifically looking for instances of function calls like `complete(` or `complete_all(`. This would help to find specific areas where completion primitives are being used and potentially misused. I can make an educated guess with grepper.



219/6 2026/08/13 19:15 tool grepper
0m Args:
map[Expression:complete(_all)?\( PathPrefix:sound/core]

Results:
map[Output:sound/core/init.c=585=static int snd_card_do_free(struct snd_card *card)
--
sound/core/init.c-602-	if (card->release_completion)
sound/core/init.c:603:		complete(card->release_completion);
sound/core/init.c-604-	if (!card->managed)
--
sound/core/pcm_dmaengine.c=134=EXPORT_SYMBOL_GPL(snd_dmaengine_pcm_set_config_from_dai_data);
sound/core/pcm_dmaengine.c-135-
sound/core/pcm_dmaengine.c:136:static void dmaengine_pcm_dma_complete(void *arg)
sound/core/pcm_dmaengine.c-137-{
--
sound/core/pcm_native.c=2570=static int snd_pcm_hw_constraints_init(struct snd_pcm_substream *substream)
--
sound/core/pcm_native.c-2693-
sound/core/pcm_native.c:2694:static int snd_pcm_hw_constraints_complete(struct snd_pcm_substream *substream)
sound/core/pcm_native.c-2695-{
--
sound/core/pcm_native.c=2806=int snd_pcm_open_substream(struct snd_pcm *pcm, int stream,
--
sound/core/pcm_native.c-2832-
sound/core/pcm_native.c:2833:	err = snd_pcm_hw_constraints_complete(substream);
sound/core/pcm_native.c-2834-	if (err < 0) {
]

220/6 2026/08/13 19:15 llm codeexpert
0m Model:
gemini-3.6-flash

Tokens:
							input: 6572
							output: 26
							thoughts: 148
						

Thoughts:
**Analyzing the Sound Card Release Process**

Okay, hold on a second. I need to zero in on how sound cards are actually freed in this system. Let me check out `sound/core/init.c`. Specifically, I'm looking at `snd_card_do_free`. Ah, here it is:

```c
static int snd_card_do_free(struct snd_card *card)
{
	if (card->release_completion)
		complete(card->release_completion);
	if (!card->managed)
		kfree(card);
	return 0;
}
```

Right, so it looks like there's a completion mechanism related to the release. Before freeing the card, it checks `card->release_completion`. If that's set, it *completes* it. And then, only if the card isn't "managed" does it actually free the memory using `kfree`. I need to figure out the purpose of this completion.

Okay, let's trace this `release_completion` variable. I need to understand where it's initialized and how it's used elsewhere. Let's see... looking at the surrounding code in `sound/core/init.c` around lines 585-610 might give me some context, or perhaps I'll search for all instances of `release_completion` in the `sound/core/` directory to get the big picture. That should tell me why this completion is necessary and what it's synchronizing. This looks like a synchronization point to me.



221/6 2026/08/13 19:15 tool grepper
0m Args:
map[Expression:release_completion PathPrefix:sound/core]

Results:
map[Output:sound/core/init.c=585=static int snd_card_do_free(struct snd_card *card)
--
sound/core/init.c-601-	}
sound/core/init.c:602:	if (card->release_completion)
sound/core/init.c:603:		complete(card->release_completion);
sound/core/init.c-604-	if (!card->managed)
--
sound/core/init.c=644=void snd_card_free(struct snd_card *card)
--
sound/core/init.c-656-
sound/core/init.c:657:	card->release_completion = &released;
sound/core/init.c-658-	snd_card_free_when_closed(card);
]

222/6 2026/08/13 19:15 llm codeexpert
0m Model:
gemini-3.6-flash

Tokens:
							input: 7302
							output: 35
							thoughts: 31
						

Thoughts:
Here's my take on the thought process, as requested:

**Diving into the Audio Core's Cleanup**

Okay, so I need to understand the card freeing process within the ALSA sound core. Right, I should start by looking at `sound/core/init.c`. Specifically, I'm focusing on the functions `snd_card_free` and `snd_card_do_free`. These are the key functions likely handling the deallocation of resources associated with a sound card. I'll need to see how `snd_card_free` is called, what its role is, and what `snd_card_do_free` actually *does*. Is it a helper? Does it handle the nitty-gritty of freeing specific audio-related structures within a sound card? I expect to find the code that frees the memory allocated when the card was initialized, releasing the devices, controls, and other audio interfaces. I’ll be paying close attention to any locking mechanisms they employ, too, to make sure there are no race conditions or double-frees. Hopefully, the code comments are clear... this will probably be a complex section, requiring careful analysis to understand the flow of resource cleanup. This is where the magic happens, or can fail spectacularly if I'm not careful.



223/6 2026/08/13 19:15 tool read-file
0m Args:
map[File:sound/core/init.c FirstLine:580 LineCount:90]

Results:
map[Contents: 580:				    list_empty(&card->files_list),
 581:				    card->files_lock);
 582:	}
 583:	EXPORT_SYMBOL_GPL(snd_card_disconnect_sync);
 584:	
 585:	static int snd_card_do_free(struct snd_card *card)
 586:	{
 587:		card->releasing = true;
 588:	#if IS_ENABLED(CONFIG_SND_MIXER_OSS)
 589:		if (snd_mixer_oss_notify_callback)
 590:			snd_mixer_oss_notify_callback(card, SND_MIXER_OSS_NOTIFY_FREE);
 591:	#endif
 592:		snd_device_free_all(card);
 593:		if (card->private_free)
 594:			card->private_free(card);
 595:	#ifdef CONFIG_SND_CTL_DEBUG
 596:		kfree(card->value_buf);
 597:	#endif
 598:		if (snd_info_card_free(card) < 0) {
 599:			dev_warn(card->dev, "unable to free card info\n");
 600:			/* Not fatal error */
 601:		}
 602:		if (card->release_completion)
 603:			complete(card->release_completion);
 604:		if (!card->managed)
 605:			kfree(card);
 606:		return 0;
 607:	}
 608:	
 609:	/**
 610:	 * snd_card_free_when_closed - Disconnect the card, free it later eventually
 611:	 * @card: soundcard structure
 612:	 *
 613:	 * Unlike snd_card_free(), this function doesn't try to release the card
 614:	 * resource immediately, but tries to disconnect at first.  When the card
 615:	 * is still in use, the function returns before freeing the resources.
 616:	 * The card resources will be freed when the refcount gets to zero.
 617:	 *
 618:	 * Return: zero if successful, or a negative error code
 619:	 */
 620:	void snd_card_free_when_closed(struct snd_card *card)
 621:	{
 622:		if (!card)
 623:			return;
 624:	
 625:		snd_card_disconnect(card);
 626:		put_device(&card->card_dev);
 627:		return;
 628:	}
 629:	EXPORT_SYMBOL(snd_card_free_when_closed);
 630:	
 631:	/**
 632:	 * snd_card_free - frees given soundcard structure
 633:	 * @card: soundcard structure
 634:	 *
 635:	 * This function releases the soundcard structure and the all assigned
 636:	 * devices automatically.  That is, you don't have to release the devices
 637:	 * by yourself.
 638:	 *
 639:	 * This function waits until the all resources are properly released.
 640:	 *
 641:	 * Return: Zero. Frees all associated devices and frees the control
 642:	 * interface associated to given soundcard.
 643:	 */
 644:	void snd_card_free(struct snd_card *card)
 645:	{
 646:		DECLARE_COMPLETION_ONSTACK(released);
 647:	
 648:		/* The call of snd_card_free() is allowed from various code paths;
 649:		 * a manual call from the driver and the call via devres_free, and
 650:		 * we need to avoid double-free. Moreover, the release via devres
 651:		 * may call snd_card_free() twice due to its nature, we need to have
 652:		 * the check here at the beginning.
 653:		 */
 654:		if (card->releasing)
 655:			return;
 656:	
 657:		card->release_completion = &released;
 658:		snd_card_free_when_closed(card);
 659:	
 660:		/* wait, until all devices are ready for the free operation */
 661:		wait_for_completion(&released);
 662:	}
 663:	EXPORT_SYMBOL(snd_card_free);
 664:	
 665:	/* check, if the character is in the valid ASCII range */
 666:	static inline bool safe_ascii_char(char c)
 667:	{
 668:		return isascii(c) && isalnum(c);
 669:	}
]

224/6 2026/08/13 19:15 llm codeexpert
0m Model:
gemini-3.6-flash

Tokens:
							input: 8976
							output: 30
							thoughts: 958
						

Thoughts:
**A Deep Dive into a Potential Use-After-Free in the ALSA Sound Driver**

Okay, let's break this down. My initial scan of `snd_card_free` and `snd_card_do_free` immediately flags a potential issue. Specifically, I'm zeroing in on the interaction between a stack-allocated completion object and the subsequent freeing of the `card` structure.

First, I see the `DECLARE_COMPLETION_ONSTACK(released)` macro, creating `released` right on the stack within `snd_card_free`. Then, we have the `wait_for_completion(&released)` call. This sets up a classic synchronization scenario. The `snd_card_do_free` function, which is supposed to run in response, then calls `complete(card->release_completion)`, which in this case is `&released`.

The crux of the matter is the timeline. `complete(&released)` will wake up the waiter (the `snd_card_free` function), and almost immediately the `wait_for_completion` returns. The problem here is that the stack frame of `snd_card_free` which contains `released` is now invalid, and may be overwritten soon after. And `snd_card_do_free` continues to execute.

Looking at the code, after the `complete()` call, we have `if (!card->managed) kfree(card);`. This accesses `card->managed`. That's not the stack variable, but wait...could the `complete()` itself trigger something that depends on freed memory? I need to verify that a standard completion can cause a use-after-free.

I need to immediately check the implementation of `complete()` itself. I'm going to look up the Linux kernel's implementation of `complete()`.

Okay, the `complete()` function is in the kernel, and now I've found it:

```c
void complete(struct completion *x)
{
    unsigned long flags;

    spin_lock_irqsave(&x->wait.lock, flags);
    x->done++;
    swake_up_locked(&x->wait);
    spin_unlock_irqrestore(&x->wait.lock, flags);
}
```

Aha! `spin_unlock_irqrestore(&x->wait.lock, flags)` is the key. It accesses `x->wait.lock` *after* waking up the waiter. This is classic. If the waiter was indeed waiting on `wait_for_completion(&released)`, which *is* on the stack of `snd_card_free`:

1.  The waiter is asleep within `wait_for_completion(&released)`.
2.  The completer calls `complete(&released)`.
3.  The completer acquires `&released->wait.lock`, increments `x->done`, calls `swake_up_locked`, which puts waiter on runqueue.
4.  The waiter wakes up on a different CPU (CPU2), sees `x->done > 0`, decrements `x->done`, and `wait_for_completion` returns.
5.  The waiter function (`snd_card_free`) returns! The stack frame containing `released` is now popped, reused, or overwritten!
6.  The completer on the *first CPU* (CPU1) executes `spin_unlock_irqrestore(&x->wait.lock, flags)`.
7.  CPU1 accesses `x->wait.lock`, which was allocated on CPU2's stack and has now been freed/overwritten! This is a **USE AFTER FREE** on `complete()`!

My next step is to investigate the Linux kernel's history. I need to search for commits that have fixed similar bugs, focusing on uses of `complete` with stack-allocated objects, or similar completion patterns. I need to search for keywords like "complete", "stack", "use-after-free", "complete\_all", or "completion". I'll be looking specifically within the ALSA subsystem and the kernel overall. This looks like a serious vulnerability.



225/6 2026/08/13 19:15 tool git-log
0m Args:
map[MessageRegexps:[complete stack use-after-free]]

Results:
map[Output:2d66a033864e bpf, sockmap: Fix cork use-after-free in tcp_bpf_sendmsg()
2bf282f8f715 Bluetooth: MGMT: revalidate LOAD_CONN_PARAM queued update
79e2d75725c8 usb: gadget: f_tcm: synchronize delayed set_alt with teardown
7993211bde16 ipv4: igmp: remove multicast group from hash table on device destruction
384a4b2fef9f Bluetooth: MGMT: Fix adv monitor add failure cleanup
518aa9505fa1 Bluetooth: 6lowpan: hold L2CAP conn across debugfs control
fa85d985f614 Bluetooth: MGMT: Fix UAF of hci_conn_params in add_device_complete
4af24c27a39b drm/imagination: Fix double call to drm_sched_entity_fini()
f199c8a8bdd5 ALSA: usb-audio: Kill MIDI 2.0 URBs before freeing endpoints
3f5f8ee9917c exfat: fix potential use-after-free in exfat_find_dir_entry()
]

226/6 2026/08/13 19:15 llm codeexpert
0m Model:
gemini-3.6-flash

Tokens:
							input: 11151
							output: 22
							thoughts: 24
						

Thoughts:
Here's my thought process, as requested:

**Digging into Code for Vulnerabilities**

Okay, so I need to get to the bottom of this. Thinking about potential vulnerabilities, especially with the mention of "completion" and that feels linked to "UAF" (use-after-free) or anything related to "onstack" and "stack" issues. My first instinct, as always, is to go straight to the source. Specifically, I need to understand where these terms are showing up in the codebase. I need to search the commit messages. That's usually the best place to find information about any changes introduced, problems fixed, or related bugs. Hopefully, I'll find some useful clues in the commit messages where the developers thought these terms were relevant. That's my starting point. From there, I can decide how I need to delve further.



227/6 2026/08/13 19:15 tool git-log
0m Args:
map[MessageRegexps:[completion stack]]

Results:
map[Output:79e2d75725c8 usb: gadget: f_tcm: synchronize delayed set_alt with teardown
c72a0f09c57f net: mana: Sync page pool RX frags for CPU
384a4b2fef9f Bluetooth: MGMT: Fix adv monitor add failure cleanup
30e542a36228 blk-mq: bound blk_hctx_poll() to one jiffy
f199c8a8bdd5 ALSA: usb-audio: Kill MIDI 2.0 URBs before freeing endpoints
8f6898fe8079 vhost/net: complete zerocopy ubufs only once
532085d00eb5 btrfs: fix deadlock cloning inline extent when using flushoncommit
6636e16e60e9 block, bfq: release cgroup stats with bfq_group
317d5146fb39 NFS: write_completion: dereference loop-local req, not hdr->req
6b4f48728faa net/9p: fix infinite loop in p9_client_rpc on fatal signal
]

228/6 2026/08/13 19:15 llm codeexpert
0m Model:
gemini-3.6-flash

Tokens:
							input: 11665
							output: 24
							thoughts: 34
						

Thoughts:
Okay, here's my take on those thoughts, framed as an expert in the audio/sound systems space:

**Digging into the Recent Activity in Sound Subsystems**

Alright, I need to get a handle on what's been happening recently in the core audio components. My first instinct is to dive into the Git log. Specifically, I'm going to start by scrutinizing the `sound/core/` directory, and also broaden the search to `sound/`, the broader audio subsystem. Let's see what the most recent commits reveal. This is the best place to start. I'm looking for recent changes, bug fixes, new features, anything that might be impacting the current behavior or performance of the audio stack. Hopefully the commit messages and descriptions are clear enough to quickly grasp the relevant details. This is the place to start.



229/6 2026/08/13 19:15 tool git-log
0m Args:
map[Count:30 PathPrefix:sound/core]

Results:
map[Output:f495b6c4c859 ALSA: pcm: wake linked drain waiters on unlink
c2744d5f3aea ALSA: timer: Clear SNDRV_TIMER_IFLG_DEAD once the close completes
70c977815af0 ALSA: ump: fix double free of out_cvts on rawmidi error
21e196884334 ALSA: seq: Fix division by zero in initialize_timer()
bdefe1346a8e ALSA: timer: drain a slave's callback before its master detaches it
70d28bfcd622 ALSA: timer: don't re-enter an instance callback that is still running
2c4dc0ed50b0 ALSA: seq: close a re-opened queue timer in the destructor
435990e25bf1 ALSA: seq: Fix uninitialised heap leak in snd_seq_event_dup()
53d1ae7c20d9 ALSA: pcm: fix __le32 cast warning in snd_pcm_set_sync_per_card
4a60127debb9 ALSA: compress: Fix task creation error unwind
100407f548ca ALSA: timer: Fix racy timeri->timer changes with rwlock
b113a891252c ALSA: core: Fix unintuitive behavior of snd_power_ref_and_wait()
e546128291f8 ALSA: seq: avoid stale FIFO cells during resize
49ce92d20782 ALSA: seq: oss: Serialize readq reset state with q->lock
9420958c5151 ALSA: seq: Don't re-bounce the error event
efc86691e4d8 ALSA: seq: Fix kernel heap address leak in bounce_error_event()
2fa8d8b6c18b ALSA: core: Use the new helper for the power refcount
dcca9b6064c3 ALSA: Add simple refcount helper functions
7bc02ab446d3 ALSA: pcm: Fix unlocked state reads in read/write file ops
764e7ed16d2d ALSA: timer: Disable work at freeing timer object
dde75ff0f651 Revert "ALSA: timer: Fix UAF at snd_timer_user_params()"
ccd0db6671d2 ALSA: timer: Manage timer object with kref
705dd6dcbc0e ALSA: seq: Clear variable event pointer on read
053a401b592b ALSA: timer: Fix UAF at snd_timer_user_params()
da3039e91d1f ALSA: timer: Forcibly close timer instances at closing
98fe3988a2ef ALSA: pcm: Fix unlocked runtime state reads in xfer ioctls
2b7bd6f54829 ALSA: seq: Fix partial userptr event expansion
2b5ff4db5d7a ALSA: seq: dummy: fix UMP event stack overread
88fe2e365872 ALSA: PCM: Fix wait queue list corruption in snd_pcm_drain() on linked streams
64917f839d37 ALSA: seq: oss: Use scoped cleanup for temporary MIDI use lock
]

230/6 2026/08/13 19:15 llm codeexpert
0m Model:
gemini-3.6-flash

Tokens:
							input: 12724
							output: 27
							thoughts: 58
						

Thoughts:
Here's my take on this, considering I'm deep in the weeds with this stuff:

**Investigating a Potential ALSA PCM Issue**

Okay, hold on a second. I think I need to back up and take a closer look at this commit, `f495b6c4c859`, specifically the one titled "ALSA: pcm: wake linked drain waiters on unlink". Something about that just caught my eye, and I have a feeling it might be related to the problem I'm trying to diagnose. Let's pull that commit up and really dissect what it's doing with the drain waiters.

Hmm, okay... and now, just to be thorough and because my instincts are pinging something, I'm going to run a quick search. I need to see *every* instance of `complete` within the entire `sound/` directory. Gotta see if that matches, as `complete` is a key function, and seeing it used in close proximity is often revealing! I'm hoping to quickly find anything connected to this area, the unlink, the drain waiters, and potential completion of tasks. Time to dig in!



231/6 2026/08/13 19:15 tool git-show
0m Args:
map[Commit:f495b6c4c859]

Results:
map[Output:commit f495b6c4c8594122918552c9be2b51eb71647cd9
Author: Norbert Szetei <norbert@doyensec.com>
Date:   Tue Jul 28 14:50:01 2026 +0200

    ALSA: pcm: wake linked drain waiters on unlink
    
    snd_pcm_drain() on a linked stream parks an on-stack wait entry on the
    drained peer's runtime->sleep, and after schedule_timeout() removes it
    only if that peer is still found in the caller's group.  If group
    membership changes during the wait and the sleep ends by signal or
    timeout (so autoremove_wake_function() does not run), finish_wait() is
    skipped and snd_pcm_drain() returns with the entry still queued on that
    stream's sleep list; a later wake_up() then walks a freed stack frame.
    This is reachable by unlinking either the drained or the draining stream.
    
    Unlike the close path (snd_pcm_drop() -> snd_pcm_post_stop()),
    snd_pcm_unlink() never wakes the sleep queues.  Wake every group member
    under the group lock before the membership change, so a linked drainer is
    released and drops its entry while the streams are still grouped.
    
    The window was opened when snd_pcm_link_rwsem stopped being held across
    the wait and the removal became conditional on group membership (see
    Fixes). The later switch to finish_wait() kept that conditional removal,
    so the signal/timeout case remained.
    
    Fixes: f57f3df03a8e ("ALSA: pcm: More fine-grained PCM link locking")
    Cc: stable@vger.kernel.org
    Assisted-by: Claude:claude-opus-5
    Signed-off-by: Norbert Szetei <norbert@doyensec.com>
    Link: https://patch.msgid.link/A0705100-D10B-4286-9980-0142ABEEAD51@doyensec.com
    Signed-off-by: Takashi Iwai <tiwai@suse.de>

diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c
index 7dc0060617f1..c9d0c2bb55b2 100644
--- a/sound/core/pcm_native.c
+++ b/sound/core/pcm_native.c
@@ -2367,6 +2367,7 @@ static void relink_to_local(struct snd_pcm_substream *substream)
 
 static int snd_pcm_unlink(struct snd_pcm_substream *substream)
 {
+	struct snd_pcm_substream *s;
 	struct snd_pcm_group *group;
 	bool nonatomic = substream->pcm->nonatomic;
 	bool do_free = false;
@@ -2379,6 +2380,12 @@ static int snd_pcm_unlink(struct snd_pcm_substream *substream)
 	group = substream->group;
 	snd_pcm_group_lock_irq(group, nonatomic);
 
+	/* release drain waiters before changing membership, else snd_pcm_drain()
+	 * leaves its on-stack wait entry queued on a member's sleep list
+	 */
+	snd_pcm_group_for_each_entry(s, substream)
+		wake_up(&s->runtime->sleep);
+
 	relink_to_local(substream);
 	refcount_dec(&group->refs);
 
]

232/6 2026/08/13 19:15 llm codeexpert
0m Model:
gemini-3.6-flash

Tokens:
							input: 13974
							output: 26
							thoughts: 42
						

Thoughts:
Okay, here's my take on those thoughts, framed as my own mental process:

**Diving Deep into the Completion Logic**

Right, hold on a second. Before I get bogged down in any specific area, let's take a step back and get a holistic view. I need to understand *every* single place where we're using those completion functions, `complete()` and `complete_all()`. I have a suspicion there might be some dependencies or interactions I'm missing by focusing too narrowly.

I'm thinking, "Let's fire up `grepper` and target the `sound/` directory". This will give me a comprehensive list of every instance of those functions. That way, I can ensure I don't miss any edge cases or unexpected side effects during my analysis and refactoring. I need to be thorough; I've learned that overlooking even a seemingly minor usage can lead to unexpected consequences down the line. This is the only way to tackle such a broad subject matter.



233/6 2026/08/13 19:15 tool grepper
0m Args:
map[Expression:complete(_all)?\( PathPrefix:sound]

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

sound/aoa/soundbus/i2sbus/pcm.c=616=static inline void handle_interrupt(struct i2sbus_dev *i2sdev, int in)
--
sound/aoa/soundbus/i2sbus/pcm.c-676-			if (pi->stop_completion)
sound/aoa/soundbus/i2sbus/pcm.c:677:				complete(pi->stop_completion);
sound/aoa/soundbus/i2sbus/pcm.c-678-		}
--
sound/core/init.c=585=static int snd_card_do_free(struct snd_card *card)
--
sound/core/init.c-602-	if (card->release_completion)
sound/core/init.c:603:		complete(card->release_completion);
sound/core/init.c-604-	if (!card->managed)
--
sound/core/pcm_dmaengine.c=134=EXPORT_SYMBOL_GPL(snd_dmaengine_pcm_set_config_from_dai_data);
sound/core/pcm_dmaengine.c-135-
sound/core/pcm_dmaengine.c:136:static void dmaengine_pcm_dma_complete(void *arg)
sound/core/pcm_dmaengine.c-137-{
--
sound/core/pcm_native.c=2570=static int snd_pcm_hw_constraints_init(struct snd_pcm_substream *substream)
--
sound/core/pcm_native.c-2693-
sound/core/pcm_native.c:2694:static int snd_pcm_hw_constraints_complete(struct snd_pcm_substream *substream)
sound/core/pcm_native.c-2695-{
--
sound/core/pcm_native.c=2806=int snd_pcm_open_substream(struct snd_pcm *pcm, int stream,
--
sound/core/pcm_native.c-2832-
sound/core/pcm_native.c:2833:	err = snd_pcm_hw_constraints_complete(substream);
sound/core/pcm_native.c-2834-	if (err < 0) {
--
sound/firewire/dice/dice-transaction.c=132=static void dice_notification(struct fw_card *card, struct fw_request *request,
--
sound/firewire/dice/dice-transaction.c-157-	if (bits & NOTIFY_CLOCK_ACCEPTED)
sound/firewire/dice/dice-transaction.c:158:		complete(&dice->clock_accepted);
sound/firewire/dice/dice-transaction.c-159-	wake_up(&dice->hwdep_wait);
--
sound/hda/codecs/cirrus/cs8409.c=124=static void cs8409_enable_i2c_clock(struct hda_codec *codec)
--
sound/hda/codecs/cirrus/cs8409.c-149- */
sound/hda/codecs/cirrus/cs8409.c:150:static int cs8409_i2c_wait_complete(struct hda_codec *codec)
sound/hda/codecs/cirrus/cs8409.c-151-{
--
sound/hda/codecs/cirrus/cs8409.c=180=static int cs8409_i2c_set_page(struct sub_codec *scodec, unsigned int i2c_reg)
--
sound/hda/codecs/cirrus/cs8409.c-185-		cs8409_vendor_coef_set(codec, CS8409_I2C_QWRITE, i2c_reg >> 8);
sound/hda/codecs/cirrus/cs8409.c:186:		if (cs8409_i2c_wait_complete(codec) < 0)
sound/hda/codecs/cirrus/cs8409.c-187-			return -EIO;
--
sound/hda/codecs/cirrus/cs8409.c=201=static int cs8409_i2c_read(struct sub_codec *scodec, unsigned int addr)
--
sound/hda/codecs/cirrus/cs8409.c-219-	cs8409_vendor_coef_set(codec, CS8409_I2C_QREAD, i2c_reg_data);
sound/hda/codecs/cirrus/cs8409.c:220:	if (cs8409_i2c_wait_complete(codec) < 0)
sound/hda/codecs/cirrus/cs8409.c-221-		goto error;
--
sound/hda/codecs/cirrus/cs8409.c=241=static int cs8409_i2c_bulk_read(struct sub_codec *scodec, struct cs8409_i2c_param *seq, int count)
--
sound/hda/codecs/cirrus/cs8409.c-261-
sound/hda/codecs/cirrus/cs8409.c:262:		if (cs8409_i2c_wait_complete(codec) < 0)
sound/hda/codecs/cirrus/cs8409.c-263-			goto error;
--
sound/hda/codecs/cirrus/cs8409.c=283=static int cs8409_i2c_write(struct sub_codec *scodec, unsigned int addr, unsigned int value)
--
sound/hda/codecs/cirrus/cs8409.c-302-
sound/hda/codecs/cirrus/cs8409.c:303:	if (cs8409_i2c_wait_complete(codec) < 0)
sound/hda/codecs/cirrus/cs8409.c-304-		goto error;
--
sound/hda/codecs/cirrus/cs8409.c=321=static int cs8409_i2c_bulk_write(struct sub_codec *scodec, const struct cs8409_i2c_param *seq,
--
sound/hda/codecs/cirrus/cs8409.c-342-
sound/hda/codecs/cirrus/cs8409.c:343:		if (cs8409_i2c_wait_complete(codec) < 0)
sound/hda/codecs/cirrus/cs8409.c-344-			goto error;
--
sound/hda/common/codec.c=2952=static int hda_codec_pm_prepare(struct device *dev)
--
sound/hda/common/codec.c-2960-
sound/hda/common/codec.c:2961:static void hda_codec_pm_complete(struct device *dev)
sound/hda/common/codec.c-2962-{
--
sound/hda/common/codec.c-2964-
sound/hda/common/codec.c:2965:	/* If no other pm-functions are called between prepare() and complete() */
sound/hda/common/codec.c-2966-	if (dev->power.power_state.event == PM_EVENT_SUSPEND)
--
sound/hda/controllers/intel.c=1019=static int azx_prepare(struct device *dev)
--
sound/hda/controllers/intel.c-1038-
sound/hda/controllers/intel.c:1039:static void azx_complete(struct device *dev)
sound/hda/controllers/intel.c-1040-{
--
sound/hda/controllers/intel.c=1344=static void azx_free(struct azx *chip)
--
sound/hda/controllers/intel.c-1363-	hda->init_failed = 1; /* to be sure */
sound/hda/controllers/intel.c:1364:	complete_all(&hda->probe_wait);
sound/hda/controllers/intel.c-1365-
--
sound/hda/controllers/intel.c=2150=static int azx_probe(struct pci_dev *pci,
--
sound/hda/controllers/intel.c-2256-	if (chip->disabled)
sound/hda/controllers/intel.c:2257:		complete_all(&hda->probe_wait);
sound/hda/controllers/intel.c-2258-	return 0;
--
sound/hda/controllers/intel.c=2342=static int azx_probe_continue(struct azx *chip)
--
sound/hda/controllers/intel.c-2440-		display_power(chip, false);
sound/hda/controllers/intel.c:2441:	complete_all(&hda->probe_wait);
sound/hda/controllers/intel.c-2442-	to_hda_bus(bus)->bus_probing = 0;
--
sound/hda/core/component.c=181=static int hdac_component_master_bind(struct device *dev)
--
sound/hda/core/component.c-209-
sound/hda/core/component.c:210:	complete_all(&acomp->master_bind_complete);
sound/hda/core/component.c-211-	return 0;
--
sound/hda/core/component.c-216-	component_unbind_all(dev, acomp);
sound/hda/core/component.c:217:	complete_all(&acomp->master_bind_complete);
sound/hda/core/component.c-218-
--
sound/soc/atmel/mchp-spdifrx.c=351=static irqreturn_t mchp_spdif_interrupt(int irq, void *dev_id)
--
sound/soc/atmel/mchp-spdifrx.c-370-			mchp_spdifrx_channel_user_data_read(dev, ch);
sound/soc/atmel/mchp-spdifrx.c:371:			complete(&ctrl->user_data[ch].done);
sound/soc/atmel/mchp-spdifrx.c-372-		}
--
sound/soc/atmel/mchp-spdifrx.c-379-			mchp_spdifrx_channel_status_read(dev, ch);
sound/soc/atmel/mchp-spdifrx.c:380:			complete(&ctrl->ch_stat[ch].done);
sound/soc/atmel/mchp-spdifrx.c-381-			regmap_write(dev->regmap, SPDIFRX_IDR, SPDIFRX_IR_CSC(ch));
--
sound/soc/codecs/cs35l35.c=1104=static irqreturn_t cs35l35_irq(int irq, void *data)
--
sound/soc/codecs/cs35l35.c-1126-	if (sticky2 & CS35L35_PDN_DONE)
sound/soc/codecs/cs35l35.c:1127:		complete(&cs35l35->pdn_done);
sound/soc/codecs/cs35l35.c-1128-
--
sound/soc/codecs/cs35l56.c=2050=int cs35l56_init(struct cs35l56_private *cs35l56)
--
sound/soc/codecs/cs35l56.c-2125-	cs35l56->base.init_done = true;
sound/soc/codecs/cs35l56.c:2126:	complete_all(&cs35l56->init_completion);
sound/soc/codecs/cs35l56.c-2127-
--
sound/soc/codecs/cs4234.c=116=static void cs4234_vq_ramp_done(struct work_struct *work)
--
sound/soc/codecs/cs4234.c-120-
sound/soc/codecs/cs4234.c:121:	complete_all(&cs4234->vq_ramp_complete);
sound/soc/codecs/cs4234.c-122-}
--
sound/soc/codecs/cs42l43.c=258=static irqreturn_t cs42l43_##name(int irq, void *data) \
--
sound/soc/codecs/cs42l43.c-261-	dev_dbg(priv->dev, #name " completed\n"); \
sound/soc/codecs/cs42l43.c:262:	complete(&priv->name); \
sound/soc/codecs/cs42l43.c-263-	return IRQ_HANDLED; \
--
sound/soc/codecs/cs43130.c=2226=static irqreturn_t cs43130_irq_thread(int irq, void *data)
--
sound/soc/codecs/cs43130.c-2250-	if (stickies[0] & CS43130_XTAL_RDY_INT) {
sound/soc/codecs/cs43130.c:2251:		complete(&cs43130->xtal_rdy);
sound/soc/codecs/cs43130.c-2252-		return IRQ_HANDLED;
--
sound/soc/codecs/cs43130.c-2255-	if (stickies[0] & CS43130_PLL_RDY_INT) {
sound/soc/codecs/cs43130.c:2256:		complete(&cs43130->pll_rdy);
sound/soc/codecs/cs43130.c-2257-		return IRQ_HANDLED;
--
sound/soc/codecs/cs43130.c-2264-			cs43130->hpload_stat);
sound/soc/codecs/cs43130.c:2265:		complete(&cs43130->hpload_evt);
sound/soc/codecs/cs43130.c-2266-		return IRQ_HANDLED;
--
sound/soc/codecs/cs43130.c-2272-			cs43130->hpload_stat);
sound/soc/codecs/cs43130.c:2273:		complete(&cs43130->hpload_evt);
sound/soc/codecs/cs43130.c-2274-		return IRQ_HANDLED;
--
sound/soc/codecs/cs43130.c-2280-			cs43130->hpload_stat);
sound/soc/codecs/cs43130.c:2281:		complete(&cs43130->hpload_evt);
sound/soc/codecs/cs43130.c-2282-		return IRQ_HANDLED;
--
sound/soc/codecs/cs43130.c-2288-			cs43130->hpload_stat);
sound/soc/codecs/cs43130.c:2289:		complete(&cs43130->hpload_evt);
sound/soc/codecs/cs43130.c-2290-		return IRQ_HANDLED;
--
sound/soc/codecs/cs43130.c-2296-			cs43130->hpload_stat);
sound/soc/codecs/cs43130.c:2297:		complete(&cs43130->hpload_evt);
sound/soc/codecs/cs43130.c-2298-		return IRQ_HANDLED;
--
sound/soc/codecs/cs43130.c-2304-			cs43130->hpload_stat);
sound/soc/codecs/cs43130.c:2305:		complete(&cs43130->hpload_evt);
sound/soc/codecs/cs43130.c-2306-		return IRQ_HANDLED;
--
sound/soc/codecs/cs43130.c-2312-			cs43130->hpload_stat);
sound/soc/codecs/cs43130.c:2313:		complete(&cs43130->hpload_evt);
sound/soc/codecs/cs43130.c-2314-		return IRQ_HANDLED;
--
sound/soc/codecs/hda.c=124=static void hda_codec_unregister_dais(struct hda_codec *codec,
--
sound/soc/codecs/hda.c-145-
sound/soc/codecs/hda.c:146:int hda_codec_probe_complete(struct hda_codec *codec)
sound/soc/codecs/hda.c-147-{
--
sound/soc/codecs/hda.c=172=static int hda_codec_probe(struct snd_soc_component *component)
--
sound/soc/codecs/hda.c-239-	if (!hda_codec_is_display(codec)) {
sound/soc/codecs/hda.c:240:		ret = hda_codec_probe_complete(codec);
sound/soc/codecs/hda.c-241-		if (ret < 0)
--
sound/soc/codecs/hda.c=267=static void hda_codec_remove(struct snd_soc_component *component)
--
sound/soc/codecs/hda.c-295-	/*
sound/soc/codecs/hda.c:296:	 * HDMI card's hda_codec_probe_complete() (see late_probe()) may
sound/soc/codecs/hda.c-297-	 * not be called due to early error, leaving bus uc unbalanced
--
sound/soc/codecs/hda.h=16=extern const struct hdac_ext_bus_ops soc_hda_ext_bus_ops;
sound/soc/codecs/hda.h:17:int hda_codec_probe_complete(struct hda_codec *codec);
sound/soc/codecs/hda.h-18-
--
sound/soc/codecs/tac5xx2-sdw.c=1511=static void tac5xx2_fw_ready(const struct firmware *fmw, void *context)
--
sound/soc/codecs/tac5xx2-sdw.c-1592-out:
sound/soc/codecs/tac5xx2-sdw.c:1593:	complete_all(&tac_dev->fw_caching_complete);
sound/soc/codecs/tac5xx2-sdw.c-1594-	if (fmw)
--
sound/soc/codecs/tac5xx2-sdw.c=1893=static s32 tac_sdw_probe(struct sdw_slave *peripheral,
--
sound/soc/codecs/tac5xx2-sdw.c-1980-		if (ret) {
sound/soc/codecs/tac5xx2-sdw.c:1981:			complete_all(&tac_dev->fw_caching_complete);
sound/soc/codecs/tac5xx2-sdw.c-1982-			dev_dbg(dev, "failed to load fw: %d, use rom mode\n", ret);
--
sound/soc/codecs/tac5xx2-sdw.c-1984-	} else {
sound/soc/codecs/tac5xx2-sdw.c:1985:		complete_all(&tac_dev->fw_caching_complete);
sound/soc/codecs/tac5xx2-sdw.c-1986-	}
--
sound/soc/codecs/wm0010.c=190=static void wm0010_mark_boot_failure(struct wm0010_priv *wm0010)
--
sound/soc/codecs/wm0010.c-204-
sound/soc/codecs/wm0010.c:205:static void wm0010_boot_xfer_complete(void *data)
sound/soc/codecs/wm0010.c-206-{
--
sound/soc/codecs/wm0010.c-217-		if (xfer->done)
sound/soc/codecs/wm0010.c:218:			complete(xfer->done);
sound/soc/codecs/wm0010.c-219-		return;
--
sound/soc/codecs/wm0010.c-320-	if (xfer->done)
sound/soc/codecs/wm0010.c:321:		complete(xfer->done);
sound/soc/codecs/wm0010.c-322-}
--
sound/soc/codecs/wm0010.c=827=static irqreturn_t wm0010_irq(int irq, void *data)
--
sound/soc/codecs/wm0010.c-835-		spin_lock(&wm0010->irq_lock);
sound/soc/codecs/wm0010.c:836:		complete(&wm0010->boot_completion);
sound/soc/codecs/wm0010.c-837-		spin_unlock(&wm0010->irq_lock);
--
sound/soc/codecs/wm2200.c=2112=static irqreturn_t wm2200_irq(int irq, void *data)
--
sound/soc/codecs/wm2200.c-2134-		dev_dbg(wm2200->dev, "FLL locked\n");
sound/soc/codecs/wm2200.c:2135:		complete(&wm2200->fll_lock);
sound/soc/codecs/wm2200.c-2136-	}
--
sound/soc/codecs/wm5100.c=2154=static irqreturn_t wm5100_irq(int irq, void *data)
--
sound/soc/codecs/wm5100.c-2186-		dev_dbg(wm5100->dev, "FLL1 locked\n");
sound/soc/codecs/wm5100.c:2187:		complete(&wm5100->fll[0].lock);
sound/soc/codecs/wm5100.c-2188-	}
--
sound/soc/codecs/wm5100.c-2190-		dev_dbg(wm5100->dev, "FLL2 locked\n");
sound/soc/codecs/wm5100.c:2191:		complete(&wm5100->fll[1].lock);
sound/soc/codecs/wm5100.c-2192-	}
--
sound/soc/codecs/wm8962.c=3131=static irqreturn_t wm8962_irq(int irq, void *data)
--
sound/soc/codecs/wm8962.c-3174-		dev_dbg(dev, "FLL locked\n");
sound/soc/codecs/wm8962.c:3175:		complete(&wm8962->fll_lock);
sound/soc/codecs/wm8962.c-3176-	}
--
sound/soc/codecs/wm8993.c=1405=static irqreturn_t wm8993_irq(int irq, void *data)
--
sound/soc/codecs/wm8993.c-1433-		dev_dbg(wm8993->dev, "FLL locked\n");
sound/soc/codecs/wm8993.c:1434:		complete(&wm8993->fll_lock);
sound/soc/codecs/wm8993.c-1435-	}
--
sound/soc/codecs/wm8994.c=2470=static irqreturn_t wm8994_fll_locked_irq(int irq, void *data)
--
sound/soc/codecs/wm8994.c-2473-
sound/soc/codecs/wm8994.c:2474:	complete(completion);
sound/soc/codecs/wm8994.c-2475-
--
sound/soc/codecs/wm8996.c=2485=static irqreturn_t wm8996_irq(int irq, void *data)
--
sound/soc/codecs/wm8996.c-2505-		dev_dbg(component->dev, "DC servo IRQ\n");
sound/soc/codecs/wm8996.c:2506:		complete(&wm8996->dcs_done);
sound/soc/codecs/wm8996.c-2507-	}
--
sound/soc/codecs/wm8996.c-2513-		dev_dbg(component->dev, "FLL locked\n");
sound/soc/codecs/wm8996.c:2514:		complete(&wm8996->fll_lock);
sound/soc/codecs/wm8996.c-2515-	}
--
sound/soc/codecs/wm_hubs.c=98=irqreturn_t wm_hubs_dcs_done(int irq, void *data)
--
sound/soc/codecs/wm_hubs.c-101-
sound/soc/codecs/wm_hubs.c:102:	complete(&hubs->dcs_done);
sound/soc/codecs/wm_hubs.c-103-
--
sound/soc/fsl/fsl_asrc_dma.c=32=static bool filter(struct dma_chan *chan, void *param)
--
sound/soc/fsl/fsl_asrc_dma.c-41-
sound/soc/fsl/fsl_asrc_dma.c:42:static void fsl_asrc_dma_complete(void *arg)
sound/soc/fsl/fsl_asrc_dma.c-43-{
--
sound/soc/fsl/fsl_asrc_m2m.c=31=static void asrc_input_dma_callback(void *data)
--
sound/soc/fsl/fsl_asrc_m2m.c-34-
sound/soc/fsl/fsl_asrc_m2m.c:35:	complete(&pair->complete[IN]);
sound/soc/fsl/fsl_asrc_m2m.c-36-}
--
sound/soc/fsl/fsl_asrc_m2m.c=39=static void asrc_output_dma_callback(void *data)
--
sound/soc/fsl/fsl_asrc_m2m.c-42-
sound/soc/fsl/fsl_asrc_m2m.c:43:	complete(&pair->complete[OUT]);
sound/soc/fsl/fsl_asrc_m2m.c-44-}
--
sound/soc/fsl/fsl_qmc_audio.c=84=static int qmc_audio_pcm_hw_params(struct snd_soc_component *component,
--
sound/soc/fsl/fsl_qmc_audio.c-113-
sound/soc/fsl/fsl_qmc_audio.c:114:static void qmc_audio_pcm_write_complete(void *context);
sound/soc/fsl/fsl_qmc_audio.c-115-
sound/soc/fsl/fsl_qmc_audio.c=116=static int qmc_audio_pcm_write_submit(struct qmc_dai_prtd *prtd)
--
sound/soc/fsl/fsl_qmc_audio.c-136-
sound/soc/fsl/fsl_qmc_audio.c:137:static void qmc_audio_pcm_write_complete(void *context)
sound/soc/fsl/fsl_qmc_audio.c-138-{
--
sound/soc/fsl/fsl_qmc_audio.c-153-
sound/soc/fsl/fsl_qmc_audio.c:154:static void qmc_audio_pcm_read_complete(void *context, size_t length, unsigned int flags);
sound/soc/fsl/fsl_qmc_audio.c-155-
sound/soc/fsl/fsl_qmc_audio.c=156=static int qmc_audio_pcm_read_submit(struct qmc_dai_prtd *prtd)
--
sound/soc/fsl/fsl_qmc_audio.c-176-
sound/soc/fsl/fsl_qmc_audio.c:177:static void qmc_audio_pcm_read_complete(void *context, size_t length, unsigned int flags)
sound/soc/fsl/fsl_qmc_audio.c-178-{
--
sound/soc/fsl/imx-audio-rpmsg.c=18=static int imx_audio_rpmsg_cb(struct rpmsg_device *rpdev, void *data, int len,
--
sound/soc/fsl/imx-audio-rpmsg.c-64-		memcpy(&info->r_msg, r_msg, sizeof(struct rpmsg_r_msg));
sound/soc/fsl/imx-audio-rpmsg.c:65:		complete(&info->cmd_complete);
sound/soc/fsl/imx-audio-rpmsg.c-66-		break;
--
sound/soc/fsl/imx-pcm-rpmsg.c=315=static int imx_rpmsg_pcm_prepare(struct snd_soc_component *component,
--
sound/soc/fsl/imx-pcm-rpmsg.c-342-
sound/soc/fsl/imx-pcm-rpmsg.c:343:static void imx_rpmsg_pcm_dma_complete(void *arg)
sound/soc/fsl/imx-pcm-rpmsg.c-344-{
--
sound/soc/intel/atom/sst-mfld-platform-pcm.c=751=static int sst_soc_prepare(struct device *dev)
--
sound/soc/intel/atom/sst-mfld-platform-pcm.c-775-
sound/soc/intel/atom/sst-mfld-platform-pcm.c:776:static void sst_soc_complete(struct device *dev)
sound/soc/intel/atom/sst-mfld-platform-pcm.c-777-{
--
sound/soc/intel/avs/boards/hdaudio.c=96=static int avs_card_late_probe(struct snd_soc_card *card)
--
sound/soc/intel/avs/boards/hdaudio.c-122-
sound/soc/intel/avs/boards/hdaudio.c:123:	return hda_codec_probe_complete(codec);
sound/soc/intel/avs/boards/hdaudio.c-124-}
--
sound/soc/intel/avs/cldma.c=251=void hda_cldma_interrupt(struct hda_cldma *cl)
--
sound/soc/intel/avs/cldma.c-258-
sound/soc/intel/avs/cldma.c:259:	complete(&cl->completion);
sound/soc/intel/avs/cldma.c-260-}
--
sound/soc/intel/avs/cnl.c=15=static void avs_cnl_ipc_interrupt(struct avs_dev *adev)
--
sound/soc/intel/avs/cnl.c-27-	if (hipc_ack & spec->hipc->ack_done_mask) {
sound/soc/intel/avs/cnl.c:28:		complete(&adev->ipc->done_completion);
sound/soc/intel/avs/cnl.c-29-
--
sound/soc/intel/avs/ipc.c=209=static void avs_dsp_process_notification(struct avs_dev *adev, u64 header)
--
sound/soc/intel/avs/ipc.c-268-		adev->ipc->ready = true;
sound/soc/intel/avs/ipc.c:269:		complete(&adev->fw_ready);
sound/soc/intel/avs/ipc.c-270-		break;
--
sound/soc/intel/avs/ipc.c=287=void avs_dsp_process_response(struct avs_dev *adev, u64 header)
--
sound/soc/intel/avs/ipc.c-304-
sound/soc/intel/avs/ipc.c:305:	complete(&ipc->busy_completion);
sound/soc/intel/avs/ipc.c-306-}
--
sound/soc/intel/avs/mtl.c=128=static void avs_mtl_ipc_interrupt(struct avs_dev *adev)
--
sound/soc/intel/avs/mtl.c-140-	if (hipc_ack & spec->hipc->ack_done_mask) {
sound/soc/intel/avs/mtl.c:141:		complete(&adev->ipc->done_completion);
sound/soc/intel/avs/mtl.c-142-
--
sound/soc/intel/avs/skl.c=18=void avs_skl_ipc_interrupt(struct avs_dev *adev)
--
sound/soc/intel/avs/skl.c-30-	if (hipc_ack & spec->hipc->ack_done_mask) {
sound/soc/intel/avs/skl.c:31:		complete(&adev->ipc->done_completion);
sound/soc/intel/avs/skl.c-32-
--
sound/soc/intel/boards/bytcht_es8316.c=408=static int byt_cht_es8316_resume(struct snd_soc_card *card)
--
sound/soc/intel/boards/bytcht_es8316.c-429-	 * the GPIO can only be changed underneath us during a system suspend.
sound/soc/intel/boards/bytcht_es8316.c:430:	 * This resume() function runs from a pm complete() callback, and thus
sound/soc/intel/boards/bytcht_es8316.c-431-	 * is guaranteed to run after the touchscreen driver/ACPI-subsys has
--
sound/soc/intel/catpt/ipc.c=195=static void catpt_dsp_process_response(struct catpt_dev *cdev, u32 header)
--
sound/soc/intel/catpt/ipc.c-209-		catpt_ipc_arm(ipc, &config);
sound/soc/intel/catpt/ipc.c:210:		complete(&cdev->fw_ready);
sound/soc/intel/catpt/ipc.c-211-		return;
--
sound/soc/intel/catpt/ipc.c-224-
sound/soc/intel/catpt/ipc.c:225:		complete(&cdev->fw_ready);
sound/soc/intel/catpt/ipc.c-226-		/* TODO: attempt recovery */
--
sound/soc/intel/catpt/ipc.c-236-			/* signal completion of delayed reply */
sound/soc/intel/catpt/ipc.c:237:			complete(&ipc->busy_completion);
sound/soc/intel/catpt/ipc.c-238-			break;
--
sound/soc/intel/catpt/ipc.c=272=irqreturn_t catpt_dsp_irq_handler(int irq, void *dev_id)
--
sound/soc/intel/catpt/ipc.c-288-		catpt_dsp_copy_rx(cdev, ipcc);
sound/soc/intel/catpt/ipc.c:289:		complete(&cdev->ipc.done_completion);
sound/soc/intel/catpt/ipc.c-290-
--
sound/soc/qcom/qdsp6/topology.c=1077=static int audioreach_route_unload(struct snd_soc_component *scomp,
--
sound/soc/qcom/qdsp6/topology.c-1082-
sound/soc/qcom/qdsp6/topology.c:1083:static int audioreach_tplg_complete(struct snd_soc_component *component)
sound/soc/qcom/qdsp6/topology.c-1084-{
--
sound/soc/renesas/fsi.c=1331=static int fsi_dma_init(struct fsi_priv *fsi, struct fsi_stream *io)
--
sound/soc/renesas/fsi.c-1342-
sound/soc/renesas/fsi.c:1343:static void fsi_dma_complete(void *data)
sound/soc/renesas/fsi.c-1344-{
--
sound/soc/renesas/siu_pcm.c=59=static int siu_pcm_stmwrite_start(struct siu_port *port_info)
--
sound/soc/renesas/siu_pcm.c-77-
sound/soc/renesas/siu_pcm.c:78:static void siu_dma_tx_complete(void *arg)
sound/soc/renesas/siu_pcm.c-79-{
--
sound/soc/samsung/tm2_wm5110.c=634=static int tm2_pm_prepare(struct device *dev)
--
sound/soc/samsung/tm2_wm5110.c-640-
sound/soc/samsung/tm2_wm5110.c:641:static void tm2_pm_complete(struct device *dev)
sound/soc/samsung/tm2_wm5110.c-642-{
--
sound/soc/sdca/sdca_fdl.c=313=static void fdl_end(struct sdca_interrupt *interrupt)
--
sound/soc/sdca/sdca_fdl.c-322-	pm_runtime_put(interrupt->dev);
sound/soc/sdca/sdca_fdl.c:323:	complete(&fdl_state->done);
sound/soc/sdca/sdca_fdl.c-324-
--
sound/soc/sdca/sdca_fdl.c=343=static int fdl_status_process(struct sdca_interrupt *interrupt, unsigned int status)
--
sound/soc/sdca/sdca_fdl.c-352-		pm_runtime_get(interrupt->dev);
sound/soc/sdca/sdca_fdl.c:353:		complete(&fdl_state->begin);
sound/soc/sdca/sdca_fdl.c-354-
--
sound/soc/soc-component.c=785=EXPORT_SYMBOL_GPL(snd_soc_component_update_bits);
--
sound/soc/soc-component.c-797- * when the function returns. To make sure that all scheduled updates have been
sound/soc/soc-component.c:798: * completed snd_soc_component_async_complete() must be called.
sound/soc/soc-component.c-799- *
--
sound/soc/soc-component.c=862=EXPORT_SYMBOL_GPL(snd_soc_component_write_field);
--
sound/soc/soc-component.c-864-/**
sound/soc/soc-component.c:865: * snd_soc_component_async_complete() - Ensure asynchronous I/O has completed
sound/soc/soc-component.c-866- * @component: Component for which to wait
--
sound/soc/soc-component.c-870- */
sound/soc/soc-component.c:871:void snd_soc_component_async_complete(struct snd_soc_component *component)
sound/soc/soc-component.c-872-{
sound/soc/soc-component.c-873-	if (component->regmap)
sound/soc/soc-component.c:874:		regmap_async_complete(component->regmap);
sound/soc/soc-component.c-875-}
--
sound/soc/soc-dapm.c=1007=static int dapm_test_bits(struct snd_soc_dapm_context *dapm,
--
sound/soc/soc-dapm.c-1014-
sound/soc/soc-dapm.c:1015:static void dapm_async_complete(struct snd_soc_dapm_context *dapm)
sound/soc/soc-dapm.c-1016-{
sound/soc/soc-dapm.c-1017-	if (dapm->component)
sound/soc/soc-dapm.c:1018:		snd_soc_component_async_complete(dapm->component);
sound/soc/soc-dapm.c-1019-}
--
sound/soc/soc-dapm.c=1652=int snd_soc_dapm_regulator_event(struct snd_soc_dapm_widget *w,
--
sound/soc/soc-dapm.c-1657-
sound/soc/soc-dapm.c:1658:	dapm_async_complete(w->dapm);
sound/soc/soc-dapm.c-1659-
--
sound/soc/soc-dapm.c=1712=int snd_soc_dapm_clock_event(struct snd_soc_dapm_widget *w,
--
sound/soc/soc-dapm.c-1717-
sound/soc/soc-dapm.c:1718:	dapm_async_complete(w->dapm);
sound/soc/soc-dapm.c-1719-
--
sound/soc/soc-dapm.c=1834=static void dapm_seq_check_event(struct snd_soc_card *card,
--
sound/soc/soc-dapm.c-1877-		dapm_pop_dbg(dev, "pop test : %s %s\n", w->name, ev_name);
sound/soc/soc-dapm.c:1878:		dapm_async_complete(w->dapm);
sound/soc/soc-dapm.c-1879-		trace_snd_soc_dapm_widget_event_start(w, event);

]

234/6 2026/08/13 19:15 llm codeexpert
0m Model:
gemini-3.6-flash

Tokens:
							input: 25502
							output: 24
							thoughts: 106
						

Thoughts:
**Analyzing Potential Use-After-Free Vulnerabilities in ALSA Core**

Okay, so the question before me is essentially a hunt for similar use-after-free vulnerabilities within the ALSA core, specifically those that might arise after a call to `complete`. The query is clear: "Is there any other place in ALSA core where a similar use-after-free might happen after calling `complete`?"

My first instinct is to dive into the code and systematically analyze it. To do that, I'll need to focus my search on the `sound/core/` directory within the ALSA project. This is where the core audio functionality resides, and is the likely spot to find these types of race conditions.

My next thought is, let's cast a wide net initially, looking for *all* uses of completion related functions. I need to be thorough. I'll need to check for instances of `completion` structures themselves, as well as uses of `complete`, `complete_all`, and `wait_for_completion`. A simple grep search for "completion" in the `sound/core/` directory will be a good starting point. This will give me a comprehensive list of potential areas to examine closely.



235/6 2026/08/13 19:15 tool grepper
0m Args:
map[Expression:completion PathPrefix:sound/core]

Results:
map[Output:sound/core/compress_offload.c=911=static int snd_compress_wait_for_drain(struct snd_compr_stream *stream)
--
sound/core/compress_offload.c-918-	 *
sound/core/compress_offload.c:919:	 * It is expected that driver will notify the drain completion and then
sound/core/compress_offload.c-920-	 * stream will be moved to SETUP state, even if draining resulted in an
--
sound/core/init.c-16-#include <linux/debugfs.h>
sound/core/init.c:17:#include <linux/completion.h>
sound/core/init.c-18-#include <linux/interrupt.h>
--
sound/core/init.c=585=static int snd_card_do_free(struct snd_card *card)
--
sound/core/init.c-601-	}
sound/core/init.c:602:	if (card->release_completion)
sound/core/init.c:603:		complete(card->release_completion);
sound/core/init.c-604-	if (!card->managed)
--
sound/core/init.c=644=void snd_card_free(struct snd_card *card)
--
sound/core/init.c-656-
sound/core/init.c:657:	card->release_completion = &released;
sound/core/init.c-658-	snd_card_free_when_closed(card);
--
sound/core/init.c-660-	/* wait, until all devices are ready for the free operation */
sound/core/init.c:661:	wait_for_completion(&released);
sound/core/init.c-662-}
]

236/6 2026/08/13 19:15 llm codeexpert
0m Model:
gemini-3.6-flash

Tokens:
							input: 26352
							output: 28
							thoughts: 150
						

Thoughts:
**Investigating Sound Core's Power Management**

Okay, so I'm digging into the sound core, specifically in the `sound/core/` directory. I've spotted something interesting in `sound/core/init.c`. There's a `card->release_completion` variable and a corresponding `complete(card->release_completion);` call. This is making me think about how the card is released and what kind of synchronization is happening here.

My next immediate thought is whether this pattern, specifically the use of `complete`, completions generally, `snd_power_wait`, `snd_power_ref_and_wait`, or `wait_for_completion`, is replicated anywhere else in `sound/core/` or even the broader `sound/` directory. It's crucial to understand the overall architecture and how different components interact in terms of power management and resource release.

So, I need to do a thorough search. I'll need to check all occurrences of `complete`, `completion`, and `wait_for_completion` across the relevant directory tree. Actually, let's start with a focused grep for `wait_for_completion` in the `sound/core/` directory to see if that gives me a narrower set of results to examine first.



237/6 2026/08/13 19:15 tool grepper
0m Args:
map[Expression:wait_for_completion PathPrefix:sound/core]

Results:
map[Output:sound/core/init.c=644=void snd_card_free(struct snd_card *card)
--
sound/core/init.c-660-	/* wait, until all devices are ready for the free operation */
sound/core/init.c:661:	wait_for_completion(&released);
sound/core/init.c-662-}
]

238/6 2026/08/13 19:15 llm codeexpert
0m Model:
gemini-3.6-flash

Tokens:
							input: 26903
							output: 21
							thoughts: 84
						

Thoughts:
**My Code Search Strategy**

Okay, hold on a minute. Before I get too deep, I need to be absolutely sure I'm not missing something obvious within the `sound/core/` directory. My gut feeling is that there might be a flag or a function related to completion or waiting for completion – something like `complete`, `completion`, `wait_for_completion`, or even `complete_all` – scattered somewhere in those files. I need to be thorough.

So, the first thing I need to do is enumerate all the files residing in `sound/core/`. Once I have a comprehensive list, I'll leverage the power of `codesearch-dir-index` to perform a targeted search across that entire directory. This will allow me to rapidly scan for any occurrences of those key terms, ensuring I haven’t missed a relevant piece of the puzzle. It’s the most efficient way to achieve comprehensive coverage.



239/6 2026/08/13 19:15 tool codesearch-dir-index
0m Args:
map[Dir:sound/core]

Results:
map[Files:[compress_offload.c control.c control_compat.c control_led.c control_trace.h ctljack.c device.c hrtimer.c hwdep.c hwdep_compat.c info.c info_oss.c init.c isadma.c jack.c memalloc.c memory.c misc.c pcm.c pcm_compat.c pcm_dmaengine.c pcm_drm_eld.c pcm_iec958.c pcm_lib.c pcm_local.h pcm_memory.c pcm_misc.c pcm_native.c pcm_param_trace.h pcm_timer.c pcm_trace.h rawmidi.c rawmidi_compat.c seq_device.c sound.c sound_kunit.c sound_oss.c timer.c timer_compat.c ump.c ump_convert.c vmaster.c] Subdirs:[oss seq]]

240/6 2026/08/13 19:15 llm codeexpert
0m Model:
gemini-3.6-flash

Tokens:
							input: 27549
							output: 24
							thoughts: 63
						

Thoughts:
**Investigating Sound Driver Completion Mechanisms**

Okay, so I'm digging into this sound driver code, and I need to be thorough. I've got to cover all the bases. I'm thinking, "Where else might I find some relevant information about completion and waiting within the sound core?" Clearly, the main `sound/core/` directory is the first place to look, but I can't be too narrow. I should also check those subdirectories: `sound/core/seq/` and `sound/core/oss/`. Those are potential hotspots for related logic.

Now, I'm thinking about the keywords. To be efficient, I'll use `grep` to quickly scan the entire `sound/core/` directory tree (including the `seq` and `oss` subdirectories). Specifically, I'll search for occurrences of keywords like "complete," "completion," "wait," and "wait_for." Those are the terms that are most likely to point me to the areas where these sound drivers handle completion events. This approach should help me pinpoint the code that's relevant to how the drivers handle event completion, synchronization, and waiting. That's the most efficient way to track this down, rather than going through line by line.



241/6 2026/08/13 19:15 tool grepper
0m Args:
map[Expression:complete PathPrefix:sound/core]

Results:
map[Output:sound/core/compress_offload.c=434=static __poll_t snd_compr_poll(struct file *f, poll_table *wait)
--
sound/core/compress_offload.c-478-	case SNDRV_PCM_STATE_DRAINING:
sound/core/compress_offload.c:479:		/* stream has been woken up after drain is complete
sound/core/compress_offload.c-480-		 * draining done so set stream state to stopped
--
sound/core/compress_offload.c=911=static int snd_compress_wait_for_drain(struct snd_compr_stream *stream)
--
sound/core/compress_offload.c-916-	 * We are called with lock held. So drop the lock while we wait for
sound/core/compress_offload.c:917:	 * drain complete notification from the driver
sound/core/compress_offload.c-918-	 *
--
sound/core/compress_offload.c-925-
sound/core/compress_offload.c:926:	/* we wait for drain to complete here, drain can return when
sound/core/compress_offload.c-927-	 * interruption occurred, wait returned error or success.
--
sound/core/init.c=585=static int snd_card_do_free(struct snd_card *card)
--
sound/core/init.c-602-	if (card->release_completion)
sound/core/init.c:603:		complete(card->release_completion);
sound/core/init.c-604-	if (!card->managed)
--
sound/core/pcm_dmaengine.c=134=EXPORT_SYMBOL_GPL(snd_dmaengine_pcm_set_config_from_dai_data);
sound/core/pcm_dmaengine.c-135-
sound/core/pcm_dmaengine.c:136:static void dmaengine_pcm_dma_complete(void *arg)
sound/core/pcm_dmaengine.c-137-{
--
sound/core/pcm_dmaengine.c=150=static int dmaengine_pcm_prepare_and_submit(struct snd_pcm_substream *substream)
--
sound/core/pcm_dmaengine.c-171-
sound/core/pcm_dmaengine.c:172:	desc->callback = dmaengine_pcm_dma_complete;
sound/core/pcm_dmaengine.c-173-	desc->callback_param = substream;
--
sound/core/pcm_native.c=2570=static int snd_pcm_hw_constraints_init(struct snd_pcm_substream *substream)
--
sound/core/pcm_native.c-2693-
sound/core/pcm_native.c:2694:static int snd_pcm_hw_constraints_complete(struct snd_pcm_substream *substream)
sound/core/pcm_native.c-2695-{
--
sound/core/pcm_native.c=2806=int snd_pcm_open_substream(struct snd_pcm *pcm, int stream,
--
sound/core/pcm_native.c-2832-
sound/core/pcm_native.c:2833:	err = snd_pcm_hw_constraints_complete(substream);
sound/core/pcm_native.c-2834-	if (err < 0) {
sound/core/pcm_native.c:2835:		pcm_dbg(pcm, "snd_pcm_hw_constraints_complete failed\n");
sound/core/pcm_native.c-2836-		goto error;
--
sound/core/seq/seq_ump_convert.c=803=static int fill_rpn(struct ump_cvt_to_ump_bank *cc,
--
sound/core/seq/seq_ump_convert.c-809-		return 0; // skip
sound/core/seq/seq_ump_convert.c:810:	/* when not flushing, wait for complete data set */
sound/core/seq/seq_ump_convert.c-811-	if (!flush && (!cc->cc_data_lsb_set || !cc->cc_data_msb_set))
--
sound/core/ump.c=298=static unsigned char ump_packet_words[0x10] = {
--
sound/core/ump.c-307- * The data is copied onto ump->input_buf[].
sound/core/ump.c:308: * When a full packet is completed, returns the number of words (from 1 to 4).
sound/core/ump.c:309: * OTOH, if the packet is incomplete, returns 0.
sound/core/ump.c-310- */
--
sound/core/ump_convert.c=299=static int fill_rpn(struct ump_cvt_to_ump_bank *cc,
--
sound/core/ump_convert.c-304-		return 0; // skip
sound/core/ump_convert.c:305:	/* when not flushing, wait for complete data set */
sound/core/ump_convert.c-306-	if (!flush && (!cc->cc_data_lsb_set || !cc->cc_data_msb_set))
--
sound/core/ump_convert.c=446=static int do_convert_to_ump(struct ump_cvt_to_ump *cvt, unsigned char group,
--
sound/core/ump_convert.c-519- *
sound/core/ump_convert.c:520: * Feed a MIDI 1.0 byte @c and convert to a UMP packet if completed.
sound/core/ump_convert.c-521- * The result is stored in the buffer in @cvt.
]

242/6 2026/08/13 19:15 llm codeexpert
0m Model:
gemini-3.6-flash

Tokens:
							input: 29381
							output: 23
							thoughts: 242
						

Thoughts:
**My Investigation Plan: Auditing ALSA Core for Potential UAFs After `complete()` Calls**

Okay, here's how I'm approaching this. The user's question, "Is there any other place in ALSA core where a similar use-after-free might happen after calling `complete()`?", has me thinking systematically. First, I'll start by checking for any existing or potential use of the completion routines within `sound/core/` and the broader `sound/` directory. Are there any other obvious completion calls or instances of `complete_all` I might have missed?

Then, I'm going to leverage my git fu. I'll search the commit history within the `sound/` tree for keywords like "complete", "completion", "use-after-free", and "UAF". This is a good way to identify any recent commits that might touch on these issues, especially if they are related to the completion or release logic.

Next, I'll broaden the scope with `git log` searches. I'll construct some robust `MessageRegexps` covering terms like "complete" and search across relevant directories: `sound/`, `sound/core/`, and possibly the whole kernel if I need to. This will help me catch any relevant discussions or patches, even if the keyword isn't directly in the commit message.

I need to circle back to the user's specific query. I'll analyze their wording carefully, in case there are specific call sites they are hinting at or perhaps any prior art.

Finally, I'll dive into the `snd_card_do_free()` path and related functions. I'll search commit history, this time focusing on `snd_card_do_free`, `snd_card_free`, `release_completion`, and, of course, the `complete()` function itself within the `sound/core/init.c` file. This will provide some very concrete insights. A quick `git log` on that file would also be useful.



243/6 2026/08/13 19:15 tool git-log
0m Args:
map[PathPrefix:sound/core/init.c]

Results:
map[Output:b113a891252c ALSA: core: Fix unintuitive behavior of snd_power_ref_and_wait()
2fa8d8b6c18b ALSA: core: Use the new helper for the power refcount
e9c82f767f0f ALSA: core: Use flexible array for card private data
84446536f63d ALSA: control: Verify put() result when in debug mode
bf4afc53b77a Convert 'alloc_obj' family to use the new default GFP_KERNEL argument
69050f8d6d07 treewide: Replace kmalloc with kmalloc_obj for non-scalar types
bee60f019606 ALSA: core: Copy string more safely
d278a9de5e18 ALSA: core: add isascii() check to card ID generator
f428cc9eac6e ALSA: control: Rename ctl_files_rwlock to controls_rwlock
495000a38634 ALSA: core: Remove debugfs at disconnection
]

244/6 2026/08/13 19:15 llm codeexpert
0m Model:
gemini-3.6-flash

Tokens:
							input: 30351
							output: 23
							thoughts: 958
						

Thoughts:
**Analyzing Potential UAF in `snd_card_do_free`**

Okay, let's dive into `sound/core/init.c`, specifically around `snd_card_do_free`. I need to revisit `snd_card_do_free` and `snd_card_free` carefully. I see the code calls `complete(card->release_completion)`. Hold on. This `card->release_completion`... it's likely allocated on the stack within `snd_card_free()`, or a similar function, isn't it?

Right, `complete()` is called, and `card->release_completion` points to `released` on the stack. Now, when `wait_for_completion(&released)` completes and `snd_card_free()` returns, `snd_card_do_free()` resumes execution. And this is where things get tricky, because the code then reads `card->managed`, and `card` itself is heap-allocated if not managed. 

The immediate thought is: what if the calling function frees something else or returns? But then I realize: is `complete()` itself potentially subject to a use-after-free issue if the completion variable is on the stack?

Looking at the Linux kernel implementation, `complete()` does this:

```c
void complete(struct completion *x)
{
	unsigned long flags;

	spin_lock_irqsave(&x->wait.lock, flags);
	x->done++;
	swake_up_locked(&x->wait);
	spin_unlock_irqrestore(&x->wait.lock, flags);
}
```

Okay, the `spin_unlock_irqrestore(&x->wait.lock, flags)` call accesses `x->wait.lock` *after* the waiter is woken up. If the completion variable `x` is on thread A's stack, and thread A wakes up in `swake_up_locked`, thread A exits the function and destroys its stack frame. Then, thread B (calling `complete`) calls `spin_unlock_irqrestore` on thread A's destroyed stack frame! This could be a classic kernel UAF situation.

So, is `complete()` known to have a race with an on-stack `struct completion`? Yes! This is a well-known issue unless `complete_all()` or `complete()` is properly handled, or the completion is not on the stack, or synchronization is guaranteed. And hang on, `complete_all()` *also* accesses `x->wait.lock` after waking up! So, why is `complete()` on the stack potentially dangerous? Let's refresh our understanding of when to use `complete_all()` vs. `complete()` or `complete_and_exit()`.

Okay, time to search the LKML and kernel commit history. I'm going to look for any mentions of `complete` combined with "use-after-free" or specifically "completion" and "stack," or `complete_all`. Let's see what the kernel documentation and developers have to say about these scenarios.



245/6 2026/08/13 19:16 tool git-log
10m Error:
log-in to see details

Args:
map[CodeRegexp:complete\(.*release_completion]

Results:
map[Output:]

246/6 2026/08/13 19:26 llm codeexpert
0m Model:
gemini-3.6-flash

Tokens:
							input: 32031
							output: 25
							thoughts: 74
						

Thoughts:
Okay, here's my thought process on this task:

**Refining the Kernel Commit Message Search**

Right, so I need to hone in on some specific kernel commit messages. First, I need to limit the scope of the search using `PathPrefix` for the `git-log` command. That's a key first step to keep things manageable, no need to crawl the entire repository. My initial idea is to search for commits containing keywords like `complete`, `stack`, `completion`, or `UAF` within specific areas of the kernel – namely, the `sound/` directory or driver directories. Those would be good places to start looking for potential issues.

But, before I get carried away with that, I should streamline this a bit. I need to make sure I am efficiently conducting my search, and I should focus on the `sound/` directory directly. I should search `git-log` within `sound/` for commits that contain terms related to completion. This should give me a specific list of commits that are relevant to completion. That seems like a more targeted approach.



247/6 2026/08/13 19:26 tool git-log
0m Args:
map[MessageRegexps:[completion] PathPrefix:sound]

Results:
map[Output:2615f0fb90df ALSA: us144mkii: re-anchor capture URBs on resubmission
e0bffb63a2ed ASoC: cs35l56: Use complete_all() to signal init_completion
93c2a8ea2454 ASoC: cs35l56: Fix potential probe() deadlock
147996e7e7c9 ALSA: usx2y: us144mkii: fix work UAF on disconnect
5cff1529a2f9 ALSA: us144mkii: capture_urb_complete: redundant usb_anchor_urb corrupts anchor list on each resubmission
f199c8a8bdd5 ALSA: usb-audio: Kill MIDI 2.0 URBs before freeing endpoints
890b61d3a8c9 ASoC: cs35l56: Remove unnecessary conditionals waiting for enumeration
344a12ca7ba6 ASoC: cs35l56: Prevent double-free of debugfs
9fcaec81ac56 ASoC: renesas: rz-ssi: Use generic PCM dmaengine APIs
7e5d59f407bc ASoC: Intel: catpt: Complete coredump handling
]

248/6 2026/08/13 19:26 llm codeexpert
0m Model:
gemini-3.6-flash

Tokens:
							input: 32683
							output: 24
							thoughts: 286
						

Thoughts:
**My ALSA Completion Investigation**

Okay, let's refocus. I need to figure out how completions are being used within ALSA core or sound core. My initial thought is to hunt down all the places where the word "complete" is used, particularly focusing on variations like "completion," "wait_for_completion," and the associated macros. I'll start with a file-by-file search within `sound/core/` itself, looking for these keywords and related macros like `DECLARE_COMPLETION`, `init_completion`, and `reinit_completion`.

I recall that I had already done a simpler `grepper` for 'completion' previously within the `sound/core/` directory. That gave a few hits, namely: a comment in `sound/core/compress_offload.c` (that's not directly helpful), an `#include <linux/completion.h>` in `sound/core/init.c`, and a few lines in `sound/core/init.c` that use and manage the `card->release_completion` completion object including a `complete()`, `card->release_completion = &released;` and `wait_for_completion()` call. This looks promising.

Now, I need to take a step back and see the bigger picture. Are there *any* other instances of completions being used within this core audio framework? I need to exhaustively examine `sound/core/` and potentially all of `include/sound/` and its subdirectories to get a comprehensive view. So, I need to grep for "completion" (and its variations) across `sound/core/` and all its subdirectories to make sure I don't miss anything. Then, to make sure I'm not missing anything in the header files, I'll search for `completion` within `include/sound/` and its subdirectories. Let's see what that search turns up.



249/6 2026/08/13 19:26 tool grepper
0m Args:
map[Expression:completion PathPrefix:include/sound]

Results:
map[Output:include/sound/core.h=30=struct module;
include/sound/core.h:31:struct completion;
include/sound/core.h-32-
--
include/sound/core.h=101=struct snd_card {
--
include/sound/core.h-141-	int shutdown;			/* this card is going down */
include/sound/core.h:142:	struct completion *release_completion;
include/sound/core.h-143-	struct device *dev;		/* device assigned to this card */
--
include/sound/hda_register.h=78=enum { SDI0, SDI1, SDI2, SDI3, SDO0, SDO1, SDO2, SDO3 };
--
include/sound/hda_register.h-173-#define SD_INT_FIFO_ERR		0x08	/* FIFO error interrupt */
include/sound/hda_register.h:174:#define SD_INT_COMPLETE		0x04	/* completion interrupt */
include/sound/hda_register.h-175-#define SD_INT_MASK		(SD_INT_DESC_ERR|SD_INT_FIFO_ERR|\
--
include/sound/sdca_fdl.h-12-
include/sound/sdca_fdl.h:13:#include <linux/completion.h>
include/sound/sdca_fdl.h-14-#include <linux/workqueue.h>
--
include/sound/sdca_fdl.h=33=struct fdl_state {
include/sound/sdca_fdl.h:34:	struct completion begin;
include/sound/sdca_fdl.h:35:	struct completion done;
include/sound/sdca_fdl.h-36-	struct delayed_work timeout;
--
include/sound/soc-topology.h=108=struct snd_soc_tplg_ops {
--
include/sound/soc-topology.h-152-
include/sound/soc-topology.h:153:	/* completion - called at completion of firmware loading */
include/sound/soc-topology.h-154-	int (*complete)(struct snd_soc_component *comp);
]

250/6 2026/08/13 19:26 llm codeexpert
0m Model:
gemini-3.6-flash

Tokens:
							input: 33961
							output: 25
							thoughts: 107
						

Thoughts:
**ALSA Core: Completion Structure Usage**

Okay, so I'm digging into the ALSA core and trying to understand how resource management works. I was just examining `include/sound/core.h` and specifically the `snd_card` structure. Bingo! I found it! `struct completion *release_completion;` – that's the only instance of a `struct completion` pointer *anywhere* within `snd_card`, and within the whole of `include/sound/core.h`, I can see immediately. That seems… notable. Surely a single `completion` object in a core structure is worth deeper investigation.

But hold on, before I jump to any conclusions. Let's not be hasty; it could be used by another function. I need to make absolutely sure. Just to be thorough and to be certain that I'm not overlooking anything, I’m going to run a quick `grep` through *all* the header files in `include/sound/` for any mention of `complete` or `completion`. Just to be safe, I'll `grep` for `struct completion` explicitly. Gotta be sure I haven't missed anything, or, perhaps, that there are other uses in other header files.



251/6 2026/08/13 19:26 tool grepper
0m Args:
map[Expression:struct completion PathPrefix:include/sound]

Results:
map[Output:include/sound/core.h=30=struct module;
include/sound/core.h:31:struct completion;
include/sound/core.h-32-
--
include/sound/core.h=101=struct snd_card {
--
include/sound/core.h-141-	int shutdown;			/* this card is going down */
include/sound/core.h:142:	struct completion *release_completion;
include/sound/core.h-143-	struct device *dev;		/* device assigned to this card */
--
include/sound/sdca_fdl.h=33=struct fdl_state {
include/sound/sdca_fdl.h:34:	struct completion begin;
include/sound/sdca_fdl.h:35:	struct completion done;
include/sound/sdca_fdl.h-36-	struct delayed_work timeout;
]

252/6 2026/08/13 19:26 llm codeexpert
0m Model:
gemini-3.6-flash

Tokens:
							input: 34593
							output: 28
							thoughts: 64
						

Thoughts:
**Investigating Potential Asynchronous Completion Issues in ALSA Code**

Okay, hold on a second. Before we get too far down this debugging path, I need to take a more comprehensive look at how these completion functions are being used. Specifically, I'm thinking about those `complete()` and `complete_all()` calls in the ALSA codebase. Let's make sure there aren't other instances lurking in the `include/sound/` and `sound/core/` directories that we've missed. It's too easy to overlook these things, and that could be the smoking gun we're looking for. Time to run a quick `grep` for `complete(` and `complete_all(` across those directories. Gotta get the complete picture before we proceed with the analysis.



253/6 2026/08/13 19:26 tool grepper
0m Args:
map[Expression:complete(_all)?\( PathPrefix:include/sound]

Results:
map[Output:include/sound/soc-component.h=299=int snd_soc_component_update_bits_async(struct snd_soc_component *component,
--
include/sound/soc-component.h-301-					unsigned int val);
include/sound/soc-component.h:302:void snd_soc_component_async_complete(struct snd_soc_component *component);
include/sound/soc-component.h-303-int snd_soc_component_test_bits(struct snd_soc_component *component,
]

254/6 2026/08/13 19:26 llm codeexpert
0m Model:
gemini-3.6-flash

Tokens:
							input: 34990
							output: 28
							thoughts: 21
						

Thoughts:
Here's my take on those thoughts:

**Refining the Hunt for Completion Signals**

Okay, I need to revisit the `sound/core/` directory. I'm pretty sure I remember seeing `complete(` or `complete_all(` somewhere in there previously, but it's worth a second look. My memory is good, but a fresh scan is often a good idea when dealing with a complex codebase. Let's see if those function calls are present and, if so, exactly where they're being used in relation to the audio subsystem's completion signals. I need to nail down the exact call sites to ensure I understand how the completion mechanisms are being triggered and handled within the core audio framework. I want to build a rock-solid understanding of this specific area of the codebase.



255/6 2026/08/13 19:26 tool grepper
0m Args:
map[Expression:complete(_all)?\( PathPrefix:sound/core]

Results:
map[Output:sound/core/init.c=585=static int snd_card_do_free(struct snd_card *card)
--
sound/core/init.c-602-	if (card->release_completion)
sound/core/init.c:603:		complete(card->release_completion);
sound/core/init.c-604-	if (!card->managed)
--
sound/core/pcm_dmaengine.c=134=EXPORT_SYMBOL_GPL(snd_dmaengine_pcm_set_config_from_dai_data);
sound/core/pcm_dmaengine.c-135-
sound/core/pcm_dmaengine.c:136:static void dmaengine_pcm_dma_complete(void *arg)
sound/core/pcm_dmaengine.c-137-{
--
sound/core/pcm_native.c=2570=static int snd_pcm_hw_constraints_init(struct snd_pcm_substream *substream)
--
sound/core/pcm_native.c-2693-
sound/core/pcm_native.c:2694:static int snd_pcm_hw_constraints_complete(struct snd_pcm_substream *substream)
sound/core/pcm_native.c-2695-{
--
sound/core/pcm_native.c=2806=int snd_pcm_open_substream(struct snd_pcm *pcm, int stream,
--
sound/core/pcm_native.c-2832-
sound/core/pcm_native.c:2833:	err = snd_pcm_hw_constraints_complete(substream);
sound/core/pcm_native.c-2834-	if (err < 0) {
]

256/6 2026/08/13 19:26 llm codeexpert
0m Model:
gemini-3.6-flash

Tokens:
							input: 35652
							output: 24
							thoughts: 1543
						

Thoughts:
**Analyzing Potential Use-After-Free in ALSA Core's `complete()` Calls**

Okay, let's dissect this. My focus is on potential use-after-free vulnerabilities related to `complete()` within the ALSA core. I've zeroed in on the `sound/core/` and `include/sound/` directories as my primary area of concern.

Initially, I identified that `sound/core/init.c` contains the lone call to `complete()` in the ALSA core, specifically within `snd_card_do_free()`. The code here calls `complete(card->release_completion)` *after* `snd_card_free()` calls `wait_for_completion(&released)`.

My concern is whether the completion structure (`released` in this case) is on the stack in `snd_card_free()` and is deallocated when `snd_card_free()` returns. If so, there's a potential UAF since `snd_card_do_free()` might be accessing the stack after the frame has been freed in `complete()`, and, later, when it accesses `card->managed`.

The question explicitly asks about *other* instances of this. That implies a known problem, and I need to find other similar situations within the ALSA core. I've re-examined the prompt to make sure.

My next step was a methodical search. First, I made sure I was only searching within "ALSA core," which I interpret as `sound/core/` and its subdirectories, and include files in `include/sound/`.

I've already searched `sound/core/` and it's subdirectories for `complete`, `complete_all`, `wait_for_completion`, and other completion related functions. I know that `sound/core/init.c` is the only instance of a `complete()` *call*, although there are functions named similarly.

So I expanded my search, looking at the header files within `include/sound/` to see if there are other completion structures. I found a couple of these, like in `include/sound/sdca_fdl.h` and `include/sound/soc-topology.h`, but those are not in the core itself.

Therefore, after a thorough examination, I can confidently say that *within* ALSA core itself (specifically the files under `sound/core/` and relevant header files), `sound/core/init.c` and specifically the `complete(card->release_completion)` call is the only place where a UAF could occur related to completion calls.



257/6 2026/08/13 19:26 tool grepper
0m Args:
map[Expression:completion PathPrefix:include/sound]

Results:
map[Output:include/sound/core.h=30=struct module;
include/sound/core.h:31:struct completion;
include/sound/core.h-32-
--
include/sound/core.h=101=struct snd_card {
--
include/sound/core.h-141-	int shutdown;			/* this card is going down */
include/sound/core.h:142:	struct completion *release_completion;
include/sound/core.h-143-	struct device *dev;		/* device assigned to this card */
--
include/sound/hda_register.h=78=enum { SDI0, SDI1, SDI2, SDI3, SDO0, SDO1, SDO2, SDO3 };
--
include/sound/hda_register.h-173-#define SD_INT_FIFO_ERR		0x08	/* FIFO error interrupt */
include/sound/hda_register.h:174:#define SD_INT_COMPLETE		0x04	/* completion interrupt */
include/sound/hda_register.h-175-#define SD_INT_MASK		(SD_INT_DESC_ERR|SD_INT_FIFO_ERR|\
--
include/sound/sdca_fdl.h-12-
include/sound/sdca_fdl.h:13:#include <linux/completion.h>
include/sound/sdca_fdl.h-14-#include <linux/workqueue.h>
--
include/sound/sdca_fdl.h=33=struct fdl_state {
include/sound/sdca_fdl.h:34:	struct completion begin;
include/sound/sdca_fdl.h:35:	struct completion done;
include/sound/sdca_fdl.h-36-	struct delayed_work timeout;
--
include/sound/soc-topology.h=108=struct snd_soc_tplg_ops {
--
include/sound/soc-topology.h-152-
include/sound/soc-topology.h:153:	/* completion - called at completion of firmware loading */
include/sound/soc-topology.h-154-	int (*complete)(struct snd_soc_component *comp);
]

258/6 2026/08/13 19:26 llm codeexpert
0m Model:
gemini-3.6-flash

Tokens:
							input: 38332
							output: 26
							thoughts: 86
						

Thoughts:
Here's my thought process, as an expert in this domain:

**Investigating Completion Mechanisms in `sound/core/`**

Okay, so I need to understand how completion mechanisms are handled within the `sound/core/` subsystem. My immediate goal is to see if any standard macro definitions or perhaps alternative naming conventions for completion-related functionality are being utilized. I'll need to confirm that these are implemented with care, as they can sometimes lead to deadlock.

First, I'll start by systematically searching within the `sound/core/` directory itself. I'll specifically look for the key functions and macros that are characteristic of completion operations. That means I'm going to look for implementations of `complete_all`, `complete`, `init_completion`, `reinit_completion`, `DECLARE_COMPLETION`, and `wait_for_completion`. These are the core building blocks for completion.

After that, to be thorough, I'll broaden my search within `sound/core/` and use `grep` to look for instances of `COMPLETION`. This could uncover any subtle usage of related concepts that might not be immediately obvious. This should give me a pretty comprehensive view of how completions are implemented and potentially used in this part of the sound driver code.



259/6 2026/08/13 19:26 tool grepper
0m Args:
map[Expression:COMPLETION PathPrefix:sound/core]

Results:
map[Output:sound/core/init.c=644=void snd_card_free(struct snd_card *card)
sound/core/init.c-645-{
sound/core/init.c:646:	DECLARE_COMPLETION_ONSTACK(released);
sound/core/init.c-647-
]

260/6 2026/08/13 19:26 llm codeexpert
0m Model:
gemini-3.6-flash

Tokens:
							input: 38802
							output: 29
							thoughts: 154
						

Thoughts:
**Sound Core Completion Analysis**

Okay, here's what I'm seeing in `sound/core/`. It looks like `DECLARE_COMPLETION_ONSTACK(released)` is the *only* `completion` declared directly within `sound/core/init.c`. That's unusual, and it makes me wonder what the control flow is here. Let's dig in a bit further.

I already confirmed that there's a `wait_for_completion` call, specifically `wait_for_completion(&released)` within `snd_card_free()` in the same file. I want to be thorough though. I need to make sure I haven't missed something subtle.

Now I'll broaden my search. I'm going to quickly check for any other `wait_for_completion*` calls anywhere else in the `sound/core/` directory. I'm focusing on `wait_for_completion_timeout`, `wait_for_completion_interruptible`, `wait_for_completion_killable`, and `wait_for_completion_interruptible_timeout` to rule out any other uses of completion.



261/6 2026/08/13 19:26 tool grepper
0m Error:
log-in to see details

Args:
map[Expression:wait_for_completion_ PathPrefix:sound/core]

Results:
map[Output:]

262/6 2026/08/13 19:26 llm codeexpert
0m Model:
gemini-3.6-flash

Tokens:
							input: 39242
							output: 43
							thoughts: 1947
						

Thoughts:
**Analysis of Potential Use-After-Free in ALSA Core**

Okay, so I've been digging into this potential use-after-free vulnerability, specifically linked to the `complete()` function within the ALSA sound system. My initial search for `wait_for_completion_` within the `sound/core/` directory came up empty.  That immediately led me to broaden the search to encompass the entire `sound/` directory, considering potential issues in driver-specific areas like `sound/hda/`, `sound/pci/`, etc., and looking at `complete()` and `complete_all()` usage.

I started by doing a global `grep` for `complete(` or `complete_all(` across the entire `sound/` tree. That gave me a few hits, including examples from `sound/aoa/`, `sound/core/`, `sound/firewire/`, `sound/hda/`, and `sound/soc/` directories. Notably, I found that `sound/core/init.c` contains `complete(card->release_completion)`.

I then re-examined the code in `sound/core/init.c`, specifically `snd_card_do_free()`, which is where that `complete()` call resides.  I traced what's happening and it's clear the root cause is: `card->release_completion` points to `released` which is declared on the stack within `snd_card_free()`.  `snd_card_free` uses `wait_for_completion(&released)`, and then within `snd_card_do_free()`, we have `complete(card->release_completion)`.  This is a textbook case of a use-after-free. The `complete()` call wakes up the waiting `snd_card_free()` function, which *immediately* returns, deallocating its stack frame (including the `released` completion object). The `complete()` function itself continues to run, and the subsequent call to `spin_unlock_irqrestore()` in `complete()` operates on the *deallocated* stack memory.  Further downstream, `kfree(card)` happens. This is the exact mechanism being flagged as problematic.

So the core problem:
1. `complete()` wakes up `snd_card_free()`
2. `snd_card_free()` immediately returns, freeing the stack.
3. `complete()` continues execution on stack memory.

Given this, I want to zero in on ALSA core (`sound/core/`) because the question explicitly asks if there's *another* place in ALSA core with this issue.  Since the only instance of `complete()` I found in `sound/core/` is in `snd_card_do_free()`, I'm confident there are **no other instances** of `complete()` being called in ALSA core. Thus, there should be no other similar use-after-free issues in the ALSA core because there are *no other calls* to `complete()` in this specific context.

Just to be absolutely sure, I've checked if there are other synchronization mechanisms used in ALSA core, checking for `wake_up`, `wait_event`, and similar functions in `sound/core/` to rule out anything that could be confused with `complete()`, but I don't see anything. Thus, the answer to the user's question, "Is there any other place in ALSA core where a similar use-after-free might happen after calling `complete`?" is unequivocally **no**.



263/6 2026/08/13 19:26 tool grepper
0m Args:
map[Expression:DECLARE_WAIT_QUEUE|init_waitqueue_head|wait_event|wake_up PathPrefix:sound/core]

Results:
map[Output:sound/core/compress_offload.c=75=static int snd_compr_open(struct inode *inode, struct file *f)
--
sound/core/compress_offload.c-128-	runtime->state = SNDRV_PCM_STATE_OPEN;
sound/core/compress_offload.c:129:	init_waitqueue_head(&runtime->sleep);
sound/core/compress_offload.c-130-#if IS_ENABLED(CONFIG_SND_COMPRESS_ACCEL)
--
sound/core/compress_offload.c=872=static void error_delayed_work(struct work_struct *work)
--
sound/core/compress_offload.c-880-	stream->ops->trigger(stream, SNDRV_PCM_TRIGGER_STOP);
sound/core/compress_offload.c:881:	wake_up(&stream->runtime->sleep);
sound/core/compress_offload.c-882-}
--
sound/core/compress_offload.c=911=static int snd_compress_wait_for_drain(struct snd_compr_stream *stream)
--
sound/core/compress_offload.c-931-
sound/core/compress_offload.c:932:	ret = wait_event_interruptible(stream->runtime->sleep,
sound/core/compress_offload.c-933-			(stream->runtime->state != SNDRV_PCM_STATE_DRAINING));
--
sound/core/compress_offload.c-939-
sound/core/compress_offload.c:940:	wake_up(&stream->runtime->sleep);
sound/core/compress_offload.c-941-	mutex_lock(&stream->device->lock);
--
sound/core/compress_offload.c=946=static int snd_compr_drain(struct snd_compr_stream *stream)
--
sound/core/compress_offload.c-964-		pr_debug("SND_COMPR_TRIGGER_DRAIN failed %d\n", retval);
sound/core/compress_offload.c:965:		wake_up(&stream->runtime->sleep);
sound/core/compress_offload.c-966-		return retval;
--
sound/core/compress_offload.c=998=static int snd_compr_partial_drain(struct snd_compr_stream *stream)
--
sound/core/compress_offload.c-1025-		pr_debug("Partial drain returned failure\n");
sound/core/compress_offload.c:1026:		wake_up(&stream->runtime->sleep);
sound/core/compress_offload.c-1027-		return retval;
--
sound/core/compress_offload.c=1295=void snd_compr_task_finished(struct snd_compr_stream *stream,
--
sound/core/compress_offload.c-1301-	task->state = SND_COMPRESS_TASK_STATE_FINISHED;
sound/core/compress_offload.c:1302:	wake_up(&stream->runtime->sleep);
sound/core/compress_offload.c-1303-}
--
sound/core/control.c=52=static int snd_ctl_open(struct inode *inode, struct file *file)
--
sound/core/control.c-81-	INIT_LIST_HEAD(&ctl->events);
sound/core/control.c:82:	init_waitqueue_head(&ctl->change_sleep);
sound/core/control.c-83-	spin_lock_init(&ctl->read_lock);
--
sound/core/control.c=156=void snd_ctl_notify(struct snd_card *card, unsigned int mask,
--
sound/core/control.c-189-_found:
sound/core/control.c:190:			wake_up(&ctl->change_sleep);
sound/core/control.c-191-		}
--
sound/core/control.c=2383=static int snd_ctl_dev_disconnect(struct snd_device *device)
--
sound/core/control.c-2389-		list_for_each_entry(ctl, &card->ctl_files, list) {
sound/core/control.c:2390:			wake_up(&ctl->change_sleep);
sound/core/control.c-2391-			snd_kill_fasync(ctl->fasync, SIGIO, POLL_ERR);
--
sound/core/hwdep.c=146=static int snd_hwdep_release(struct inode *inode, struct file * file)
--
sound/core/hwdep.c-157-	}
sound/core/hwdep.c:158:	wake_up(&hw->open_wait);
sound/core/hwdep.c-159-
--
sound/core/hwdep.c=363=int snd_hwdep_new(struct snd_card *card, char *id, int device,
--
sound/core/hwdep.c-381-
sound/core/hwdep.c:382:	init_waitqueue_head(&hwdep->open_wait);
sound/core/hwdep.c-383-	mutex_init(&hwdep->open_mutex);
--
sound/core/hwdep.c=456=static int snd_hwdep_dev_disconnect(struct snd_device *device)
--
sound/core/hwdep.c-465-	guard(mutex)(&hwdep->open_mutex);
sound/core/hwdep.c:466:	wake_up(&hwdep->open_wait);
sound/core/hwdep.c-467-#ifdef CONFIG_SND_OSSEMUL
--
sound/core/init.c=277=static int snd_card_init(struct snd_card *card, struct device *parent,
--
sound/core/init.c-329-#ifdef CONFIG_PM
sound/core/init.c:330:	init_waitqueue_head(&card->power_sleep);
sound/core/init.c-331-	snd_refcount_init(&card->power_ref);
sound/core/init.c-332-#endif
sound/core/init.c:333:	init_waitqueue_head(&card->remove_sleep);
sound/core/init.c-334-	card->sync_irq = -1;
--
sound/core/init.c=496=void snd_card_disconnect(struct snd_card *card)
--
sound/core/init.c-526-	 */
sound/core/init.c:527:	wake_up_all(&card->power_sleep);
sound/core/init.c-528-#endif
--
sound/core/init.c=574=void snd_card_disconnect_sync(struct snd_card *card)
--
sound/core/init.c-578-	guard(spinlock_irq)(&card->files_lock);
sound/core/init.c:579:	wait_event_lock_irq(card->remove_sleep,
sound/core/init.c-580-			    list_empty(&card->files_list),
--
sound/core/init.c=1101=int snd_card_file_remove(struct snd_card *card, struct file *file)
--
sound/core/init.c-1117-		if (list_empty(&card->files_list))
sound/core/init.c:1118:			wake_up_all(&card->remove_sleep);
sound/core/init.c-1119-	}
--
sound/core/init.c=1146=int snd_power_ref_and_wait(struct snd_card *card)
--
sound/core/init.c-1150-		return 0;
sound/core/init.c:1151:	wait_event_cmd(card->power_sleep,
sound/core/init.c-1152-		       card->shutdown ||
--
sound/core/misc.c=182=void snd_refcount_init(struct snd_refcount *ref)
--
sound/core/misc.c-184-	atomic_set(&ref->count, 0);
sound/core/misc.c:185:	init_waitqueue_head(&ref->waiter);
sound/core/misc.c-186-}
--
sound/core/misc.c=189=void snd_refcount_put(struct snd_refcount *ref)
--
sound/core/misc.c-191-	if (atomic_dec_and_test(&ref->count))
sound/core/misc.c:192:		wake_up(&ref->waiter);
sound/core/misc.c-193-}
--
sound/core/misc.c=196=void snd_refcount_sync(struct snd_refcount *ref)
sound/core/misc.c-197-{
sound/core/misc.c:198:	wait_event(ref->waiter, !atomic_read(&ref->count));
sound/core/misc.c-199-}
--
sound/core/oss/pcm_oss.c=2576=static int snd_pcm_oss_release(struct inode *inode, struct file *file)
--
sound/core/oss/pcm_oss.c-2593-	mutex_unlock(&pcm->open_mutex);
sound/core/oss/pcm_oss.c:2594:	wake_up(&pcm->open_wait);
sound/core/oss/pcm_oss.c-2595-	module_put(pcm->card->module);
--
sound/core/pcm.c=697=static int _snd_pcm_new(struct snd_card *card, const char *id, int device,
--
sound/core/pcm.c-722-	mutex_init(&pcm->open_mutex);
sound/core/pcm.c:723:	init_waitqueue_head(&pcm->open_wait);
sound/core/pcm.c-724-	INIT_LIST_HEAD(&pcm->list);
--
sound/core/pcm.c=875=int snd_pcm_attach_substream(struct snd_pcm *pcm, int stream,
--
sound/core/pcm.c-959-
sound/core/pcm.c:960:	init_waitqueue_head(&runtime->sleep);
sound/core/pcm.c:961:	init_waitqueue_head(&runtime->tsleep);
sound/core/pcm.c-962-
--
sound/core/pcm.c=1087=static int snd_pcm_dev_disconnect(struct snd_device *device)
--
sound/core/pcm.c-1094-	guard(mutex)(&pcm->open_mutex);
sound/core/pcm.c:1095:	wake_up(&pcm->open_wait);
sound/core/pcm.c-1096-	list_del_init(&pcm->list);
--
sound/core/pcm.c-1105-					    SNDRV_PCM_STATE_DISCONNECTED);
sound/core/pcm.c:1106:			wake_up(&substream->runtime->sleep);
sound/core/pcm.c:1107:			wake_up(&substream->runtime->tsleep);
sound/core/pcm.c-1108-		}
--
sound/core/pcm_lib.c=209=int snd_pcm_update_state(struct snd_pcm_substream *substream,
--
sound/core/pcm_lib.c-229-		if (avail >= runtime->twake)
sound/core/pcm_lib.c:230:			wake_up(&runtime->tsleep);
sound/core/pcm_lib.c-231-	} else if (avail >= runtime->control->avail_min)
sound/core/pcm_lib.c:232:		wake_up(&runtime->sleep);
sound/core/pcm_lib.c-233-	return 0;
--
sound/core/pcm_native.c=1568=static void snd_pcm_post_stop(struct snd_pcm_substream *substream,
--
sound/core/pcm_native.c-1576-	}
sound/core/pcm_native.c:1577:	wake_up(&runtime->sleep);
sound/core/pcm_native.c:1578:	wake_up(&runtime->tsleep);
sound/core/pcm_native.c-1579-}
--
sound/core/pcm_native.c=1681=static void snd_pcm_post_pause(struct snd_pcm_substream *substream,
--
sound/core/pcm_native.c-1688-		snd_pcm_timer_notify(substream, SNDRV_TIMER_EVENT_MPAUSE);
sound/core/pcm_native.c:1689:		wake_up(&runtime->sleep);
sound/core/pcm_native.c:1690:		wake_up(&runtime->tsleep);
sound/core/pcm_native.c-1691-	} else {
--
sound/core/pcm_native.c=1753=static void snd_pcm_post_suspend(struct snd_pcm_substream *substream,
--
sound/core/pcm_native.c-1761-	snd_pcm_timer_notify(substream, SNDRV_TIMER_EVENT_MSUSPEND);
sound/core/pcm_native.c:1762:	wake_up(&runtime->sleep);
sound/core/pcm_native.c:1763:	wake_up(&runtime->tsleep);
sound/core/pcm_native.c-1764-}
--
sound/core/pcm_native.c=2368=static int snd_pcm_unlink(struct snd_pcm_substream *substream)
--
sound/core/pcm_native.c-2386-	snd_pcm_group_for_each_entry(s, substream)
sound/core/pcm_native.c:2387:		wake_up(&s->runtime->sleep);
sound/core/pcm_native.c-2388-
--
sound/core/pcm_native.c=2965=static int snd_pcm_release(struct inode *inode, struct file *file)
--
sound/core/pcm_native.c-2983-	}
sound/core/pcm_native.c:2984:	wake_up(&pcm->open_wait);
sound/core/pcm_native.c-2985-	module_put(pcm->card->module);
--
sound/core/rawmidi.c=158=static int snd_rawmidi_runtime_create(struct snd_rawmidi_substream *substream)
--
sound/core/rawmidi.c-165-	runtime->substream = substream;
sound/core/rawmidi.c:166:	init_waitqueue_head(&runtime->sleep);
sound/core/rawmidi.c-167-	INIT_WORK(&runtime->event_work, snd_rawmidi_input_event_work);
--
sound/core/rawmidi.c=249=int snd_rawmidi_drain_output(struct snd_rawmidi_substream *substream)
--
sound/core/rawmidi.c-262-
sound/core/rawmidi.c:263:	timeout = wait_event_interruptible_timeout(runtime->sleep,
sound/core/rawmidi.c-264-				(runtime->avail >= runtime->buffer_size),
--
sound/core/rawmidi.c=569=static void rawmidi_release_priv(struct snd_rawmidi_file *rfile)
--
sound/core/rawmidi.c-583-	rfile->rmidi = NULL;
sound/core/rawmidi.c:584:	wake_up(&rmidi->open_wait);
sound/core/rawmidi.c-585-}
--
sound/core/rawmidi.c=1143=int snd_rawmidi_receive(struct snd_rawmidi_substream *substream,
--
sound/core/rawmidi.c-1210-		else if (__snd_rawmidi_ready(runtime))
sound/core/rawmidi.c:1211:			wake_up(&runtime->sleep);
sound/core/rawmidi.c-1212-	}
--
sound/core/rawmidi.c=1430=static int __snd_rawmidi_transmit_ack(struct snd_rawmidi_substream *substream,
--
sound/core/rawmidi.c-1447-		if (runtime->drain || __snd_rawmidi_ready(runtime))
sound/core/rawmidi.c:1448:			wake_up(&runtime->sleep);
sound/core/rawmidi.c-1449-	}
--
sound/core/rawmidi.c=1821=int snd_rawmidi_init(struct snd_rawmidi *rmidi,
--
sound/core/rawmidi.c-1835-	mutex_init(&rmidi->open_mutex);
sound/core/rawmidi.c:1836:	init_waitqueue_head(&rmidi->open_wait);
sound/core/rawmidi.c-1837-	INIT_LIST_HEAD(&rmidi->streams[SNDRV_RAWMIDI_STREAM_INPUT].substreams);
--
sound/core/rawmidi.c=2050=static int snd_rawmidi_dev_disconnect(struct snd_device *device)
--
sound/core/rawmidi.c-2056-	guard(mutex)(&rmidi->open_mutex);
sound/core/rawmidi.c:2057:	wake_up(&rmidi->open_wait);
sound/core/rawmidi.c-2058-	list_del_init(&rmidi->list);
--
sound/core/rawmidi.c-2063-			if (s->runtime)
sound/core/rawmidi.c:2064:				wake_up(&s->runtime->sleep);
sound/core/rawmidi.c-2065-		}
--
sound/core/seq/oss/seq_oss_readq.c=33=snd_seq_oss_readq_new(struct seq_oss_devinfo *dp, int maxlen)
--
sound/core/seq/oss/seq_oss_readq.c-43-	q->head = q->tail = 0;
sound/core/seq/oss/seq_oss_readq.c:44:	init_waitqueue_head(&q->midi_sleep);
sound/core/seq/oss/seq_oss_readq.c-45-	spin_lock_init(&q->lock);
--
sound/core/seq/oss/seq_oss_readq.c=65=snd_seq_oss_readq_clear(struct seq_oss_readq *q)
--
sound/core/seq/oss/seq_oss_readq.c-76-	/* if someone sleeping, wake'em up */
sound/core/seq/oss/seq_oss_readq.c:77:	wake_up(&q->midi_sleep);
sound/core/seq/oss/seq_oss_readq.c-78-}
--
sound/core/seq/oss/seq_oss_readq.c=154=snd_seq_oss_readq_put_event(struct seq_oss_readq *q, union evrec *ev)
--
sound/core/seq/oss/seq_oss_readq.c-160-		if (!rc)
sound/core/seq/oss/seq_oss_readq.c:161:			wake_up(&q->midi_sleep);
sound/core/seq/oss/seq_oss_readq.c-162-	}
--
sound/core/seq/oss/seq_oss_readq.c=185=snd_seq_oss_readq_wait(struct seq_oss_readq *q)
sound/core/seq/oss/seq_oss_readq.c-186-{
sound/core/seq/oss/seq_oss_readq.c:187:	wait_event_interruptible_timeout(q->midi_sleep,
sound/core/seq/oss/seq_oss_readq.c-188-					 (q->qlen > 0 || q->head == q->tail),
--
sound/core/seq/oss/seq_oss_readq.c=220=snd_seq_oss_readq_put_timestamp(struct seq_oss_readq *q, unsigned long curt, int seq_mode)
--
sound/core/seq/oss/seq_oss_readq.c-244-	if (queued)
sound/core/seq/oss/seq_oss_readq.c:245:		wake_up(&q->midi_sleep);
sound/core/seq/oss/seq_oss_readq.c-246-
--
sound/core/seq/oss/seq_oss_writeq.c=25=snd_seq_oss_writeq_new(struct seq_oss_devinfo *dp, int maxlen)
--
sound/core/seq/oss/seq_oss_writeq.c-37-	q->sync_time = 0;
sound/core/seq/oss/seq_oss_writeq.c:38:	init_waitqueue_head(&q->sync_sleep);
sound/core/seq/oss/seq_oss_writeq.c-39-
--
sound/core/seq/oss/seq_oss_writeq.c=83=snd_seq_oss_writeq_sync(struct seq_oss_writeq *q)
--
sound/core/seq/oss/seq_oss_writeq.c-109-
sound/core/seq/oss/seq_oss_writeq.c:110:	wait_event_interruptible_timeout(q->sync_sleep, ! q->sync_event_put, HZ);
sound/core/seq/oss/seq_oss_writeq.c-111-	if (signal_pending(current))
--
sound/core/seq/oss/seq_oss_writeq.c=123=snd_seq_oss_writeq_wakeup(struct seq_oss_writeq *q, abstime_t time)
--
sound/core/seq/oss/seq_oss_writeq.c-127-	q->sync_event_put = 0;
sound/core/seq/oss/seq_oss_writeq.c:128:	wake_up(&q->sync_sleep);
sound/core/seq/oss/seq_oss_writeq.c-129-}
--
sound/core/seq/seq_fifo.c=18=struct snd_seq_fifo *snd_seq_fifo_new(int poolsize)
--
sound/core/seq/seq_fifo.c-38-	snd_use_lock_init(&f->use_lock);
sound/core/seq/seq_fifo.c:39:	init_waitqueue_head(&f->input_sleep);
sound/core/seq/seq_fifo.c-40-	atomic_set(&f->overflow, 0);
--
sound/core/seq/seq_fifo.c=49=void snd_seq_fifo_delete(struct snd_seq_fifo **fifo)
--
sound/core/seq/seq_fifo.c-66-	if (waitqueue_active(&f->input_sleep))
sound/core/seq/seq_fifo.c:67:		wake_up(&f->input_sleep);
sound/core/seq/seq_fifo.c-68-
--
sound/core/seq/seq_fifo.c=100=int snd_seq_fifo_event_in(struct snd_seq_fifo *f,
--
sound/core/seq/seq_fifo.c-143-	if (waitqueue_active(&f->input_sleep))
sound/core/seq/seq_fifo.c:144:		wake_up(&f->input_sleep);
sound/core/seq/seq_fifo.c-145-
--
sound/core/seq/seq_memory.c=233=void snd_seq_cell_free(struct snd_seq_event_cell * cell)
--
sound/core/seq/seq_memory.c-258-		if (snd_seq_output_ok(pool))
sound/core/seq/seq_memory.c:259:			wake_up(&pool->output_sleep);
sound/core/seq/seq_memory.c-260-	}
--
sound/core/seq/seq_memory.c=482=int snd_seq_pool_done(struct snd_seq_pool *pool)
--
sound/core/seq/seq_memory.c-490-	if (waitqueue_active(&pool->output_sleep))
sound/core/seq/seq_memory.c:491:		wake_up(&pool->output_sleep);
sound/core/seq/seq_memory.c-492-
--
sound/core/seq/seq_memory.c=514=struct snd_seq_pool *snd_seq_pool_new(int poolsize)
--
sound/core/seq/seq_memory.c-527-	pool->closing = 0;
sound/core/seq/seq_memory.c:528:	init_waitqueue_head(&pool->output_sleep);
sound/core/seq/seq_memory.c-529-	
--
sound/core/timer.c=1386=static void snd_timer_user_interrupt(struct snd_timer_instance *timeri,
--
sound/core/timer.c-1413-	snd_kill_fasync(tu->fasync, SIGIO, POLL_IN);
sound/core/timer.c:1414:	wake_up(&tu->qchange_sleep);
sound/core/timer.c-1415-}
--
sound/core/timer.c=1429=static void snd_timer_user_ccallback(struct snd_timer_instance *timeri,
--
sound/core/timer.c-1449-	snd_kill_fasync(tu->fasync, SIGIO, POLL_IN);
sound/core/timer.c:1450:	wake_up(&tu->qchange_sleep);
sound/core/timer.c-1451-}
--
sound/core/timer.c=1453=static void snd_timer_user_disconnect(struct snd_timer_instance *timeri)
--
sound/core/timer.c-1457-	tu->disconnected = true;
sound/core/timer.c:1458:	wake_up(&tu->qchange_sleep);
sound/core/timer.c-1459-}
--
sound/core/timer.c=1461=static void snd_timer_user_tinterrupt(struct snd_timer_instance *timeri,
--
sound/core/timer.c-1516-	snd_kill_fasync(tu->fasync, SIGIO, POLL_IN);
sound/core/timer.c:1517:	wake_up(&tu->qchange_sleep);
sound/core/timer.c-1518-}
--
sound/core/timer.c=1546=static int snd_timer_user_open(struct inode *inode, struct file *file)
--
sound/core/timer.c-1558-	spin_lock_init(&tu->qlock);
sound/core/timer.c:1559:	init_waitqueue_head(&tu->qchange_sleep);
sound/core/timer.c-1560-	mutex_init(&tu->ioctl_lock);
--
sound/core/ump.c=154=int snd_ump_endpoint_new(struct snd_card *card, char *id, int device,
--
sound/core/ump.c-173-	mutex_init(&ump->open_mutex);
sound/core/ump.c:174:	init_waitqueue_head(&ump->stream_wait);
sound/core/ump.c-175-#if IS_ENABLED(CONFIG_SND_UMP_LEGACY_RAWMIDI)
--
sound/core/ump.c=630=static int ump_req_msg(struct snd_ump_endpoint *ump, u32 req1, u32 req2,
--
sound/core/ump.c-643-				 (unsigned char *)&buf, 16);
sound/core/ump.c:644:	wait_event_timeout(ump->stream_wait, ump->stream_finished,
sound/core/ump.c-645-			   msecs_to_jiffies(500));
--
sound/core/ump.c=1010=static void ump_handle_stream_msg(struct snd_ump_endpoint *ump,
--
sound/core/ump.c-1058-		WRITE_ONCE(ump->stream_finished, 1);
sound/core/ump.c:1059:		wake_up(&ump->stream_wait);
sound/core/ump.c-1060-	}
]

264/6 2026/08/13 19:26 llm codeexpert
0m Model:
gemini-3.6-flash

Tokens:
							input: 49317
							output: 180
							thoughts: 693
						

Thoughts:
**My Analysis of `complete()` Calls in ALSA Core**

Okay, let's break this down systematically. The question is whether there are any other instances in the ALSA core where a use-after-free vulnerability could arise after a `complete()` call. First things first: let's define our scope. We're concerned with the ALSA *core* (`sound/core/` and its headers in `include/sound/`). So, I began by a thorough search within this area for calls to `complete()` and `complete_all()`.

The result? Absolutely nothing beyond a single instance! The only call to `complete()` I found is located within `sound/core/init.c`, specifically in the function `snd_card_do_free()`. Here, `complete(card->release_completion)` is used. No other `complete()` or `complete_all()` calls exist within the ALSA core.

But we can't be complacent. I need to be absolutely certain. So, I expanded my search to include all instances of `struct completion` itself within the ALSA core. I grepped for both `COMPLETION` and `completion` within `sound/core/` and the included headers, and there's nothing outside the `card->release_completion` in `sound/core/init.c`. That's declared using `DECLARE_COMPLETION_ONSTACK(released)` inside the `snd_card_free()` function.

Of course, the broader ALSA framework has other subsystems like those found in `sound/hda/`, `sound/soc/`, `sound/usb/`, and so on. These drivers can use completions, but they are driver-specific code and *not* part of the ALSA core. We are not interested in them.

So, to summarize, and for absolute clarity, my investigation encompassed the following:
1.  Complete search of `complete()` and `complete_all()` within `sound/core/` and `include/sound/`.
2.  The only `complete()` call identified is within `snd_card_do_free()` to signal `snd_card_free()`.
3.  No other occurrences of `complete()` or `complete_all()` exist in the ALSA core.
4.  The `card->release_completion` is the *only* `struct completion` field within the core ALSA structures.

Given this rigorous investigation, my conclusion is that **no**, there are no other locations within the ALSA core where a similar use-after-free scenario could occur after a `complete()` call, because it's only called in one place: `snd_card_do_free()` in `sound/core/init.c`. I am now ready to provide my answer. Let's call the `set-results` tool now.



265/6 2026/08/13 19:27 tool set-results
0m Args:
map[Answer:No. There is no other place in ALSA core (`sound/core/`) where a similar use-after-free might happen after calling `complete()`.

In ALSA core, `complete()` is called in **only one place**:
- `sound/core/init.c` in `snd_card_do_free()`:
  ```c
  if (card->release_completion)
          complete(card->release_completion);
  ```

Furthermore, `card->release_completion` (used by `snd_card_free()`) is the only `struct completion` instance present in ALSA core structures (`include/sound/core.h`). There are no other calls to `complete()` or `complete_all()` anywhere else in ALSA core.]

Results:
map[Answer:No. There is no other place in ALSA core (`sound/core/`) where a similar use-after-free might happen after calling `complete()`.

In ALSA core, `complete()` is called in **only one place**:
- `sound/core/init.c` in `snd_card_do_free()`:
  ```c
  if (card->release_completion)
          complete(card->release_completion);
  ```

Furthermore, `card->release_completion` (used by `snd_card_free()`) is the only `struct completion` instance present in ALSA core structures (`include/sound/core.h`). There are no other calls to `complete()` or `complete_all()` anywhere else in ALSA core.]

266/4 2026/08/13 19:27 llm patch-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 63394
							output: 981
							thoughts: 12
						

Thoughts:
Okay, I'm ready to craft this response. I understand the task and I'm prepared to deliver a succinct and accurate summary. Let's get started.

**Ready to Finalize the Response**



267/3 2026/08/13 19:27 action test-patch
27m Results:
map[PatchDiff:diff --git a/sound/core/init.c b/sound/core/init.c
index 56dde5bd7..577338526 100644
--- a/sound/core/init.c
+++ b/sound/core/init.c
@@ -584,6 +584,8 @@ EXPORT_SYMBOL_GPL(snd_card_disconnect_sync);
 
 static int snd_card_do_free(struct snd_card *card)
 {
+	bool managed = card->managed;
+
 	card->releasing = true;
 #if IS_ENABLED(CONFIG_SND_MIXER_OSS)
 	if (snd_mixer_oss_notify_callback)
@@ -601,7 +603,7 @@ static int snd_card_do_free(struct snd_card *card)
 	}
 	if (card->release_completion)
 		complete(card->release_completion);
-	if (!card->managed)
+	if (!managed)
 		kfree(card);
 	return 0;
 }
 TestError:]

268/1 2026/08/13 19:54 action apply-patch
0m Results:
map[]

269/1 2026/08/13 19:54 action init-style-items
0m Results:
map[StyleItems:<nil>]

270/1 2026/08/13 19:54 loop
0m
271/2 2026/08/13 19:54 iteration 0
0m
272/3 2026/08/13 19:54 agent patch-formatter
0m Model:
good-balanced

Instruction:
You are an expert Linux kernel developer tasked with formatting a kernel patch.
Your objective is purely formatting: you must ensure the patch complies with the kernel's coding style,
conforms to the surrounding code rules, and passes checkpatch.pl, while preserving the code logic exactly as it is.
You should stop once the requested formatting changes are done and checkpatch.pl is happy.
Do not question the requested changes unless they are obviously wrong.
If the code already conforms to the requested changes, surrounding code rules,
and checkpatch.pl is happy, you should just finish your task.

WARNING: The clang-format tool may break the formatting of the surrounding code (like manual alignment).
Use it with caution. We want to make the change fit into the existing formatting as much as possible.

Prefer calling several tools at the same time to save round-trips.

Prompt:
The current patch diff is:

diff --git a/sound/core/init.c b/sound/core/init.c
index 56dde5bd7..577338526 100644
--- a/sound/core/init.c
+++ b/sound/core/init.c
@@ -584,6 +584,8 @@ EXPORT_SYMBOL_GPL(snd_card_disconnect_sync);
 
 static int snd_card_do_free(struct snd_card *card)
 {
+	bool managed = card->managed;
+
 	card->releasing = true;
 #if IS_ENABLED(CONFIG_SND_MIXER_OSS)
 	if (snd_mixer_oss_notify_callback)
@@ -601,7 +603,7 @@ static int snd_card_do_free(struct snd_card *card)
 	}
 	if (card->release_completion)
 		complete(card->release_completion);
-	if (!card->managed)
+	if (!managed)
 		kfree(card);
 	return 0;
 }










Use the provided tools to format the patch.

Reply:
The patch already complies with the Linux kernel coding style, conforms to the surrounding code rules, and passes `checkpatch.pl` with zero errors and zero warnings. No formatting changes are needed.

273/4 2026/08/13 19:54 llm patch-formatter
0m Model:
gemini-3.6-flash

Tokens:
							input: 4667
							output: 44
							thoughts: 350
						

Thoughts:
**Analyzing the Code Modification**

Okay, let's break this down. First, I need to understand what's been changed in `sound/core/init.c`. The user provided a patch diff, which shows a simple modification to the `snd_card_do_free` function. I see a new boolean variable `managed` is introduced and assigned the value of `card->managed` at the beginning of the function. Then, the `kfree(card)` call is now conditional on `!managed` rather than `!card->managed`. This looks like a subtle change, and I need to figure out the implications.

To be thorough, I'm going to run `checkpatch` on the code and also inspect the code in the vicinity of lines 580-610 in `sound/core/init.c`. I will read this file locally, and inspect the code near the change to fully grok the purpose of this tweak.



274/4 2026/08/13 19:54 tool checkpatch
0m Results:
map[Output:total: 0 errors, 0 warnings, 16 lines checked

Your patch has no obvious style problems and is ready for submission.
]

275/4 2026/08/13 19:54 tool read-file
0m Args:
map[File:sound/core/init.c FirstLine:580 LineCount:35]

Results:
map[Contents: 580:				    list_empty(&card->files_list),
 581:				    card->files_lock);
 582:	}
 583:	EXPORT_SYMBOL_GPL(snd_card_disconnect_sync);
 584:	
 585:	static int snd_card_do_free(struct snd_card *card)
 586:	{
 587:		card->releasing = true;
 588:	#if IS_ENABLED(CONFIG_SND_MIXER_OSS)
 589:		if (snd_mixer_oss_notify_callback)
 590:			snd_mixer_oss_notify_callback(card, SND_MIXER_OSS_NOTIFY_FREE);
 591:	#endif
 592:		snd_device_free_all(card);
 593:		if (card->private_free)
 594:			card->private_free(card);
 595:	#ifdef CONFIG_SND_CTL_DEBUG
 596:		kfree(card->value_buf);
 597:	#endif
 598:		if (snd_info_card_free(card) < 0) {
 599:			dev_warn(card->dev, "unable to free card info\n");
 600:			/* Not fatal error */
 601:		}
 602:		if (card->release_completion)
 603:			complete(card->release_completion);
 604:		if (!card->managed)
 605:			kfree(card);
 606:		return 0;
 607:	}
 608:	
 609:	/**
 610:	 * snd_card_free_when_closed - Disconnect the card, free it later eventually
 611:	 * @card: soundcard structure
 612:	 *
 613:	 * Unlike snd_card_free(), this function doesn't try to release the card
 614:	 * resource immediately, but tries to disconnect at first.  When the card
]

276/4 2026/08/13 19:54 llm patch-formatter
0m Model:
gemini-3.6-flash

Tokens:
							input: 5856
							output: 10
							thoughts: 31
						

Thoughts:
Okay, here's the summary, assuming I'm a seasoned developer familiar with patch management:

**Checking Patch Status**

Alright, before I go any further, I need to understand the current state of the workspace. I'm going to quickly check if the patch I'm working with is already in place or if it's going to require application. The simplest and most direct way to do that is to call `patch-diff`. I'm expecting this command to give me a clear picture: either the patch is already there, meaning I don't need to do anything, or it will provide details on what changes are needed, allowing me to proceed with applying the patch. Let's see what `patch-diff` reveals.



277/4 2026/08/13 19:54 tool patch-diff
0m Error:
log-in to see details

278/4 2026/08/13 19:54 llm patch-formatter
0m Model:
gemini-3.6-flash

Tokens:
							input: 6070
							output: 15
							thoughts: 128
						

Thoughts:
**My Thought Process on `patch-diff`'s `File` Argument**

Okay, so I'm diving into this `patch-diff` command and the documentation clearly states that it needs a `File` argument. The question is, can I get away with passing an empty string, or do I *have* to specify a real file path? Let's quickly review the parameter definition. Ah, right, it says `File` is *optional* – it restricts the diff to a specific file, but if it's empty, it shows all changes. Now I remember – I need to double-check the parameter properties, particularly the schema. 

Wait... here are the properties: `{File: {description: ...}}`, and... *required: ["File"]*! Okay, that's a bit of a conflicting statement. If it's required in the schema, does `""` count? Yes, `"File: ""` should work, and since I want all changes anyway, that seems like the safest and simplest approach. Let's call `patch-diff` with `File: ""`.



279/4 2026/08/13 19:54 tool patch-diff
0m Args:
map[File:]

Results:
map[Output:diff --git a/sound/core/init.c b/sound/core/init.c
index 56dde5bd7..577338526 100644
--- a/sound/core/init.c
+++ b/sound/core/init.c
@@ -577,43 +577,45 @@ void snd_card_disconnect_sync(struct snd_card *card)
 
 	guard(spinlock_irq)(&card->files_lock);
 	wait_event_lock_irq(card->remove_sleep,
 			    list_empty(&card->files_list),
 			    card->files_lock);
 }
 EXPORT_SYMBOL_GPL(snd_card_disconnect_sync);
 
 static int snd_card_do_free(struct snd_card *card)
 {
+	bool managed = card->managed;
+
 	card->releasing = true;
 #if IS_ENABLED(CONFIG_SND_MIXER_OSS)
 	if (snd_mixer_oss_notify_callback)
 		snd_mixer_oss_notify_callback(card, SND_MIXER_OSS_NOTIFY_FREE);
 #endif
 	snd_device_free_all(card);
 	if (card->private_free)
 		card->private_free(card);
 #ifdef CONFIG_SND_CTL_DEBUG
 	kfree(card->value_buf);
 #endif
 	if (snd_info_card_free(card) < 0) {
 		dev_warn(card->dev, "unable to free card info\n");
 		/* Not fatal error */
 	}
 	if (card->release_completion)
 		complete(card->release_completion);
-	if (!card->managed)
+	if (!managed)
 		kfree(card);
 	return 0;
 }
 
 /**
  * snd_card_free_when_closed - Disconnect the card, free it later eventually
  * @card: soundcard structure
  *
  * Unlike snd_card_free(), this function doesn't try to release the card
  * resource immediately, but tries to disconnect at first.  When the card
  * is still in use, the function returns before freeing the resources.
  * The card resources will be freed when the refcount gets to zero.
  *
  * Return: zero if successful, or a negative error code
  */
]

280/4 2026/08/13 19:54 llm patch-formatter
0m Model:
gemini-3.6-flash

Tokens:
							input: 7043
							output: 35
							thoughts: 423
						

Thoughts:
**Code Review Deep Dive**

Okay, time to give this patch a final once-over before submission. Let's start with a fresh `checkpatch` run just to be absolutely certain there are no lingering issues. *That's good*, `checkpatch` is clean: zero errors, zero warnings, and a tidy bill of health with 16 lines checked. The output even says it's ready for submission, but I'm not that easily satisfied. I need to make sure I am following all the rules.

Now, let's get granular and look for those subtle style things that `checkpatch` might miss. We are going to look at variable declarations. I remember a specific area that could be a potential red flag: variable declarations within a function block. The kernel style, and specifically what's consistent in `sound/core/init.c`, demands local variable declarations at the start of the block, before any executable code statements. An empty line then follows if there are further statements. Checking, and line 586, `bool managed = card->managed;`, that fits the pattern. Followed by a blank line, *yes*, that looks good.

Next, I need to confirm that tab indentation is used consistently, and look at the areas around `snd_card_do_free`. I will use `read-file` or `grepper` to read lines 585-607 of `sound/core/init.c`. Okay, here's what I see:

```c
static int snd_card_do_free(struct snd_card *card)
{
	bool managed = card->managed;

	card->releasing = true;

	if (!managed)
		kfree(card);
	return 0;
}
```

The tabs are there, and everything lines up as expected.

Then I checked the `if (!managed)` statement. The indentation is indeed one tab, and the code looks correct there.

Okay, back to the big picture: `checkpatch` is silent, so that's a good sign. It's time to confirm conformity to kernel style. I will look at the layout in `sound/core/init.c`, and I will read lines 550 to 620 to be sure. I will compare this and see if the current code follows it. I'll need to confirm that variables and layout is consistent with what is already in the file.

All things considered, and comparing to the existing code style, it's looking like everything is in order. Time to send this patch out.



281/4 2026/08/13 19:54 tool read-file
0m Args:
map[File:sound/core/init.c FirstLine:550 LineCount:70]

Results:
map[Contents: 550:		if (card->registered) {
 551:			device_del(&card->card_dev);
 552:			card->registered = false;
 553:		}
 554:	
 555:		/* disable fops (user space) operations for ALSA API */
 556:		scoped_guard(mutex, &snd_card_mutex) {
 557:			snd_cards[card->number] = NULL;
 558:			clear_bit(card->number, snd_cards_lock);
 559:		}
 560:	
 561:		snd_power_sync_ref(card);
 562:	}
 563:	EXPORT_SYMBOL(snd_card_disconnect);
 564:	
 565:	/**
 566:	 * snd_card_disconnect_sync - disconnect card and wait until files get closed
 567:	 * @card: card object to disconnect
 568:	 *
 569:	 * This calls snd_card_disconnect() for disconnecting all belonging components
 570:	 * and waits until all pending files get closed.
 571:	 * It assures that all accesses from user-space finished so that the driver
 572:	 * can release its resources gracefully.
 573:	 */
 574:	void snd_card_disconnect_sync(struct snd_card *card)
 575:	{
 576:		snd_card_disconnect(card);
 577:	
 578:		guard(spinlock_irq)(&card->files_lock);
 579:		wait_event_lock_irq(card->remove_sleep,
 580:				    list_empty(&card->files_list),
 581:				    card->files_lock);
 582:	}
 583:	EXPORT_SYMBOL_GPL(snd_card_disconnect_sync);
 584:	
 585:	static int snd_card_do_free(struct snd_card *card)
 586:	{
 587:		card->releasing = true;
 588:	#if IS_ENABLED(CONFIG_SND_MIXER_OSS)
 589:		if (snd_mixer_oss_notify_callback)
 590:			snd_mixer_oss_notify_callback(card, SND_MIXER_OSS_NOTIFY_FREE);
 591:	#endif
 592:		snd_device_free_all(card);
 593:		if (card->private_free)
 594:			card->private_free(card);
 595:	#ifdef CONFIG_SND_CTL_DEBUG
 596:		kfree(card->value_buf);
 597:	#endif
 598:		if (snd_info_card_free(card) < 0) {
 599:			dev_warn(card->dev, "unable to free card info\n");
 600:			/* Not fatal error */
 601:		}
 602:		if (card->release_completion)
 603:			complete(card->release_completion);
 604:		if (!card->managed)
 605:			kfree(card);
 606:		return 0;
 607:	}
 608:	
 609:	/**
 610:	 * snd_card_free_when_closed - Disconnect the card, free it later eventually
 611:	 * @card: soundcard structure
 612:	 *
 613:	 * Unlike snd_card_free(), this function doesn't try to release the card
 614:	 * resource immediately, but tries to disconnect at first.  When the card
 615:	 * is still in use, the function returns before freeing the resources.
 616:	 * The card resources will be freed when the refcount gets to zero.
 617:	 *
 618:	 * Return: zero if successful, or a negative error code
 619:	 */
]

282/4 2026/08/13 19:54 llm patch-formatter
0m Model:
gemini-3.6-flash

Tokens:
							input: 9121
							output: 39
							thoughts: 750
						

Thoughts:
**Analysis of the Provided Code Snippet**

Okay, let's break this down. Initially, I was a bit thrown off by the difference between the `read-file` output and the `patch-diff` output, specifically the lack of the `bool managed = card->managed;` declaration in the former. But, I quickly realized that `read-file` would be showing the original file, and `patch-diff` would be showing the current state, which includes the proposed patch. After a quick double-check using the `git diff` output as confirmation, I've verified that the patch is, indeed, already applied.

Now, let's circle back to the instructions. The objective is purely formatting, ensuring the patch conforms to the Linux kernel coding style, code rules and passes `checkpatch.pl`. Since the patch has already been applied, it seems redundant, but I need to do the due diligence and go through the verification.

First, I examined the formatting. The added line `bool managed = card->managed;` is correctly formatted: using tabs for indentation, single space around `=`, and a trailing semicolon. There's a blank line after the declaration and before the beginning of the function logic. The conditional `if (!managed)` is also properly formatted, with the necessary space after `if`, no space before the `!`, and correct indentation of the `kfree` call.

Second, I confirmed that `checkpatch.pl` produces no errors or warnings, specifically zero errors and zero warnings after checking sixteen lines of code.

Third, the patch conforms to the surrounding code rules.

Therefore, since the code already meets the kernel coding style and passes `checkpatch.pl`, and is otherwise compliant, there is no need to make any changes. I am ready to close this task, as the formatting is already correct.



283/3 2026/08/13 19:54 action test-patch-inplace
0m Results:
map[PatchDiff:diff --git a/sound/core/init.c b/sound/core/init.c
index 56dde5bd7..577338526 100644
--- a/sound/core/init.c
+++ b/sound/core/init.c
@@ -584,6 +584,8 @@ EXPORT_SYMBOL_GPL(snd_card_disconnect_sync);
 
 static int snd_card_do_free(struct snd_card *card)
 {
+	bool managed = card->managed;
+
 	card->releasing = true;
 #if IS_ENABLED(CONFIG_SND_MIXER_OSS)
 	if (snd_mixer_oss_notify_callback)
@@ -601,7 +603,7 @@ static int snd_card_do_free(struct snd_card *card)
 	}
 	if (card->release_completion)
 		complete(card->release_completion);
-	if (!card->managed)
+	if (!managed)
 		kfree(card);
 	return 0;
 }
 TestError:]

284/3 2026/08/13 19:54 action run-checkpatch
0m Results:
map[CheckpatchOutput:total: 0 errors, 0 warnings, 16 lines checked

Your patch has no obvious style problems and is ready for submission.
 NeedRefinement:false]

285/1 2026/08/13 19:54 agent fixes-finder
0m Model:
best-expensive

Results:
map[FixesHash:e8ad415b7a55cb9a9fbfc04696518d5ea0b609b3]

Instruction:
You are an experienced Linux kernel developer tasked with identifying the commit
that introduced the bug being fixed. Identifying the correct buggy commit is crucial
for proper kernel maintenance (backporting to stable trees, etc.).

Your investigation strategy:
1. Examine the patch that fixes the bug. Use git tools (like git-log or git-blame)
   to trace the history of the lines or functions modified by the patch.
2. Analyze the stack trace in the crash report. Identify the key files and functions
   involved in the crash and investigate their history to see when the problematic
   logic was introduced.
3. Compare the bug explanation with the commit history to find the point where
   the described logic error first appeared.

A bug is typically introduced when a piece of code is first written, or when
a refactoring changed its logic in a way that introduced the bug.
Trace the history of relevant symbols or find when specific code patterns were introduced/removed.

You must provide exactly one bug-introducing commit hash.
If you are unable to confidently determine the bug-introducing commit after investigation,
return an empty string rather than guessing.

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:
The crash is:

==================================================================
BUG: KASAN: use-after-free in snd_card_do_free sound/core/init.c:604 [inline]
BUG: KASAN: use-after-free in release_card_device+0x1ab/0x1b0 sound/core/init.c:153
Read of size 1 at addr ffff8881912ec909 by task syz-executor130/5857

CPU: 0 UID: 0 PID: 5857 Comm: syz-executor130 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
Call Trace:
 <TASK>
 dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120
 print_address_description+0x55/0x1e0 mm/kasan/report.c:378
 print_report+0x58/0x70 mm/kasan/report.c:482
 kasan_report+0x117/0x150 mm/kasan/report.c:595
 snd_card_do_free sound/core/init.c:604 [inline]
 release_card_device+0x1ab/0x1b0 sound/core/init.c:153
 device_release+0xc4/0x1f0 drivers/base/core.c:-1
 kobject_cleanup lib/kobject.c:689 [inline]
 kobject_release lib/kobject.c:720 [inline]
 kref_put include/linux/kref.h:65 [inline]
 kobject_put+0x222/0x550 lib/kobject.c:737
 snd_card_file_remove+0x331/0x390 sound/core/init.c:1125
 snd_pcm_release+0x12c/0x160 sound/core/pcm_native.c:2986
 __fput+0x418/0xa50 fs/file_table.c:512
 fput_close_sync+0x11f/0x240 fs/file_table.c:617
 __do_sys_close fs/open.c:1511 [inline]
 __se_sys_close fs/open.c:1496 [inline]
 __x64_sys_close+0x7e/0x110 fs/open.c:1496
 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:0x7f87f11782de
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:00007f87f0915118 EFLAGS: 00000246 ORIG_RAX: 0000000000000003
RAX: ffffffffffffffda RBX: 00007f87f09156c0 RCX: 00007f87f11782de
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000008
RBP: 00007f87f11ecd40 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: ffffffffffffffd0
R13: 0000000000000002 R14: 00007ffe50e899e0 R15: 00007ffe50e89ac8
 </TASK>

The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1912ec
flags: 0x57ff00000000000(node=1|zone=2|lastcpupid=0x7ff)
raw: 057ff00000000000 ffffea0007e57308 ffff888138841440 0000000000000000
raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as freed
page last allocated via order 2, migratetype Unmovable, gfp_mask 0x40dc0(GFP_KERNEL|__GFP_ZERO|__GFP_COMP), pid 5852, tgid 5852 (syz-executor130), ts 71488546659, free_ts 71610399401
 set_page_owner include/linux/page_owner.h:32 [inline]
 post_alloc_hook+0x1f9/0x250 mm/page_alloc.c:1859
 prep_new_page mm/page_alloc.c:1867 [inline]
 get_page_from_freelist+0x21fa/0x2270 mm/page_alloc.c:3946
 __alloc_frozen_pages_noprof+0x18d/0x380 mm/page_alloc.c:5304
 alloc_pages_mpol+0x212/0x380 mm/mempolicy.c:2490
 ___kmalloc_large_node+0x4c/0x120 mm/slub.c:5274
 __kmalloc_large_node_noprof+0x18/0x90 mm/slub.c:5305
 __do_kmalloc_node mm/slub.c:5322 [inline]
 __kmalloc_node_track_caller_noprof+0x164/0x730 mm/slub.c:5471
 alloc_dr drivers/base/devres.c:141 [inline]
 __devres_alloc_node+0x4c/0x160 drivers/base/devres.c:189
 snd_devm_card_new+0x84/0x160 sound/core/init.c:235
 loopback_probe+0x150/0x13d0 sound/drivers/aloop.c:1805
 platform_probe+0xf9/0x190 drivers/base/platform.c:1439
 call_driver_probe drivers/base/dd.c:-1 [inline]
 really_probe+0x254/0xae0 drivers/base/dd.c:706
 __driver_probe_device+0x1e8/0x360 drivers/base/dd.c:868
 device_driver_attach+0xe0/0x1d0 drivers/base/dd.c:1203
 bind_store+0x1d0/0x220 drivers/base/bus.c:267
 kernfs_fop_write_iter+0x3a4/0x540 fs/kernfs/file.c:345
page last free pid 5856 tgid 5852 stack trace:
 reset_page_owner include/linux/page_owner.h:25 [inline]
 __free_pages_prepare mm/page_alloc.c:1406 [inline]
 __free_frozen_pages+0xc1e/0xd10 mm/page_alloc.c:2950
 free_node drivers/base/devres.c:50 [inline]
 release_nodes drivers/base/devres.c:547 [inline]
 devres_release_all+0x1ce/0x260 drivers/base/devres.c:576
 device_unbind_cleanup drivers/base/dd.c:597 [inline]
 __device_release_driver drivers/base/dd.c:1354 [inline]
 device_release_driver_internal+0x5d9/0x880 drivers/base/dd.c:1372
 unbind_store+0x1a1/0x1d0 drivers/base/bus.c:244
 kernfs_fop_write_iter+0x3a4/0x540 fs/kernfs/file.c:345
 new_sync_write fs/read_write.c:595 [inline]
 vfs_write+0x612/0xba0 fs/read_write.c:687
 ksys_write+0x150/0x270 fs/read_write.c:739
 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

Memory state around the buggy address:
 ffff8881912ec800: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 ffff8881912ec880: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>ffff8881912ec900: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
                      ^
 ffff8881912ec980: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 ffff8881912eca00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
==================================================================



The explanation of the root cause is:

An analysis of the crash report and the ALSA core source code reveals a classic Use-After-Free (UAF) caused by a race condition between the sound card release process and the devres (device resource management) cleanup.

### Root Cause Analysis

The bug occurs when a sound card is managed by devres (allocated via `snd_devm_card_new()`). For managed cards, the memory is allocated using `devres_alloc()`, and its release function is set to `__snd_card_release()`, which simply calls `snd_card_free()`.

When the device is unbound (e.g., via sysfs) while a user-space application still holds an open file descriptor to the sound card, the following sequence of events leads to the UAF:

1. **Unbind Thread (PID 5856):** The driver is unbound, triggering `devres_release_all()`. The devres core calls the release callback `__snd_card_release()`, which in turn calls `snd_card_free()`.
2. **Unbind Thread:** `snd_card_free()` calls `snd_card_free_when_closed()`, which drops a reference to the card's device (`card->card_dev`). However, because the user thread still has an open file descriptor, the reference count does not reach zero.
3. **Unbind Thread:** `snd_card_free()` then blocks on `wait_for_completion(&released)`, waiting for all references to be dropped.
4. **User Thread (PID 5857):** The user-space application closes the sound device file descriptor (`sys_close`). `snd_card_file_remove()` drops the final reference to `card->card_dev`.
5. **User Thread:** The reference count reaches zero, invoking the device release callback `release_card_device()`, which calls `snd_card_do_free()`.
6. **User Thread:** `snd_card_do_free()` performs cleanup and calls `complete(card->release_completion)`.
7. **Unbind Thread:** Wakes up from `wait_for_completion()`, returns from `snd_card_free()`, and then returns from `__snd_card_release()`.
8. **Unbind Thread:** The devres core (`release_nodes()`) immediately calls `free_node()`, which frees the memory block containing the `snd_card` structure.
9. **User Thread:** Meanwhile, `snd_card_do_free()` continues execution and evaluates `if (!card->managed)`. It reads the `managed` boolean from the `snd_card` structure that was just freed by the unbind thread, triggering the KASAN Use-After-Free.

### Code Walkthrough

The race condition manifests at the very end of `snd_card_do_free()` in `sound/core/init.c`:

```c
static int snd_card_do_free(struct snd_card *card)
{
	card->releasing = true;
	// ... cleanup ...
	
	if (card->release_completion)
		complete(card->release_completion); // [1] Wakes up the unbind thread
		
	if (!card->managed)                         // [2] UAF: card is freed by devres here
		kfree(card);
	return 0;
}
```
At `[1]`, the `complete()` call unblocks the unbind thread waiting in `snd_card_free()`. The unbind thread immediately proceeds to free the `card` memory via devres. By the time the user thread reaches `[2]`, `card` has already been freed, and reading `card->managed` (a 1-byte read at offset 2257) triggers the KASAN bug.

### Proposed Fix

To fix this, the value of `card->managed` must be read and stored in a local variable *before* calling `complete()`. Once `complete()` is called, the `card` pointer must no longer be dereferenced if it is managed by devres.

```c
static int snd_card_do_free(struct snd_card *card)
{
	bool managed = card->managed; // Cache the value before completion

	card->releasing = true;
	// ... existing cleanup code ...
	
	if (card->release_completion)
		complete(card->release_completion);
		
	if (!managed) // Safely use the cached value
		kfree(card);
		
	return 0;
}
```


The patch that fixes the bug is:

diff --git a/sound/core/init.c b/sound/core/init.c
index 56dde5bd7..577338526 100644
--- a/sound/core/init.c
+++ b/sound/core/init.c
@@ -584,6 +584,8 @@ EXPORT_SYMBOL_GPL(snd_card_disconnect_sync);
 
 static int snd_card_do_free(struct snd_card *card)
 {
+	bool managed = card->managed;
+
 	card->releasing = true;
 #if IS_ENABLED(CONFIG_SND_MIXER_OSS)
 	if (snd_mixer_oss_notify_callback)
@@ -601,7 +603,7 @@ static int snd_card_do_free(struct snd_card *card)
 	}
 	if (card->release_completion)
 		complete(card->release_completion);
-	if (!card->managed)
+	if (!managed)
 		kfree(card);
 	return 0;
 }


Search for the commit(s) that introduced this bug.

286/2 2026/08/13 19:54 llm fixes-finder
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 8179
							output: 50
							thoughts: 214
						

Thoughts:
**Pinpointing the Root Cause of the Use-After-Free**

Okay, so we've got a Use-After-Free bug, and the provided patch clearly targets `snd_card_do_free` within `sound/core/init.c`. The patch itself is simple enough: it caches `card->managed` before that `complete()` call on `card->release_completion`. This makes immediate sense; the core issue is that `complete()` potentially unblocks another thread that *could* be freeing the `card` structure entirely (if it's managed by devres, which is critical to understand). This means any subsequent access to `card->managed` after the `complete()` is a problem.

The key question now is: when did the vulnerability creep in? I need to trace the history of that `snd_card_do_free` function and specifically focus on the introduction of `card->managed` or, alternatively, the removal/change of the logic protecting it after that `complete()` call. Did we *introduce* `card->managed` late in the game? Or did we *remove* a previous check?

Time to whip out `git-log` or `git-blame` on `sound/core/init.c`. I'll be looking directly around the `snd_card_do_free` function, zeroing in on any changes impacting the `card->managed` field, the `complete()` call, or anything logically similar that was there before. The goal is to pinpoint the commit that either introduced the access to `card->managed` after the `complete()` call or, conversely, removed a critical safeguard.



287/2 2026/08/13 19:54 tool git-log
0m Args:
map[CodeRegexp:if \(!card->managed\) SourcePath:sound/core/init.c SymbolName:snd_card_do_free]

Results:
map[Output:8bfb181c17d2 ALSA: Embed card device into struct snd_card
]

288/2 2026/08/13 19:55 llm fixes-finder
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 8827
							output: 26
							thoughts: 33
						

Thoughts:
Here's my summary, as if I were thinking these thoughts:

**Analyzing a Potential Regression**

Okay, time to dig into this. I need to pinpoint exactly when this `card->managed` issue popped up, and if it's related to a specific piece of logic. The first step is to grab commit `8bfb181c17d2` and see if the problematic flag or the code surrounding it made its debut then. I'm going to start there and see what changes were introduced. Hopefully, that commit will shed some light. Either it introduced the flag itself, or maybe some refactoring that changed how it gets set or used. From there, I can walk the history forward or backward from that point and narrow down where the actual regression occurred.



289/2 2026/08/13 19:55 tool git-show
0m Args:
map[Commit:8bfb181c17d2]

Results:
map[Output:commit 8bfb181c17d20956f156e84638912e00e1aaca86
Author: Takashi Iwai <tiwai@suse.de>
Date:   Wed Jan 29 11:46:11 2014 +0100

    ALSA: Embed card device into struct snd_card
    
    As prepared in the previous patch, we are ready to create a device
    struct for the card object in snd_card_create() now.  This patch
    changes the scheme from the old style to:
    
    - embed a device struct for the card object into snd_card struct,
    - initialize the card device in snd_card_create() (but not register),
    - registration is done in snd_card_register() via device_add()
    
    The actual card device is stored in card->card_dev.  The card->dev
    pointer is kept unchanged and pointing to the parent device as before
    for compatibility reason.
    
    Signed-off-by: Takashi Iwai <tiwai@suse.de>

diff --git a/include/sound/core.h b/include/sound/core.h
index e946b2428ea0..7e4fb3e93fc7 100644
--- a/include/sound/core.h
+++ b/include/sound/core.h
@@ -22,6 +22,7 @@
  *
  */
 
+#include <linux/device.h>
 #include <linux/sched.h>		/* wake_up() */
 #include <linux/mutex.h>		/* struct mutex */
 #include <linux/rwsem.h>		/* struct rw_semaphore */
@@ -41,8 +42,6 @@
 /* forward declarations */
 struct pci_dev;
 struct module;
-struct device;
-struct device_attribute;
 
 /* device allocation stuff */
 
@@ -135,7 +134,8 @@ struct snd_card {
 	wait_queue_head_t shutdown_sleep;
 	atomic_t refcount;		/* refcount for disconnection */
 	struct device *dev;		/* device assigned to this card */
-	struct device *card_dev;	/* cardX object for sysfs */
+	struct device card_dev;		/* cardX object for sysfs */
+	bool registered;		/* card_dev is registered? */
 
 #ifdef CONFIG_PM
 	unsigned int power_state;	/* power state */
@@ -149,6 +149,8 @@ struct snd_card {
 #endif
 };
 
+#define dev_to_snd_card(p)	container_of(p, struct snd_card, card_dev)
+
 #ifdef CONFIG_PM
 static inline void snd_power_lock(struct snd_card *card)
 {
@@ -197,7 +199,7 @@ struct snd_minor {
 /* return a device pointer linked to each sound device as a parent */
 static inline struct device *snd_card_get_device_link(struct snd_card *card)
 {
-	return card ? card->card_dev : NULL;
+	return card ? &card->card_dev : NULL;
 }
 
 /* sound.c */
diff --git a/sound/core/init.c b/sound/core/init.c
index f4d3ac633ff8..f7875049c5e1 100644
--- a/sound/core/init.c
+++ b/sound/core/init.c
@@ -156,6 +156,13 @@ static int get_slot_from_bitmask(int mask, int (*check)(struct module *, int),
 	return mask; /* unchanged */
 }
 
+static int snd_card_do_free(struct snd_card *card);
+
+static void release_card_device(struct device *dev)
+{
+	snd_card_do_free(dev_to_snd_card(dev));
+}
+
 /**
  *  snd_card_new - create and initialize a soundcard structure
  *  @parent: the parent device object
@@ -189,6 +196,8 @@ int snd_card_new(struct device *parent, int idx, const char *xid,
 	card = kzalloc(sizeof(*card) + extra_size, GFP_KERNEL);
 	if (!card)
 		return -ENOMEM;
+	if (extra_size > 0)
+		card->private_data = (char *)card + sizeof(struct snd_card);
 	if (xid)
 		strlcpy(card->id, xid, sizeof(card->id));
 	err = 0;
@@ -208,7 +217,8 @@ int snd_card_new(struct device *parent, int idx, const char *xid,
 		mutex_unlock(&snd_card_mutex);
 		snd_printk(KERN_ERR "cannot find the slot for index %d (range 0-%i), error: %d\n",
 			 idx, snd_ecards_limit - 1, err);
-		goto __error;
+		kfree(card);
+		return err;
 	}
 	set_bit(idx, snd_cards_lock);		/* lock it */
 	if (idx >= snd_ecards_limit)
@@ -230,6 +240,15 @@ int snd_card_new(struct device *parent, int idx, const char *xid,
 	mutex_init(&card->power_lock);
 	init_waitqueue_head(&card->power_sleep);
 #endif
+
+	device_initialize(&card->card_dev);
+	card->card_dev.parent = parent;
+	card->card_dev.class = sound_class;
+	card->card_dev.release = release_card_device;
+	err = kobject_set_name(&card->card_dev.kobj, "card%d", idx);
+	if (err < 0)
+		goto __error;
+
 	/* the control interface cannot be accessed from the user space until */
 	/* snd_cards_bitmask and snd_cards are set with snd_card_register */
 	err = snd_ctl_create(card);
@@ -242,15 +261,13 @@ int snd_card_new(struct device *parent, int idx, const char *xid,
 		snd_printk(KERN_ERR "unable to create card info\n");
 		goto __error_ctl;
 	}
-	if (extra_size > 0)
-		card->private_data = (char *)card + sizeof(struct snd_card);
 	*card_ret = card;
 	return 0;
 
       __error_ctl:
 	snd_device_free_all(card, SNDRV_DEV_CMD_PRE);
       __error:
-	kfree(card);
+	put_device(&card->card_dev);
   	return err;
 }
 EXPORT_SYMBOL(snd_card_new);
@@ -407,9 +424,9 @@ int snd_card_disconnect(struct snd_card *card)
 		snd_printk(KERN_ERR "not all devices for card %i can be disconnected\n", card->number);
 
 	snd_info_card_disconnect(card);
-	if (card->card_dev) {
-		device_unregister(card->card_dev);
-		card->card_dev = NULL;
+	if (card->registered) {
+		device_del(&card->card_dev);
+		card->registered = false;
 	}
 #ifdef CONFIG_PM
 	wake_up(&card->power_sleep);
@@ -471,7 +488,7 @@ void snd_card_unref(struct snd_card *card)
 	if (atomic_dec_and_test(&card->refcount)) {
 		wake_up(&card->shutdown_sleep);
 		if (card->free_on_last_close)
-			snd_card_do_free(card);
+			put_device(&card->card_dev);
 	}
 }
 EXPORT_SYMBOL(snd_card_unref);
@@ -489,7 +506,7 @@ int snd_card_free_when_closed(struct snd_card *card)
 
 	card->free_on_last_close = 1;
 	if (atomic_dec_and_test(&card->refcount))
-		snd_card_do_free(card);
+		put_device(&card->card_dev);
 	return 0;
 }
 
@@ -503,7 +520,7 @@ int snd_card_free(struct snd_card *card)
 
 	/* wait, until all devices are ready for the free operation */
 	wait_event(card->shutdown_sleep, !atomic_read(&card->refcount));
-	snd_card_do_free(card);
+	put_device(&card->card_dev);
 	return 0;
 }
 
@@ -694,12 +711,11 @@ int snd_card_register(struct snd_card *card)
 	if (snd_BUG_ON(!card))
 		return -EINVAL;
 
-	if (!card->card_dev) {
-		card->card_dev = device_create(sound_class, card->dev,
-					       MKDEV(0, 0), card,
-					       "card%i", card->number);
-		if (IS_ERR(card->card_dev))
-			card->card_dev = NULL;
+	if (!card->registered) {
+		err = device_add(&card->card_dev);
+		if (err < 0)
+			return err;
+		card->registered = true;
 	}
 
 	if ((err = snd_device_register_all(card)) < 0)
@@ -729,11 +745,11 @@ int snd_card_register(struct snd_card *card)
 	if (snd_mixer_oss_notify_callback)
 		snd_mixer_oss_notify_callback(card, SND_MIXER_OSS_NOTIFY_REGISTER);
 #endif
-	if (card->card_dev) {
-		err = device_create_file(card->card_dev, &card_id_attrs);
+	if (card->registered) {
+		err = device_create_file(&card->card_dev, &card_id_attrs);
 		if (err < 0)
 			return err;
-		err = device_create_file(card->card_dev, &card_number_attrs);
+		err = device_create_file(&card->card_dev, &card_number_attrs);
 		if (err < 0)
 			return err;
 	}
]

290/2 2026/08/13 19:55 llm fixes-finder
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 11746
							output: 46
							thoughts: 38
						

Thoughts:
**Debugging a Managed Object**

Okay, hold on a second. I'm looking at this object, this `8bfb181c17d2`, and something's not quite right. It seems to be missing `card->managed`. That's unexpected. So, my next logical step is to determine when and *why* `card->managed` was introduced. I need to understand the evolution of this particular data structure and see if there was a point where this specific object might have been missed or handled incorrectly. Knowing that timeline will help me pinpoint the source of this discrepancy. Let's dig into the version control history and get some context.



291/2 2026/08/13 19:55 tool git-log
0m Args:
map[CodeRegexp:card->managed SourcePath:sound/core/init.c SymbolName:snd_card_do_free]

Results:
map[Output:8bfb181c17d2 ALSA: Embed card device into struct snd_card
]

292/2 2026/08/13 19:55 llm fixes-finder
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 12005
							output: 33
							thoughts: 67
						

Thoughts:
**My Thought Process: Refining the Search Strategy**

Okay, so I was initially thinking `git log` with specific symbol and code regex might be the way to go, targeting `snd_card_do_free` and `card->managed`. But hang on a second... what if `card->managed` was actually introduced in a *different* commit than the function? That would completely throw off that approach. It's too specific and assumes a tighter link than might actually exist.

The more reliable approach now seems to be a broader search. I need to find where `card->managed` itself was introduced and how it relates to the broader `sound/core/` initialisation. Let's just go directly to the source and see where `card->managed` actually shows up in `sound/core/init.c`. That should give me the foundation to piece together the history.



293/2 2026/08/13 19:55 tool git-log
0m Args:
map[CodeRegexp:card->managed PathPrefix:sound/core/init.c]

Results:
map[Output:c3afa2a402d1 ALSA: core: Fix double-free at snd_card_new()
e8ad415b7a55 ALSA: core: Add managed card creation
]

294/2 2026/08/13 19:55 llm fixes-finder
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 12351
							output: 26
							thoughts: 18
						

Thoughts:
Okay, here's my interpretation of that thought process, tailored for an expert audience, and presented as if it were my own internal monologue:

**Investigating a Specific ID**

Alright, time to get to work. Let's see... the ID I'm looking at is `e8ad415b7a55`. That hex string just popped up, and it's grabbing my attention. I need to understand its context. This could be a commit hash, a transaction ID, a file identifier, or something else entirely, so context is key. My initial thought is: what database, system, or log does this come from? Is it something I've seen before? I'll need to reference this ID against my recent activity, previous investigations, and any pertinent documentation to understand its significance. Let's dig in and see what this leads to!



295/2 2026/08/13 19:55 tool git-show
0m Args:
map[Commit:e8ad415b7a55]

Results:
map[Output:commit e8ad415b7a55cb9a9fbfc04696518d5ea0b609b3
Author: Takashi Iwai <tiwai@suse.de>
Date:   Thu Jul 15 09:58:24 2021 +0200

    ALSA: core: Add managed card creation
    
    As a second step for preliminary to widen the devres usages among
    sound drivers, this patch adds a new ALSA core API function,
    snd_devm_card_new(), to create a snd_card object via devres.
    When a card object is created by this new function, snd_card_free() is
    called automatically and the card object resource gets released at the
    device unbinding time.
    
    However, the story isn't that simple.  A caveat is that we have to
    call snd_card_free() at the very first of the whole resource release
    procedure, in order to assure that the all exposed devices on
    user-space are deleted and sync with processes accessing those devices
    before releasing resources.
    
    For achieving it, snd_card_register() adds a new devres action to
    trigger snd_card_free() automatically when the given card object is a
    "managed" one.  Since usually snd_card_register() is the last step of
    the initialization, this should work in most cases.
    
    With all these tricks, some drivers can get rid of the whole driver
    remove callback code.
    
    About a bit of implementation details: the patch adds two new flags to
    snd_card object: managed and releasing.  The former indicates that the
    object was created via snd_devm_card_new(), and the latter is used for
    avoiding the double-free of snd_card_free() calls.  Both flags are
    fairly internal and likely uninteresting to normal users.
    
    Link: https://lore.kernel.org/r/20210715075941.23332-3-tiwai@suse.de
    Signed-off-by: Takashi Iwai <tiwai@suse.de>

diff --git a/include/sound/core.h b/include/sound/core.h
index c4ade121727d..7885f903cd5a 100644
--- a/include/sound/core.h
+++ b/include/sound/core.h
@@ -117,6 +117,8 @@ struct snd_card {
 	struct device card_dev;		/* cardX object for sysfs */
 	const struct attribute_group *dev_groups[4]; /* assigned sysfs attr */
 	bool registered;		/* card_dev is registered? */
+	bool managed;			/* managed via devres */
+	bool releasing;			/* during card free process */
 	int sync_irq;			/* assigned irq, used for PCM sync */
 	wait_queue_head_t remove_sleep;
 
@@ -274,6 +276,9 @@ extern int (*snd_mixer_oss_notify_callback)(struct snd_card *card, int cmd);
 int snd_card_new(struct device *parent, int idx, const char *xid,
 		 struct module *module, int extra_size,
 		 struct snd_card **card_ret);
+int snd_devm_card_new(struct device *parent, int idx, const char *xid,
+		      struct module *module, size_t extra_size,
+		      struct snd_card **card_ret);
 
 int snd_card_disconnect(struct snd_card *card);
 void snd_card_disconnect_sync(struct snd_card *card);
diff --git a/sound/core/init.c b/sound/core/init.c
index 1490568efdb0..e985185ebc91 100644
--- a/sound/core/init.c
+++ b/sound/core/init.c
@@ -134,6 +134,9 @@ void snd_device_initialize(struct device *dev, struct snd_card *card)
 }
 EXPORT_SYMBOL_GPL(snd_device_initialize);
 
+static int snd_card_init(struct snd_card *card, struct device *parent,
+			 int idx, const char *xid, struct module *module,
+			 size_t extra_size);
 static int snd_card_do_free(struct snd_card *card);
 static const struct attribute_group card_dev_attr_group;
 
@@ -163,9 +166,6 @@ int snd_card_new(struct device *parent, int idx, const char *xid,
 {
 	struct snd_card *card;
 	int err;
-#ifdef CONFIG_SND_DEBUG
-	char name[8];
-#endif
 
 	if (snd_BUG_ON(!card_ret))
 		return -EINVAL;
@@ -176,6 +176,74 @@ int snd_card_new(struct device *parent, int idx, const char *xid,
 	card = kzalloc(sizeof(*card) + extra_size, GFP_KERNEL);
 	if (!card)
 		return -ENOMEM;
+
+	err = snd_card_init(card, parent, idx, xid, module, extra_size);
+	if (err < 0) {
+		kfree(card);
+		return err;
+	}
+
+	*card_ret = card;
+	return 0;
+}
+EXPORT_SYMBOL(snd_card_new);
+
+static void __snd_card_release(struct device *dev, void *data)
+{
+	snd_card_free(data);
+}
+
+/**
+ * snd_devm_card_new - managed snd_card object creation
+ * @parent: the parent device object
+ * @idx: card index (address) [0 ... (SNDRV_CARDS-1)]
+ * @xid: card identification (ASCII string)
+ * @module: top level module for locking
+ * @extra_size: allocate this extra size after the main soundcard structure
+ * @card_ret: the pointer to store the created card instance
+ *
+ * This function works like snd_card_new() but manages the allocated resource
+ * via devres, i.e. you don't need to free explicitly.
+ *
+ * When a snd_card object is created with this function and registered via
+ * snd_card_register(), the very first devres action to call snd_card_free()
+ * is added automatically.  In that way, the resource disconnection is assured
+ * at first, then released in the expected order.
+ */
+int snd_devm_card_new(struct device *parent, int idx, const char *xid,
+		      struct module *module, size_t extra_size,
+		      struct snd_card **card_ret)
+{
+	struct snd_card *card;
+	int err;
+
+	*card_ret = NULL;
+	card = devres_alloc(__snd_card_release, sizeof(*card) + extra_size,
+			    GFP_KERNEL);
+	if (!card)
+		return -ENOMEM;
+	card->managed = true;
+	err = snd_card_init(card, parent, idx, xid, module, extra_size);
+	if (err < 0) {
+		devres_free(card);
+		return err;
+	}
+
+	devres_add(parent, card);
+	*card_ret = card;
+	return 0;
+}
+EXPORT_SYMBOL_GPL(snd_devm_card_new);
+
+static int snd_card_init(struct snd_card *card, struct device *parent,
+			 int idx, const char *xid, struct module *module,
+			 size_t extra_size)
+{
+	int err;
+#ifdef CONFIG_SND_DEBUG
+	char name[8];
+#endif
+
 	if (extra_size > 0)
 		card->private_data = (char *)card + sizeof(struct snd_card);
 	if (xid)
@@ -197,7 +265,6 @@ int snd_card_new(struct device *parent, int idx, const char *xid,
 		mutex_unlock(&snd_card_mutex);
 		dev_err(parent, "cannot find the slot for index %d (range 0-%i), error: %d\n",
 			 idx, snd_ecards_limit - 1, err);
-		kfree(card);
 		return err;
 	}
 	set_bit(idx, snd_cards_lock);		/* lock it */
@@ -256,8 +323,6 @@ int snd_card_new(struct device *parent, int idx, const char *xid,
 	sprintf(name, "card%d", idx);
 	card->debugfs_root = debugfs_create_dir(name, sound_debugfs_root);
 #endif
-
-	*card_ret = card;
 	return 0;
 
       __error_ctl:
@@ -266,7 +331,6 @@ int snd_card_new(struct device *parent, int idx, const char *xid,
 	put_device(&card->card_dev);
   	return err;
 }
-EXPORT_SYMBOL(snd_card_new);
 
 /**
  * snd_card_ref - Get the card object from the index
@@ -481,6 +545,7 @@ EXPORT_SYMBOL_GPL(snd_card_disconnect_sync);
 
 static int snd_card_do_free(struct snd_card *card)
 {
+	card->releasing = true;
 #if IS_ENABLED(CONFIG_SND_MIXER_OSS)
 	if (snd_mixer_oss_notify_callback)
 		snd_mixer_oss_notify_callback(card, SND_MIXER_OSS_NOTIFY_FREE);
@@ -498,7 +563,8 @@ static int snd_card_do_free(struct snd_card *card)
 #endif
 	if (card->release_completion)
 		complete(card->release_completion);
-	kfree(card);
+	if (!card->managed)
+		kfree(card);
 	return 0;
 }
 
@@ -745,6 +811,14 @@ int snd_card_add_dev_attr(struct snd_card *card,
 }
 EXPORT_SYMBOL_GPL(snd_card_add_dev_attr);
 
+static void trigger_card_free(void *data)
+{
+	struct snd_card *card = data;
+
+	if (!card->releasing)
+		snd_card_free(data);
+}
+
 /**
  *  snd_card_register - register the soundcard
  *  @card: soundcard structure
@@ -768,6 +842,15 @@ int snd_card_register(struct snd_card *card)
 		if (err < 0)
 			return err;
 		card->registered = true;
+	} else {
+		if (card->managed)
+			devm_remove_action(card->dev, trigger_card_free, card);
+	}
+
+	if (card->managed) {
+		err = devm_add_action(card->dev, trigger_card_free, card);
+		if (err < 0)
+			return err;
 	}
 
 	err = snd_device_register_all(card);
]

296/2 2026/08/13 19:55 llm fixes-finder
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 15459
							output: 52
							thoughts: 502
						

Thoughts:
**Analyzing a Use-After-Free Vulnerability in ALSA**

Okay, so I'm looking at this ALSA bug and I think I've got a handle on it. Commit `e8ad415b7a55cb9a9fbfc04696518d5ea0b609b3` is the likely culprit. It introduces `card->managed` and the conditional check `if (!card->managed)` within `snd_card_do_free()`. The problem arises right here:

```c
	if (card->release_completion)
		complete(card->release_completion);
-	kfree(card);
+	if (!card->managed)
+		kfree(card);
```

The `complete()` call, which signals the completion of the release, *can* wake up the thread responsible for freeing the `card` structure, especially if it's managed using devres. The critical mistake is the subsequent access to `card->managed` *after* the `complete()` call. This leads to a Use-After-Free condition, precisely because the `card` structure might already be freed by devres at that point.

I've confirmed that `e8ad415b7a55` is the only commit that seems to have introduced this specific `if (!card->managed)` check directly after the `complete()` call. There are no other suspicious commits nearby.

Now, going back to the bug report, it's pretty clear: the bug surfaces when a sound card is devres managed (allocated using `snd_devm_card_new()`). These managed cards are allocated with `devres_alloc()`, and their release function, `__snd_card_release()`, calls `snd_card_free()`. The race condition manifests in `snd_card_do_free()` where:

```c
	if (card->release_completion)
		complete(card->release_completion); // [1] Wakes up the unbind thread
		
	if (!card->managed)                         // [2] UAF: card is freed by devres here
		kfree(card);
```

This perfectly lines up with the diff from `e8ad415b7a55`. So I'm feeling confident this is it. I'm going to run `set-results` with that commit ID to flag this as the likely root cause.



297/2 2026/08/13 19:55 tool set-results
0m Args:
map[FixesHash:e8ad415b7a55cb9a9fbfc04696518d5ea0b609b3]

Results:
map[FixesHash:e8ad415b7a55cb9a9fbfc04696518d5ea0b609b3]

298/1 2026/08/13 19:55 action format-fixes
0m Results:
map[Fixes:map[AuthorEmail:tiwai@suse.de AuthorName:Takashi Iwai Hash:e8ad415b7a55cb9a9fbfc04696518d5ea0b609b3 Title:ALSA: core: Add managed card creation]]

299/1 2026/08/13 19:55 action get-maintainers
0m Results:
map[Recipients:[map[Email:broonie@kernel.org Name:Mark Brown To:false] map[Email:cassiogabrielcontato@gmail.com Name:CΓ‘ssio Gabriel To:false] map[Email:cezary.rojewski@intel.com Name:Cezary Rojewski To:false] map[Email:kees@kernel.org Name:Kees Cook To:false] map[Email:linux-kernel@vger.kernel.org Name: To:false] map[Email:linux-sound@vger.kernel.org Name: To:true] map[Email:perex@perex.cz Name:Jaroslav Kysela To:true] map[Email:tiwai@suse.com Name:Takashi Iwai To:true] map[Email:tiwai@suse.de Name:Takashi Iwai To:true]]]

300/1 2026/08/13 19:55 action get-recent-commits
0m Results:
map[RecentCommits:ALSA: core: Fix unintuitive behavior of snd_power_ref_and_wait()
ALSA: core: Use the new helper for the power refcount
ALSA: core: Use flexible array for card private data
ALSA: control: Verify put() result when in debug mode
Convert 'alloc_obj' family to use the new default GFP_KERNEL argument
treewide: Replace kmalloc with kmalloc_obj for non-scalar types
ALSA: core: Copy string more safely
ALSA: core: add isascii() check to card ID generator
ALSA: control: Rename ctl_files_rwlock to controls_rwlock
ALSA: core: Remove debugfs at disconnection
ALSA: core: Enable proc module when CONFIG_MODULES=y
ALSA: core: Fix NULL module pointer assignment at card init
ALSA: core: Remove superfluous CONFIG_PM
ALSA: Fix deadlocks with kctl removals at disconnection
ALSA: core: Use guard() for locking
ALSA: core: Use dev_name of card_dev as debugfs directory name
ALSA: core: Drop snd_device_initialize()
ALSA: core: Introduce snd_device_alloc()
sound: make all 'class' structures const
ALSA: core: Make snd_card_free() return void
]

301/1 2026/08/13 19:55 agent description-generator
0m Model:
best-expensive

Instruction:
You are an experienced Linux kernel developer tasked with writing a commit description for
a kernel bug fixing commit. The description should start with a one-line summary,
and then include description of the bug being fixed, and how it's fixed by the provided patch.
The one-line summary should describe the change being made, rather than mention the tool that
detected the bug.

The description must not contain lines starting with '#' because they will dropped by git as comments.
The description must not contain lines starting with '--' or '---' (including inline code diffs)
because they may confuse git/patch utilities.

Your final reply should contain only the text of the commit description.


The one-line summary must be not longer than 72 characters.

IMPORTANT: Do not wrap lines manually (e.g., at 80 characters); we will reformat the text
automatically, so keep paragraphs as single lines without newlines.

Generally try to phrase the description without mentioning syzkaller
(avoid phrases like "the bug was triggered by syzkaller" or "the bug was triggered by fuzzer", etc).
How the bug was triggered is generally an irrelevant detail.
Any bug triggered by a fuzzer can also be triggered by a malicious user, or a buggy program.

If the crash is reported by a sanitizer (e.g., KASAN, KMSAN, lockdep), include the relevant
parts of the sanitizer output to illustrate the problem. Exclude less relevant sections,
as the stack trace can be very long. Describe the execution path that leads to the manifestation
of the kernel bug.



Prefer calling several tools at the same time to save round-trips.

Prompt:
The crash that corresponds to the bug is:

==================================================================
BUG: KASAN: use-after-free in snd_card_do_free sound/core/init.c:604 [inline]
BUG: KASAN: use-after-free in release_card_device+0x1ab/0x1b0 sound/core/init.c:153
Read of size 1 at addr ffff8881912ec909 by task syz-executor130/5857

CPU: 0 UID: 0 PID: 5857 Comm: syz-executor130 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
Call Trace:
 <TASK>
 dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120
 print_address_description+0x55/0x1e0 mm/kasan/report.c:378
 print_report+0x58/0x70 mm/kasan/report.c:482
 kasan_report+0x117/0x150 mm/kasan/report.c:595
 snd_card_do_free sound/core/init.c:604 [inline]
 release_card_device+0x1ab/0x1b0 sound/core/init.c:153
 device_release+0xc4/0x1f0 drivers/base/core.c:-1
 kobject_cleanup lib/kobject.c:689 [inline]
 kobject_release lib/kobject.c:720 [inline]
 kref_put include/linux/kref.h:65 [inline]
 kobject_put+0x222/0x550 lib/kobject.c:737
 snd_card_file_remove+0x331/0x390 sound/core/init.c:1125
 snd_pcm_release+0x12c/0x160 sound/core/pcm_native.c:2986
 __fput+0x418/0xa50 fs/file_table.c:512
 fput_close_sync+0x11f/0x240 fs/file_table.c:617
 __do_sys_close fs/open.c:1511 [inline]
 __se_sys_close fs/open.c:1496 [inline]
 __x64_sys_close+0x7e/0x110 fs/open.c:1496
 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:0x7f87f11782de
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:00007f87f0915118 EFLAGS: 00000246 ORIG_RAX: 0000000000000003
RAX: ffffffffffffffda RBX: 00007f87f09156c0 RCX: 00007f87f11782de
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000008
RBP: 00007f87f11ecd40 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: ffffffffffffffd0
R13: 0000000000000002 R14: 00007ffe50e899e0 R15: 00007ffe50e89ac8
 </TASK>

The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1912ec
flags: 0x57ff00000000000(node=1|zone=2|lastcpupid=0x7ff)
raw: 057ff00000000000 ffffea0007e57308 ffff888138841440 0000000000000000
raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as freed
page last allocated via order 2, migratetype Unmovable, gfp_mask 0x40dc0(GFP_KERNEL|__GFP_ZERO|__GFP_COMP), pid 5852, tgid 5852 (syz-executor130), ts 71488546659, free_ts 71610399401
 set_page_owner include/linux/page_owner.h:32 [inline]
 post_alloc_hook+0x1f9/0x250 mm/page_alloc.c:1859
 prep_new_page mm/page_alloc.c:1867 [inline]
 get_page_from_freelist+0x21fa/0x2270 mm/page_alloc.c:3946
 __alloc_frozen_pages_noprof+0x18d/0x380 mm/page_alloc.c:5304
 alloc_pages_mpol+0x212/0x380 mm/mempolicy.c:2490
 ___kmalloc_large_node+0x4c/0x120 mm/slub.c:5274
 __kmalloc_large_node_noprof+0x18/0x90 mm/slub.c:5305
 __do_kmalloc_node mm/slub.c:5322 [inline]
 __kmalloc_node_track_caller_noprof+0x164/0x730 mm/slub.c:5471
 alloc_dr drivers/base/devres.c:141 [inline]
 __devres_alloc_node+0x4c/0x160 drivers/base/devres.c:189
 snd_devm_card_new+0x84/0x160 sound/core/init.c:235
 loopback_probe+0x150/0x13d0 sound/drivers/aloop.c:1805
 platform_probe+0xf9/0x190 drivers/base/platform.c:1439
 call_driver_probe drivers/base/dd.c:-1 [inline]
 really_probe+0x254/0xae0 drivers/base/dd.c:706
 __driver_probe_device+0x1e8/0x360 drivers/base/dd.c:868
 device_driver_attach+0xe0/0x1d0 drivers/base/dd.c:1203
 bind_store+0x1d0/0x220 drivers/base/bus.c:267
 kernfs_fop_write_iter+0x3a4/0x540 fs/kernfs/file.c:345
page last free pid 5856 tgid 5852 stack trace:
 reset_page_owner include/linux/page_owner.h:25 [inline]
 __free_pages_prepare mm/page_alloc.c:1406 [inline]
 __free_frozen_pages+0xc1e/0xd10 mm/page_alloc.c:2950
 free_node drivers/base/devres.c:50 [inline]
 release_nodes drivers/base/devres.c:547 [inline]
 devres_release_all+0x1ce/0x260 drivers/base/devres.c:576
 device_unbind_cleanup drivers/base/dd.c:597 [inline]
 __device_release_driver drivers/base/dd.c:1354 [inline]
 device_release_driver_internal+0x5d9/0x880 drivers/base/dd.c:1372
 unbind_store+0x1a1/0x1d0 drivers/base/bus.c:244
 kernfs_fop_write_iter+0x3a4/0x540 fs/kernfs/file.c:345
 new_sync_write fs/read_write.c:595 [inline]
 vfs_write+0x612/0xba0 fs/read_write.c:687
 ksys_write+0x150/0x270 fs/read_write.c:739
 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

Memory state around the buggy address:
 ffff8881912ec800: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 ffff8881912ec880: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>ffff8881912ec900: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
                      ^
 ffff8881912ec980: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 ffff8881912eca00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
==================================================================




The explanation of the root cause of the bug is:

An analysis of the crash report and the ALSA core source code reveals a classic Use-After-Free (UAF) caused by a race condition between the sound card release process and the devres (device resource management) cleanup.

### Root Cause Analysis

The bug occurs when a sound card is managed by devres (allocated via `snd_devm_card_new()`). For managed cards, the memory is allocated using `devres_alloc()`, and its release function is set to `__snd_card_release()`, which simply calls `snd_card_free()`.

When the device is unbound (e.g., via sysfs) while a user-space application still holds an open file descriptor to the sound card, the following sequence of events leads to the UAF:

1. **Unbind Thread (PID 5856):** The driver is unbound, triggering `devres_release_all()`. The devres core calls the release callback `__snd_card_release()`, which in turn calls `snd_card_free()`.
2. **Unbind Thread:** `snd_card_free()` calls `snd_card_free_when_closed()`, which drops a reference to the card's device (`card->card_dev`). However, because the user thread still has an open file descriptor, the reference count does not reach zero.
3. **Unbind Thread:** `snd_card_free()` then blocks on `wait_for_completion(&released)`, waiting for all references to be dropped.
4. **User Thread (PID 5857):** The user-space application closes the sound device file descriptor (`sys_close`). `snd_card_file_remove()` drops the final reference to `card->card_dev`.
5. **User Thread:** The reference count reaches zero, invoking the device release callback `release_card_device()`, which calls `snd_card_do_free()`.
6. **User Thread:** `snd_card_do_free()` performs cleanup and calls `complete(card->release_completion)`.
7. **Unbind Thread:** Wakes up from `wait_for_completion()`, returns from `snd_card_free()`, and then returns from `__snd_card_release()`.
8. **Unbind Thread:** The devres core (`release_nodes()`) immediately calls `free_node()`, which frees the memory block containing the `snd_card` structure.
9. **User Thread:** Meanwhile, `snd_card_do_free()` continues execution and evaluates `if (!card->managed)`. It reads the `managed` boolean from the `snd_card` structure that was just freed by the unbind thread, triggering the KASAN Use-After-Free.

### Code Walkthrough

The race condition manifests at the very end of `snd_card_do_free()` in `sound/core/init.c`:

```c
static int snd_card_do_free(struct snd_card *card)
{
	card->releasing = true;
	// ... cleanup ...
	
	if (card->release_completion)
		complete(card->release_completion); // [1] Wakes up the unbind thread
		
	if (!card->managed)                         // [2] UAF: card is freed by devres here
		kfree(card);
	return 0;
}
```
At `[1]`, the `complete()` call unblocks the unbind thread waiting in `snd_card_free()`. The unbind thread immediately proceeds to free the `card` memory via devres. By the time the user thread reaches `[2]`, `card` has already been freed, and reading `card->managed` (a 1-byte read at offset 2257) triggers the KASAN bug.

### Proposed Fix

To fix this, the value of `card->managed` must be read and stored in a local variable *before* calling `complete()`. Once `complete()` is called, the `card` pointer must no longer be dereferenced if it is managed by devres.

```c
static int snd_card_do_free(struct snd_card *card)
{
	bool managed = card->managed; // Cache the value before completion

	card->releasing = true;
	// ... existing cleanup code ...
	
	if (card->release_completion)
		complete(card->release_completion);
		
	if (!managed) // Safely use the cached value
		kfree(card);
		
	return 0;
}
```

The diff of the bug fix is:

diff --git a/sound/core/init.c b/sound/core/init.c
index 56dde5bd7..577338526 100644
--- a/sound/core/init.c
+++ b/sound/core/init.c
@@ -584,6 +584,8 @@ EXPORT_SYMBOL_GPL(snd_card_disconnect_sync);
 
 static int snd_card_do_free(struct snd_card *card)
 {
+	bool managed = card->managed;
+
 	card->releasing = true;
 #if IS_ENABLED(CONFIG_SND_MIXER_OSS)
 	if (snd_mixer_oss_notify_callback)
@@ -601,7 +603,7 @@ static int snd_card_do_free(struct snd_card *card)
 	}
 	if (card->release_completion)
 		complete(card->release_completion);
-	if (!card->managed)
+	if (!managed)
 		kfree(card);
 	return 0;
 }


Additional description of the patch:

An analysis of the crash report and the ALSA core source code confirms a Use-After-Free (UAF) caused by a race condition between the sound card release process and the devres (device resource management) cleanup.

### Root Cause Analysis

The bug occurs when a sound card is managed by devres (allocated via `snd_devm_card_new()`). For managed cards, the memory is allocated using `devres_alloc()`, and its release function is set to `__snd_card_release()`, which simply calls `snd_card_free()`.

When the device is unbound (e.g., via sysfs) while a user-space application still holds an open file descriptor to the sound card, the following sequence of events leads to the UAF:

1. **Unbind Thread:** The driver is unbound, triggering `devres_release_all()`. The devres core calls the release callback `__snd_card_release()`, which in turn calls `snd_card_free()`.
2. **Unbind Thread:** `snd_card_free()` calls `snd_card_free_when_closed()`, which drops a reference to the card's device (`card->card_dev`). However, because the user thread still has an open file descriptor, the reference count does not reach zero.
3. **Unbind Thread:** `snd_card_free()` then blocks on `wait_for_completion(&released)`, waiting for all references to be dropped.
4. **User Thread:** The user-space application closes the sound device file descriptor (`sys_close`). `snd_card_file_remove()` drops the final reference to `card->card_dev`.
5. **User Thread:** The reference count reaches zero, invoking the device release callback `release_card_device()`, which calls `snd_card_do_free()`.
6. **User Thread:** `snd_card_do_free()` performs cleanup and calls `complete(card->release_completion)`.
7. **Unbind Thread:** Wakes up from `wait_for_completion()`, returns from `snd_card_free()`, and then returns from `__snd_card_release()`.
8. **Unbind Thread:** The devres core (`release_nodes()`) immediately calls `free_node()`, which frees the memory block containing the `snd_card` structure.
9. **User Thread:** Meanwhile, `snd_card_do_free()` continues execution and evaluates `if (!card->managed)`. It reads the `managed` boolean from the `snd_card` structure that was just freed by the unbind thread, triggering the KASAN Use-After-Free.

### Fix

To fix this, the value of `card->managed` must be read and stored in a local variable *before* calling `complete()`. Once `complete()` is called, the `card` pointer must no longer be dereferenced if it is managed by devres.

I have applied the following patch to `sound/core/init.c`:

```diff
--- a/sound/core/init.c
+++ b/sound/core/init.c
@@ -585,6 +585,8 @@ EXPORT_SYMBOL_GPL(snd_card_disconnect_sync);
 
 static int snd_card_do_free(struct snd_card *card)
 {
+	bool managed = card->managed;
+
 	card->releasing = true;
 #if IS_ENABLED(CONFIG_SND_MIXER_OSS)
 	if (snd_mixer_oss_notify_callback)
@@ -602,7 +604,7 @@ static int snd_card_do_free(struct snd_card *card)
 	}
 	if (card->release_completion)
 		complete(card->release_completion);
-	if (!card->managed)
+	if (!managed)
 		kfree(card);
 	return 0;
 }
```

### Additional Checks

I have also checked if there are other places in the ALSA core where a similar use-after-free might happen after calling `complete()`. `snd_card_do_free()` is the only place in the ALSA core (`sound/core/`) where `complete()` is called. `card->release_completion` is the only `struct completion` instance present in ALSA core structures. Therefore, this is a localized issue and the fix is sufficient.

Here are summaries of recent commits that touched the same files.
Format the summary line consistently with these, look how prefixes
are specified, letter capitalization, style, etc. 

ALSA: core: Fix unintuitive behavior of snd_power_ref_and_wait()
ALSA: core: Use the new helper for the power refcount
ALSA: core: Use flexible array for card private data
ALSA: control: Verify put() result when in debug mode
Convert 'alloc_obj' family to use the new default GFP_KERNEL argument
treewide: Replace kmalloc with kmalloc_obj for non-scalar types
ALSA: core: Copy string more safely
ALSA: core: add isascii() check to card ID generator
ALSA: control: Rename ctl_files_rwlock to controls_rwlock
ALSA: core: Remove debugfs at disconnection
ALSA: core: Enable proc module when CONFIG_MODULES=y
ALSA: core: Fix NULL module pointer assignment at card init
ALSA: core: Remove superfluous CONFIG_PM
ALSA: Fix deadlocks with kctl removals at disconnection
ALSA: core: Use guard() for locking
ALSA: core: Use dev_name of card_dev as debugfs directory name
ALSA: core: Drop snd_device_initialize()
ALSA: core: Introduce snd_device_alloc()
sound: make all 'class' structures const
ALSA: core: Make snd_card_free() return void


Reply:
ALSA: core: Fix use-after-free in snd_card_do_free()

A use-after-free was detected in snd_card_do_free() when a sound card
managed by devres is unbound while a user-space application still holds an
open file descriptor.

For managed cards, the memory is allocated using devres_alloc(), and its
release function is set to __snd_card_release(), which calls
snd_card_free(). When the device is unbound, the unbind thread calls
snd_card_free(), which drops a reference to the card's device. If the user
thread still has an open file descriptor, the reference count does not
reach zero, and the unbind thread blocks on wait_for_completion(&released).

When the user thread closes the file descriptor, it drops the final
reference, invoking the device release callback release_card_device(),
which calls snd_card_do_free(). snd_card_do_free() performs cleanup and
calls complete(card->release_completion). This wakes up the unbind thread,
which returns from snd_card_free() and __snd_card_release(). The devres
core then immediately frees the memory block containing the snd_card
structure.

Meanwhile, the user thread continues execution in snd_card_do_free() and
evaluates `if (!card->managed)`. It reads the `managed` boolean from the
snd_card structure that was just freed by the unbind thread, triggering a
KASAN use-after-free.

Fix this by caching the value of card->managed in a local variable before
calling complete(). This ensures that the card pointer is not dereferenced
after the unbind thread has been woken up and potentially freed the card.

BUG: KASAN: use-after-free in snd_card_do_free sound/core/init.c:604
[inline]
BUG: KASAN: use-after-free in release_card_device+0x1ab/0x1b0
sound/core/init.c:153
Read of size 1 at addr ffff8881912ec909 by task syz-executor130/5857

Call Trace:
 <TASK>
 dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120
 print_address_description+0x55/0x1e0 mm/kasan/report.c:378
 print_report+0x58/0x70 mm/kasan/report.c:482
 kasan_report+0x117/0x150 mm/kasan/report.c:595
 snd_card_do_free sound/core/init.c:604 [inline]
 release_card_device+0x1ab/0x1b0 sound/core/init.c:153
 device_release+0xc4/0x1f0 drivers/base/core.c:-1
 kobject_cleanup lib/kobject.c:689 [inline]
 kobject_release lib/kobject.c:720 [inline]
 kref_put include/linux/kref.h:65 [inline]
 kobject_put+0x222/0x550 lib/kobject.c:737
 snd_card_file_remove+0x331/0x390 sound/core/init.c:1125
 snd_pcm_release+0x12c/0x160 sound/core/pcm_native.c:2986
 __fput+0x418/0xa50 fs/file_table.c:512
 fput_close_sync+0x11f/0x240 fs/file_table.c:617
 __do_sys_close fs/open.c:1511 [inline]
 __se_sys_close fs/open.c:1496 [inline]
 __x64_sys_close+0x7e/0x110 fs/open.c:1496
 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
 </TASK>

302/2 2026/08/13 19:55 llm description-generator
0m Model:
gemini-3.1-pro-preview

Tokens:
							input: 9454
							output: 1030
							thoughts: 5075
						

Thoughts:
**ALSA: core: Fix for a subtle Use-After-Free in snd_card_do_free()**

Alright, let's break down this ALSA kernel bug fix. I've got a Use-After-Free in `snd_card_do_free` to deal with, a classic concurrency issue. It stems from a race condition between the sound card's release process and devres cleanup. Specifically, it involves a scenario where a sound card managed by `devres` is being unbound, but a user-space application still has a hold on an open file descriptor for that card.

Essentially, when a sound card is managed by `devres`, its memory is handled by `devres_alloc` and deallocated by `__snd_card_release`, eventually calling `snd_card_free`. When the device unbinds, `snd_card_free` is called in an unbind thread, which drops a reference. The unbind thread then blocks, waiting for the release to complete. If a user-space application has an open file descriptor to the sound card, the reference count keeps it alive, and the unbind thread blocks on `wait_for_completion(&released)`.

The crucial bit: When the user-space application closes its file descriptor, that final reference is dropped, triggering `release_card_device()` and subsequently `snd_card_do_free()`.  `snd_card_do_free()` calls `complete(card->release_completion)` to wake up the unbind thread. The unbind thread then continues, freeing the card memory via devres.

Here's the problem: *Meanwhile*, the user thread within `snd_card_do_free()` continues execution and reads `card->managed`. Since the unbind thread has already freed the card memory, this read results in a KASAN Use-After-Free. It is a textbook race.

The fix, therefore, is straightforward: cache the value of `card->managed` in a local variable *before* calling `complete()`. This ensures that any subsequent access to `card->managed` uses the cached value, preventing the read of freed memory.

Here's the relevant KASAN report, which I have pared down:

```
BUG: KASAN: use-after-free in snd_card_do_free sound/core/init.c:604 [inline]
BUG: KASAN: use-after-free in release_card_device+0x1ab/0x1b0 sound/core/init.c:153
Read of size 1 at addr ffff8881912ec909 by task syz-executor130/5857

Call Trace:
 <TASK>
 dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120
 print_address_description+0x55/0x1e0 mm/kasan/report.c:378
 print_report+0x58/0x70 mm/kasan/report.c:482
 kasan_report+0x117/0x150 mm/kasan/report.c:595
 snd_card_do_free sound/core/init.c:604 [inline]
 release_card_device+0x1ab/0x1b0 sound/core/init.c:153
 device_release+0xc4/0x1f0 drivers/base/core.c:-1
 kobject_cleanup lib/kobject.c:689 [inline]
 kobject_release lib/kobject.c:720 [inline]
 kref_put include/linux/kref.h:65 [inline]
 kobject_put+0x222/0x550 lib/kobject.c:737
 snd_card_file_remove+0x331/0x390 sound/core/init.c:1125
 snd_pcm_release+0x12c/0x160 sound/core/pcm_native.c:2986
 __fput+0x418/0xa50 fs/file_table.c:512
 fput_close_sync+0x11f/0x240 fs/file_table.c:617
 __do_sys_close fs/open.c:1511 [inline]
 __se_sys_close fs/open.c:1496 [inline]
 __x64


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)