Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync up with Linus #105

Merged
merged 316 commits into from
Sep 11, 2015
Merged

Sync up with Linus #105

merged 316 commits into from
Sep 11, 2015
This pull request is big! We’re only showing the most recent 250 commits.

Commits on Aug 18, 2015

  1. blk-throttle: clean up blkg_policy_data alloc/init/exit/free methods

    With the recent addition of alloc and free methods, things became
    messier.  This patch reorganizes them according to the followings.
    
    * ->pd_alloc_fn()
    
      Responsible for allocation and static initializations - the ones
      which can be done independent of where the pd might be attached.
    
    * ->pd_init_fn()
    
      Initializations which require the knowledge of where the pd is
      attached.
    
    * ->pd_free_fn()
    
      The counter part of pd_alloc_fn().  Static de-init and freeing.
    
    This leaves ->pd_exit_fn() without any users.  Removed.
    
    While at it, collapse an one liner function throtl_pd_exit(), which
    has only one user, into its user.
    
    Signed-off-by: Tejun Heo <tj@kernel.org>
    Cc: Vivek Goyal <vgoyal@redhat.com>
    Signed-off-by: Jens Axboe <axboe@fb.com>
    htejun authored and axboe committed Aug 18, 2015
    Configuration menu
    Copy the full SHA
    b2ce264 View commit details
    Browse the repository at this point in the history
  2. blkcg: make blkcg_policy methods take a pointer to blkcg_policy_data

    The newly added ->pd_alloc_fn() and ->pd_free_fn() deal with pd
    (blkg_policy_data) while the older ones use blkg (blkcg_gq).  As using
    blkg doesn't make sense for ->pd_alloc_fn() and after allocation pd
    can always be mapped to blkg and given that these are policy-specific
    methods, it makes sense to converge on pd.
    
    This patch makes all methods deal with pd instead of blkg.  Most
    conversions are trivial.  In blk-cgroup.c, a couple method invocation
    sites now test whether pd exists instead of policy state for
    consistency.  This shouldn't cause any behavioral differences.
    
    Signed-off-by: Tejun Heo <tj@kernel.org>
    Cc: Vivek Goyal <vgoyal@redhat.com>
    Signed-off-by: Jens Axboe <axboe@fb.com>
    htejun authored and axboe committed Aug 18, 2015
    Configuration menu
    Copy the full SHA
    a9520cd View commit details
    Browse the repository at this point in the history
  3. blkcg: minor updates around blkcg_policy_data

    * Rename blkcg->pd[] to blkcg->cpd[] so that cpd is consistently used
      for blkcg_policy_data.
    
    * Make blkcg_policy->cpd_init_fn() take blkcg_policy_data instead of
      blkcg.  This makes it consistent with blkg_policy_data methods and
      to-be-added cpd alloc/free methods.
    
    * blkcg_policy_data->blkcg and cpd_to_blkcg() added so that
      cpd_init_fn() can determine the associated blkcg from
      blkcg_policy_data.
    
    v2: blkcg_policy_data->blkcg initializations were missing.  Added.
    
    Signed-off-by: Tejun Heo <tj@kernel.org>
    Cc: Vivek Goyal <vgoyal@redhat.com>
    Cc: Arianna Avanzini <avanzini.arianna@gmail.com>
    Signed-off-by: Jens Axboe <axboe@fb.com>
    htejun authored and axboe committed Aug 18, 2015
    Configuration menu
    Copy the full SHA
    8143764 View commit details
    Browse the repository at this point in the history
  4. blkcg: replace blkcg_policy->cpd_size with ->cpd_alloc/free_fn() methods

    Each active policy has a cpd (blkcg_policy_data) on each blkcg.  The
    cpd's were allocated by blkcg core and each policy could request to
    allocate extra space at the end by setting blkcg_policy->cpd_size
    larger than the size of cpd.
    
    This is a bit unusual but blkg (blkcg_gq) policy data used to be
    handled this way too so it made sense to be consistent; however, blkg
    policy data switched to alloc/free callbacks.
    
    This patch makes similar changes to cpd handling.
    blkcg_policy->cpd_alloc/free_fn() are added to replace ->cpd_size.  As
    cpd allocation is now done from policy side, it can simply allocate a
    larger area which embeds cpd at the beginning.
    
    As ->cpd_alloc_fn() may be able to perform all necessary
    initializations, this patch makes ->cpd_init_fn() optional.
    
    Signed-off-by: Tejun Heo <tj@kernel.org>
    Cc: Vivek Goyal <vgoyal@redhat.com>
    Cc: Arianna Avanzini <avanzini.arianna@gmail.com>
    Signed-off-by: Jens Axboe <axboe@fb.com>
    htejun authored and axboe committed Aug 18, 2015
    Configuration menu
    Copy the full SHA
    e4a9bde View commit details
    Browse the repository at this point in the history
  5. blkcg: inline [__]blkg_lookup()

    blkg_lookup() checks whether the target queue is bypassing and, if
    not, calls __blkg_lookup() which first checks the lookup hint and then
    performs radix tree walk.  The operations upto hint checking are
    trivial and there are many users of this function.  This patch inlines
    blkg_lookup() and the fast path part of __blkg_lookup().  The radix
    tree lookup and hint update are now in blkg_lookup_slowpath().
    
    This will help consolidating blkg handling by easing moving root blkcg
    short-circuit to inlined lookup fast path.
    
    Signed-off-by: Tejun Heo <tj@kernel.org>
    Cc: Vivek Goyal <vgoyal@redhat.com>
    Cc: Arianna Avanzini <avanzini.arianna@gmail.com>
    Signed-off-by: Jens Axboe <axboe@fb.com>
    htejun authored and axboe committed Aug 18, 2015
    Configuration menu
    Copy the full SHA
    24f2904 View commit details
    Browse the repository at this point in the history
  6. blkcg: move root blkg lookup optimization from throtl_lookup_tg() to …

    …__blkg_lookup()
    
    Currently, both throttle and cfq policies implement their own root
    blkg (blkcg_gq) lookup fast path.  This patch moves root blkg
    optimization from throtl_lookup_tg() to __blkg_lookup().  cfq-iosched
    currently doesn't use blkg_lookup() but will be converted and drop the
    optimization too.
    
    Signed-off-by: Tejun Heo <tj@kernel.org>
    Cc: Vivek Goyal <vgoyal@redhat.com>
    Cc: Arianna Avanzini <avanzini.arianna@gmail.com>
    Signed-off-by: Jens Axboe <axboe@fb.com>
    htejun authored and axboe committed Aug 18, 2015
    Configuration menu
    Copy the full SHA
    85b6bc9 View commit details
    Browse the repository at this point in the history
  7. blk-throttle: improve queue bypass handling

    If a queue is bypassing, all blkcg policies should become noops but
    blk-throttle wasn't.  It only became noop if the queue was dying.
    While this wouldn't lead to an oops as falling back to the root blkg
    is safe in this case, this can be a bit surprising - a bypassing queue
    could still be applying throttle limits.
    
    Fix it by removing blk_queue_dying() test in throtl_lookup_create_tg()
    and testing blk_queue_bypass() in blk_throtl_bio() and bypassing
    before doing anything else.
    
    Signed-off-by: Tejun Heo <tj@kernel.org>
    Cc: Vivek Goyal <vgoyal@redhat.com>
    Cc: Arianna Avanzini <avanzini.arianna@gmail.com>
    Signed-off-by: Jens Axboe <axboe@fb.com>
    htejun authored and axboe committed Aug 18, 2015
    Configuration menu
    Copy the full SHA
    c9589f0 View commit details
    Browse the repository at this point in the history
  8. blkcg: consolidate blkg creation in blkcg_bio_issue_check()

    blkg (blkcg_gq) currently is created by blkcg policies invoking
    blkg_lookup_create() which ends up repeating about the same code in
    different policies.  Theoretically, this can avoid the overhead of
    looking and/or creating blkg's if blkcg is enabled but no policy is in
    use; however, the cost of blkg lookup / creation is very low
    especially if only the root blkcg is in use which is highly likely if
    no blkcg policy is in active use - it boils down to a single very
    predictable conditional and surrounding RCU protection.
    
    This patch consolidates blkg creation to a new function
    blkcg_bio_issue_check() which is called during bio issue from
    generic_make_request_checks().  blkcg_bio_issue_check() is now the
    only function which tries to create missing blkg's.  The subsequent
    policy and request_list operations just perform blkg_lookup() and if
    missing falls back to the root.
    
    * blk_get_rl() no longer tries to create blkg.  It uses blkg_lookup()
      instead of blkg_lookup_create().
    
    * blk_throtl_bio() is now called from blkcg_bio_issue_check() with rcu
      read locked and blkg already looked up.  Both throtl_lookup_tg() and
      throtl_lookup_create_tg() are dropped.
    
    * cfq is similarly updated.  cfq_lookup_create_cfqg() is replaced with
      cfq_lookup_cfqg()which uses blkg_lookup().
    
    This consolidates blkg handling and avoids unnecessary blkg creation
    retries under memory pressure.  In addition, this provides a common
    bio entry point into blkcg where things like common accounting can be
    performed.
    
    v2: Build fixes for !CONFIG_CFQ_GROUP_IOSCHED and
        !CONFIG_BLK_DEV_THROTTLING.
    
    Signed-off-by: Tejun Heo <tj@kernel.org>
    Cc: Vivek Goyal <vgoyal@redhat.com>
    Cc: Arianna Avanzini <avanzini.arianna@gmail.com>
    Signed-off-by: Jens Axboe <axboe@fb.com>
    htejun authored and axboe committed Aug 18, 2015
    Configuration menu
    Copy the full SHA
    ae11889 View commit details
    Browse the repository at this point in the history
  9. blkcg: add blkg_[rw]stat->aux_cnt and replace cfq_group->dead_stats w…

    …ith it
    
    cgroup stats are local to each cgroup and doesn't propagate to
    ancestors by default.  When recursive stats are necessary, the sum is
    calculated over all the descendants.  This initially was for backward
    compatibility to support both group-local and recursive stats but this
    mode of operation makes general sense as stat update is much hotter
    thafn reporting those stats.
    
    This however ends up losing recursive stats when a child is removed.
    To work around this, cfq-iosched adds its stats to its parent
    cfq_group->dead_stats which is summed up together when calculating
    recursive stats.
    
    It's planned that the core stats will be moved to blkcg_gq, so we want
    to move the mechanism for keeping track of the stats of dead children
    from cfq to blkcg core.  This patch adds blkg_[rw]stat->aux_cnt which
    are atomic64_t's keeping track of auxiliary counts which are excluded
    when reading local counts but included for recursive.
    
    blkg_[rw]stat_merge() which were used by cfq to implement dead_stats
    are replaced by blkg_[rw]stat_add_aux(), and cfq now forwards stats of
    a dead cgroup to the aux counts of parent->stats instead of separate
    ->dead_stats.
    
    This will also help making blkg_[rw]stats per-cpu.
    
    Signed-off-by: Tejun Heo <tj@kernel.org>
    Cc: Vivek Goyal <vgoyal@redhat.com>
    Signed-off-by: Jens Axboe <axboe@fb.com>
    htejun authored and axboe committed Aug 18, 2015
    Configuration menu
    Copy the full SHA
    e6269c4 View commit details
    Browse the repository at this point in the history
  10. blkcg: make blkcg_[rw]stat per-cpu

    blkcg_[rw]stat are used as stat counters for blkcg policies.  It isn't
    per-cpu by itself and blk-throttle makes it per-cpu by wrapping around
    it.  This patch makes blkcg_[rw]stat per-cpu and drop the ad-hoc
    per-cpu wrapping in blk-throttle.
    
    * blkg_[rw]stat->cnt is replaced with cpu_cnt which is struct
      percpu_counter.  This makes syncp unnecessary as remote accesses are
      handled by percpu_counter itself.
    
    * blkg_[rw]stat_init() can now fail due to percpu allocation failure
      and thus are updated to return int.
    
    * percpu_counters need explicit freeing.  blkg_[rw]stat_exit() added.
    
    * As blkg_rwstat->cpu_cnt[] can't be read directly anymore, reading
      and summing results are stored in ->aux_cnt[] instead.
    
    * Custom per-cpu stat implementation in blk-throttle is removed.
    
    This makes all blkcg stat counters per-cpu without complicating policy
    implmentations.
    
    Signed-off-by: Tejun Heo <tj@kernel.org>
    Cc: Vivek Goyal <vgoyal@redhat.com>
    Signed-off-by: Jens Axboe <axboe@fb.com>
    htejun authored and axboe committed Aug 18, 2015
    Configuration menu
    Copy the full SHA
    24bdb8e View commit details
    Browse the repository at this point in the history
  11. blkcg: make blkg_[rw]stat_recursive_sum() to be able to index into bl…

    …kcg_gq
    
    Currently, blkg_[rw]stat_recursive_sum() assume that the target
    counter is located in pd (blkg_policy_data); however, some counters
    are planned to be moved to blkg (blkcg_gq).
    
    This patch updates blkg_[rw]stat_recursive_sum() to take blkg and
    blkg_policy pointers instead of pd.  If policy is NULL, it indexes
    into blkg.  If non-NULL, into the blkg's pd of the policy.
    
    The existing usages are updated to maintain the current behaviors.
    
    Signed-off-by: Tejun Heo <tj@kernel.org>
    Cc: Vivek Goyal <vgoyal@redhat.com>
    Signed-off-by: Jens Axboe <axboe@fb.com>
    htejun authored and axboe committed Aug 18, 2015
    Configuration menu
    Copy the full SHA
    f12c74c View commit details
    Browse the repository at this point in the history
  12. blkcg: move io_service_bytes and io_serviced stats into blkcg_gq

    Currently, both cfq-iosched and blk-throttle keep track of
    io_service_bytes and io_serviced stats.  While keeping track of them
    separately may be useful during development, it doesn't make much
    sense otherwise.  Also, blk-throttle was counting bio's as IOs while
    cfq-iosched request's, which is more confusing than informative.
    
    This patch adds ->stat_bytes and ->stat_ios to blkg (blkcg_gq),
    removes the counterparts from cfq-iosched and blk-throttle and let
    them print from the common blkg counters.  The common counters are
    incremented during bio issue in blkcg_bio_issue_check().
    
    The outputs are still filtered by whether the policy has
    blkg_policy_data on a given blkg, so cfq's output won't show up if it
    has never been used for a given blkg.  The only times when the outputs
    would differ significantly are when policies are attached on the fly
    or elevators are switched back and forth.  Those are quite exceptional
    operations and I don't think they warrant keeping separate counters.
    
    v3: Update blkio-controller.txt accordingly.
    
    v2: Account IOs during bio issues instead of request completions so
        that bio-based drivers can be handled the same way.
    
    Signed-off-by: Tejun Heo <tj@kernel.org>
    Cc: Vivek Goyal <vgoyal@redhat.com>
    Signed-off-by: Jens Axboe <axboe@fb.com>
    htejun authored and axboe committed Aug 18, 2015
    Configuration menu
    Copy the full SHA
    77ea733 View commit details
    Browse the repository at this point in the history
  13. blkcg: remove cfqg_stats->sectors

    cfq_stats->sectors is a blkg_stat which keeps track of the total
    number of sectors serviced; however, this can be trivially calculated
    from blkcg_gq->stat_bytes.  The only thing necessary is adding up
    READs and WRITEs and then dividing by sector size.
    
    Remove cfqg_stats->sectors and make cfq print "sectors" and
    "sectors_recursive" from stat_bytes.
    
    While this is a bit more code, it removes duplicate stat allocations
    and updates and ensures that the reported stats stay in tune with each
    other.
    
    Signed-off-by: Tejun Heo <tj@kernel.org>
    Cc: Vivek Goyal <vgoyal@redhat.com>
    Signed-off-by: Jens Axboe <axboe@fb.com>
    htejun authored and axboe committed Aug 18, 2015
    Configuration menu
    Copy the full SHA
    702747c View commit details
    Browse the repository at this point in the history
  14. blkcg: reduce stack usage of blkg_rwstat_recursive_sum()

    The recent percpu conversion of blkg_rwstat triggered the following
    warning in certain configurations.
    
     block/blk-cgroup.c:654:1: warning: the frame size of 1360 bytes is larger than 1024 bytes
    
    This is because blkg_rwstat now contains four percpu_counter which can
    be pretty big depending on debug options although it shouldn't be a
    problem in production configs.  This patch removes one of the two
    local blkg_rwstat variables used by blkg_rwstat_recursive_sum() to
    reduce stack usage.
    
    Signed-off-by: Tejun Heo <tj@kernel.org>
    Cc: Vivek Goyal <vgoyal@redhat.com>
    Reported-by: kbuild test robot <fengguang.wu@intel.com>
    Link: http://article.gmane.org/gmane.linux.kernel.cgroups/13835
    Signed-off-by: Jens Axboe <axboe@fb.com>
    htejun authored and axboe committed Aug 18, 2015
    Configuration menu
    Copy the full SHA
    3a7faea View commit details
    Browse the repository at this point in the history
  15. blkcg: remove unnecessary NULL checks from __cfqg_set_weight_device()

    blkg_to_cfqg() and blkcg_to_cfqgd() on a valid blkg with the policy
    enabled are guaranteed to return non-NULL and the counterpart in
    blk-throttle doesn't have these checks either.  Remove the spurious
    NULL checks.
    
    Signed-off-by: Tejun Heo <tj@kernel.org>
    Signed-off-by: Jens Axboe <axboe@fb.com>
    htejun authored and axboe committed Aug 18, 2015
    Configuration menu
    Copy the full SHA
    5332dfc View commit details
    Browse the repository at this point in the history
  16. blkcg: refine error codes returned during blkcg configuration

    blkcg currently returns -EINVAL for most errors which can be pretty
    confusing given that the failure modes are quite varied.  Update the
    error returns so that
    
    * -EINVAL only for syntactic errors.
    * -ERANGE if the value is out of range.
    * -ENODEV if the target device can't be found.
    * -EOPNOTSUPP if the policy is not enabled on the target device.
    
    Signed-off-by: Tejun Heo <tj@kernel.org>
    Signed-off-by: Jens Axboe <axboe@fb.com>
    htejun authored and axboe committed Aug 18, 2015
    Configuration menu
    Copy the full SHA
    20386ce View commit details
    Browse the repository at this point in the history
  17. blkcg: rename subsystem name from blkio to io

    blkio interface has become messy over time and is currently the
    largest.  In addition to the inconsistent naming scheme, it has
    multiple stat files which report more or less the same thing, a number
    of debug stat files which expose internal details which shouldn't have
    been part of the public interface in the first place, recursive and
    non-recursive stats and leaf and non-leaf knobs.
    
    Both recursive vs. non-recursive and leaf vs. non-leaf distinctions
    don't make any sense on the unified hierarchy as only leaf cgroups can
    contain processes.  cgroups is going through a major interface
    revision with the unified hierarchy involving significant fundamental
    usage changes and given that a significant portion of the interface
    doesn't make sense anymore, it's a good time to reorganize the
    interface.
    
    As the first step, this patch renames the external visible subsystem
    name from "blkio" to "io".  This is more concise, matches the other
    two major subsystem names, "cpu" and "memory", and better suited as
    blkcg will be involved in anything writeback related too whether an
    actual block device is involved or not.
    
    As the subsystem legacy_name is set to "blkio", the only userland
    visible change outside the unified hierarchy is that blkcg is reported
    as "io" instead of "blkio" in the subsystem initialized message during
    boot.  On the unified hierarchy, blkcg now appears as "io".
    
    Signed-off-by: Tejun Heo <tj@kernel.org>
    Cc: Li Zefan <lizefan@huawei.com>
    Cc: Johannes Weiner <hannes@cmpxchg.org>
    Cc: cgroups@vger.kernel.org
    Signed-off-by: Jens Axboe <axboe@fb.com>
    htejun authored and axboe committed Aug 18, 2015
    Configuration menu
    Copy the full SHA
    c165b3e View commit details
    Browse the repository at this point in the history
  18. blkcg: mark existing cftypes as legacy

    blkcg is about to grow interface for the unified hierarchy.  Add
    legacy to existing cftypes.
    
    * blkcg_policy->cftypes -> blkcg_policy->legacy_cftypes
    * blk-cgroup.c:blkcg_files -> blkcg_legacy_files
    * cfq-iosched.c:cfq_blkcg_files -> cfq_blkcg_legacy_files
    * blk-throttle.c:throtl_files -> throtl_legacy_files
    
    Pure renames.  No functional change.
    
    Signed-off-by: Tejun Heo <tj@kernel.org>
    Signed-off-by: Jens Axboe <axboe@fb.com>
    htejun authored and axboe committed Aug 18, 2015
    Configuration menu
    Copy the full SHA
    880f50e View commit details
    Browse the repository at this point in the history
  19. blkcg: move body parsing from blkg_conf_prep() to its callers

    Currently, blkg_conf_prep() expects input to be of the following form
    
     MAJ:MIN NUM
    
    and reads the NUM part into blkg_conf_ctx->v.  This is quite
    restrictive and gets in the way in implementing blkcg interface for
    the unified hierarchy.  This patch updates blkg_conf_prep() so that it
    expects
    
     MAJ:MIN BODY_STR
    
    where BODY_STR is an arbitrary string.  blkg_conf_ctx->v is replaced
    with ->body which is a char pointer pointing to the start of BODY_STR.
    Parsing of the body is moved to blkg_conf_prep()'s callers.
    
    To allow using, for example, strsep() on blkg_conf_ctx->val, it is a
    non-const pointer and to accommodate that const is dropped from @input
    too.
    
    This doesn't cause any behavior changes.
    
    Signed-off-by: Tejun Heo <tj@kernel.org>
    Signed-off-by: Jens Axboe <axboe@fb.com>
    htejun authored and axboe committed Aug 18, 2015
    Configuration menu
    Copy the full SHA
    36aa9e5 View commit details
    Browse the repository at this point in the history
  20. blkcg: separate out tg_conf_updated() from tg_set_conf()

    tg_set_conf() is largely consisted of parsing and setting the new
    config and the follow-up application and propagation.  This patch
    separates out the latter part into tg_conf_updated().  This will be
    used to implement interface for the unified hierarchy.
    
    Signed-off-by: Tejun Heo <tj@kernel.org>
    Signed-off-by: Jens Axboe <axboe@fb.com>
    htejun authored and axboe committed Aug 18, 2015
    Configuration menu
    Copy the full SHA
    69948b0 View commit details
    Browse the repository at this point in the history
  21. blkcg: misc preparations for unified hierarchy interface

    * Export blkg_dev_name()
    
    * Drop unnecessary @cft from __cfq_set_weight().
    
    Signed-off-by: Tejun Heo <tj@kernel.org>
    Signed-off-by: Jens Axboe <axboe@fb.com>
    htejun authored and axboe committed Aug 18, 2015
    Configuration menu
    Copy the full SHA
    dd165eb View commit details
    Browse the repository at this point in the history
  22. blkcg: implement interface for the unified hierarchy

    blkcg interface grew to be the biggest of all controllers and
    unfortunately most inconsistent too.  The interface files are
    inconsistent with a number of cloes duplicates.  Some files have
    recursive variants while others don't.  There's distinction between
    normal and leaf weights which isn't intuitive and there are a lot of
    stat knobs which don't make much sense outside of debugging and expose
    too much implementation details to userland.
    
    In the unified hierarchy, everything is always hierarchical and
    internal nodes can't have tasks rendering the two structural issues
    twisting the current interface.  The interface has to be updated in a
    significant anyway and this is a good chance to revamp it as a whole.
    This patch implements blkcg interface for the unified hierarchy.
    
    * (from a previous patch) blkcg is identified by "io" instead of
      "blkio" on the unified hierarchy.  Given that the whole interface is
      updated anyway, the rename shouldn't carry noticeable conversion
      overhead.
    
    * The original interface consisted of 27 files is replaced with the
      following three files.
    
      blkio.stat	: per-blkcg stats
      blkio.weight	: per-cgroup and per-cgroup-queue weight settings
      blkio.max	: per-cgroup-queue bps and iops max limits
    
    Documentation/cgroups/unified-hierarchy.txt updated accordingly.
    
    v2: blkcg_policy->dfl_cftypes wasn't removed on
        blkcg_policy_unregister() corrupting the cftypes list.  Fixed.
    
    Signed-off-by: Tejun Heo <tj@kernel.org>
    Signed-off-by: Jens Axboe <axboe@fb.com>
    htejun authored and axboe committed Aug 18, 2015
    Configuration menu
    Copy the full SHA
    2ee867d View commit details
    Browse the repository at this point in the history
  23. blkcg: s/CFQ_WEIGHT_*/CFQ_WEIGHT_LEGACY_*/

    blkcg is gonna switch to cgroup common weight range as defined by
    CGROUP_WEIGHT_* on the unified hierarchy.  In preparation, rename
    CFQ_WEIGHT_* constants to CFQ_WEIGHT_LEGACY_*.
    
    Signed-off-by: Tejun Heo <tj@kernel.org>
    Cc: Vivek Goyal <vgoyal@redhat.com>
    Cc: Arianna Avanzini <avanzini.arianna@gmail.com>
    Signed-off-by: Jens Axboe <axboe@fb.com>
    htejun authored and axboe committed Aug 18, 2015
    Configuration menu
    Copy the full SHA
    3ecca62 View commit details
    Browse the repository at this point in the history
  24. blkcg: use CGROUP_WEIGHT_* scale for io.weight on the unified hierarchy

    cgroup is trying to make interface consistent across different
    controllers.  For weight based resource control, the knob should have
    the range [1, 10000] and default to 100.  This patch updates
    cfq-iosched so that the weight range conforms.  The internal
    calculations have enough range and the widening of the weight range
    shouldn't cause any problem.
    
    * blkcg_policy->cpd_bind_fn() is added.  If present, this is invoked
      when blkcg is attached to a hierarchy.
    
    * cfq_cpd_init() is updated to use the new default value on the
      unified hierarchy.
    
    * cfq_cpd_bind() callback is implemented to clear per-blkg configs and
      apply the default config matching the hierarchy type.
    
    * cfqd->root_group->[leaf_]weight initialization in cfq_init_queue()
      is moved into !CONFIG_CFQ_GROUP_IOSCHED block.  cfq_cpd_bind() is
      now responsible for initializing the initial weights when blkcg is
      enabled.
    
    Signed-off-by: Tejun Heo <tj@kernel.org>
    Cc: Vivek Goyal <vgoyal@redhat.com>
    Cc: Arianna Avanzini <avanzini.arianna@gmail.com>
    Signed-off-by: Jens Axboe <axboe@fb.com>
    htejun authored and axboe committed Aug 18, 2015
    Configuration menu
    Copy the full SHA
    69d7fde View commit details
    Browse the repository at this point in the history

Commits on Aug 19, 2015

  1. netfilter: nf_tables: Use 32 bit addressing register from nft_type_to…

    …_reg()
    
    nft_type_to_reg() needs to return the register in the new 32 bit addressing,
    otherwise we hit EINVAL when using mappings.
    
    Fixes: 49499c3 ("netfilter: nf_tables: switch registers to 32 bit addressing")
    Reported-by: Andreas Schultz <aschultz@tpip.net>
    Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
    ummakynes committed Aug 19, 2015
    Configuration menu
    Copy the full SHA
    bf79865 View commit details
    Browse the repository at this point in the history
  2. netfilter: bridge: fix IPv6 packets not being bridged with CONFIG_IPV6=n

    230ac49 introduced a dependency to CONFIG_IPV6 which breaks bridging
    of IPv6 packets on a bridge with CONFIG_IPV6=n.
    
    Sysctl entry /proc/sys/net/bridge/bridge-nf-call-ip6tables defaults to 1,
    for this reason packets are handled by br_nf_pre_routing_ipv6(). When compiled
    with CONFIG_IPV6=n this function returns NF_DROP but should return NF_ACCEPT
    to let packets through.
    
    Change CONFIG_IPV6=n br_nf_pre_routing_ipv6() return value to NF_ACCEPT.
    
    Tested with a simple bridge with two interfaces and IPv6 packets trying
    to pass from host on left side to host on right side of the bridge.
    
    Fixes: 230ac49 ("netfilter: bridge: split ipv6 code into separated file")
    Signed-off-by: Bernhard Thaler <bernhard.thaler@wvnet.at>
    Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
    bthaler authored and ummakynes committed Aug 19, 2015
    Configuration menu
    Copy the full SHA
    18e1db6 View commit details
    Browse the repository at this point in the history
  3. arm64: KVM: Optimize arm64 skip 30-50% vfp/simd save/restore on exits

    This patch only saves and restores FP/SIMD registers on Guest access. To do
    this cptr_el2 FP/SIMD trap is set on Guest entry and later checked on exit.
    lmbench, hackbench show significant improvements, for 30-50% exits FP/SIMD
    context is not saved/restored
    
    [chazy/maz: fixed save/restore logic for 32bit guests]
    
    Signed-off-by: Mario Smarduch <m.smarduch@samsung.com>
    Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
    Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
    Mario Smarduch authored and Marc Zyngier committed Aug 19, 2015
    Configuration menu
    Copy the full SHA
    33c76a0 View commit details
    Browse the repository at this point in the history
  4. arm: KVM: keep arm vfp/simd exit handling consistent with arm64

    After enhancing arm64 FP/SIMD exit handling, ARMv7 VFP exit branch is moved
    to guest trap handling. This allows us to keep exit handling flow between both
    architectures consistent.
    
    Signed-off-by: Mario Smarduch <m.smarduch@samsung.com>
    Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
    Mario Smarduch authored and Marc Zyngier committed Aug 19, 2015
    Configuration menu
    Copy the full SHA
    054167b View commit details
    Browse the repository at this point in the history

