public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: "Winkler, Tomas" <tomas.winkler@intel.com>
Cc: "arnd@arndb.de" <arnd@arndb.de>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [char-misc-next V3] mei: add reference counting for me clients
Date: Thu, 6 Nov 2014 07:58:28 -0800	[thread overview]
Message-ID: <20141106155828.GA20182@kroah.com> (raw)
In-Reply-To: <5B8DA87D05A7694D9FA63FD143655C1B1C49677F@HASMSX106.ger.corp.intel.com>

On Thu, Nov 06, 2014 at 08:40:21AM +0000, Winkler, Tomas wrote:
> > 
> > On Tue, Nov 04, 2014 at 05:22:51AM +0000, Winkler, Tomas wrote:
> > > >
> > > > On Mon, Nov 03, 2014 at 10:42:05AM +0200, Tomas Winkler wrote:
> > > > > To support dynamic addition/remove we add reference
> > > > > counter.
> > > >
> > > > What is keeping two different threads / cpus from grabbing a reference
> > > > at the same time the other one is dropping it?
> > > >
> > > > You have a list here, with no locking, right?  You also don't have any
> > > > locking for your kref, which isn't good at all...
> > > >
> > > > Please audit and fix up.
> > >
> > > Of course there is a lock, it wouldn't work at all. It is not explicit
> > > but we run under device_lock mutex.
> > 
> > Please make it explicit :)
> 
> Not sure what you mean by that? There is a lot of options in this laconic  sentence.

In looking at that patch, it was not obvious to me that any locking was
happening at all, so that needs to be addressed somehow before I can
accept the change.

thanks,

greg k-h

  reply	other threads:[~2014-11-06 15:59 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-03  8:42 [char-misc-next V3] mei: add reference counting for me clients Tomas Winkler
2014-11-03 23:54 ` Greg KH
2014-11-04  5:22   ` Winkler, Tomas
2014-11-06  2:20     ` Greg KH
2014-11-06  8:40       ` Winkler, Tomas
2014-11-06 15:58         ` Greg KH [this message]
2014-11-06 19:05           ` Winkler, Tomas
  -- strict thread matches above, loose matches on Subject: below --
2015-01-10 22:07 Tomas Winkler

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=20141106155828.GA20182@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=arnd@arndb.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tomas.winkler@intel.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