android_kernel_xiaomi_sm8350/net/wireless
Julius Volz b46372710a net/wireless/nl80211.c: fix endless Netlink callback loop.
Although I only tested similar code (I don't use any of this wireless
code), the state maintainance between Netlink dump callback invocations
seems wrong here and should lead to an endless loop. There are also other
examples in the same file which might have the same problem. Perhaps someone
can actually test this (or refute my logic).

Take the simple example with only one element in the list (which should fit
into the message):

1. invocation:
  Start:
    idx = 0, start = 0
  Loop:
    condition (++idx < start) => (1 < 0) => false
    => no continue, fill one entry, exit loop, return skb->len > 0

2. invocation:
  Start:
    idx = 0, start = 1
  Loop:
    condition (++idx < start) => (1 < 1) => false
    => no continue, fill the same entry again, exit loop, return skb->len > 0

3. invocation:
  Same as 2. invocation, endless invocation of callback.

Also, iterations where the filling of an element fails should not be counted as
completed, so idx should not be incremented in this case.

Signed-off-by: Julius Volz <juliusv@google.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-07-08 14:16:08 -04:00
..
core.c wireless: Add missing locking to cfg80211_dev_rename 2008-05-14 16:29:49 -04:00
core.h
Kconfig
Makefile
nl80211.c net/wireless/nl80211.c: fix endless Netlink callback loop. 2008-07-08 14:16:08 -04:00
nl80211.h
radiotap.c wireless: use get/put_unaligned_* helpers 2008-05-14 16:29:32 -04:00
reg.c mac80211: implement EU regulatory domain 2008-06-14 12:18:03 -04:00
sysfs.c
sysfs.h
util.c
wext.c wext: Create IW_REQUEST_FLAG_COMPAT and set it as needed. 2008-06-16 18:34:49 -07:00