public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Broken kunmap calls in rc4-mm1.
@ 2004-11-11  1:17 Nigel Cunningham
  2004-11-11  1:29 ` William Lee Irwin III
  2004-11-11  1:34 ` Chris Wright
  0 siblings, 2 replies; 8+ messages in thread
From: Nigel Cunningham @ 2004-11-11  1:17 UTC (permalink / raw)
  To: Andrew Morton, Linux Kernel Mailing List

Hi Andrew et al.

That oops in kunmap got me thinking of my recent DEBUG_HIGHMEM
additions, so I want for a walk through the -mm4 patch, and found plenty
of instances of people making the same mistake I did... using the struct
page * in the call to kunmap, rather than the virtual address.

I guess the best way to handle it is find/notify the respective authors
of patches in the tree? The problems are in:

Reiser4 (lots)
CacheFS (lots)
afs
binfmt_elf
libata_core

(I'm hoping some of the above people will see this message and save me
some effort :>)

Regards,

Nigel
-- 
Nigel Cunningham
Pastoral Worker
Christian Reformed Church of Tuggeranong
PO Box 1004, Tuggeranong, ACT 2901

You see, at just the right time, when we were still powerless, Christ
died for the ungodly.		-- Romans 5:6


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Broken kunmap calls in rc4-mm1.
  2004-11-11  1:17 Broken kunmap calls in rc4-mm1 Nigel Cunningham
@ 2004-11-11  1:29 ` William Lee Irwin III
  2004-11-11  1:42   ` Nigel Cunningham
  2004-11-11 19:22   ` Pavel Machek
  2004-11-11  1:34 ` Chris Wright
  1 sibling, 2 replies; 8+ messages in thread
From: William Lee Irwin III @ 2004-11-11  1:29 UTC (permalink / raw)
  To: Nigel Cunningham; +Cc: Andrew Morton, Linux Kernel Mailing List

On Thu, Nov 11, 2004 at 12:17:05PM +1100, Nigel Cunningham wrote:
> That oops in kunmap got me thinking of my recent DEBUG_HIGHMEM
> additions, so I want for a walk through the -mm4 patch, and found plenty
> of instances of people making the same mistake I did... using the struct
> page * in the call to kunmap, rather than the virtual address.
> I guess the best way to handle it is find/notify the respective authors
> of patches in the tree? The problems are in:
> Reiser4 (lots)
> CacheFS (lots)
> afs
> binfmt_elf
> libata_core
> (I'm hoping some of the above people will see this message and save me
> some effort :>)

That only applies to kunmap_atomic(); kunmap()'s argument should be a page.


-- wli

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Broken kunmap calls in rc4-mm1.
  2004-11-11  1:17 Broken kunmap calls in rc4-mm1 Nigel Cunningham
  2004-11-11  1:29 ` William Lee Irwin III
@ 2004-11-11  1:34 ` Chris Wright
  1 sibling, 0 replies; 8+ messages in thread
From: Chris Wright @ 2004-11-11  1:34 UTC (permalink / raw)
  To: Nigel Cunningham; +Cc: Andrew Morton, Linux Kernel Mailing List

* Nigel Cunningham (ncunningham@linuxmail.org) wrote:
> Hi Andrew et al.
> 
> That oops in kunmap got me thinking of my recent DEBUG_HIGHMEM
> additions, so I want for a walk through the -mm4 patch, and found plenty
> of instances of people making the same mistake I did... using the struct
> page * in the call to kunmap, rather than the virtual address.
> 
> I guess the best way to handle it is find/notify the respective authors
> of patches in the tree? The problems are in:
> 
> Reiser4 (lots)
> CacheFS (lots)
> afs
> binfmt_elf
> libata_core

I think you are confusing with kunmap_atomic?

thanks
-chris
-- 
Linux Security Modules     http://lsm.immunix.org     http://lsm.bkbits.net

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Broken kunmap calls in rc4-mm1.
  2004-11-11  1:29 ` William Lee Irwin III
@ 2004-11-11  1:42   ` Nigel Cunningham
  2004-11-11  2:59     ` Andrew Morton
  2004-11-11 19:22   ` Pavel Machek
  1 sibling, 1 reply; 8+ messages in thread
From: Nigel Cunningham @ 2004-11-11  1:42 UTC (permalink / raw)
  To: William Lee Irwin III; +Cc: Andrew Morton, Linux Kernel Mailing List

Hi.

On Thu, 2004-11-11 at 12:29, William Lee Irwin III wrote:
> On Thu, Nov 11, 2004 at 12:17:05PM +1100, Nigel Cunningham wrote:
> > That oops in kunmap got me thinking of my recent DEBUG_HIGHMEM
> > additions, so I want for a walk through the -mm4 patch, and found plenty
> > of instances of people making the same mistake I did... using the struct
> > page * in the call to kunmap, rather than the virtual address.
> > I guess the best way to handle it is find/notify the respective authors
> > of patches in the tree? The problems are in:
> > Reiser4 (lots)
> > CacheFS (lots)
> > afs
> > binfmt_elf
> > libata_core
> > (I'm hoping some of the above people will see this message and save me
> > some effort :>)
> 
> That only applies to kunmap_atomic(); kunmap()'s argument should be a page.

Ah. My bad. That cuts it down by quite a few. I should have stuck to
looking for kmap_atomic :>

Humble apologies to those wrongly maligned!

Remaining culprits are....

Reiser4:
- do_readpage_tail
 -reiser4_status_init
 -reiser4_status_write

Nigel
-- 
Nigel Cunningham
Pastoral Worker
Christian Reformed Church of Tuggeranong
PO Box 1004, Tuggeranong, ACT 2901

