Re: [PATCH]: Brown paper bag in fs/file.c?

From: David S. Miller
Date: Wed Sep 14 2005 - 14:58:29 EST


From: Dipankar Sarma <dipankar@xxxxxxxxxx>
Date: Thu, 15 Sep 2005 00:48:42 +0530

> __free_fdtable() is used only when the fdarray/fdset are vmalloced
> (use of the workqueue) or there is a race between two expand_files().
> That might be why we haven't seen this cause any explicit problem
> so far.
>
> This would be an appropriate patch - (untested). I will update
> as soon as testing is done.

Thanks.

I still can't figure out what causes my sparc64 bug. Somehow a
kmalloc() chunk of file pointers gets freed too early, the SLAB is
shrunk due to memory pressure so the page containing that object gets
freed, that page ends up as an anonymous page in userspace, but filp
writes from the older usage occurs and corrupts the page.

I wonder if we simply leave a stale pointer around to the older
fd array in some case.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/