1. 06 5月, 2019 1 次提交
  2. 03 5月, 2019 1 次提交
  3. 24 4月, 2019 3 次提交
  4. 03 3月, 2019 1 次提交
  5. 27 2月, 2019 4 次提交
  6. 26 2月, 2019 1 次提交
  7. 18 2月, 2019 3 次提交
  8. 22 1月, 2019 1 次提交
  9. 18 10月, 2018 1 次提交
  10. 06 10月, 2018 1 次提交
    • K
      treewide: Replace more open-coded allocation size multiplications · 329e0989
      Kees Cook 提交于
      As done treewide earlier, this catches several more open-coded
      allocation size calculations that were added to the kernel during the
      merge window. This performs the following mechanical transformations
      using Coccinelle:
      
      	kvmalloc(a * b, ...) -> kvmalloc_array(a, b, ...)
      	kvzalloc(a * b, ...) -> kvcalloc(a, b, ...)
      	devm_kzalloc(..., a * b, ...) -> devm_kcalloc(..., a, b, ...)
      Signed-off-by: NKees Cook <keescook@chromium.org>
      329e0989
  11. 27 9月, 2018 3 次提交
    • B
      Bluetooth: hci_qca: Add poweroff support during hci down for wcn3990 · 3e4be65e
      Balakrishna Godavarthi 提交于
      This patch enables power off support for hci down and power on support
      for hci up. As wcn3990 power sources are ignited by regulators, we will
      turn off them during hci down, i.e. an complete power off of wcn3990.
      So while hci up, will call vendor setup which will turn on the regulators,
      requests BT chip version and download the firmware.
      Signed-off-by: NBalakrishna Godavarthi <bgodavar@codeaurora.org>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      3e4be65e
    • B
      Bluetooth: hci_qca: Remove hdev dereference in qca_close(). · c2d78273
      Balakrishna Godavarthi 提交于
      When flag KASAN is set, we are seeing an following crash while removing
      hci_uart module.
      
      [   50.589909] Unable to handle kernel paging request at virtual address 6b6b6b6b6b6b73
      [   50.597902] Mem abort info:
      [   50.600846]   Exception class = DABT (current EL), IL = 32 bits
      [   50.606959]   SET = 0, FnV = 0
      [   50.610142]   EA = 0, S1PTW = 0
      [   50.613396] Data abort info:
      [   50.616401]   ISV = 0, ISS = 0x00000004
      [   50.620373]   CM = 0, WnR = 0
      [   50.623466] [006b6b6b6b6b6b73] address between user and kernel address ranges
      [   50.630818] Internal error: Oops: 96000004 [#1] PREEMPT SMP
      
      [   50.671670] PC is at qca_power_shutdown+0x28/0x100 [hci_uart]
      [   50.677593] LR is at qca_close+0x74/0xb0 [hci_uart]
      [   50.775689] Process rmmod (pid: 2144, stack limit = 0xffffff801ba90000)
      [   50.782493] Call trace:
      
      [   50.872150] [<ffffff8000c3c81c>] qca_power_shutdown+0x28/0x100 [hci_uart]
      [   50.879138] [<ffffff8000c3c968>] qca_close+0x74/0xb0 [hci_uart]
      [   50.885238] [<ffffff8000c3a71c>] hci_uart_unregister_device+0x44/0x50 [hci_uart]
      [   50.892846] [<ffffff8000c3c9f4>] qca_serdev_remove+0x50/0x5c [hci_uart]
      [   50.899654] [<ffffff800844f630>] serdev_drv_remove+0x28/0x38
      [   50.905489] [<ffffff800850fc44>] device_release_driver_internal+0x140/0x1e4
      [   50.912653] [<ffffff800850fd94>] driver_detach+0x78/0x84
      [   50.918121] [<ffffff800850edac>] bus_remove_driver+0x80/0xa8
      [   50.923942] [<ffffff80085107dc>] driver_unregister+0x4c/0x58
      [   50.929768] [<ffffff8000c3ca8c>] qca_deinit+0x24/0x598 [hci_uart]
      [   50.936045] [<ffffff8000c3ca10>] hci_uart_exit+0x10/0x48 [hci_uart]
      [   50.942495] [<ffffff8008136630>] SyS_delete_module+0x17c/0x224
      
      This crash is due to dereference of hdev, after freeing it.
      Signed-off-by: NBalakrishna Godavarthi <bgodavar@codeaurora.org>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      c2d78273
    • B
      Bluetooth: hci_qca: Remove serdev_device_open/close function calls · ca30ccd2
      Balakrishna Godavarthi 提交于
      Removed serdev_device_open/close functions from qca_open/close as
      they are called in hci_uart_register_device() and
      hci_uart_unregister_device() functions.
      Signed-off-by: NBalakrishna Godavarthi <bgodavar@codeaurora.org>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      ca30ccd2
  12. 03 8月, 2018 5 次提交
  13. 24 7月, 2018 1 次提交
  14. 30 5月, 2018 1 次提交
  15. 18 5月, 2018 2 次提交
  16. 13 12月, 2017 1 次提交
    • L
      Bluetooth: hci_qca: Avoid setup failure on missing rampatch · ba8f3597
      Loic Poulain 提交于
      Assuming that the original code idea was to enable in-band sleeping
      only if the setup_rome method returns succes and run in 'standard'
      mode otherwise, we should not return setup_rome return value which
      makes qca_setup fail if no rampatch/nvm file found.
      
      This fixes BT issue on the dragonboard-820C p4 which includes the
      following QCA controller:
      hci0: Product:0x00000008
      hci0: Patch  :0x00000111
      hci0: ROM    :0x00000302
      hci0: SOC    :0x00000044
      
      Since there is no rampatch for this controller revision, just make
      it work as is.
      Signed-off-by: NLoic Poulain <loic.poulain@linaro.org>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      ba8f3597
  17. 30 10月, 2017 1 次提交
  18. 07 10月, 2017 1 次提交
  19. 16 6月, 2017 3 次提交
    • J
      networking: add and use skb_put_u8() · 634fef61
      Johannes Berg 提交于
      Joe and Bjørn suggested that it'd be nicer to not have the
      cast in the fairly common case of doing
      	*(u8 *)skb_put(skb, 1) = c;
      
      Add skb_put_u8() for this case, and use it across the code,
      using the following spatch:
      
          @@
          expression SKB, C, S;
          typedef u8;
          identifier fn = {skb_put};
          fresh identifier fn2 = fn ## "_u8";
          @@
          - *(u8 *)fn(SKB, S) = C;
          + fn2(SKB, C);
      
      Note that due to the "S", the spatch isn't perfect, it should
      have checked that S is 1, but there's also places that use a
      sizeof expression like sizeof(var) or sizeof(u8) etc. Turns
      out that nobody ever did something like
      	*(u8 *)skb_put(skb, 2) = c;
      
      which would be wrong anyway since the second byte wouldn't be
      initialized.
      Suggested-by: NJoe Perches <joe@perches.com>
      Suggested-by: NBjørn Mork <bjorn@mork.no>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      634fef61
    • J
      networking: make skb_put & friends return void pointers · 4df864c1
      Johannes Berg 提交于
      It seems like a historic accident that these return unsigned char *,
      and in many places that means casts are required, more often than not.
      
      Make these functions (skb_put, __skb_put and pskb_put) return void *
      and remove all the casts across the tree, adding a (u8 *) cast only
      where the unsigned char pointer was used directly, all done with the
      following spatch:
      
          @@
          expression SKB, LEN;
          typedef u8;
          identifier fn = { skb_put, __skb_put };
          @@
          - *(fn(SKB, LEN))
          + *(u8 *)fn(SKB, LEN)
      
          @@
          expression E, SKB, LEN;
          identifier fn = { skb_put, __skb_put };
          type T;
          @@
          - E = ((T *)(fn(SKB, LEN)))
          + E = fn(SKB, LEN)
      
      which actually doesn't cover pskb_put since there are only three
      users overall.
      
      A handful of stragglers were converted manually, notably a macro in
      drivers/isdn/i4l/isdn_bsdcomp.c and, oddly enough, one of the many
      instances in net/bluetooth/hci_sock.c. In the former file, I also
      had to fix one whitespace problem spatch introduced.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4df864c1
    • J
      networking: introduce and use skb_put_data() · 59ae1d12
      Johannes Berg 提交于
      A common pattern with skb_put() is to just want to memcpy()
      some data into the new space, introduce skb_put_data() for
      this.
      
      An spatch similar to the one for skb_put_zero() converts many
      of the places using it:
      
          @@
          identifier p, p2;
          expression len, skb, data;
          type t, t2;
          @@
          (
          -p = skb_put(skb, len);
          +p = skb_put_data(skb, data, len);
          |
          -p = (t)skb_put(skb, len);
          +p = skb_put_data(skb, data, len);
          )
          (
          p2 = (t2)p;
          -memcpy(p2, data, len);
          |
          -memcpy(p, data, len);
          )
      
          @@
          type t, t2;
          identifier p, p2;
          expression skb, data;
          @@
          t *p;
          ...
          (
          -p = skb_put(skb, sizeof(t));
          +p = skb_put_data(skb, data, sizeof(t));
          |
          -p = (t *)skb_put(skb, sizeof(t));
          +p = skb_put_data(skb, data, sizeof(t));
          )
          (
          p2 = (t2)p;
          -memcpy(p2, data, sizeof(*p));
          |
          -memcpy(p, data, sizeof(*p));
          )
      
          @@
          expression skb, len, data;
          @@
          -memcpy(skb_put(skb, len), data, len);
          +skb_put_data(skb, data, len);
      
      (again, manually post-processed to retain some comments)
      Reviewed-by: NStephen Hemminger <stephen@networkplumber.org>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      59ae1d12
  20. 19 2月, 2017 1 次提交
  21. 27 11月, 2016 1 次提交
  22. 20 9月, 2016 1 次提交
  23. 20 11月, 2015 1 次提交
  24. 21 10月, 2015 1 次提交