HomeFreeBSD

Relax per-ifnet cif_vrs list double locking in carp(4).

Description

Relax per-ifnet cif_vrs list double locking in carp(4).

In all cases where cif_vrs list is modified, two locks are held: per-ifnet
CIF_LOCK and global carp_sx. It means to read that list only one of them
is enough to be held, so we can skip CIF_LOCK when we already have carp_sx.

This fixes kernel panic, caused by attempts of copyout() to sleep while
holding non-sleepable CIF_LOCK mutex.

Discussed with: glebius
MFC after: 2 weeks
Sponsored by: iXsystems, Inc.

Details

Provenance
mavAuthored on
Parents
rS324751: MFC r324590: i2c(8): clean up and clarify read operation
Branches
Unknown
Tags
Unknown