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
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

markj created this revision.Mar 30 2019, 5:48 PM
markj edited the test plan for this revision. (Show Details)Mar 30 2019, 5:48 PM
markj added reviewers: glebius, hselasky.
markj added a subscriber: emaste.
hselasky accepted this revision.Mar 30 2019, 6:57 PM

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
markj added a comment.Mar 30 2019, 8:00 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.

markj added inline comments.Apr 1 2019, 1:55 PM
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.
ae added a comment.EditedApr 1 2019, 4:07 PM

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

markj added a comment.Apr 1 2019, 4:30 PM
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.

markj added a comment.Apr 1 2019, 5:19 PM
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.