Don't think so.
That lock protects the global list of registered formats only. Because we
have a ref against the format's underlying module when that lock is dropped,
the module cannot be unloaded and nobody can unregister the format. Hence
the thing at *fmt is stable, and reading fmt->next after retaking the lock is
safe.
The particular piece of code you quote would be buggy if it continued
to go around the loop and again used fmt->next. But it will unconditionally
return after performing the put_binfmt() call.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/