Commits on Aug 21, 2015

  1. Merge tag 'samsung-clk-driver' of git://git.kernel.org/pub/scm/linux/…

    …kernel/git/kgene/linux-samsung into next/late
    
    Samsung clk driver updates for v4.3
    
    - add cpu clock configuration data and instantiate cpu clock
      for exynos3250, 4210, 4412 and 5250 SoCs to support Samsung
      specific cpu-clock type
    
    * Note this branch has been provided to clk tree as a topic branch
    
    * tag 'samsung-clk-driver' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung:
      clk: exynos4x12: add cpu clock configuration data and instantiate cpu clock
      clk: exynos3250: Add cpu clock configuration data and instaniate cpu clock
      clk: exynos5250: add cpu clock configuration data and instantiate cpu clock
    
    Signed-off-by: Olof Johansson <olof@lixom.net>
    olofj committed Aug 21, 2015
    Configuration menu
    Copy the full SHA
    6b07705 View commit details
    Browse the repository at this point in the history
  2. Merge tag 'samsung-late-dt' of git://git.kernel.org/pub/scm/linux/ker…

    …nel/git/kgene/linux-samsung into next/late
    
    Samsung 2nd DT updates for v4.3
    
    - for exynos3250, 4212, 4412 and 5250
      : add CPU OPP and regulator supply property
    
    - for exynos3250
      : add CPU cooling binding for exynos3250 boards
    
    - for exynos4 SoCs
      : add iommu property to JPEG device
    
    - for exynos4412-odroidu3
      : enable SPI1
    
    - for exynos5250-snow
      : add SPI CS
    
    - for exynos5422
      : add exynos5422-cpus.dtsi to correct cpu order
    
    * Note this branch is depending on tags/samsung-clk-driver
    
    * tag 'samsung-late-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung: (22 commits)
      ARM: dts: add iommu property to JPEG device for exynos4
      ARM: dts: enable SPI1 for exynos4412-odroidu3
      ARM: dts: Add SPI CS on exynos5250-snow
      ARM: dts: Add CPU cooling binding for exynos3250 boards
      ARM: dts: add exynos5422-cpus.dtsi to correct cpu order
      ARM: dts: add CPU OPP and regulator supply property for exynos4x12
      ARM: dts: Add CPU OPP and regulator supply property for exynos3250
      ARM: dts: add CPU OPP and regulator supply property for exynos5250
      ARM: dts: Extend exynos5420-pinctrl nodes using labels instead of paths
      ARM: dts: Include exynos5420-pinctrl after the nodes were defined for exynos5420
      ARM: dts: Extend exynos5250-pinctrl nodes using labels instead of paths
      ARM: dts: Include exynos5250-pinctrl after the nodes were defined for exynos5250
      ARM: dts: Enable thermal-zones for exynos5422-odroidxu3
      ARM: dts: Define default thermal-zones for exynos5422
      ARM: dts: Enable TMU for exynos5422-odroidxu3
      ARM: dts: Add pwm-fan node for exynos5422-odroidxu3
      ARM: dts: Use labels for overriding nodes for exynos4210-universal_c210
      ARM: dts: Set max17047 over heat and voltage thresholds for exynos4412-trats2
      ARM: dts: Enable USB3 regulators for exynos5422-odroidxu3
      ARM: dts: Clean up indentation for exynos5410-smdk5410
      ...
    
    Signed-off-by: Olof Johansson <olof@lixom.net>
    olofj committed Aug 21, 2015
    Configuration menu
    Copy the full SHA
    819167e View commit details
    Browse the repository at this point in the history
  3. Merge tag 'samsung-soc' of git://git.kernel.org/pub/scm/linux/kernel/…

    …git/kgene/linux-samsung into next/late
    
    Samsung SoC updates for v4.3
    
    - add compatible string to exynos_cpufreq_matchs to switch for
      supporting generic cpufreq driver for exynos3250, 4210, 4212
      and 5250 SoCs in mach-exynos/
    
    * tag 'samsung-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung:
      ARM: EXYNOS: switch to using generic cpufreq driver for exynos4x12
      ARM: EXYNOS: Add exynos3250 compatible to use generic cpufreq driver
      ARM: EXYNOS: switch to using generic cpufreq driver for exynos5250
    
    Signed-off-by: Olof Johansson <olof@lixom.net>
    olofj committed Aug 21, 2015
    Configuration menu
    Copy the full SHA
    418012f View commit details
    Browse the repository at this point in the history
  4. Merge tag 'samsung-late-cpufreq-driver' of git://git.kernel.org/pub/s…

    …cm/linux/kernel/git/kgene/linux-samsung into next/late
    
    Samsung cpufreq driver updates for v4.3
    
    - remove exynos4 SoCs and exynos5250 specific cpufreq driver support
      and unselectable rule for arm-exynos-cpufreq.o because of supporting
      generic cpufreq driver for the exynos SoCs
    
    * Note this is depending on tags/samsung-clk-driver, tags/samsung-soc
      and tags/samsung-late-dt
    
    * tag 'samsung-late-cpufreq-driver' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung:
      cpufreq: exynos: Remove unselectable rule for arm-exynos-cpufreq.o
      cpufreq: exynos: remove Exynos4x12 specific cpufreq driver support
      cpufreq: exynos: remove exynos5250 specific cpufreq driver support
    
    Signed-off-by: Olof Johansson <olof@lixom.net>
    olofj committed Aug 21, 2015
    Configuration menu
    Copy the full SHA
    deb1436 View commit details
    Browse the repository at this point in the history
  5. Merge tag 'samsung-defconfig-new' of git://git.kernel.org/pub/scm/lin…

    …ux/kernel/git/kgene/linux-samsung into next/late
    
    Samsung defconfig updates for v4.3
    
    - for exynos_defconfig
      : enable SND_SOC_ODROIDX2 and SND_SIMPLE_CARD for
        Odroid-XU3 to use max98090 audio codec
      : enalbe SENSORS_NTC_THERMISTOR for Peach boards
      : enable cpufreq-dt driver with ONDEMAND governor
        for Exynos SoCs 3250, 4210, 4212, 4412 and 5250
    
    - for multi_v7_defconfig:
      : remove SAMSUNG_USB2PHY and SAMSUNG_USB3PHY are not used now
      : enable SENSORS_NTC_THERMISTOR and EXYNOS_ADC for Peach boards
      : enable REGULATOR_MAX77802 for Peach boards
    
    * tag 'samsung-defconfig-new' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung:
      ARM: exynos_defconfig: Enable cpufreq-dt driver
      ARM: multi_v7_defconfig: Enable max77802 regulator
      ARM: exynos_defconfig: Enable NTC Thermistors support
      ARM: multi_v7_defconfig: Enable NTC Thermistors support
      ARM: multi_v7_defconfig: Remove old Samsung USB PHY configs
      ARM: exynos_defconfig: Enable CONFIG_SND_SOC_ODROIDX2 for Odroid-XU3
    
    Signed-off-by: Olof Johansson <olof@lixom.net>
    olofj committed Aug 21, 2015
    Configuration menu
    Copy the full SHA
    7c4ecc7 View commit details
    Browse the repository at this point in the history

Commits on Aug 22, 2015

  1. KVM: PPC: fix suspicious use of conditional operator

    This was signaled by a static code analysis tool.
    
    Signed-off-by: Laurentiu Tudor <Laurentiu.Tudor@freescale.com>
    Reviewed-by: Scott Wood <scottwood@freescale.com>
    Signed-off-by: Alexander Graf <agraf@suse.de>
    Tudor Laurentiu authored and agraf committed Aug 22, 2015
    Configuration menu
    Copy the full SHA
    f5ffe33 View commit details
    Browse the repository at this point in the history
  2. KVM: PPC: Remove PPC970 from KVM_BOOK3S_64_HV text in Kconfig

    Since the PPC970 support has been removed from the kvm-hv kernel
    module recently, we should also reflect this change in the help
    text of the corresponding Kconfig option.
    
    Signed-off-by: Thomas Huth <thuth@redhat.com>
    Signed-off-by: Alexander Graf <agraf@suse.de>
    huth authored and agraf committed Aug 22, 2015
    Configuration menu
    Copy the full SHA
    129fd42 View commit details
    Browse the repository at this point in the history
  3. KVM: PPC: Fix warnings from sparse

    When compiling the KVM code for POWER with "make C=1", sparse
    complains about functions missing proper prototypes and a 64-bit
    constant missing the ULL prefix. Let's fix this by making the
    functions static or by including the proper header with the
    prototypes, and by appending a ULL prefix to the constant
    PPC_MPPE_ADDRESS_MASK.
    
    Signed-off-by: Thomas Huth <thuth@redhat.com>
    Signed-off-by: Alexander Graf <agraf@suse.de>
    huth authored and agraf committed Aug 22, 2015
    Configuration menu
    Copy the full SHA
    5358a96 View commit details
    Browse the repository at this point in the history
  4. KVM: PPC: add missing pt_regs initialization

    On this switch branch the regs initialization
    doesn't happen so add it.
    This was found with the help of a static
    code analysis tool.
    
    Signed-off-by: Laurentiu Tudor <Laurentiu.Tudor@freescale.com>
    Signed-off-by: Alexander Graf <agraf@suse.de>
    Tudor Laurentiu authored and agraf committed Aug 22, 2015
    Configuration menu
    Copy the full SHA
    845ac98 View commit details
    Browse the repository at this point in the history
  5. KVM: PPC: Book3S HV: Make use of unused threads when running guests

    When running a virtual core of a guest that is configured with fewer
    threads per core than the physical cores have, the extra physical
    threads are currently unused.  This makes it possible to use them to
    run one or more other virtual cores from the same guest when certain
    conditions are met.  This applies on POWER7, and on POWER8 to guests
    with one thread per virtual core.  (It doesn't apply to POWER8 guests
    with multiple threads per vcore because they require a 1-1 virtual to
    physical thread mapping in order to be able to use msgsndp and the
    TIR.)
    
    The idea is that we maintain a list of preempted vcores for each
    physical cpu (i.e. each core, since the host runs single-threaded).
    Then, when a vcore is about to run, it checks to see if there are
    any vcores on the list for its physical cpu that could be
    piggybacked onto this vcore's execution.  If so, those additional
    vcores are put into state VCORE_PIGGYBACK and their runnable VCPU
    threads are started as well as the original vcore, which is called
    the master vcore.
    
    After the vcores have exited the guest, the extra ones are put back
    onto the preempted list if any of their VCPUs are still runnable and
    not idle.
    
    This means that vcpu->arch.ptid is no longer necessarily the same as
    the physical thread that the vcpu runs on.  In order to make it easier
    for code that wants to send an IPI to know which CPU to target, we
    now store that in a new field in struct vcpu_arch, called thread_cpu.
    
    Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
    Tested-by: Laurent Vivier <lvivier@redhat.com>
    Signed-off-by: Paul Mackerras <paulus@samba.org>
    Signed-off-by: Alexander Graf <agraf@suse.de>
    paulusmack authored and agraf committed Aug 22, 2015
    Configuration menu
    Copy the full SHA
    ec25716 View commit details
    Browse the repository at this point in the history
  6. KVM: PPC: Book3S HV: Implement dynamic micro-threading on POWER8

    This builds on the ability to run more than one vcore on a physical
    core by using the micro-threading (split-core) modes of the POWER8
    chip.  Previously, only vcores from the same VM could be run together,
    and (on POWER8) only if they had just one thread per core.  With the
    ability to split the core on guest entry and unsplit it on guest exit,
    we can run up to 8 vcpu threads from up to 4 different VMs, and we can
    run multiple vcores with 2 or 4 vcpus per vcore.
    
    Dynamic micro-threading is only available if the static configuration
    of the cores is whole-core mode (unsplit), and only on POWER8.
    
    To manage this, we introduce a new kvm_split_mode struct which is
    shared across all of the subcores in the core, with a pointer in the
    paca on each thread.  In addition we extend the core_info struct to
    have information on each subcore.  When deciding whether to add a
    vcore to the set already on the core, we now have two possibilities:
    (a) piggyback the vcore onto an existing subcore, or (b) start a new
    subcore.
    
    Currently, when any vcpu needs to exit the guest and switch to host
    virtual mode, we interrupt all the threads in all subcores and switch
    the core back to whole-core mode.  It may be possible in future to
    allow some of the subcores to keep executing in the guest while
    subcore 0 switches to the host, but that is not implemented in this
    patch.
    
    This adds a module parameter called dynamic_mt_modes which controls
    which micro-threading (split-core) modes the code will consider, as a
    bitmap.  In other words, if it is 0, no micro-threading mode is
    considered; if it is 2, only 2-way micro-threading is considered; if
    it is 4, only 4-way, and if it is 6, both 2-way and 4-way
    micro-threading mode will be considered.  The default is 6.
    
    With this, we now have secondary threads which are the primary thread
    for their subcore and therefore need to do the MMU switch.  These
    threads will need to be started even if they have no vcpu to run, so
    we use the vcore pointer in the PACA rather than the vcpu pointer to
    trigger them.
    
    It is now possible for thread 0 to find that an exit has been
    requested before it gets to switch the subcore state to the guest.  In
    that case we haven't added the guest's timebase offset to the
    timebase, so we need to be careful not to subtract the offset in the
    guest exit path.  In fact we just skip the whole path that switches
    back to host context, since we haven't switched to the guest context.
    
    Signed-off-by: Paul Mackerras <paulus@samba.org>
    Signed-off-by: Alexander Graf <agraf@suse.de>
    paulusmack authored and agraf committed Aug 22, 2015
    Configuration menu
    Copy the full SHA
    b4deba5 View commit details
    Browse the repository at this point in the history
  7. KVM: PPC: Book3S HV: Fix race in reading change bit when removing HPTE

    The reference (R) and change (C) bits in a HPT entry can be set by
    hardware at any time up until the HPTE is invalidated and the TLB
    invalidation sequence has completed.  This means that when removing
    a HPTE, we need to read the HPTE after the invalidation sequence has
    completed in order to obtain reliable values of R and C.  The code
    in kvmppc_do_h_remove() used to do this.  However, commit 6f22bd3
    ("KVM: PPC: Book3S HV: Make HTAB code LE host aware") removed the
    read after invalidation as a side effect of other changes.  This
    restores the read of the HPTE after invalidation.
    
    The user-visible effect of this bug would be that when migrating a
    guest, there is a small probability that a page modified by the guest
    and then unmapped by the guest might not get re-transmitted and thus
    the destination might end up with a stale copy of the page.
    
    Fixes: 6f22bd3
    Signed-off-by: Paul Mackerras <paulus@samba.org>
    Signed-off-by: Alexander Graf <agraf@suse.de>
    paulusmack authored and agraf committed Aug 22, 2015
    Configuration menu
    Copy the full SHA
    1e5bf45 View commit details
    Browse the repository at this point in the history
  8. KVM: PPC: Book3S HV: Fix bug in dirty page tracking

    This fixes a bug in the tracking of pages that get modified by the
    guest.  If the guest creates a large-page HPTE, writes to memory
    somewhere within the large page, and then removes the HPTE, we only
    record the modified state for the first normal page within the large
    page, when in fact the guest might have modified some other normal
    page within the large page.
    
    To fix this we use some unused bits in the rmap entry to record the
    order (log base 2) of the size of the page that was modified, when
    removing an HPTE.  Then in kvm_test_clear_dirty_npages() we use that
    order to return the correct number of modified pages.
    
    The same thing could in principle happen when removing a HPTE at the
    host's request, i.e. when paging out a page, except that we never
    page out large pages, and the guest can only create large-page HPTEs
    if the guest RAM is backed by large pages.  However, we also fix
    this case for the sake of future-proofing.
    
    The reference bit is also subject to the same loss of information.  We
    don't make the same fix here for the reference bit because there isn't
    an interface for userspace to find out which pages the guest has
    referenced, whereas there is one for userspace to find out which pages
    the guest has modified.  Because of this loss of information, the
    kvm_age_hva_hv() and kvm_test_age_hva_hv() functions might incorrectly
    say that a page has not been referenced when it has, but that doesn't
    matter greatly because we never page or swap out large pages.
    
    Signed-off-by: Paul Mackerras <paulus@samba.org>
    Signed-off-by: Alexander Graf <agraf@suse.de>
    paulusmack authored and agraf committed Aug 22, 2015
    Configuration menu
    Copy the full SHA
    08fe1e7 View commit details
    Browse the repository at this point in the history
  9. KVM: PPC: Book3S HV: Implement H_CLEAR_REF and H_CLEAR_MOD

    This adds implementations for the H_CLEAR_REF (test and clear reference
    bit) and H_CLEAR_MOD (test and clear changed bit) hypercalls.
    
    When clearing the reference or change bit in the guest view of the HPTE,
    we also have to clear it in the real HPTE so that we can detect future
    references or changes.  When we do so, we transfer the R or C bit value
    to the rmap entry for the underlying host page so that kvm_age_hva_hv(),
    kvm_test_age_hva_hv() and kvmppc_hv_get_dirty_log() know that the page
    has been referenced and/or changed.
    
    These hypercalls are not used by Linux guests.  These implementations
    have been tested using a FreeBSD guest.
    
    Signed-off-by: Paul Mackerras <paulus@samba.org>
    Signed-off-by: Alexander Graf <agraf@suse.de>
    paulusmack authored and agraf committed Aug 22, 2015
    Configuration menu
    Copy the full SHA
    cdeee51 View commit details
    Browse the repository at this point in the history
  10. KVM: PPC: Book3S HV: Fix preempted vcore list locking

    When a vcore gets preempted, we put it on the preempted vcore list for
    the current CPU.  The runner task then calls schedule() and comes back
    some time later and takes itself off the list.  We need to be careful
    to lock the list that it was put onto, which may not be the list for the
    current CPU since the runner task may have moved to another CPU.
    
    Signed-off-by: Paul Mackerras <paulus@samba.org>
    Signed-off-by: Alexander Graf <agraf@suse.de>
    paulusmack authored and agraf committed Aug 22, 2015
    Configuration menu
    Copy the full SHA
    402813f View commit details
    Browse the repository at this point in the history
  11. KVM: PPC: Book3S HV: Fix preempted vcore stolen time calculation

    Whenever a vcore state is VCORE_PREEMPT we need to be counting stolen
    time for it.  This currently isn't the case when we have a vcore that
    no longer has any runnable threads in it but still has a runner task,
    so we do an explicit call to kvmppc_core_start_stolen() in that case.
    
    Signed-off-by: Paul Mackerras <paulus@samba.org>
    Signed-off-by: Alexander Graf <agraf@suse.de>
    paulusmack authored and agraf committed Aug 22, 2015
    Configuration menu
    Copy the full SHA
    563a1e9 View commit details
    Browse the repository at this point in the history
  12. KVM: PPC: Book3S: correct width in XER handling

    In 64 bit kernels, the Fixed Point Exception Register (XER) is a 64
    bit field (e.g. in kvm_regs and kvm_vcpu_arch) and in most places it is
    accessed as such.
    
    This patch corrects places where it is accessed as a 32 bit field by a
    64 bit kernel.  In some cases this is via a 32 bit load or store
    instruction which, depending on endianness, will cause either the
    lower or upper 32 bits to be missed.  In another case it is cast as a
    u32, causing the upper 32 bits to be cleared.
    
    This patch corrects those places by extending the access methods to
    64 bits.
    
    Signed-off-by: Sam Bobroff <sam.bobroff@au1.ibm.com>
    Reviewed-by: Laurent Vivier <lvivier@redhat.com>
    Reviewed-by: Thomas Huth <thuth@redhat.com>
    Tested-by: Thomas Huth <thuth@redhat.com>
    Signed-off-by: Alexander Graf <agraf@suse.de>
    sambltc authored and agraf committed Aug 22, 2015
    Configuration menu
    Copy the full SHA
    c63517c View commit details
    Browse the repository at this point in the history
  13. Merge tag 'kvm-arm-for-4.3' of git://git.kernel.org/pub/scm/linux/ker…

    …nel/git/kvmarm/kvmarm into kvm-queue
    
    KVM/ARM changes for 4.3
    
    - Full debug support for arm64
    - Active state switching for timer interrupts
    - Lazy FP/SIMD save/restore for arm64
    - Generic ARMv8 target
    bonzini committed Aug 22, 2015
    Configuration menu
    Copy the full SHA
    ce8c669 View commit details
    Browse the repository at this point in the history
  14. Merge tag 'signed-kvm-ppc-next' of git://github.com/agraf/linux-2.6 i…

    …nto kvm-queue
    
    Patch queue for ppc - 2015-08-22
    
    Highlights for KVM PPC this time around:
    
      - Book3S: A few bug fixes
      - Book3S: Allow micro-threading on POWER8
    bonzini committed Aug 22, 2015
    Configuration menu
    Copy the full SHA
    e3dbc57 View commit details
    Browse the repository at this point in the history

Commits on Aug 28, 2015

  1. netfilter: ipset: Out of bound access in hash:net* types fixed

    Dave Jones reported that KASan detected out of bounds access in hash:net*
    types:
    
    [   23.139532] ==================================================================
    [   23.146130] BUG: KASan: out of bounds access in hash_net4_add_cidr+0x1db/0x220 at addr ffff8800d4844b58
    [   23.152937] Write of size 4 by task ipset/457
    [   23.159742] =============================================================================
    [   23.166672] BUG kmalloc-512 (Not tainted): kasan: bad access detected
    [   23.173641] -----------------------------------------------------------------------------
    [   23.194668] INFO: Allocated in hash_net_create+0x16a/0x470 age=7 cpu=1 pid=456
    [   23.201836]  __slab_alloc.constprop.66+0x554/0x620
    [   23.208994]  __kmalloc+0x2f2/0x360
    [   23.216105]  hash_net_create+0x16a/0x470
    [   23.223238]  ip_set_create+0x3e6/0x740
    [   23.230343]  nfnetlink_rcv_msg+0x599/0x640
    [   23.237454]  netlink_rcv_skb+0x14f/0x190
    [   23.244533]  nfnetlink_rcv+0x3f6/0x790
    [   23.251579]  netlink_unicast+0x272/0x390
    [   23.258573]  netlink_sendmsg+0x5a1/0xa50
    [   23.265485]  SYSC_sendto+0x1da/0x2c0
    [   23.272364]  SyS_sendto+0xe/0x10
    [   23.279168]  entry_SYSCALL_64_fastpath+0x12/0x6f
    
    The bug is fixed in the patch and the testsuite is extended in ipset
    to check cidr handling more thoroughly.
    
    Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
    Jozsef Kadlecsik committed Aug 28, 2015
    Configuration menu
    Copy the full SHA
    6fe7ccf View commit details
    Browse the repository at this point in the history
  2. netfilter: ipset: Fixing unnamed union init

    In continue to proposed Vinson Lee's post [1], this patch fixes compilation
    issues founded at gcc 4.4.7. The initialization of .cidr field of unnamed
    unions causes compilation error in gcc 4.4.x.
    
    References
    
    Visible links
    [1] https://lkml.org/lkml/2015/7/5/74
    
    Signed-off-by: Elad Raz <eladr@mellanox.com>
    Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
    Elad Raz authored and ummakynes committed Aug 28, 2015
    Configuration menu
    Copy the full SHA
    96be5f2 View commit details
    Browse the repository at this point in the history
  3. netfilter: nfnetlink: work around wrong endianess in res_id field

    The convention in nfnetlink is to use network byte order in every header field
    as well as in the attribute payload. The initial version of the batching
    infrastructure assumes that res_id comes in host byte order though.
    
    The only client of the batching infrastructure is nf_tables, so let's add a
    workaround to address this inconsistency. We currently have 11 nfnetlink
    subsystems according to NFNL_SUBSYS_COUNT, so we can assume that the subsystem
    2560, ie. htons(10), will not be allocated anytime soon, so it can be an alias
    of nf_tables from the nfnetlink batching path when interpreting the res_id
    field.
    
    Based on original patch from Florian Westphal.
    
    Reported-by: Florian Westphal <fw@strlen.de>
    Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
    ummakynes committed Aug 28, 2015
    Configuration menu
    Copy the full SHA
    a9de977 View commit details
    Browse the repository at this point in the history

Commits on Sep 1, 2015

  1. reset: Add (devm_)reset_control_get stub functions

    So the drivers can be compiled with CONFIG_RESET_CONTROLLER disabled.
    
    Signed-off-by: Axel Lin <axel.lin@ingics.com>
    Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
    AxelLin authored and pH5 committed Sep 1, 2015
    Configuration menu
    Copy the full SHA
    5bcd0b7 View commit details
    Browse the repository at this point in the history
  2. netfilter: conntrack: use nf_ct_tmpl_free in CT/synproxy error paths

    Commit 0838aa7 ("netfilter: fix netns dependencies with conntrack
    templates") migrated templates to the new allocator api, but forgot to
    update error paths for them in CT and synproxy to use nf_ct_tmpl_free()
    instead of nf_conntrack_free().
    
    Due to that, memory is being freed into the wrong kmemcache, but also
    we drop the per net reference count of ct objects causing an imbalance.
    
    In Brad's case, this leads to a wrap-around of net->ct.count and thus
    lets __nf_conntrack_alloc() refuse to create a new ct object:
    
      [   10.340913] xt_addrtype: ipv6 does not support BROADCAST matching
      [   10.810168] nf_conntrack: table full, dropping packet
      [   11.917416] r8169 0000:07:00.0 eth0: link up
      [   11.917438] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
      [   12.815902] nf_conntrack: table full, dropping packet
      [   15.688561] nf_conntrack: table full, dropping packet
      [   15.689365] nf_conntrack: table full, dropping packet
      [   15.690169] nf_conntrack: table full, dropping packet
      [   15.690967] nf_conntrack: table full, dropping packet
      [...]
    
    With slab debugging, it also reports the wrong kmemcache (kmalloc-512 vs.
    nf_conntrack_ffffffff81ce75c0) and reports poison overwrites, etc. Thus,
    to fix the problem, export and use nf_ct_tmpl_free() instead.
    
    Fixes: 0838aa7 ("netfilter: fix netns dependencies with conntrack templates")
    Reported-by: Brad Jackson <bjackson0971@gmail.com>
    Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
    Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
    borkmann authored and ummakynes committed Sep 1, 2015
    Configuration menu
    Copy the full SHA
    9cf94ea View commit details
    Browse the repository at this point in the history
  3. reset: ath79: Fix missing spin_lock_init

    Signed-off-by: Axel Lin <axel.lin@ingics.com>
    Acked-by: Alban Bedel <albeu@free.fr>
    Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
    AxelLin authored and pH5 committed Sep 1, 2015
    Configuration menu
    Copy the full SHA
    f319cb8 View commit details
    Browse the repository at this point in the history

Commits on Sep 3, 2015

  1. KVM: PPC: Book3S HV: Fix race in starting secondary threads

    The current dynamic micro-threading code has a race due to which a
    secondary thread naps when it is supposed to be running a vcpu. As a
    side effect of this, on a guest exit, the primary thread in
    kvmppc_wait_for_nap() finds that this secondary thread hasn't cleared
    its vcore pointer. This results in "CPU X seems to be stuck!"
    warnings.
    
    The race is possible since the primary thread on exiting the guests
    only waits for all the secondaries to clear its vcore pointer. It
    subsequently expects the secondary threads to enter nap while it
    unsplits the core. A secondary thread which hasn't yet entered the nap
    will loop in kvm_no_guest until its vcore pointer and the do_nap flag
    are unset. Once the core has been unsplit, a new vcpu thread can grab
    the core and set the do_nap flag *before* setting the vcore pointers
    of the secondary. As a result, the secondary thread will now enter nap
    via kvm_unsplit_nap instead of running the guest vcpu.
    
    Fix this by setting the do_nap flag after setting the vcore pointer in
    the PACA of the secondary in kvmppc_run_core. Also, ensure that a
    secondary thread doesn't nap in kvm_unsplit_nap when the vcore pointer
    in its PACA struct is set.
    
    Fixes: b4deba5
    Signed-off-by: Gautham R. Shenoy <ego@linux.vnet.ibm.com>
    Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
    Signed-off-by: Paul Mackerras <paulus@samba.org>
    Gautham R. Shenoy authored and paulusmack committed Sep 3, 2015
    Configuration menu
    Copy the full SHA
    7f23532 View commit details
    Browse the repository at this point in the history
  2. KVM: PPC: Book3S HV: Exit on H_DOORBELL if HOST_IPI is set

    The code that handles the case when we receive a H_DOORBELL interrupt
    has a comment which says "Hypervisor doorbell - exit only if host IPI
    flag set".  However, the current code does not actually check if the
    host IPI flag is set.  This is due to a comparison instruction that
    got missed.
    
    As a result, the current code performs the exit to host only
    if some sibling thread or a sibling sub-core is exiting to the
    host.  This implies that, an IPI sent to a sibling core in
    (subcores-per-core != 1) mode will be missed by the host unless the
    sibling core is on the exit path to the host.
    
    This patch adds the missing comparison operation which will ensure
    that when HOST_IPI flag is set, we unconditionally exit to the host.
    
    Fixes: 66feed6
    Cc: stable@vger.kernel.org # v4.1+
    Signed-off-by: Gautham R. Shenoy <ego@linux.vnet.ibm.com>
    Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
    Signed-off-by: Paul Mackerras <paulus@samba.org>
    Gautham R. Shenoy authored and paulusmack committed Sep 3, 2015
    Configuration menu
    Copy the full SHA
    06554d9 View commit details
    Browse the repository at this point in the history
  3. KVM: PPC: Book3S: Fix size of the PSPB register

    The size of the Problem State Priority Boost Register is only
    32 bits, but the kvm_vcpu_arch->pspb variable is declared as
    "ulong", ie. 64-bit. However, the assembler code accesses this
    variable with 32-bit accesses, and the KVM_REG_PPC_PSPB macro
    is defined with SIZE_U32, too, so that the current code is
    broken on big endian hosts: kvmppc_get_one_reg_hv() will only
    return zero for this register since it is using the wrong half
    of the pspb variable. Let's fix this problem by adjusting the
    size of the pspb field in the kvm_vcpu_arch structure.
    
    Signed-off-by: Thomas Huth <thuth@redhat.com>
    Signed-off-by: Paul Mackerras <paulus@samba.org>
    huth authored and paulusmack committed Sep 3, 2015
    Configuration menu
    Copy the full SHA
    f35f3a4 View commit details
    Browse the repository at this point in the history
  4. KVM: PPC: Book3S: Fix typo in top comment about locking

    Signed-off-by: Greg Kurz <gkurz@linux.vnet.ibm.com>
    Signed-off-by: Paul Mackerras <paulus@samba.org>
    gkurz authored and paulusmack committed Sep 3, 2015
    Configuration menu
    Copy the full SHA
    4e33d1f View commit details
    Browse the repository at this point in the history
  5. net: eth: altera: fix napi poll_list corruption

    tse_poll() calls __napi_complete() with irq enabled.  This leads napi
    poll_list corruption and may stop all napi drivers working.
    Use napi_complete() instead of __napi_complete().
    
    Signed-off-by: Atsushi Nemoto <nemoto@toshiba-tops.co.jp>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Atsushi Nemoto authored and davem330 committed Sep 3, 2015
    Configuration menu
    Copy the full SHA
    4548a69 View commit details
    Browse the repository at this point in the history
  6. sctp: fix dst leak

    Commit 0ca50d1 failed to release the reference to dst entries that
    it decided to skip.
    
    Fixes: 0ca50d1 ("sctp: fix src address selection if using secondary addresses")
    Signed-off-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    marceloleitner authored and davem330 committed Sep 3, 2015
    Configuration menu
    Copy the full SHA
    d82f0f1 View commit details
    Browse the repository at this point in the history
  7. sctp: add routing output fallback

    Commit 0ca50d1 added a restriction that the address must belong to
    the output interface, so that sctp will use the right interface even
    when using secondary addresses.
    
    But it breaks IPVS setups, on which people is used to attach VIP
    addresses to loopback interface on real servers. It's preferred to
    attach to the interface actually in use, but it's a very common setup
    and that used to work.
    
    This patch then saves the first routing good result, even if it would be
    going out through an interface that doesn't have that address. If no
    better hit found, it's then used. This effectively restores the original
    behavior if no better interface could be found.
    
    Fixes: 0ca50d1 ("sctp: fix src address selection if using secondary addresses")
    Signed-off-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    marceloleitner authored and davem330 committed Sep 3, 2015
    Configuration menu
    Copy the full SHA
    410f038 View commit details
    Browse the repository at this point in the history
  8. Merge branch 'sctp-fixes'

    Marcelo Ricardo Leitner says:
    
    ====================
    couple of sctp fixes for 0ca50d1
    
    These are two fixes for sctp after my patch on 0ca50d1 ("sctp: fix
    src address selection if using secondary addresses")
    
    The first, fix a dst leak on those it decided to skip.
    
    The second, adds the fallback on src selection that Vlad had asked
    about. Unfortunatelly a lot of ipvs setups relies on the old behavior
    and I don't see a better fix for it.
    
    Please consider both to -stable tree.
    ====================
    
    Acked-by: Neil Horman <nhorman@tuxdriver.com>
    Acked-by: Vlad Yasevich <vyasevich@gmail.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    davem330 committed Sep 3, 2015
    Configuration menu
    Copy the full SHA
    724a763 View commit details
    Browse the repository at this point in the history

Commits on Sep 4, 2015

  1. mac80211: Do not use sizeof() on pointer type

    The rate_control_cap_mask() function takes a parameter mcs_mask, which
    GCC will take to be u8 * even though it was declared with a fixed size.
    This causes the following warning:
    
    	net/mac80211/rate.c: In function 'rate_control_cap_mask':
    	net/mac80211/rate.c:719:25: warning: 'sizeof' on array function parameter 'mcs_mask' will return size of 'u8 * {aka unsigned char *}' [-Wsizeof-array-argument]
    	   for (i = 0; i < sizeof(mcs_mask); i++)
    	                         ^
    	net/mac80211/rate.c:684:10: note: declared here
    	       u8 mcs_mask[IEEE80211_HT_MCS_MASK_LEN],
    	          ^
    
    This can be easily fixed by using the IEEE80211_HT_MCS_MASK_LEN directly
    within the loop condition.
    
    Signed-off-by: Thierry Reding <treding@nvidia.com>
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>
    thierryreding authored and jmberg-intel committed Sep 4, 2015
    Configuration menu
    Copy the full SHA
    98a1f82 View commit details
    Browse the repository at this point in the history
  2. mac80211: protect non-HT BSS when HT TDLS traffic exists

    HT TDLS traffic should be protected in a non-HT BSS to avoid
    collisions. Therefore, when TDLS peers join/leave, check if
    protection is (now) needed and set the ht_operation_mode of
    the virtual interface according to the HT capabilities of the
    TDLS peer(s).
    
    This works because a non-HT BSS connection never sets (or
    otherwise uses) the ht_operation_mode; it just means that
    drivers must be aware that this field applies to all HT
    traffic for this virtual interface, not just the traffic
    within the BSS. Document that.
    
    Signed-off-by: Avri Altman <avri.altman@intel.com>
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>
    Avri Altman authored and jmberg-intel committed Sep 4, 2015
    Configuration menu
    Copy the full SHA
    22f6689 View commit details
    Browse the repository at this point in the history
  3. rfkill: Copy "all" global state to other types

    When switching the state of all RFKill switches of type all we need to
    replicate the RFKILL_TYPE_ALL global state to all the other types global
    state, so it is used to initialize persistent RFKill switches on
    register.
    
    Signed-off-by: João Paulo Rechi Vita <jprvita@endlessm.com>
    Acked-by: Marcel Holtmann <marcel@holtmann.org>
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>
    jprvita authored and jmberg-intel committed Sep 4, 2015
    Configuration menu
    Copy the full SHA
    4c07789 View commit details
    Browse the repository at this point in the history
  4. cfg80211: regulatory: restore proper user alpha2

    restore_regulatory_settings() should restore alpha2
    as computed in restore_alpha2(), not raw user_alpha2 to
    behave as described in the comment just above that code.
    
    This fixes endless loop of calling CRDA for "00" and "97"
    countries after resume from suspend on my laptop.
    
    Looks like others had the same problem, too:
    http://ath9k-devel.ath9k.narkive.com/knY5W6St/ath9k-and-crda-messages-in-logs
    https://bugs.launchpad.net/ubuntu/+source/linux/+bug/899335
    https://forum.porteus.org/viewtopic.php?t=4975&p=36436
    https://forums.opensuse.org/showthread.php/483356-Authentication-Regulatory-Domain-issues-ath5k-12-2
    
    Signed-off-by: Maciej Szmigiero <mail@maciej.szmigiero.name>
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>
    maciejsszmigiero authored and jmberg-intel committed Sep 4, 2015
    Configuration menu
    Copy the full SHA
    549cc1c View commit details
    Browse the repository at this point in the history
  5. mac80211: avoid VHT usage with no 80MHz chans allowed

    Currently if 80MHz channels are not allowed for use, the VHT IE is not
    included in the probe request for an AP. This is not good enough if the
    AP is configured with the wrong regulatory and supports VHT even where
    prohibited or in TDLS scenarios.
    Mark the ifmgd with the DISABLE_VHT flag for the misbehaving-AP case, and
    unset VHT support from the peer-station entry for the TDLS case.
    
    Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
    Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>
    ariknem authored and jmberg-intel committed Sep 4, 2015
    Configuration menu
    Copy the full SHA
    52a45f3 View commit details
    Browse the repository at this point in the history
  6. mac80211: reject software RSSI CQM with beacon filtering

    When beacon filtering is enabled the mac80211 software implementation
    for RSSI CQM cannot work as beacons will not be available. Rather than
    accepting such a configuration without proper effect, reject it.
    
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>
    jmberg-intel committed Sep 4, 2015
    Configuration menu
    Copy the full SHA
    ef9be10 View commit details
    Browse the repository at this point in the history

Commits on Sep 6, 2015

  1. net/ipv6: Correct PIM6 mrt_lock handling

    In the IPv6 multicast routing code the mrt_lock was not being released
    correctly in the MFC iterator, as a result adding or deleting a MIF would
    cause a hang because the mrt_lock could not be acquired.
    
    This fix is a copy of the code for the IPv4 case and ensures that the lock
    is released correctly.
    
    Signed-off-by: Richard Laing <richard.laing@alliedtelesis.co.nz>
    Acked-by: Cong Wang <cwang@twopensource.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Richard Laing authored and davem330 committed Sep 6, 2015
    Configuration menu
    Copy the full SHA
    25b4a44 View commit details
    Browse the repository at this point in the history
  2. net: wan: sbni: fix device usage count

    dev_get_by_name() will increment the usage count if the matching device
    is found. But we were not decrementing the count if we have got the
    device and the device is non-active.
    
    Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    sudipm-mukherjee authored and davem330 committed Sep 6, 2015
    Configuration menu
    Copy the full SHA
    bd516bd View commit details
    Browse the repository at this point in the history
  3. Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf

    Conflicts:
    	include/net/netfilter/nf_conntrack.h
    
    The conflict was an overlap between changing the type of the zone
    argument to nf_ct_tmpl_alloc() whilst exporting nf_ct_tmpl_free.
    
    Pablo Neira Ayuso says:
    
    ====================
    Netfilter fixes for net
    
    The following patchset contains Netfilter fixes for net, they are:
    
    1) Oneliner to restore maps in nf_tables since we support addressing registers
       at 32 bits level.
    
    2) Restore previous default behaviour in bridge netfilter when CONFIG_IPV6=n,
       oneliner from Bernhard Thaler.
    
    3) Out of bound access in ipset hash:net* set types, reported by Dave Jones'
       KASan utility, patch from Jozsef Kadlecsik.
    
    4) Fix ipset compilation with gcc 4.4.7 related to C99 initialization of
       unnamed unions, patch from Elad Raz.
    
    5) Add a workaround to address inconsistent endianess in the res_id field of
       nfnetlink batch messages, reported by Florian Westphal.
    
    6) Fix error paths of CT/synproxy since the conntrack template was moved to use
       kmalloc, patch from Daniel Borkmann.
    
    All of them look good to me to reach 4.2, I can route this to -stable myself
    too, just let me know what you prefer.
    ====================
    
    Signed-off-by: David S. Miller <davem@davemloft.net>
    davem330 committed Sep 6, 2015
    Configuration menu
    Copy the full SHA
    53cfd05 View commit details
    Browse the repository at this point in the history
  4. be2net: Revert "make the RX_FILTER command asynchronous" commit

    The be_cmd_rx_filter() routine sends a non-embedded cmd to the FW and used
    a pre-allocated dma memory to hold the cmd payload. This worked fine when
    this cmd was synchronous. This cmd was changed to asynchronous mode by the
    commit 8af65c2("make the RX_FILTER command asynchronous"). So now when
    there are two quick invocations of this cmd, the 2nd request may end up
    overwriting the first request, causing FW cmd corruption.
    
    This patch reverts the offending commit and hence fixes the regression.
    
    Fixes: 8af65c2("be2net: make the RX_FILTER command asynchronous")
    Signed-off-by: Sathya Perla <sathya.perla@avagotech.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Sathya Perla authored and davem330 committed Sep 6, 2015
    Configuration menu
    Copy the full SHA
    b658887 View commit details
    Browse the repository at this point in the history
  5. switchdev: fix return value of switchdev_port_fdb_dump in case of error

    switchdev_port_fdb_dump is used as .ndo_fdb_dump. Its return value is
    idx, so we cannot return errval.
    
    Fixes: 45d4122 ("switchdev: add support for fdb add/del/dump via switchdev_port_obj ops.")
    Signed-off-by: Jiri Pirko <jiri@mellanox.com>
    Acked-by: Sridhar Samudrala <sridhar.samudrala@intel.com>
    Acked-by: Scott Feldman<sfeldma@gmail.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    jpirko authored and davem330 committed Sep 6, 2015
    Configuration menu
    Copy the full SHA
    0890cf6 View commit details
    Browse the repository at this point in the history
  6. net: fec: normalize return value of pm_runtime_get_sync() in MDIO write

    If fec MDIO write method succeeds its return value comes from
    call to pm_runtime_get_sync().
    But pm_runtime_get_sync() can also return 1.
    
    In case of Micrel KSZ9031 PHY this value will then
    be returned along the call chain of phy_write() ->
    ksz9031_extended_write() -> ksz9031_center_flp_timing() ->
    ksz9031_config_init() -> phy_init_hw() -> phy_attach_direct() ->
    phy_connect_direct().
    
    Then phy_connect() will cast it into a pointer using ERR_PTR(),
    which then fec_enet_mii_probe() will try to dereference
    resulting in an oops.
    
    Fix it by normalizing return value of pm_runtime_get_sync()
    to be zero if positive in MDIO write method.
    
    Fixes: 8fff755 ("net: fec: Ensure clocks are enabled while using mdio bus")
    Signed-off-by: Maciej Szmigiero <mail@maciej.szmigiero.name>
    Acked-by: Andrew Lunn <andrew@lunn.ch>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    maciejsszmigiero authored and davem330 committed Sep 6, 2015
    Configuration menu
    Copy the full SHA
    42ea445 View commit details
    Browse the repository at this point in the history
  7. RDS: rds_conn_lookup() should factor in the struct net for a match

    Only return a conn if the rds_conn_net(conn) matches the struct
    net passed to rds_conn_lookup().
    
    Fixes: 467fa15 ("RDS-TCP: Support multiple RDS-TCP listen endpoints,
           one per netns.")
    
    Signed-off-by: Sowmini Varadhan <sowmini.varadhan@oracle.com>
    Acked-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    sowminiv authored and davem330 committed Sep 6, 2015
    Configuration menu
    Copy the full SHA
    8f384c0 View commit details
    Browse the repository at this point in the history
  8. KVM: x86: avoid uninitialized variable warning

    This does not show up on all compiler versions, so it sneaked into the
    first 4.3 pull request.  The fix is to mimic the logic of the "print
    sptes" loop in the "fill array" loop.  Then leaf and root can be
    both initialized unconditionally.
    
    Note that "leaf" now points to the first unused element of the array,
    not the last filled element.
    
    Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
    Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
    bonzini committed Sep 6, 2015
    Configuration menu
    Copy the full SHA
    29ecd66 View commit details
    Browse the repository at this point in the history
  9. kvm: compile process_smi_save_seg_64() only for x86_64

    The process_smi_save_seg_64() function called only in the
    process_smi_save_state_64() if the CONFIG_X86_64 is set. This
    patch adds #ifdef CONFIG_X86_64 around process_smi_save_seg_64()
    to prevent following warning message:
    
    arch/x86/kvm/x86.c:5946:13: warning: ‘process_smi_save_seg_64’ defined but not used [-Wunused-function]
     static void process_smi_save_seg_64(struct kvm_vcpu *vcpu, char *buf, int n)
                 ^
    
    Signed-off-by: Alexander Kuleshov <kuleshovmail@gmail.com>
    Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
    0xAX authored and bonzini committed Sep 6, 2015
    Configuration menu
    Copy the full SHA
    efbb288 View commit details
    Browse the repository at this point in the history
  10. Silence compiler warning in arch/x86/kvm/emulate.c

    Compiler warning:
    
     CC [M]  arch/x86/kvm/emulate.o
    arch/x86/kvm/emulate.c: In function "__do_insn_fetch_bytes":
    arch/x86/kvm/emulate.c:814:9: warning: "linear" may be used uninitialized in this function [-Wmaybe-uninitialized]
    
    GCC is smart enough to realize that the inlined __linearize may return before
    setting the value of linear, but not smart enough to realize the same
    X86EMU_CONTINUE blocks actual use of the value.  However, the value of
    'linear' can only be set to one value, so hoisting the one line of code
    upwards makes GCC happy with the code.
    
    Reported-by: Aruna Hewapathirane <aruna.hewapathirane@gmail.com>
    Tested-by: Aruna Hewapathirane <aruna.hewapathirane@gmail.com>
    Signed-off-by: Valdis Kletnieks <valdis.kletnieks@vt.edu>
    Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
    valdisk authored and bonzini committed Sep 6, 2015
    Configuration menu
    Copy the full SHA
    e8dd2d2 View commit details
    Browse the repository at this point in the history
  11. KVM: make halt_poll_ns per-vCPU

    Change halt_poll_ns into per-VCPU variable, seeded from module parameter,
    to allow greater flexibility.
    
    Signed-off-by: Wanpeng Li <wanpeng.li@hotmail.com>
    Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
    Wanpeng Li authored and bonzini committed Sep 6, 2015
    Configuration menu
    Copy the full SHA
    19020f8 View commit details
    Browse the repository at this point in the history
  12. KVM: dynamic halt-polling

    There is a downside of always-poll since poll is still happened for idle
    vCPUs which can waste cpu usage. This patchset add the ability to adjust
    halt_poll_ns dynamically, to grow halt_poll_ns when shot halt is detected,
    and to shrink halt_poll_ns when long halt is detected.
    
    There are two new kernel parameters for changing the halt_poll_ns:
    halt_poll_ns_grow and halt_poll_ns_shrink.
    
                            no-poll      always-poll    dynamic-poll
    -----------------------------------------------------------------------
    Idle (nohz) vCPU %c0     0.15%        0.3%            0.2%
    Idle (250HZ) vCPU %c0    1.1%         4.6%~14%        1.2%
    TCP_RR latency           34us         27us            26.7us
    
    "Idle (X) vCPU %c0" is the percent of time the physical cpu spent in
    c0 over 60 seconds (each vCPU is pinned to a pCPU). (nohz) means the
    guest was tickless. (250HZ) means the guest was ticking at 250HZ.
    
    The big win is with ticking operating systems. Running the linux guest
    with nohz=off (and HZ=250), we save 3.4%~12.8% CPUs/second and get close
    to no-polling overhead levels by using the dynamic-poll. The savings
    should be even higher for higher frequency ticks.
    
    Suggested-by: David Matlack <dmatlack@google.com>
    Signed-off-by: Wanpeng Li <wanpeng.li@hotmail.com>
    [Simplify the patch. - Paolo]
    Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
    Wanpeng Li authored and bonzini committed Sep 6, 2015
    Configuration menu
    Copy the full SHA
    aca6ff2 View commit details
    Browse the repository at this point in the history
  13. KVM: trace kvm_halt_poll_ns grow/shrink

    Tracepoint for dynamic halt_pool_ns, fired on every potential change.
    
    Signed-off-by: Wanpeng Li <wanpeng.li@hotmail.com>
    Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
    Wanpeng Li authored and bonzini committed Sep 6, 2015
    Configuration menu
    Copy the full SHA
    2cbd782 View commit details
    Browse the repository at this point in the history

Commits on Sep 7, 2015

  1. lan78xx: Fix ladv/radv error handling in lan78xx_link_reset()

    net/usb/lan78xx.c: In function ‘lan78xx_link_reset’:
    net/usb/lan78xx.c:1107: warning: comparison is always false due to limited range of data type
    net/usb/lan78xx.c:1111: warning: comparison is always false due to limited range of data type
    
    Assigning return values that can be negative error codes to "u16"
    variables makes them positive, ignoring the errors.  Hence use "int"
    instead.
    
    Drop the "unlikely"s (unlikely considered harmful) and propagate the
    actual error values instead of overriding them to -EIO while we're at
    it.
    
    Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    geertu authored and davem330 committed Sep 7, 2015
    Configuration menu
    Copy the full SHA
    99c79ec View commit details
    Browse the repository at this point in the history
  2. vxlan: Refactor vxlan_udp_encap_recv() to kill compiler warning

    drivers/net/vxlan.c: In function ‘vxlan_udp_encap_recv’:
    drivers/net/vxlan.c:1226: warning: ‘info’ may be used uninitialized in this function
    
    While this warning is a false positive, it can be killed easily by
    getting rid of the pointer intermediary and referring directly to the
    ip_tunnel_info structure.
    
    Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
    Reviewed-by: Jiri Benc <jbenc@redhat.com>
    Acked-by: Thomas Graf <tgraf@suug.ch>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    geertu authored and davem330 committed Sep 7, 2015
    Configuration menu
    Copy the full SHA
    0f1b735 View commit details
    Browse the repository at this point in the history
  3. ethernet: synopsys: SYNOPSYS_DWC_ETH_QOS should depend on HAS_DMA

    If NO_DMA=y:
    
        ERROR: "dma_alloc_coherent" [drivers/net/ethernet/synopsys/dwc_eth_qos.ko] undefined!
        ERROR: "dma_free_coherent" [drivers/net/ethernet/synopsys/dwc_eth_qos.ko] undefined!
        ERROR: "dma_unmap_single" [drivers/net/ethernet/synopsys/dwc_eth_qos.ko] undefined!
        ERROR: "dma_map_page" [drivers/net/ethernet/synopsys/dwc_eth_qos.ko] undefined!
        ERROR: "dma_mapping_error" [drivers/net/ethernet/synopsys/dwc_eth_qos.ko] undefined!
        ERROR: "dma_map_single" [drivers/net/ethernet/synopsys/dwc_eth_qos.ko] undefined!
    
    Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
    Acked-by: Lars Persson <larper@axis.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    geertu authored and davem330 committed Sep 7, 2015
    Configuration menu
    Copy the full SHA
    e5a5837 View commit details
    Browse the repository at this point in the history
  4. Merge tag 'mac80211-for-davem-2015-09-04' of git://git.kernel.org/pub…

    …/scm/linux/kernel/git/jberg/mac80211
    
    Johannes Berg says:
    
    ====================
    For the first round of fixes, we have this:
     * fix for the sizeof() pointer type issue
     * a fix for regulatory getting into a restore loop
     * a fix for rfkill global 'all' state, it needs to be stored
       everywhere to apply correctly to new rfkill instances
     * properly refuse CQM RSSI when it cannot actually be used
     * protect HT TDLS traffic properly in non-HT networks
     * don't incorrectly advertise 80 MHz support when not allowed
    ====================
    
    Signed-off-by: David S. Miller <davem@davemloft.net>
    davem330 committed Sep 7, 2015
    Configuration menu
    Copy the full SHA
    080fff5 View commit details
    Browse the repository at this point in the history
  5. net: dsa: mv88e6171: add hardware 802.1Q support

    The Marvell 88E6171 switch is in the 88E6351 family, which supports
    802.1Q, thus add support from the generic mv88e6xxx functions.
    
    Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
    Reviewed-by: Andrew Lunn <andrew@lunn.ch>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    vivien authored and davem330 committed Sep 7, 2015
    Configuration menu
    Copy the full SHA
    585e7e1 View commit details
    Browse the repository at this point in the history
  6. openvswitch: Remove conntrack Kconfig option.

    There's no particular desire to have conntrack action support in Open
    vSwitch as an independently configurable bit, rather just to ensure
    there is not a hard dependency. This exposed option doesn't accurately
    reflect the conntrack dependency when enabled, so simplify this by
    removing the option. Compile the support if NF_CONNTRACK is enabled.
    
    Fixes: 7f8a436 ("openvswitch: Add conntrack action")
    Signed-off-by: Joe Stringer <joestringer@nicira.com>
    Acked-by: Pravin B Shelar <pshelar@nicira.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    joestringer authored and davem330 committed Sep 7, 2015
    Configuration menu
    Copy the full SHA
    f88f69d View commit details
    Browse the repository at this point in the history
  7. fixed_phy: pass 'irq' to fixed_phy_add()

    I've noticed  that fixed_phy_register() ignores its 'irq' parameter instead of
    passing it to fixed_phy_add(). Luckily, fixed_phy_register()  seems to  always
    be  called with PHY_POLL  for 'irq'... :-)
    
    Fixes: a759512 ("net: phy: extend fixed driver with fixed_phy_register()")
    Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
    Acked-by: Florian Fainelli <f.fainelli@gmail.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Sergei Shtylyov authored and davem330 committed Sep 7, 2015
    Configuration menu
    Copy the full SHA
    bd1a05e View commit details
    Browse the repository at this point in the history
  8. cxgb4: fix usage of uninitialized variable

    drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c: In function ‘init_one’:
    drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c:4579:8: warning: ‘chip’ may be used uninitialized in this function [-Wmaybe-uninitialized]
       chip |= CHELSIO_CHIP_CODE(CHELSIO_T4, pl_rev);
            ^
    drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c:4571:11: note: ‘chip’ was declared here
      int ver, chip;
               ^
    
    Fixes: d86bd29 ("cxgb4/cxgb4vf: read the correct bits of PL Who Am I register")
    Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
    Cc: Hariprasad Shenai <hariprasad@chelsio.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    françois romieu authored and davem330 committed Sep 7, 2015
    Configuration menu
    Copy the full SHA
    46cdc9b View commit details
    Browse the repository at this point in the history

Commits on Sep 8, 2015

  1. kvm: move new trace event outside #ifdef CONFIG_KVM_ASYNC_PF

    Fixes compilation with ppc64_defconfig.
    
    Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
    Signed-off-by: Wanpeng Li <wanpeng.li@hotmail.com>
    Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
    Wanpeng Li authored and bonzini committed Sep 8, 2015
    Configuration menu
    Copy the full SHA
    3dfe6a5 View commit details
    Browse the repository at this point in the history
  2. kvm: irqchip: fix memory leak

    We were taking the exit path after checking ue->flags and return value
    of setup_routing_entry(), but 'e' was not freed incase of a failure.
    
    Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
    Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
    sudipm-mukherjee authored and bonzini committed Sep 8, 2015
    Configuration menu
    Copy the full SHA
    ba60c41 View commit details
    Browse the repository at this point in the history
  3. xen: Make clear that swiotlb and biomerge are dealing with DMA address

    The swiotlb is required when programming a DMA address on ARM when a
    device is not protected by an IOMMU.
    
    In this case, the DMA address should always be equal to the machine address.
    For DOM0 memory, Xen ensure it by have an identity mapping between the
    guest address and host address. However, when mapping a foreign grant
    reference, the 1:1 model doesn't work.
    
    For ARM guest, most of the callers of pfn_to_mfn expects to get a GFN
    (Guest Frame Number), i.e a PFN (Page Frame Number) from the Linux point
    of view given that all ARM guest are auto-translated.
    
    Even though the name pfn_to_mfn is misleading, we need to ensure that
    those caller get a GFN and not by mistake a MFN. In pratical, I haven't
    seen error related to this but we should fix it for the sake of
    correctness.
    
    In order to fix the implementation of pfn_to_mfn on ARM in a follow-up
    patch, we have to introduce new helpers to return the DMA from a PFN and
    the invert.
    
    On x86, the new helpers will be an alias of pfn_to_mfn and mfn_to_pfn.
    
    The helpers will be used in swiotlb and xen_biovec_phys_mergeable.
    
    This is necessary in the latter because we have to ensure that the
    biovec code will not try to merge a biovec using foreign page and
    another using Linux memory.
    
    Lastly, the helper mfn_to_local_pfn has been renamed to bfn_to_local_pfn
    given that the only usage was in swiotlb.
    
    Signed-off-by: Julien Grall <julien.grall@citrix.com>
    Reviewed-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
    Signed-off-by: David Vrabel <david.vrabel@citrix.com>
    Julien Grall committed Sep 8, 2015
    Configuration menu
    Copy the full SHA
    32e0987 View commit details
    Browse the repository at this point in the history
  4. arm/xen: implement correctly pfn_to_mfn

    After the commit introducing convertion between DMA and guest addresses,
    all the callers of pfn_to_mfn are expecting to get a GFN (Guest Frame
    Number). On ARM, all the guests are auto-translated so the GFN is equal
    to the Linux PFN (Pseudo-physical Frame Number).
    
    The current implementation may return an MFN if the caller is passing a
    PFN associated to a mapped foreign grant. In pratice, I haven't seen
    the problem on running guest but we should fix it for the sake of
    correctness.
    
    Correct the implementation by always returning the pfn passed in parameter.
    
    A follow-up patch will take care to rename pfn_to_mfn to a suitable
    name.
    
    Signed-off-by: Julien Grall <julien.grall@citrix.com>
    Reviewed-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
    Signed-off-by: David Vrabel <david.vrabel@citrix.com>
    Julien Grall committed Sep 8, 2015
    Configuration menu
    Copy the full SHA
    5192b35 View commit details
    Browse the repository at this point in the history
  5. xen: Use correctly the Xen memory terminologies

    Based on include/xen/mm.h [1], Linux is mistakenly using MFN when GFN
    is meant, I suspect this is because the first support for Xen was for
    PV. This resulted in some misimplementation of helpers on ARM and
    confused developers about the expected behavior.
    
    For instance, with pfn_to_mfn, we expect to get an MFN based on the name.
    Although, if we look at the implementation on x86, it's returning a GFN.
    
    For clarity and avoid new confusion, replace any reference to mfn with
    gfn in any helpers used by PV drivers. The x86 code will still keep some
    reference of pfn_to_mfn which may be used by all kind of guests
    No changes as been made in the hypercall field, even
    though they may be invalid, in order to keep the same as the defintion
    in xen repo.
    
    Note that page_to_mfn has been renamed to xen_page_to_gfn to avoid a
    name to close to the KVM function gfn_to_page.
    
    Take also the opportunity to simplify simple construction such
    as pfn_to_mfn(page_to_pfn(page)) into xen_page_to_gfn. More complex clean up
    will come in follow-up patches.
    
    [1] http://xenbits.xen.org/gitweb/?p=xen.git;a=commitdiff;h=e758ed14f390342513405dd766e874934573e6cb
    
    Signed-off-by: Julien Grall <julien.grall@citrix.com>
    Reviewed-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
    Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
    Acked-by: Wei Liu <wei.liu2@citrix.com>
    Signed-off-by: David Vrabel <david.vrabel@citrix.com>
    Julien Grall committed Sep 8, 2015
    Configuration menu
    Copy the full SHA
    0df4f26 View commit details
    Browse the repository at this point in the history
  6. xen/tmem: Use xen_page_to_gfn rather than pfn_to_gfn

    All the caller of xen_tmem_{get,put}_page have a struct page * in hand
    and call pfn_to_gfn for the only benefits of these 2 functions.
    
    Rather than passing the pfn in parameter, pass directly the page and use
    directly xen_page_to_gfn.
    
    Signed-off-by: Julien Grall <julien.grall@citrix.com>
    Reviewed-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
    Signed-off-by: David Vrabel <david.vrabel@citrix.com>
    Julien Grall committed Sep 8, 2015
    Configuration menu
    Copy the full SHA
    a76e3cc View commit details
    Browse the repository at this point in the history
  7. video/xen-fbfront: Further s/MFN/GFN clean-up

    The PV driver xen-fbfront is only dealing with GFN and not MFN. Rename
    all the occurence of MFN to GFN.
    
    Also take the opportunity to replace to usage of pfn_to_gfn by
    xen_page_to_gfn.
    
    Signed-off-by: Julien Grall <julien.grall@citrix.com>
    Reviewed-by: David Vrabel <david.vrabel@citrix.com>
    Signed-off-by: David Vrabel <david.vrabel@citrix.com>
    Julien Grall committed Sep 8, 2015
    Configuration menu
    Copy the full SHA
    0467533 View commit details
    Browse the repository at this point in the history
  8. hvc/xen: Further s/MFN/GFN clean-up

    HVM_PARAM_CONSOLE_PFN is used to retrieved the console PFN for HVM
    guest. It returns a PFN (aka GFN) and not a MFN.
    
    Furthermore, use directly virt_to_gfn for both PV and HVM domain rather
    than doing a special case for each of the them.
    
    Signed-off-by: Julien Grall <julien.grall@citrix.com>
    Reviewed-by: David Vrabel <david.vrabel@citrix.com>
    Signed-off-by: David Vrabel <david.vrabel@citrix.com>
    Julien Grall committed Sep 8, 2015
    Configuration menu
    Copy the full SHA
    859e326 View commit details
    Browse the repository at this point in the history
  9. xen/privcmd: Further s/MFN/GFN/ clean-up

    The privcmd code is mixing the usage of GFN and MFN within the same
    functions which make the code difficult to understand when you only work
    with auto-translated guests.
    
    The privcmd driver is only dealing with GFN so replace all the mention
    of MFN into GFN.
    
    The ioctl structure used to map foreign change has been left unchanged
    given that the userspace is using it. Nonetheless, add a comment to
    explain the expected value within the "mfn" field.
    
    Signed-off-by: Julien Grall <julien.grall@citrix.com>
    Reviewed-by: David Vrabel <david.vrabel@citrix.com>
    Signed-off-by: David Vrabel <david.vrabel@citrix.com>
    Julien Grall committed Sep 8, 2015
    Configuration menu
    Copy the full SHA
    a13d720 View commit details
    Browse the repository at this point in the history
  10. xen/xenbus: Rename the variable xen_store_mfn to xen_store_gfn

    The variable xen_store_mfn is effectively storing a GFN and not an MFN.
    
    Signed-off-by: Julien Grall <julien.grall@citrix.com>
    Signed-off-by: David Vrabel <david.vrabel@citrix.com>
    Julien Grall committed Sep 8, 2015
    Configuration menu
    Copy the full SHA
    5f51042 View commit details
    Browse the repository at this point in the history
  11. usbnet: Fix a race between usbnet_stop() and the BH

    The race may happen when a device (e.g. YOTA 4G LTE Modem) is
    unplugged while the system is downloading a large file from the Net.
    
    Hardware breakpoints and Kprobes with delays were used to confirm that
    the race does actually happen.
    
    The race is on skb_queue ('next' pointer) between usbnet_stop()
    and rx_complete(), which, in turn, calls usbnet_bh().
    
    Here is a part of the call stack with the code where the changes to the
    queue happen. The line numbers are for the kernel 4.1.0:
    
    *0 __skb_unlink (skbuff.h:1517)
        prev->next = next;
    *1 defer_bh (usbnet.c:430)
        spin_lock_irqsave(&list->lock, flags);
        old_state = entry->state;
        entry->state = state;
        __skb_unlink(skb, list);
        spin_unlock(&list->lock);
        spin_lock(&dev->done.lock);
        __skb_queue_tail(&dev->done, skb);
        if (dev->done.qlen == 1)
            tasklet_schedule(&dev->bh);
        spin_unlock_irqrestore(&dev->done.lock, flags);
    *2 rx_complete (usbnet.c:640)
        state = defer_bh(dev, skb, &dev->rxq, state);
    
    At the same time, the following code repeatedly checks if the queue is
    empty and reads these values concurrently with the above changes:
    
    *0  usbnet_terminate_urbs (usbnet.c:765)
        /* maybe wait for deletions to finish. */
        while (!skb_queue_empty(&dev->rxq)
            && !skb_queue_empty(&dev->txq)
            && !skb_queue_empty(&dev->done)) {
                schedule_timeout(msecs_to_jiffies(UNLINK_TIMEOUT_MS));
                set_current_state(TASK_UNINTERRUPTIBLE);
                netif_dbg(dev, ifdown, dev->net,
                      "waited for %d urb completions\n", temp);
        }
    *1  usbnet_stop (usbnet.c:806)
        if (!(info->flags & FLAG_AVOID_UNLINK_URBS))
            usbnet_terminate_urbs(dev);
    
    As a result, it is possible, for example, that the skb is removed from
    dev->rxq by __skb_unlink() before the check
    "!skb_queue_empty(&dev->rxq)" in usbnet_terminate_urbs() is made. It is
    also possible in this case that the skb is added to dev->done queue
    after "!skb_queue_empty(&dev->done)" is checked. So
    usbnet_terminate_urbs() may stop waiting and return while dev->done
    queue still has an item.
    
    Locking in defer_bh() and usbnet_terminate_urbs() was revisited to avoid
    this race.
    
    Signed-off-by: Eugene Shatokhin <eugene.shatokhin@rosalab.ru>
    Reviewed-by: Bjørn Mork <bjorn@mork.no>
    Acked-by: Oliver Neukum <oneukum@suse.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Eugene Shatokhin authored and davem330 committed Sep 8, 2015
    Configuration menu
    Copy the full SHA
    fcb0bb6 View commit details
    Browse the repository at this point in the history
  12. device property: Don't overwrite addr when failing in device_get_mac_…

    …address
    
    The function device_get_mac_address is trying different property names
    in order to get the mac address. To check the return value, the variable
    addr (which contain the buffer pass by the caller) will be re-used. This
    means that if the previous property is not found, the next property will
    be read using a NULL buffer.
    
    Therefore it's only possible to retrieve the mac if node contains a
    property "mac-address". Fix it by using a temporary buffer for the
    return value.
    
    This has been introduced by commit 4c96b7d
    "Add a matching set of device_ functions for determining mac/phy"
    
    Signed-off-by: Julien Grall <julien.grall@citrix.com>
    Cc: Jeremy Linton <jeremy.linton@arm.com>
    Cc: David S. Miller <davem@davemloft.net>
    Reviewed-by: Jeremy Linton <jeremy.linton@arm.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Julien Grall authored and davem330 committed Sep 8, 2015
    Configuration menu
    Copy the full SHA
    5b902d6 View commit details
    Browse the repository at this point in the history
  13. hexagon/time: Migrate to new 'set-state' interface

    Migrate hexagon driver to the new 'set-state' interface provided by
    clockevents core, the earlier 'set-mode' interface is marked obsolete
    now.
    
    This also enables us to implement callbacks for new states of clockevent
    devices, for example: ONESHOT_STOPPED.
    
    We weren't doing anything in the ->set_mode() callback. So, this patch
    doesn't provide any set-state callbacks.
    
    Cc: linux-hexagon@vger.kernel.org
    Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
    Signed-off-by: Richard Kuo <rkuo@codeaurora.org>
    vireshk authored and Richard Kuo committed Sep 8, 2015
    Configuration menu
    Copy the full SHA
    d70e22d View commit details
    Browse the repository at this point in the history

Commits on Sep 9, 2015

  1. net: dsa: bcm_sf2: Fix ageing conditions and operation

    The comparison check between cur_hw_state and hw_state is currently
    invalid because cur_hw_state is right shifted by G_MISTP_SHIFT, while
    hw_state is not, so we end-up comparing bits 2:0 with bits 7:5, which is
    going to cause an additional aging to occur. Fix this by not shifting
    cur_hw_state while reading it, but instead, mask the value with the
    appropriately shitfted bitmask.
    
    The other problem with the fast-ageing process is that we did not set
    the EN_AGE_DYNAMIC bit to request the ageing to occur for dynamically
    learned MAC addresses. Finally, write back 0 to the FAST_AGE_CTRL
    register to avoid leaving spurious bits sets from one operation to the
    other.
    
    Fixes: 12f460f ("net: dsa: bcm_sf2: add HW bridging support")
    Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    ffainelli authored and davem330 committed Sep 9, 2015
    Configuration menu
    Copy the full SHA
    39797a2 View commit details
    Browse the repository at this point in the history
  2. net: bridge: check __vlan_vid_del for error

    Since __vlan_del can return an error code, change its inner function
    __vlan_vid_del to return an eventual error from switchdev_port_obj_del.
    
    Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
    Acked-by: Jiri Pirko <jiri@resnulli.us>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    vivien authored and davem330 committed Sep 9, 2015
    Configuration menu
    Copy the full SHA
    bf361ad View commit details
    Browse the repository at this point in the history
  3. net: bridge: remove unnecessary switchdev include

    Remove the unnecessary switchdev.h include from br_netlink.c.
    
    Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
    Acked-by: Jiri Pirko <jiri@resnulli.us>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    vivien authored and davem330 committed Sep 9, 2015
    Configuration menu
    Copy the full SHA
    7a577f0 View commit details
    Browse the repository at this point in the history
  4. dm9000: fix a typo

    Signed-off-by: Barry Song <Baohua.Song@csr.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    21cnbao authored and davem330 committed Sep 9, 2015
    Configuration menu
    Copy the full SHA
    7b90187 View commit details
    Browse the repository at this point in the history
  5. net: tipc: fix stall during bclink wakeup procedure

    If an attempt to wake up users of broadcast link is made when there is
    no enough place in send queue than it may hang up inside the
    tipc_sk_rcv() function since the loop breaks only after the wake up
    queue becomes empty. This can lead to complete CPU stall with the
    following message generated by RCU:
    
    INFO: rcu_sched self-detected stall on CPU { 0}  (t=2101 jiffies
    					g=54225 c=54224 q=11465)
    Task dump for CPU 0:
    tpch            R  running task        0 39949  39948 0x0000000a
     ffffffff818536c0 ffff88181fa037a0 ffffffff8106a4be 0000000000000000
     ffffffff818536c0 ffff88181fa037c0 ffffffff8106d8a8 ffff88181fa03800
     0000000000000001 ffff88181fa037f0 ffffffff81094a50 ffff88181fa15680
    Call Trace:
     <IRQ>  [<ffffffff8106a4be>] sched_show_task+0xae/0x120
     [<ffffffff8106d8a8>] dump_cpu_task+0x38/0x40
     [<ffffffff81094a50>] rcu_dump_cpu_stacks+0x90/0xd0
     [<ffffffff81097c3b>] rcu_check_callbacks+0x3eb/0x6e0
     [<ffffffff8106e53f>] ? account_system_time+0x7f/0x170
     [<ffffffff81099e64>] update_process_times+0x34/0x60
     [<ffffffff810a84d1>] tick_sched_handle.isra.18+0x31/0x40
     [<ffffffff810a851c>] tick_sched_timer+0x3c/0x70
     [<ffffffff8109a43d>] __run_hrtimer.isra.34+0x3d/0xc0
     [<ffffffff8109aa95>] hrtimer_interrupt+0xc5/0x1e0
     [<ffffffff81030d52>] ? native_smp_send_reschedule+0x42/0x60
     [<ffffffff81032f04>] local_apic_timer_interrupt+0x34/0x60
     [<ffffffff810335bc>] smp_apic_timer_interrupt+0x3c/0x60
     [<ffffffff8165a3fb>] apic_timer_interrupt+0x6b/0x70
     [<ffffffff81659129>] ? _raw_spin_unlock_irqrestore+0x9/0x10
     [<ffffffff8107eb9f>] __wake_up_sync_key+0x4f/0x60
     [<ffffffffa313ddd1>] tipc_write_space+0x31/0x40 [tipc]
     [<ffffffffa313dadf>] filter_rcv+0x31f/0x520 [tipc]
     [<ffffffffa313d699>] ? tipc_sk_lookup+0xc9/0x110 [tipc]
     [<ffffffff81659259>] ? _raw_spin_lock_bh+0x19/0x30
     [<ffffffffa314122c>] tipc_sk_rcv+0x2dc/0x3e0 [tipc]
     [<ffffffffa312e7ff>] tipc_bclink_wakeup_users+0x2f/0x40 [tipc]
     [<ffffffffa313ce26>] tipc_node_unlock+0x186/0x190 [tipc]
     [<ffffffff81597c1c>] ? kfree_skb+0x2c/0x40
     [<ffffffffa313475c>] tipc_rcv+0x2ac/0x8c0 [tipc]
     [<ffffffffa312ff58>] tipc_l2_rcv_msg+0x38/0x50 [tipc]
     [<ffffffff815a76d3>] __netif_receive_skb_core+0x5a3/0x950
     [<ffffffff815a98d3>] __netif_receive_skb+0x13/0x60
     [<ffffffff815a993e>] netif_receive_skb_internal+0x1e/0x90
     [<ffffffff815aa138>] napi_gro_receive+0x78/0xa0
     [<ffffffffa07f93f4>] tg3_poll_work+0xc54/0xf40 [tg3]
     [<ffffffff81597c8c>] ? consume_skb+0x2c/0x40
     [<ffffffffa07f9721>] tg3_poll_msix+0x41/0x160 [tg3]
     [<ffffffff815ab0f2>] net_rx_action+0xe2/0x290
     [<ffffffff8104b92a>] __do_softirq+0xda/0x1f0
     [<ffffffff8104bc26>] irq_exit+0x76/0xa0
     [<ffffffff81004355>] do_IRQ+0x55/0xf0
     [<ffffffff8165a12b>] common_interrupt+0x6b/0x6b
     <EOI>
    
    The issue occurs only when tipc_sk_rcv() is used to wake up postponed
    senders:
    
    	tipc_bclink_wakeup_users()
    		// wakeupq - is a queue which consists of special
    		// 		 messages with SOCK_WAKEUP type.
    		tipc_sk_rcv(wakeupq)
    			...
    			while (skb_queue_len(inputq)) {
    				filter_rcv(skb)
    					// Here the type of message is checked
    					// and if it is SOCK_WAKEUP then
    					// it tries to wake up a sender.
    					tipc_write_space(sk)
    						wake_up_interruptible_sync_poll()
    			}
    
    After the sender thread is woke up it can gather control and perform
    an attempt to send a message. But if there is no enough place in send
    queue it will call link_schedule_user() function which puts a message
    of type SOCK_WAKEUP to the wakeup queue and put the sender to sleep.
    Thus the size of the queue actually is not changed and the while()
    loop never exits.
    
    The approach I proposed is to wake up only senders for which there is
    enough place in send queue so the described issue can't occur.
    Moreover the same approach is already used to wake up senders on
    unicast links.
    
    I have got into the issue on our product code but to reproduce the
    issue I changed a benchmark test application (from
    tipcutils/demos/benchmark) to perform the following scenario:
    	1. Run 64 instances of test application (nodes). It can be done
    	   on the one physical machine.
    	2. Each application connects to all other using TIPC sockets in
    	   RDM mode.
    	3. When setup is done all nodes start simultaneously send
    	   broadcast messages.
    	4. Everything hangs up.
    
    The issue is reproducible only when a congestion on broadcast link
    occurs. For example, when there are only 8 nodes it works fine since
    congestion doesn't occur. Send queue limit is 40 in my case (I use a
    critical importance level) and when 64 nodes send a message at the
    same moment a congestion occurs every time.
    
    Signed-off-by: Dmitry S Kolmakov <kolmakov.dmitriy@huawei.com>
    Reviewed-by: Jon Maloy <jon.maloy@ericsson.com>
    Acked-by: Ying Xue <ying.xue@windriver.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Kolmakov Dmitriy authored and davem330 committed Sep 9, 2015
    Configuration menu
    Copy the full SHA
    7845989 View commit details
    Browse the repository at this point in the history
  6. Revert "Hexagon: fix signal.c compile error"

    This reverts commit f3f601c.
    
    UAPI headers cannot use "uapi/" in their paths by design -- when they're
    installed, they do not have the uapi/ prefix.  Otherwise doing so breaks
    userland badly.
    
    Signed-off-by: Mike Frysinger <vapier@gentoo.org>
    Signed-off-by: Richard Kuo <rkuo@codeaurora.org>
    vapier authored and Richard Kuo committed Sep 9, 2015
    Configuration menu
    Copy the full SHA
    02cc2cc View commit details
    Browse the repository at this point in the history
  7. net: eth: altera: Fix the initial device operstate

    Call netif_carrier_off() prior to register_netdev(), otherwise
    userspace can see incorrect link state.
    
    Signed-off-by: Atsushi Nemoto <nemoto@toshiba-tops.co.jp>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Atsushi Nemoto authored and davem330 committed Sep 9, 2015
    Configuration menu
    Copy the full SHA
    d43cefc View commit details
    Browse the repository at this point in the history
  8. cxgb4: Fix tx flit calculation

    In commit 0aac3f5 ("cxgb4: Add comment for calculate tx flits
    and sge length code") introduced a regression where tx flit calculation
    is going wrong, which can lead to data corruption, hang, stall and
    write-combining failure. Fixing it.
    
    Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Hariprasad Shenai authored and davem330 committed Sep 9, 2015
    Configuration menu
    Copy the full SHA
    fd1754f View commit details
    Browse the repository at this point in the history
  9. cxgb4: Fix for write-combining stats configuration

    The write-combining configuration register SGE_STAT_CFG_A needs to
    be configured after FW initializes the adapter, else FW will reset
    the configuration
    
    Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Hariprasad Shenai authored and davem330 committed Sep 9, 2015
    Configuration menu
    Copy the full SHA
    2a485cf View commit details
    Browse the repository at this point in the history
  10. Merge branch 'cxgb4-fixes'

    Hariprasad Shenai says:
    
    ====================
    cxgb4: Fix tx flit calculation and wc stat configuration
    
    This patch series fixes the following:
    Patch 1/2 fixes tx flit calculation, which if wrong can lead to
    stall, hang, data corrpution, write combining failure. Patch 2/2 fixes
    PCI-E write combining stats configuration.
    
    This patch series has been created against net tree and includes
    patches on cxgb4 driver.
    
    We have included all the maintainers of respective drivers. Kindly review
    the change and let us know in case of any review comments.
    ====================
    
    Signed-off-by: David S. Miller <davem@davemloft.net>
    davem330 committed Sep 9, 2015
    Configuration menu
    Copy the full SHA
    9b57ab8 View commit details
    Browse the repository at this point in the history
  11. xen-netback: require fewer guest Rx slots when not using GSO

    Commit f48da8b (xen-netback: fix
    unlimited guest Rx internal queue and carrier flapping) introduced a
    regression.
    
    The PV frontend in IPXE only places 4 requests on the guest Rx ring.
    Since netback required at least (MAX_SKB_FRAGS + 1) slots, IPXE could
    not receive any packets.
    
    a) If GSO is not enabled on the VIF, fewer guest Rx slots are required
       for the largest possible packet.  Calculate the required slots
       based on the maximum GSO size or the MTU.
    
       This calculation of the number of required slots relies on
       1650d54 (xen-netback: always fully coalesce guest Rx packets)
       which present in 4.0-rc1 and later.
    
    b) Reduce the Rx stall detection to checking for at least one
       available Rx request.  This is fine since we're predominately
       concerned with detecting interfaces which are down and thus have
       zero available Rx requests.
    
    Signed-off-by: David Vrabel <david.vrabel@citrix.com>
    Reviewed-by: Wei Liu <wei.liu2@citrix.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    David Vrabel authored and davem330 committed Sep 9, 2015
    Configuration menu
    Copy the full SHA
    1d5d485 View commit details
    Browse the repository at this point in the history
  12. RDS: verify the underlying transport exists before creating a connection

    There was no verification that an underlying transport exists when creating
    a connection, this would cause dereferencing a NULL ptr.
    
    It might happen on sockets that weren't properly bound before attempting to
    send a message, which will cause a NULL ptr deref:
    
    [135546.047719] kasan: GPF could be caused by NULL-ptr deref or user memory accessgeneral protection fault: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC KASAN
    [135546.051270] Modules linked in:
    [135546.051781] CPU: 4 PID: 15650 Comm: trinity-c4 Not tainted 4.2.0-next-20150902-sasha-00041-gbaa1222-dirty #2527
    [135546.053217] task: ffff8800835bc000 ti: ffff8800bc708000 task.ti: ffff8800bc708000
    [135546.054291] RIP: __rds_conn_create (net/rds/connection.c:194)
    [135546.055666] RSP: 0018:ffff8800bc70fab0  EFLAGS: 00010202
    [135546.056457] RAX: dffffc0000000000 RBX: 0000000000000f2c RCX: ffff8800835bc000
    [135546.057494] RDX: 0000000000000007 RSI: ffff8800835bccd8 RDI: 0000000000000038
    [135546.058530] RBP: ffff8800bc70fb18 R08: 0000000000000001 R09: 0000000000000000
    [135546.059556] R10: ffffed014d7a3a23 R11: ffffed014d7a3a21 R12: 0000000000000000
    [135546.060614] R13: 0000000000000001 R14: ffff8801ec3d0000 R15: 0000000000000000
    [135546.061668] FS:  00007faad4ffb700(0000) GS:ffff880252000000(0000) knlGS:0000000000000000
    [135546.062836] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
    [135546.063682] CR2: 000000000000846a CR3: 000000009d137000 CR4: 00000000000006a0
    [135546.064723] Stack:
    [135546.065048]  ffffffffafe2055c ffffffffafe23fc1 ffffed00493097bf ffff8801ec3d0008
    [135546.066247]  0000000000000000 00000000000000d0 0000000000000000 ac194a24c0586342
    [135546.067438]  1ffff100178e1f78 ffff880320581b00 ffff8800bc70fdd0 ffff880320581b00
    [135546.068629] Call Trace:
    [135546.069028] ? __rds_conn_create (include/linux/rcupdate.h:856 net/rds/connection.c:134)
    [135546.069989] ? rds_message_copy_from_user (net/rds/message.c:298)
    [135546.071021] rds_conn_create_outgoing (net/rds/connection.c:278)
    [135546.071981] rds_sendmsg (net/rds/send.c:1058)
    [135546.072858] ? perf_trace_lock (include/trace/events/lock.h:38)
    [135546.073744] ? lockdep_init (kernel/locking/lockdep.c:3298)
    [135546.074577] ? rds_send_drop_to (net/rds/send.c:976)
    [135546.075508] ? __might_fault (./arch/x86/include/asm/current.h:14 mm/memory.c:3795)
    [135546.076349] ? __might_fault (mm/memory.c:3795)
    [135546.077179] ? rds_send_drop_to (net/rds/send.c:976)
    [135546.078114] sock_sendmsg (net/socket.c:611 net/socket.c:620)
    [135546.078856] SYSC_sendto (net/socket.c:1657)
    [135546.079596] ? SYSC_connect (net/socket.c:1628)
    [135546.080510] ? trace_dump_stack (kernel/trace/trace.c:1926)
    [135546.081397] ? ring_buffer_unlock_commit (kernel/trace/ring_buffer.c:2479 kernel/trace/ring_buffer.c:2558 kernel/trace/ring_buffer.c:2674)
    [135546.082390] ? trace_buffer_unlock_commit (kernel/trace/trace.c:1749)
    [135546.083410] ? trace_event_raw_event_sys_enter (include/trace/events/syscalls.h:16)
    [135546.084481] ? do_audit_syscall_entry (include/trace/events/syscalls.h:16)
    [135546.085438] ? trace_buffer_unlock_commit (kernel/trace/trace.c:1749)
    [135546.085515] rds_ib_laddr_check(): addr 36.74.25.172 ret -99 node type -1
    
    Acked-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
    Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    sashalevin authored and davem330 committed Sep 9, 2015
    Configuration menu
    Copy the full SHA
    74e98eb View commit details
    Browse the repository at this point in the history
  13. ebpf: fix fd refcount leaks related to maps in bpf syscall

    We may already have gotten a proper fd struct through fdget(), so
    whenever we return at the end of an map operation, we need to call
    fdput(). However, each map operation from syscall side first probes
    CHECK_ATTR() to verify that unused fields in the bpf_attr union are
    zero.
    
    In case of malformed input, we return with error, but the lookup to
    the map_fd was already performed at that time, so that we return
    without an corresponding fdput(). Fix it by performing an fdget()
    only right before bpf_map_get(). The fdget() invocation on maps in
    the verifier is not affected.
    
    Fixes: db20fd2 ("bpf: add lookup/update/delete/iterate methods to BPF maps")
    Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
    Acked-by: Alexei Starovoitov <ast@plumgrid.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    borkmann authored and davem330 committed Sep 9, 2015
    Configuration menu
    Copy the full SHA
    592867b View commit details
    Browse the repository at this point in the history
  14. Merge tag 'qcom-dt-for-4.3' into v4.2-rc2

    Qualcomm ARM Based Device Tree Updates for v4.3
    
    * Switch to use pinctrl compatible for GPIOs
    * Add RPM regulators for MSM8960
    * Add SPI Ethernet support on MSM8960 CDP
    * Add SMEM support along with dependencies
    * Add PM8921 support for GPIO and MPP
    * Fix GSBI cell index
    * Switch to use real regulators on APQ8064 w/ SDCC
    Andy Gross committed Sep 9, 2015
    Configuration menu
    Copy the full SHA
    9f384d6 View commit details
    Browse the repository at this point in the history
  15. ARM: dts: qcom: Label serial nodes for aliasing and stdout-path

    Add a label to the serial nodes that are being used for the
    console.
    
    Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
    bebarino authored and Andy Gross committed Sep 9, 2015
    Configuration menu
    Copy the full SHA
    10bfcfe View commit details
    Browse the repository at this point in the history
  16. ARM: dts: qcom: apq8064-cm-qs600: Use stdout-path

    Use stdout-path so that we don't have to put the console on the
    kernel command line.
    
    Cc: Mike Rapoport <mike.rapoport@gmail.com>
    Cc: Igor Grinberg <grinberg@compulab.co.il>
    Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
    bebarino authored and Andy Gross committed Sep 9, 2015
    Configuration menu
    Copy the full SHA
    4e19db1 View commit details
    Browse the repository at this point in the history
  17. ARM: dts: qcom: apq8064-ifc6410: Use stdout-path

    Use stdout-path so that we don't have to put the console on the
    kernel command line.
    
    Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
    bebarino authored and Andy Gross committed Sep 9, 2015
    Configuration menu
    Copy the full SHA
    7f9e28b View commit details
    Browse the repository at this point in the history
  18. ARM: dts: qcom: apq8074-dragonboard: Use stdout-path

    Use stdout-path so that we don't have to put the console on the
    kernel command line.
    
    Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
    bebarino authored and Andy Gross committed Sep 9, 2015
    Configuration menu
    Copy the full SHA
    5f76978 View commit details
    Browse the repository at this point in the history
  19. ARM: dts: qcom: apq8084-ifc6540: Use stdout-path

    Use stdout-path so that we don't have to put the console on the
    kernel command line.
    
    Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
    bebarino authored and Andy Gross committed Sep 9, 2015
    Configuration menu
    Copy the full SHA
    d92c945 View commit details
    Browse the repository at this point in the history
  20. ARM: dts: qcom: apq8084-mtp: Use stdout-path

    Use stdout-path so that we don't have to put the console on the
    kernel command line.
    
    Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
    bebarino authored and Andy Gross committed Sep 9, 2015
    Configuration menu
    Copy the full SHA
    ccfdf7c View commit details
    Browse the repository at this point in the history
  21. ARM: dts: qcom: ipq8064-ap148: Use stdout-path

    Use stdout-path so that we don't have to put the console on the
    kernel command line.
    
    Cc: Mathieu Olivari <mathieu@codeaurora.org>
    Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
    bebarino authored and Andy Gross committed Sep 9, 2015
    Configuration menu
    Copy the full SHA
    9a61b3a View commit details
    Browse the repository at this point in the history
  22. ARM: dts: qcom: msm8660-surf: Use stdout-path

    Use stdout-path so that we don't have to put the console on the
    kernel command line.
    
    Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
    bebarino authored and Andy Gross committed Sep 9, 2015
    Configuration menu
    Copy the full SHA
    a967310 View commit details
    Browse the repository at this point in the history
  23. ARM: dts: qcom: msm8960-cdp: Use stdout-path

    Use stdout-path so that we don't have to put the console on the
    kernel command line.
    
    Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
    bebarino authored and Andy Gross committed Sep 9, 2015
    Configuration menu
    Copy the full SHA
    c0ed595 View commit details
    Browse the repository at this point in the history
  24. ARM: dts: qcom: msm8974-sony-xperia-honami: Use stdout-path

    Use stdout-path so that we don't have to put the console on the
    kernel command line.
    
    Cc: Tim Bird <tim.bird@sonymobile.com>
    Cc: Bjorn Andersson <bjorn.andersson@sonymobile.com>
    Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
    bebarino authored and Andy Gross committed Sep 9, 2015
    Configuration menu
    Copy the full SHA
    8f1dc3c View commit details
    Browse the repository at this point in the history
  25. Merge tag 'qcom-soc-for-4.3' into v4.2-rc2

    Qualcomm ARM Based SoC Updates for 4.3
    
    * Add SMEM driver
    * Add SMD driver
    * Add RPM over SMD driver
    * Select QCOM_SCM by default
    Andy Gross committed Sep 9, 2015
    Configuration menu
    Copy the full SHA
    61e19ba View commit details
    Browse the repository at this point in the history
  26. soc: qcom: smem: Fix errant private access

    This patch corrects private partition item access.  Instead of falling back to
    global for instances where we have an actual host and remote partition existing,
    return the results of the private lookup.
    
    Signed-off-by: Andy Gross <agross@codeaurora.org>
    Andy Gross committed Sep 9, 2015
    Configuration menu
    Copy the full SHA
    1891280 View commit details
    Browse the repository at this point in the history
  27. soc: qcom: smd: Use correct remote processor ID

    This patch fixes SMEM addressing issues when remote processors need to use
    secure SMEM partitions.
    
    Signed-off-by: Andy Gross <agross@codeaurora.org>
    Reviewed-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
    Andy Gross committed Sep 9, 2015
    Configuration menu
    Copy the full SHA
    93dbed9 View commit details
    Browse the repository at this point in the history
  28. soc: qcom: smd: Correct fBLOCKREADINTR handling

    fBLOCKREADINTR is masking the notification from the remote and should
    hence be cleared while we're waiting the tx fifo to drain. Also change
    the reset state to mask the notification, as send is the only use case
    where we're interested in it.
    
    Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
    Signed-off-by: Andy Gross <agross@codeaurora.org>
    andersson authored and Andy Gross committed Sep 9, 2015
    Configuration menu
    Copy the full SHA
    208487a View commit details
    Browse the repository at this point in the history
  29. ipv6: fix multipath route replace error recovery

    Problem:
    The ecmp route replace support for ipv6 in the kernel, deletes the
    existing ecmp route too early, ie when it installs the first nexthop.
    If there is an error in installing the subsequent nexthops, its too late
    to recover the already deleted existing route leaving the fib
    in an inconsistent state.
    
    This patch reduces the possibility of this by doing the following:
    a) Changes the existing multipath route add code to a two stage process:
      build rt6_infos + insert them
    	ip6_route_add rt6_info creation code is moved into
    	ip6_route_info_create.
    b) This ensures that most errors are caught during building rt6_infos
      and we fail early
    c) Separates multipath add and del code. Because add needs the special
      two stage mode in a) and delete essentially does not care.
    d) In any event if the code fails during inserting a route again, a
      warning is printed (This should be unlikely)
    
    Before the patch:
    $ip -6 route show
    3000:1000:1000:1000::2 via fe80::202:ff:fe00:b dev swp49s0 metric 1024
    3000:1000:1000:1000::2 via fe80::202:ff:fe00:d dev swp49s1 metric 1024
    3000:1000:1000:1000::2 via fe80::202:ff:fe00:f dev swp49s2 metric 1024
    
    /* Try replacing the route with a duplicate nexthop */
    $ip -6 route change 3000:1000:1000:1000::2/128 nexthop via
    fe80::202:ff:fe00:b dev swp49s0 nexthop via fe80::202:ff:fe00:d dev
    swp49s1 nexthop via fe80::202:ff:fe00:d dev swp49s1
    RTNETLINK answers: File exists
    
    $ip -6 route show
    /* previously added ecmp route 3000:1000:1000:1000::2 dissappears from
     * kernel */
    
    After the patch:
    $ip -6 route show
    3000:1000:1000:1000::2 via fe80::202:ff:fe00:b dev swp49s0 metric 1024
    3000:1000:1000:1000::2 via fe80::202:ff:fe00:d dev swp49s1 metric 1024
    3000:1000:1000:1000::2 via fe80::202:ff:fe00:f dev swp49s2 metric 1024
    
    /* Try replacing the route with a duplicate nexthop */
    $ip -6 route change 3000:1000:1000:1000::2/128 nexthop via
    fe80::202:ff:fe00:b dev swp49s0 nexthop via fe80::202:ff:fe00:d dev
    swp49s1 nexthop via fe80::202:ff:fe00:d dev swp49s1
    RTNETLINK answers: File exists
    
    $ip -6 route show
    3000:1000:1000:1000::2 via fe80::202:ff:fe00:b dev swp49s0 metric 1024
    3000:1000:1000:1000::2 via fe80::202:ff:fe00:d dev swp49s1 metric 1024
    3000:1000:1000:1000::2 via fe80::202:ff:fe00:f dev swp49s2 metric 1024
    
    Fixes: 2759647 ("ipv6: fix ECMP route replacement")
    Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
    Reviewed-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
    Acked-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    roopa-prabhu authored and davem330 committed Sep 9, 2015
    Configuration menu
    Copy the full SHA
    6b9ea5a View commit details
    Browse the repository at this point in the history
  30. bpf: fix out of bounds access in verifier log

    when the verifier log is enabled the print_bpf_insn() is doing
    bpf_alu_string[BPF_OP(insn->code) >> 4]
    and
    bpf_jmp_string[BPF_OP(insn->code) >> 4]
    where BPF_OP is a 4-bit instruction opcode.
    Malformed insns can cause out of bounds access.
    Fix it by sizing arrays appropriately.
    
    The bug was found by clang address sanitizer with libfuzzer.
    
    Reported-by: Yonghong Song <yhs@plumgrid.com>
    Signed-off-by: Alexei Starovoitov <ast@plumgrid.com>
    Acked-by: Daniel Borkmann <daniel@iogearbox.net>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Alexei Starovoitov authored and davem330 committed Sep 9, 2015
    Configuration menu
    Copy the full SHA
    687f071 View commit details
    Browse the repository at this point in the history
  31. net: dsa: bcm_sf2: Fix 64-bits register writes

    The macro to write 64-bits quantities to the 32-bits register swapped
    the value and offsets arguments, we want to preserve the ordering of the
    arguments with respect to how writel() is implemented for instance:
    value first, offset/base second.
    
    Fixes: 246d7f7 ("net: dsa: add Broadcom SF2 switch driver")
    Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
    Reviewed-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    ffainelli authored and davem330 committed Sep 9, 2015
    Configuration menu
    Copy the full SHA
    03679a1 View commit details
    Browse the repository at this point in the history
  32. net: ethoc: Remove unnecessary #ifdef CONFIG_OF

    For !CONFIG_OF of_get_property() is defined to always return NULL. Thus
    there's no need to protect the call to of_get_property() with #ifdef
    CONFIG_OF.
    
    Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    tklauser authored and davem330 committed Sep 9, 2015
    Configuration menu
    Copy the full SHA
    444c5f9 View commit details
    Browse the repository at this point in the history
  33. net: ipv6: use common fib_default_rule_pref

    This switches IPv6 policy routing to use the shared
    fib_default_rule_pref() function of IPv4 and DECnet. It is also used in
    multicast routing for IPv4 as well as IPv6.
    
    The motivation for this patch is a complaint about iproute2 behaving
    inconsistent between IPv4 and IPv6 when adding policy rules: Formerly,
    IPv6 rules were assigned a fixed priority of 0x3FFF whereas for IPv4 the
    assigned priority value was decreased with each rule added.
    
    Since then all users of the default_pref field have been converted to
    assign the generic function fib_default_rule_pref(), fib_nl_newrule()
    may just use it directly instead. Therefore get rid of the function
    pointer altogether and make fib_default_rule_pref() static, as it's not
    used outside fib_rules.c anymore.
    
    Signed-off-by: Phil Sutter <phil@nwl.cc>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Phil Sutter authored and davem330 committed Sep 9, 2015
    Configuration menu
    Copy the full SHA
    f53de1e View commit details
    Browse the repository at this point in the history
  34. Merge tag 'reset-for-4.3-fixes' of git://git.pengutronix.de/git/pza/l…

    …inux into drivers/reset
    
    Merge "Reset controller fixes for v4.3" from Philipp Zabel:
    
    Reset controller fixes for v4.3
    
    - added stubs to avoid build breakage in COMPILE_TEST
      configurations with RESET_CONTROLLER disabled
    - fixed missing spinlock initialization in ath79 driver
    
    * tag 'reset-for-4.3-fixes' of git://git.pengutronix.de/git/pza/linux:
      reset: ath79: Fix missing spin_lock_init
      reset: Add (devm_)reset_control_get stub functions
    Kevin Hilman committed Sep 9, 2015
    Configuration menu
    Copy the full SHA
    9738031 View commit details
    Browse the repository at this point in the history
  35. Merge branch 'drivers/reset' into next/late

    * drivers/reset:
      reset: ath79: Fix missing spin_lock_init
      reset: Add (devm_)reset_control_get stub functions
      reset: reset-zynq: Adding support for Xilinx Zynq reset controller.
      docs: dts: Added documentation for Xilinx Zynq Reset Controller bindings.
      MIPS: ath79: Add the reset controller to the AR9132 dtsi
      reset: Add a driver for the reset controller on the AR71XX/AR9XXX
      devicetree: Add bindings for the ATH79 reset controller
      reset: socfpga: Update reset-socfpga to read the altr,modrst-offset property
      doc: dt: add documentation for lpc1850-rgu reset driver
      reset: add driver for lpc18xx rgu
      reset: sti: constify of_device_id array
      ARM: STi: DT: Move reset controller constants into common location
      MAINTAINERS: add include/dt-bindings/reset path to reset controller entry
    Kevin Hilman committed Sep 9, 2015
    Configuration menu
    Copy the full SHA
    71d4404 View commit details
    Browse the repository at this point in the history
  36. ARM: multi_v7_defconfig: Enable PBIAS regulator

    PBIAS regulator is required for MMC module in OMAP2, OMAP3, OMAP4,
    OMAP5 and DRA7 SoCs. Enable it here.
    
    Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
    Signed-off-by: Kevin Hilman <khilman@linaro.org>
    kishon authored and Kevin Hilman committed Sep 9, 2015
    Configuration menu
    Copy the full SHA
    ae1973a View commit details
    Browse the repository at this point in the history
  37. Merge branch 'next/defconfig' into next/late

    * next/defconfig: (45 commits)
      ARM: multi_v7_defconfig: Enable PBIAS regulator
      ARM: add TC2 PM support to multi_v7_defconfig
      ARM: tegra: Update multi_v7_defconfig
      ARM: tegra: Update default configuration
      ARM: at91/defconfig: at91_dt: remove ARM_AT91_ETHER
      ARM: at91/defconfig: at91_dt: enable DRM hlcdc support
      ARM: at91: at91_dt_defconfig: enable ISI and ov2640 support
      ARM: multi_v7_defconfig: Enable Allwinner P2WI, PWM, DMA_SUN6I, cryptodev
      ARM: sunxi_defconfig: Enable DMA_SUN6I, P2WI, PWM, cryptodev, EXTCON, FHANDLE
      ARM: shmobile: Enable fixed voltage regulator in shmobile_defconfig
      ARM: multi_v7_defconfig: Select MX6UL and MX7D
      ARM: prima2_defconfig: enable build for hwspinlock
      ARM: prima2_defconfig: enable build for RTC
      ARM: prima2_defconfig: enable build for misc input
      ARM: prima2_defconfig: enable build for SiRFSoC SDHC host
      ARM: prima2_defconfig: fix the outdated defconfig
      ARM: imx_v6_v7_defconfig: Select CONFIG_IKCONFIG_PROC
      ARM: defconfig: orion5x: add DT support
      ARM: qcom_defconfig: Enable options for KS8851 ethernet
      ARM: multi_v7_defconfig: Enable support for PWM Regulators
      ...
    Kevin Hilman committed Sep 9, 2015
    Configuration menu
    Copy the full SHA
    7f98121 View commit details
    Browse the repository at this point in the history
  38. Merge tag 'qcom-dt-for-4.3-rc2' of git://codeaurora.org/quic/kernel/a…

    …gross-msm into next/late
    
    Qualcomm ARM Based Device Tree Updates for v4.3-rc2
    
    * Add labels for serial nodes to be used for aliasing and stdout-path
    * Add stdout-path for APQ8064 Compulab QS600
    * Add stdout-path for APQ8064 Inforce 6410
    * Add stdout-path for APQ8074 Dragonboard
    * Add stdout-path for APQ8084 Inforce 6540
    * Add stdout-path for APQ8084 MTP
    * Add stdout-path for IPQ8064 AP148
    * Add stdout-path for MSM8660 Surf
    * Add stdout-path for MSM8960 CDP
    * Add stdout-path for MSM8974 Xperia Honami
    
    * tag 'qcom-dt-for-4.3-rc2' of git://codeaurora.org/quic/kernel/agross-msm: (24 commits)
      ARM: dts: qcom: msm8974-sony-xperia-honami: Use stdout-path
      ARM: dts: qcom: msm8960-cdp: Use stdout-path
      ARM: dts: qcom: msm8660-surf: Use stdout-path
      ARM: dts: qcom: ipq8064-ap148: Use stdout-path
      ARM: dts: qcom: apq8084-mtp: Use stdout-path
      ARM: dts: qcom: apq8084-ifc6540: Use stdout-path
      ARM: dts: qcom: apq8074-dragonboard: Use stdout-path
      ARM: dts: qcom: apq8064-ifc6410: Use stdout-path
      ARM: dts: qcom: apq8064-cm-qs600: Use stdout-path
      ARM: dts: qcom: Label serial nodes for aliasing and stdout-path
      ARM: dts: qs600: Add real regulators to sdcc
      ARM: dts: ifc6410: add real regulators for sdcc nodes.
      ARM: dts: apq8064: remove temporary fixed regulator for mmc
      ARM: dts: apq8064: fix missing gsbi cell-index
      ARM: dts: apq8064: Add DT support for GSBI6 and for UART pin mux
      ARM: dts: apq8064: add pm8921 mpp support
      ARM: dts: apq8064: Add pm8921 mfd and its gpio node
      ARM: dts: msm8974: Add smem reservation and node
      ARM: dts: msm8974: Add tcsr mutex node
      ARM: dts: qcom: Add ks8851 node for wired ethernet
      ...
    Kevin Hilman committed Sep 9, 2015
    Configuration menu
    Copy the full SHA
    312146b View commit details
    Browse the repository at this point in the history
  39. Merge tag 'qcom-soc-for-4.3-rc2' of git://codeaurora.org/quic/kernel/…

    …agross-msm into next/late
    
    Qualcomm ARM Based SoC Updates for 4.3-rc2
    
    * Fix errant private access in SMEM
    * Fix use of correct remote processor ID in SMD transactions
    * Correct SMD fBLOCKREADINTR handling
    
    * tag 'qcom-soc-for-4.3-rc2' of git://codeaurora.org/quic/kernel/agross-msm:
      soc: qcom: smd: Correct fBLOCKREADINTR handling
      soc: qcom: smd: Use correct remote processor ID
      soc: qcom: smem: Fix errant private access
      devicetree: soc: Add Qualcomm SMD based RPM DT binding
      soc: qcom: Driver for the Qualcomm RPM over SMD
      soc: qcom: Add Shared Memory Driver
      soc: qcom: Add device tree binding for Shared Memory Device
      drivers: qcom: Select QCOM_SCM unconditionally for QCOM_PM
      soc: qcom: Add Shared Memory Manager driver
    Kevin Hilman committed Sep 9, 2015
    Configuration menu
    Copy the full SHA
    c6e59bd View commit details
    Browse the repository at this point in the history

