bugDazuko - Bugs: bug #28101, open_file / dentry_read failure...

 
 

bug #28101: open_file / dentry_read failure handling is problematic

Submitted by:  None
Submitted on:  Thu 26 Nov 2009 02:28:33 PM UTC  
 
Status: NoneAssigned to: John Ogness <ogman>
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Sat 16 Oct 2010 04:28:31 PM UTC, comment #5:

The latest version (3.1.4-rc1) will abort the loop for all errors.

John Ogness <ogman>
Project AdministratorIn charge of this item.
Thu 18 Feb 2010 10:23:40 AM UTC, comment #4:

Unfortunately ENFILE isn't the only error that can happen,
the dentry_open will be validated by security hooks which
can result in various permanent errors.

I realise that restricting scanners this way is stupid,
but the current dazukofs behaviour of killing the system
isn't great either.

Anonymous
Fri 01 Jan 2010 03:43:28 PM UTC, comment #3:

3.1.3-rc1 was posted and addresses this issue.

John Ogness <ogman>
Project AdministratorIn charge of this item.
Mon 07 Dec 2009 09:04:26 AM UTC, comment #2:

The proposed fix might not be ideal, because it will result in an efault sent to the scanner, which will then stop scanning.
Rejecting the event and restarting the loop seems to be the best option.

Anonymous
Fri 27 Nov 2009 07:57:42 AM UTC, comment #1:

The following diff seems to do the trick:

--- event.c.orig 2009-11-27 08:55:27.000000000 +0100
+++ event.c 2009-11-27 08:56:34.000000000 +0100
@@ -1086,7 +1086,9 @@
*pid = pid_vnr(ec->event->proc_id);
break;
} else {
- unclaim_event(grp, ec);
+ ret = -EFAULT;
+ release_event(ec->event, 1, 1);
+ goto out;
}
}
}

Anonymous
Thu 26 Nov 2009 02:28:33 PM UTC, original submission:

The dazukofs_get_event routine uses open_file to prepare a filehandle for a group-member selected to handle a particular event. However the action taken when dentry_open fails is to return the event to the queue. If the dentry_open failure is persistent then this will result in a pretty tight loop of fetching / returning events, rendering the system unusable.

ret = open_file(ec);
if (ret == 0) {
*event_id = ec->event->event_id;
*fd = ec->fd;

/* set to 0 if not within namespace */
*pid = pid_vnr(ec->event->proc_id);
break;
} else {
/* XXX: problem */
unclaim_event(grp, ec);
}

A possible solution would be to release the event if
open_file fails.

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by ogman (Posted a comment)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 01 Jan 2010 03:43:28 PM UTCogmanAssigned toNone=>ogman
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1