[PATCH net-next] af_unix: fix a fatal race with bit fields

David Laight David.Laight at ACULAB.COM
Fri May 3 18:20:21 EST 2013


> Did someone fix btrfs, but not check other kernel locks?  Having now
> hit the same problem again, have you checked that other kernel locks
> don't have adjacent bit fields in the same 64-bit word?  And comment
> the struct to ensure someone doesn't optimize those unsigned chars
> back to bit fields.

Seems a good reason to have a general policy of not using
bit fields!

Separate char fields normally generate faster code - possibly
at the expense of an increase in the allocated size of a
structure.

	David




More information about the Linuxppc-dev mailing list