Page MenuHomeFreeBSD

ipfw: Don't rollback state in alloc_table_vidx() if atomicity is not required.
ClosedPublic

Authored by nc on Dec 3 2019, 11:27 PM.
Tags
None
Referenced Files
F103508835: D22662.diff
Mon, Nov 25, 9:46 PM
Unknown Object (File)
Sun, Nov 24, 4:09 PM
Unknown Object (File)
Sun, Nov 24, 4:07 PM
Unknown Object (File)
Wed, Nov 20, 8:06 PM
Unknown Object (File)
Wed, Nov 6, 1:51 AM
Unknown Object (File)
Fri, Nov 1, 2:53 AM
Unknown Object (File)
Oct 20 2024, 10:46 AM
Unknown Object (File)
Oct 10 2024, 11:05 AM

Details

Summary

ipfw: Don't rollback state in alloc_table_vidx() if atomicity is not required.

Submitted by: Neel Chauhan <neel AT neelc DOT org>

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

nc retitled this revision from Don't rollback state in alloc_table_vidx() if atomicity is not required. to ipfw: Don't rollback state in alloc_table_vidx() if atomicity is not required..Dec 3 2019, 11:28 PM
nc edited the summary of this revision. (Show Details)

Thank you for submitting the patch!

Looks good, please see some comments inline.

sys/netpfil/ipfw/ip_fw_table.c
663

Could you please verify this is safe to insert the record w/o having a properly-linked value for this entry?
If yes, could you please add some comments on such input here?

sys/netpfil/ipfw/ip_fw_table_value.c
425–426

Could you please verify that failed-to-be-added values are freed properly & update the comment wording to account for this use case?

Here are the comments. Sorry if they aren't perfect.

Would it be possible to provide details on testing these changes?

ip_fw_table.c
660 ↗(On Diff #65239)

So what will be the state of the system after executing this line for the item without valid value index?

sys/netpfil/ipfw/ip_fw_table.c
657

Would it be possible if you could format the comment according to the style(9)?
Why XXX?

Fixed the comment. Sorry about that.

I also realized the XXX was unnecessary, so fixed that also.

This revision is now accepted and ready to land.Dec 9 2019, 10:16 PM