public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley-d9PhHud1JfjCXq6kfMZ53/egYHeGw8Jk@public.gmane.org>
To: Bart Van Assche <bvanassche-HInyCGIudOg@public.gmane.org>
Cc: linux-scsi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Fujita Tomonori
	<fujita.tomonori-Zyj7fXuS5i5L9jVzuh4AOg@public.gmane.org>,
	Brian King
	<brking-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>,
	David Dillow <dillowda-1Heg1YXhbW8@public.gmane.org>,
	Roland Dreier <roland-BHEL68pLQRGGvPXPguhicg@public.gmane.org>
Subject: Re: srp_transport: Fix atttribute registration race
Date: Mon, 31 Oct 2011 13:33:28 +0400	[thread overview]
Message-ID: <1320053608.8283.29.camel@dabdike> (raw)
In-Reply-To: <201110211857.23622.bvanassche-HInyCGIudOg@public.gmane.org>

On Fri, 2011-10-21 at 18:57 +0200, Bart Van Assche wrote: 
> Register transport attributes after the attribute array has been
> set up instead of before. The current code is racy because there
> is no guarantee that the CPU examining the attribute container
> will see all values written to the container.

I don't agree with this change log.  As far as the kernel is concerned,
nothing happens until that function returns because the only way to use
anything is to get a match to succeed, and they all check for
->transportt which will be NULL.

I can accept that it's best practise to initialise something before
registering it, because the reverse excites everyone's bogosity sensors,
it's just not a bug in this case.

James


--
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:[~2011-10-31  9:33 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-21 16:57 srp_transport: Fix atttribute registration race Bart Van Assche
     [not found] ` <201110211857.23622.bvanassche-HInyCGIudOg@public.gmane.org>
2011-10-31  9:33   ` James Bottomley [this message]
2011-11-01 18:47     ` Bart Van Assche
     [not found]       ` <CAO+b5-oxshsL7Dm7vhv4zC8m0P4dG3iNzxU9sdbi5cBkAnTpMQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-11-13  4:18         ` Bill Boas
2011-11-13 21:55           ` Dave Dillow
2011-11-13 22:46             ` Paul Grun
     [not found]             ` <20111113215523.GA6117-1Heg1YXhbW8@public.gmane.org>
2011-11-14 21:43               ` Or Gerlitz
2011-11-14 22:17                 ` Dave Dillow
     [not found]                 ` <CAJZOPZ+N2OLLHdKAFk=xkXGzFEdisaGsDBf6ra56pcT6zO_8qQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-11-15  7:04                   ` Bart Van Assche

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=1320053608.8283.29.camel@dabdike \
    --to=james.bottomley-d9phhud1jfjcxq6kfmz53/egyhegw8jk@public.gmane.org \
    --cc=brking-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org \
    --cc=bvanassche-HInyCGIudOg@public.gmane.org \
    --cc=dillowda-1Heg1YXhbW8@public.gmane.org \
    --cc=fujita.tomonori-Zyj7fXuS5i5L9jVzuh4AOg@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-scsi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=roland-BHEL68pLQRGGvPXPguhicg@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