Re: [PATCH] one of $BIGNUM devfs races

Richard Gooch (rgooch@ras.ucalgary.ca)
Mon, 6 Aug 2001 17:50:46 -0600


Alexander Viro writes:
> OK, folks - that's it. By all reasonable standards a year
> _is_ sufficient time to fix an obvious race. One in
> devfs/base.c::create_entry() had been described to Richard more than
> a year ago. While I respect the "I'll do it myself, don't spoil the
> fun" stance, it's clearly over the bleedin' top. Patch for that one
> is in the end of posting. Linus, see if it looks sane for you.

Linus: please don't apply.
Alan: I notice you've put Al's patch into 2.4.7-ac8. Please remove it.

This patch has the following ugly construct:

> + /* Ensure table size is enough */
> + while (fs_info.num_inodes >= fs_info.table_size) {

Putting the allocation inside a while loop is horrible, and isn't a
perfect solution anyway. I'm fixing this (and other races) with proper
locking. If you went to the trouble to start patching, why at least
didn't you do it cleanly with a lock?

Furthermore, the patch makes gratuitous formatting changes (which made
it harder to see what it actually *changed*).

Regards,

Richard....
Permanent: rgooch@atnf.csiro.au
Current: rgooch@ras.ucalgary.ca
-
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/