1. 16 6月, 2017 4 次提交
  2. 15 6月, 2017 18 次提交
    • J
      firmware: dmi_scan: Check DMI structure length · a814c359
      Jean Delvare 提交于
      Before accessing DMI data to record it for later, we should ensure
      that the DMI structures are large enough to contain the data in
      question.
      Signed-off-by: NJean Delvare <jdelvare@suse.de>
      Reviewed-by: NMika Westerberg <mika.westerberg@linux.intel.com>
      Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
      Cc: Andy Shevchenko <andy.shevchenko@gmail.com>
      Cc: Linus Walleij <linus.walleij@linaro.org>
      a814c359
    • J
      firmware: dmi: Fix permissions of product_family · e0733e97
      Jean Delvare 提交于
      This is not sensitive information like serial numbers, we can allow
      all users to read it.
      
      Fix odd alignment while we're here.
      Signed-off-by: NJean Delvare <jdelvare@suse.de>
      Fixes: c61872c9 ("firmware: dmi: Add DMI_PRODUCT_FAMILY identification string")
      Reviewed-by: NAndy Shevchenko <andy.shevchenko@gmail.com>
      Reviewed-by: NMika Westerberg <mika.westerberg@linux.intel.com>
      Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
      Cc: Linus Walleij <linus.walleij@linaro.org>
      e0733e97
    • A
      firmware: dmi_scan: Make dmi_walk and dmi_walk_early return real error codes · c9268200
      Andy Lutomirski 提交于
      Currently they return -1 on error, which will confuse callers if
      they try to interpret it as a normal negative error code.
      Signed-off-by: NAndy Lutomirski <luto@kernel.org>
      Signed-off-by: NDarren Hart (VMware) <dvhart@infradead.org>
      Signed-off-by: NJean Delvare <jdelvare@suse.de>
      c9268200
    • J
      firmware: dmi_scan: Look for SMBIOS 3 entry point first · c9aba143
      Jean Delvare 提交于
      Since version 3.0.0 of the SMBIOS specification, there can be
      multiple entry points in memory, pointing to one or two DMI tables.
      If both a 32-bit ("_SM_") entry point and a 64-bit ("_SM3_") entry
      point are present, the specification requires that the latter points
      to a table which is a super-set of the table pointed to by the
      former. Therefore we should give preference to the 64-bit ("_SM3_")
      entry point.
      
      However, currently the code is picking the first valid entry point
      it finds. Per specification, we should look for a 64-bit ("_SM3_")
      entry point first, and if we can't find any, look for a 32-bit
      ("_SM_" or "_DMI_") entry point. Modify the code to do that.
      Signed-off-by: NJean Delvare <jdelvare@suse.de>
      c9aba143
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · a090bd4f
      Linus Torvalds 提交于
      Pull networking fixes from David Miller:
      
       1) The netlink attribute passed in to dev_set_alias() is not
          necessarily NULL terminated, don't use strlcpy() on it. From
          Alexander Potapenko.
      
       2) Fix implementation of atomics in arm64 bpf JIT, from Daniel
          Borkmann.
      
       3) Correct the release of netdevs and driver private data in certain
          circumstances.
      
       4) Sanitize netlink message length properly in decnet, from Mateusz
          Jurczyk.
      
       5) Don't leak kernel data in rtnl_fill_vfinfo() netlink blobs. From
          Yuval Mintz.
      
       6) Hash secret is never initialized in ipv6 ILA translation code, from
          Arnd Bergmann. I guess those clang warnings about unused inline
          functions are useful for something!
      
       7) Fix endian selection in bpf_endian.h, from Daniel Borkmann.
      
       8) Sanitize sockaddr length before dereferncing any fields in AF_UNIX
          and CAIF. From Mateusz Jurczyk.
      
       9) Fix timestamping for GMAC3 chips in stmmac driver, from Mario
          Molitor.
      
      10) Do not leak netdev on dev_alloc_name() errors in mac80211, from
          Johannes Berg.
      
      11) Fix locking in sctp_for_each_endpoint(), from Xin Long.
      
      12) Fix wrong memset size on 32-bit in snmp6, from Christian Perle.
      
      13) Fix use after free in ip_mc_clear_src(), from WANG Cong.
      
      14) Fix regressions caused by ICMP rate limiting changes in 4.11, from
          Jesper Dangaard Brouer.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (91 commits)
        i40e: Fix a sleep-in-atomic bug
        net: don't global ICMP rate limit packets originating from loopback
        net/act_pedit: fix an error code
        net: update undefined ->ndo_change_mtu() comment
        net_sched: move tcf_lock down after gen_replace_estimator()
        caif: Add sockaddr length check before accessing sa_family in connect handler
        qed: fix dump of context data
        qmi_wwan: new Telewell and Sierra device IDs
        net: phy: Fix MDIO_THUNDER dependencies
        netconsole: Remove duplicate "netconsole: " logging prefix
        igmp: acquire pmc lock for ip_mc_clear_src()
        r8152: give the device version
        net: rps: fix uninitialized symbol warning
        mac80211: don't send SMPS action frame in AP mode when not needed
        mac80211/wpa: use constant time memory comparison for MACs
        mac80211: set bss_info data before configuring the channel
        mac80211: remove 5/10 MHz rate code from station MLME
        mac80211: Fix incorrect condition when checking rx timestamp
        mac80211: don't look at the PM bit of BAR frames
        i40e: fix handling of HW ATR eviction
        ...
      a090bd4f
    • L
      Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 · 54ed0f71
      Linus Torvalds 提交于
      Pull crypto fix from Herbert Xu:
       "This fixes a bug on sparc where we may dereference freed stack memory"
      
      * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
        crypto: Work around deallocated stack frame reference gcc bug on sparc.
      54ed0f71
    • L
      Merge tag 'acpi-4.12-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 35e60a6b
      Linus Torvalds 提交于
      Pull ACPI fixes from Rafael Wysocki:
       "These revert an ACPICA commit from the 4.11 cycle that causes problems
        to happen on some systems and add a protection against possible kernel
        crashes due to table reference counter imbalance.
      
        Specifics:
      
         - Revert a 4.11 ACPICA change that made assumptions which are not
           satisfied on some systems and caused the enumeration of resources
           to fail on them (Rafael Wysocki).
      
         - Add a mechanism to prevent tables from being unmapped prematurely
           due to reference counter overflows (Lv Zheng)"
      
      * tag 'acpi-4.12-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        ACPICA: Tables: Mechanism to handle late stage acpi_get_table() imbalance
        Revert "ACPICA: Disassembler: Enhance resource descriptor detection"
      35e60a6b
    • L
      Merge tag 'pm-4.12-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 92091c43
      Linus Torvalds 提交于
      Pull power management fixes from Rafael Wysocki:
       "These revert a recent cpufreq schedutil governor change that turned
        out to be problematic and fix a few minor issues in cpufreq, cpuidle
        and the Exynos devfreq drivers.
      
        Specifics:
      
         - Revert a recent cpufreq schedutil governor change that caused some
           systems to behave undesirably (Rafael Wysocki).
      
         - Fix a cpufreq conservative governor issue introduced during the
           3.10 cycle that prevents it from working as expected in some
           situations (Tomasz Wilczyński).
      
         - Fix an error code path in the generic cpuidle driver for DT-based
           systems (Christophe Jaillet).
      
         - Fix three minor issues in devfreq drivers for Exynos (Arvind Yadav,
           Krzysztof Kozlowski)"
      
      * tag 'pm-4.12-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        cpuidle: dt: Add missing 'of_node_put()'
        cpufreq: conservative: Allow down_threshold to take values from 1 to 10
        Revert "cpufreq: schedutil: Reduce frequencies slower"
        PM / devfreq: exynos-ppmu: Staticize event list
        PM / devfreq: exynos-ppmu: Handle return value of clk_prepare_enable
        PM / devfreq: exynos-nocp: Handle return value of clk_prepare_enable
      92091c43
    • L
      Merge branch 'for-4.12/driver-matching-fix' of... · b45edc2d
      Linus Torvalds 提交于
      Merge branch 'for-4.12/driver-matching-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid
      
      Pull HID fix from Jiri Kosina:
      
       - ifdef-based bandaid for a long-standing issue with HID driver
         matching, avoiding regressions in cases where specific driver is not
         enabled in kernel .config, from Jiri Kosina
      
      * 'for-4.12/driver-matching-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid:
        HID: let generic driver yield control iff specific driver has been enabled
      b45edc2d
    • L
      Merge tag 'media/v4.12-3' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media · 906e0c5b
      Linus Torvalds 提交于
      Pull media fixes from Mauro Carvalho Chehab:
      
       - some build dependency issues at CEC core with randconfigs
      
       - fix an off by one error at vb2
      
       - a race fix at cec core
      
       - driver fixes at tc358743, sir_ir and rainshadow-cec
      
      * tag 'media/v4.12-3' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media:
        [media] media/cec.h: use IS_REACHABLE instead of IS_ENABLED
        [media] cec: race fix: don't return -ENONET in cec_receive()
        [media] sir_ir: infinite loop in interrupt handler
        [media] cec-notifier.h: handle unreachable CONFIG_CEC_CORE
        [media] cec: improve MEDIA_CEC_RC dependencies
        [media] vb2: Fix an off by one error in 'vb2_plane_vaddr'
        [media] rainshadow-cec: Fix missing spin_lock_init()
        [media] tc358743: fix register i2c_rd/wr function fix
      906e0c5b
    • J
      i40e: Fix a sleep-in-atomic bug · 640f93cc
      Jia-Ju Bai 提交于
      The driver may sleep under a spin lock, and the function call path is:
      i40e_ndo_set_vf_port_vlan (acquire the lock by spin_lock_bh)
        i40e_vsi_remove_pvid
          i40e_vlan_stripping_disable
            i40e_aq_update_vsi_params
              i40e_asq_send_command
                mutex_lock --> may sleep
      
      To fixed it, the spin lock is released before "i40e_vsi_remove_pvid", and
      the lock is acquired again after this function.
      Signed-off-by: NJia-Ju Bai <baijiaju1990@163.com>
      Tested-by: NAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      640f93cc
    • R
      Merge branch 'acpica-fixes' · 95229334
      Rafael J. Wysocki 提交于
      * acpica-fixes:
        ACPICA: Tables: Mechanism to handle late stage acpi_get_table() imbalance
        Revert "ACPICA: Disassembler: Enhance resource descriptor detection"
      95229334
    • R
      Merge branches 'pm-cpufreq', 'pm-cpuidle' and 'pm-devfreq' · f63e4f7d
      Rafael J. Wysocki 提交于
      * pm-cpufreq:
        cpufreq: conservative: Allow down_threshold to take values from 1 to 10
        Revert "cpufreq: schedutil: Reduce frequencies slower"
      
      * pm-cpuidle:
        cpuidle: dt: Add missing 'of_node_put()'
      
      * pm-devfreq:
        PM / devfreq: exynos-ppmu: Staticize event list
        PM / devfreq: exynos-ppmu: Handle return value of clk_prepare_enable
        PM / devfreq: exynos-nocp: Handle return value of clk_prepare_enable
      f63e4f7d
    • J
      net: don't global ICMP rate limit packets originating from loopback · 849a44de
      Jesper Dangaard Brouer 提交于
      Florian Weimer seems to have a glibc test-case which requires that
      loopback interfaces does not get ICMP ratelimited.  This was broken by
      commit c0303efe ("net: reduce cycles spend on ICMP replies that
      gets rate limited").
      
      An ICMP response will usually be routed back-out the same incoming
      interface.  Thus, take advantage of this and skip global ICMP
      ratelimit when the incoming device is loopback.  In the unlikely event
      that the outgoing it not loopback, due to strange routing policy
      rules, ICMP rate limiting still works via peer ratelimiting via
      icmpv4_xrlim_allow().  Thus, we should still comply with RFC1812
      (section 4.3.2.8 "Rate Limiting").
      
      This seems to fix the reproducer given by Florian.  While still
      avoiding to perform expensive and unneeded outgoing route lookup for
      rate limited packets (in the non-loopback case).
      
      Fixes: c0303efe ("net: reduce cycles spend on ICMP replies that gets rate limited")
      Reported-by: NFlorian Weimer <fweimer@redhat.com>
      Reported-by: N"H.J. Lu" <hjl.tools@gmail.com>
      Signed-off-by: NJesper Dangaard Brouer <brouer@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      849a44de
    • B
      block: Fix a blk_exit_rl() regression · dc9edc44
      Bart Van Assche 提交于
      Avoid that the following complaint is reported:
      
       BUG: sleeping function called from invalid context at kernel/workqueue.c:2790
       in_atomic(): 1, irqs_disabled(): 0, pid: 41, name: rcuop/3
       1 lock held by rcuop/3/41:
        #0:  (rcu_callback){......}, at: [<ffffffff8111f9a2>] rcu_nocb_kthread+0x282/0x500
       Call Trace:
        dump_stack+0x86/0xcf
        ___might_sleep+0x174/0x260
        __might_sleep+0x4a/0x80
        flush_work+0x7e/0x2e0
        __cancel_work_timer+0x143/0x1c0
        cancel_work_sync+0x10/0x20
        blk_throtl_exit+0x25/0x60
        blkcg_exit_queue+0x35/0x40
        blk_release_queue+0x42/0x130
        kobject_put+0xa9/0x190
      
      This happens since we invoke callbacks that need to block from the
      queue release handler. Fix this by pushing the final release to
      a workqueue.
      Reported-by: NRoss Zwisler <zwisler@gmail.com>
      Fixes: commit b425e504 ("block: Avoid that blk_exit_rl() triggers a use-after-free")
      Signed-off-by: NBart Van Assche <bart.vanassche@sandisk.com>
      Tested-by: NRoss Zwisler <ross.zwisler@linux.intel.com>
      
      Updated changelog
      Signed-off-by: NJens Axboe <axboe@fb.com>
      dc9edc44
    • D
      net/act_pedit: fix an error code · c4f65b09
      Dan Carpenter 提交于
      I'm reviewing static checker warnings where we do ERR_PTR(0), which is
      the same as NULL.  I'm pretty sure we intended to return ERR_PTR(-EINVAL)
      here.  Sometimes these bugs lead to a NULL dereference but I don't
      immediately see that problem here.
      
      Fixes: 71d0ed70 ("net/act_pedit: Support using offset relative to the conventional network headers")
      Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
      Acked-by: NAmir Vadai <amir@vadai.me>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c4f65b09
    • M
      net: update undefined ->ndo_change_mtu() comment · db46a0e1
      Magnus Damm 提交于
      Update ->ndo_change_mtu() callback comment to remove text
      about returning error in case of undefined callback. This
      change makes the comment match the existing code behavior.
      Signed-off-by: NMagnus Damm <damm+renesas@opensource.se>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      db46a0e1
    • W
      net_sched: move tcf_lock down after gen_replace_estimator() · 74030603
      WANG Cong 提交于
      Laura reported a sleep-in-atomic kernel warning inside
      tcf_act_police_init() which calls gen_replace_estimator() with
      spinlock protection.
      
      It is not necessary in this case, we already have RTNL lock here
      so it is enough to protect concurrent writers. For the reader,
      i.e. tcf_act_police(), it needs to make decision based on this
      rate estimator, in the worst case we drop more/less packets than
      necessary while changing the rate in parallel, it is still acceptable.
      Reported-by: NLaura Abbott <labbott@redhat.com>
      Reported-by: NNick Huber <nicholashuber@gmail.com>
      Cc: Jamal Hadi Salim <jhs@mojatatu.com>
      Signed-off-by: NCong Wang <xiyou.wangcong@gmail.com>
      Acked-by: NJamal Hadi Salim <jhs@mojatatu.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      74030603
  3. 14 6月, 2017 10 次提交
  4. 13 6月, 2017 8 次提交