Comment 11 for bug 329489

Revision history for this message
Domas Mituzas (domas-mituzas) wrote : Re: fcntl() locks on unlinked files leak memory in apparmor

OK, sorry folks for having too difficult start, I ended up with extremely simple testcase, leaking 100MB/s:

#include <fcntl.h>
#include <stdio.h>

main() {
    int fd = open("/tmp/.lockfile", O_RDWR | O_CREAT);
    unlink("/tmp/.lockfile");
    while (1) write(fd,"a",1);
}

I'm changing the issue summary yet again.