Re: ipsec tdb walk

2021-12-19 Thread Vitaliy Makkoveev
On Sat, Dec 18, 2021 at 01:07:00AM +0100, Alexander Bluhm wrote: > Hi, > > There are occasions where the walker in tdb_walk() might sleep. > Case SADB_DUMP is such a case. And mvs@ has a diff that sleeps to > read the counters. So holding the tdb_sadb_mtx() when calling > walker() is not allowed

ipsec tdb walk

2021-12-17 Thread Alexander Bluhm
Hi, There are occasions where the walker in tdb_walk() might sleep. Case SADB_DUMP is such a case. And mvs@ has a diff that sleeps to read the counters. So holding the tdb_sadb_mtx() when calling walker() is not allowed. Move the TDB from the TDB-Hash to a list that is protected by netlock. Th

ipsec tdb walk lock order

2021-10-26 Thread Alexander Bluhm
Hi, There is an lock ordering problem with the new tdb_sadb_mtx mutex. panic: acquiring blockable sleep lock with spinlock or critical section h eld (kernel_lock) &kernel_lock Stopped at db_enter+0x4: popl%ebp TIDPIDUID PRFLAGS PFLAGS CPU COMMAND *270299 46739