Re: [PATCH] kunit: added lockdep support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Aug 10, 2020 at 09:32:57PM +0000, Uriel Guajardo wrote:
> +static inline void kunit_check_locking_bugs(struct kunit *test,
> +					    unsigned long saved_preempt_count)
> +{
> +	preempt_count_set(saved_preempt_count);
> +#ifdef CONFIG_TRACE_IRQFLAGS
> +	if (softirq_count())
> +		current->softirqs_enabled = 0;
> +	else
> +		current->softirqs_enabled = 1;
> +#endif
> +#if IS_ENABLED(CONFIG_LOCKDEP)
> +	local_irq_disable();
> +	if (!debug_locks) {
> +		kunit_set_failure(test);
> +		lockdep_reset();
> +	}
> +	local_irq_enable();
> +#endif
> +}

Unless you can guarantee this runs before SMP brinup, that
lockdep_reset() is terminally broken.



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux