05 Jun, 2014

2 commits

  • attr.sched_policy is u32, therefore a comparison against < 0 is never true.
    Fix this by casting sched_policy to int.

    This issue was reported by coverity CID 1219934.

    Fixes: dbdb22754fde ("sched: Disallow sched_attr::sched_policy < 0")
    Signed-off-by: Richard Weinberger
    Signed-off-by: Peter Zijlstra
    Cc: Michael Kerrisk
    Cc: Linus Torvalds
    Link: http://lkml.kernel.org/r/1401741514-7045-1-git-send-email-richard@nod.at
    Signed-off-by: Ingo Molnar

    Richard Weinberger
     
  • As Peter Zijlstra told me, we have the following path:

    do_exit()
    exit_itimers()
    itimer_delete()
    spin_lock_irqsave(&timer->it_lock, &flags);
    timer_delete_hook(timer);
    kc->timer_del(timer) := posix_cpu_timer_del()
    put_task_struct()
    __put_task_struct()
    task_numa_free()
    spin_lock(&grp->lock);

    Which means that task_numa_free() can be called with interrupts
    disabled, which means that we should not be using spin_lock_irq() but
    spin_lock_irqsave() instead. Otherwise we are enabling interrupts while
    holding an interrupt unsafe lock!

    Signed-off-by: Steven Rostedt
    Signed-off-by: Peter Zijlstra
    Cc: Thomas Gleixner
    Cc: Mike Galbraith
    Cc: Eric Dumazet
    Cc: Linus Torvalds
    Link: http://lkml.kernel.org/r/20140527182541.GH11096@twins.programming.kicks-ass.net
    Signed-off-by: Ingo Molnar

    Steven Rostedt
     

22 May, 2014

