04 Mar, 2015

2 commits

  • Linus Torvalds
     
  • This is a tricky story of the new atomic state handling and the legacy
    code fighting over each another. The bug at hand is an underrun of the
    framebuffer reference with subsequent hilarity caused by the load
    detect code. Which is peculiar since the the exact same code works
    fine as the implementation of the legacy setcrtc ioctl.

    Let's look at the ingredients:

    - Currently our code is a crazy mix of legacy modeset interfaces to
    set the parameters and half-baked atomic state tracking underneath.
    While this transition is going we're using the transitional plane
    helpers to update the atomic side (drm_plane_helper_disable/update
    and friends), i.e. plane->state->fb. Since the state structure owns
    the fb those functions take care of that themselves.

    The legacy state (specifically crtc->primary->fb) is still managed
    by the old code (and mostly by the drm core), with the fb reference
    counting done by callers (core drm for the ioctl or the i915 load
    detect code). The relevant commit is

    commit ea2c67bb4affa84080c616920f3899f123786e56
    Author: Matt Roper
    Date: Tue Dec 23 10:41:52 2014 -0800

    drm/i915: Move to atomic plane helpers (v9)

    - drm_plane_helper_disable has special code to handle multiple calls
    in a row - it checks plane->crtc == NULL and bails out. This is to
    match the proper atomic implementation which needs the crtc to get
    at the implied locking context atomic updates always need. See

    commit acf24a395c5a9290189b080383564437101d411c
    Author: Daniel Vetter
    Date: Tue Jul 29 15:33:05 2014 +0200

    drm/plane-helper: transitional atomic plane helpers

    - The universal plane code split out the implicit primary plane from
    the CRTC into it's own full-blown drm_plane object. As part of that
    the setcrtc ioctl (which updated both the crtc mode and primary
    plane) learned to set crtc->primary->crtc on modeset to make sure
    the plane->crtc assignments statate up to date in

    commit e13161af80c185ecd8dc4641d0f5df58f9e3e0af
    Author: Matt Roper
    Date: Tue Apr 1 15:22:38 2014 -0700

    drm: Add drm_crtc_init_with_planes() (v2)

    Unfortunately we've forgotten to update the load detect code. Which
    wasn't a problem since the load detect modeset is temporary and
    always undone before we drop the locks.

    - Finally there is a organically grown history (i.e. don't ask) around
    who sets the legacy plane->fb for the various driver entry points.
    Originally updating that was the drivers duty, but for almost all
    places we've moved that (plus updating the refcounts) into the core.
    Again the exception is the load detect code.

    Taking all together the following happens:
    - The load detect code doesn't set crtc->primary->crtc. This is only
    really an issue on crtcs never before used or when userspace
    explicitly disabled the primary plane.

    - The plane helper glue code short-circuits because of that and leaves
    a non-NULL fb behind in plane->state->fb and plane->fb. The state
    fb isn't a real problem (it's properly refcounted on its own), it's
    just the canary.

    - Load detect code drops the reference for that fb, but doesn't set
    plane->fb = NULL. This is ok since it's still living in that old
    world where drivers had to clear the pointer but the core/callers
    handled the refcounting.

    - On the next modeset the drm core notices plane->fb and takes care of
    refcounting it properly by doing another unref. This drops the
    refcount to zero, leaving state->plane now pointing at freed memory.

    - intel_plane_duplicate_state still assume it owns a reference to that
    very state->fb and bad things start to happen.

    Fix this all by applying the same duct-tape as for the legacy setcrtc
    ioctl code and set crtc->primary->crtc properly.

    Cc: Matt Roper
    Cc: Paul Bolle
    Cc: Rob Clark
    Cc: Paulo Zanoni
    Cc: Sean Paul
    Cc: Matt Roper
    Reported-and-tested-by: Linus Torvalds
    Reported-by: Paul Bolle
    Signed-off-by: Daniel Vetter
    Signed-off-by: Linus Torvalds

    Daniel Vetter
     