Commits on Sep 10, 2015

  1. net: cavium: liquidio: use kzalloc in setup_glist()

    We save a little .text and get rid of the sizeof(...) style
    inconsistency.
    
    Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Villemoes authored and davem330 committed Sep 10, 2015
    Configuration menu
    Copy the full SHA
    ce8e5c7 View commit details
    Browse the repository at this point in the history
  2. net: jme: use kzalloc() instead of kmalloc+memset

    Using kzalloc saves a tiny bit on .text.
    
    Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Villemoes authored and davem330 committed Sep 10, 2015
    Configuration menu
    Copy the full SHA
    e9b5ac2 View commit details
    Browse the repository at this point in the history
  3. net: mv643xx_eth: use kzalloc

    The double memset is a little ugly; using kzalloc avoids it altogether.
    
    Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Villemoes authored and davem330 committed Sep 10, 2015
    Configuration menu
    Copy the full SHA
    b66a608 View commit details
    Browse the repository at this point in the history
  4. net: qlcnic: delete redundant memsets

    In all cases, mbx->req.arg and mbx->rsp.arg have just been allocated
    using kcalloc(), so these six memsets are redundant.
    
    Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Villemoes authored and davem330 committed Sep 10, 2015
    Configuration menu
    Copy the full SHA
    1f0ca20 View commit details
    Browse the repository at this point in the history
  5. stmmac: fix check for phydev being open

    Current check of phydev with IS_ERR(phydev) may make not much sense
    because of_phy_connect() returns NULL on failure instead of error value.
    
    Still for checking result of phy_connect() IS_ERR() makes perfect sense.
    
    So let's use combined check IS_ERR_OR_NULL() that covers both cases.
    
    Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
    Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com>
    Cc: linux-kernel@vger.kernel.org
    Cc: stable@vger.kernel.org
    Cc: David Miller <davem@davemloft.net>
    Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    abrodkin authored and davem330 committed Sep 10, 2015
    Configuration menu
    Copy the full SHA
    dfc50fc View commit details
    Browse the repository at this point in the history
  6. add microchip LAN88xx phy driver

    Add Microchip LAN88XX phy driver for phylib.
    
    Signed-off-by: Woojung Huh <woojung.huh@microchip.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    WoojungHuh authored and davem330 committed Sep 10, 2015
    Configuration menu
    Copy the full SHA
    792aec4 View commit details
    Browse the repository at this point in the history
  7. ipv6: fix ifnullfree.cocci warnings

    net/ipv6/route.c:2946:3-8: WARNING: NULL check before freeing functions like kfree, debugfs_remove, debugfs_remove_recursive or usb_free_urb is not needed. Maybe consider reorganizing relevant code to avoid passing NULL values.
    
     NULL check before some freeing functions is not needed.
    
     Based on checkpatch warning
     "kfree(NULL) is safe this check is probably not required"
     and kfreeaddr.cocci by Julia Lawall.
    
    Generated by: scripts/coccinelle/free/ifnullfree.cocci
    
    CC: Roopa Prabhu <roopa@cumulusnetworks.com>
    Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Wu Fengguang authored and davem330 committed Sep 10, 2015
    Configuration menu
    Copy the full SHA
    52fe51f View commit details
    Browse the repository at this point in the history
  8. r8152: split DRIVER_VERSION

    Split DRIVER_VERSION into NETNEXT_VERSION and NET_VERSION. Then,
    according to the value of DRIVER_VERSION, we could know which
    patches are used generally without comparing the source code.
    
    Signed-off-by: Hayes Wang <hayeswang@realtek.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    hayesorz authored and davem330 committed Sep 10, 2015
    Configuration menu
    Copy the full SHA
    d094247 View commit details
    Browse the repository at this point in the history
  9. r8152: fix the runtime suspend issues

    Fix the runtime suspend issues result from the linking change.
    
    Case 1:
    a) link down occurs.
    b) driver disable tx/rx.
    c) autosuspend occurs.
    d) hw linking up.
    e) device suspends without enabling tx/rx.
    f) couldn't wake up when receiving packets.
    
    Case 2:
    a) Nway results in linking down.
    b) autosuspend occurs.
    c) device suspends.
    d) device may not wake up when linking up.
    
    Signed-off-by: Hayes Wang <hayeswang@realtek.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    hayesorz authored and davem330 committed Sep 10, 2015
    Configuration menu
    Copy the full SHA
    2dd49e0 View commit details
    Browse the repository at this point in the history
  10. Merge branch 'r8152-autoresume'

    Hayes Wang says:
    
    ====================
    r8152: fix the autoresume may fail
    
    Fix the autosuspend issues which occur about linking change.
    ====================
    
    Signed-off-by: David S. Miller <davem@davemloft.net>
    davem330 committed Sep 10, 2015
    Configuration menu
    Copy the full SHA
    1d68c28 View commit details
    Browse the repository at this point in the history
  11. net: fec: add netif status check before set mac address

    There exist one issue by below case that case system hang:
    ifconfig eth0 down
    ifconfig eth0 hw ether 00:10:19:19:81:19
    
    After eth0 down, all fec clocks are gated off. In the .fec_set_mac_address()
    function, it will set new MAC address to registers, which causes system hang.
    
    So it needs to add netif status check to avoid registers access when clocks are
    gated off. Until eth0 up the new MAC address are wrote into related registers.
    
    V2:
    As Lucas Stach's suggestion, add a comment in the code to explain why it needed.
    
    CC: Lucas Stach <l.stach@pengutronix.de>
    CC: Florian Fainelli <f.fainelli@gmail.com>
    Signed-off-by: Fugang Duan <B38611@freescale.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Nimrod Andy authored and davem330 committed Sep 10, 2015
    Configuration menu
    Copy the full SHA
    9638d19 View commit details
    Browse the repository at this point in the history
  12. cxgb4: changes for new firmware 1.14.4.0

    Incorporate fw_ldst_cmd structure change for new firmware and also
    update version string for the same
    
    Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Hariprasad Shenai authored and davem330 committed Sep 10, 2015
    Configuration menu
    Copy the full SHA
    f2be053 View commit details
    Browse the repository at this point in the history
  13. netlink, mmap: don't walk rx ring on poll if receive queue non-empty

    In case of netlink mmap, there can be situations where received frames
    have to be placed into the normal receive queue. The ring buffer indicates
    this through NL_MMAP_STATUS_COPY, so the user is asked to pick them up
    via recvmsg(2) syscall, and to put the slot back to NL_MMAP_STATUS_UNUSED.
    
    Commit 0ef7077 ("netlink: rx mmap: fix POLLIN condition") changed
    polling, so that we walk in the worst case the whole ring through the
    new netlink_has_valid_frame(), for example, when the ring would have no
    NL_MMAP_STATUS_VALID, but at least one NL_MMAP_STATUS_COPY frame.
    
    Since we do a datagram_poll() already earlier to pick up a mask that could
    possibly contain POLLIN | POLLRDNORM already (due to NL_MMAP_STATUS_COPY),
    we can skip checking the rx ring entirely.
    
    In case the kernel is compiled with !CONFIG_NETLINK_MMAP, then all this is
    irrelevant anyway as netlink_poll() is just defined as datagram_poll().
    
    Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    borkmann authored and davem330 committed Sep 10, 2015
    Configuration menu
    Copy the full SHA
    a66e365 View commit details
    Browse the repository at this point in the history
  14. netlink, mmap: fix edge-case leakages in nf queue zero-copy

    When netlink mmap on receive side is the consumer of nf queue data,
    it can happen that in some edge cases, we write skb shared info into
    the user space mmap buffer:
    
    Assume a possible rx ring frame size of only 4096, and the network skb,
    which is being zero-copied into the netlink skb, contains page frags
    with an overall skb->len larger than the linear part of the netlink
    skb.
    
    skb_zerocopy(), which is generic and thus not aware of the fact that
    shared info cannot be accessed for such skbs then tries to write and
    fill frags, thus leaking kernel data/pointers and in some corner cases
    possibly writing out of bounds of the mmap area (when filling the
    last slot in the ring buffer this way).
    
    I.e. the ring buffer slot is then of status NL_MMAP_STATUS_VALID, has
    an advertised length larger than 4096, where the linear part is visible
    at the slot beginning, and the leaked sizeof(struct skb_shared_info)
    has been written to the beginning of the next slot (also corrupting
    the struct nl_mmap_hdr slot header incl. status etc), since skb->end
    points to skb->data + ring->frame_size - NL_MMAP_HDRLEN.
    
    The fix adds and lets __netlink_alloc_skb() take the actual needed
    linear room for the network skb + meta data into account. It's completely
    irrelevant for non-mmaped netlink sockets, but in case mmap sockets
    are used, it can be decided whether the available skb_tailroom() is
    really large enough for the buffer, or whether it needs to internally
    fallback to a normal alloc_skb().
    
    >From nf queue side, the information whether the destination port is
    an mmap RX ring is not really available without extra port-to-socket
    lookup, thus it can only be determined in lower layers i.e. when
    __netlink_alloc_skb() is called that checks internally for this. I
    chose to add the extra ldiff parameter as mmap will then still work:
    We have data_len and hlen in nfqnl_build_packet_message(), data_len
    is the full length (capped at queue->copy_range) for skb_zerocopy()
    and hlen some possible part of data_len that needs to be copied; the
    rem_len variable indicates the needed remaining linear mmap space.
    
    The only other workaround in nf queue internally would be after
    allocation time by f.e. cap'ing the data_len to the skb_tailroom()
    iff we deal with an mmap skb, but that would 1) expose the fact that
    we use a mmap skb to upper layers, and 2) trim the skb where we
    otherwise could just have moved the full skb into the normal receive
    queue.
    
    After the patch, in my test case the ring slot doesn't fit and therefore
    shows NL_MMAP_STATUS_COPY, where a full skb carries all the data and
    thus needs to be picked up via recv().
    
    Fixes: 3ab1f68 ("nfnetlink: add support for memory mapped netlink")
    Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    borkmann authored and davem330 committed Sep 10, 2015
    Configuration menu
    Copy the full SHA
    6bb0fef View commit details
    Browse the repository at this point in the history
  15. elf-em.h: move EM_MICROBLAZE to the common header

    The linux/audit.h header uses EM_MICROBLAZE in order to define
    AUDIT_ARCH_MICROBLAZE, but it's only available in the microblaze
    asm headers.  Move it to the common elf-em.h header so that the
    define can be used on non-microblaze systems.  Otherwise we get
    build errors that EM_MICROBLAZE isn't defined when we try to use
    the AUDIT_ARCH_MICROBLAZE symbol.
    
    Signed-off-by: Mike Frysinger <vapier@gentoo.org>
    Signed-off-by: Michal Simek <michal.simek@xilinx.com>
    vapier authored and Michal Simek committed Sep 10, 2015
    Configuration menu
    Copy the full SHA
    b141327 View commit details
    Browse the repository at this point in the history
  16. ether: add IEEE 1722 ethertype - TSN

    IEEE 1722 describes AVB (later renamed to TSN - Time Sensitive
    Networking), a protocol, encapsualtion and synchronization to utilize
    standard networks for audio/video (and later other time-sensitive)
    streams.
    
    This standard uses ethertype 0x22F0.
    
    http://standards.ieee.org/develop/regauth/ethertype/eth.txt
    
    This is a respin of a previous patch ("ether: add AVB frame type
    ETH_P_AVB")
    
    CC: "David S. Miller" <davem@davemloft.net>
    CC: netdev@vger.kernel.org
    CC: linux-api@vger.kernel.org
    CC: linux-kernel@vger.kernel.org
    Signed-off-by: Henrik Austad <henrik@austad.us>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    henrikau authored and davem330 committed Sep 10, 2015
    Configuration menu
    Copy the full SHA
    1ab1e89 View commit details
    Browse the repository at this point in the history
  17. r8169: Fix sleeping function called during get_stats64, v2

    Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=104031
    Fixes: 6e85d5a
    
    Based on the discussion starting at
    http://www.spinics.net/lists/netdev/msg342193.html
    
    Tested locally on RTL8168evl/8111evl with various concurrent processes
    accessing /proc/net/dev while changing the link state as well as
    removing/reloading the r8169 module.
    
    Signed-off-by: Corinna Vinschen <vinschen@redhat.com>
    Tested-by: poma <pomidorabelisima@gmail.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    github-cygwin authored and davem330 committed Sep 10, 2015
    Configuration menu
    Copy the full SHA
    4202032 View commit details
    Browse the repository at this point in the history
  18. xen-netback: respect user provided max_queues

    Originally that parameter was always reset to num_online_cpus during
    module initialisation, which renders it useless.
    
    The fix is to only set max_queues to num_online_cpus when user has not
    provided a value.
    
    Reported-by: Johnny Strom <johnny.strom@linuxsolutions.fi>
    Signed-off-by: Wei Liu <wei.liu2@citrix.com>
    Reviewed-by: David Vrabel <david.vrabel@citrix.com>
    Acked-by: Ian Campbell <ian.campbell@citrix.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Wei Liu authored and davem330 committed Sep 10, 2015
    Configuration menu
    Copy the full SHA
    4c82ac3 View commit details
    Browse the repository at this point in the history
  19. xen-netfront: respect user provided max_queues

    Originally that parameter was always reset to num_online_cpus during
    module initialisation, which renders it useless.
    
    The fix is to only set max_queues to num_online_cpus when user has not
    provided a value.
    
    Signed-off-by: Wei Liu <wei.liu2@citrix.com>
    Cc: David Vrabel <david.vrabel@citrix.com>
    Reviewed-by: David Vrabel <david.vrabel@citrix.com>
    Tested-by: David Vrabel <david.vrabel@citrix.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Wei Liu authored and davem330 committed Sep 10, 2015
    Configuration menu
    Copy the full SHA
    32a8440 View commit details
    Browse the repository at this point in the history
  20. tcp: generate CA_EVENT_TX_START on data frames

    Issuing a CC TX_START event on control frames like pure ACK
    is a waste of time, as a CC should not care.
    
    Following patch needs this change, as we want CUBIC to properly track
    idle time at a low cost, with a single TX_START being generated.
    
    Yuchung might slightly refine the condition triggering TX_START
    on a followup patch.
    
    Signed-off-by: Neal Cardwell <ncardwell@google.com>
    Signed-off-by: Eric Dumazet <edumazet@google.com>
    Signed-off-by: Yuchung Cheng <ycheng@google.com>
    Cc: Jana Iyengar <jri@google.com>
    Cc: Stephen Hemminger <stephen@networkplumber.org>
    Cc: Sangtae Ha <sangtae.ha@gmail.com>
    Cc: Lawrence Brakmo <lawrence@brakmo.org>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    nealcardwell authored and davem330 committed Sep 10, 2015
    Configuration menu
    Copy the full SHA
    05c5a46 View commit details
    Browse the repository at this point in the history
  21. tcp_cubic: better follow cubic curve after idle period

    Jana Iyengar found an interesting issue on CUBIC :
    
    The epoch is only updated/reset initially and when experiencing losses.
    The delta "t" of now - epoch_start can be arbitrary large after app idle
    as well as the bic_target. Consequentially the slope (inverse of
    ca->cnt) would be really large, and eventually ca->cnt would be
    lower-bounded in the end to 2 to have delayed-ACK slow-start behavior.
    
    This particularly shows up when slow_start_after_idle is disabled
    as a dangerous cwnd inflation (1.5 x RTT) after few seconds of idle
    time.
    
    Jana initial fix was to reset epoch_start if app limited,
    but Neal pointed out it would ask the CUBIC algorithm to recalculate the
    curve so that we again start growing steeply upward from where cwnd is
    now (as CUBIC does just after a loss). Ideally we'd want the cwnd growth
    curve to be the same shape, just shifted later in time by the amount of
    the idle period.
    
    Reported-by: Jana Iyengar <jri@google.com>
    Signed-off-by: Eric Dumazet <edumazet@google.com>
    Signed-off-by: Yuchung Cheng <ycheng@google.com>
    Signed-off-by: Neal Cardwell <ncardwell@google.com>
    Cc: Stephen Hemminger <stephen@networkplumber.org>
    Cc: Sangtae Ha <sangtae.ha@gmail.com>
    Cc: Lawrence Brakmo <lawrence@brakmo.org>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Eric Dumazet authored and davem330 committed Sep 10, 2015
    Configuration menu
    Copy the full SHA
    3092752 View commit details
    Browse the repository at this point in the history
  22. zpool: add zpool_has_pool()

    This series makes creation of the zpool and compressor dynamic, so that
    they can be changed at runtime.  This makes using/configuring zswap
    easier, as before this zswap had to be configured at boot time, using boot
    params.
    
    This uses a single list to track both the zpool and compressor together,
    although Seth had mentioned an alternative which is to track the zpools
    and compressors using separate lists.  In the most common case, only a
    single zpool and single compressor, using one list is slightly simpler
    than using two lists, and for the uncommon case of multiple zpools and/or
    compressors, using one list is slightly less simple (and uses slightly
    more memory, probably) than using two lists.
    
    This patch (of 4):
    
    Add zpool_has_pool() function, indicating if the specified type of zpool
    is available (i.e.  zsmalloc or zbud).  This allows checking if a pool is
    available, without actually trying to allocate it, similar to
    crypto_has_alg().
    
    This is used by a following patch to zswap that enables the dynamic
    runtime creation of zswap zpools.
    
    Signed-off-by: Dan Streetman <ddstreet@ieee.org>
    Acked-by: Seth Jennings <sjennings@variantweb.net>
    Cc: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    ddstreet authored and torvalds committed Sep 10, 2015
    Configuration menu
    Copy the full SHA
    3f0e131 View commit details
    Browse the repository at this point in the history
  23. zswap: dynamic pool creation

    Add dynamic creation of pools.  Move the static crypto compression per-cpu
    transforms into each pool.  Add a pointer to zswap_entry to the pool it's
    in.
    
    This is required by the following patch which enables changing the zswap
    zpool and compressor params at runtime.
    
    [akpm@linux-foundation.org: fix merge snafus]
    Signed-off-by: Dan Streetman <ddstreet@ieee.org>
    Acked-by: Seth Jennings <sjennings@variantweb.net>
    Cc: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    ddstreet authored and torvalds committed Sep 10, 2015
    Configuration menu
    Copy the full SHA
    f1c5484 View commit details
    Browse the repository at this point in the history
  24. zswap: change zpool/compressor at runtime

    Update the zpool and compressor parameters to be changeable at runtime.
    When changed, a new pool is created with the requested zpool/compressor,
    and added as the current pool at the front of the pool list.  Previous
    pools remain in the list only to remove existing compressed pages from.
    The old pool(s) are removed once they become empty.
    
    Signed-off-by: Dan Streetman <ddstreet@ieee.org>
    Acked-by: Seth Jennings <sjennings@variantweb.net>
    Cc: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    ddstreet authored and torvalds committed Sep 10, 2015
    Configuration menu
    Copy the full SHA
    90b0fc2 View commit details
    Browse the repository at this point in the history
  25. zswap: update docs for runtime-changeable attributes

    Change the Documentation/vm/zswap.txt doc to indicate that the "zpool" and
    "compressor" params are now changeable at runtime.
    
    Signed-off-by: Dan Streetman <ddstreet@ieee.org>
    Cc: Seth Jennings <sjennings@variantweb.net>
    Cc: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
    Cc: Vlastimil Babka <vbabka@suse.cz>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    ddstreet authored and torvalds committed Sep 10, 2015
    Configuration menu
    Copy the full SHA
    9c4c5ef View commit details
    Browse the repository at this point in the history
  26. memcg: add page_cgroup_ino helper

    This patchset introduces a new user API for tracking user memory pages
    that have not been used for a given period of time.  The purpose of this
    is to provide the userspace with the means of tracking a workload's
    working set, i.e.  the set of pages that are actively used by the
    workload.  Knowing the working set size can be useful for partitioning the
    system more efficiently, e.g.  by tuning memory cgroup limits
    appropriately, or for job placement within a compute cluster.
    
    ==== USE CASES ====
    
    The unified cgroup hierarchy has memory.low and memory.high knobs, which
    are defined as the low and high boundaries for the workload working set
    size.  However, the working set size of a workload may be unknown or
    change in time.  With this patch set, one can periodically estimate the
    amount of memory unused by each cgroup and tune their memory.low and
    memory.high parameters accordingly, therefore optimizing the overall
    memory utilization.
    
    Another use case is balancing workloads within a compute cluster.  Knowing
    how much memory is not really used by a workload unit may help take a more
    optimal decision when considering migrating the unit to another node
    within the cluster.
    
    Also, as noted by Minchan, this would be useful for per-process reclaim
    (https://lwn.net/Articles/545668/). With idle tracking, we could reclaim idle
    pages only by smart user memory manager.
    
    ==== USER API ====
    
    The user API consists of two new files:
    
     * /sys/kernel/mm/page_idle/bitmap.  This file implements a bitmap where each
       bit corresponds to a page, indexed by PFN. When the bit is set, the
       corresponding page is idle. A page is considered idle if it has not been
       accessed since it was marked idle. To mark a page idle one should set the
       bit corresponding to the page by writing to the file. A value written to the
       file is OR-ed with the current bitmap value. Only user memory pages can be
       marked idle, for other page types input is silently ignored. Writing to this
       file beyond max PFN results in the ENXIO error. Only available when
       CONFIG_IDLE_PAGE_TRACKING is set.
    
       This file can be used to estimate the amount of pages that are not
       used by a particular workload as follows:
    
       1. mark all pages of interest idle by setting corresponding bits in the
          /sys/kernel/mm/page_idle/bitmap
       2. wait until the workload accesses its working set
       3. read /sys/kernel/mm/page_idle/bitmap and count the number of bits set
    
     * /proc/kpagecgroup.  This file contains a 64-bit inode number of the
       memory cgroup each page is charged to, indexed by PFN. Only available when
       CONFIG_MEMCG is set.
    
       This file can be used to find all pages (including unmapped file pages)
       accounted to a particular cgroup. Using /sys/kernel/mm/page_idle/bitmap, one
       can then estimate the cgroup working set size.
    
    For an example of using these files for estimating the amount of unused
    memory pages per each memory cgroup, please see the script attached
    below.
    
    ==== REASONING ====
    
    The reason to introduce the new user API instead of using
    /proc/PID/{clear_refs,smaps} is that the latter has two serious
    drawbacks:
    
     - it does not count unmapped file pages
     - it affects the reclaimer logic
    
    The new API attempts to overcome them both. For more details on how it
    is achieved, please see the comment to patch 6.
    
    ==== PATCHSET STRUCTURE ====
    
    The patch set is organized as follows:
    
     - patch 1 adds page_cgroup_ino() helper for the sake of
       /proc/kpagecgroup and patches 2-3 do related cleanup
     - patch 4 adds /proc/kpagecgroup, which reports cgroup ino each page is
       charged to
     - patch 5 introduces a new mmu notifier callback, clear_young, which is
       a lightweight version of clear_flush_young; it is used in patch 6
     - patch 6 implements the idle page tracking feature, including the
       userspace API, /sys/kernel/mm/page_idle/bitmap
     - patch 7 exports idle flag via /proc/kpageflags
    
    ==== SIMILAR WORKS ====
    
    Originally, the patch for tracking idle memory was proposed back in 2011
    by Michel Lespinasse (see http://lwn.net/Articles/459269/).  The main
    difference between Michel's patch and this one is that Michel implemented
    a kernel space daemon for estimating idle memory size per cgroup while
    this patch only provides the userspace with the minimal API for doing the
    job, leaving the rest up to the userspace.  However, they both share the
    same idea of Idle/Young page flags to avoid affecting the reclaimer logic.
    
    ==== PERFORMANCE EVALUATION ====
    
    SPECjvm2008 (https://www.spec.org/jvm2008/) was used to evaluate the
    performance impact introduced by this patch set.  Three runs were carried
    out:
    
     - base: kernel without the patch
     - patched: patched kernel, the feature is not used
     - patched-active: patched kernel, 1 minute-period daemon is used for
       tracking idle memory
    
    For tracking idle memory, idlememstat utility was used:
    https://github.com/locker/idlememstat
    
    testcase            base            patched        patched-active
    
    compiler       537.40 ( 0.00)%   532.26 (-0.96)%   538.31 ( 0.17)%
    compress       305.47 ( 0.00)%   301.08 (-1.44)%   300.71 (-1.56)%
    crypto         284.32 ( 0.00)%   282.21 (-0.74)%   284.87 ( 0.19)%
    derby          411.05 ( 0.00)%   413.44 ( 0.58)%   412.07 ( 0.25)%
    mpegaudio      189.96 ( 0.00)%   190.87 ( 0.48)%   189.42 (-0.28)%
    scimark.large   46.85 ( 0.00)%    46.41 (-0.94)%    47.83 ( 2.09)%
    scimark.small  412.91 ( 0.00)%   415.41 ( 0.61)%   421.17 ( 2.00)%
    serial         204.23 ( 0.00)%   213.46 ( 4.52)%   203.17 (-0.52)%
    startup         36.76 ( 0.00)%    35.49 (-3.45)%    35.64 (-3.05)%
    sunflow        115.34 ( 0.00)%   115.08 (-0.23)%   117.37 ( 1.76)%
    xml            620.55 ( 0.00)%   619.95 (-0.10)%   620.39 (-0.03)%
    
    composite      211.50 ( 0.00)%   211.15 (-0.17)%   211.67 ( 0.08)%
    
    time idlememstat:
    
    17.20user 65.16system 2:15:23elapsed 1%CPU (0avgtext+0avgdata 8476maxresident)k
    448inputs+40outputs (1major+36052minor)pagefaults 0swaps
    
    ==== SCRIPT FOR COUNTING IDLE PAGES PER CGROUP ====
    #! /usr/bin/python
    #
    
    import os
    import stat
    import errno
    import struct
    
    CGROUP_MOUNT = "/sys/fs/cgroup/memory"
    BUFSIZE = 8 * 1024  # must be multiple of 8
    
    def get_hugepage_size():
        with open("/proc/meminfo", "r") as f:
            for s in f:
                k, v = s.split(":")
                if k == "Hugepagesize":
                    return int(v.split()[0]) * 1024
    
    PAGE_SIZE = os.sysconf("SC_PAGE_SIZE")
    HUGEPAGE_SIZE = get_hugepage_size()
    
    def set_idle():
        f = open("/sys/kernel/mm/page_idle/bitmap", "wb", BUFSIZE)
        while True:
            try:
                f.write(struct.pack("Q", pow(2, 64) - 1))
            except IOError as err:
                if err.errno == errno.ENXIO:
                    break
                raise
        f.close()
    
    def count_idle():
        f_flags = open("/proc/kpageflags", "rb", BUFSIZE)
        f_cgroup = open("/proc/kpagecgroup", "rb", BUFSIZE)
    
        with open("/sys/kernel/mm/page_idle/bitmap", "rb", BUFSIZE) as f:
            while f.read(BUFSIZE): pass  # update idle flag
    
        idlememsz = {}
        while True:
            s1, s2 = f_flags.read(8), f_cgroup.read(8)
            if not s1 or not s2:
                break
    
            flags, = struct.unpack('Q', s1)
            cgino, = struct.unpack('Q', s2)
    
            unevictable = (flags >> 18) & 1
            huge = (flags >> 22) & 1
            idle = (flags >> 25) & 1
    
            if idle and not unevictable:
                idlememsz[cgino] = idlememsz.get(cgino, 0) + \
                    (HUGEPAGE_SIZE if huge else PAGE_SIZE)
    
        f_flags.close()
        f_cgroup.close()
        return idlememsz
    
    if __name__ == "__main__":
        print "Setting the idle flag for each page..."
        set_idle()
    
        raw_input("Wait until the workload accesses its working set, "
                  "then press Enter")
    
        print "Counting idle pages..."
        idlememsz = count_idle()
    
        for dir, subdirs, files in os.walk(CGROUP_MOUNT):
            ino = os.stat(dir)[stat.ST_INO]
            print dir + ": " + str(idlememsz.get(ino, 0) / 1024) + " kB"
    ==== END SCRIPT ====
    
    This patch (of 8):
    
    Add page_cgroup_ino() helper to memcg.
    
    This function returns the inode number of the closest online ancestor of
    the memory cgroup a page is charged to.  It is required for exporting
    information about which page is charged to which cgroup to userspace,
    which will be introduced by a following patch.
    
    Signed-off-by: Vladimir Davydov <vdavydov@parallels.com>
    Reviewed-by: Andres Lagar-Cavilla <andreslc@google.com>
    Cc: Minchan Kim <minchan@kernel.org>
    Cc: Raghavendra K T <raghavendra.kt@linux.vnet.ibm.com>
    Cc: Johannes Weiner <hannes@cmpxchg.org>
    Cc: Michal Hocko <mhocko@suse.cz>
    Cc: Greg Thelen <gthelen@google.com>
    Cc: Michel Lespinasse <walken@google.com>
    Cc: David Rientjes <rientjes@google.com>
    Cc: Pavel Emelyanov <xemul@parallels.com>
    Cc: Cyrill Gorcunov <gorcunov@openvz.org>
    Cc: Jonathan Corbet <corbet@lwn.net>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Vladimir Davydov authored and torvalds committed Sep 10, 2015
    Configuration menu
    Copy the full SHA
    2fc0452 View commit details
    Browse the repository at this point in the history
  27. hwpoison: use page_cgroup_ino for filtering by memcg

    Hwpoison allows to filter pages by memory cgroup ino.  Currently, it
    calls try_get_mem_cgroup_from_page to obtain the cgroup from a page and
    then its ino using cgroup_ino, but now we have a helper method for
    that, page_cgroup_ino, so use it instead.
    
    This patch also loosens the hwpoison memcg filter dependency rules - it
    makes it depend on CONFIG_MEMCG instead of CONFIG_MEMCG_SWAP, because
    hwpoison memcg filter does not require anything (nor it used to) from
    CONFIG_MEMCG_SWAP side.
    
    Signed-off-by: Vladimir Davydov <vdavydov@parallels.com>
    Reviewed-by: Andres Lagar-Cavilla <andreslc@google.com>
    Cc: Minchan Kim <minchan@kernel.org>
    Cc: Raghavendra K T <raghavendra.kt@linux.vnet.ibm.com>
    Cc: Johannes Weiner <hannes@cmpxchg.org>
    Cc: Michal Hocko <mhocko@suse.cz>
    Cc: Greg Thelen <gthelen@google.com>
    Cc: Michel Lespinasse <walken@google.com>
    Cc: David Rientjes <rientjes@google.com>
    Cc: Pavel Emelyanov <xemul@parallels.com>
    Cc: Cyrill Gorcunov <gorcunov@openvz.org>
    Cc: Jonathan Corbet <corbet@lwn.net>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Vladimir Davydov authored and torvalds committed Sep 10, 2015
    Configuration menu
    Copy the full SHA
    94a59fb View commit details
    Browse the repository at this point in the history
  28. memcg: zap try_get_mem_cgroup_from_page

    It is only used in mem_cgroup_try_charge, so fold it in and zap it.
    
    Signed-off-by: Vladimir Davydov <vdavydov@parallels.com>
    Reviewed-by: Andres Lagar-Cavilla <andreslc@google.com>
    Cc: Minchan Kim <minchan@kernel.org>
    Cc: Raghavendra K T <raghavendra.kt@linux.vnet.ibm.com>
    Cc: Johannes Weiner <hannes@cmpxchg.org>
    Cc: Michal Hocko <mhocko@suse.cz>
    Cc: Greg Thelen <gthelen@google.com>
    Cc: Michel Lespinasse <walken@google.com>
    Cc: David Rientjes <rientjes@google.com>
    Cc: Pavel Emelyanov <xemul@parallels.com>
    Cc: Cyrill Gorcunov <gorcunov@openvz.org>
    Cc: Jonathan Corbet <corbet@lwn.net>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Vladimir Davydov authored and torvalds committed Sep 10, 2015
    Configuration menu
    Copy the full SHA
    e993d90 View commit details
    Browse the repository at this point in the history
  29. proc: add kpagecgroup file

    /proc/kpagecgroup contains a 64-bit inode number of the memory cgroup each
    page is charged to, indexed by PFN.  Having this information is useful for
    estimating a cgroup working set size.
    
    The file is present if CONFIG_PROC_PAGE_MONITOR && CONFIG_MEMCG.
    
    Signed-off-by: Vladimir Davydov <vdavydov@parallels.com>
    Reviewed-by: Andres Lagar-Cavilla <andreslc@google.com>
    Cc: Minchan Kim <minchan@kernel.org>
    Cc: Raghavendra K T <raghavendra.kt@linux.vnet.ibm.com>
    Cc: Johannes Weiner <hannes@cmpxchg.org>
    Cc: Michal Hocko <mhocko@suse.cz>
    Cc: Greg Thelen <gthelen@google.com>
    Cc: Michel Lespinasse <walken@google.com>
    Cc: David Rientjes <rientjes@google.com>
    Cc: Pavel Emelyanov <xemul@parallels.com>
    Cc: Cyrill Gorcunov <gorcunov@openvz.org>
    Cc: Jonathan Corbet <corbet@lwn.net>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Vladimir Davydov authored and torvalds committed Sep 10, 2015
    Configuration menu
    Copy the full SHA
    80ae2fd View commit details
    Browse the repository at this point in the history
  30. mmu-notifier: add clear_young callback

    In the scope of the idle memory tracking feature, which is introduced by
    the following patch, we need to clear the referenced/accessed bit not only
    in primary, but also in secondary ptes.  The latter is required in order
    to estimate wss of KVM VMs.  At the same time we want to avoid flushing
    tlb, because it is quite expensive and it won't really affect the final
    result.
    
    Currently, there is no function for clearing pte young bit that would meet
    our requirements, so this patch introduces one.  To achieve that we have
    to add a new mmu-notifier callback, clear_young, since there is no method
    for testing-and-clearing a secondary pte w/o flushing tlb.  The new method
    is not mandatory and currently only implemented by KVM.
    
    Signed-off-by: Vladimir Davydov <vdavydov@parallels.com>
    Reviewed-by: Andres Lagar-Cavilla <andreslc@google.com>
    Acked-by: Paolo Bonzini <pbonzini@redhat.com>
    Cc: Minchan Kim <minchan@kernel.org>
    Cc: Raghavendra K T <raghavendra.kt@linux.vnet.ibm.com>
    Cc: Johannes Weiner <hannes@cmpxchg.org>
    Cc: Michal Hocko <mhocko@suse.cz>
    Cc: Greg Thelen <gthelen@google.com>
    Cc: Michel Lespinasse <walken@google.com>
    Cc: David Rientjes <rientjes@google.com>
    Cc: Pavel Emelyanov <xemul@parallels.com>
    Cc: Cyrill Gorcunov <gorcunov@openvz.org>
    Cc: Jonathan Corbet <corbet@lwn.net>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Vladimir Davydov authored and torvalds committed Sep 10, 2015
    Configuration menu
    Copy the full SHA
    1d7715c View commit details
    Browse the repository at this point in the history
  31. mm: introduce idle page tracking

    Knowing the portion of memory that is not used by a certain application or
    memory cgroup (idle memory) can be useful for partitioning the system
    efficiently, e.g.  by setting memory cgroup limits appropriately.
    Currently, the only means to estimate the amount of idle memory provided
    by the kernel is /proc/PID/{clear_refs,smaps}: the user can clear the
    access bit for all pages mapped to a particular process by writing 1 to
    clear_refs, wait for some time, and then count smaps:Referenced.  However,
    this method has two serious shortcomings:
    
     - it does not count unmapped file pages
     - it affects the reclaimer logic
    
    To overcome these drawbacks, this patch introduces two new page flags,
    Idle and Young, and a new sysfs file, /sys/kernel/mm/page_idle/bitmap.
    A page's Idle flag can only be set from userspace by setting bit in
    /sys/kernel/mm/page_idle/bitmap at the offset corresponding to the page,
    and it is cleared whenever the page is accessed either through page tables
    (it is cleared in page_referenced() in this case) or using the read(2)
    system call (mark_page_accessed()). Thus by setting the Idle flag for
    pages of a particular workload, which can be found e.g.  by reading
    /proc/PID/pagemap, waiting for some time to let the workload access its
    working set, and then reading the bitmap file, one can estimate the amount
    of pages that are not used by the workload.
    
    The Young page flag is used to avoid interference with the memory
    reclaimer.  A page's Young flag is set whenever the Access bit of a page
    table entry pointing to the page is cleared by writing to the bitmap file.
    If page_referenced() is called on a Young page, it will add 1 to its
    return value, therefore concealing the fact that the Access bit was
    cleared.
    
    Note, since there is no room for extra page flags on 32 bit, this feature
    uses extended page flags when compiled on 32 bit.
    
    [akpm@linux-foundation.org: fix build]
    [akpm@linux-foundation.org: kpageidle requires an MMU]
    [akpm@linux-foundation.org: decouple from page-flags rework]
    Signed-off-by: Vladimir Davydov <vdavydov@parallels.com>
    Reviewed-by: Andres Lagar-Cavilla <andreslc@google.com>
    Cc: Minchan Kim <minchan@kernel.org>
    Cc: Raghavendra K T <raghavendra.kt@linux.vnet.ibm.com>
    Cc: Johannes Weiner <hannes@cmpxchg.org>
    Cc: Michal Hocko <mhocko@suse.cz>
    Cc: Greg Thelen <gthelen@google.com>
    Cc: Michel Lespinasse <walken@google.com>
    Cc: David Rientjes <rientjes@google.com>
    Cc: Pavel Emelyanov <xemul@parallels.com>
    Cc: Cyrill Gorcunov <gorcunov@openvz.org>
    Cc: Jonathan Corbet <corbet@lwn.net>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Vladimir Davydov authored and torvalds committed Sep 10, 2015
    Configuration menu
    Copy the full SHA
    33c3fc7 View commit details
    Browse the repository at this point in the history
  32. proc: export idle flag via kpageflags

    As noted by Minchan, a benefit of reading idle flag from /proc/kpageflags
    is that one can easily filter dirty and/or unevictable pages while
    estimating the size of unused memory.
    
    Note that idle flag read from /proc/kpageflags may be stale in case the
    page was accessed via a PTE, because it would be too costly to iterate
    over all page mappings on each /proc/kpageflags read to provide an
    up-to-date value.  To make sure the flag is up-to-date one has to read
    /sys/kernel/mm/page_idle/bitmap first.
    
    Signed-off-by: Vladimir Davydov <vdavydov@parallels.com>
    Reviewed-by: Andres Lagar-Cavilla <andreslc@google.com>
    Cc: Minchan Kim <minchan@kernel.org>
    Cc: Raghavendra K T <raghavendra.kt@linux.vnet.ibm.com>
    Cc: Johannes Weiner <hannes@cmpxchg.org>
    Cc: Michal Hocko <mhocko@suse.cz>
    Cc: Greg Thelen <gthelen@google.com>
    Cc: Michel Lespinasse <walken@google.com>
    Cc: David Rientjes <rientjes@google.com>
    Cc: Pavel Emelyanov <xemul@parallels.com>
    Cc: Cyrill Gorcunov <gorcunov@openvz.org>
    Cc: Jonathan Corbet <corbet@lwn.net>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Vladimir Davydov authored and torvalds committed Sep 10, 2015
    Configuration menu
    Copy the full SHA
    f074a8f View commit details
    Browse the repository at this point in the history
  33. proc: add cond_resched to /proc/kpage* read/write loop

    Reading/writing a /proc/kpage* file may take long on machines with a lot
    of RAM installed.
    
    Signed-off-by: Vladimir Davydov <vdavydov@parallels.com>
    Suggested-by: Andres Lagar-Cavilla <andreslc@google.com>
    Reviewed-by: Andres Lagar-Cavilla <andreslc@google.com>
    Cc: Minchan Kim <minchan@kernel.org>
    Cc: Raghavendra K T <raghavendra.kt@linux.vnet.ibm.com>
    Cc: Johannes Weiner <hannes@cmpxchg.org>
    Cc: Michal Hocko <mhocko@suse.cz>
    Cc: Greg Thelen <gthelen@google.com>
    Cc: Michel Lespinasse <walken@google.com>
    Cc: David Rientjes <rientjes@google.com>
    Cc: Pavel Emelyanov <xemul@parallels.com>
    Cc: Cyrill Gorcunov <gorcunov@openvz.org>
    Cc: Jonathan Corbet <corbet@lwn.net>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Vladimir Davydov authored and torvalds committed Sep 10, 2015
    Configuration menu
    Copy the full SHA
    d3691d2 View commit details
    Browse the repository at this point in the history
  34. procfs: always expose /proc/<pid>/map_files/ and make it readable

    Currently, /proc/<pid>/map_files/ is restricted to CAP_SYS_ADMIN, and is
    only exposed if CONFIG_CHECKPOINT_RESTORE is set.
    
    Each mapped file region gets a symlink in /proc/<pid>/map_files/
    corresponding to the virtual address range at which it is mapped.  The
    symlinks work like the symlinks in /proc/<pid>/fd/, so you can follow them
    to the backing file even if that backing file has been unlinked.
    
    Currently, files which are mapped, unlinked, and closed are impossible to
    stat() from userspace.  Exposing /proc/<pid>/map_files/ closes this
    functionality "hole".
    
    Not being able to stat() such files makes noticing and explicitly
    accounting for the space they use on the filesystem impossible.  You can
    work around this by summing up the space used by every file in the
    filesystem and subtracting that total from what statfs() tells you, but
    that obviously isn't great, and it becomes unworkable once your filesystem
    becomes large enough.
    
    This patch moves map_files/ out from behind CONFIG_CHECKPOINT_RESTORE, and
    adjusts the permissions enforced on it as follows:
    
    * proc_map_files_lookup()
    * proc_map_files_readdir()
    * map_files_d_revalidate()
    
    	Remove the CAP_SYS_ADMIN restriction, leaving only the current
    	restriction requiring PTRACE_MODE_READ. The information made
    	available to userspace by these three functions is already
    	available in /proc/PID/maps with MODE_READ, so I don't see any
    	reason to limit them any further (see below for more detail).
    
    * proc_map_files_follow_link()
    
    	This stub has been added, and requires that the user have
    	CAP_SYS_ADMIN in order to follow the links in map_files/,
    	since there was concern on LKML both about the potential for
    	bypassing permissions on ancestor directories in the path to
    	files pointed to, and about what happens with more exotic
    	memory mappings created by some drivers (ie dma-buf).
    
    In older versions of this patch, I changed every permission check in
    the four functions above to enforce MODE_ATTACH instead of MODE_READ.
    This was an oversight on my part, and after revisiting the discussion
    it seems that nobody was concerned about anything outside of what is
    made possible by ->follow_link(). So in this version, I've left the
    checks for PTRACE_MODE_READ as-is.
    
    [akpm@linux-foundation.org: catch up with concurrent proc_pid_follow_link() changes]
    Signed-off-by: Calvin Owens <calvinowens@fb.com>
    Reviewed-by: Kees Cook <keescook@chromium.org>
    Cc: Andy Lutomirski <luto@amacapital.net>
    Cc: Cyrill Gorcunov <gorcunov@openvz.org>
    Cc: Joe Perches <joe@perches.com>
    Cc: Kirill A. Shutemov <kirill@shutemov.name>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    jcalvinowens authored and torvalds committed Sep 10, 2015
    Configuration menu
    Copy the full SHA
    bdb4d10 View commit details
    Browse the repository at this point in the history
  35. proc: change proc_subdir_lock to a rwlock

    The proc_subdir_lock spinlock is used to allow only one task to make
    change to the proc directory structure as well as looking up information
    in it.  However, the information lookup part can actually be entered by
    more than one task as the pde_get() and pde_put() reference count update
    calls in the critical sections are atomic increment and decrement
    respectively and so are safe with concurrent updates.
    
    The x86 architecture has already used qrwlock which is fair and other
    architectures like ARM are in the process of switching to qrwlock.  So
    unfairness shouldn't be a concern in that conversion.
    
    This patch changed the proc_subdir_lock to a rwlock in order to enable
    concurrent lookup. The following functions were modified to take a
    write lock:
     - proc_register()
     - remove_proc_entry()
     - remove_proc_subtree()
    
    The following functions were modified to take a read lock:
     - xlate_proc_name()
     - proc_lookup_de()
     - proc_readdir_de()
    
    A parallel /proc filesystem search with the "find" command (1000 threads)
    was run on a 4-socket Haswell-EX box (144 threads).  Before the patch, the
    parallel search took about 39s.  After the patch, the parallel find took
    only 25s, a saving of about 14s.
    
    The micro-benchmark that I used was artificial, but it was used to
    reproduce an exit hanging problem that I saw in real application.  In
    fact, only allow one task to do a lookup seems too limiting to me.
    
    Signed-off-by: Waiman Long <Waiman.Long@hp.com>
    Acked-by: "Eric W. Biederman" <ebiederm@xmission.com>
    Cc: Alexey Dobriyan <adobriyan@gmail.com>
    Cc: Nicolas Dichtel <nicolas.dichtel@6wind.com>
    Cc: Al Viro <viro@zeniv.linux.org.uk>
    Cc: Scott J Norton <scott.norton@hp.com>
    Cc: Douglas Hatch <doug.hatch@hp.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    longman88 authored and torvalds committed Sep 10, 2015
    Configuration menu
    Copy the full SHA
    ecf1a3d View commit details
    Browse the repository at this point in the history
  36. include/linux/poison.h: fix LIST_POISON{1,2} offset

    Poison pointer values should be small enough to find a room in
    non-mmap'able/hardly-mmap'able space.  E.g.  on x86 "poison pointer space"
    is located starting from 0x0.  Given unprivileged users cannot mmap
    anything below mmap_min_addr, it should be safe to use poison pointers
    lower than mmap_min_addr.
    
    The current poison pointer values of LIST_POISON{1,2} might be too big for
    mmap_min_addr values equal or less than 1 MB (common case, e.g.  Ubuntu
    uses only 0x10000).  There is little point to use such a big value given
    the "poison pointer space" below 1 MB is not yet exhausted.  Changing it
    to a smaller value solves the problem for small mmap_min_addr setups.
    
    The values are suggested by Solar Designer:
    http://www.openwall.com/lists/oss-security/2015/05/02/6
    
    Signed-off-by: Vasily Kulikov <segoon@openwall.com>
    Cc: Solar Designer <solar@openwall.com>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    segoon authored and torvalds committed Sep 10, 2015
    Configuration menu
    Copy the full SHA
    8a5e5e0 View commit details
    Browse the repository at this point in the history
  37. include/linux/poison.h: remove not-used poison pointer macros

    Signed-off-by: Vasily Kulikov <segoon@openwall.com>
    Cc: Solar Designer <solar@openwall.com>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    segoon authored and torvalds committed Sep 10, 2015
    Configuration menu
    Copy the full SHA
    8b83963 View commit details
    Browse the repository at this point in the history
  38. kernel/extable.c: remove duplicated include

    Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
    Acked-by: Steven Rostedt <rostedt@goodmis.org>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Wei Yongjun authored and torvalds committed Sep 10, 2015
    Configuration menu
    Copy the full SHA
    2307e1a View commit details
    Browse the repository at this point in the history
  39. kernel/cred.c: remove unnecessary kdebug atomic reads

    Commit e0e8173 ("CRED: Add some configurable debugging [try #6]")
    added the kdebug mechanism to this file back in 2009.
    
    The kdebug macro calls no_printk which always evaluates arguments.
    
    Most of the kdebug uses have an unnecessary call of
    	atomic_read(&cred->usage)
    
    Make the kdebug macro do nothing by defining it with
    	do { if (0) no_printk(...); } while (0)
    when not enabled.
    
    $ size kernel/cred.o* (defconfig x86-64)
       text	   data	    bss	    dec	    hex	filename
       2748	    336	      8	   3092	    c14	kernel/cred.o.new
       2788	    336	      8	   3132	    c3c	kernel/cred.o.old
    
    Miscellanea:
    o Neaten the #define kdebug macros while there
    
    Signed-off-by: Joe Perches <joe@perches.com>
    Cc: David Howells <dhowells@redhat.com>
    Cc: James Morris <jmorris@namei.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    JoePerches authored and torvalds committed Sep 10, 2015
    Configuration menu
    Copy the full SHA
    52aa853 View commit details
    Browse the repository at this point in the history
  40. include/linux/printk.h: include pr_fmt in pr_debug_ratelimited

    The other two implementations of pr_debug_ratelimited include pr_fmt,
    along with every other pr_* function.  But pr_debug_ratelimited forgot to
    add it with the CONFIG_DYNAMIC_DEBUG implementation.
    
    This patch unifies the behavior.
    
    Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
    Cc: Steven Rostedt <rostedt@goodmis.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    zx2c4 authored and torvalds committed Sep 10, 2015
    Configuration menu
    Copy the full SHA
    515a9ad View commit details
    Browse the repository at this point in the history
  41. MAINTAINERS/CREDITS: mark MaxRAID as Orphan, move Anil Ravindranath t…

    …o CREDITS
    
    Anil's email address bounces and he hasn't had a signoff
    in over 5 years.
    
    Signed-off-by: Joe Perches <joe@perches.com>
    Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    JoePerches authored and torvalds committed Sep 10, 2015
    Configuration menu
    Copy the full SHA
    3cdea4d View commit details
    Browse the repository at this point in the history
  42. kstrto*: accept "-0" for signed conversion

    strtol(3) et al accept "-0", so should we.
    
    Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
    Cc: David Howells <dhowells@redhat.com>
    Cc: Jan Kara <jack@suse.cz>
    Cc: Joel Becker <jlbec@evilplan.org>
    Cc: Mark Fasheh <mfasheh@suse.com>
    Cc: Theodore Ts'o <tytso@mit.edu>
    Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Alexey Dobriyan authored and torvalds committed Sep 10, 2015
    Configuration menu
    Copy the full SHA
    2d2e471 View commit details
    Browse the repository at this point in the history
  43. proc: convert to kstrto*()/kstrto*_from_user()

    Convert from manual allocation/copy_from_user/...  to kstrto*() family
    which were designed for exactly that.
    
    One case can not be converted to kstrto*_from_user() to make code even
    more simpler because of whitespace stripping, oh well...
    
    Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Alexey Dobriyan authored and torvalds committed Sep 10, 2015
    Configuration menu
    Copy the full SHA
    774636e View commit details
    Browse the repository at this point in the history
  44. lib/bitmap.c: correct a code style and do some, optimization

    We can avoid in-loop incrementation of ndigits.  Save current totaldigits
    to ndigits before loop, and check ndigits against totaldigits after the
    loop.
    
    Signed-off-by: Pan Xinhui <xinhuix.pan@intel.com>
    Cc: Yury Norov <yury.norov@gmail.com>
    Cc: Chris Metcalf <cmetcalf@ezchip.com>
    Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>
    Cc: Sudeep Holla <sudeep.holla@arm.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Pan Xinhui authored and torvalds committed Sep 10, 2015
    Configuration menu
    Copy the full SHA
    d21c3d4 View commit details
    Browse the repository at this point in the history
  45. lib/bitmap.c: fix a special string handling bug in __bitmap_parselist

    If string end with '-', for exapmle, bitmap_parselist("1,0-",&mask,
    nmaskbits), It is not in a valid pattern, so add a check after loop.
    Return -EINVAL on such condition.
    
    Signed-off-by: Pan Xinhui <xinhuix.pan@intel.com>
    Cc: Yury Norov <yury.norov@gmail.com>
    Cc: Chris Metcalf <cmetcalf@ezchip.com>
    Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>
    Cc: Sudeep Holla <sudeep.holla@arm.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Pan Xinhui authored and torvalds committed Sep 10, 2015
    Configuration menu
    Copy the full SHA
    d9282cb View commit details
    Browse the repository at this point in the history
  46. lib/bitmap.c: bitmap_parselist can accept string with whitespaces on …

    …head or tail
    
    In __bitmap_parselist we can accept whitespaces on head or tail during
    every parsing procedure.  If input has valid ranges, there is no reason to
    reject the user.
    
    For example, bitmap_parselist(" 1-3, 5, ", &mask, nmaskbits).  After
    separating the string, we get " 1-3", " 5", and " ".  It's possible and
    reasonable to accept such string as long as the parsing result is correct.
    
    Signed-off-by: Pan Xinhui <xinhuix.pan@intel.com>
    Cc: Yury Norov <yury.norov@gmail.com>
    Cc: Chris Metcalf <cmetcalf@ezchip.com>
    Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>
    Cc: Sudeep Holla <sudeep.holla@arm.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Pan Xinhui authored and torvalds committed Sep 10, 2015
    Configuration menu
    Copy the full SHA
    9bf98f1 View commit details
    Browse the repository at this point in the history
  47. hexdump: do not print debug dumps for !CONFIG_DEBUG

    print_hex_dump_debug() is likely supposed to be analogous to pr_debug() or
    dev_dbg() & friends.  Currently it will adhere to dynamic debug, but will
    not stub out prints if CONFIG_DEBUG is not set.  Let's make it do the
    right thing, because I am tired of having my dmesg buffer full of hex
    dumps on production systems.
    
    Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    linusw authored and torvalds committed Sep 10, 2015
    Configuration menu
    Copy the full SHA
    cdf1744 View commit details
    Browse the repository at this point in the history
  48. lib/string_helpers: clarify esc arg in string_escape_mem

    The esc argument is used to reduce which characters will be escaped.  For
    example, using " " with ESCAPE_SPACE will not produce any escaped spaces.
    
    Signed-off-by: Kees Cook <keescook@chromium.org>
    Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
    Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>
    Cc: Mathias Krause <minipli@googlemail.com>
    Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    kees authored and torvalds committed Sep 10, 2015
    Configuration menu
    Copy the full SHA
    d89a3f7 View commit details
    Browse the repository at this point in the history
  49. lib/string_helpers: rename "esc" arg to "only"

    To further clarify the purpose of the "esc" argument, rename it to "only"
    to reflect that it is a limit, not a list of additional characters to
    escape.
    
    Signed-off-by: Kees Cook <keescook@chromium.org>
    Suggested-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    kees authored and torvalds committed Sep 10, 2015
    Configuration menu
    Copy the full SHA
    b40bdb7 View commit details
    Browse the repository at this point in the history
  50. lib/test_kasan.c: fix a typo

    Signed-off-by: Wang Long <long.wanglong@huawei.com>
    Cc: Andrey Ryabinin <ryabinin.a.a@gmail.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    datawolf authored and torvalds committed Sep 10, 2015
    Configuration menu
    Copy the full SHA
    9789d8e View commit details
    Browse the repository at this point in the history
  51. lib/test_kasan.c: make kmalloc_oob_krealloc_less more correctly

    In kmalloc_oob_krealloc_less, I think it is better to test
    the size2 boundary.
    
    If we do not call krealloc, the access of position size1 will still cause
    out-of-bounds and access of position size2 does not.  After call krealloc,
    the access of position size2 cause out-of-bounds.  So using size2 is more
    correct.
    
    Signed-off-by: Wang Long <long.wanglong@huawei.com>
    Cc: Andrey Ryabinin <ryabinin.a.a@gmail.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    datawolf authored and torvalds committed Sep 10, 2015
    Configuration menu
    Copy the full SHA
    6b4a35f View commit details
    Browse the repository at this point in the history
  52. checkpatch: warn on bare SHA-1 commit IDs in commit logs

    Commit IDs should have commit descriptions too.  Warn when a 12 to 40 byte
    SHA-1 is used in commit logs.
    
    Signed-off-by: Joe Perches <joe@perches.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    JoePerches authored and torvalds committed Sep 10, 2015
    Configuration menu
    Copy the full SHA
    fe043ea View commit details
    Browse the repository at this point in the history
  53. checkpatch: add warning on BUG/BUG_ON use

    Using BUG/BUG_ON crashes the kernel and is just unfriendly.
    
    Enable code that emits a warning on BUG/BUG_ON use.
    
    Make the code emit the message at WARNING level when scanning a patch and
    at CHECK level when scanning files so that script users don't feel an
    obligation to fix code that might be above their pay grade.
    
    Signed-off-by: Joe Perches <joe@perches.com>
    Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
    Tested-by: Geert Uytterhoeven <geert@linux-m68k.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    JoePerches authored and torvalds committed Sep 10, 2015
    Configuration menu
    Copy the full SHA
    9d3e3c7 View commit details
    Browse the repository at this point in the history
  54. checkpatch: improve SUSPECT_CODE_INDENT test

    Many lines exist like
    
    	if (foo)
    			bar;
    
    where the tabbed indentation of the branch is not one more than the "if"
    line above it.
    
    checkpatch should emit a warning on those lines.
    
    Miscellenea:
    
    o Remove comments from branch blocks
    o Skip blank lines in block
    
    Signed-off-by: Joe Perches <joe@perches.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    JoePerches authored and torvalds committed Sep 10, 2015
    Configuration menu
    Copy the full SHA
    9f5af48 View commit details
    Browse the repository at this point in the history
  55. checkpatch: Allow longer declaration macros

    Some really long declaration macros exist.
    
    For instance;
      	DEFINE_DMA_BUF_EXPORT_INFO(exp_info);
    and
    	DECLARE_DM_KCOPYD_THROTTLE_WITH_MODULE_PARM(name, description)
    
    Increase the limit from 2 words to 6 after DECLARE/DEFINE uses.
    
    Signed-off-by: Joe Perches <joe@perches.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    JoePerches authored and torvalds committed Sep 10, 2015
    Configuration menu
    Copy the full SHA
    3e838b6 View commit details
    Browse the repository at this point in the history
  56. checkpatch: add some <foo>_destroy functions to NEEDLESS_IF tests

    Sergey Senozhatsky has modified several destroy functions that can
    now be called with NULL values.
    
     - kmem_cache_destroy()
     - mempool_destroy()
     - dma_pool_destroy()
    
    Update checkpatch to warn when those functions are preceded by an if.
    
    Update checkpatch to --fix all the calls too only when the code style
    form is using leading tabs.
    
    from:
    	if (foo)
    		<func>(foo);
    to:
    	<func>(foo);
    
    Signed-off-by: Joe Perches <joe@perches.com>
    Tested-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
    Cc: David Rientjes <rientjes@google.com>
    Cc: Julia Lawall <julia.lawall@lip6.fr>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    JoePerches authored and torvalds committed Sep 10, 2015
    Configuration menu
    Copy the full SHA
    100425d View commit details
    Browse the repository at this point in the history
  57. checkpatch: report the right line # when using --emacs and --file

    commit 34d8815 ("checkpatch: add --showfile to allow input via pipe
    to show filenames") broke the --emacs with --file option.
    
    Fix it.
    
    Signed-off-by: Joe Perches <joe@perches.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    JoePerches authored and torvalds committed Sep 10, 2015
    Configuration menu
    Copy the full SHA
    7d3a9f6 View commit details
    Browse the repository at this point in the history
  58. checkpatch: always check block comment styles

    Some of the block comment tests that are used only for networking are
    appropriate for all patches.
    
    For example, these styles are not encouraged:
    
    	/*
    	 block comment without introductory *
    	*/
    and
    	/*
    	 * block comment with line terminating */
    
    Remove the networking specific test and add comments.
    
    There are some infrequent false positives where code is lazily
    commented out using /* and */ rather than using #if 0/#endif blocks
    like:
    	/* case foo:
    	case bar: */
    	case baz:
    
    Signed-off-by: Joe Perches <joe@perches.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    JoePerches authored and torvalds committed Sep 10, 2015
    Configuration menu
    Copy the full SHA
    86406b1 View commit details
    Browse the repository at this point in the history
  59. checkpatch: make --strict the default for drivers/staging files and p…

    …atches
    
    Making --strict the default for staging may help some people submit
    patches without obvious defects.
    
    Signed-off-by: Joe Perches <joe@perches.com>
    Cc: Dan Carpenter <dan.carpenter@oracle.com>
    Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    JoePerches authored and torvalds committed Sep 10, 2015
    Configuration menu
    Copy the full SHA
    7bd7e48 View commit details
    Browse the repository at this point in the history
  60. checkpatch: emit an error on formats with 0x%<decimal>

    Using 0x%d is wrong.  Emit a message when it happens.
    
    Miscellanea:
    
    Improve the %Lu warning to match formats like %16Lu.
    
    Signed-off-by: Joe Perches <joe@perches.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    JoePerches authored and torvalds committed Sep 10, 2015
    Configuration menu
    Copy the full SHA
    6e30075 View commit details
    Browse the repository at this point in the history
  61. checkpatch: avoid some commit message long line warnings

    Fixes: and Link: lines may exceed 75 chars in the commit log.
    
    So too can stack dump and dmesg lines and lines that seem
    like filenames.
    
    And Fixes: lines don't need to have a "commit" prefix before the
    commit id.
    
    Add exceptions for these types of lines.
    
    Signed-off-by: Joe Perches <joe@perches.com>
    Reported-by: Paul Bolle <pebolle@tiscali.nl>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    JoePerches authored and torvalds committed Sep 10, 2015
    Configuration menu
    Copy the full SHA
    bf4daf1 View commit details
    Browse the repository at this point in the history
  62. checkpatch: fix left brace warning

    Using checkpatch.pl with Perl 5.22.0 generates the following warning:
    
        Unescaped left brace in regex is deprecated, passed through in regex;
    
    This patch fixes the warnings by escaping occurrences of the left brace
    inside the regular expression.
    
    Signed-off-by: Eddie Kovsky <ewk@edkovsky.org>
    Cc: Joe Perches <joe@perches.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    ewk authored and torvalds committed Sep 10, 2015
    Configuration menu
    Copy the full SHA
    4e5d56b View commit details
    Browse the repository at this point in the history
  63. checkpatch: add __pmem to $Sparse annotations

    commit 6103195 ("arch, x86: pmem api for ensuring durability of
    persistent memory updates") added a new __pmem annotation for sparse
    verification.  Add __pmem to the $Sparse variable so checkpatch can
    appropriately ignore uses of this attribute too.
    
    Signed-off-by: Joe Perches <joe@perches.com>
    Reviewed-by: Ross Zwisler <ross.zwisler@linux.intel.com>
    Acked-by: Andy Whitcroft <apw@canonical.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    JoePerches authored and torvalds committed Sep 10, 2015
    Configuration menu
    Copy the full SHA
    54507b5 View commit details
    Browse the repository at this point in the history
  64. checkpatch: add constant comparison on left side test

    "CONST <comparison> variable" checks like:
    
            if (NULL != foo)
    and
            while (0 < bar(...))
    
    where a constant (or what appears to be a constant like an upper case
    identifier) is on the left of a comparison are generally preferred to be
    written using the constant on the right side like:
    
            if (foo != NULL)
    and
            while (bar(...) > 0)
    
    Add a test for this.
    
    Add a --fix option too, but only do it when the code is immediately
    surrounded by parentheses to avoid misfixing things like "(0 < bar() +
    constant)"
    
    Signed-off-by: Joe Perches <joe@perches.com>
    Cc: Nicolas Morey Chaisemartin <nmorey@kalray.eu>
    Cc: Viresh Kumar <viresh.kumar@linaro.org>
    Cc: Dan Carpenter <dan.carpenter@oracle.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    JoePerches authored and torvalds committed Sep 10, 2015
    Configuration menu
    Copy the full SHA
    c5595fa View commit details
    Browse the repository at this point in the history
  65. fs/coda: fix readlink buffer overflow

    Dan Carpenter discovered a buffer overflow in the Coda file system
    readlink code.  A userspace file system daemon can return a 4096 byte
    result which then triggers a one byte write past the allocated readlink
    result buffer.
    
    This does not trigger with an unmodified Coda implementation because Coda
    has a 1024 byte limit for symbolic links, however other userspace file
    systems using the Coda kernel module could be affected.
    
    Although this is an obvious overflow, I don't think this has to be handled
    as too sensitive from a security perspective because the overflow is on
    the Coda userspace daemon side which already needs root to open Coda's
    kernel device and to mount the file system before we get to the point that
    links can be read.
    
    [akpm@linux-foundation.org: coding-style fixes]
    Signed-off-by: Jan Harkes <jaharkes@cs.cmu.edu>
    Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    jaharkes authored and torvalds committed Sep 10, 2015
    Configuration menu
    Copy the full SHA
    3725e9d View commit details
    Browse the repository at this point in the history
  66. hfs,hfsplus: cache pages correctly between bnode_create and bnode_free

    Pages looked up by __hfs_bnode_create() (called by hfs_bnode_create() and
    hfs_bnode_find() for finding or creating pages corresponding to an inode)
    are immediately kmap()'ed and used (both read and write) and kunmap()'ed,
    and should not be page_cache_release()'ed until hfs_bnode_free().
    
    This patch fixes a problem I first saw in July 2012: merely running "du"
    on a large hfsplus-mounted directory a few times on a reasonably loaded
    system would get the hfsplus driver all confused and complaining about
    B-tree inconsistencies, and generates a "BUG: Bad page state".  Most
    recently, I can generate this problem on up-to-date Fedora 22 with shipped
    kernel 4.0.5, by running "du /" (="/" + "/home" + "/mnt" + other smaller
    mounts) and "du /mnt" simultaneously on two windows, where /mnt is a
    lightly-used QEMU VM image of the full Mac OS X 10.9:
    
    $ df -i / /home /mnt
    Filesystem                  Inodes   IUsed      IFree IUse% Mounted on
    /dev/mapper/fedora-root    3276800  551665    2725135   17% /
    /dev/mapper/fedora-home   52879360  716221   52163139    2% /home
    /dev/nbd0p2             4294967295 1387818 4293579477    1% /mnt
    
    After applying the patch, I was able to run "du /" (60+ times) and "du
    /mnt" (150+ times) continuously and simultaneously for 6+ hours.
    
    There are many reports of the hfsplus driver getting confused under load
    and generating "BUG: Bad page state" or other similar issues over the
    years.  [1]
    
    The unpatched code [2] has always been wrong since it entered the kernel
    tree.  The only reason why it gets away with it is that the
    kmap/memcpy/kunmap follow very quickly after the page_cache_release() so
    the kernel has not had a chance to reuse the memory for something else,
    most of the time.
    
    The current RW driver appears to have followed the design and development
    of the earlier read-only hfsplus driver [3], where-by version 0.1 (Dec
    2001) had a B-tree node-centric approach to
    read_cache_page()/page_cache_release() per bnode_get()/bnode_put(),
    migrating towards version 0.2 (June 2002) of caching and releasing pages
    per inode extents.  When the current RW code first entered the kernel [2]
    in 2005, there was an REF_PAGES conditional (and "//" commented out code)
    to switch between B-node centric paging to inode-centric paging.  There
    was a mistake with the direction of one of the REF_PAGES conditionals in
    __hfs_bnode_create().  In a subsequent "remove debug code" commit [4], the
    read_cache_page()/page_cache_release() per bnode_get()/bnode_put() were
    removed, but a page_cache_release() was mistakenly left in (propagating
    the "REF_PAGES <-> !REF_PAGE" mistake), and the commented-out
    page_cache_release() in bnode_release() (which should be spanned by
    !REF_PAGES) was never enabled.
    
    References:
    [1]:
    Michael Fox, Apr 2013
    http://www.spinics.net/lists/linux-fsdevel/msg63807.html
    ("hfsplus volume suddenly inaccessable after 'hfs: recoff %d too large'")
    
    Sasha Levin, Feb 2015
    http://lkml.org/lkml/2015/2/20/85 ("use after free")
    
    https://bugs.launchpad.net/ubuntu/+source/linux/+bug/740814
    https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1027887
    https://bugzilla.kernel.org/show_bug.cgi?id=42342
    https://bugzilla.kernel.org/show_bug.cgi?id=63841
    https://bugzilla.kernel.org/show_bug.cgi?id=78761
    
    [2]:
    http://git.kernel.org/cgit/linux/kernel/git/tglx/history.git/commit/\
    fs/hfs/bnode.c?id=d1081202f1d0ee35ab0beb490da4b65d4bc763db
    commit d108120
    Author: Andrew Morton <akpm@osdl.org>
    Date:   Wed Feb 25 16:17:36 2004 -0800
    
        [PATCH] HFS rewrite
    
    http://git.kernel.org/cgit/linux/kernel/git/tglx/history.git/commit/\
    fs/hfsplus/bnode.c?id=91556682e0bf004d98a529bf829d339abb98bbbd
    
    commit 9155668
    Author: Andrew Morton <akpm@osdl.org>
    Date:   Wed Feb 25 16:17:48 2004 -0800
    
        [PATCH] HFS+ support
    
    [3]:
    http://sourceforge.net/projects/linux-hfsplus/
    
    http://sourceforge.net/projects/linux-hfsplus/files/Linux%202.4.x%20patch/hfsplus%200.1/
    http://sourceforge.net/projects/linux-hfsplus/files/Linux%202.4.x%20patch/hfsplus%200.2/
    
    http://linux-hfsplus.cvs.sourceforge.net/viewvc/linux-hfsplus/linux/\
    fs/hfsplus/bnode.c?r1=1.4&r2=1.5
    
    Date:   Thu Jun 6 09:45:14 2002 +0000
    Use buffer cache instead of page cache in bnode.c. Cache inode extents.
    
    [4]:
    http://git.kernel.org/cgit/linux/kernel/git/\
    stable/linux-stable.git/commit/?id=a5e3985fa014029eb6795664c704953720cc7f7d
    
    commit a5e3985
    Author: Roman Zippel <zippel@linux-m68k.org>
    Date:   Tue Sep 6 15:18:47 2005 -0700
    
    [PATCH] hfs: remove debug code
    
    Signed-off-by: Hin-Tak Leung <htl10@users.sourceforge.net>
    Signed-off-by: Sergei Antonov <saproj@gmail.com>
    Reviewed-by: Anton Altaparmakov <anton@tuxera.com>
    Reported-by: Sasha Levin <sasha.levin@oracle.com>
    Cc: Al Viro <viro@zeniv.linux.org.uk>
    Cc: Christoph Hellwig <hch@infradead.org>
    Cc: Vyacheslav Dubeyko <slava@dubeyko.com>
    Cc: Sougata Santra <sougata@tuxera.com>
    Cc: <stable@vger.kernel.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    HinTak authored and torvalds committed Sep 10, 2015
    Configuration menu
    Copy the full SHA
    7cb74be View commit details
    Browse the repository at this point in the history
  67. hfs: fix B-tree corruption after insertion at position 0

    Fix B-tree corruption when a new record is inserted at position 0 in the
    node in hfs_brec_insert().
    
    This is an identical change to the corresponding hfs b-tree code to Sergei
    Antonov's "hfsplus: fix B-tree corruption after insertion at position 0",
    to keep similar code paths in the hfs and hfsplus drivers in sync, where
    appropriate.
    
    Signed-off-by: Hin-Tak Leung <htl10@users.sourceforge.net>
    Cc: Sergei Antonov <saproj@gmail.com>
    Cc: Joe Perches <joe@perches.com>
    Reviewed-by: Vyacheslav Dubeyko <slava@dubeyko.com>
    Cc: Anton Altaparmakov <anton@tuxera.com>
    Cc: Al Viro <viro@zeniv.linux.org.uk>
    Cc: Christoph Hellwig <hch@infradead.org>
    Cc: <stable@vger.kernel.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    HinTak authored and torvalds committed Sep 10, 2015
    Configuration menu
    Copy the full SHA
    b4cc0ef View commit details
    Browse the repository at this point in the history
  68. kmod: correct documentation of return status of request_module

    If request_module() successfully runs modprobe, but modprobe exits with a
    non-zero status, then the return value from request_module() will be that
    (positive) error status.  So the return from request_module can be:
    
     negative errno
     zero for success
     positive exit code.
    
    Signed-off-by: NeilBrown <neilb@suse.com>
    Cc: Goldwyn Rodrigues <rgoldwyn@suse.de>
    Cc: Oleg Nesterov <oleg@redhat.com>
    Cc: Tejun Heo <tj@kernel.org>
    Cc: Rusty Russell <rusty@rustcorp.com.au>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    NeilBrown authored and torvalds committed Sep 10, 2015
    Configuration menu
    Copy the full SHA
    60b61a6 View commit details
    Browse the repository at this point in the history
  69. kmod: bunch of internal functions renames

    This patchset does a bunch of cleanups and converts khelper to use system
    unbound workqueues.  The 3 first patches should be uncontroversial.  The
    last 2 patches are debatable.
    
    Kmod creates kernel threads that perform userspace jobs and we want those
    to have a large affinity in order not to contend busy CPUs.  This is
    (partly) why we use khelper which has a wide affinity that the kernel
    threads it create can inherit from.  Now khelper is a dedicated workqueue
    that has singlethread properties which we aren't interested in.
    
    Hence those two debatable changes:
    
    _ We would like to use generic workqueues. System unbound workqueues are
      a very good candidate but they are not wide affine, only node affine.
      Now probably a node is enough to perform many parallel kmod jobs.
    
    _ We would like to remove the wait_for_helper kernel thread (UMH_WAIT_PROC
      handler) to use the workqueue. It means that if the workqueue blocks,
      and no other worker can take pending kmod request, we can be screwed.
      Now if we have 512 threads, this should be enough.
    
    This patch (of 5):
    
    Underscores on function names aren't much verbose to explain the purpose
    of a function.  And kmod has interesting such flavours.
    
    Lets rename the following functions:
    
    * __call_usermodehelper -> call_usermodehelper_exec_work
    * ____call_usermodehelper -> call_usermodehelper_exec_async
    * wait_for_helper -> call_usermodehelper_exec_sync
    
    Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
    Cc: Rik van Riel <riel@redhat.com>
    Reviewed-by: Oleg Nesterov <oleg@redhat.com>
    Cc: Christoph Lameter <cl@linux.com>
    Cc: Tejun Heo <tj@kernel.org>
    Cc: Rusty Russell <rusty@rustcorp.com.au>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    fweisbec authored and torvalds committed Sep 10, 2015
    Configuration menu
    Copy the full SHA
    b6b50a8 View commit details
    Browse the repository at this point in the history
  70. kmod: remove unecessary explicit wide CPU affinity setting

    Khelper is affine to all CPUs.  Now since it creates the
    call_usermodehelper_exec_[a]sync() kernel threads, those inherit the wide
    affinity.
    
    As such explicitly forcing a wide affinity from those kernel threads
    is like a no-op.
    
    Just remove it. It's needless and it breaks CPU isolation users who
    rely on workqueue affinity tuning.
    
    Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
    Cc: Rik van Riel <riel@redhat.com>
    Reviewed-by: Oleg Nesterov <oleg@redhat.com>
    Cc: Christoph Lameter <cl@linux.com>
    Cc: Tejun Heo <tj@kernel.org>
    Cc: Rusty Russell <rusty@rustcorp.com.au>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    fweisbec authored and torvalds committed Sep 10, 2015
    Configuration menu
    Copy the full SHA
    d097c02 View commit details
    Browse the repository at this point in the history
  71. kmod: add up-to-date explanations on the purpose of each asynchronous…

    … levels
    
    There seem to be quite some confusions on the comments, likely due to
    changes that came after them.
    
    Now since it's very non obvious why we have 3 levels of asynchronous code
    to implement usermodehelpers, it's important to comment in detail the
    reason of this layout.
    
    Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
    Cc: Rik van Riel <riel@redhat.com>
    Reviewed-by: Oleg Nesterov <oleg@redhat.com>
    Cc: Christoph Lameter <cl@linux.com>
    Cc: Tejun Heo <tj@kernel.org>
    Cc: Rusty Russell <rusty@rustcorp.com.au>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    fweisbec authored and torvalds committed Sep 10, 2015
    Configuration menu
    Copy the full SHA
    b639e86 View commit details
    Browse the repository at this point in the history
  72. kmod: use system_unbound_wq instead of khelper

    We need to launch the usermodehelper kernel threads with the widest
    affinity and this is partly why we use khelper.  This workqueue has
    unbound properties and thus a wide affinity inherited by all its children.
    
    Now khelper also has special properties that we aren't much interested in:
    ordered and singlethread.  There is really no need about ordering as all
    we do is creating kernel threads.  This can be done concurrently.  And
    singlethread is a useless limitation as well.
    
    The workqueue engine already proposes generic unbound workqueues that
    don't share these useless properties and handle well parallel jobs.
    
    The only worrysome specific is their affinity to the node of the current
    CPU.  It's fine for creating the usermodehelper kernel threads but those
    inherit this affinity for longer jobs such as requesting modules.
    
    This patch proposes to use these node affine unbound workqueues assuming
    that a node is sufficient to handle several parallel usermodehelper
    requests.
    
    Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
    Cc: Rik van Riel <riel@redhat.com>
    Reviewed-by: Oleg Nesterov <oleg@redhat.com>
    Cc: Christoph Lameter <cl@linux.com>
    Cc: Tejun Heo <tj@kernel.org>
    Cc: Rusty Russell <rusty@rustcorp.com.au>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    fweisbec authored and torvalds committed Sep 10, 2015
    Configuration menu
    Copy the full SHA
    90f0230 View commit details
    Browse the repository at this point in the history
  73. kmod: handle UMH_WAIT_PROC from system unbound workqueue

    The UMH_WAIT_PROC handler runs in its own thread in order to make sure
    that waiting for the exec kernel thread completion won't block other
    usermodehelper queued jobs.
    
    On older workqueue implementations, worklets couldn't sleep without
    blocking the rest of the queue.  But now the workqueue subsystem handles
    that.  Khelper still had the older limitation due to its singlethread
    properties but we replaced it to system unbound workqueues.
    
    Those are affine to the current node and can block up to some number of
    instances.
    
    They are a good candidate to handle UMH_WAIT_PROC assuming that we have
    enough system unbound workers to handle lots of parallel usermodehelper
    jobs.
    
    Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
    Cc: Rik van Riel <riel@redhat.com>
    Reviewed-by: Oleg Nesterov <oleg@redhat.com>
    Cc: Christoph Lameter <cl@linux.com>
    Cc: Tejun Heo <tj@kernel.org>
    Cc: Rusty Russell <rusty@rustcorp.com.au>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    fweisbec authored and torvalds committed Sep 10, 2015
    Configuration menu
    Copy the full SHA
    bb304a5 View commit details
    Browse the repository at this point in the history
  74. fs: if a coredump already exists, unlink and recreate with O_EXCL

    It was possible for an attacking user to trick root (or another user) into
    writing his coredumps into an attacker-readable, pre-existing file using
    rename() or link(), causing the disclosure of secret data from the victim
    process' virtual memory.  Depending on the configuration, it was also
    possible to trick root into overwriting system files with coredumps.  Fix
    that issue by never writing coredumps into existing files.
    
    Requirements for the attack:
     - The attack only applies if the victim's process has a nonzero
       RLIMIT_CORE and is dumpable.
     - The attacker can trick the victim into coredumping into an
       attacker-writable directory D, either because the core_pattern is
       relative and the victim's cwd is attacker-writable or because an
       absolute core_pattern pointing to a world-writable directory is used.
     - The attacker has one of these:
      A: on a system with protected_hardlinks=0:
         execute access to a folder containing a victim-owned,
         attacker-readable file on the same partition as D, and the
         victim-owned file will be deleted before the main part of the attack
         takes place. (In practice, there are lots of files that fulfill
         this condition, e.g. entries in Debian's /var/lib/dpkg/info/.)
         This does not apply to most Linux systems because most distros set
         protected_hardlinks=1.
      B: on a system with protected_hardlinks=1:
         execute access to a folder containing a victim-owned,
         attacker-readable and attacker-writable file on the same partition
         as D, and the victim-owned file will be deleted before the main part
         of the attack takes place.
         (This seems to be uncommon.)
      C: on any system, independent of protected_hardlinks:
         write access to a non-sticky folder containing a victim-owned,
         attacker-readable file on the same partition as D
         (This seems to be uncommon.)
    
    The basic idea is that the attacker moves the victim-owned file to where
    he expects the victim process to dump its core.  The victim process dumps
    its core into the existing file, and the attacker reads the coredump from
    it.
    
    If the attacker can't move the file because he does not have write access
    to the containing directory, he can instead link the file to a directory
    he controls, then wait for the original link to the file to be deleted
    (because the kernel checks that the link count of the corefile is 1).
    
    A less reliable variant that requires D to be non-sticky works with link()
    and does not require deletion of the original link: link() the file into
    D, but then unlink() it directly before the kernel performs the link count
    check.
    
    On systems with protected_hardlinks=0, this variant allows an attacker to
    not only gain information from coredumps, but also clobber existing,
    victim-writable files with coredumps.  (This could theoretically lead to a
    privilege escalation.)
    
    Signed-off-by: Jann Horn <jann@thejh.net>
    Cc: Kees Cook <keescook@chromium.org>
    Cc: Al Viro <viro@zeniv.linux.org.uk>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    thejh authored and torvalds committed Sep 10, 2015
    Configuration menu
    Copy the full SHA
    fbb1816 View commit details
    Browse the repository at this point in the history
  75. fs: Don't dump core if the corefile would become world-readable.

    On a filesystem like vfat, all files are created with the same owner
    and mode independent of who created the file. When a vfat filesystem
    is mounted with root as owner of all files and read access for everyone,
    root's processes left world-readable coredumps on it (but other
    users' processes only left empty corefiles when given write access
    because of the uid mismatch).
    
    Given that the old behavior was inconsistent and insecure, I don't see
    a problem with changing it. Now, all processes refuse to dump core unless
    the resulting corefile will only be readable by their owner.
    
    Signed-off-by: Jann Horn <jann@thejh.net>
    Acked-by: Kees Cook <keescook@chromium.org>
    Cc: Al Viro <viro@zeniv.linux.org.uk>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    thejh authored and torvalds committed Sep 10, 2015
    Configuration menu
    Copy the full SHA
    40f705a View commit details
    Browse the repository at this point in the history
  76. seq_file: provide an analogue of print_hex_dump()

    This introduces a new helper and switches current users to use it.  All
    patches are compiled tested. kmemleak is tested via its own test suite.
    
    This patch (of 6):
    
    The new seq_hex_dump() is a complete analogue of print_hex_dump().
    
    We have few users of this functionality already. It allows to reduce their
    codebase.
    
    Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
    Cc: Alexander Viro <viro@zeniv.linux.org.uk>
    Cc: Joe Perches <joe@perches.com>
    Cc: Tadeusz Struk <tadeusz.struk@intel.com>
    Cc: Helge Deller <deller@gmx.de>
    Cc: Ingo Tuchscherer <ingo.tuchscherer@de.ibm.com>
    Cc: Catalin Marinas <catalin.marinas@arm.com>
    Cc: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    andy-shev authored and torvalds committed Sep 10, 2015
    Configuration menu
    Copy the full SHA
    3760710 View commit details
    Browse the repository at this point in the history
  77. drivers/crypto/qat: use seq_hex_dump() to dump buffers

    Instead of custom approach let's use recently introduced seq_hex_dump()
    helper.
    
    Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
    Acked-by: Tadeusz Struk <tadeusz.struk@intel.com>
    Cc: Alexander Viro <viro@zeniv.linux.org.uk>
    Cc: Joe Perches <joe@perches.com>
    Cc: Helge Deller <deller@gmx.de>
    Cc: Ingo Tuchscherer <ingo.tuchscherer@de.ibm.com>
    Cc: Catalin Marinas <catalin.marinas@arm.com>
    Cc: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    andy-shev authored and torvalds committed Sep 10, 2015
    Configuration menu
    Copy the full SHA
    d0cce06 View commit details
    Browse the repository at this point in the history
  78. parisc: use seq_hex_dump() to dump buffers

    Instead of custom approach let's use recently introduced seq_hex_dump()
    helper.
    
    In one case it changes the output from
    	1111111122222222333333334444444455555555666666667777777788888888
    to
    	11111111 22222222 33333333 44444444 55555555 66666666 77777777 88888888
    
    though it seems it prints same data (by meaning) in both cases.  I decide
    to choose to use the space divided one.
    
    Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
    Acked-by: Helge Deller <deller@gmx.de>
    Cc: Alexander Viro <viro@zeniv.linux.org.uk>
    Cc: Joe Perches <joe@perches.com>
    Cc: Tadeusz Struk <tadeusz.struk@intel.com>
    Cc: Ingo Tuchscherer <ingo.tuchscherer@de.ibm.com>
    Cc: Catalin Marinas <catalin.marinas@arm.com>
    Cc: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    andy-shev authored and torvalds committed Sep 10, 2015
    Configuration menu
    Copy the full SHA
    b342a65 View commit details
    Browse the repository at this point in the history
  79. drivers/s390/crypto/zcrypt_api.c: use seq_hex_dump() to dump buffers

    Instead of custom approach let's use recently introduced seq_hex_dump()
    helper.
    
    Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
    Acked-by: Ingo Tuchscherer <ingo.tuchscherer@de.ibm.com>
    Cc: Alexander Viro <viro@zeniv.linux.org.uk>
    Cc: Joe Perches <joe@perches.com>
    Cc: Tadeusz Struk <tadeusz.struk@intel.com>
    Cc: Helge Deller <deller@gmx.de>
    Cc: Catalin Marinas <catalin.marinas@arm.com>
    Cc: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    andy-shev authored and torvalds committed Sep 10, 2015
    Configuration menu
    Copy the full SHA
    5d2fe87 View commit details
    Browse the repository at this point in the history
  80. kmemleak: use seq_hex_dump() to dump buffers

    Instead of custom approach let's use recently introduced seq_hex_dump()
    helper.
    
    Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
    Cc: Alexander Viro <viro@zeniv.linux.org.uk>
    Cc: Joe Perches <joe@perches.com>
    Cc: Tadeusz Struk <tadeusz.struk@intel.com>
    Cc: Helge Deller <deller@gmx.de>
    Cc: Ingo Tuchscherer <ingo.tuchscherer@de.ibm.com>
    Acked-by: Catalin Marinas <catalin.marinas@arm.com>
    Cc: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    andy-shev authored and torvalds committed Sep 10, 2015
    Configuration menu
    Copy the full SHA
    6fc37c4 View commit details
    Browse the repository at this point in the history
  81. drivers/net/wireless/ath/wil6210: use seq_hex_dump() to dump buffers

    Instead of custom approach let's use recently introduced seq_hex_dump()
    helper.
    
    Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
    Cc: Alexander Viro <viro@zeniv.linux.org.uk>
    Cc: Joe Perches <joe@perches.com>
    Cc: Tadeusz Struk <tadeusz.struk@intel.com>
    Cc: Helge Deller <deller@gmx.de>
    Cc: Ingo Tuchscherer <ingo.tuchscherer@de.ibm.com>
    Cc: Catalin Marinas <catalin.marinas@arm.com>
    Cc: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    andy-shev authored and torvalds committed Sep 10, 2015
    Configuration menu
    Copy the full SHA
    a202fbb View commit details
    Browse the repository at this point in the history
  82. kexec: split kexec_file syscall code to kexec_file.c

    Split kexec_file syscall related code to another file kernel/kexec_file.c
    so that the #ifdef CONFIG_KEXEC_FILE in kexec.c can be dropped.
    
    Sharing variables and functions are moved to kernel/kexec_internal.h per
    suggestion from Vivek and Petr.
    
    [akpm@linux-foundation.org: fix bisectability]
    [akpm@linux-foundation.org: declare the various arch_kexec functions]
    [akpm@linux-foundation.org: fix build]
    Signed-off-by: Dave Young <dyoung@redhat.com>
    Cc: Eric W. Biederman <ebiederm@xmission.com>
    Cc: Vivek Goyal <vgoyal@redhat.com>
    Cc: Petr Tesarik <ptesarik@suse.cz>
    Cc: Theodore Ts'o <tytso@mit.edu>
    Cc: Josh Boyer <jwboyer@fedoraproject.org>
    Cc: David Howells <dhowells@redhat.com>
    Cc: Geert Uytterhoeven <geert@linux-m68k.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    daveyoung authored and torvalds committed Sep 10, 2015
    Configuration menu
    Copy the full SHA
    a43cac0 View commit details
    Browse the repository at this point in the history
  83. kexec: split kexec_load syscall from kexec core code

    There are two kexec load syscalls, kexec_load another and kexec_file_load.
     kexec_file_load has been splited as kernel/kexec_file.c.  In this patch I
    split kexec_load syscall code to kernel/kexec.c.
    
    And add a new kconfig option KEXEC_CORE, so we can disable kexec_load and
    use kexec_file_load only, or vice verse.
    
    The original requirement is from Ted Ts'o, he want kexec kernel signature
    being checked with CONFIG_KEXEC_VERIFY_SIG enabled.  But kexec-tools use
    kexec_load syscall can bypass the checking.
    
    Vivek Goyal proposed to create a common kconfig option so user can compile
    in only one syscall for loading kexec kernel.  KEXEC/KEXEC_FILE selects
    KEXEC_CORE so that old config files still work.
    
    Because there's general code need CONFIG_KEXEC_CORE, so I updated all the
    architecture Kconfig with a new option KEXEC_CORE, and let KEXEC selects
    KEXEC_CORE in arch Kconfig.  Also updated general kernel code with to
    kexec_load syscall.
    
    [akpm@linux-foundation.org: coding-style fixes]
    Signed-off-by: Dave Young <dyoung@redhat.com>
    Cc: Eric W. Biederman <ebiederm@xmission.com>
    Cc: Vivek Goyal <vgoyal@redhat.com>
    Cc: Petr Tesarik <ptesarik@suse.cz>
    Cc: Theodore Ts'o <tytso@mit.edu>
    Cc: Josh Boyer <jwboyer@fedoraproject.org>
    Cc: David Howells <dhowells@redhat.com>
    Cc: Geert Uytterhoeven <geert@linux-m68k.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    daveyoung authored and torvalds committed Sep 10, 2015
    Configuration menu
    Copy the full SHA
    2965faa View commit details
    Browse the repository at this point in the history
  84. kexec: remove unnecessary test in kimage_alloc_crash_control_pages()

    Transforming PFN(Page Frame Number) to struct page is never failure, so we
    can simplify the code logic to do the image->control_page assignment
    directly in the loop, and remove the unnecessary conditional judgement.
    
    Signed-off-by: Minfei Huang <mnfhuang@gmail.com>
    Acked-by: Dave Young <dyoung@redhat.com>
    Acked-by: Vivek Goyal <vgoyal@redhat.com>
    Cc: Simon Horman <horms@verge.net.au>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Minfei Huang authored and torvalds committed Sep 10, 2015
    Configuration menu
    Copy the full SHA
    04e9949 View commit details
    Browse the repository at this point in the history
  85. kexec: align crash_notes allocation to make it be inside one physical…

    … page
    
    People reported that crash_notes in /proc/vmcore were corrupted and this
    cause crash kdump failure.  With code debugging and log we got the root
    cause.  This is because percpu variable crash_notes are allocated in 2
    vmalloc pages.  Currently percpu is based on vmalloc by default.  Vmalloc
    can't guarantee 2 continuous vmalloc pages are also on 2 continuous
    physical pages.  So when 1st kernel exports the starting address and size
    of crash_notes through sysfs like below:
    
    /sys/devices/system/cpu/cpux/crash_notes
    /sys/devices/system/cpu/cpux/crash_notes_size
    
    kdump kernel use them to get the content of crash_notes.  However the 2nd
    part may not be in the next neighbouring physical page as we expected if
    crash_notes are allocated accross 2 vmalloc pages.  That's why
    nhdr_ptr->n_namesz or nhdr_ptr->n_descsz could be very huge in
    update_note_header_size_elf64() and cause note header merging failure or
    some warnings.
    
    In this patch change to call __alloc_percpu() to passed in the align value
    by rounding crash_notes_size up to the nearest power of two.  This makes
    sure the crash_notes is allocated inside one physical page since
    sizeof(note_buf_t) in all ARCHS is smaller than PAGE_SIZE.  Meanwhile add
    a BUILD_BUG_ON to break compile if size is bigger than PAGE_SIZE since
    crash_notes definitely will be in 2 pages.  That need be avoided, and need
    be reported if it's unavoidable.
    
    [akpm@linux-foundation.org: use correct comment layout]
    Signed-off-by: Baoquan He <bhe@redhat.com>
    Cc: Eric W. Biederman <ebiederm@xmission.com>
    Cc: Vivek Goyal <vgoyal@redhat.com>
    Cc: Dave Young <dyoung@redhat.com>
    Cc: Lisa Mitchell <lisa.mitchell@hp.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Baoquan He authored and torvalds committed Sep 10, 2015
    Configuration menu
    Copy the full SHA
    bbb78b8 View commit details
    Browse the repository at this point in the history
  86. kexec: export KERNEL_IMAGE_SIZE to vmcoreinfo

    In x86_64, since v2.6.26 the KERNEL_IMAGE_SIZE is changed to 512M, and
    accordingly the MODULES_VADDR is changed to 0xffffffffa0000000.  However,
    in v3.12 Kees Cook introduced kaslr to randomise the location of kernel.
    And the kernel text mapping addr space is enlarged from 512M to 1G.  That
    means now KERNEL_IMAGE_SIZE is variable, its value is 512M when kaslr
    support is not compiled in and 1G when kaslr support is compiled in.
    Accordingly the MODULES_VADDR is changed too to be:
    
        #define MODULES_VADDR    (__START_KERNEL_map + KERNEL_IMAGE_SIZE)
    
    So when kaslr is compiled in and enabled, the kernel text mapping addr
    space and modules vaddr space need be adjusted.  Otherwise makedumpfile
    will collapse since the addr for some symbols is not correct.
    
    Hence KERNEL_IMAGE_SIZE need be exported to vmcoreinfo and got in
    makedumpfile to help calculate MODULES_VADDR.
    
    Signed-off-by: Baoquan He <bhe@redhat.com>
    Acked-by: Kees Cook <keescook@chromium.org>
    Acked-by: Vivek Goyal <vgoyal@redhat.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Baoquan He authored and torvalds committed Sep 10, 2015
    Configuration menu
    Copy the full SHA
    1303a27 View commit details
    Browse the repository at this point in the history
  87. sysctl: fix int -> unsigned long assignments in INT_MIN case

    The following
    
        if (val < 0)
            *lvalp = (unsigned long)-val;
    
    is incorrect because the compiler is free to assume -val to be positive
    and use a sign-extend instruction for extending the bit pattern.  This is
    a problem if val == INT_MIN:
    
        # echo -2147483648 >/proc/sys/dev/scsi/logging_level
        # cat /proc/sys/dev/scsi/logging_level
        -18446744071562067968
    
    Cast to unsigned long before negation - that way we first sign-extend and
    then negate an unsigned, which is well defined.  With this:
    
        # cat /proc/sys/dev/scsi/logging_level
        -2147483648
    
    Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
    Cc: Mikulas Patocka <mikulas@twibright.com>
    Cc: Robert Xiao <nneonneo@gmail.com>
    Cc: "Eric W. Biederman" <ebiederm@xmission.com>
    Cc: Kees Cook <keescook@chromium.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    idryomov authored and torvalds committed Sep 10, 2015
    Configuration menu
    Copy the full SHA
    9a5bc72 View commit details
    Browse the repository at this point in the history
  88. fs/affs: make root lookup from blkdev logical size

    This patch resolves https://bugzilla.kernel.org/show_bug.cgi?id=16531.
    
    When logical blkdev size > 512 then sector numbers become larger than the
    device can support.
    
    Make affs start lookup based on the device's logical sector size instead
    of 512.
    
    Reported-by: Mark <markk@clara.co.uk>
    Suggested-by: Mark <markk@clara.co.uk>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    pranjas authored and torvalds committed Sep 10, 2015
    Configuration menu
    Copy the full SHA
    e852d82 View commit details
    Browse the repository at this point in the history
  89. lib/decompressors: use real out buf size for gunzip with kernel

    When loading x86 64bit kernel above 4GiB with patched grub2, got kernel
    gunzip error.
    
    | early console in decompress_kernel
    | decompress_kernel:
    |       input: [0x807f2143b4-0x807ff61aee]
    |      output: [0x807cc00000-0x807f3ea29b] 0x027ea29c: output_len
    | boot via startup_64
    | KASLR using RDTSC...
    |  new output: [0x46fe000000-0x470138cfff] 0x0338d000: output_run_size
    |  decompress: [0x46fe000000-0x47007ea29b] <=== [0x807f2143b4-0x807ff61aee]
    |
    | Decompressing Linux... gz...
    |
    | uncompression error
    |
    | -- System halted
    
    the new buffer is at 0x46fe000000ULL, decompressor_gzip is using
    0xffffffb901ffffff as out_len.  gunzip in lib/zlib_inflate/inflate.c cap
    that len to 0x01ffffff and decompress fails later.
    
    We could hit this problem with crashkernel booting that uses kexec loading
    kernel above 4GiB.
    
    We have decompress_* support:
        1. inbuf[]/outbuf[] for kernel preboot.
        2. inbuf[]/flush() for initramfs
        3. fill()/flush() for initrd.
    This bug only affect kernel preboot path that use outbuf[].
    
    Add __decompress and take real out_buf_len for gunzip instead of guessing
    wrong buf size.
    
    Fixes: 1431574 (lib/decompressors: fix "no limit" output buffer length)
    Signed-off-by: Yinghai Lu <yinghai@kernel.org>
    Cc: Alexandre Courbot <acourbot@nvidia.com>
    Cc: Jon Medhurst <tixy@linaro.org>
    Cc: Stephen Warren <swarren@wwwdotorg.org>
    Cc: "H. Peter Anvin" <hpa@zytor.com>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Cc: Ingo Molnar <mingo@redhat.com>
    Cc: <stable@vger.kernel.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Yinghai Lu authored and torvalds committed Sep 10, 2015
    Configuration menu
    Copy the full SHA
    2d3862d View commit details
    Browse the repository at this point in the history
  90. lib/decompress_unlzma: Do a NULL check for pointer

    Compare pointer-typed values to NULL rather than 0.
    
    The semantic patch that makes this change is available
    in scripts/coccinelle/null/badzero.cocci.
    
    Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Fabio Estevam authored and torvalds committed Sep 10, 2015
    Configuration menu
    Copy the full SHA
    e4e29dc View commit details
    Browse the repository at this point in the history
  91. zlib_deflate/deftree: remove bi_reverse()

    Remove bi_reverse() and use generic bitrev32() instead - it should have
    better performance on some platforms.
    
    Signed-off-by: yalin wang <yalin.wang2010@gmail.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    yalin wang authored and torvalds committed Sep 10, 2015
    Configuration menu
    Copy the full SHA
    8b235f2 View commit details
    Browse the repository at this point in the history
  92. ipc: convert invalid scenarios to use WARN_ON

    Considering Linus' past rants about the (ab)use of BUG in the kernel, I
    took a look at how we deal with such calls in ipc.  Given that any errors
    or corruption in ipc code are most likely contained within the set of
    processes participating in the broken mechanisms, there aren't really many
    strong fatal system failure scenarios that would require a BUG call.
    Also, if something is seriously wrong, ipc might not be the place for such
    a BUG either.
    
    1. For example, recently, a customer hit one of these BUG_ONs in shm
       after failing shm_lock().  A busted ID imho does not merit a BUG_ON,
       and WARN would have been better.
    
    2. MSG_COPY functionality of posix msgrcv(2) for checkpoint/restore.
       I don't see how we can hit this anyway -- at least it should be IS_ERR.
        The 'copy' arg from do_msgrcv is always set by calling prepare_copy()
       first and foremost.  We could also probably drop this check altogether.
        Either way, it does not merit a BUG_ON.
    
    3. No ->fault() callback for the fs getting the corresponding page --
       seems selfish to make the system unusable.
    
    Signed-off-by: Davidlohr Bueso <dbueso@suse.de>
    Cc: Manfred Spraul <manfred@colorfullife.com>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Davidlohr Bueso authored and torvalds committed Sep 10, 2015
    Configuration menu
    Copy the full SHA
    d0edd85 View commit details
    Browse the repository at this point in the history
  93. namei: fix warning while make xmldocs caused by namei.c

    Fix the following warnings:
    
    Warning(.//fs/namei.c:2422): No description found for parameter 'nd'
    Warning(.//fs/namei.c:2422): Excess function parameter 'nameidata'
    description in 'path_mountpoint'
    
    Signed-off-by: Masanari Iida <standby24x7@gmail.com>
    Acked-by: Randy Dunlap <rdunlap@infradead.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    standby24x7 authored and torvalds committed Sep 10, 2015
    Configuration menu
    Copy the full SHA
    2a78b85 View commit details
    Browse the repository at this point in the history
  94. mm: mark most vm_operations_struct const

    With two exceptions (drm/qxl and drm/radeon) all vm_operations_struct
    structs should be constant.
    
    Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
    Reviewed-by: Oleg Nesterov <oleg@redhat.com>
    Cc: "H. Peter Anvin" <hpa@zytor.com>
    Cc: Andy Lutomirski <luto@amacapital.net>
    Cc: Dave Hansen <dave.hansen@linux.intel.com>
    Cc: Ingo Molnar <mingo@elte.hu>
    Cc: Minchan Kim <minchan@kernel.org>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    kiryl authored and torvalds committed Sep 10, 2015
    Configuration menu
    Copy the full SHA
    7cbea8d View commit details
    Browse the repository at this point in the history
  95. mm, mpx: add "vm_flags_t vm_flags" arg to do_mmap_pgoff()

    Add the additional "vm_flags_t vm_flags" argument to do_mmap_pgoff(),
    rename it to do_mmap(), and re-introduce do_mmap_pgoff() as a simple
    wrapper on top of do_mmap().  Perhaps we should update the callers of
    do_mmap_pgoff() and kill it later.
    
    This way mpx_mmap() can simply call do_mmap(vm_flags => VM_MPX) and do not
    play with vm internals.
    
    After this change mmap_region() has a single user outside of mmap.c,
    arch/tile/mm/elf.c:arch_setup_additional_pages().  It would be nice to
    change arch/tile/ and unexport mmap_region().
    
    [kirill@shutemov.name: fix build]
    [akpm@linux-foundation.org: coding-style fixes]
    Signed-off-by: Oleg Nesterov <oleg@redhat.com>
    Acked-by: Dave Hansen <dave.hansen@linux.intel.com>
    Tested-by: Dave Hansen <dave.hansen@linux.intel.com>
    Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
    Cc: "H. Peter Anvin" <hpa@zytor.com>
    Cc: Andy Lutomirski <luto@amacapital.net>
    Cc: Ingo Molnar <mingo@elte.hu>
    Cc: Minchan Kim <minchan@kernel.org>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    oleg-nesterov authored and torvalds committed Sep 10, 2015
    Configuration menu
    Copy the full SHA
    1fcfd8d View commit details
    Browse the repository at this point in the history
  96. mm: make sure all file VMAs have ->vm_ops set

    We rely on vma->vm_ops == NULL to detect anonymous VMA: see
    vma_is_anonymous(), but some drivers doesn't set ->vm_ops.
    
    As a result we can end up with anonymous page in private file mapping.
    That should not lead to serious misbehaviour, but nevertheless is wrong.
    
    Let's fix by setting up dummy ->vm_ops for file mmapping if f_op->mmap()
    didn't set its own.
    
    The patch also adds sanity check into __vma_link_rb(). It will help
    catch broken VMAs which inserted directly into mm_struct via
    insert_vm_struct().
    
    Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
    Reviewed-by: Oleg Nesterov <oleg@redhat.com>
    Cc: "H. Peter Anvin" <hpa@zytor.com>
    Cc: Andy Lutomirski <luto@amacapital.net>
    Cc: Dave Hansen <dave.hansen@linux.intel.com>
    Cc: Ingo Molnar <mingo@elte.hu>
    Cc: Minchan Kim <minchan@kernel.org>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    kiryl authored and torvalds committed Sep 10, 2015
    Configuration menu
    Copy the full SHA
    6dc296e View commit details
    Browse the repository at this point in the history
  97. mm: use vma_is_anonymous() in create_huge_pmd() and wp_huge_pmd()

    Let's use helper rather than direct check of vma->vm_ops to distinguish
    anonymous VMA.
    
    Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
    Reviewed-by: Oleg Nesterov <oleg@redhat.com>
    Cc: "H. Peter Anvin" <hpa@zytor.com>
    Cc: Andy Lutomirski <luto@amacapital.net>
    Cc: Dave Hansen <dave.hansen@linux.intel.com>
    Cc: Ingo Molnar <mingo@elte.hu>
    Cc: Minchan Kim <minchan@kernel.org>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    kiryl authored and torvalds committed Sep 10, 2015
    Configuration menu
    Copy the full SHA
    fb6dd5f View commit details
    Browse the repository at this point in the history
  98. dma-mapping: consolidate dma_{alloc,free}_{attrs,coherent}

    Since 2009 we have a nice asm-generic header implementing lots of DMA API
    functions for architectures using struct dma_map_ops, but unfortunately
    it's still missing a lot of APIs that all architectures still have to
    duplicate.
    
    This series consolidates the remaining functions, although we still need
    arch opt outs for two of them as a few architectures have very
    non-standard implementations.
    
    This patch (of 5):
    
    The coherent DMA allocator works the same over all architectures supporting
    dma_map operations.
    
    This patch consolidates them and converges the minor differences:
    
     - the debug_dma helpers are now called from all architectures, including
       those that were previously missing them
     - dma_alloc_from_coherent and dma_release_from_coherent are now always
       called from the generic alloc/free routines instead of the ops
       dma-mapping-common.h always includes dma-coherent.h to get the defintions
       for them, or the stubs if the architecture doesn't support this feature
     - checks for ->alloc / ->free presence are removed.  There is only one
       magic instead of dma_map_ops without them (mic_dma_ops) and that one
       is x86 only anyway.
    
    Besides that only x86 needs special treatment to replace a default devices
    if none is passed and tweak the gfp_flags.  An optional arch hook is provided
    for that.
    
    [linux@roeck-us.net: fix build]
    [jcmvbkbc@gmail.com: fix xtensa]
    Signed-off-by: Christoph Hellwig <hch@lst.de>
    Cc: Arnd Bergmann <arnd@arndb.de>
    Cc: Russell King <linux@arm.linux.org.uk>
    Cc: Catalin Marinas <catalin.marinas@arm.com>
    Cc: Will Deacon <will.deacon@arm.com>
    Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
    Cc: Michal Simek <monstr@monstr.eu>
    Cc: Jonas Bonn <jonas@southpole.se>
    Cc: Chris Metcalf <cmetcalf@ezchip.com>
    Cc: Guan Xuetao <gxt@mprc.pku.edu.cn>
    Cc: Ralf Baechle <ralf@linux-mips.org>
    Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
    Cc: Ingo Molnar <mingo@elte.hu>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Cc: "H. Peter Anvin" <hpa@zytor.com>
    Cc: Andy Shevchenko <andy.shevchenko@gmail.com>
    Signed-off-by: Guenter Roeck <linux@roeck-us.net>
    Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Christoph Hellwig authored and torvalds committed Sep 10, 2015
    Configuration menu
    Copy the full SHA
    6894258 View commit details
    Browse the repository at this point in the history
  99. dma-mapping: consolidate dma_{alloc,free}_noncoherent

    Most architectures do not support non-coherent allocations and either
    define dma_{alloc,free}_noncoherent to their coherent versions or stub
    them out.
    
    Openrisc uses dma_{alloc,free}_attrs to implement them, and only Mips
    implements them directly.
    
    This patch moves the Openrisc version to common code, and handles the
    DMA_ATTR_NON_CONSISTENT case in the mips dma_map_ops instance.
    
    Note that actual non-coherent allocations require a dma_cache_sync
    implementation, so if non-coherent allocations didn't work on
    an architecture before this patch they still won't work after it.
    
    [jcmvbkbc@gmail.com: fix xtensa]
    Signed-off-by: Christoph Hellwig <hch@lst.de>
    Cc: Arnd Bergmann <arnd@arndb.de>
    Cc: Russell King <linux@arm.linux.org.uk>
    Cc: Catalin Marinas <catalin.marinas@arm.com>
    Cc: Will Deacon <will.deacon@arm.com>
    Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
    Cc: Michal Simek <monstr@monstr.eu>
    Cc: Jonas Bonn <jonas@southpole.se>
    Cc: Chris Metcalf <cmetcalf@ezchip.com>
    Cc: Guan Xuetao <gxt@mprc.pku.edu.cn>
    Cc: Ralf Baechle <ralf@linux-mips.org>
    Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
    Cc: Ingo Molnar <mingo@elte.hu>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Cc: "H. Peter Anvin" <hpa@zytor.com>
    Cc: Andy Shevchenko <andy.shevchenko@gmail.com>
    Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Christoph Hellwig authored and torvalds committed Sep 10, 2015
    Configuration menu
    Copy the full SHA
    1e89375 View commit details
    Browse the repository at this point in the history
  100. dma-mapping: cosolidate dma_mapping_error

    Currently there are three valid implementations of dma_mapping_error:
    
     (1) call ->mapping_error
     (2) check for a hardcoded error code
     (3) always return 0
    
    This patch provides a common implementation that calls ->mapping_error
    if present, then checks for DMA_ERROR_CODE if defined or otherwise
    returns 0.
    
    [jcmvbkbc@gmail.com: fix xtensa]
    Signed-off-by: Christoph Hellwig <hch@lst.de>
    Cc: Arnd Bergmann <arnd@arndb.de>
    Cc: Russell King <linux@arm.linux.org.uk>
    Cc: Catalin Marinas <catalin.marinas@arm.com>
    Cc: Will Deacon <will.deacon@arm.com>
    Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
    Cc: Michal Simek <monstr@monstr.eu>
    Cc: Jonas Bonn <jonas@southpole.se>
    Cc: Chris Metcalf <cmetcalf@ezchip.com>
    Cc: Guan Xuetao <gxt@mprc.pku.edu.cn>
    Cc: Ralf Baechle <ralf@linux-mips.org>
    Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
    Cc: Ingo Molnar <mingo@elte.hu>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Cc: "H. Peter Anvin" <hpa@zytor.com>
    Cc: Andy Shevchenko <andy.shevchenko@gmail.com>
    Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Christoph Hellwig authored and torvalds committed Sep 10, 2015
    Configuration menu
    Copy the full SHA
    efa21e4 View commit details
    Browse the repository at this point in the history
  101. dma-mapping: consolidate dma_supported

    Most architectures just call into ->dma_supported, but some also return 1
    if the method is not present, or 0 if no dma ops are present (although
    that should never happeb). Consolidate this more broad version into
    common code.
    
    Also fix h8300 which inorrectly always returned 0, which would have been
    a problem if it's dma_set_mask implementation wasn't a similarly buggy
    noop.
    
    As a few architectures have much more elaborate implementations, we
    still allow for arch overrides.
    
    [jcmvbkbc@gmail.com: fix xtensa]
    Signed-off-by: Christoph Hellwig <hch@lst.de>
    Cc: Arnd Bergmann <arnd@arndb.de>
    Cc: Russell King <linux@arm.linux.org.uk>
    Cc: Catalin Marinas <catalin.marinas@arm.com>
    Cc: Will Deacon <will.deacon@arm.com>
    Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
    Cc: Michal Simek <monstr@monstr.eu>
    Cc: Jonas Bonn <jonas@southpole.se>
    Cc: Chris Metcalf <cmetcalf@ezchip.com>
    Cc: Guan Xuetao <gxt@mprc.pku.edu.cn>
    Cc: Ralf Baechle <ralf@linux-mips.org>
    Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
    Cc: Ingo Molnar <mingo@elte.hu>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Cc: "H. Peter Anvin" <hpa@zytor.com>
    Cc: Andy Shevchenko <andy.shevchenko@gmail.com>
    Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Christoph Hellwig authored and torvalds committed Sep 10, 2015
    Configuration menu
    Copy the full SHA
    ee19637 View commit details
    Browse the repository at this point in the history
  102. dma-mapping: consolidate dma_set_mask

    Almost everyone implements dma_set_mask the same way, although some time
    that's hidden in ->set_dma_mask methods.
    
    This patch consolidates those into a common implementation that either
    calls ->set_dma_mask if present or otherwise uses the default
    implementation.  Some architectures used to only call ->set_dma_mask
    after the initial checks, and those instance have been fixed to do the
    full work.  h8300 implemented dma_set_mask bogusly as a no-ops and has
    been fixed.
    
    Unfortunately some architectures overload unrelated semantics like changing
    the dma_ops into it so we still need to allow for an architecture override
    for now.
    
    [jcmvbkbc@gmail.com: fix xtensa]
    Signed-off-by: Christoph Hellwig <hch@lst.de>
    Cc: Arnd Bergmann <arnd@arndb.de>
    Cc: Russell King <linux@arm.linux.org.uk>
    Cc: Catalin Marinas <catalin.marinas@arm.com>
    Cc: Will Deacon <will.deacon@arm.com>
    Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
    Cc: Michal Simek <monstr@monstr.eu>
    Cc: Jonas Bonn <jonas@southpole.se>
    Cc: Chris Metcalf <cmetcalf@ezchip.com>
    Cc: Guan Xuetao <gxt@mprc.pku.edu.cn>
    Cc: Ralf Baechle <ralf@linux-mips.org>
    Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
    Cc: Ingo Molnar <mingo@elte.hu>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Cc: "H. Peter Anvin" <hpa@zytor.com>
    Cc: Andy Shevchenko <andy.shevchenko@gmail.com>
    Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Christoph Hellwig authored and torvalds committed Sep 10, 2015
    Configuration menu
    Copy the full SHA
    452e06a View commit details
    Browse the repository at this point in the history
  103. Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net

    Pull networking fixes from David Miller:
    
     1) Fix out-of-bounds array access in netfilter ipset, from Jozsef
        Kadlecsik.
    
     2) Use correct free operation on netfilter conntrack templates, from
        Daniel Borkmann.
    
     3) Fix route leak in SCTP, from Marcelo Ricardo Leitner.
    
     4) Fix sizeof(pointer) in mac80211, from Thierry Reding.
    
     5) Fix cache pointer comparison in ip6mr leading to missed unlock of
        mrt_lock.  From Richard Laing.
    
     6) rds_conn_lookup() needs to consider network namespace in key
        comparison, from Sowmini Varadhan.
    
     7) Fix deadlock in TIPC code wrt broadcast link wakeups, from Kolmakov
        Dmitriy.
    
     8) Fix fd leaks in bpf syscall, from Daniel Borkmann.
    
     9) Fix error recovery when installing ipv6 multipath routes, we would
        delete the old route before we would know if we could fully commit
        to the new set of nexthops.  Fix from Roopa Prabhu.
    
    10) Fix run-time suspend problems in r8152, from Hayes Wang.
    
    11) In fec, don't program the MAC address into the chip when the clocks
        are gated off.  From Fugang Duan.
    
    12) Fix poll behavior for netlink sockets when using rx ring mmap, from
        Daniel Borkmann.
    
    13) Don't allocate memory with GFP_KERNEL from get_stats64 in r8169
        driver, from Corinna Vinschen.
    
    14) In TCP Cubic congestion control, handle idle periods better where we
        are application limited, in order to keep cwnd from growing out of
        control.  From Eric Dumzet.
    
    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (65 commits)
      tcp_cubic: better follow cubic curve after idle period
      tcp: generate CA_EVENT_TX_START on data frames
      xen-netfront: respect user provided max_queues
      xen-netback: respect user provided max_queues
      r8169: Fix sleeping function called during get_stats64, v2
      ether: add IEEE 1722 ethertype - TSN
      netlink, mmap: fix edge-case leakages in nf queue zero-copy
      netlink, mmap: don't walk rx ring on poll if receive queue non-empty
      cxgb4: changes for new firmware 1.14.4.0
      net: fec: add netif status check before set mac address
      r8152: fix the runtime suspend issues
      r8152: split DRIVER_VERSION
      ipv6: fix ifnullfree.cocci warnings
      add microchip LAN88xx phy driver
      stmmac: fix check for phydev being open
      net: qlcnic: delete redundant memsets
      net: mv643xx_eth: use kzalloc
      net: jme: use kzalloc() instead of kmalloc+memset
      net: cavium: liquidio: use kzalloc in setup_glist()
      net: ipv6: use common fib_default_rule_pref
      ...
    torvalds committed Sep 10, 2015
    Configuration menu
    Copy the full SHA
    65c61bc View commit details
    Browse the repository at this point in the history
  104. Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel…

    …/git/rkuo/linux-hexagon-kernel
    
    Pull hexagon updates from Richard Kuo:
     "Just two fixes -- one for a uapi header and one for a timer interface"
    
    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rkuo/linux-hexagon-kernel:
      Revert "Hexagon: fix signal.c compile error"
      hexagon/time: Migrate to new 'set-state' interface
    torvalds committed Sep 10, 2015
    Configuration menu
    Copy the full SHA
    0cdf5a4 View commit details
    Browse the repository at this point in the history
  105. Merge branch 'next' of git://git.monstr.eu/linux-2.6-microblaze

    Pull microblaze update from Michal Simek.
    
    * 'next' of git://git.monstr.eu/linux-2.6-microblaze:
      elf-em.h: move EM_MICROBLAZE to the common header
    torvalds committed Sep 10, 2015
    Configuration menu
    Copy the full SHA
    573c577 View commit details
    Browse the repository at this point in the history
  106. Merge tag 'for-linus-4.3-rc0b-tag' of git://git.kernel.org/pub/scm/li…

    …nux/kernel/git/xen/tip
    
    Pull xen terminology fixes from David Vrabel:
     "Use the correct GFN/BFN terms more consistently"
    
    * tag 'for-linus-4.3-rc0b-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
      xen/xenbus: Rename the variable xen_store_mfn to xen_store_gfn
      xen/privcmd: Further s/MFN/GFN/ clean-up
      hvc/xen: Further s/MFN/GFN clean-up
      video/xen-fbfront: Further s/MFN/GFN clean-up
      xen/tmem: Use xen_page_to_gfn rather than pfn_to_gfn
      xen: Use correctly the Xen memory terminologies
      arm/xen: implement correctly pfn_to_mfn
      xen: Make clear that swiotlb and biomerge are dealing with DMA address
    torvalds committed Sep 10, 2015
    Configuration menu
    Copy the full SHA
    06ab838 View commit details
    Browse the repository at this point in the history
  107. Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm

    Pull more kvm updates from Paolo Bonzini:
     "ARM:
       - Full debug support for arm64
       - Active state switching for timer interrupts
       - Lazy FP/SIMD save/restore for arm64
       - Generic ARMv8 target
    
      PPC:
       - Book3S: A few bug fixes
       - Book3S: Allow micro-threading on POWER8
    
      x86:
       - Compiler warnings
    
      Generic:
       - Adaptive polling for guest halt"
    
    * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (49 commits)
      kvm: irqchip: fix memory leak
      kvm: move new trace event outside #ifdef CONFIG_KVM_ASYNC_PF
      KVM: trace kvm_halt_poll_ns grow/shrink
      KVM: dynamic halt-polling
      KVM: make halt_poll_ns per-vCPU
      Silence compiler warning in arch/x86/kvm/emulate.c
      kvm: compile process_smi_save_seg_64() only for x86_64
      KVM: x86: avoid uninitialized variable warning
      KVM: PPC: Book3S: Fix typo in top comment about locking
      KVM: PPC: Book3S: Fix size of the PSPB register
      KVM: PPC: Book3S HV: Exit on H_DOORBELL if HOST_IPI is set
      KVM: PPC: Book3S HV: Fix race in starting secondary threads
      KVM: PPC: Book3S: correct width in XER handling
      KVM: PPC: Book3S HV: Fix preempted vcore stolen time calculation
      KVM: PPC: Book3S HV: Fix preempted vcore list locking
      KVM: PPC: Book3S HV: Implement H_CLEAR_REF and H_CLEAR_MOD
      KVM: PPC: Book3S HV: Fix bug in dirty page tracking
      KVM: PPC: Book3S HV: Fix race in reading change bit when removing HPTE
      KVM: PPC: Book3S HV: Implement dynamic micro-threading on POWER8
      KVM: PPC: Book3S HV: Make use of unused threads when running guests
      ...
    torvalds committed Sep 10, 2015
    Configuration menu
    Copy the full SHA
    519f526 View commit details
    Browse the repository at this point in the history

Commits on Sep 11, 2015

  1. Merge tag 'armsoc-late' of git://git.kernel.org/pub/scm/linux/kernel/…

    …git/arm/arm-soc
    
    Pull late ARM SoC updates from Kevin Hilman:
     "This is a collection of a few late fixes and other misc stuff that had
      dependencies on things being merged from other trees.
    
      The bulk of the changes are for samsung/exynos SoCs for some changes
      that needed a few minor reworks so ended up a bit late.  The others
      are mainly for qcom SoCs: a couple fixes and some DTS updates"
    
    * tag 'armsoc-late' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (37 commits)
      ARM: multi_v7_defconfig: Enable PBIAS regulator
      soc: qcom: smd: Correct fBLOCKREADINTR handling
      soc: qcom: smd: Use correct remote processor ID
      soc: qcom: smem: Fix errant private access
      ARM: dts: qcom: msm8974-sony-xperia-honami: Use stdout-path
      ARM: dts: qcom: msm8960-cdp: Use stdout-path
      ARM: dts: qcom: msm8660-surf: Use stdout-path
      ARM: dts: qcom: ipq8064-ap148: Use stdout-path
      ARM: dts: qcom: apq8084-mtp: Use stdout-path
      ARM: dts: qcom: apq8084-ifc6540: Use stdout-path
      ARM: dts: qcom: apq8074-dragonboard: Use stdout-path
      ARM: dts: qcom: apq8064-ifc6410: Use stdout-path
      ARM: dts: qcom: apq8064-cm-qs600: Use stdout-path
      ARM: dts: qcom: Label serial nodes for aliasing and stdout-path
      reset: ath79: Fix missing spin_lock_init
      reset: Add (devm_)reset_control_get stub functions
      ARM: EXYNOS: switch to using generic cpufreq driver for exynos4x12
      cpufreq: exynos: Remove unselectable rule for arm-exynos-cpufreq.o
      ARM: dts: add iommu property to JPEG device for exynos4
      ARM: dts: enable SPI1 for exynos4412-odroidu3
      ...
    torvalds committed Sep 11, 2015
    Configuration menu
    Copy the full SHA
    d71fc23 View commit details
    Browse the repository at this point in the history
  2. Merge branch 'akpm' (patches from Andrew)

    Merge third patch-bomb from Andrew Morton:
    
     - even more of the rest of MM
    
     - lib/ updates
    
     - checkpatch updates
    
     - small changes to a few scruffy filesystems
    
     - kmod fixes/cleanups
    
     - kexec updates
    
     - a dma-mapping cleanup series from hch
    
    * emailed patches from Andrew Morton <akpm@linux-foundation.org>: (81 commits)
      dma-mapping: consolidate dma_set_mask
      dma-mapping: consolidate dma_supported
      dma-mapping: cosolidate dma_mapping_error
      dma-mapping: consolidate dma_{alloc,free}_noncoherent
      dma-mapping: consolidate dma_{alloc,free}_{attrs,coherent}
      mm: use vma_is_anonymous() in create_huge_pmd() and wp_huge_pmd()
      mm: make sure all file VMAs have ->vm_ops set
      mm, mpx: add "vm_flags_t vm_flags" arg to do_mmap_pgoff()
      mm: mark most vm_operations_struct const
      namei: fix warning while make xmldocs caused by namei.c
      ipc: convert invalid scenarios to use WARN_ON
      zlib_deflate/deftree: remove bi_reverse()
      lib/decompress_unlzma: Do a NULL check for pointer
      lib/decompressors: use real out buf size for gunzip with kernel
      fs/affs: make root lookup from blkdev logical size
      sysctl: fix int -> unsigned long assignments in INT_MIN case
      kexec: export KERNEL_IMAGE_SIZE to vmcoreinfo
      kexec: align crash_notes allocation to make it be inside one physical page
      kexec: remove unnecessary test in kimage_alloc_crash_control_pages()
      kexec: split kexec_load syscall from kexec core code
      ...
    torvalds committed Sep 11, 2015
    Configuration menu
    Copy the full SHA
    33e247c View commit details
    Browse the repository at this point in the history
  3. Merge branch 'for-4.3/blkcg' of git://git.kernel.dk/linux-block

    Pull blk-cg updates from Jens Axboe:
     "A bit later in the cycle, but this has been in the block tree for a a
      while.  This is basically four patchsets from Tejun, that improve our
      buffered cgroup writeback.  It was dependent on the other cgroup
      changes, but they went in earlier in this cycle.
    
      Series 1 is set of 5 patches that has cgroup writeback updates:
    
       - bdi_writeback iteration fix which could lead to some wb's being
         skipped or repeated during e.g. sync under memory pressure.
    
       - Simplification of wb work wait mechanism.
    
       - Writeback tracepoints updated to report cgroup.
    
      Series 2 is is a set of updates for the CFQ cgroup writeback handling:
    
         cfq has always charged all async IOs to the root cgroup.  It didn't
         have much choice as writeback didn't know about cgroups and there
         was no way to tell who to blame for a given writeback IO.
         writeback finally grew support for cgroups and now tags each
         writeback IO with the appropriate cgroup to charge it against.
    
         This patchset updates cfq so that it follows the blkcg each bio is
         tagged with.  Async cfq_queues are now shared across cfq_group,
         which is per-cgroup, instead of per-request_queue cfq_data.  This
         makes all IOs follow the weight based IO resource distribution
         implemented by cfq.
    
         - Switched from GFP_ATOMIC to GFP_NOWAIT as suggested by Jeff.
    
         - Other misc review points addressed, acks added and rebased.
    
      Series 3 is the blkcg policy cleanup patches:
    
         This patchset contains assorted cleanups for blkcg_policy methods
         and blk[c]g_policy_data handling.
    
         - alloc/free added for blkg_policy_data.  exit dropped.
    
         - alloc/free added for blkcg_policy_data.
    
         - blk-throttle's async percpu allocation is replaced with direct
           allocation.
    
         - all methods now take blk[c]g_policy_data instead of blkcg_gq or
           blkcg.
    
      And finally, series 4 is a set of patches cleaning up the blkcg stats
      handling:
    
        blkcg's stats have always been somwhat of a mess.  This patchset
        tries to improve the situation a bit.
    
         - The following patches added to consolidate blkcg entry point and
           blkg creation.  This is in itself is an improvement and helps
           colllecting common stats on bio issue.
    
         - per-blkg stats now accounted on bio issue rather than request
           completion so that bio based and request based drivers can behave
           the same way.  The issue was spotted by Vivek.
    
         - cfq-iosched implements custom recursive stats and blk-throttle
           implements custom per-cpu stats.  This patchset make blkcg core
           support both by default.
    
         - cfq-iosched and blk-throttle keep track of the same stats
           multiple times.  Unify them"
    
    * 'for-4.3/blkcg' of git://git.kernel.dk/linux-block: (45 commits)
      blkcg: use CGROUP_WEIGHT_* scale for io.weight on the unified hierarchy
      blkcg: s/CFQ_WEIGHT_*/CFQ_WEIGHT_LEGACY_*/
      blkcg: implement interface for the unified hierarchy
      blkcg: misc preparations for unified hierarchy interface
      blkcg: separate out tg_conf_updated() from tg_set_conf()
      blkcg: move body parsing from blkg_conf_prep() to its callers
      blkcg: mark existing cftypes as legacy
      blkcg: rename subsystem name from blkio to io
      blkcg: refine error codes returned during blkcg configuration
      blkcg: remove unnecessary NULL checks from __cfqg_set_weight_device()
      blkcg: reduce stack usage of blkg_rwstat_recursive_sum()
      blkcg: remove cfqg_stats->sectors
      blkcg: move io_service_bytes and io_serviced stats into blkcg_gq
      blkcg: make blkg_[rw]stat_recursive_sum() to be able to index into blkcg_gq
      blkcg: make blkcg_[rw]stat per-cpu
      blkcg: add blkg_[rw]stat->aux_cnt and replace cfq_group->dead_stats with it
      blkcg: consolidate blkg creation in blkcg_bio_issue_check()
      blk-throttle: improve queue bypass handling
      blkcg: move root blkg lookup optimization from throtl_lookup_tg() to __blkg_lookup()
      blkcg: inline [__]blkg_lookup()
      ...
    torvalds committed Sep 11, 2015
    Configuration menu
    Copy the full SHA
    b0a1ea5 View commit details
    Browse the repository at this point in the history