linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Anton Altaparmakov <aia21@cus.cam.ac.uk>
To: Richard Gooch <rgooch@ras.ucalgary.ca>
Cc: Alexander Viro <viro@math.psu.edu>,
	Linus Torvalds <torvalds@transmeta.com>,
	Alan Cox <alan@lxorguk.ukuu.org.uk>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] one of $BIGNUM devfs races
Date: Tue, 7 Aug 2001 11:21:03 +0100 (BST)	[thread overview]
Message-ID: <Pine.SOL.3.96.1010807111835.6737A-100000@draco.cus.cam.ac.uk> (raw)
In-Reply-To: <200108070517.f775HEw30547@vindaloo.ras.ucalgary.ca>

On Mon, 6 Aug 2001, Richard Gooch wrote:
> Alexander Viro writes:
> > On Mon, 6 Aug 2001, Richard Gooch wrote:
> > For local-domain socket you get _two_ kinds of inodes, both with
> > S_IFSOCK in ->i_mode: one on the filesystem (acting like an meeting
> > place) and another - bearing the actual socket and used for all IO.
> > 
> > In other words, the only kind you can get from mknod(2) never uses
> > ->i_socket. It's used only by bind() and connect() - and only as
> > a place in namespace. The only thing we ever look at is ownership
> > and permissions - they determine who can bind()/connect() here.
> > 
> > So ->u.generic_ip is safe.
> 
> Great! That table is toast! All I need is a spinlock-protected
> incrementing counter :-)

If you are introducing a spinlock for the sole purpose of protecting
a counter, I would suggest to drop the spinlock, make the counter an 
atomic_t and just use atomic operations on it. That should be both faster
and generate shorter code.

Best regards,

	Anton
-- 
Anton Altaparmakov <aia21 at cam.ac.uk> (replace at with @)
Linux NTFS maintainer / WWW: http://linux-ntfs.sf.net/
ICQ: 8561279 / WWW: http://www-stu.christs.cam.ac.uk/~aia21/


  parent reply	other threads:[~2001-08-07 10:21 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-08-06 11:58 [PATCH] one of $BIGNUM devfs races Alexander Viro
2001-08-06 16:47 ` Richard Gooch
2001-08-06 16:56   ` Rik van Riel
2001-08-06 17:11   ` Richard Gooch
2001-08-06 23:50 ` Richard Gooch
2001-08-07  0:34   ` Alexander Viro
2001-08-07  0:51   ` Richard Gooch
2001-08-07  1:10     ` Alexander Viro
2001-08-07  1:27     ` Richard Gooch
2001-08-07  1:42       ` Alexander Viro
2001-08-07  2:00       ` Richard Gooch
2001-08-07  2:15         ` Alexander Viro
2001-08-07  5:17         ` Richard Gooch
2001-08-07  5:28           ` Alexander Viro
2001-08-07 10:21           ` Anton Altaparmakov [this message]
2001-08-07 17:09           ` Richard Gooch
2001-08-07 17:27             ` Arjan van de Ven
2001-08-07 17:28             ` Richard Gooch
2001-08-07  5:53       ` Richard Gooch
2001-08-07  6:23         ` Alexander Viro
2001-08-07  6:36         ` Richard Gooch
2001-08-07  6:40           ` Alexander Viro
2001-08-07  6:47           ` Richard Gooch
2001-08-07  7:31             ` Alexander Viro
2001-08-07 18:11             ` Richard Gooch
2001-08-07 18:23               ` Alexander Viro
2001-08-07 18:55               ` Richard Gooch
2001-08-07 19:10                 ` Alexander Viro
2001-08-07 22:13                 ` Richard Gooch
2001-08-06 23:59 Alan Cox
     [not found] ` <no.id>
2001-08-06 23:54   ` Alan Cox
2001-08-06 23:55   ` Richard Gooch
2001-08-06 23:59   ` Richard Gooch
2001-08-07 16:22   ` Alan Cox
2001-08-07 19:04   ` Alan Cox
2001-08-07 19:16     ` Alexander Viro
2001-08-08 21:16       ` H. Peter Anvin
2001-08-08 21:47         ` Alexander Viro
2001-08-08 23:29         ` Richard Gooch
2001-08-07 19:09   ` Richard Gooch
2001-08-07 19:20     ` Alexander Viro

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=Pine.SOL.3.96.1010807111835.6737A-100000@draco.cus.cam.ac.uk \
    --to=aia21@cus.cam.ac.uk \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rgooch@ras.ucalgary.ca \
    --cc=torvalds@transmeta.com \
    --cc=viro@math.psu.edu \
    /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;
as well as URLs for NNTP newsgroup(s).