Page MenuHomeFreeBSD

[ppc64] llan: fix fatal kernel trap when system is low on memory
ClosedPublic

Authored by luporl on Feb 5 2019, 11:11 AM.

Details

Summary

When running several builders in parallel, on QEMU, with 8GB of
memory, a fatal kernel trap (0x300 (data storage interrupt))
caused by llan driver is sometimes observed, when the system
starts to run out of swap space.

This happens because, at llan_intr(), a phyp call to add a
logical LAN buffer is always made when llan_add_rxbuf() fails,
even if it fails to allocate a new buffer.

PR 235489

Test Plan

Running several memory hungry processes that causes the system
to run out of swap space, while using the network card, was
usually enough to reproduce this issue within a few minutes.
After this change, the system ran for several hours in this
scenario and no crash was observed.

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

luporl created this revision.Feb 5 2019, 11:11 AM
jhibbits accepted this revision.Feb 5 2019, 4:13 PM

This looks like a correctness fix, too. I don't think we should be calling that on an error anyway.

This revision is now accepted and ready to land.Feb 5 2019, 4:13 PM
This revision was automatically updated to reflect the committed changes.