Bug 16335

Summary: X:2252 conflicting memory types 40000000-48000000 uncached-minus<->write-combining
Product: Platform Specific/Hardware Reporter: Maciej Rutecki (maciej.rutecki)
Component: x86-64Assignee: platform_x86_64 (platform_x86_64)
Status: CLOSED CODE_FIX    
Severity: normal CC: justinmattock, maciej.rutecki, rjw, venki
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 2.6.35-rc3 Subsystem:
Regression: Yes Bisected commit-id:
Bug Depends on:    
Bug Blocks: 16055    

Description Maciej Rutecki 2010-07-03 18:49:47 UTC
Subject    : X:2252 conflicting memory types 40000000-48000000 uncached-minus<->write-combining
Submitter  : "Justin P. Mattock" <justinmattock@gmail.com>
Date       : 2010-07-02 20:04
Message-ID : 4C2E464A.8090900@gmail.com
References : http://marc.info/?l=linux-kernel&m=127810110725529&w=2

This entry is being used for tracking a regression from 2.6.34. Please don't
close it until the problem is fixed in the mainline.
Comment 1 Justin P. Mattock 2010-07-03 18:55:42 UTC
the severity should probably be higher due to the system crashing and burning upon "startx"

anyways heres the bisect results:

6a4f3b523779b67e7d560ed42652f8a59f2f9782 is the first bad commit
commit 6a4f3b523779b67e7d560ed42652f8a59f2f9782
Author: Venkatesh Pallipadi <venki@google.com>
Date:   Thu Jun 10 17:45:01 2010 -0700

    x86, pat: Proper init of memtype subtree_max_end

    subtree_max_end that was recently added to struct memtype was not getting
    properly initialized resulting in

    WARNING: kmemcheck: Caught 64-bit read from uninitialized memory
    in memtype_rb_augment_cb()
    reported here
    https://bugzilla.kernel.org/show_bug.cgi?id=16092

    This change fixes the problem.

    Reported-by: Christian Casteyde <casteyde.christian@free.fr>
    Tested-by: Christian Casteyde <casteyde.christian@free.fr>
    Signed-off-by: Venkatesh Pallipadi <venki@google.com>
    LKML-Reference: <1276217101-11515-1-git-send-email-venki@google.com>
    Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
    Cc: Suresh Siddha <suresh.b.siddha@intel.com>

:040000 040000 3446d67f260737b08a47a0c29592fe3d29cce4d8 7d2b85ea5e3b416820374de863ef7c36b37af685 M      arch



reverting this get's things good again..
the problematic code is this:

new->subtree_max_end = new->end;
Comment 2 Maciej Rutecki 2010-07-03 20:33:18 UTC
Caused by:

commit 6a4f3b523779b67e7d560ed42652f8a59f2f9782
Author: Venkatesh Pallipadi <venki@google.com>
Date:   Thu Jun 10 17:45:01 2010 -0700

    x86, pat: Proper init of memtype subtree_max_end

    Reported-by: Christian Casteyde <casteyde.christian@free.fr>
    Tested-by: Christian Casteyde <casteyde.christian@free.fr>
    Signed-off-by: Venkatesh Pallipadi <venki@google.com>
    LKML-Reference: <1276217101-11515-1-git-send-email-venki@google.com>
    Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
    Cc: Suresh Siddha <suresh.b.siddha@intel.com>


First-Bad-Commit : 6a4f3b523779b67e7d560ed42652f8a59f2f9782
Comment 3 Justin P. Mattock 2010-07-04 00:06:03 UTC
this surprisingly works:

From f9f0e694a8ab67e2f20c98a251b4fd90abe86ec5 Mon Sep 17 00:00:00 2001
From: Justin P. Mattock <justinmattock@gmail.com>
Date: Sat, 3 Jul 2010 16:58:45 -0700
Subject: [PATCH]pat_rbtree.c crash with radeon at startx

This seems to get the machine running, but need to find more
info on what is actually going on.

 Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>

---
 arch/x86/mm/pat_rbtree.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/x86/mm/pat_rbtree.c b/arch/x86/mm/pat_rbtree.c
index f20eeec..9e7961a 100644
--- a/arch/x86/mm/pat_rbtree.c
+++ b/arch/x86/mm/pat_rbtree.c
@@ -226,7 +226,7 @@ int rbt_memtype_check_insert(struct memtype *new, unsigned long *ret_type)
         if (ret_type)
             new->type = *ret_type;

-        new->subtree_max_end = new->end;
+        new->subtree_max_end = new->start;
         memtype_rb_insert(&memtype_rbroot, new);
     }
     return err;
-- 
1.6.5.GIT


but need to do more looking into of why etc...
Comment 4 Justin P. Mattock 2010-07-06 03:29:53 UTC
o.k. just received a post about a similar problem.. I tested this patch out and it fixes the issue:
http://git.kernel.org/?p=linux/kernel/git/x86/linux-2.6-tip.git;a=commitdiff;h=2463eb8b3093995e09a0d41b3d78ee0cf5fb4249
Comment 6 Rafael J. Wysocki 2010-07-08 23:36:56 UTC
Fixed by commit b945d6b2554d550fe95caadc61e521c0ad71fb9c .
Comment 7 Justin P. Mattock 2010-07-09 00:17:07 UTC
cool...