Re: [bug] block subsystem related crash with latest -git

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linus Torvalds
Date: Wednesday, October 17, 2007 - 9:50 am

On Wed, 17 Oct 2007, Ingo Molnar wrote:

The code in question is:

     mov    %edx,0xc(%esp)
     mov    (%ebx),%edi
     mov    %edi,%edx
     sub    %eax,%edx
     mov    %edx,%eax
     sar    $0x5,%eax
     shl    $0xc,%eax
     add    0x8(%ebx),%eax
     cmp    %eax,0xc(%esp)
     je     +126
     mov    0x10(%esi),%eax	<----- Oops
     lea    0x10(%esi),%edx
     test   $0x1,%al
     jne    +76
     mov    %edi,(%esi)
     mov    %ebp,0xc(%esi)
     mov    0x8(%ebx),%eax
     mov    %eax,0x4(%esi)


and it looks like %esi is overflowing from one page to the next one, ie:

	BUG: unable to handle kernel paging request at virtual address 7ca76000
	ESI: 7ca75ff0

and you caught this thanks to page-alloc debugging again.

I think I can match that up with the source code: that's "sg_next()". It's 
doing:

        sg++;

        if (unlikely(sg_is_chain(sg)))
                sg = sg_chain_ptr(sg);

        return sg;

and the oopsing instruction is that load of "sg->page" in the assembly 
code:

	mov    0x10(%esi),%eax		# %eax = sg->page
	lea    0x10(%esi),%edx		# %edx = sg+1;
	test   $0x1,%al			# if (unlikely(sg_is_chain()))
	jne    +76

