1. 10 4月, 2014 2 次提交
  2. 09 4月, 2014 1 次提交
    • D
      isdnloop: several buffer overflows · 7563487c
      Dan Carpenter 提交于
      There are three buffer overflows addressed in this patch.
      
      1) In isdnloop_fake_err() we add an 'E' to a 60 character string and
      then copy it into a 60 character buffer.  I have made the destination
      buffer 64 characters and I'm changed the sprintf() to a snprintf().
      
      2) In isdnloop_parse_cmd(), p points to a 6 characters into a 60
      character buffer so we have 54 characters.  The ->eazlist[] is 11
      characters long.  I have modified the code to return if the source
      buffer is too long.
      
      3) In isdnloop_command() the cbuf[] array was 60 characters long but the
      max length of the string then can be up to 79 characters.  I made the
      cbuf array 80 characters long and changed the sprintf() to snprintf().
      I also removed the temporary "dial" buffer and changed it to use "p"
      directly.
      
      Unfortunately, we pass the "cbuf" string from isdnloop_command() to
      isdnloop_writecmd() which truncates anything over 60 characters to make
      it fit in card->omsg[].  (It can accept values up to 255 characters so
      long as there is a '\n' character every 60 characters).  For now I have
      just fixed the memory corruption bug and left the other problems in this
      driver alone.
      Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7563487c
  3. 08 4月, 2014 34 次提交
  4. 07 4月, 2014 2 次提交
    • A
      Xen: do hv callback accounting only on x86 · d06eb3ee
      Arnd Bergmann 提交于
      Patch 99c8b79d "xen: Add proper irq accounting for HYPERCALL vector"
      added a call to inc_irq_stat(irq_hv_callback_count) in common Xen code,
      however both the inc_irq_stat function and the irq_hv_callback_count
      counter are architecture specific.
      
      This makes the code build again on ARM by moving the call into the
      existing #ifdef CONFIG_X86. We may want to later do the same implementation
      on ARM that x86 has though.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NDavid Vrabel <david.vrabel@citrix.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Cc: Xen <xen-devel@lists.xenproject.org>
      d06eb3ee
    • L
      staging: r8723au: Fix build problem when RFKILL is not selected · f004e559
      Larry Finger 提交于
      The kbuild test robot reports the following build errors for x86_64-randconfig-c1-0407:
      
      All error/warnings:
      
         net/built-in.o: In function `wiphy_new':
      >> (.text+0x7684c): undefined reference to `rfkill_alloc'
         net/built-in.o: In function `wiphy_rfkill_start_polling':
      >> (.text+0x76da4): undefined reference to `rfkill_resume_polling'
         net/built-in.o: In function `wiphy_rfkill_stop_polling':
      >> (.text+0x76de9): undefined reference to `rfkill_pause_polling'
         net/built-in.o: In function `wiphy_unregister':
      >> (.text+0x76ec9): undefined reference to `rfkill_unregister'
         net/built-in.o: In function `wiphy_rfkill_set_hw_state':
      >> (.text+0x771bc): undefined reference to `rfkill_set_hw_state'
         net/built-in.o: In function `wiphy_register':
      >> (.text+0x77968): undefined reference to `rfkill_register'
         net/built-in.o: In function `wiphy_register':
      >> (.text+0x77981): undefined reference to `rfkill_destroy'
         net/built-in.o: In function `cfg80211_rfkill_sync_work':
      >> core.c:(.text+0x788ad): undefined reference to `rfkill_blocked'
         net/built-in.o: In function `cfg80211_dev_free':
      >> (.text+0x78a7b): undefined reference to `rfkill_destroy'
         net/built-in.o: In function `cfg80211_netdev_notifier_call':
      >> core.c:(.text+0x79203): undefined reference to `rfkill_blocked'
         net/built-in.o: In function `nl80211_start_p2p_device':
      
      These undefined sysbols are all satisfied if a "select RFKILL" is added to
      Kconfig. This "fix" leads to another problem as follows:
      
      >> nl80211.c:(.text+0x9032e): undefined reference to `rfkill_blocked'
      net/rfkill/Kconfig:4:error: recursive dependency detected!
      net/rfkill/Kconfig:4:   symbol RFKILL is selected by R8723AU
      drivers/staging/rtl8723au/Kconfig:1:    symbol R8723AU depends on USB
      drivers/usb/Kconfig:41: symbol USB is selected by MOUSE_APPLETOUCH
      drivers/input/mouse/Kconfig:162:        symbol MOUSE_APPLETOUCH depends on INPUT
      drivers/input/Kconfig:8:        symbol INPUT is selected by ACPI_CMPC
      drivers/platform/x86/Kconfig:635:       symbol ACPI_CMPC depends on RFKILL
      
      To avoid substituting one build error for another, I added a "depends on RFKILL".
      My suspicion is that this particular error is caused by a kbuild bug, or that the
      selection of INPUT by ACPI_CMPC is wrong. In any case, that will be solved separately.
      Reported-by: Nkbuild test robot <fengguang.wu@intel.com>
      Signed-off-by: NLarry Finger <Larry.Finger@lwfinger.net>
      Cc: Jes Sorensen <Jes.Sorensen@redhat.com>
      Cc: kbuild-all@01.org
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      f004e559
  5. 06 4月, 2014 1 次提交
    • L
      staging: r8723au: Fix randconfig build errors · 36c4d5c2
      Larry Finger 提交于
      The kbuild test robot got the following errors for i386-randconfig-c0-04060652:
      
      ERROR: "wiphy_free" [drivers/staging/rtl8723au/r8723au.ko] undefined!
      ERROR: "bridge_tunnel_header" [drivers/staging/rtl8723au/r8723au.ko] undefined!
      ERROR: "ieee80211_frequency_to_channel" [drivers/staging/rtl8723au/r8723au.ko] undefined!
      ERROR: "cfg80211_rx_mgmt" [drivers/staging/rtl8723au/r8723au.ko] undefined!
      ERROR: "ieee80211_channel_to_frequency" [drivers/staging/rtl8723au/r8723au.ko] undefined!
      ERROR: "cfg80211_mgmt_tx_status" [drivers/staging/rtl8723au/r8723au.ko] undefined!
      ERROR: "rfc1042_header" [drivers/staging/rtl8723au/r8723au.ko] undefined!
      ERROR: "__ieee80211_get_channel" [drivers/staging/rtl8723au/r8723au.ko] undefined!
      ERROR: "wiphy_unregister" [drivers/staging/rtl8723au/r8723au.ko] undefined!
      ERROR: "cfg80211_connect_result" [drivers/staging/rtl8723au/r8723au.ko] undefined!
      ERROR: "cfg80211_michael_mic_failure" [drivers/staging/rtl8723au/r8723au.ko] undefined!
      ERROR: "cfg80211_roamed" [drivers/staging/rtl8723au/r8723au.ko] undefined!
      ERROR: "cfg80211_put_bss" [drivers/staging/rtl8723au/r8723au.ko] undefined!
      ERROR: "wiphy_new" [drivers/staging/rtl8723au/r8723au.ko] undefined!
      ERROR: "wiphy_register" [drivers/staging/rtl8723au/r8723au.ko] undefined!
      ERROR: "cfg80211_inform_bss_width_frame" [drivers/staging/rtl8723au/r8723au.ko] undefined!
      ERROR: "cfg80211_disconnected" [drivers/staging/rtl8723au/r8723au.ko] undefined!
      ERROR: "ieee80211_amsdu_to_8023s" [drivers/staging/rtl8723au/r8723au.ko] undefined!
      ERROR: "cfg80211_scan_done" [drivers/staging/rtl8723au/r8723au.ko] undefined!
      
      All of these are fixed by forcing the selection of CFG80211 in Kconfig.
      Reported-by: Nkbuild test robot <fengguang.wu@intel.com>
      Signed-off-by: NLarry Finger <Larry.Finger@lwfinger.net>
      Cc: Jes Sorensen <Jes.Sorensen@redhat.com>
      Cc: kbuild-all@01.org
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      36c4d5c2