From: Jens Axboe <axboe@suse.de>
To: Marc-Christian Petersen <m.c.p@wolk-project.de>
Cc: Joe Korty <joe.korty@ccur.com>,
Alan Cox <alan@lxorguk.ukuu.org.uk>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] bug in 2.4 bh_kmap_irq() breaks IDE under preempt patch
Date: Thu, 13 Mar 2003 11:28:54 +0100 [thread overview]
Message-ID: <20030313102854.GC827@suse.de> (raw)
In-Reply-To: <200303131126.17963.m.c.p@wolk-project.de>
On Thu, Mar 13 2003, Marc-Christian Petersen wrote:
> On Thursday 13 March 2003 10:26, Jens Axboe wrote:
>
> Hi Jens,
>
> > There's a tiny bit missing from your patch:
> > > - * it's a highmem page
> > > - */
> > > - __cli();
> > > + local_irq_save(*flags);
> >
> > local_irq_disable();
> >
> > > addr = (unsigned long) kmap_atomic(bh->b_page, KM_BH_IRQ);
> > >
> > > - if (addr & ~PAGE_MASK)
> > > - BUG();
> > > + BUG_ON (addr & ~PAGE_MASK);
> > >
> > > return (char *) addr + bh_offset(bh);
> > > }
> > > @@ -58,7 +46,7 @@
> > > unsigned long ptr = (unsigned long) buffer & PAGE_MASK;
> > >
> > > kunmap_atomic((void *) ptr, KM_BH_IRQ);
> > > - __restore_flags(*flags);
> > > + local_irq_restore(*flags);
> local_irq_enable();
>
> ^ isn't this missing too with your suggested one-liner?
no, the local_irq_restore() brings back the irq flags from before we did
the irq disable. if interrupts were disabled before bh_kmap_irq() was
called, we must not enable them. basically, maintain the same flags.
--
Jens Axboe
next prev parent reply other threads:[~2003-03-13 10:18 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-03-12 22:13 [PATCH] bug in 2.4 bh_kmap_irq() breaks IDE under preempt patch Joe Korty
2003-03-12 23:27 ` Alan Cox
2003-03-13 9:26 ` Jens Axboe
2003-03-13 10:26 ` Marc-Christian Petersen
2003-03-13 10:28 ` Jens Axboe [this message]
2003-03-13 11:50 ` Marc-Christian Petersen
2003-03-13 14:59 ` Joe Korty
2003-03-13 15:05 ` Jens Axboe
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=20030313102854.GC827@suse.de \
--to=axboe@suse.de \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=joe.korty@ccur.com \
--cc=linux-kernel@vger.kernel.org \
--cc=m.c.p@wolk-project.de \
/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