1. 14 Aug, 2015 4 commits
  2. 13 Aug, 2015 12 commits
  3. 12 Aug, 2015 20 commits
    • Dan Carpenter's avatar
      cosa: missing error code on failure in probe() · e6d00693
      Dan Carpenter authored
      If register_hdlc_device() fails, the current code returns 0 but we
      should return an error code instead.
      Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e6d00693
    • David S. Miller's avatar
      Merge branch 'gianfar-fixes' · e941ba86
      David S. Miller authored
      Jakub Kicinski says:
      
      ====================
      gianfar: filer changes
      
      respinning with examples as requested.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e941ba86
    • Jakub Kicinski's avatar
      gianfar: remove faulty filer optimizer · 1f2b7293
      Jakub Kicinski authored
      Current filer rule optimization is broken in several ways:
       (1) Can perform reads/writes beyond end of allocated tables.
           (gianfar_ethtool.c:1326).
      
      (2) It breaks badly for rules with more than 2 specifiers
           (e.g. matching ip, port, tos).
      
      Example:
      # ethtool -N eth2 flow-type udp4 dst-ip 10.0.0.1 dst-port 1 tos 1 action 1
      Added rule with ID 254
      # ethtool -N eth2 flow-type udp4 dst-ip 10.0.0.2 dst-port 2 tos 2 action 9
      Added rule with ID 253
      # ethtool -N eth2 flow-type udp4 dst-ip 10.0.0.3 dst-port 3 tos 3 action 17
      Added rule with ID 252
      # ./filer_decode /sys/kernel/debug/gfar1/filer_raw
      00: MASK == 00000210 AND         Q:00           ctrl:00000080 prop:00000210
      01: FPR  == 00000210 AND CLE     Q:00           ctrl:00000281 prop:00000210
      02: MASK == ffffffff AND         Q:00           ctrl:00000080 prop:ffffffff
      03: DPT  == 00000003 AND         Q:00           ctrl:0000008e prop:00000003
      04: TOS  == 00000003 AND         Q:00           ctrl:0000008a prop:00000003
      05: DIA  == 0a000003 AND         Q:11           ctrl:0000448c prop:0a000003
      06: DPT  == 00000002 AND         Q:00           ctrl:0000008e prop:00000002
      07: TOS  == 00000002 AND         Q:00           ctrl:0000008a prop:00000002
      08: DIA  == 0a000002 AND         Q:09           ctrl:0000248c prop:0a000002
      09: DIA  == 0a000001 AND         Q:00           ctrl:0000008c prop:0a000001
      0a: DPT  == 00000001 AND         Q:00           ctrl:0000008e prop:00000001
      0b: TOS  == 00000001     CLE     Q:01           ctrl:0000060a prop:00000001
      ff: MASK >= 00000000             Q:00           ctrl:00000020 prop:00000000
      
      (Entire cluster gets AND-ed together).
      
       (3) We observed that the masking rules it generates do not
           play well with clustering on P2020.  Only first rule
           of the cluster would ever fire.  Given that optimizer
           relies heavily on masking this is very hard to fix.
      
      Example:
      # ethtool -N eth2 flow-type udp4 dst-ip 10.0.0.1 dst-port 1  action 1
      Added rule with ID 254
      # ethtool -N eth2 flow-type udp4 dst-ip 10.0.0.2 dst-port 2  action 9
      Added rule with ID 253
      # ethtool -N eth2 flow-type udp4 dst-ip 10.0.0.3 dst-port 3  action 17
      Added rule with ID 252
      # ./filer_decode /sys/kernel/debug/gfar1/filer_raw
      00: MASK == 00000210 AND         Q:00           ctrl:00000080 prop:00000210
      01: FPR  == 00000210 AND CLE     Q:00           ctrl:00000281 prop:00000210
      02: MASK == ffffffff AND         Q:00           ctrl:00000080 prop:ffffffff
      03: DPT  == 00000003 AND         Q:00           ctrl:0000008e prop:00000003
      04: DIA  == 0a000003             Q:11           ctrl:0000440c prop:0a000003
      05: DPT  == 00000002 AND         Q:00           ctrl:0000008e prop:00000002
      06: DIA  == 0a000002             Q:09           ctrl:0000240c prop:0a000002
      07: DIA  == 0a000001 AND         Q:00           ctrl:0000008c prop:0a000001
      08: DPT  == 00000001     CLE     Q:01           ctrl:0000060e prop:00000001
      ff: MASK >= 00000000             Q:00           ctrl:00000020 prop:00000000
      
      Which looks correct according to the spec but only the first
      (eth id 252)/last added rule for 10.0.0.3 will ever trigger.
      As if filer did not treat the AND CLE as cluster start but
      also kept AND-ing the rules.  We found no errata covering this.
      
      The fact that nobody noticed (2) or (3) makes me think
      that this feature is not very widely used and we should just
      remove it.
      Reported-by: default avatarAleksander Dutkowski <adutkowski@gmail.com>
      Signed-off-by: default avatarJakub Kicinski <kubakici@wp.pl>
      Acked-by: default avatarClaudiu Manoil <claudiu.manoil@freescale.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1f2b7293
    • Jakub Kicinski's avatar
      gianfar: correct list membership accounting · b5c8c890
      Jakub Kicinski authored
      At a cost of one line let's make sure .count is correct
      when calling gfar_process_filer_changes().
      Signed-off-by: default avatarJakub Kicinski <kubakici@wp.pl>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b5c8c890
    • Jakub Kicinski's avatar
      gianfar: correct filer table writing · a898fe04
      Jakub Kicinski authored
      MAX_FILER_IDX is the last usable index.  Using less-than
      will already guarantee that one entry for catch-all rule
      will be left, no need to subtract 1 here.
      Signed-off-by: default avatarJakub Kicinski <kubakici@wp.pl>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a898fe04
    • Venkat Venkatsubra's avatar
      bonding: Gratuitous ARP gets dropped when first slave added · b02e3e94
      Venkat Venkatsubra authored
      When the first slave is added (such as during bootup) the first
      gratuitous ARP gets dropped. We don't see this drop during a failover.
      The packet gets dropped in qdisc (noop_enqueue).
      
      The fix is to delay the sending of gratuitous ARPs till the bond dev's
      carrier is present.
      
      It can also be worked around by setting num_grat_arp to more than 1.
      Signed-off-by: default avatarVenkat Venkatsubra <venkat.x.venkatsubra@oracle.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b02e3e94
    • Florian Fainelli's avatar
      net: dsa: Do not override PHY interface if already configured · 211c504a
      Florian Fainelli authored
      In case we need to divert reads/writes using the slave MII bus, we may have
      already fetched a valid PHY interface property from Device Tree, and that
      mode is used by the PHY driver to make configuration decisions.
      
      If we could not fetch the "phy-mode" property, we will assign p->phy_interface
      to PHY_INTERFACE_MODE_NA, such that we can actually check for that condition as
      to whether or not we should override the interface value.
      
      Fixes: 19334920 ("net: dsa: Set valid phy interface type")
      Signed-off-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      211c504a
    • Linus Torvalds's avatar
      Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux · 30065bfd
      Linus Torvalds authored
      Pull arm64 fix from Catalin Marinas:
       "Fix coarse clock monotonicity (VDSO timestamp off by one jiffy
        compared to the syscall one)"
      
      * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
        arm64: VDSO: fix coarse clock monotonicity regression
      30065bfd
    • Linus Torvalds's avatar
      Merge branch 'drm-fixes-4.2' of git://people.freedesktop.org/~agd5f/linux · 04da002d
      Linus Torvalds authored
      Pull amd drm fixes from Alex Deucher:
       "Dave is on vacation at the moment, so please pull these radeon and
        amdgpu fixes directly.
      
        Just a few minor things for 4.2:
      
         - add a new radeon pci id
         - fix a power management regression in amdgpu
         - fix HEVC command buffer validation in amdgpu"
      
      * 'drm-fixes-4.2' of git://people.freedesktop.org/~agd5f/linux:
        drm/radeon: add new OLAND pci id
        Revert "drm/amdgpu: Configure doorbell to maximum slots"
        drm/amdgpu: add context buffer size check for HEVC
      04da002d
    • Alex Deucher's avatar
      drm/radeon: add new OLAND pci id · e037239e
      Alex Deucher authored
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Cc: stable@vger.kernel.org
      e037239e
    • Alex Deucher's avatar
      Revert "drm/amdgpu: Configure doorbell to maximum slots" · b8826b0c
      Alex Deucher authored
      This reverts commit 78ad5cdd.
      This commit breaks dpm and suspend/resume on CZ.
      b8826b0c
    • Boyuan Zhang's avatar
    • Linus Torvalds's avatar
      Merge tag 'regmap-fix-v4.2-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap · cec45d90
      Linus Torvalds authored
      Pull regmap fix from Mark Brown:
       "regmap: Fix handling of present bits on rbtree cache block resize
      
        When expanding a cache block we use krealloc() to resize the register
        present bitmap without initialising the newly allocated data (the
        original code was written for kzalloc()).  Add an appropraite memset()
        to fix that"
      
      * tag 'regmap-fix-v4.2-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap:
        regmap: regcache-rbtree: Clean new present bits on present bitmap resize
      cec45d90
    • Yi Zhang's avatar
      dm cache policy smq: move 'dm-cache-default' module alias to SMQ · 34dd0517
      Yi Zhang authored
      When creating dm-cache with the default policy, it will call
      request_module("dm-cache-default") to register the default policy.
      But the "dm-cache-default" alias was left referring to the MQ policy.
      Fix this by moving the module alias to SMQ.
      
      Fixes: bccab6a0 (dm cache: switch the "default" cache replacement policy from mq to smq)
      Signed-off-by: default avatarYi Zhang <yizhan@redhat.com>
      Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
      34dd0517
    • Joe Thornber's avatar
      dm btree: add ref counting ops for the leaves of top level btrees · b0dc3c8b
      Joe Thornber authored
      When using nested btrees, the top leaves of the top levels contain
      block addresses for the root of the next tree down.  If we shadow a
      shared leaf node the leaf values (sub tree roots) should be incremented
      accordingly.
      
      This is only an issue if there is metadata sharing in the top levels.
      Which only occurs if metadata snapshots are being used (as is possible
      with dm-thinp).  And could result in a block from the thinp metadata
      snap being reused early, thus corrupting the thinp metadata snap.
      Signed-off-by: default avatarJoe Thornber <ejt@redhat.com>
      Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
      Cc: stable@vger.kernel.org
      b0dc3c8b
    • Joe Thornber's avatar
      dm thin metadata: delete btrees when releasing metadata snapshot · 7f518ad0
      Joe Thornber authored
      The device details and mapping trees were just being decremented
      before.  Now btree_del() is called to do a deep delete.
      Signed-off-by: default avatarJoe Thornber <ejt@redhat.com>
      Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
      Cc: stable@vger.kernel.org
      7f518ad0
    • Matt Fleming's avatar
      perf/x86/intel/cqm: Do not access cpu_data() from CPU_UP_PREPARE handler · d7a702f0
      Matt Fleming authored
      Tony reports that booting his 144-cpu machine with maxcpus=10 triggers
      the following WARN_ON():
      
      [   21.045727] WARNING: CPU: 8 PID: 647 at arch/x86/kernel/cpu/perf_event_intel_cqm.c:1267 intel_cqm_cpu_prepare+0x75/0x90()
      [   21.045744] CPU: 8 PID: 647 Comm: systemd-udevd Not tainted 4.2.0-rc4 #1
      [   21.045745] Hardware name: Intel Corporation BRICKLAND/BRICKLAND, BIOS BRHSXSD1.86B.0066.R00.1506021730 06/02/2015
      [   21.045747]  0000000000000000 0000000082771b09 ffff880856333ba8 ffffffff81669b67
      [   21.045748]  0000000000000000 0000000000000000 ffff880856333be8 ffffffff8107b02a
      [   21.045750]  ffff88085b789800 ffff88085f68a020 ffffffff819e2470 000000000000000a
      [   21.045750] Call Trace:
      [   21.045757]  [<ffffffff81669b67>] dump_stack+0x45/0x57
      [   21.045759]  [<ffffffff8107b02a>] warn_slowpath_common+0x8a/0xc0
      [   21.045761]  [<ffffffff8107b15a>] warn_slowpath_null+0x1a/0x20
      [   21.045762]  [<ffffffff81036725>] intel_cqm_cpu_prepare+0x75/0x90
      [   21.045764]  [<ffffffff81036872>] intel_cqm_cpu_notifier+0x42/0x160
      [   21.045767]  [<ffffffff8109a33d>] notifier_call_chain+0x4d/0x80
      [   21.045769]  [<ffffffff8109a44e>] __raw_notifier_call_chain+0xe/0x10
      [   21.045770]  [<ffffffff8107b538>] _cpu_up+0xe8/0x190
      [   21.045771]  [<ffffffff8107b65a>] cpu_up+0x7a/0xa0
      [   21.045774]  [<ffffffff8165e920>] cpu_subsys_online+0x40/0x90
      [   21.045777]  [<ffffffff81433b37>] device_online+0x67/0x90
      [   21.045778]  [<ffffffff81433bea>] online_store+0x8a/0xa0
      [   21.045782]  [<ffffffff81430e78>] dev_attr_store+0x18/0x30
      [   21.045785]  [<ffffffff8126b6ba>] sysfs_kf_write+0x3a/0x50
      [   21.045786]  [<ffffffff8126ad40>] kernfs_fop_write+0x120/0x170
      [   21.045789]  [<ffffffff811f0b77>] __vfs_write+0x37/0x100
      [   21.045791]  [<ffffffff811f38b8>] ? __sb_start_write+0x58/0x110
      [   21.045795]  [<ffffffff81296d2d>] ? security_file_permission+0x3d/0xc0
      [   21.045796]  [<ffffffff811f1279>] vfs_write+0xa9/0x190
      [   21.045797]  [<ffffffff811f2075>] SyS_write+0x55/0xc0
      [   21.045800]  [<ffffffff81067300>] ? do_page_fault+0x30/0x80
      [   21.045804]  [<ffffffff816709ae>] entry_SYSCALL_64_fastpath+0x12/0x71
      [   21.045805] ---[ end trace fe228b836d8af405 ]---
      
      The root cause is that CPU_UP_PREPARE is completely the wrong notifier
      action from which to access cpu_data(), because smp_store_cpu_info()
      won't have been executed by the target CPU at that point, which in turn
      means that ->x86_cache_max_rmid and ->x86_cache_occ_scale haven't been
      filled out.
      
      Instead let's invoke our handler from CPU_STARTING and rename it
      appropriately.
      Reported-by: default avatarTony Luck <tony.luck@intel.com>
      Signed-off-by: default avatarMatt Fleming <matt.fleming@intel.com>
      Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
      Cc: Ashok Raj <ashok.raj@intel.com>
      Cc: Kanaka Juvva <kanaka.d.juvva@intel.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Vikas Shivappa <vikas.shivappa@intel.com>
      Link: http://lkml.kernel.org/r/1438863163-14083-1-git-send-email-matt@codeblueprint.co.ukSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
      d7a702f0
    • Peter Zijlstra's avatar
      perf/x86/intel: Fix memory leak on hot-plug allocation fail · dbc72b7a
      Peter Zijlstra authored
      We fail to free the shared_regs allocation if the constraint_list
      allocation fails.
      
      Cure this and be more consistent in NULL-ing the pointers after free.
      Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      dbc72b7a
    • Peter Zijlstra's avatar
      perf: Fix PERF_EVENT_IOC_PERIOD migration race · c7999c6f
      Peter Zijlstra authored
      I ran the perf fuzzer, which triggered some WARN()s which are due to
      trying to stop/restart an event on the wrong CPU.
      
      Use the normal IPI pattern to ensure we run the code on the correct CPU.
      Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
      Cc: Vince Weaver <vincent.weaver@maine.edu>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Fixes: bad7192b ("perf: Fix PERF_EVENT_IOC_PERIOD to force-reset the period")
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      c7999c6f
    • Ben Hutchings's avatar
      perf: Fix double-free of the AUX buffer · ee9397a6
      Ben Hutchings authored
      If rb->aux_refcount is decremented to zero before rb->refcount,
      __rb_free_aux() may be called twice resulting in a double free of
      rb->aux_pages.  Fix this by adding a check to __rb_free_aux().
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: stable@vger.kernel.org
      Fixes: 57ffc5ca ("perf: Fix AUX buffer refcounting")
      Link: http://lkml.kernel.org/r/1437953468.12842.17.camel@decadent.org.ukSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
      ee9397a6
  4. 11 Aug, 2015 4 commits