Re: [RFC/PATCH] revoke/frevoke system calls V2

From: Edgar Toernig
Date: Wed Aug 09 2006 - 16:05:52 EST


Pekka Enberg wrote:
>
> I'll put them on my todo and in the meanwhile, you can find the latest
> patches here:
> http://www.kernel.org/pub/linux/kernel/people/penberg/patches/revoke/
>
> Thanks for taking the time to review the patch!

+ retry:
+ if (signal_pending(current)) {
+ err = -ERESTARTSYS;
+ goto out;
+ }
+
+ to_close = alloc_revoke_table(inode, to_exclude, &max_fds);
+ if (!to_close) {
+ err = -ENOMEM;
+ goto out;
+ }
+
+ read_lock(&tasklist_lock);
+
+ /*
+ * If someone forked while we were allocating memory, try again.
+ */
+ if (inode_fds(inode, to_exclude) > max_fds) {
+ read_unlock(&tasklist_lock);
+ goto retry;
+ }

It seems, the retry is leaking the to_close table.

Ciao, ET.
-
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/