Re: [uml-devel] [PATCH] UML - Correctly handle skb allocation failures

2007-09-27 Thread Jeff Dike
On Thu, Sep 27, 2007 at 04:53:40PM -0700, Andrew Morton wrote: > Still wanna know why it is safe for uml_net_rx to be playing with > drop_skb when update_drop_skb() could be concurrently reallocating > and freeing it. Ah, yes, I missed that point in the horror of my botch last night. I'll add irq

Re: [uml-devel] [PATCH] UML - Correctly handle skb allocation failures

2007-09-27 Thread Andrew Morton
On Thu, 27 Sep 2007 13:01:26 -0400 Jeff Dike <[EMAIL PROTECTED]> wrote: > +static int update_drop_skb(int max) > +{ > + struct sk_buff *new; > + int err = 0; > + > + spin_lock(&drop_lock); > + > + if (max <= drop_max) > + goto out; > + > + err = -ENOMEM; > + new

[uml-devel] [PATCH] make UML call dentry_open() with a valid vfsmount

2007-09-27 Thread Dave Hansen
I'm trying to enforce the convention that you may not call dentry_open() with a NULL vfsmount. This is so that the r/o bind mount patches can consistenty acquire write access to the mounts there. This patch fixes up UML's HPPFS to track both the vfsmount and the dentry for its files. Compile, b

[uml-devel] [PATCH] UML - Correctly handle skb allocation failures

2007-09-27 Thread Jeff Dike
Handle memory allocation failures when reading packets. We have to read something from the host, even if we can't allocate any memory. If we don't, the host side of the device may fill up and stop delivering interrupts because no new packets can be queued. A single sk_buff is allocated whenever