Page MenuHomeFreeBSD

bxe_free_fp_buffers: Take TX lock to access tx_br.
AbandonedPublic

Authored by cse_cem_gmail_com on Jun 22 2015, 5:05 PM.

Details

Reviewers
None
Summary

Submitted by: Attilio Rao

Diff Detail

Repository
rS FreeBSD src repository
Lint
Lint OK
Unit
No Unit Test Coverage

Event Timeline

cse_cem_gmail_com retitled this revision from to bxe_free_fp_buffers: Take TX lock to access tx_br..
cse_cem_gmail_com updated this object.
cse_cem_gmail_com edited the test plan for this revision. (Show Details)
cse_cem_gmail_com added subscribers: benno, bdrewery.
markj added inline comments.
sys/dev/bxe/bxe.c
6552

On line 6593 we destroy fp->tx_mtx only if mtx_initialized(&fp->tx_mtx) is true. Can this function actually be called before the lock is initialized?

sys/dev/bxe/bxe.c
6552

Sigh. Yes.

Any error in bxe_nic_load before bxe_nic_init() (this is where tx_mtx is initialized) on line 12953 -> bxe_nic_load_errorN -> bxe_free_fp_buffers() can reach this point with an uninitialized mtx.

This should be looked at by davidcs@. I'm going to email him to see if I can get him signed up for Phabricator.

In D2883#55943, @benno wrote:

This should be looked at by davidcs@. I'm going to email him to see if I can get him signed up for Phabricator.

I've already emailed him. :)

Fixed in r284739, discarding this review.