netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* kmap_atomic() oopses in current mainline
@ 2007-07-19  8:33 Andrew Morton
  2007-07-19  9:28 ` Evgeniy Polyakov
  0 siblings, 1 reply; 5+ messages in thread
From: Andrew Morton @ 2007-07-19  8:33 UTC (permalink / raw)
  To: netdev, linux-kernel-announce; +Cc: Dan Williams


I've had a handful of random mystery oopses associated with no particular
activity.  A typical trace is at:

	http://userweb.kernel.org/~akpm/dsc03659.jpg

the trace is messy and it doesn't seem to want to happen now I've turned on
frame pointers, but it looks networky to me.

So if anyone has made kmap_atomic() changes in networking recently, please
check your work.  The machine does have highmem.



The crash appears to be happening here:

        BUG_ON(!pte_none(*(kmap_pte-idx)));

which would indicate a wild value is being passing km kmap_atomic()'s
km_type arg.




I don't think the 2-year-old Vaio has offload engine support ;) Dan, this:

+		if (flags & ASYNC_TX_KMAP_DST)
+			dest_buf = kmap_atomic(dest, KM_USER0) + dest_offset;
+		else
+			dest_buf = page_address(dest) + dest_offset;
+
+		if (flags & ASYNC_TX_KMAP_SRC)
+			src_buf = kmap_atomic(src, KM_USER0) + src_offset;
+		else
+			src_buf = page_address(src) + src_offset;
+
+		memcpy(dest_buf, src_buf, len);
+
+		if (flags & ASYNC_TX_KMAP_DST)
+			kunmap_atomic(dest_buf, KM_USER0);
+
+		if (flags & ASYNC_TX_KMAP_SRC)
+			kunmap_atomic(src_buf, KM_USER0);
+

is very wrong if both ASYNC_TX_KMAP_DST and ASYNC_TX_KMAP_SRC can ever be
set.  We'll end up using the same kmap slot for both src add dest and we
get either corrupted data or a BUG.



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

end of thread, other threads:[~2007-07-19 15:23 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-19  8:33 kmap_atomic() oopses in current mainline Andrew Morton
2007-07-19  9:28 ` Evgeniy Polyakov
2007-07-19  9:38   ` Andrew Morton
2007-07-19 10:01     ` Evgeniy Polyakov
2007-07-19 15:23       ` Dan Williams

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).