1. 28 May, 2015 4 commits
    • Kalle Valo's avatar
      Merge tag 'iwlwifi-for-kalle-2015-05-28' of... · 38fe44e6
      Kalle Valo authored
      Merge tag 'iwlwifi-for-kalle-2015-05-28' of https://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-fixes
      
      * fix OTP parsing 8260
      * fix powersave handling for 8260
      38fe44e6
    • Arend van Spriel's avatar
      brcmfmac: avoid null pointer access when brcmf_msgbuf_get_pktid() fails · 7d072b40
      Arend van Spriel authored
      The function brcmf_msgbuf_get_pktid() may return a NULL pointer so
      the callers should check the return pointer before accessing it to
      avoid the crash below (see [1]):
      
      brcmfmac: brcmf_msgbuf_get_pktid: Invalid packet id 273 (not in use)
      BUG: unable to handle kernel NULL pointer dereference at 0000000000000080
      IP: [<ffffffff8145b225>] skb_pull+0x5/0x50
      PGD 0
      Oops: 0000 [#1] PREEMPT SMP
      Modules linked in: pci_stub vboxpci(O) vboxnetflt(O) vboxnetadp(O) vboxdrv(O)
       snd_hda_codec_hdmi bnep mousedev hid_generic ushwmon msr ext4 crc16 mbcache
       jbd2 sd_mod uas usb_storage ahci libahci libata scsi_mod xhci_pci xhci_hcd
       usbcore usb_common
      CPU: 0 PID: 1661 Comm: irq/61-brcmf_pc Tainted: G O    4.0.1-MacbookPro-ARCH #1
      Hardware name: Apple Inc. MacBookPro12,1/Mac-E43C1C25D4880AD6,
       BIOS MBP121.88Z.0167.B02.1503241251 03/24/2015
      task: ffff880264203cc0 ti: ffff88025ffe4000 task.ti: ffff88025ffe4000
      RIP: 0010:[<ffffffff8145b225>]  [<ffffffff8145b225>] skb_pull+0x5/0x50
      RSP: 0018:ffff88025ffe7d40  EFLAGS: 00010202
      RAX: 0000000000000000 RBX: ffff88008a33c000 RCX: 0000000000000044
      RDX: 0000000000000000 RSI: 000000000000004a RDI: 0000000000000000
      RBP: ffff88025ffe7da8 R08: 0000000000000096 R09: 000000000000004a
      R10: 0000000000000000 R11: 000000000000048e R12: ffff88025ff14f00
      R13: 0000000000000000 R14: ffff880263b48200 R15: ffff88008a33c000
      FS:  0000000000000000(0000) GS:ffff88026ec00000(0000) knlGS:0000000000000000
      CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      CR2: 0000000000000080 CR3: 000000000180b000 CR4: 00000000003407f0
      Stack:
       ffffffffa06aed74 ffff88025ffe7dc8 ffff880263b48270 ffff880263b48278
       05ea88020000004a 0002ffff81014635 000000001720b2f6 ffff88026ec116c0
       ffff880263b48200 0000000000010000 ffff880263b4ae00 ffff880264203cc0
      Call Trace:
       [<ffffffffa06aed74>] ? brcmf_msgbuf_process_rx+0x404/0x480 [brcmfmac]
       [<ffffffff810cea60>] ? irq_finalize_oneshot.part.30+0xf0/0xf0
       [<ffffffffa06afb55>] brcmf_proto_msgbuf_rx_trigger+0x35/0xf0 [brcmfmac]
       [<ffffffffa06baf2a>] brcmf_pcie_isr_thread_v2+0x8a/0x130 [brcmfmac]
       [<ffffffff810cea80>] irq_thread_fn+0x20/0x50
       [<ffffffff810ceddf>] irq_thread+0x13f/0x170
       [<ffffffff810cebf0>] ? wake_threads_waitq+0x30/0x30
       [<ffffffff810ceca0>] ? irq_thread_dtor+0xb0/0xb0
       [<ffffffff81092a08>] kthread+0xd8/0xf0
       [<ffffffff81092930>] ? kthread_create_on_node+0x1c0/0x1c0
       [<ffffffff8156d898>] ret_from_fork+0x58/0x90
       [<ffffffff81092930>] ? kthread_create_on_node+0x1c0/0x1c0
      Code: 01 83 e2 f7 88 50 01 48 83 c4 08 5b 5d f3 c3 0f 1f 80 00 00 00 00 83 e2
       f7 88 50 01 c3 66 0f 1f 84 00 00 00 00 00 0f 1f
      RIP  [<ffffffff8145b225>] skb_pull+0x5/0x50
       RSP <ffff88025ffe7d40>
      CR2: 0000000000000080
      ---[ end trace b074c0f90e7c997d ]---
      
      [1] http://mid.gmane.org/20150430193259.GA5630@googlemail.com
      
      Cc: <stable@vger.kernel.org> # v3.18, v3.19, v4.0, v4.1
      Reported-by: default avatarMichael Hornung <mhornung.linux@gmail.com>
      Reviewed-by: default avatarHante Meuleman <meuleman@broadcom.com>
      Reviewed-by: default avatarPieter-Paul Giesberts <pieterpg@broadcom.com>
      Signed-off-by: default avatarArend van Spriel <arend@broadcom.com>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      7d072b40
    • Liad Kaufman's avatar
      iwlwifi: nvm: fix otp parsing in 8000 hw family · f115fdfd
      Liad Kaufman authored
      The radio cfg DWORD was taken from the wrong place in the
      8000 HW family, after a line in the code was wrongly changed
      by mistake. This broke several 8260 devices.
      
      Fixes: 5dd9c68a ("iwlwifi: drop support for early versions of 8000")
      Signed-off-by: default avatarLiad Kaufman <liad.kaufman@intel.com>
      Reviewed-by: default avatarJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: default avatarEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      f115fdfd
    • Ilan Peer's avatar
      iwlwifi: pcie: fix tracking of cmd_in_flight · fc8a350d
      Ilan Peer authored
      The cmd_in_flight tracking was introduced to workaround faulty
      power management hardware, by having the driver keep the NIC
      awake as long as there are commands in flight. However, some of
      the code handling this workaround was unconditionally executed,
      which resulted with an inconsistent state where the driver assumed
      that the NIC was awake although it wasn't.
      
      Fix this by renaming 'cmd_in_flight' to 'cmd_hold_nic_awake' and
      handling the NIC requested awake state only for hardwares for
      which the workaround is needed.
      Signed-off-by: default avatarIlan Peer <ilan.peer@intel.com>
      Signed-off-by: default avatarEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      fc8a350d
  2. 22 May, 2015 1 commit
  3. 21 May, 2015 6 commits
    • Eliad Peller's avatar
      iwlwifi: mvm: avoid use-after-free on iwl_mvm_d0i3_enable_tx() · 29220891
      Eliad Peller authored
      qos_seq points (to a struct) inside the command response data.
      
      Make sure to free the response only after qos_seq is not
      needed anymore.
      Reported-by: default avatarHeng Luo <heng.luo@intel.com>
      Signed-off-by: default avatarEliad Peller <eliadx.peller@intel.com>
      Signed-off-by: default avatarEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      29220891
    • Luciano Coelho's avatar
      iwlwifi: mvm: clean net-detect info if device was reset during suspend · a500e469
      Luciano Coelho authored
      If the device is reset during suspend with net-detect enabled, we
      leave the net-detect information dangling and this causes the next
      suspend to fail with a warning:
      
      [21795.351010] WARNING: at /root/iwlwifi/iwlwifi-stack-dev/drivers/net/wireless/iwlwifi/mvm/d3.c:989 __iwl_mvm_suspend.isra.6+0x2be/0x460 [iwlmvm]()
      [21795.353253] Modules linked in: iwlmvm(O) iwlwifi(O) mac80211(O) cfg80211(O) compat(O) [...]
      [21795.366168] CPU: 1 PID: 3645 Comm: bash Tainted: G           O 3.10.29-dev #1
      [21795.368785] Hardware name: Dell Inc. Latitude E6430/0CPWYR, BIOS A09 12/13/2012
      [21795.371441]  f8ec6748 f8ec6748 e51f3ce8 c168aa62 e51f3d10 c103a824 c1871238 f8ec6748
      [21795.374228]  000003dd f8eb982e f8eb982e 00000000 c3408ed4 c41edbbc e51f3d20 c103a862
      [21795.377006]  00000009 00000000 e51f3da8 f8eb982e c41ee3dc 00000004 e7970000 e51f3d74
      [21795.379792] Call Trace:
      [21795.382461]  [<c168aa62>] dump_stack+0x16/0x18
      [21795.385133]  [<c103a824>] warn_slowpath_common+0x64/0x80
      [21795.387803]  [<f8eb982e>] ? __iwl_mvm_suspend.isra.6+0x2be/0x460 [iwlmvm]
      [21795.390485]  [<f8eb982e>] ? __iwl_mvm_suspend.isra.6+0x2be/0x460 [iwlmvm]
      [21795.393124]  [<c103a862>] warn_slowpath_null+0x22/0x30
      [21795.395787]  [<f8eb982e>] __iwl_mvm_suspend.isra.6+0x2be/0x460 [iwlmvm]
      [21795.398464]  [<f8eb9d7c>] iwl_mvm_suspend+0xec/0x140 [iwlmvm]
      [21795.401127]  [<c104be11>] ? del_timer_sync+0xa1/0xc0
      [21795.403800]  [<f8d4107e>] __ieee80211_suspend+0x1de/0xff0 [mac80211]
      [21795.406459]  [<c168e43d>] ? mutex_lock_nested+0x25d/0x350
      [21795.409084]  [<c1586b64>] ? rtnl_lock+0x14/0x20
      [21795.411685]  [<f8cf0076>] ieee80211_suspend+0x16/0x20 [mac80211]
      [21795.414318]  [<f8c4e014>] wiphy_suspend+0x74/0x710 [cfg80211]
      [21795.416916]  [<c141e612>] __device_suspend+0x1e2/0x220
      [21795.419521]  [<f8c4dfa0>] ? addresses_show+0xa0/0xa0 [cfg80211]
      [21795.422097]  [<c141f997>] dpm_suspend+0x67/0x210
      [21795.424661]  [<c141fd6f>] dpm_suspend_start+0x4f/0x60
      [21795.427219]  [<c108d8e0>] suspend_devices_and_enter+0x60/0x480
      [21795.429768]  [<c168646a>] ? printk+0x4d/0x4f
      [21795.432295]  [<c108de76>] pm_suspend+0x176/0x210
      [21795.434830]  [<c108ca5d>] state_store+0x5d/0xb0
      [21795.437410]  [<c108ca00>] ? wakeup_count_show+0x50/0x50
      [21795.439961]  [<c13208db>] kobj_attr_store+0x1b/0x30
      [21795.442514]  [<c11e3a4b>] sysfs_write_file+0xab/0x100
      [21795.445088]  [<c11e39a0>] ? sysfs_poll+0xa0/0xa0
      [21795.447659]  [<c1179655>] vfs_write+0xa5/0x1c0
      [21795.450212]  [<c1179af7>] SyS_write+0x57/0xa0
      [21795.452699]  [<c1699ec1>] sysenter_do_call+0x12/0x32
      [21795.455146] ---[ end trace faf5321baba2bfdb ]---
      
      To fix this, call the iwl_mvm_free_nd() function in case of any error
      during resume.  Additionally, rename the "out_unlock" label to err to
      make it clearer that it's only called in error conditions.
      
      Cc: stable@vger.kernel.org [3.19+]
      Signed-off-by: default avatarLuciano Coelho <luciano.coelho@intel.com>
      Signed-off-by: default avatarEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      a500e469
    • Luciano Coelho's avatar
      iwlwifi: mvm: take the UCODE_DOWN reference when resuming · dcfc7fb1
      Luciano Coelho authored
      The __iwl_mvm_resume() function always returns 1, which causes
      mac80211 to do a reconfig with IEEE80211_RECONFIG_TYPE_RESTART.  This
      type of reconfig calls iwl_mvm_restart_complete(), where we unref the
      IWL_MVM_REF_UCODE_DOWN, so we should always take the reference in this
      case.
      
      This prevents this kind of warning from happening:
      
      [40026.103025] WARNING: at /root/iwlwifi/iwlwifi-stack-dev/drivers/net/wireless/iwlwifi/mvm/mac80211.c:236 iwl_mvm_unref+0xc9/0xd0 [iwlmvm]()
      [40026.105145] Modules linked in: iwlmvm(O) iwlwifi(O) mac80211(O) cfg80211(O) compat(O) ctr ccm arc4 autofs4 snd_hda_codec_hdmi snd_hda_codec_idt joydev coretemp kvm_intel kvm aesni_intel ablk_helper cryptd lrw aes_i586 snd_hda_intel xts snd_hda_codec gf128mul snd_hwdep snd_pcm snd_seq_midi dell_wmi snd_rawmidi sparse_keymap snd_seq_midi_event snd_seq uvcvideo dell_laptop videobuf2_core dcdbas microcode videodev psmouse snd_timer videobuf2_vmalloc videobuf2_memops serio_raw snd_seq_device btusb i915 snd bluetooth lpc_ich drm_kms_helper soundcore snd_page_alloc drm i2c_algo_bit wmi parport_pc ppdev video binfmt_misc rpcsec_gss_krb5 nfsd mac_hid nfs_acl nfsv4 auth_rpcgss nfs fscache lockd sunrpc msdos lp parport sdhci_pci sdhci ahci libahci e1000e mmc_core ptp pps_core [last unloaded: compat]
      [40026.117640] CPU: 2 PID: 3827 Comm: bash Tainted: G        W  O 3.10.29-dev #1
      [40026.120216] Hardware name: Dell Inc. Latitude E6430/0CPWYR, BIOS A09 12/13/2012
      [40026.122815]  f8effd18 f8effd18 e740fd18 c168aa62 e740fd40 c103a824 c1871238 f8effd18
      [40026.125527]  000000ec f8ec79c9 f8ec79c9 d5d29ba4 d5d2a20c 00000000 e740fd50 c103a862
      [40026.128209]  00000009 00000000 e740fd7c f8ec79c9 f1c591c4 00000400 00000000 f8efb490
      [40026.130886] Call Trace:
      [40026.133506]  [<c168aa62>] dump_stack+0x16/0x18
      [40026.136115]  [<c103a824>] warn_slowpath_common+0x64/0x80
      [40026.138727]  [<f8ec79c9>] ? iwl_mvm_unref+0xc9/0xd0 [iwlmvm]
      [40026.141319]  [<f8ec79c9>] ? iwl_mvm_unref+0xc9/0xd0 [iwlmvm]
      [40026.143881]  [<c103a862>] warn_slowpath_null+0x22/0x30
      [40026.146453]  [<f8ec79c9>] iwl_mvm_unref+0xc9/0xd0 [iwlmvm]
      [40026.149030]  [<f8ec7a4d>] iwl_mvm_mac_reconfig_complete+0x7d/0x210 [iwlmvm]
      [40026.151645]  [<f8b74b20>] ? ftrace_raw_event_drv_reconfig_complete+0xc0/0xe0 [mac80211]
      [40026.154291]  [<f8b6769e>] ieee80211_reconfig+0x28e/0x2620 [mac80211]
      [40026.156920]  [<c10ef0ea>] ? ring_buffer_unlock_commit+0xba/0x100
      [40026.159585]  [<f8b4a04d>] ieee80211_resume+0x6d/0x80 [mac80211]
      [40026.162206]  [<f8a79722>] wiphy_resume+0x72/0x260 [cfg80211]
      [40026.164799]  [<c141e2e7>] ? device_resume+0x57/0x150
      [40026.167425]  [<f8a796b0>] ? wiphy_suspend+0x710/0x710 [cfg80211]
      [40026.170075]  [<c141e26e>] dpm_run_callback+0x2e/0x50
      [40026.172695]  [<c141e321>] device_resume+0x91/0x150
      [40026.175334]  [<c141f636>] dpm_resume+0xf6/0x200
      [40026.177922]  [<c141f920>] dpm_resume_end+0x10/0x20
      [40026.180489]  [<c108d9f7>] suspend_devices_and_enter+0x177/0x480
      [40026.183037]  [<c168646a>] ? printk+0x4d/0x4f
      [40026.185559]  [<c108de76>] pm_suspend+0x176/0x210
      [40026.188065]  [<c108ca5d>] state_store+0x5d/0xb0
      [40026.190581]  [<c108ca00>] ? wakeup_count_show+0x50/0x50
      [40026.193052]  [<c13208db>] kobj_attr_store+0x1b/0x30
      [40026.195608]  [<c11e3a4b>] sysfs_write_file+0xab/0x100
      [40026.198055]  [<c11e39a0>] ? sysfs_poll+0xa0/0xa0
      [40026.200469]  [<c1179655>] vfs_write+0xa5/0x1c0
      [40026.202893]  [<c1179af7>] SyS_write+0x57/0xa0
      [40026.205245]  [<c1699ec1>] sysenter_do_call+0x12/0x32
      [40026.207619] ---[ end trace db1d5a72a0381b0a ]---
      Signed-off-by: default avatarLuciano Coelho <luciano.coelho@intel.com>
      Reviewed-by: default avatarEliadX Peller <eliad@wizery.com>
      Reviewed-by: default avatarJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: default avatarEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      dcfc7fb1
    • Emmanuel Grumbach's avatar
      iwlwifi: mvm: BT Coex - duplicate the command if sent ASYNC · 165b3c4f
      Emmanuel Grumbach authored
      There are buses that can't handle ASYNC command without
      copying them. Duplicate the host command instead.
      Signed-off-by: default avatarEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      165b3c4f
    • Liad Kaufman's avatar
      iwlwifi: nvm: force mac from otp in case nvm mac is reserved · 18f84673
      Liad Kaufman authored
      Take the MAC address from the OTP even if one is present in
      the NVM, if that MAC address happens to be a reserved one.
      Signed-off-by: default avatarLiad Kaufman <liad.kaufman@intel.com>
      Signed-off-by: default avatarEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      18f84673
    • Haim Dreyfuss's avatar
      iwlwifi: mvm: Free fw_status after use to avoid memory leak · 2fc863a5
      Haim Dreyfuss authored
      fw_status is the only pointer pointing to a block of memory
      allocated above and should be freed after use.
      Note: this come from Klockwork static analyzer.
      
      Cc: stable@vger.kernel.org [3.19+]
      Fixes: 2021a89d ("iwlwifi: mvm: treat netdetect wake up separately")
      Signed-off-by: default avatarHaim Dreyfuss <haim.dreyfuss@intel.com>
      Signed-off-by: default avatarEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      2fc863a5
  4. 20 May, 2015 1 commit
  5. 15 May, 2015 3 commits
  6. 10 May, 2015 1 commit
  7. 03 May, 2015 2 commits
  8. 28 Apr, 2015 7 commits
  9. 27 Apr, 2015 15 commits
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · 2decb268
      Linus Torvalds authored
      Pull networking fixes from David Miller:
      
       1) mlx4 doesn't check fully for supported valid RSS hash function, fix
          from Amir Vadai
      
       2) Off by one in ibmveth_change_mtu(), from David Gibson
      
       3) Prevent altera chip from reporting false error interrupts in some
          circumstances, from Chee Nouk Phoon
      
       4) Get rid of that stupid endless loop trying to allocate a FIN packet
          in TCP, and in the process kill deadlocks.  From Eric Dumazet
      
       5) Fix get_rps_cpus() crash due to wrong invalid-cpu value, also from
          Eric Dumazet
      
       6) Fix two bugs in async rhashtable resizing, from Thomas Graf
      
       7) Fix topology server listener socket namespace bug in TIPC, from Ying
          Xue
      
       8) Add some missing HAS_DMA kconfig dependencies, from Geert
          Uytterhoeven
      
       9) bgmac driver intends to force re-polling but does so by returning
          the wrong value from it's ->poll() handler.  Fix from Rafał Miłecki
      
      10) When the creater of an rhashtable configures a max size for it,
          don't bark in the logs and drop insertions when that is exceeded.
          Fix from Johannes Berg
      
      11) Recover from out of order packets in ppp mppe properly, from Sylvain
          Rochet
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (41 commits)
        bnx2x: really disable TPA if 'disable_tpa' option is set
        net:treewide: Fix typo in drivers/net
        net/mlx4_en: Prevent setting invalid RSS hash function
        mdio-mux-gpio: use new gpiod_get_array and gpiod_put_array functions
        netfilter; Add some missing default cases to switch statements in nft_reject.
        ppp: mppe: discard late packet in stateless mode
        ppp: mppe: sanity error path rework
        net/bonding: Make DRV macros private
        net: rfs: fix crash in get_rps_cpus()
        altera tse: add support for fixed-links.
        pxa168: fix double deallocation of managed resources
        net: fix crash in build_skb()
        net: eth: altera: Resolve false errors from MSGDMA to TSE
        ehea: Fix memory hook reference counting crashes
        net/tg3: Release IRQs on permanent error
        net: mdio-gpio: support access that may sleep
        inet: fix possible panic in reqsk_queue_unlink()
        rhashtable: don't attempt to grow when at max_size
        bgmac: fix requests for extra polling calls from NAPI
        tcp: avoid looping in tcp_send_fin()
        ...
      2decb268
    • Michal Schmidt's avatar
      bnx2x: really disable TPA if 'disable_tpa' option is set · 22a8f237
      Michal Schmidt authored
      bnx2x's 'disable_tpa=1' module option is not respected properly and TPA
      (transparent packet aggregation) remains enabled. Even though the
      module option causes LRO to be disabled, TPA is enabled in GRO mode.
      
      Additionally, disabling GRO via ethtool then has no effect. One can
      still observe tpa_* statistics increase and large packets being received
      in tcpdump.
      
      The bug was an unintended consequence of commit aebf6244 "bnx2x: Be
      more forgiving toward SW GRO".
      
      Fix it by following the bp->disable_tpa flag when initializing fp's.
      Signed-off-by: default avatarMichal Schmidt <mschmidt@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      22a8f237
    • Masanari Iida's avatar
      net:treewide: Fix typo in drivers/net · 94435f76
      Masanari Iida authored
      This patch fix spelling typo in printk.
      Signed-off-by: default avatarMasanari Iida <standby24x7@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      94435f76
    • Amir Vadai's avatar
      net/mlx4_en: Prevent setting invalid RSS hash function · b3706909
      Amir Vadai authored
      mlx4_en_check_rxfh_func() was checking for hardware support before
      setting a known RSS hash function, but didn't do any check before
      setting unknown RSS hash function. Need to make it fail on such values.
      In this occasion, moved the actual setting of the new value from the
      check function into mlx4_en_set_rxfh().
      
      Fixes: 947cbb0a ("net/mlx4_en: Support for configurable RSS hash function")
      Signed-off-by: default avatarAmir Vadai <amirv@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b3706909
    • Rojhalat Ibrahim's avatar
      mdio-mux-gpio: use new gpiod_get_array and gpiod_put_array functions · 33df10e2
      Rojhalat Ibrahim authored
      Use the new gpiod_get_array and gpiod_put_array functions
      (added to mainline in the v4.1 merge window) for obtaining and
      disposing of GPIO descriptors.
      
      Cc: David Miller <davem@davemloft.net>
      Cc: Linus Walleij <linus.walleij@linaro.org>
      Signed-off-by: default avatarRojhalat Ibrahim <imr@rtschenk.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      33df10e2
    • David S. Miller's avatar
      netfilter; Add some missing default cases to switch statements in nft_reject. · 129d23a5
      David S. Miller authored
      This fixes:
      
      ====================
      net/netfilter/nft_reject.c: In function ‘nft_reject_dump’:
      net/netfilter/nft_reject.c:61:2: warning: enumeration value ‘NFT_REJECT_TCP_RST’ not handled in switch [-Wswitch]
        switch (priv->type) {
        ^
      net/netfilter/nft_reject.c:61:2: warning: enumeration value ‘NFT_REJECT_ICMPX_UNREACH’ not handled in switch [-Wswi\
      tch]
      net/netfilter/nft_reject_inet.c: In function ‘nft_reject_inet_dump’:
      net/netfilter/nft_reject_inet.c:105:2: warning: enumeration value ‘NFT_REJECT_TCP_RST’ not handled in switch [-Wswi\
      tch]
        switch (priv->type) {
        ^
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      129d23a5
    • David S. Miller's avatar
      Merge branch 'ppp_mppe_desync' · 8e9b29cc
      David S. Miller authored
      Sylvain Rochet says:
      
      ====================
      ppp: mppe: fixes MPPE desync on links which don't guarantee packet ordering
      
      I am currently having an issue with PPP over L2TP (UDP) and MPPE in
      stateless mode (default mode), UDP does not guarantee packet ordering so
      we might get out of order packet. MPPE needs to be continuously synched
      so we should drop late UDP packet.
      
      I added a printk on the number of time we rekeyed in MPPE decompressor,
      this is what we currently have if we receive a slightly out of order UDP
      packet:
      
      [1731001.049206] mppe_decompress[1]: ccount 1559
      [1731001.049216] mppe_decompress[1]: rekeyed 1 times
      
      [1731001.049228] mppe_decompress[1]: ccount 1560
      [1731001.049232] mppe_decompress[1]: rekeyed 1 times
      
      [1731001.050170] mppe_decompress[1]: ccount 1562
      [1731001.050182] mppe_decompress[1]: rekeyed 2 times
      
      [1731001.050191] mppe_decompress[1]: ccount 1561
      [1731001.062576] mppe_decompress[1]: rekeyed 4095 times
                                                   ^^^^
      This is obviously wrong, we missed packet 1561 and we already rekeyed 2
      times for 1562 we previously received, we can't recover the decryption
      key we need for 1561, we should drop it instead of rekeying 4095 times.
      
      This patch series drop any packet with are not within the 4096/2 forward
      window.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8e9b29cc
    • Sylvain Rochet's avatar
      ppp: mppe: discard late packet in stateless mode · 03654763
      Sylvain Rochet authored
      When PPP is used over a link which does not guarantee packet ordering,
      we might get late MPPE packets. This is a problem because MPPE must be
      kept synchronized and the current implementation does not drop them and
      rekey 4095 times instead of 0, which is wrong.
      
      In order to prevent rekeying about a whole count space times (~ 4095
      times), drop packets which are not within the forward 4096/2 window and
      increase sanity error counter.
      Signed-off-by: default avatarSylvain Rochet <sylvain.rochet@finsecur.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      03654763
    • Sylvain Rochet's avatar
      ppp: mppe: sanity error path rework · 32530189
      Sylvain Rochet authored
      We are going to need sanity error path a little further, rework to be
      able to use the sanity error path anywhere in decompressor.
      Signed-off-by: default avatarSylvain Rochet <sylvain.rochet@finsecur.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      32530189
    • Matan Barak's avatar
      net/bonding: Make DRV macros private · 73b5a6f2
      Matan Barak authored
      The bonding modules currently defines four macros with
      general names that pollute the global namespace:
      DRV_VERSION
      DRV_RELDATE
      DRV_NAME
      DRV_DESCRIPTION
      
      Fixing that by defining a private bonding_priv.h
      header files which includes those defines.
      Signed-off-by: default avatarMatan Barak <matanb@mellanox.com>
      Signed-off-by: default avatarOr Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      73b5a6f2
    • Linus Torvalds's avatar
      Linux 4.1-rc1 · b787f68c
      Linus Torvalds authored
      b787f68c
    • Andy Lutomirski's avatar
      x86_64, asm: Work around AMD SYSRET SS descriptor attribute issue · 61f01dd9
      Andy Lutomirski authored
      AMD CPUs don't reinitialize the SS descriptor on SYSRET, so SYSRET with
      SS == 0 results in an invalid usermode state in which SS is apparently
      equal to __USER_DS but causes #SS if used.
      
      Work around the issue by setting SS to __KERNEL_DS __switch_to, thus
      ensuring that SYSRET never happens with SS set to NULL.
      
      This was exposed by a recent vDSO cleanup.
      
      Fixes: e7d6eefa x86/vdso32/syscall.S: Do not load __USER32_DS to %ss
      Signed-off-by: default avatarAndy Lutomirski <luto@kernel.org>
      Cc: Peter Anvin <hpa@zytor.com>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Denys Vlasenko <vda.linux@googlemail.com>
      Cc: Brian Gerst <brgerst@gmail.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      61f01dd9
    • Linus Torvalds's avatar
      Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux · 1190944f
      Linus Torvalds authored
      Pull intel drm fixes from Dave Airlie.
      
      * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
        drm/i915: vlv: fix save/restore of GFX_MAX_REQ_COUNT reg
        drm/i915: Workaround to avoid lite restore with HEAD==TAIL
        drm/i915: cope with large i2c transfers
      1190944f
    • Linus Torvalds's avatar
      Merge git://git.infradead.org/intel-iommu · 9f86262d
      Linus Torvalds authored
      Pull intel iommu updates from David Woodhouse:
       "This lays a little of the groundwork for upcoming Shared Virtual
        Memory support — fixing some bogus #defines for capability bits and
        adding the new ones, and starting to use the new wider page tables
        where we can, in anticipation of actually filling in the new fields
        therein.
      
        It also allows graphics devices to be assigned to VM guests again.
        This got broken in 3.17 by disallowing assignment of RMRR-afflicted
        devices.  Like USB, we do understand why there's an RMRR for graphics
        devices — and unlike USB, it's actually sane.  So we can make an
        exception for graphics devices, just as we do USB controllers.
      
        Finally, tone down the warning about the X2APIC_OPT_OUT bit, due to
        persistent requests.  X2APIC_OPT_OUT was added to the spec as a nasty
        hack to allow broken BIOSes to forbid us from using X2APIC when they
        do stupid and invasive things and would break if we did.
      
        Someone noticed that since Windows doesn't have full IOMMU support for
        DMA protection, setting the X2APIC_OPT_OUT bit made Windows avoid
        initialising the IOMMU on the graphics unit altogether.
      
        This means that it would be available for use in "driver mode", where
        the IOMMU registers are made available through a BAR of the graphics
        device and the graphics driver can do SVM all for itself.
      
        So they started setting the X2APIC_OPT_OUT bit on *all* platforms with
        SVM capabilities.  And even the platforms which *might*, if the
        planets had been aligned correctly, possibly have had SVM capability
        but which in practice actually don't"
      
      * git://git.infradead.org/intel-iommu:
        iommu/vt-d: support extended root and context entries
        iommu/vt-d: Add new extended capabilities from v2.3 VT-d specification
        iommu/vt-d: Allow RMRR on graphics devices too
        iommu/vt-d: Print x2apic opt out info instead of printing a warning
        iommu/vt-d: kill bogus ecap_niotlb_iunits()
      9f86262d
    • Linus Torvalds's avatar
      Merge branch 'i2c/for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux · 85f2901b
      Linus Torvalds authored
      Pull i2c fixes from Wolfram Sang:
       "This has a mixture of merge window cleanups and bugfixes"
      
      * 'i2c/for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
        i2c: st: add include for pinctrl
        i2c: mux: use proper dev when removing "channel-X" symlinks
        i2c: digicolor: remove duplicate include
        i2c: Mark adapter devices with pm_runtime_no_callbacks
        i2c: pca-platform: fix broken email address
        i2c: mxs: fix broken email address
        i2c: rk3x: report number of messages transmitted
      85f2901b