Jens?

		Linus
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[bug] block subsystem related crash with latest -git, Ingo Molnar, (Wed Oct 17, 8:46 am)
Re: [bug] block subsystem related crash with latest -git, Linus Torvalds, (Wed Oct 17, 9:50 am)
[bug] ata subsystem related crash with latest -git, Ingo Molnar, (Wed Oct 17, 10:45 am)
Re: [bug] block subsystem related crash with latest -git, Linus Torvalds, (Wed Oct 17, 10:52 am)
Re: [bug] ata subsystem related crash with latest -git, Jens Axboe, (Wed Oct 17, 10:53 am)
Re: [bug] ata subsystem related crash with latest -git, Jens Axboe, (Wed Oct 17, 10:55 am)
Re: [bug] block subsystem related crash with latest -git, Linus Torvalds, (Wed Oct 17, 10:56 am)
Re: [bug] ata subsystem related crash with latest -git, Ingo Molnar, (Wed Oct 17, 10:58 am)
Re: [bug] ata subsystem related crash with latest -git, Linus Torvalds, (Wed Oct 17, 11:08 am)
Re: [bug] ata subsystem related crash with latest -git, Ingo Molnar, (Wed Oct 17, 11:13 am)
Re: [bug] block subsystem related crash with latest -git, Linus Torvalds, (Wed Oct 17, 11:13 am)
Re: [bug] block subsystem related crash with latest -git, Linus Torvalds, (Wed Oct 17, 11:14 am)
Re: [bug] block subsystem related crash with latest -git, Linus Torvalds, (Wed Oct 17, 11:18 am)
Re: [bug] block subsystem related crash with latest -git, Linus Torvalds, (Wed Oct 17, 11:22 am)
Re: [bug] ata subsystem related crash with latest -git, Jens Axboe, (Wed Oct 17, 11:37 am)
Re: [bug] block subsystem related crash with latest -git, Linus Torvalds, (Wed Oct 17, 11:58 am)
Re: [bug] ata subsystem related crash with latest -git, Ingo Molnar, (Wed Oct 17, 12:04 pm)
Re: [bug] ata subsystem related crash with latest -git, Jens Axboe, (Wed Oct 17, 12:08 pm)
Re: [bug] ata subsystem related crash with latest -git, Ingo Molnar, (Wed Oct 17, 12:09 pm)
Re: [bug] ata subsystem related crash with latest -git, Ingo Molnar, (Wed Oct 17, 12:14 pm)
Re: [bug] block subsystem related crash with latest -git, Linus Torvalds, (Wed Oct 17, 12:15 pm)
Re: [bug] ata subsystem related crash with latest -git, Ingo Molnar, (Wed Oct 17, 12:17 pm)
Re: [bug] ata subsystem related crash with latest -git, Jens Axboe, (Wed Oct 17, 12:25 pm)
Re: [bug] ata subsystem related crash with latest -git, Jens Axboe, (Wed Oct 17, 12:25 pm)
Re: [bug] ata subsystem related crash with latest -git, Linus Torvalds, (Wed Oct 17, 12:28 pm)
Re: [bug] ata subsystem related crash with latest -git, Jens Axboe, (Wed Oct 17, 12:35 pm)
Re: [bug] ata subsystem related crash with latest -git, Linus Torvalds, (Wed Oct 17, 12:42 pm)
Re: [bug] ata subsystem related crash with latest -git, Linus Torvalds, (Wed Oct 17, 12:45 pm)
Re: [bug] ata subsystem related crash with latest -git, Jens Axboe, (Wed Oct 17, 12:49 pm)
Re: [bug] ata subsystem related crash with latest -git, Jens Axboe, (Wed Oct 17, 12:55 pm)
Re: [bug] ata subsystem related crash with latest -git, Jens Axboe, (Wed Oct 17, 12:56 pm)
Re: [bug] ata subsystem related crash with latest -git, Ingo Molnar, (Wed Oct 17, 1:05 pm)
Re: [bug] ata subsystem related crash with latest -git, Linus Torvalds, (Wed Oct 17, 1:10 pm)
Re: [bug] block subsystem related crash with latest -git, Luca Tettamanti, (Wed Oct 17, 1:15 pm)
Re: [bug] ata subsystem related crash with latest -git, Linus Torvalds, (Wed Oct 17, 1:24 pm)
Re: [bug] ata subsystem related crash with latest -git, Ingo Molnar, (Wed Oct 17, 1:51 pm)
Re: [bug] ata subsystem related crash with latest -git, Linus Torvalds, (Wed Oct 17, 2:11 pm)
Re: [bug] ata subsystem related crash with latest -git, FUJITA Tomonori, (Wed Oct 17, 4:00 pm)
Re: [bug] ata subsystem related crash with latest -git, Linus Torvalds, (Wed Oct 17, 6:07 pm)
Re: [bug] ata subsystem related crash with latest -git, Jeff Garzik, (Wed Oct 17, 6:14 pm)
Re: [bug] ata subsystem related crash with latest -git, David Miller, (Wed Oct 17, 6:19 pm)
Re: [bug] ata subsystem related crash with latest -git, Linus Torvalds, (Wed Oct 17, 6:36 pm)
Re: [bug] ata subsystem related crash with latest -git, David Miller, (Wed Oct 17, 6:49 pm)
Re: [bug] ata subsystem related crash with latest -git, Linus Torvalds, (Wed Oct 17, 9:01 pm)
Re: [bug] ata subsystem related crash with latest -git, Jeff Garzik, (Wed Oct 17, 9:14 pm)
Re: [bug] ata subsystem related crash with latest -git, Linus Torvalds, (Wed Oct 17, 9:20 pm)
Re: [bug] ata subsystem related crash with latest -git, Jeff Garzik, (Wed Oct 17, 9:31 pm)
Re: [bug] ata subsystem related crash with latest -git, Linus Torvalds, (Wed Oct 17, 9:45 pm)
Re: [bug] ata subsystem related crash with latest -git, Linus Torvalds, (Wed Oct 17, 9:53 pm)
Re: [bug] ata subsystem related crash with latest -git, Jeff Garzik, (Wed Oct 17, 10:45 pm)
Re: [bug] ata subsystem related crash with latest -git, Jens Axboe, (Thu Oct 18, 12:05 am)
Re: [bug] ata subsystem related crash with latest -git, Ingo Molnar, (Thu Oct 18, 12:07 am)
Re: [bug] ata subsystem related crash with latest -git, Jens Axboe, (Thu Oct 18, 12:09 am)
Re: [bug] ata subsystem related crash with latest -git, Jens Axboe, (Thu Oct 18, 12:10 am)
Re: [bug] ata subsystem related crash with latest -git, Jeff Garzik, (Thu Oct 18, 12:30 am)
Re: [bug] ata subsystem related crash with latest -git, Jeff Garzik, (Thu Oct 18, 1:22 am)
Re: [bug] ata subsystem related crash with latest -git, Jeff Garzik, (Thu Oct 18, 1:38 am)
Re: [bug] ata subsystem related crash with latest -git, Jeff Garzik, (Thu Oct 18, 1:51 am)
Re: [bug] ata subsystem related crash with latest -git, Jeff Garzik, (Thu Oct 18, 2:01 am)
Re: [bug] ata subsystem related crash with latest -git, Jeff Garzik, (Thu Oct 18, 2:32 am)
Re: [bug] ata subsystem related crash with latest -git, Jeff Garzik, (Thu Oct 18, 3:04 am)
Re: [bug] ata subsystem related crash with latest -git, Ingo Molnar, (Thu Oct 18, 3:13 am)
Re: [bug] ata subsystem related crash with latest -git, Ingo Molnar, (Thu Oct 18, 3:49 am)
Re: [bug] ata subsystem related crash with latest -git, Jeff Garzik, (Thu Oct 18, 3:50 am)
Re: [bug] ata subsystem related crash with latest -git, Ingo Molnar, (Thu Oct 18, 4:03 am)
Re: [bug] ata subsystem related crash with latest -git, David Miller, (Thu Oct 18, 4:55 am)
Re: [bug] ata subsystem related crash with latest -git, David Miller, (Thu Oct 18, 5:05 am)
Re: [bug] ata subsystem related crash with latest -git, David Miller, (Thu Oct 18, 5:36 am)
Re: [bug] ata subsystem related crash with latest -git, Benny Halevy, (Thu Oct 18, 5:58 am)
Re: [bug] ata subsystem related crash with latest -git, Benny Halevy, (Thu Oct 18, 6:49 am)
Re: [bug] ata subsystem related crash with latest -git, Benny Halevy, (Thu Oct 18, 7:16 am)
Re: [bug] ata subsystem related crash with latest -git, Olof Johansson, (Thu Oct 18, 7:58 am)
Re: [bug] ata subsystem related crash with latest -git, Linus Torvalds, (Thu Oct 18, 9:55 am)
Re: [bug] ata subsystem related crash with latest -git, Jens Axboe, (Thu Oct 18, 10:01 am)
Re: [bug] ata subsystem related crash with latest -git, Arjan van de Ven, (Thu Oct 18, 10:10 am)
Re: [bug] ata subsystem related crash with latest -git, Jens Axboe, (Thu Oct 18, 10:10 am)
Re: [bug] ata subsystem related crash with latest -git, Jens Axboe, (Thu Oct 18, 10:14 am)
Re: [bug] ata subsystem related crash with latest -git, Jeff Garzik, (Thu Oct 18, 12:20 pm)
Re: [bug] ata subsystem related crash with latest -git, FUJITA Tomonori, (Fri Oct 19, 1:59 am)
Re: [bug] ata subsystem related crash with latest -git, Torsten Kaiser, (Sat Oct 20, 4:55 am)