lkml.org 
[lkml]   [2004]   [Sep]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [discuss] Re: [PATCH] fs/compat.c: rwsem instead of BKL around ioctl32_hash_table
From
Date
    Andi> The BKL couldn't protect again removal of sleeping compat
Andi> handlers anyways because the BKL is dropped during a
Andi> schedule, and they all can sleep in user accesses. During
Andi> this scheduling window the module could be unloaded if its
Andi> count was zero. But with the assumption above this cannot
Andi> happen.

Andi> So basically the locking there is not to protect against
Andi> running handlers, just to ensure consistency during the list
Andi> walking. The list isn't touched anymore after the compat
Andi> handler runs, so the sleeping in there is no problem.

Andi> RCU could be used as well to protect the list because there
Andi> is no sleep involved.

OK, good point. My logic was wrong when I considered RCU. But now I
don't understand what you meant by "it cannot work" when you wrote
this in your previous email:

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.

Based on what you just wrote, it seems to me like RCU would actually
work fine. Is this wrong?

Thanks,
Roland
-
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/

\
 
 \ /
  Last update: 2005-03-22 14:05    [W:0.060 / U:0.656 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site