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

Roland Dreier
2004-09-02T22:35:15Z

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