You see, at just the right time, when we were still powerless, Christ
died for the ungodly.		-- Romans 5:6


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Broken kunmap calls in rc4-mm1.
  2004-11-11  1:42   ` Nigel Cunningham
@ 2004-11-11  2:59     ` Andrew Morton
  2004-11-11  7:45       ` Jens Axboe
  0 siblings, 1 reply; 8+ messages in thread
From: Andrew Morton @ 2004-11-11  2:59 UTC (permalink / raw)
  To: ncunningham; +Cc: wli, linux-kernel

Nigel Cunningham <ncunningham@linuxmail.org> wrote:
>
> Remaining culprits are....
> 
>  Reiser4:
>  - do_readpage_tail
>   -reiser4_status_init
>   -reiser4_status_write

obuggerit.  Look, a simple helper is to redefine kmap_atomic() and
kunmap_atomic() to work on char*'s.  This will spit warnings if someone
feeds in a page*.  Which would be a lot more useful if we didn't have all
those infernal __iomem warnings scrolling off the screen but ho hum.

I'll cook something up.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Broken kunmap calls in rc4-mm1.
  2004-11-11  2:59     ` Andrew Morton
@ 2004-11-11  7:45       ` Jens Axboe
  2004-11-11  7:50         ` Andrew Morton
  0 siblings, 1 reply; 8+ messages in thread
From: Jens Axboe @ 2004-11-11  7:45 UTC (permalink / raw)
  To: Andrew Morton; +Cc: ncunningham, wli, linux-kernel

On Wed, Nov 10 2004, Andrew Morton wrote:
> Nigel Cunningham <ncunningham@linuxmail.org> wrote:
> >
> > Remaining culprits are....
> > 
> >  Reiser4:
> >  - do_readpage_tail
> >   -reiser4_status_init
> >   -reiser4_status_write
> 
> obuggerit.  Look, a simple helper is to redefine kmap_atomic() and
> kunmap_atomic() to work on char*'s.  This will spit warnings if someone
> feeds in a page*.  Which would be a lot more useful if we didn't have all
> those infernal __iomem warnings scrolling off the screen but ho hum.

I tried something like this, but got stuck on people passing a structure
in which is valid (aio_setup_ring(), for instance). We can always cast
those of course, but it's not so pretty.

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Broken kunmap calls in rc4-mm1.
  2004-11-11  7:45       ` Jens Axboe
@ 2004-11-11  7:50         ` Andrew Morton
  0 siblings, 0 replies; 8+ messages in thread
From: Andrew Morton @ 2004-11-11  7:50 UTC (permalink / raw)
  To: Jens Axboe; +Cc: ncunningham, wli, linux-kernel

Jens Axboe <axboe@suse.de> wrote:
>
> On Wed, Nov 10 2004, Andrew Morton wrote:
> > Nigel Cunningham <ncunningham@linuxmail.org> wrote:
> > >
> > > Remaining culprits are....
> > > 
> > >  Reiser4:
> > >  - do_readpage_tail
> > >   -reiser4_status_init
> > >   -reiser4_status_write
> > 
> > obuggerit.  Look, a simple helper is to redefine kmap_atomic() and
> > kunmap_atomic() to work on char*'s.  This will spit warnings if someone
> > feeds in a page*.  Which would be a lot more useful if we didn't have all
> > those infernal __iomem warnings scrolling off the screen but ho hum.
> 
> I tried something like this, but got stuck on people passing a structure
> in which is valid (aio_setup_ring(), for instance). We can always cast
> those of course, but it's not so pretty.

yup, that's what I did.  It's not too bad, apart from cachefs which has
gone kmap nutso.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Broken kunmap calls in rc4-mm1.
  2004-11-11  1:29 ` William Lee Irwin III
  2004-11-11  1:42   ` Nigel Cunningham
@ 2004-11-11 19:22   ` Pavel Machek
  1 sibling, 0 replies; 8+ messages in thread
From: Pavel Machek @ 2004-11-11 19:22 UTC (permalink / raw)
  To: William Lee Irwin III
  Cc: Nigel Cunningham, Andrew Morton, Linux Kernel Mailing List

Hi!

> > That oops in kunmap got me thinking of my recent DEBUG_HIGHMEM
> > additions, so I want for a walk through the -mm4 patch, and found plenty
> > of instances of people making the same mistake I did... using the struct
> > page * in the call to kunmap, rather than the virtual address.
> > I guess the best way to handle it is find/notify the respective authors
> > of patches in the tree? The problems are in:
> > Reiser4 (lots)
> > CacheFS (lots)
> > afs
> > binfmt_elf
> > libata_core
> > (I'm hoping some of the above people will see this message and save me
> > some effort :>)
> 
> That only applies to kunmap_atomic(); kunmap()'s argument should be a page.

Is it just me or is having two very similar functions
(kunmap/kunmap_atomic) pretty counter-intuitive? Perhaps kunmap should
be renamed to kunmap_page() or something?

								Pavel
-- 
People were complaining that M$ turns users into beta-testers...
...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2004-11-12  7:41 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-11  1:17 Broken kunmap calls in rc4-mm1 Nigel Cunningham
2004-11-11  1:29 ` William Lee Irwin III
2004-11-11  1:42   ` Nigel Cunningham
2004-11-11  2:59     ` Andrew Morton
2004-11-11  7:45       ` Jens Axboe
2004-11-11  7:50         ` Andrew Morton
2004-11-11 19:22   ` Pavel Machek
2004-11-11  1:34 ` Chris Wright

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox