[OpenAFS] open/free imbalance

Marc Dionne marc.c.dionne@gmail.com
Mon, 23 Nov 2009 09:25:34 -0500

On Mon, Nov 23, 2009 at 3:52 AM, Frank Burkhardt <fbo2@gmx.net> wrote:
> Hello everyone,
> to prevent security issues, I upgraded to a more recent kernel. It's
> - without any patches from kernel.org. Since I'm using that kern=
> with openafs 1.4.11 (actually it's Russ Allbery's Debian package, version
> 1.4.11+dfsg-5), my kernel prints out lots of lines like this:
> =A0ima_file_free: V9356 open/free imbalance (r:0 w:-21 o:-21 f:0)

I don't think IMA is enabled on your typical distro kernel, so the
combination of AFS and IMA probably has had very little testing.  Is
it intentional that you have it enabled in your kernel .config?

It may be that it's exposing a bug, but off hand I'm guessing  that
the way we're opening cache files (with dentry_open) bypasses IMA's
accounting.  I see that nfsd for instance always calls
ima_counts_get() after opening a file with dentry_open - we would
probably need to do the same thing to keep IMA happy.