7 commits

  • Lai found that:

    WARNING: CPU: 1 PID: 13 at arch/x86/kernel/smp.c:124 native_smp_send_reschedule+0x2d/0x4b()
    ...
    migration_cpu_stop+0x1d/0x22

    was caused by set_cpus_allowed_ptr() assuming that cpu_active_mask is
    always a sub-set of cpu_online_mask.

    This isn't true since 5fbd036b552f ("sched: Cleanup cpu_active madness").

    So set active and online at the same time to avoid this particular
    problem.

    Fixes: 5fbd036b552f ("sched: Cleanup cpu_active madness")
    Signed-off-by: Lai Jiangshan
    Signed-off-by: Peter Zijlstra
    Cc: Andrew Morton
    Cc: Gautham R. Shenoy
    Cc: Linus Torvalds
    Cc: Michael wang
    Cc: Paul Gortmaker
    Cc: Rafael J. Wysocki
    Cc: Srivatsa S. Bhat
    Cc: Toshi Kani
    Link: http://lkml.kernel.org/r/53758B12.8060609@cn.fujitsu.com
    Signed-off-by: Ingo Molnar

    Lai Jiangshan
     
  • Tejun reported that his resume was failing due to order-3 allocations
    from sched_domain building.

    Replace the NR_CPUS arrays in there with a dynamically allocated
    array.

    Reported-by: Tejun Heo
    Signed-off-by: Peter Zijlstra
    Cc: Johannes Weiner
    Cc: Steven Rostedt
    Cc: Linus Torvalds
    Link: http://lkml.kernel.org/n/tip-7cysnkw1gik45r864t1nkudh@git.kernel.org
    Signed-off-by: Ingo Molnar

    Peter Zijlstra
     
  • Tejun reported that his resume was failing due to order-3 allocations
    from sched_domain building.

    Replace the NR_CPUS arrays in there with a dynamically allocated
    array.

    Reported-by: Tejun Heo
    Signed-off-by: Peter Zijlstra
    Acked-by: Juri Lelli
    Cc: Johannes Weiner
    Cc: Linus Torvalds
    Link: http://lkml.kernel.org/n/tip-kat4gl1m5a6dwy6nzuqox45e@git.kernel.org
    Signed-off-by: Ingo Molnar

    Peter Zijlstra
     
  • Michael Kerrisk noticed that creating SCHED_DEADLINE reservations
    with certain parameters (e.g, a runtime of something near 2^64 ns)
    can cause a system freeze for some amount of time.

    The problem is that in the interface we have

    u64 sched_runtime;

    while internally we need to have a signed runtime (to cope with
    budget overruns)

    s64 runtime;

    At the time we setup a new dl_entity we copy the first value in
    the second. The cast turns out with negative values when
    sched_runtime is too big, and this causes the scheduler to go crazy
    right from the start.

    Moreover, considering how we deal with deadlines wraparound

    (s64)(a - b) < 0

    we also have to restrict acceptable values for sched_{deadline,period}.

    This patch fixes the thing checking that user parameters are always
    below 2^63 ns (still large enough for everyone).

    It also rewrites other conditions that we check, since in
    __checkparam_dl we don't have to deal with deadline wraparounds
    and what we have now erroneously fails when the difference between
    values is too big.

    Reported-by: Michael Kerrisk
    Suggested-by: Peter Zijlstra
    Signed-off-by: Juri Lelli
    Signed-off-by: Peter Zijlstra
    Cc:
    Cc: Dario Faggioli
    Cc: Dave Jones
    Cc: Linus Torvalds
    Link: http://lkml.kernel.org/r/20140513141131.20d944f81633ee937f256385@gmail.com
    Signed-off-by: Ingo Molnar

    Juri Lelli
     
  • The way we read POSIX one should only call sched_getparam() when
    sched_getscheduler() returns either SCHED_FIFO or SCHED_RR.

    Given that we currently return sched_param::sched_priority=0 for all
    others, extend the same behaviour to SCHED_DEADLINE.

    Requested-by: Michael Kerrisk
    Signed-off-by: Peter Zijlstra
    Acked-by: Michael Kerrisk
    Cc: Dario Faggioli
    Cc: linux-man
    Cc: "Michael Kerrisk (man-pages)"
    Cc: Juri Lelli
    Cc: Linus Torvalds
    Cc:
    Link: http://lkml.kernel.org/r/20140512205034.GH13467@laptop.programming.kicks-ass.net
    Signed-off-by: Ingo Molnar

    Peter Zijlstra
     
  • The scheduler uses policy=-1 to preserve the current policy state to
    implement sys_sched_setparam(), this got exposed to userspace by
    accident through sys_sched_setattr(), cure this.

    Reported-by: Michael Kerrisk
    Signed-off-by: Peter Zijlstra
    Acked-by: Michael Kerrisk
    Cc:
    Cc: Linus Torvalds
    Link: http://lkml.kernel.org/r/20140509085311.GJ30445@twins.programming.kicks-ass.net
    Signed-off-by: Ingo Molnar

    Peter Zijlstra
     
  • The documented[1] behavior of sched_attr() in the proposed man page text is:

    sched_attr::size must be set to the size of the structure, as in
    sizeof(struct sched_attr), if the provided structure is smaller
    than the kernel structure, any additional fields are assumed
    '0'. If the provided structure is larger than the kernel structure,
    the kernel verifies all additional fields are '0' if not the
    syscall will fail with -E2BIG.

    As currently implemented, sched_copy_attr() returns -EFBIG for
    for this case, but the logic in sys_sched_setattr() converts that
    error to -EFAULT. This patch fixes the behavior.

    [1] http://thread.gmane.org/gmane.linux.kernel/1615615/focus=1697760

    Signed-off-by: Michael Kerrisk
    Signed-off-by: Peter Zijlstra
    Cc:
    Cc: Linus Torvalds
    Link: http://lkml.kernel.org/r/536CEC17.9070903@gmail.com
    Signed-off-by: Ingo Molnar

    Michael Kerrisk
     

07 May, 2014

