public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Eli Cohen <eli-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
To: Roland Dreier <rdreier-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
Cc: Eli Cohen <eli-VPRAkNaXOzVS1MOuV/RT9w@public.gmane.org>,
	Linux RDMA list
	<linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Alexander Chiang <achiang-VXdhtT5mjnY@public.gmane.org>
Subject: Re: [PATCH] IB core: Fix locking on device numbers allocation
Date: Thu, 25 Mar 2010 09:36:35 +0200	[thread overview]
Message-ID: <20100325073635.GF12224@mtldesk030.lab.mtl.com> (raw)
In-Reply-To: <adaiq8l1uwp.fsf-BjVyx320WGW9gfZ95n9DRSW4+XlvGpQz@public.gmane.org>

On Wed, Mar 24, 2010 at 10:39:18AM -0700, Roland Dreier wrote:
> 
> Looks like a good catch.  I assume you found this through inspection and
> not hitting it practice?
Correct, I caught this from inspecting the code.

>  Also it seems user_mad.c would need the same fix.
Yes, I missed that.

> 
> Although looking at this I wonder if we do need that lock... we don't
> seem to do any locking when we do the clear_bit in the dev_map, and all
> of this is done through the device add/remove callback, which seems to
> be serialized by the device_mutex in device.c.  But we probably don't
> want to make that a requirement in case we parallelize in the future.
> 
I missed the fact the clear_bit is not atomic. So to make this
complete I will send a new patch with protection on the clear bit.
Would you like me to send a patch for user_mad too or would you push
that?
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2010-03-25  7:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-23 19:13 [PATCH] IB core: Fix locking on device numbers allocation Eli Cohen
     [not found] ` <20100323191317.GA14496-8YAHvHwT2UEvbXDkjdHOrw/a8Rv0c6iv@public.gmane.org>
2010-03-24 17:39   ` Roland Dreier
     [not found]     ` <adaiq8l1uwp.fsf-BjVyx320WGW9gfZ95n9DRSW4+XlvGpQz@public.gmane.org>
2010-03-25  7:36       ` Eli Cohen [this message]
     [not found]         ` <20100325073635.GF12224-8YAHvHwT2UEvbXDkjdHOrw/a8Rv0c6iv@public.gmane.org>
2010-03-31 21:50           ` Roland Dreier

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=20100325073635.GF12224@mtldesk030.lab.mtl.com \
    --to=eli-ldsdmyg8hgv8yrgs2mwiifqbs+8scbdb@public.gmane.org \
    --cc=achiang-VXdhtT5mjnY@public.gmane.org \
    --cc=eli-VPRAkNaXOzVS1MOuV/RT9w@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=rdreier-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org \
    /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