Public bug reported:

SRU Justification: This patch has been accepted into the upstream 2.6.27.4 
stable kernel.
It should be pulled into the Ubuntu kernel as well.

TEST CASE: TBD

commit a75aefa2c83b7eea2cced4d7ff70eb1d50e926df
Author: Joe Korty <[EMAIL PROTECTED]>
Date:   Thu Oct 23 18:14:25 2008 -0400

    proc: fix vma display mismatch between /proc/pid/{maps,smaps}
    
    [ backport of 7c88db0cb589df980acfb2f73c3595a0653004ec to 2.7.27.3 by Joe
    Korty <[EMAIL PROTECTED] ]
    
    proc: fix vma display mismatch between /proc/pid/{maps,smaps}
    
    Commit 4752c369789250eafcd7813e11c8fb689235b0d2 aka
    "maps4: simplify interdependence of maps and smaps" broke /proc/pid/smaps,
    causing it to display some vmas twice and other vmas not at all.  For 
example:
    
        grep .- /proc/1/smaps >/tmp/smaps; diff /proc/1/maps /tmp/smaps
    
        1  25d24
        2  < 7fd7e23aa000-7fd7e23ac000 rw-p 7fd7e23aa000 00:00 0
        3  28a28
        4  > ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0  [vsyscall]
    
    The bug has something to do with setting m->version before all the
    seq_printf's have been performed.  show_map was doing this correctly,
    but show_smap was doing this in the middle of its seq_printf sequence.
    This patch arranges things so that the setting of m->version in show_smap
    is also done at the end of its seq_printf sequence.
    
    Testing: in addition to the above grep test, for each process I summed
    up the 'Rss' fields of /proc/pid/smaps and compared that to the 'VmRSS'
    field of /proc/pid/status.  All matched except for Xorg (which has a
    /dev/mem mapping which Rss accounts for but VmRSS does not).  This result
    gives us some confidence that neither /proc/pid/maps nor /proc/pid/smaps
    are any longer skipping or double-counting vmas.
    
    Signed-off-by: Joe Korty <[EMAIL PROTECTED]>
    Cc: Matt Mackall <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Alexey Dobriyan <[EMAIL PROTECTED]>

** Affects: linux (Ubuntu)
     Importance: Undecided
         Status: New

-- 
proc: fix vma display mismatch between /proc/pid/{maps,smaps}
https://bugs.launchpad.net/bugs/293998
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to