From: "David S. Miller" <davem@redhat.com>
To: chas@cmf.nrl.navy.mil
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH][ATM] make clip modular
Date: Mon, 12 May 2003 11:57:58 -0700 (PDT) [thread overview]
Message-ID: <20030512.115758.39166911.davem@redhat.com> (raw)
In-Reply-To: <200305121933.h4CJXM511323@relax.cmf.nrl.navy.mil>
From: chas williams <chas@cmf.nrl.navy.mil>
Date: Mon, 12 May 2003 15:33:22 -0400
this patch lets one build clip as a module.
This doesn't work and is quite racey.
+ if (!atm_clip_ops || !try_module_get(atm_clip_ops->owner)) {
Q: What prevents atm_clip_ops from going NULL between the
!atm_clip_ops test and the atm_clip_ops->owner dereference?
A: Nothing.
Therefore you have to protect these things some how, I would
suggest using a semaphore, put it right next to atm_clip_ops
and hold it around register, derferegister, and code sequence
like this one trying to get a reference to it.
The various ioctl hooks in net/socket.c are good models to
work from.
MPOA/LEC/MPC probably have nearly identical bugs and it would
be great if you could fix them up too.
next prev parent reply other threads:[~2003-05-12 19:50 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-05-12 19:33 chas williams
2003-05-12 18:57 ` David S. Miller [this message]
2003-05-12 21:26 ` chas williams
2003-05-12 20:26 ` David S. Miller
2003-05-12 21:40 ` chas williams
[not found] ` <200305132131.h4DLVGGi003551@locutus.cmf.nrl.navy.mil>
2003-05-14 0:05 ` David S. Miller
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=20030512.115758.39166911.davem@redhat.com \
--to=davem@redhat.com \
--cc=chas@cmf.nrl.navy.mil \
--cc=linux-kernel@vger.kernel.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
all inboxes | Powered by JetHome®