[lustre-devel] [PATCH 19/21] lustre: obdclass: avoid races in class_register_type()

Andreas Dilger adilger at whamcloud.com
Thu Feb 7 22:41:14 PST 2019


On Feb 6, 2019, at 17:03, NeilBrown <neilb at suse.com> wrote:
> 
> If there are two parallel attempts to register the
> same class name, it could get registered twice.
> So re-check after allocation to make sure the name is
> still unique.

The patch itself seems reasonable, but I don't see how this
scenario could ever happen?  class_register_type() is only
called once per device type from the module init code, and
I don't think it is possible to insert the same module twice?

Cheers, Andreas
---
Andreas Dilger
Principal Lustre Architect
Whamcloud









More information about the lustre-devel mailing list