Re: [PATCH] fs/compat.c: rwsem instead of BKL aroundioctl32_hash_table

From: Roland Dreier
Date: Thu Sep 02 2004 - 17:40:09 EST


Andi> It does not make much sense because the ioctl will take the
Andi> BKL anyways.

True, but it seems pretty ugly to protect the ioctl32 hash with the
BKL. I think the greater good of reducing use of the BKL should be
looked at.

Andi> If you wanted to fix it properly better make it use RCU -
Andi> but it cannot work for the case of calling a compat handler.

I'm not sure I follow what you're saying. When I looked at this, at
first I thought RCU would be better for the hash lookup, but I didn't
see a way to prevent a compat handler from being removed while it was
running. That's why I moved to a semaphore, which would hold off the
removal until the handler was done running. Is this what you mean?
Do you see a way to use RCU here?

Thanks,
Roland

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/