7 commits

  • Also initialize the per-sd variables for newidle load balancing
    in sd_numa_init().

    Signed-off-by: Jason Low
    Acked-by: morten.rasmussen@arm.com
    Cc: daniel.lezcano@linaro.org
    Cc: alex.shi@linaro.org
    Cc: preeti@linux.vnet.ibm.com
    Cc: efault@gmx.de
    Cc: vincent.guittot@linaro.org
    Cc: aswin@hp.com
    Cc: chegu_vinod@hp.com
    Signed-off-by: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1398303035-18255-3-git-send-email-jason.low2@hp.com
    Signed-off-by: Ingo Molnar

    Jason Low
     
  • The following commit:

    e5fc66119ec9 ("sched: Fix race in idle_balance()")

    can potentially cause rq->max_idle_balance_cost to not be updated,
    even when load_balance(NEWLY_IDLE) is attempted and the per-sd
    max cost value is updated.

    Preeti noticed a similar issue with updating rq->next_balance.

    In this patch, we fix this by making sure we still check/update those values
    even if a task gets enqueued while browsing the domains.

    Signed-off-by: Jason Low
    Reviewed-by: Preeti U Murthy
    Signed-off-by: Peter Zijlstra
    Cc: morten.rasmussen@arm.com
    Cc: aswin@hp.com
    Cc: daniel.lezcano@linaro.org
    Cc: alex.shi@linaro.org
    Cc: efault@gmx.de
    Cc: vincent.guittot@linaro.org
    Link: http://lkml.kernel.org/r/1398725155-7591-2-git-send-email-jason.low2@hp.com
    Signed-off-by: Ingo Molnar

    Jason Low
     
  • Tim wrote:

    "The current code will call pick_next_task_fair a second time in the
    slow path if we did not pull any task in our first try. This is
    really unnecessary as we already know no task can be pulled and it
    doubles the delay for the cpu to enter idle.

    We instrumented some network workloads and that saw that
    pick_next_task_fair is frequently called twice before a cpu enters
    idle. The call to pick_next_task_fair can add non trivial latency as
    it calls load_balance which runs find_busiest_group on an hierarchy of
    sched domains spanning the cpus for a large system. For some 4 socket
    systems, we saw almost 0.25 msec spent per call of pick_next_task_fair
    before a cpu can be idled."

    Optimize the second call away for the common case and document the
    dependency.

    Reported-by: Tim Chen
    Signed-off-by: Peter Zijlstra
    Cc: Linus Torvalds
    Cc: Len Brown
    Link: http://lkml.kernel.org/r/20140424100047.GP11096@twins.programming.kicks-ass.net
    Signed-off-by: Ingo Molnar

    Peter Zijlstra
     
  • The check at the beginning of cpupri_find() makes sure that the task_pri
    variable does not exceed the cp->pri_to_cpu array length. But that length
    is CPUPRI_NR_PRIORITIES not MAX_RT_PRIO, where it will miss the last two
    priorities in that array.

    As task_pri is computed from convert_prio() which should never be bigger
    than CPUPRI_NR_PRIORITIES, if the check should cause a panic if it is
    hit.

    Reported-by: Mike Galbraith
    Signed-off-by: Steven Rostedt
    Signed-off-by: Peter Zijlstra
    Cc: stable@vger.kernel.org
    Link: http://lkml.kernel.org/r/1397015410.5212.13.camel@marge.simpson.net
    Signed-off-by: Ingo Molnar

    Steven Rostedt (Red Hat)
     
  • Free cpudl->free_cpus allocated in cpudl_init().

    Signed-off-by: Li Zefan
    Acked-by: Juri Lelli
    Signed-off-by: Peter Zijlstra
    Cc: # 3.14+
    Link: http://lkml.kernel.org/r/534F36CE.2000409@huawei.com
    Signed-off-by: Ingo Molnar

    Li Zefan
     
  • yield_task_dl() is broken:

    o it forces current to be throttled setting its runtime to zero;
    o it sets current's dl_se->dl_new to one, expecting that dl_task_timer()
    will queue it back with proper parameters at replenish time.

    Unfortunately, dl_task_timer() has this check at the very beginning:

    if (!dl_task(p) || dl_se->dl_new)
    goto unlock;

    So, it just bails out and the task is never replenished. It actually
    yielded forever.

    To fix this, introduce a new flag indicating that the task properly yielded
    the CPU before its current runtime expired. While this is a little overdoing
    at the moment, the flag would be useful in the future to discriminate between
    "good" jobs (of which remaining runtime could be reclaimed, i.e. recycled)
    and "bad" jobs (for which dl_throttled task has been set) that needed to be
    stopped.

    Reported-by: yjay.kim
    Signed-off-by: Juri Lelli
    Signed-off-by: Peter Zijlstra
    Link: http://lkml.kernel.org/r/20140429103953.e68eba1b2ac3309214e3dc5a@gmail.com
    Signed-off-by: Ingo Molnar

    Juri Lelli
     
  • Russell reported, that irqtime_account_idle_ticks() takes ages due to:

    for (i = 0; i < ticks; i++)
    irqtime_account_process_tick(current, 0, rq);

    It's sad, that this code was written way _AFTER_ the NOHZ idle
    functionality was available. I charge myself guitly for not paying
    attention when that crap got merged with commit abb74cefa ("sched:
    Export ns irqtimes through /proc/stat")

    So instead of looping nr_ticks times just apply the whole thing at
    once.

    As a side note: The whole cputime_t vs. u64 business in that context
    wants to be cleaned up as well. There is no point in having all these
    back and forth conversions. Lets standardise on u64 nsec for all
    kernel internal accounting and be done with it. Everything else does
    not make sense at all for fine grained accounting. Frederic, can you
    please take care of that?

    Reported-by: Russell King
    Signed-off-by: Thomas Gleixner
    Reviewed-by: Paul E. McKenney
    Signed-off-by: Peter Zijlstra
    Cc: Venkatesh Pallipadi
    Cc: Shaun Ruffell
    Cc: stable@vger.kernel.org
    Link: http://lkml.kernel.org/r/alpine.DEB.2.02.1405022307000.6261@ionos.tec.linutronix.de
    Signed-off-by: Ingo Molnar

    Thomas Gleixner
     

24 Apr, 2014

1 commit

  • When 'flags' argument to sched_{set,get}attr() syscalls were
    added in:

    6d35ab48090b ("sched: Add 'flags' argument to sched_{set,get}attr() syscalls")

    no description for 'flags' was added. It causes the following warnings on "make htmldocs":

    Warning(/kernel/sched/core.c:3645): No description found for parameter 'flags'
    Warning(/kernel/sched/core.c:3789): No description found for parameter 'flags'

    Signed-off-by: Masanari Iida
    Cc: peterz@infradead.org
    Link: http://lkml.kernel.org/r/1397753955-2914-1-git-send-email-standby24x7@gmail.com
    Signed-off-by: Ingo Molnar

    Masanari Iida
     

23 Apr, 2014

2 commits

  • Pull gpio fixes from Linus Walleij:
    "A small batch of GPIO fixes for the v3.15 series. I expect more to
    come in but I'm a bit behind on mail, might as well get these to you
    right now:

    - Change a crucial semantic ordering in the GPIO irqchip helpers

    - Fix two nasty regressions in the ACPI gpiolib extensions"

    * tag 'gpio-v3.15-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio:
    gpio / ACPI: Prevent potential wrap of GPIO value on OpRegion read
    gpio / ACPI: Don't crash on NULL chip->dev
    gpio: set data first, then chip and handler

    Linus Torvalds
     
  • Pull x86 vdso fix from Peter Anvin:
    "This is a single build fix for building with gold as opposed to GNU
    ld. It got queued up separately and was expected to be pushed during
    the merge window, but it got left behind"

    * 'x86-vdso-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    x86, vdso: Make the vdso linker script compatible with Gold

    Linus Torvalds
     

22 Apr, 2014

1 commit


21 Apr, 2014

8 commits

  • Pull ext4 fixes from Ted Ts'o:
    "These are regression and bug fixes for ext4.

    We had a number of new features in ext4 during this merge window
    (ZERO_RANGE and COLLAPSE_RANGE fallocate modes, renameat, etc.) so
    there were many more regression and bug fixes this time around. It
    didn't help that xfstests hadn't been fully updated to fully stress
    test COLLAPSE_RANGE until after -rc1"

    * tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: (31 commits)
    ext4: disable COLLAPSE_RANGE for bigalloc
    ext4: fix COLLAPSE_RANGE failure with 1KB block size
    ext4: use EINVAL if not a regular file in ext4_collapse_range()
    ext4: enforce we are operating on a regular file in ext4_zero_range()
    ext4: fix extent merging in ext4_ext_shift_path_extents()
    ext4: discard preallocations after removing space
    ext4: no need to truncate pagecache twice in collapse range
    ext4: fix removing status extents in ext4_collapse_range()
    ext4: use filemap_write_and_wait_range() correctly in collapse range
    ext4: use truncate_pagecache() in collapse range
    ext4: remove temporary shim used to merge COLLAPSE_RANGE and ZERO_RANGE
    ext4: fix ext4_count_free_clusters() with EXT4FS_DEBUG and bigalloc enabled
    ext4: always check ext4_ext_find_extent result
    ext4: fix error handling in ext4_ext_shift_extents
    ext4: silence sparse check warning for function ext4_trim_extent
    ext4: COLLAPSE_RANGE only works on extent-based files
    ext4: fix byte order problems introduced by the COLLAPSE_RANGE patches
    ext4: use i_size_read in ext4_unaligned_aio()
    fs: disallow all fallocate operation on active swapfile
    fs: move falloc collapse range check into the filesystem methods
    ...

    Linus Torvalds
     
  • The reverse case of this race (you must msync before read) is
    well known. This is the not so common one.

    It can be triggered only on systems which do a lot of task
    switching and only at UML startup. If you are starting 200+ UMLs
    ~ 0.5% will always die without this fix.

    Signed-off-by: Anton Ivanov
    [rw: minor whitespace fixes]
    Signed-off-by: Richard Weinberger

    Anton Ivanov
     
  • UML does not handle sigpipe. As a result when running it under
    expect or redirecting the IO from the console to an external program
    it will crash if the program stops or exits.

    Signed-off-by: Anton Ivanov
    Signed-off-by: Richard Weinberger

    Anton Ivanov
     
  • Inferring the mount hierarchy correctly from /proc/mounts is hard when MS_MOVE
    may have been used, and the previous code did it wrongly. This change simplifies
    the logic to only require that /dev/shm be _on_ tmpfs (which can be checked
    trivially with statfs) rather than that it be a _mountpoint_ of tmpfs, since
    there isn't a compelling reason to be that strict. We also now check for tmpfs
    on whatever directory we ultimately use so that the user is better informed.

    This change also moves the more standard TMPDIR environment variable check ahead
    of the others.

    Applies to 3.12.

    Signed-off-by: Tristan Schmelcher
    Signed-off-by: Richard Weinberger

    Tristan Schmelcher
     
  • Linus Torvalds
     
  • Pull slave-dmaengine fixes from Vinod Koul:
    "Back from long weekend here in India and now the time to send fixes
    for slave dmaengine.
    - Dan's fix of sirf xlate code
    - Jean's fix for timberland
    - edma fixes by Sekhar for SG handling and Yuan for changing init
    call"

    * 'fixes' of git://git.infradead.org/users/vkoul/slave-dma:
    dma: fix eDMA driver as a subsys_initcall
    dmaengine: sirf: off by one in of_dma_sirfsoc_xlate()
    platform: Fix timberdale dependencies
    dma: edma: fix incorrect SG list handling

    Linus Torvalds
     
  • Pull iommu fixes from Joerg Roedel:
    "Fixes for regressions:

    - fix wrong IOMMU enumeration causing some SCSI device drivers
    initialization failures
    - ARM-SMMU fixes for a panic condition and a wrong return value"

    * tag 'iommu-fixes-v3.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu:
    iommu/arm-smmu: fix panic in arm_smmu_alloc_init_pte
    iommu/arm-smmu: Return 0 on unmap failure
    iommu/vt-d: fix bug in matching PCI devices with DRHD/RMRR descriptors
    iommu/vt-d: Fix get_domain_for_dev() handling of upstream PCIe bridges
    iommu/vt-d: fix memory leakage caused by commit ea8ea46

    Linus Torvalds
     
  • Pull perf tooling fixes from Ingo Molnar:
    "Three small tooling fixes"

    * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    perf tools: Improve error reporting
    perf tools: Adjust symbols in VDSO
    perf kvm: Fix 'Min time' counting in report command

    Linus Torvalds
     

20 Apr, 2014

11 commits

  • …it/jolsa/perf into perf/urgent

    Pull perf/urgent fixes from Jiri Olsa:

    User visible changes:

    * Adjust symbols in VDSO to properly resolve its function names (Vladimir Nikulichev)

    * Improve error reporting for record session failure (Adrien BAK)

    * Fix 'Min time' counting in report command (Alexander Yarygin)

    Signed-off-by: Jiri Olsa <jolsa@redhat.com>
    Signed-off-by: Ingo Molnar <mingo@kernel.org>

    Ingo Molnar
     
  • In the current version, when using perf record, if something goes
    wrong in tools/perf/builtin-record.c:375
    session = perf_session__new(file, false, NULL);

    The error message:
    "Not enough memory for reading per file header"

    is issued. This error message seems to be outdated and is not very
    helpful. This patch proposes to replace this error message by
    "Perf session creation failed"

    I believe this issue has been brought to lkml:
    https://lkml.org/lkml/2014/2/24/458
    although this patch only tackles a (small) part of the issue.

    Additionnaly, this patch improves error reporting in
    tools/perf/util/data.c open_file_write.

    Currently, if the call to open fails, the user is unaware of it.
    This patch logs the error, before returning the error code to
    the caller.

    Reported-by: Will Deacon
    Signed-off-by: Adrien BAK
    Link: http://lkml.kernel.org/r/1397786443.3093.4.camel@beast
    [ Reorganize the changelog into paragraphs ]
    [ Added empty line after fd declaration in open_file_write ]
    Signed-off-by: Jiri Olsa

    Adrien BAK
     
  • pert-report doesn't resolve function names in VDSO:

    $ perf report --stdio -g flat,0.0,15,callee --sort pid
    ...
    8.76%
    0x7fff6b1fe861
    __gettimeofday
    ACE_OS::gettimeofday()
    ...

    In this case symbol values should be adjusted the same way as for executables,
    relocatable objects and prelinked libraries.

    After fix:

    $ perf report --stdio -g flat,0.0,15,callee --sort pid
    ...
    8.76%
    __vdso_gettimeofday
    __gettimeofday
    ACE_OS::gettimeofday()

    Signed-off-by: Vladimir Nikulichev
    Tested-by: Namhyung Kim
    Reviewed-by: Adrian Hunter
    Link: http://lkml.kernel.org/r/969812.163009436-sendEmail@nvs
    Signed-off-by: Jiri Olsa

    Vladimir Nikulichev
     
  • Every event in the perf-kvm has a 'stats' structure, which contains
    max/min/average/etc times of handling this event.
    The problem is that the 'perf-kvm stat report' command always shows
    that 'min time' is 0us for every event. Example:

    # perf kvm stat report

    Analyze events for all VCPUs:

    VM-EXIT Samples Samples% Time% Min Time Max Time Avg time
    [..]
    0xB2 MSCH 12 0.07% 0.00% 0us 8us 7.31us ( +- 2.11% )
    0xB2 CHSC 12 0.07% 0.00% 0us 18us 9.39us ( +- 9.49% )
    0xB2 STPX 8 0.05% 0.00% 0us 2us 1.88us ( +- 7.18% )
    0xB2 STSI 7 0.04% 0.00% 0us 44us 16.49us ( +- 38.20% )
    [..]

    This happens because the 'stats' structure is not initialized and
    stats->min equals to 0. Lets initialize the structure for every
    event after its allocation using init_stats() function. This initializes
    stats->min to -1 and makes 'Min time' statistics counting work:

    # perf kvm stat report

    Analyze events for all VCPUs:

    VM-EXIT Samples Samples% Time% Min Time Max Time Avg time
    [..]
    0xB2 MSCH 12 0.07% 0.00% 6us 8us 7.31us ( +- 2.11% )
    0xB2 CHSC 12 0.07% 0.00% 7us 18us 9.39us ( +- 9.49% )
    0xB2 STPX 8 0.05% 0.00% 1us 2us 1.88us ( +- 7.18% )
    0xB2 STSI 7 0.04% 0.00% 1us 44us 16.49us ( +- 38.20% )
    [..]

    Signed-off-by: Alexander Yarygin
    Signed-off-by: Christian Borntraeger
    Reviewed-by: David Ahern
    Link: http://lkml.kernel.org/r/1397053319-2130-3-git-send-email-borntraeger@de.ibm.com
    [ Fixing the perf examples changelog output ]
    Signed-off-by: Jiri Olsa

    Alexander Yarygin
     
  • Once COLLAPSE RANGE is be disable for ext4 with bigalloc feature till finding
    root-cause of problem. It will be enable with fixing that regression of
    xfstest(generic 075 and 091) again.

    Signed-off-by: Namjae Jeon
    Signed-off-by: Ashish Sangwan
    Reviewed-by: Lukas Czerner
    Signed-off-by: "Theodore Ts'o"

    Namjae Jeon
     
  • When formatting with 1KB or 2KB(not aligned with PAGE SIZE) block
    size, xfstests generic/075 and 091 are failing. The offset supplied to
    function truncate_pagecache_range is block size aligned. In this
    function start offset is re-aligned to PAGE_SIZE by rounding_up to the
    next page boundary. Due to this rounding up, old data remains in the
    page cache when blocksize is less than page size and start offset is
    not aligned with page size. In case of collapse range, we need to
    align start offset to page size boundary by doing a round down
    operation instead of round up.

    Signed-off-by: Namjae Jeon
    Signed-off-by: Ashish Sangwan
    Signed-off-by: "Theodore Ts'o"

    Namjae Jeon
     
  • A va_list needs to be copied in case it needs to be used twice.

    Thanks to Hugh for debugging this issue, leading to various panics.

    Tested:

    lpq84:~# echo "|/foobar12345 %h %h %h %h %h %h %h %h %h %h %h %h %h %h %h %h %h %h %h %h" >/proc/sys/kernel/core_pattern

    'produce_core' is simply : main() { *(int *)0 = 1;}

    lpq84:~# ./produce_core
    Segmentation fault (core dumped)
    lpq84:~# dmesg | tail -1
    [ 614.352947] Core dump to |/foobar12345 lpq84 lpq84 lpq84 lpq84 lpq84 lpq84 lpq84 lpq84 lpq84 lpq84 lpq84 lpq84 lpq84 lpq84 lpq84 lpq84 lpq84 lpq84 lpq84 (null) pipe failed

    Notice the last argument was replaced by a NULL (we were lucky enough to
    not crash, but do not try this on your production machine !)

    After fix :

    lpq83:~# echo "|/foobar12345 %h %h %h %h %h %h %h %h %h %h %h %h %h %h %h %h %h %h %h %h" >/proc/sys/kernel/core_pattern
    lpq83:~# ./produce_core
    Segmentation fault
    lpq83:~# dmesg | tail -1
    [ 740.800441] Core dump to |/foobar12345 lpq83 lpq83 lpq83 lpq83 lpq83 lpq83 lpq83 lpq83 lpq83 lpq83 lpq83 lpq83 lpq83 lpq83 lpq83 lpq83 lpq83 lpq83 lpq83 lpq83 pipe failed

    Fixes: 5fe9d8ca21cc ("coredump: cn_vprintf() has no reason to call vsnprintf() twice")
    Signed-off-by: Eric Dumazet
    Diagnosed-by: Hugh Dickins
    Acked-by: Oleg Nesterov
    Cc: Neil Horman
    Cc: Andrew Morton
    Cc: stable@vger.kernel.org # 3.11+
    Signed-off-by: Linus Torvalds

    Eric Dumazet
     
  • Pull x86 fix from Ingo Molnar:
    "This fixes the preemption-count imbalance crash reported by Owen
    Kibel"

    * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    x86/mce: Fix CMCI preemption bugs

    Linus Torvalds
     
  • Pull scheduler fixes from Ingo Molnar:
    "Two fixes:

    - a SCHED_DEADLINE task selection fix
    - a sched/numa related lockdep splat fix"

    * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    sched: Check for stop task appearance when balancing happens
    sched/numa: Fix task_numa_free() lockdep splat

    Linus Torvalds
     
  • Pull perf fixes from Ingo Molnar:
    "Two kernel side fixes:

    - an Intel uncore PMU driver potential crash fix
    - a kprobes/perf-call-graph interaction fix"

    * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    perf/x86/intel: Use rdmsrl_safe() when initializing RAPL PMU
    kprobes/x86: Fix page-fault handling logic

    Linus Torvalds
     
  • Pull drm fixes from Dave Airlie:
    "Unfortunately this contains no easter eggs, its a bit larger than I'd
    like, but I included a patch that just moves code from one file to
    another and I'd like to avoid merge conflicts with that later, so it
    makes it seem worse than it is,

    Otherwise:
    - radeon: fixes to use new microcode to stabilise some cards, use
    some common displayport code, some runtime pm fixes, pll regression
    fixes
    - i915: fix for some context oopses, a warn in a used path, backlight
    fixes
    - nouveau: regression fix
    - omap: a bunch of fixes"

    * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux: (51 commits)
    drm: bochs: drop unused struct fields
    drm: bochs: add power management support
    drm: cirrus: add power management support
    drm: Split out drm_probe_helper.c from drm_crtc_helper.c
    drm/plane-helper: Don't fake-implement primary plane disabling
    drm/ast: fix value check in cbr_scan2
    drm/nouveau/bios: fix a bit shift error introduced by 457e77b
    drm/radeon/ci: make sure mc ucode is loaded before checking the size
    drm/radeon/si: make sure mc ucode is loaded before checking the size
    drm/radeon: improve PLL params if we don't match exactly v2
    drm/radeon: memory leak on bo reservation failure. v2
    drm/radeon: fix VCE fence command
    drm/radeon: re-enable mclk dpm on R7 260X asics
    drm/radeon: add support for newer mc ucode on CI (v2)
    drm/radeon: add support for newer mc ucode on SI (v2)
    drm/radeon: apply more strict limits for PLL params v2
    drm/radeon: update CI DPM powertune settings
    drm/radeon: fix runpm handling on APUs (v4)
    drm/radeon: disable mclk dpm on R7 260X
    drm/tegra: Remove gratuitous pad field
    ...

    Linus Torvalds
     

19 Apr, 2014

1 commit

  • Some i2c fixes over DisplayPort.

    * 'drm-next-3.15-wip' of git://people.freedesktop.org/~deathsimple/linux:
    drm/radeon: Improve vramlimit module param documentation
    drm/radeon: fix audio pin counts for DCE6+ (v2)
    drm/radeon/dp: switch to the common i2c over aux code
    drm/dp/i2c: Update comments about common i2c over dp assumptions (v3)
    drm/dp/i2c: send bare addresses to properly reset i2c connections (v4)
    drm/radeon/dp: handle zero sized i2c over aux transactions (v2)
    drm/i915: support address only i2c-over-aux transactions
    drm/tegra: dp: Support address-only I2C-over-AUX transactions

    Dave Airlie