Re: [PATCH bpf v2] selftests/bpf: Add timer lockup selftest

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

 



On 7/11/24 7:27 AM, Kumar Kartikeya Dwivedi wrote:
Add a selftest that tries to trigger a situation where two timer
callbacks are attempting to cancel each other's timer. By running them
continuously, we hit a condition where both run in parallel and cancel
each other. Without the fix in the previous patch, this would cause a
lockup as hrtimer_cancel on either side will wait for forward progress
from the callback.

Ensure that this situation leads to a EDEADLK error.

Signed-off-by: Kumar Kartikeya Dwivedi <memxor@xxxxxxxxx>
---
Changelog:
  * Add missing timer_lockup__destroy.
  * Fix inline declarations (Alexei).
  * Shorten pthread_create line (Alexei).
  * Fix type of map value parameter to time cb (Alexei).
  * Add a counter to skip test if race does not reproduce (Alexei).

Did some small cleanups while applying, and ran several times w/o issues.
Applied, thanks Kumar!




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux