On 9/10/05, Paul Menage <[EMAIL PROTECTED]> wrote:
> On 9/9/05, Gerrit Huizenga <[EMAIL PROTECTED]> wrote:
> >
> > Well, it looks like I need a little more than that; somehow your
> > patch is a little garbled with line wrapping and some ascii text
> > encoding and I'm too tired to see how to unwrap it cleanly.  Can
>
> That wasn't intended to be a submittable patch, just a "this fixes it
> for me". I'll fix it up with some of the other changes I proposed into
> a proper patch.

OK, see the attached patch for a fix for the oops due to accesses from
rcfs inodes, plus a fix that prevents new tasks from being added to a
dying class. (Patch header inline below)

Paul




Fix for oopsable race due to uncounted references in RCFS magic
files. This change:

1) adds a reference count to the core class for every reference stored
in an rcfs_inode_info structure, and drops the reference when the
inode is destroyed. This ensures that the core class persists for as
long as the inode is reachable.

2) removes the "delayed" field in ckrm_core_class and associated debug
printing, since this warning is guaranteed to be triggered by the new
refcounting behaviour.

3) adds a "dead" field to ckrm_core_class which is set to true when a
task class is marked for destruction; attempts to add a task to the
task class marked as "dead" are redirected to the parent class
instead.

4) explicitly associates the grab/drop of the refcount on a parent
class with the setting/clearing of the hnode.parent field in the child
class.

Signed-off-by: Paul Menage <[EMAIL PROTECTED]>
-------------

 fs/rcfs/dir.c           |    2 +-
 fs/rcfs/magic.c         |    1 +
 fs/rcfs/super.c         |    1 +
 include/linux/ckrm_rc.h |    3 +--
 kernel/ckrm/ckrm.c      |   26 ++++++--------------------
 kernel/ckrm/ckrm_tc.c   |   15 +++++++++++++++
 6 files changed, 25 insertions(+), 23 deletions(-)

Attachment: refcount.patch
Description: Binary data

Reply via email to