From: petter wahlman <petter@bluezone.no>
To: Dave Jones <davej@suse.de>
Cc: linux-kernel@vger.kernel.org, info@melware.de
Subject: Re: [PATCH] 2.4.18 Eicon ISDN driver fix.
Date: 26 Feb 2002 20:49:08 +0100 [thread overview]
Message-ID: <1014752949.27234.10.camel@BadEip> (raw)
In-Reply-To: <20020226205422.N2222@suse.de>
In-Reply-To: <1014679267.27236.6.camel@BadEip> <20020226205422.N2222@suse.de>
On Tue, 2002-02-26 at 20:54, Dave Jones wrote:
> On Tue, Feb 26, 2002 at 08:26:18PM +0100, petter wahlman wrote:
> > +++ linux-2.4.18-pw/drivers/isdn/eicon/eicon_mod.c Mon Feb 25
>
> > - if (user)
> > + if (user) {
> > + spin_unlock_irqrestore(&eicon_lock,
> > flags);
> > copy_to_user(p, skb->data, cnt);
> > + spin_lock_irqsave(&eicon_lock, flags);
> > + }
>
> What happens if something else adds/removes to card->statq, or
> frees the skb after you drop the lock? I'm not familiar with
> this code, but from a quick look, it looks like this introduces
> a race no ?
>
Yes, it will introduce a new race.
I did not actually intend to send this unfinished patch, but fscked up
:)
Anyway, calling copy_to_user while holding a spinlock is defiantly a bad
idea.
> --
> | Dave Jones. http://www.codemonkey.org.uk
> | SuSE Labs
>
Petter Wahlman.
next prev parent reply other threads:[~2002-02-26 20:02 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-02-26 19:26 [PATCH] 2.4.18 Eicon ISDN driver fix petter wahlman
2002-02-26 19:54 ` Dave Jones
2002-02-26 19:49 ` petter wahlman [this message]
2002-02-26 20:50 ` Alan Cox
2002-02-27 7:58 ` Armin Schindler
2002-02-28 17:41 ` Marcelo Tosatti
2002-02-28 21:14 ` petter wahlman
2002-03-01 7:30 ` Armin Schindler
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=1014752949.27234.10.camel@BadEip \
--to=petter@bluezone.no \
--cc=davej@suse.de \
--cc=info@melware.de \
--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