03 Mar, 2015

4 commits

  • Pull GPIO fixes from Linus Walleij:
    "Two GPIO fixes:

    - Fix a translation problem in of_get_named_gpiod_flags()

    - Fix a long standing container_of() mistake in the TPS65912 driver"

    * tag 'gpio-v4.0-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio:
    gpio: tps65912: fix wrong container_of arguments
    gpiolib: of: allow of_gpiochip_find_and_xlate to find more than one chip per node

    Linus Torvalds
     
  • …t/evalenti/linux-soc-thermal

    Pull thermal management fixes from Eduardo Valentin:
    "Specifics:

    - Several fixes in tmon tool.

    - Fixes in intel int340x for _ART and _TRT tables.

    - Add id for Avoton SoC into powerclamp driver.

    - Fixes in RCAR thermal driver to remove race conditions and fix fail
    path

    - Fixes in TI thermal driver: removal of unnecessary code and build
    fix if !CONFIG_PM_SLEEP

    - Cleanups in exynos thermal driver

    - Add stubs for include/linux/thermal.h. Now drivers using thermal
    calls but that also work without CONFIG_THERMAL will be able to
    compile for systems that don't care about thermal.

    Note: I am sending this pull on Rui's behalf while he fixes issues in
    his Linux box"

    * 'fixes-for-4.0-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux-soc-thermal:
    thermal: int340x_thermal: Ignore missing _ART, _TRT tables
    thermal/intel_powerclamp: add id for Avoton SoC
    tools/thermal: tmon: silence 'set but not used' warnings
    tools/thermal: tmon: use pkg-config to determine library dependencies
    tools/thermal: tmon: support cross-compiling
    tools/thermal: tmon: add .gitignore
    tools/thermal: tmon: fixup tui windowing calculations
    tools/thermal: tmon: tui: don't hard-code dialog window size assumptions
    tools/thermal: tmon: add min/max macros
    tools/thermal: tmon: add --target-temp parameter
    thermal: exynos: Clean-up code to use oneline entry for exynos compatible table
    thermal: rcar: Make error and remove paths symmetrical with init
    thermal: rcar: Fix race condition between init and interrupt
    thermal: Introduce dummy functions when thermal is not defined
    ti-soc-thermal: Delete an unnecessary check before the function call "cpufreq_cooling_unregister"
    thermal: ti-soc-thermal: bandgap: Fix build warning if !CONFIG_PM_SLEEP

    Linus Torvalds
     
  • Pull md fixes from Neil Brown:
    "Three md fixes:

    - fix a read-balance problem that was reported 2 years ago, but that
    I never noticed the report :-(

    - fix for rare RAID6 problem causing incorrect bitmap updates when
    two devices fail.

    - add __ATTR_PREALLOC annotation now that it is possible"

    * tag 'md/4.0-fixes' of git://neil.brown.name/md:
    md: mark some attributes as pre-alloc
    raid5: check faulty flag for array status during recovery.
    md/raid1: fix read balance when a drive is write-mostly.

    Linus Torvalds
     
  • Pull arch/metag fix from James Hogan:
    "This is just a single patch to fix the KSTK_EIP() and KSTK_ESP()
    macros for metag which have always been erronously returning the PC
    and stack pointer of the task's kernel context rather than from its
    user context saved at entry from userland into the kernel, which
    affects the contents of /proc//maps and /proc//stat"

    * tag 'metag-fixes-v4.0-1' of git://git.kernel.org/pub/scm/linux/kernel/git/jhogan/metag:
    metag: Fix KSTK_EIP() and KSTK_ESP() macros

    Linus Torvalds
     

02 Mar, 2015

5 commits


01 Mar, 2015

18 commits

  • The "usual" path is:

    - rt_mutex_slowlock()
    - set_current_state()
    - task_blocks_on_rt_mutex() (ret 0)
    - __rt_mutex_slowlock()
    - sleep or not but do return with __set_current_state(TASK_RUNNING)
    - back to caller.

    In the early error case where task_blocks_on_rt_mutex() return
    -EDEADLK we never change the task's state back to RUNNING. I
    assume this is intended. Without this change after ww_mutex
    using rt_mutex the selftest passes but later I get plenty of:

    | bad: scheduling from the idle thread!

    backtraces.

    Signed-off-by: Sebastian Andrzej Siewior
    Acked-by: Mike Galbraith
    Cc: Linus Torvalds
    Cc: Maarten Lankhorst
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Fixes: afffc6c1805d ("locking/rtmutex: Optimize setting task running after being blocked")
    Link: http://lkml.kernel.org/r/1425056229-22326-4-git-send-email-bigeasy@linutronix.de
    Signed-off-by: Ingo Molnar

    Sebastian Andrzej Siewior
     
  • Pull drm fixes from Dave Airlie:
    "Just general fixes: radeon, i915, atmel, tegra, amdkfd and one core
    fix"

    * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux: (28 commits)
    drm: atmel-hlcdc: remove clock polarity from crtc driver
    drm/radeon: only enable DP audio if the monitor supports it
    drm/radeon: fix atom aux payload size check for writes (v2)
    drm/radeon: fix 1 RB harvest config setup for TN/RL
    drm/radeon: enable SRBM timeout interrupt on EG/NI
    drm/radeon: enable SRBM timeout interrupt on SI
    drm/radeon: enable SRBM timeout interrupt on CIK v2
    drm/radeon: dump full IB if we hit a packet error
    drm/radeon: disable mclk switching with 120hz+ monitors
    drm/radeon: use drm_mode_vrefresh() rather than mode->vrefresh
    drm/radeon: enable native backlight control on old macs
    drm/i915: Fix frontbuffer false positve.
    drm/i915: Align initial plane backing objects correctly
    drm/i915: avoid processing spurious/shared interrupts in low-power states
    drm/i915: Check obj->vma_list under the struct_mutex
    drm/i915: Fix a use after free, and unbalanced refcounting
    drm: atmel-hlcdc: remove useless pm_runtime_put_sync in probe
    drm: atmel-hlcdc: reset layer A2Q and UPDATE bits when disabling it
    drm: Fix deadlock due to getconnector locking changes
    drm/i915: Dell Chromebook 11 has PWM backlight
    ...

    Linus Torvalds
     
  • Pull block layer fixes from Jens Axboe:
    "Two smaller fixes for this cycle:

    - A fixup from Keith so that NVMe compiles without BLK_INTEGRITY,
    basically just moving the code around appropriately.

    - A fixup for shm, fixing an oops in shmem_mapping() for mapping with
    no inode. From Sasha"

    [ The shmem fix doesn't look block-layer-related, but fixes a bug that
    happened due to the backing_dev_info removal.. - Linus ]

    * 'for-linus' of git://git.kernel.dk/linux-block:
    mm: shmem: check for mapping owner before dereferencing
    NVMe: Fix for BLK_DEV_INTEGRITY not set

    Linus Torvalds
     
  • Pull xfs fixes from Dave Chinner:
    "These are fixes for regressions/bugs introduced in the 4.0 merge cycle
    and problems discovered during the merge window that need to be pushed
    back to stable kernels ASAP.

    This contains:
    - ensure quota type is reset in on-disk dquots
    - fix missing partial EOF block data flush on truncate extension
    - fix transaction leak in error handling for new pnfs block layout
    support
    - add missing target_ip check to RENAME_EXCHANGE"

    * tag 'xfs-for-linus-4.0-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/dgc/linux-xfs:
    xfs: cancel failed transaction in xfs_fs_commit_blocks()
    xfs: Ensure we have target_ip for RENAME_EXCHANGE
    xfs: ensure truncate forces zeroed blocks to disk
    xfs: Fix quota type in quota structures when reusing quota file

    Linus Torvalds
     
  • Merge misc fixes from Andrew Morton:
    "13 fixes"

    * emailed patches from Andrew Morton :
    mm: add missing __PAGETABLE_{PUD,PMD}_FOLDED defines
    mm: page_alloc: revert inadvertent !__GFP_FS retry behavior change
    kernel/sys.c: fix UNAME26 for 4.0
    mm: memcontrol: use "max" instead of "infinity" in control knobs
    zram: use proper type to update max_used_pages
    drivers/rtc/rtc-ds1685.c: fix conditional in ds1685_rtc_sysfs_time_regs_{show,store}
    nilfs2: fix potential memory overrun on inode
    scripts/gdb: add empty package initialization script
    rtc: ds1685: remove superfluous checks for out-of-range u8 values
    rtc: ds1685: fix ds1685_rtc_alarm_irq_enable build error
    memcg: fix low limit calculation
    mm/nommu: fix memory leak
    ocfs2: update web page + git tree in documentation

    Linus Torvalds
     
  • Core mm expects __PAGETABLE_{PUD,PMD}_FOLDED to be defined if these page
    table levels folded. Usually, these defines are provided by
    and .

    But some architectures fold page table levels in a custom way. They
    need to define these macros themself. This patch adds missing defines.

    The patch fixes mm->nr_pmds underflow and eliminates dead __pmd_alloc()
    and __pud_alloc() on architectures without these page table levels.

    Signed-off-by: Kirill A. Shutemov
    Cc: Aaro Koskinen
    Cc: David Howells
    Cc: Geert Uytterhoeven
    Cc: Heiko Carstens
    Cc: Helge Deller
    Cc: "James E.J. Bottomley"
    Cc: Koichi Yasutake
    Cc: Martin Schwidefsky
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Kirill A. Shutemov
     
  • Historically, !__GFP_FS allocations were not allowed to invoke the OOM
    killer once reclaim had failed, but nevertheless kept looping in the
    allocator.

    Commit 9879de7373fc ("mm: page_alloc: embed OOM killing naturally into
    allocation slowpath"), which should have been a simple cleanup patch,
    accidentally changed the behavior to aborting the allocation at that
    point. This creates problems with filesystem callers (?) that currently
    rely on the allocator waiting for other tasks to intervene.

    Revert the behavior as it shouldn't have been changed as part of a
    cleanup patch.

    Fixes: 9879de7373fc ("mm: page_alloc: embed OOM killing naturally into allocation slowpath")
    Signed-off-by: Johannes Weiner
    Acked-by: Michal Hocko
    Reported-by: Tetsuo Handa
    Cc: Theodore Ts'o
    Cc: Dave Chinner
    Acked-by: David Rientjes
    Cc: Oleg Nesterov
    Cc: Mel Gorman
    Cc: [3.19.x]
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Johannes Weiner
     
  • There's a uname workaround for broken userspace which can't handle kernel
    versions of 3.x. Update it for 4.x.

    Signed-off-by: Jon DeVree
    Cc: Andi Kleen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jon DeVree
     
  • The memcg control knobs indicate the highest possible value using the
    symbolic name "infinity", which is long and awkward to type.

    Switch to the string "max", which is just as descriptive but shorter and
    sweeter.

    This changes a user interface, so do it before the release and before
    the development flag is dropped from the default hierarchy.

    Signed-off-by: Johannes Weiner
    Cc: Michal Hocko
    Cc: Tejun Heo
    Cc: Vladimir Davydov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Johannes Weiner
     
  • max_used_pages is defined as atomic_long_t so we need to use unsigned
    long to keep temporary value for it rather than int which is smaller
    than unsigned long in a 64 bit system.

    Signed-off-by: Joonsoo Kim
    Cc: Minchan Kim
    Cc: Jerome Marchand
    Cc: Nitin Gupta
    Cc: Sergey Senozhatsky
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joonsoo Kim
     
  • Fix a conditional statement checking for NULL in both
    ds1685_rtc_sysfs_time_regs_show and ds1685_rtc_sysfs_time_regs_store
    that was using a logical AND when it should be using a logical OR so
    that we fail out of the function properly if the condition ever
    evaluates to true.

    Fixes: aaaf5fbf56f1 ("rtc: add driver for DS1685 family of real time clocks")
    Signed-off-by: Joshua Kinard
    Reported-by: Dan Carpenter
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joshua Kinard
     
  • Each inode of nilfs2 stores a root node of a b-tree, and it turned out to
    have a memory overrun issue:

    Each b-tree node of nilfs2 stores a set of key-value pairs and the number
    of them (in "bn_nchildren" member of nilfs_btree_node struct), as well as
    a few other "bn_*" members.

    Since the value of "bn_nchildren" is used for operations on the key-values
    within the b-tree node, it can cause memory access overrun if a large
    number is incorrectly set to "bn_nchildren".

    For instance, nilfs_btree_node_lookup() function determines the range of
    binary search with it, and too large "bn_nchildren" leads
    nilfs_btree_node_get_key() in that function to overrun.

    As for intermediate b-tree nodes, this is prevented by a sanity check
    performed when each node is read from a drive, however, no sanity check
    has been done for root nodes stored in inodes.

    This patch fixes the issue by adding missing sanity check against b-tree
    root nodes so that it's called when on-memory inodes are read from ifile,
    inode metadata file.

    Signed-off-by: Ryusuke Konishi
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ryusuke Konishi
     
  • This got lost during the initial merge process: Python requires an
    __init__.py script, even if empty, in order to accept a directory as
    package. Add it, this time as a non-empty file.

    Signed-off-by: Jan Kiszka
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jan Kiszka
     
  • drivers/rtc/rtc-ds1685.c: In function `ds1685_rtc_read_alarm':
    drivers/rtc/rtc-ds1685.c:402: warning: comparison is always true due to limited range of data type
    drivers/rtc/rtc-ds1685.c:409: warning: comparison is always true due to limited range of data type
    drivers/rtc/rtc-ds1685.c:416: warning: comparison is always true due to limited range of data type
    drivers/rtc/rtc-ds1685.c: In function `ds1685_rtc_set_alarm':
    drivers/rtc/rtc-ds1685.c:475: warning: comparison is always true due to limited range of data type
    drivers/rtc/rtc-ds1685.c:478: warning: comparison is always true due to limited range of data type
    drivers/rtc/rtc-ds1685.c:481: warning: comparison is always true due to limited range of data type

    u8 cannot contain a value larger than 0xff, hence drop the checks.
    Wrapping the checks in unlikely() indicated some sense of humor, though ;-)

    Signed-off-by: Geert Uytterhoeven
    Acked-by: Joshua Kinard
    Cc: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Geert Uytterhoeven
     
  • The newly added ds1685 driver causes a build error when enabled without
    CONFIG_RTC_INTF_DEV:

    drivers/rtc/rtc-ds1685.c:919:22: error: 'ds1685_rtc_alarm_irq_enable' undeclared here (not in a function)
    .alarm_irq_enable = ds1685_rtc_alarm_irq_enable,

    Apparently the driver was incorrectly changed to reflect the interface
    change from 16380c153a69c ("RTC: Convert rtc drivers to use the
    alarm_irq_enable method"), which removed the respective #ifdef from all
    other rtc drivers.

    This does the same change that was merged for the other drivers before and
    removes the #ifdef, allowing the interrupts to be enabled through the
    in-kernel rtc interface independent of the existence of /dev/rtc.

    Fixes: aaaf5fbf56f ("rtc: add driver for DS1685 family of real time clocks")
    Signed-off-by: Arnd Bergmann
    Acked-by: Joshua Kinard
    Cc: Ralf Baechle
    Cc: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arnd Bergmann
     
  • A memcg is considered low limited even when the current usage is equal to
    the low limit. This leads to interesting side effects e.g.
    groups/hierarchies with no memory accounted are considered protected and
    so the reclaim will emit MEMCG_LOW event when encountering them.

    Another and much bigger issue was reported by Joonsoo Kim. He has hit a
    NULL ptr dereference with the legacy cgroup API which even doesn't have
    low limit exposed. The limit is 0 by default but the initial check fails
    for memcg with 0 consumption and parent_mem_cgroup() would return NULL if
    use_hierarchy is 0 and so page_counter_read would try to dereference NULL.

    I suppose that the current implementation is just an overlook because the
    documentation in Documentation/cgroups/unified-hierarchy.txt says:

    "The memory.low boundary on the other hand is a top-down allocated
    reserve. A cgroup enjoys reclaim protection when it and all its
    ancestors are below their low boundaries"

    Fix the usage and the low limit comparision in mem_cgroup_low accordingly.

    Fixes: 241994ed8649 (mm: memcontrol: default hierarchy interface for memory)
    Reported-by: Joonsoo Kim
    Signed-off-by: Michal Hocko
    Acked-by: Johannes Weiner
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Michal Hocko
     
  • Maxime reported the following memory leak regression due to commit
    dbc8358c7237 ("mm/nommu: use alloc_pages_exact() rather than its own
    implementation").

    On v3.19, I am facing a memory leak. Each time I run a command one page
    is lost. Here an example with busybox's free command:

    / # free
    total used free shared buffers cached
    Mem: 7928 1972 5956 0 0 492
    -/+ buffers/cache: 1480 6448
    / # free
    total used free shared buffers cached
    Mem: 7928 1976 5952 0 0 492
    -/+ buffers/cache: 1484 6444
    / # free
    total used free shared buffers cached
    Mem: 7928 1980 5948 0 0 492
    -/+ buffers/cache: 1488 6440
    / # free
    total used free shared buffers cached
    Mem: 7928 1984 5944 0 0 492
    -/+ buffers/cache: 1492 6436
    / # free
    total used free shared buffers cached
    Mem: 7928 1988 5940 0 0 492
    -/+ buffers/cache: 1496 6432

    At some point, the system fails to sastisfy 256KB allocations:

    free: page allocation failure: order:6, mode:0xd0
    CPU: 0 PID: 67 Comm: free Not tainted 3.19.0-05389-gacf2cf1-dirty #64
    Hardware name: STM32 (Device Tree Support)
    show_stack+0xb/0xc
    warn_alloc_failed+0x97/0xbc
    __alloc_pages_nodemask+0x295/0x35c
    __get_free_pages+0xb/0x24
    alloc_pages_exact+0x19/0x24
    do_mmap_pgoff+0x423/0x658
    vm_mmap_pgoff+0x3f/0x4e
    load_flat_file+0x20d/0x4f8
    load_flat_binary+0x3f/0x26c
    search_binary_handler+0x51/0xe4
    do_execveat_common+0x271/0x35c
    do_execve+0x19/0x1c
    ret_fast_syscall+0x1/0x4a
    Mem-info:
    Normal per-cpu:
    CPU 0: hi: 0, btch: 1 usd: 0
    active_anon:0 inactive_anon:0 isolated_anon:0
    active_file:0 inactive_file:0 isolated_file:0
    unevictable:123 dirty:0 writeback:0 unstable:0
    free:1515 slab_reclaimable:17 slab_unreclaimable:139
    mapped:0 shmem:0 pagetables:0 bounce:0
    free_cma:0
    Normal free:6060kB min:352kB low:440kB high:528kB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:492kB isolated(anon):0ks
    lowmem_reserve[]: 0 0
    Normal: 23*4kB (U) 22*8kB (U) 24*16kB (U) 23*32kB (U) 23*64kB (U) 23*128kB (U) 1*256kB (U) 0*512kB 0*1024kB 0*2048kB 0*4096kB = 6060kB
    123 total pagecache pages
    2048 pages of RAM
    1538 free pages
    66 reserved pages
    109 slab pages
    -46 pages shared
    0 pages swap cached
    nommu: Allocation of length 221184 from process 67 (free) failed
    Normal per-cpu:
    CPU 0: hi: 0, btch: 1 usd: 0
    active_anon:0 inactive_anon:0 isolated_anon:0
    active_file:0 inactive_file:0 isolated_file:0
    unevictable:123 dirty:0 writeback:0 unstable:0
    free:1515 slab_reclaimable:17 slab_unreclaimable:139
    mapped:0 shmem:0 pagetables:0 bounce:0
    free_cma:0
    Normal free:6060kB min:352kB low:440kB high:528kB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:492kB isolated(anon):0ks
    lowmem_reserve[]: 0 0
    Normal: 23*4kB (U) 22*8kB (U) 24*16kB (U) 23*32kB (U) 23*64kB (U) 23*128kB (U) 1*256kB (U) 0*512kB 0*1024kB 0*2048kB 0*4096kB = 6060kB
    123 total pagecache pages
    Unable to allocate RAM for process text/data, errno 12 SEGV

    This problem happens because we allocate ordered page through
    __get_free_pages() in do_mmap_private() in some cases and we try to free
    individual pages rather than ordered page in free_page_series(). In
    this case, freeing pages whose refcount is not 0 won't be freed to the
    page allocator so memory leak happens.

    To fix the problem, this patch changes __get_free_pages() to
    alloc_pages_exact() since alloc_pages_exact() returns
    physically-contiguous pages but each pages are refcounted.

    Fixes: dbc8358c7237 ("mm/nommu: use alloc_pages_exact() rather than its own implementation").
    Reported-by: Maxime Coquelin
    Tested-by: Maxime Coquelin
    Signed-off-by: Joonsoo Kim
    Cc: [3.19]
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joonsoo Kim
     
  • We (the Ocfs2 project) recently moved the location of our ocfs2-tools
    git tree and project web page. The pertinent discussion can be seen
    here:

    https://oss.oracle.com/pipermail/ocfs2-devel/2015-February/010579.html

    The following patch updates the Ocfs2 documentation in MAINTAINERS,
    ocfs2.txt, and dlmfs.txt. I added our new official web page, changed
    the location of our tools git tree and removed the link to Joel's
    ancient kernel git tree - Andrew has handled our patches for a while
    now.

    Signed-off-by: Mark Fasheh
    Cc: Joel Becker
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mark Fasheh
     

28 Feb, 2015

11 commits

  • Commit:

    1e02ce4cccdc ("x86: Store a per-cpu shadow copy of CR4")

    added a shadow CR4 such that reads and writes that do not
    modify the CR4 execute much faster than always reading the
    register itself.

    The change modified cpu_init() in common.c, so that the
    shadow CR4 gets initialized before anything uses it.

    Unfortunately, there's two cpu_init()s in common.c. There's
    one for 64-bit and one for 32-bit. The commit only added
    the shadow init to the 64-bit path, but the 32-bit path
    needs the init too.

    Link: http://lkml.kernel.org/r/20150227125208.71c36402@gandalf.local.home Fixes: 1e02ce4cccdc "x86: Store a per-cpu shadow copy of CR4"
    Signed-off-by: Steven Rostedt
    Acked-by: Andy Lutomirski
    Cc: Peter Zijlstra (Intel)
    Cc: Linus Torvalds
    Link: http://lkml.kernel.org/r/20150227145019.2bdd4354@gandalf.local.home
    Signed-off-by: Ingo Molnar

    Steven Rostedt
     
  • Signed-off-by: Ingo Molnar

    Ingo Molnar
     
  • Zhang Rui
     
  • It is possible that _ART/_TRT tables are missing or have errors.
    Ignore those failures, as INT3400 thermal zone is still required
    for _OSC or mode switch.

    Signed-off-by: Srinivas Pandruvada
    Signed-off-by: Zhang Rui

    Srinivas Pandruvada
     
  • Enable Intel Powerclamp driver on Atom* Processor C2000 Product
    Family for Microservers (Avoton). Avoton - SoCs for micro-servers
    has package C-states which can be used for idle injection.

    Reported-by: Jose Navarro
    Suggested-by: Jacob Pan
    Tested-by: Jose Carlos Venegas Munoz
    Signed-off-by: Miguel Bernal Marin
    Signed-off-by: Zhang Rui

    Miguel Bernal Marin
     
  • gcc complains about the 'cols' variable being unused. This is
    unavoidable, given the ncurses getmaxyx() macro-based API, which wants
    to assign to a variable directly, even when we're not going to use it.

    Warning:

    gcc -O1 -Wall -Wshadow -W -Wformat -Wimplicit-function-declaration -Wimplicit-int -fstack-protector -D VERSION=\"1.0\" -c -o tui.o tui.c
    tui.c: In function ‘show_dialogue’:
    tui.c:288:12: warning: variable ‘cols’ set but not used [-Wunused-but-set-variable]
    int rows, cols;
    ^

    So, add a hack to get rid of that warning.

    Signed-off-by: Brian Norris
    Acked-by: Jacob Pan
    Reviewed-by: Florian Fainelli
    Signed-off-by: Zhang Rui

    Brian Norris
     
  • Some distros (e.g., Arch Linux) don't package the tinfo library
    separately from ncurses, so don't unconditionally include it. Instead,
    use pkg-config.

    The $(STATIC) ugliness is to handle the reported build case from commit
    6b533269fb25 ("tools/thermal: tmon: fix compilation errors when building
    statically"), where a developer wants to be able to build with:

    make LDFLAGS=-static

    which requires an additional pkg-config flag.

    Finally, support a lowest common denominator fallback (-lpanel
    -lncurses) for build systems that don't have pkg-config entries for
    ncurses.

    Signed-off-by: Brian Norris
    Acked-by: Jacob Pan
    Reviewed-by: Florian Fainelli
    Signed-off-by: Zhang Rui

    Brian Norris
     
  • We might want to prepare CFLAGS outside of this Makefile, so don't
    overwrite its initial value.

    Then, support $(CROSS_COMPILE), so we can use a cross-compile toolchain.

    Signed-off-by: Brian Norris
    Acked-by: Jacob Pan
    Reviewed-by: Florian Fainelli
    Signed-off-by: Zhang Rui

    Brian Norris
     
  • Signed-off-by: Brian Norris
    Acked-by: Jacob Pan
    Reviewed-by: Florian Fainelli
    Signed-off-by: Zhang Rui

    Brian Norris
     
  • The number of rows in the dialog vary according to the number of cooling
    devices. However, some of the windowing computations were assuming a
    fixed number of rows. This computation is OK when we have between 4 and
    9 cooling devices (and they wrap to the next column), but with fewer
    devices, we end up printing off the end of the window.

    This unifies the row computation into a single function and uses that
    throughout the TUI code. This also accounts for increasing the number of
    rows when there are more than 9 total cooling devices.

    Signed-off-by: Brian Norris
    Acked-by: Jacob Pan
    Reviewed-by: Florian Fainelli
    Signed-off-by: Zhang Rui

    Brian Norris
     
  • We can use the ncurses API to get the number of rows.

    Signed-off-by: Brian Norris
    Acked-by: Jacob Pan
    Reviewed-by: Florian Fainelli
    Signed-off-by: Zhang Rui

    Brian Norris