Path: news.gmane.org!not-for-mail From: Andrew Morton Newsgroups: gmane.linux.network,gmane.linux.kernel.announce Subject: kmap_atomic() oopses in current mainline Date: Thu, 19 Jul 2007 01:33:04 -0700 Lines: 55 Approved: news@gmane.org Message-ID: <20070719013304.3c060c99.akpm@linux-foundation.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1184834014 26400 80.91.229.12 (19 Jul 2007 08:33:34 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 19 Jul 2007 08:33:34 +0000 (UTC) Cc: Dan Williams To: netdev@vger.kernel.org, linux-kernel-announce@vger.kernel.org Original-X-From: netdev-owner@vger.kernel.org Thu Jul 19 10:33:32 2007 Return-path: Envelope-to: linux-netdev-2@gmane.org Original-Received: from vger.kernel.org ([209.132.176.167]) by lo.gmane.org with esmtp (Exim 4.50) id 1IBRRu-0001y0-8j for linux-netdev-2@gmane.org; Thu, 19 Jul 2007 10:33:26 +0200 Original-Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759816AbXGSIdR (ORCPT ); Thu, 19 Jul 2007 04:33:17 -0400 Original-Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1758954AbXGSIdQ (ORCPT ); Thu, 19 Jul 2007 04:33:16 -0400 Original-Received: from smtp2.linux-foundation.org ([207.189.120.14]:56751 "EHLO smtp2.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751046AbXGSIdP (ORCPT ); Thu, 19 Jul 2007 04:33:15 -0400 Original-Received: from imap1.linux-foundation.org (imap1.linux-foundation.org [207.189.120.55]) by smtp2.linux-foundation.org (8.13.5.20060308/8.13.5/Debian-3ubuntu1.1) with ESMTP id l6J8XADK006484 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 19 Jul 2007 01:33:13 -0700 Original-Received: from box (localhost [127.0.0.1]) by imap1.linux-foundation.org (8.13.5.20060308/8.13.5/Debian-3ubuntu1.1) with SMTP id l6J8X4Rp022244; Thu, 19 Jul 2007 01:33:04 -0700 X-Mailer: Sylpheed 2.4.1 (GTK+ 2.8.17; x86_64-unknown-linux-gnu) X-Spam-Status: No, hits=-2.779 required=5 tests=AWL,BAYES_00 X-Spam-Checker-Version: SpamAssassin 3.1.0-osdl_revision__1.12__ X-MIMEDefang-Filter: osdl$Revision: 1.181 $ X-Scanned-By: MIMEDefang 2.53 on 207.189.120.14 Original-Sender: netdev-owner@vger.kernel.org Precedence: bulk X-Mailing-List: netdev@vger.kernel.org Xref: news.gmane.org gmane.linux.network:66966 gmane.linux.kernel.announce:458 Archived-At: 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. - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html