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

 
 

bug #28101: open_file / dentry_read failure handling is problematic

Submitter:  None
Submitted:  Thu 26 Nov 2009 02:28:33 PM UTC
   
 
Status:  None Assigned to:  ogman
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

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>
Group administrator
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>
Group administrator
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 Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2010-01-01 ogman Assigned toNone ogman
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code