Page MenuHomeFreeBSD

Fix if_(m)addr_rlock() on stable/12.
ClosedPublic

Authored by markj on Mar 30 2019, 5:48 PM.

Details

Summary

This is an alternative to r340413 that does not break the KBI. We have
users hitting the bug on 12.0, and the patch D17996 solves the problem.

Test Plan

One stf(4) user was hitting memory corruption panics that have gone
away with this patch applied to stable/12.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

markj added reviewers: glebius, hselasky.
markj added a subscriber: emaste.

The patch technically looks good to me. Is this change for MFC only?

This revision is now accepted and ready to land.Mar 30 2019, 6:57 PM

The patch technically looks good to me. Is this change for MFC only?

My plan is to commit directly to stable/12 and request an EN for 12.0.

sys/net/if_var.h
385 ↗(On Diff #55624)

We have to replace these with padding to preserve the KBI.

This revision was automatically updated to reflect the committed changes.

Mark, do you suppose that this can fix some another strange panics that appeared after epochification?

In D19764#424043, @ae wrote:

Mark, do you suppose that this can fix some another strange panics that appeared after epochification?

It's hard to say without more info. The two cases I saw were indeed "strange": one panic in kevent, and one in the pfil hooks. Note that the problem applies only to stable/12, the bug has been fixed in head for a few months.

In D19764#424043, @ae wrote:

Mark, do you suppose that this can fix some another strange panics that appeared after epochification?

It's hard to say without more info. The two cases I saw were indeed "strange": one panic in kevent, and one in the pfil hooks. Note that the problem applies only to stable/12, the bug has been fixed in head for a few months.

Note, this was without INVARIANTS. With INVARIANTS enabled we saw an assertion failure in the epoch code.