1. 13 12月, 2018 1 次提交
  2. 26 9月, 2018 3 次提交
  3. 28 8月, 2018 2 次提交
  4. 16 8月, 2018 1 次提交
  5. 09 7月, 2018 1 次提交
  6. 15 6月, 2018 1 次提交
  7. 29 5月, 2018 1 次提交
  8. 22 5月, 2018 1 次提交
  9. 07 5月, 2018 1 次提交
  10. 19 4月, 2018 1 次提交
  11. 12 4月, 2018 1 次提交
  12. 28 3月, 2018 1 次提交
  13. 21 3月, 2018 3 次提交
  14. 02 3月, 2018 2 次提交
    • K
      net: Convert hwsim_net_ops · 2e75bb2f
      Kirill Tkhai 提交于
      These pernet_operations allocate and destroy IDA identifier,
      and these actions are synchronized by IDA subsystem locks.
      Exit method removes mac80211_hwsim_data enteries from the lists,
      and this is synchronized by hwsim_radio_lock with the rest
      parallel pernet_operations. Also it queues destroy_radio()
      work, and these work already may be executed in parallel
      with any pernet_operations (as it's a work :). So, we may
      mark these pernet_operations as async.
      Signed-off-by: NKirill Tkhai <ktkhai@virtuozzo.com>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      2e75bb2f
    • K
      mac80211_hwsim: Make hwsim_netgroup IDA · 03695549
      Kirill Tkhai 提交于
      hwsim_netgroup counter is declarated as int, and it is incremented
      every time a new net is created. After sizeof(int) net are created,
      it will overflow, and different net namespaces will have the same
      identifier. This patch fixes the problem by introducing IDA instead
      of int counter. IDA guarantees, all the net namespaces have the uniq
      identifier.
      
      Note, that after we do ida_simple_remove() in hwsim_exit_net(),
      and we destroy the ID, later there may be executed destroy_radio()
      from the workqueue. But destroy_radio() does not use the ID, so it's OK.
      
      Out of bounds of this patch, just as a report to wireless subsystem
      maintainer, destroy_radio() increaments hwsim_radios_generation
      without hwsim_radio_lock, so this may need one more patch to fix.
      Signed-off-by: NKirill Tkhai <ktkhai@virtuozzo.com>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      03695549
  15. 19 2月, 2018 1 次提交
    • J
      mac80211_hwsim: don't use WQ_MEM_RECLAIM · ce162bfb
      Johannes Berg 提交于
      We're obviously not part of a memory reclaim path, so don't set the flag.
      
      This also causes a warning in check_flush_dependency() since we end up
      in a code path that flushes a non-reclaim workqueue, and we shouldn't do
      that if we were really part of reclaim.
      
      Reported-by: syzbot+41cdaf4232c50e658934@syzkaller.appspotmail.com
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      ce162bfb
  16. 31 1月, 2018 3 次提交
  17. 22 1月, 2018 1 次提交
  18. 15 1月, 2018 4 次提交
  19. 19 12月, 2017 2 次提交
  20. 11 12月, 2017 1 次提交
  21. 20 11月, 2017 1 次提交
  22. 16 11月, 2017 1 次提交
    • M
      genetlink: fix genlmsg_nlhdr() · 0a833c29
      Michal Kubecek 提交于
      According to the description, first argument of genlmsg_nlhdr() points to
      what genlmsg_put() returns, i.e. beginning of user header. Therefore we
      should only subtract size of genetlink header and netlink message header,
      not user header.
      
      This also means we don't need to pass the pointer to genetlink family and
      the same is true for genl_dump_check_consistent() which is the only caller
      of genlmsg_nlhdr(). (Note that at the moment, these functions are only
      used for families which do not have user header so that they are not
      affected.)
      
      Fixes: 670dc283 ("netlink: advertise incomplete dumps")
      Signed-off-by: NMichal Kubecek <mkubecek@suse.cz>
      Reviewed-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0a833c29
  23. 25 10月, 2017 1 次提交
    • M
      locking/atomics: COCCINELLE/treewide: Convert trivial ACCESS_ONCE() patterns... · 6aa7de05
      Mark Rutland 提交于
      locking/atomics: COCCINELLE/treewide: Convert trivial ACCESS_ONCE() patterns to READ_ONCE()/WRITE_ONCE()
      
      Please do not apply this to mainline directly, instead please re-run the
      coccinelle script shown below and apply its output.
      
      For several reasons, it is desirable to use {READ,WRITE}_ONCE() in
      preference to ACCESS_ONCE(), and new code is expected to use one of the
      former. So far, there's been no reason to change most existing uses of
      ACCESS_ONCE(), as these aren't harmful, and changing them results in
      churn.
      
      However, for some features, the read/write distinction is critical to
      correct operation. To distinguish these cases, separate read/write
      accessors must be used. This patch migrates (most) remaining
      ACCESS_ONCE() instances to {READ,WRITE}_ONCE(), using the following
      coccinelle script:
      
      ----
      // Convert trivial ACCESS_ONCE() uses to equivalent READ_ONCE() and
      // WRITE_ONCE()
      
      // $ make coccicheck COCCI=/home/mark/once.cocci SPFLAGS="--include-headers" MODE=patch
      
      virtual patch
      
      @ depends on patch @
      expression E1, E2;
      @@
      
      - ACCESS_ONCE(E1) = E2
      + WRITE_ONCE(E1, E2)
      
      @ depends on patch @
      expression E;
      @@
      
      - ACCESS_ONCE(E)
      + READ_ONCE(E)
      ----
      Signed-off-by: NMark Rutland <mark.rutland@arm.com>
      Signed-off-by: NPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: davem@davemloft.net
      Cc: linux-arch@vger.kernel.org
      Cc: mpe@ellerman.id.au
      Cc: shuah@kernel.org
      Cc: snitzer@redhat.com
      Cc: thor.thayer@linux.intel.com
      Cc: tj@kernel.org
      Cc: viro@zeniv.linux.org.uk
      Cc: will.deacon@arm.com
      Link: http://lkml.kernel.org/r/1508792849-3115-19-git-send-email-paulmck@linux.vnet.ibm.comSigned-off-by: NIngo Molnar <mingo@kernel.org>
      6aa7de05
  24. 21 9月, 2017 1 次提交
    • L
      mac80211_hwsim: use dyndbg for debug messages · 62b093b3
      Lubomir Rintel 提交于
      The mac80211_hwsim doesn't offer a way to disable the debugging output.
      Unfortunately, it's pretty chatty, dumping a  lot of stuff into the message
      buffer.
      
      This patch changes it to use dyndbg for controlling the debug output.
      It's disabled by default, but can be enabled by a module parameter (1),
      at runtime (2) or persisted in modprobe.conf (3).
      
        (1) modprobe mac80211_hwsim dyndbg=+p
        (2) echo "module mac80211_hwsim +p" >/sys/kernel/debug/dynamic_debug/control
        (3) echo "options mac80211_hwsim dyndbg=+p" >>/etc/modprobe.d/my.conf
      Signed-off-by: NLubomir Rintel <lkundrak@v3.sk>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      62b093b3
  25. 05 9月, 2017 1 次提交
    • B
      mac80211_hwsim: Use proper TX power · 9de981f5
      Beni Lev 提交于
      In struct ieee80211_tx_info, control.vif pointer and rate_driver_data[0]
      falls on the same place, depending on the union usage.
      During the whole TX process, the union is referred to as a control struct,
      which holds the vif that is later used in the tx flow, especially in order
      to derive the used tx power.
      Referring direcly to rate_driver_data[0] and assigning a value to it,
      overwrites the vif pointer, hence making all later references irrelevant.
      Moreover, rate_driver_data[0] isn't used later in the flow in order to
      retrieve the channel that it is pointing to.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: NBeni Lev <beni.lev@intel.com>
      Signed-off-by: NLuca Coelho <luciano.coelho@intel.com>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      9de981f5
  26. 16 6月, 2017 3 次提交
    • J
      networking: make skb_push & __skb_push return void pointers · d58ff351
      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 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_push, __skb_push, skb_push_rcsum };
          @@
          - *(fn(SKB, LEN))
          + *(u8 *)fn(SKB, LEN)
      
          @@
          expression E, SKB, LEN;
          identifier fn = { skb_push, __skb_push, skb_push_rcsum };
          type T;
          @@
          - E = ((T *)(fn(SKB, LEN)))
          + E = fn(SKB, LEN)
      
          @@
          expression SKB, LEN;
          identifier fn = { skb_push, __skb_push, skb_push_rcsum };
          @@
          - fn(SKB, LEN)[0]
          + *(u8 *)fn(SKB, LEN)
      
      Note that the last part there converts from push(...)[0] to the
      more idiomatic *(u8 *)push(...).
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d58ff351
    • 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