1. 27 Jun, 2013 9 commits
    • Paul Moore's avatar
      netlabel: improve domain mapping validation · 7718fa70
      Paul Moore authored
      [ Upstream commit 6b21e1b7 ]
      
      The net/netlabel/netlabel_domainhash.c:netlbl_domhsh_add() function
      does not properly validate new domain hash entries resulting in
      potential problems when an administrator attempts to add an invalid
      entry.  One such problem, as reported by Vlad Halilov, is a kernel
      BUG (found in netlabel_domainhash.c:netlbl_domhsh_audit_add()) when
      adding an IPv6 outbound mapping with a CIPSO configuration.
      
      This patch corrects this problem by adding the necessary validation
      code to netlbl_domhsh_add() via the newly created
      netlbl_domhsh_validate() function.
      
      Ideally this patch should also be pushed to the currently active
      -stable trees.
      Reported-by: default avatarVlad Halilov <vlad.halilov@gmail.com>
      Signed-off-by: default avatarPaul Moore <pmoore@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      7718fa70
    • Eric Dumazet's avatar
      ipv6: fix possible crashes in ip6_cork_release() · 32d704a1
      Eric Dumazet authored
      [ Upstream commit 284041ef ]
      
      commit 0178b695 ("ipv6: Copy cork options in ip6_append_data")
      added some code duplication and bad error recovery, leading to potential
      crash in ip6_cork_release() as kfree() could be called with garbage.
      
      use kzalloc() to make sure this wont happen.
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Cc: Herbert Xu <herbert@gondor.apana.org.au>
      Cc: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>
      Cc: Neal Cardwell <ncardwell@google.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      32d704a1
    • Wei Yongjun's avatar
      gianfar: add missing iounmap() on error in gianfar_ptp_probe() · c7663194
      Wei Yongjun authored
      [ Upstream commit e5f5e380 ]
      
      Add the missing iounmap() before return from gianfar_ptp_probe()
      in the error handling case.
      Signed-off-by: default avatarWei Yongjun <yongjun_wei@trendmicro.com.cn>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      c7663194
    • Eric Dumazet's avatar
      tcp: fix tcp_md5_hash_skb_data() · d193887e
      Eric Dumazet authored
      [ Upstream commit 54d27fcb ]
      
      TCP md5 communications fail [1] for some devices, because sg/crypto code
      assume page offsets are below PAGE_SIZE.
      
      This was discovered using mlx4 driver [2], but I suspect loopback
      might trigger the same bug now we use order-3 pages in tcp_sendmsg()
      
      [1] Failure is giving following messages.
      
      huh, entered softirq 3 NET_RX ffffffff806ad230 preempt_count 00000100,
      exited with 00000101?
      
      [2] mlx4 driver uses order-2 pages to allocate RX frags
      Reported-by: default avatarMatt Schnall <mischnal@google.com>
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Cc: Bernhard Beck <bbeck@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      d193887e
    • Zhanghaoyu (A)'s avatar
      KVM: x86: remove vcpu's CPL check in host-invoked XCR set · e6e045d5
      Zhanghaoyu (A) authored
      commit 764bcbc5 upstream.
      
      __kvm_set_xcr function does the CPL check when set xcr. __kvm_set_xcr is
      called in two flows, one is invoked by guest, call stack shown as below,
      
        handle_xsetbv(or xsetbv_interception)
          kvm_set_xcr
            __kvm_set_xcr
      
      the other one is invoked by host, for example during system reset:
      
        kvm_arch_vcpu_ioctl
          kvm_vcpu_ioctl_x86_set_xcrs
            __kvm_set_xcr
      
      The former does need the CPL check, but the latter does not.
      Signed-off-by: default avatarZhang Haoyu <haoyu.zhang@huawei.com>
      [Tweaks to commit message. - Paolo]
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      e6e045d5
    • Chris Metcalf's avatar
      tilepro: work around module link error with gcc 4.7 · 68447fe9
      Chris Metcalf authored
      commit 3cb3f839 upstream.
      
      gcc 4.7.x is emitting calls to __ffsdi2 where previously
      it used to inline the appropriate ctz instructions.
      While this needs to be fixed in gcc, it's also easy to avoid
      having it cause build failures when building with those
      compilers by exporting __ffsdi2 to modules.
      Signed-off-by: default avatarChris Metcalf <cmetcalf@tilera.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      68447fe9
    • Lai Jiangshan's avatar
      clk: remove notifier from list before freeing it · f86571e8
      Lai Jiangshan authored
      commit 72b5322f upstream.
      
      The @cn is stay in @clk_notifier_list after it is freed, it cause
      memory corruption.
      
      Example, if @clk is registered(first), unregistered(first),
      registered(second), unregistered(second).
      
      The freed @cn will be used when @clk is registered(second),
      and the bug will be happened when @clk is unregistered(second):
      
      [  517.040000] clk_notif_dbg clk_notif_dbg.1: clk_notifier_unregister()
      [  517.040000] Unable to handle kernel paging request at virtual address 00df3008
      [  517.050000] pgd = ed858000
      [  517.050000] [00df3008] *pgd=00000000
      [  517.060000] Internal error: Oops: 5 [#1] PREEMPT SMP ARM
      [  517.060000] Modules linked in: clk_notif_dbg(O-) [last unloaded: clk_notif_dbg]
      [  517.060000] CPU: 1 PID: 499 Comm: modprobe Tainted: G           O 3.10.0-rc3-00119-ga93cb29a-dirty #85
      [  517.060000] task: ee1e0180 ti: ee3e6000 task.ti: ee3e6000
      [  517.060000] PC is at srcu_readers_seq_idx+0x48/0x84
      [  517.060000] LR is at srcu_readers_seq_idx+0x60/0x84
      [  517.060000] pc : [<c0052720>]    lr : [<c0052738>]    psr: 80070013
      [  517.060000] sp : ee3e7d48  ip : 00000000  fp : ee3e7d6c
      [  517.060000] r10: 00000000  r9 : ee3e6000  r8 : 00000000
      [  517.060000] r7 : ed84fe4c  r6 : c068ec90  r5 : c068e430  r4 : 00000000
      [  517.060000] r3 : 00df3000  r2 : 00000000  r1 : 00000002  r0 : 00000000
      [  517.060000] Flags: Nzcv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment user
      [  517.060000] Control: 18c5387d  Table: 2d85804a  DAC: 00000015
      [  517.060000] Process modprobe (pid: 499, stack limit = 0xee3e6238)
      [  517.060000] Stack: (0xee3e7d48 to 0xee3e8000)
      ....
      [  517.060000] [<c0052720>] (srcu_readers_seq_idx+0x48/0x84) from [<c0052790>] (try_check_zero+0x34/0xfc)
      [  517.060000] [<c0052790>] (try_check_zero+0x34/0xfc) from [<c00528b0>] (srcu_advance_batches+0x58/0x114)
      [  517.060000] [<c00528b0>] (srcu_advance_batches+0x58/0x114) from [<c0052c30>] (__synchronize_srcu+0x114/0x1ac)
      [  517.060000] [<c0052c30>] (__synchronize_srcu+0x114/0x1ac) from [<c0052d14>] (synchronize_srcu+0x2c/0x34)
      [  517.060000] [<c0052d14>] (synchronize_srcu+0x2c/0x34) from [<c0053a08>] (srcu_notifier_chain_unregister+0x68/0x74)
      [  517.060000] [<c0053a08>] (srcu_notifier_chain_unregister+0x68/0x74) from [<c0375a78>] (clk_notifier_unregister+0x7c/0xc0)
      [  517.060000] [<c0375a78>] (clk_notifier_unregister+0x7c/0xc0) from [<bf008034>] (clk_notif_dbg_remove+0x34/0x9c [clk_notif_dbg])
      [  517.060000] [<bf008034>] (clk_notif_dbg_remove+0x34/0x9c [clk_notif_dbg]) from [<c02bb974>] (platform_drv_remove+0x24/0x28)
      [  517.060000] [<c02bb974>] (platform_drv_remove+0x24/0x28) from [<c02b9bf8>] (__device_release_driver+0x8c/0xd4)
      [  517.060000] [<c02b9bf8>] (__device_release_driver+0x8c/0xd4) from [<c02ba680>] (driver_detach+0x9c/0xc4)
      [  517.060000] [<c02ba680>] (driver_detach+0x9c/0xc4) from [<c02b99c4>] (bus_remove_driver+0xcc/0xfc)
      [  517.060000] [<c02b99c4>] (bus_remove_driver+0xcc/0xfc) from [<c02bace4>] (driver_unregister+0x54/0x78)
      [  517.060000] [<c02bace4>] (driver_unregister+0x54/0x78) from [<c02bbb44>] (platform_driver_unregister+0x1c/0x20)
      [  517.060000] [<c02bbb44>] (platform_driver_unregister+0x1c/0x20) from [<bf0081f8>] (clk_notif_dbg_driver_exit+0x14/0x1c [clk_notif_dbg])
      [  517.060000] [<bf0081f8>] (clk_notif_dbg_driver_exit+0x14/0x1c [clk_notif_dbg]) from [<c00835e4>] (SyS_delete_module+0x200/0x28c)
      [  517.060000] [<c00835e4>] (SyS_delete_module+0x200/0x28c) from [<c000edc0>] (ret_fast_syscall+0x0/0x48)
      [  517.060000] Code: e5973004 e7911102 e0833001 e2881002 (e7933101)
      Reported-by: default avatarSören Brinkmann <soren.brinkmann@xilinx.com>
      Signed-off-by: default avatarLai Jiangshan <laijs@cn.fujitsu.com>
      Tested-by: default avatarSören Brinkmann <soren.brinkmann@xilinx.com>
      Signed-off-by: default avatarMike Turquette <mturquette@linaro.org>
      [mturquette@linaro.org: shortened $SUBJECT]
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      f86571e8
    • Clemens Ladisch's avatar
      ALSA: usb-audio: work around Android accessory firmware bug · e02a738d
      Clemens Ladisch authored
      commit 342cda29 upstream.
      
      When the Android firmware enables the audio interfaces in accessory
      mode, it always declares in the control interface's baInterfaceNr array
      that interfaces 0 and 1 belong to the audio function.  However, the
      accessory interface itself, if also enabled, already is at index 0 and
      shifts the actual audio interface numbers to 1 and 2, which prevents the
      PCM streaming interface from being seen by the host driver.
      
      To get the PCM interface interface to work, detect when the descriptors
      point to the (for this driver useless) accessory interface, and redirect
      to the correct one.
      Reported-by: default avatarJeremy Rosen <jeremy.rosen@openwide.fr>
      Tested-by: default avatarJeremy Rosen <jeremy.rosen@openwide.fr>
      Signed-off-by: default avatarClemens Ladisch <clemens@ladisch.de>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      e02a738d
    • Takashi Iwai's avatar
      ALSA: usb-audio: Fix invalid volume resolution for Logitech HD Webcam c310 · 2dc07099
      Takashi Iwai authored
      commit 36691e1b upstream.
      
      Just like the previous fix for LogitechHD Webcam c270 in commit
      11e7064f, c310 model also requires the
      same workaround for avoiding the kernel warning.
      
      Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=59741Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      2dc07099
  2. 20 Jun, 2013 27 commits
  3. 13 Jun, 2013 4 commits