mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mimi Zohar <zohar@linux.vnet.ibm.com>
To: Thomas Meyer <thomas@m3y3r.de>
Cc: Eric Paris <eparis@redhat.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Mimi Zohar <zohar@us.ibm.com>, James Morris <jmorris@namei.org>,
	"dri-devel@lists.sourceforge.net"
	<dri-devel@lists.sourceforge.net>
Subject: Re: 2.6.34-rc2: "ima_dec_counts: open/free imbalance"?
Date: Mon, 12 Apr 2010 07:27:00 -0400	[thread overview]
Message-ID: <1271071620.3125.30.camel@localhost.localdomain> (raw)
In-Reply-To: <25D576C5-F4E5-49BF-A20C-361214155BBA@m3y3r.de>

On Thu, 2010-04-01 at 20:17 +0200, Thomas Meyer wrote:
> Am 01.04.2010 um 04:41 schrieb Eric Paris <eparis@redhat.com>:
> 
> > On Wed, 2010-03-31 at 16:32 -0700, Andrew Morton wrote:
> >> On Sun, 28 Mar 2010 13:31:49 +0200
> >> Thomas Meyer <thomas@m3y3r.de> wrote:
> >>
> >>> This warning/error/notice is new in 2.6.34-rc2+:
> >>
> >> Let's add some cc's.  It might be a DRM bug.
> >>
> >> I'll ask Rafael and Maciej to track this as a post-2.6.33 regression,
> >> thanks.
> >
> > The IMA code hasn't changed since .33 so my guess is something new the
> > drm code is doing with obj->filp.
> >
> > Thomas, any idea what the newest kernel was that didn't show you this
> > problem?
> 
> I first saw this message in 2.6.34-rc2 (+free_init_pages patch), but  
> that was also the first bootable kernel for me as I was hit by the  
> NO_BOOTMEM bug...
> 
> >  It might help cut down my search in the morning....
> >
> > -Eric
> >

The call to shmem_file_setup() in drm_gem_object_alloc() should properly
increment the IMA counters and the fput() in
drm_gem_object_free_common() should decrement them.

I noticed the 'bump' comment in 'include/drm/drmP.h' doesn't match the
code, but in fact does the exact opposite.  Not sure if this is related.

static inline void
drm_gem_object_handle_unreference(struct drm_gem_object *obj)
{
        if (obj == NULL)
                return;

        /*
         * Must bump handle count first as this may be the last
         * ref, in which case the object would disappear before we
         * checked for a name
         */
        kref_put(&obj->handlecount, drm_gem_object_handle_free);
        drm_gem_object_unreference(obj);
}

Mimi


  reply	other threads:[~2010-04-12 11:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-28 11:31 Thomas Meyer
2010-03-31 23:32 ` Andrew Morton
2010-04-01  2:41   ` Eric Paris
2010-04-01 18:17     ` Thomas Meyer
2010-04-12 11:27       ` Mimi Zohar [this message]
2010-04-12 12:54   ` Daniel Vetter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1271071620.3125.30.camel@localhost.localdomain \
    --to=zohar@linux.vnet.ibm.com \
    --cc=akpm@linux-foundation.org \
    --cc=dri-devel@lists.sourceforge.net \
    --cc=eparis@redhat.com \
    --cc=jmorris@namei.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=thomas@m3y3r.de \
    --cc=zohar@us.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome