19 Dec, 2014

7 commits

  • Pull networking fixes from David Miller:

    1) Fix NBMA tunnel mac header handling in GRE, from Timo Teräs.

    2) Fix a NAPI race in the fec driver, from Nimrod Andy.

    3) The new IFF_VNET_LE bit is outside the size of the flags member it
    is stored in (which is 16-bits), store the state locally in the
    drivers. From Michael S Tsirkin.

    4) We are kicking the tires with the new wireless maintainership
    situation. Bluetooth fixes via Johan Hedberg, and mac80211 fixes
    from Johannes Berg.

    5) Fix locking and leaks in geneve driver, from Jesse Gross.

    6) Make netlink TX mmap code always copy, so we don't have to be
    potentially exposed to the user changing the underlying contents
    from underneath us.

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (63 commits)
    be2net: Fix incorrect setting of tunnel offload flag in netdev features
    bnx2x: fix typos in "configure"
    xen-netback: support frontends without feature-rx-notify again
    MAINTAINERS: changes for wireless
    cxgb4: Fix decoding QSA module for ethtool get settings
    geneve: Fix races between socket add and release.
    geneve: Remove socket and offload handlers at destruction.
    netlink: Don't reorder loads/stores before marking mmap netlink frame as available
    netlink: Always copy on mmap TX.
    Bluetooth: Fix bug with filter in service discovery optimization
    mac80211: free management frame keys when removing station
    net: Disallow providing non zero VLAN ID for NIC drivers FDB add flow
    net/mlx4: Cache line CQE/EQE stride fixes
    net: fec: Fix NAPI race
    xen-netfront: use napi_complete() correctly to prevent Rx stalling
    ip_tunnel: Add missing validation of encap type to ip_tunnel_encap_setup()
    ip_tunnel: Add sanity checks to ip_tunnel_encap_add_ops()
    net: Allow FIXED_PHY to be modular.
    if_tun: drop broken IFF_VNET_LE
    macvtap: drop broken IFF_VNET_LE
    ...

    Linus Torvalds
     
  • …kernel/git/jberg/mac80211

    Johannes Berg says:

    ====================
    pull-request: mac80211 2014-12-18

    Also from me a first pull request - we have a number of really old
    issues that happened to crop up now with new work (or just more testing)
    in the right areas as well as some small bugs newly introduced in 3.19.

    Let me know if there are any problems.
    ====================

    Signed-off-by: David S. Miller <davem@davemloft.net>

    David S. Miller
     
  • Johan Hedberg says:

    ====================
    pull request: bluetooth 2014-12-17

    Here's the first direct (i.e. skipping the wireless tree) bluetooth pull
    request for you, intended for 3.19. It's just one patch: a fix from
    Marcel for for remote service discovery filtering which also fixes a
    'used uninitialized' compiler warning.

    Please let me know if there are any issues pulling. Thanks.
    ====================

    Signed-off-by: David S. Miller

    David S. Miller
     
  • Currently, searching for a socket to add a reference to is not
    synchronized with deletion of sockets. This can result in use
    after free if there is another operation that is removing a
    socket at the same time. Solving this requires both holding the
    appropriate lock and checking the refcount to ensure that it
    has not already hit zero.

    Inspired by a related (but not exactly the same) issue in the
    VXLAN driver.

    Fixes: 0b5e8b8e ("net: Add Geneve tunneling protocol driver")
    CC: Andy Zhou
    Signed-off-by: Jesse Gross
    Acked-by: Thomas Graf
    Signed-off-by: David S. Miller

    Jesse Gross
     
  • Sockets aren't currently removed from the the global list when
    they are destroyed. In addition, offload handlers need to be cleaned
    up as well.

    Fixes: 0b5e8b8e ("net: Add Geneve tunneling protocol driver")
    CC: Andy Zhou
    Signed-off-by: Jesse Gross
    Acked-by: Thomas Graf
    Signed-off-by: David S. Miller

    Jesse Gross
     
  • Each mmap Netlink frame contains a status field which indicates
    whether the frame is unused, reserved, contains data or needs to
    be skipped. Both loads and stores may not be reordeded and must
    complete before the status field is changed and another CPU might
    pick up the frame for use. Use an smp_mb() to cover needs of both
    types of callers to netlink_set_status(), callers which have been
    reading data frame from the frame, and callers which have been
    filling or releasing and thus writing to the frame.

    - Example code path requiring a smp_rmb():
    memcpy(skb->data, (void *)hdr + NL_MMAP_HDRLEN, hdr->nm_len);
    netlink_set_status(hdr, NL_MMAP_STATUS_UNUSED);

    - Example code path requiring a smp_wmb():
    hdr->nm_uid = from_kuid(sk_user_ns(sk), NETLINK_CB(skb).creds.uid);
    hdr->nm_gid = from_kgid(sk_user_ns(sk), NETLINK_CB(skb).creds.gid);
    netlink_frame_flush_dcache(hdr);
    netlink_set_status(hdr, NL_MMAP_STATUS_VALID);

    Fixes: f9c228 ("netlink: implement memory mapped recvmsg()")
    Reported-by: Eric Dumazet
    Signed-off-by: Thomas Graf
    Signed-off-by: David S. Miller

    Thomas Graf
     
  • Checking the file f_count and the nlk->mapped count is not completely
    sufficient to prevent the mmap'd area contents from changing from
    under us during netlink mmap sendmsg() operations.

    Be careful to sample the header's length field only once, because this
    could change from under us as well.

    Fixes: 5fd96123ee19 ("netlink: implement memory mapped sendmsg()")
    Signed-off-by: David S. Miller
    Acked-by: Daniel Borkmann
    Acked-by: Thomas Graf

    David Miller
     

18 Dec, 2014

9 commits

  • Pull ceph updates from Sage Weil:
    "The big item here is support for inline data for CephFS and for
    message signatures from Zheng. There are also several bug fixes,
    including interrupted flock request handling, 0-length xattrs, mksnap,
    cached readdir results, and a message version compat field. Finally
    there are several cleanups from Ilya, Dan, and Markus.

    Note that there is another series coming soon that fixes some bugs in
    the RBD 'lingering' requests, but it isn't quite ready yet"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client: (27 commits)
    ceph: fix setting empty extended attribute
    ceph: fix mksnap crash
    ceph: do_sync is never initialized
    libceph: fixup includes in pagelist.h
    ceph: support inline data feature
    ceph: flush inline version
    ceph: convert inline data to normal data before data write
    ceph: sync read inline data
    ceph: fetch inline data when getting Fcr cap refs
    ceph: use getattr request to fetch inline data
    ceph: add inline data to pagecache
    ceph: parse inline data in MClientReply and MClientCaps
    libceph: specify position of extent operation
    libceph: add CREATE osd operation support
    libceph: add SETXATTR/CMPXATTR osd operations support
    rbd: don't treat CEPH_OSD_OP_DELETE as extent op
    ceph: remove unused stringification macros
    libceph: require cephx message signature by default
    ceph: introduce global empty snap context
    ceph: message versioning fixes
    ...

    Linus Torvalds
     
  • The optimization for filtering out extended inquiry results, advertising
    reports or scan response data based on provided UUID list has a logic
    bug. In case no match is found in the advertising data, the scan
    response is ignored and not checked against the filter. This will lead
    to events being filtered wrongly.

    Change the code to actually only drop the events when the scan response
    data is not present. If it is present, it needs to be checked against
    the provided filter.

    The patch is a bit more complex than it needs to be. That is because
    it also fixes this compiler warning that some gcc versions produce.

    CC net/bluetooth/mgmt.o
    net/bluetooth/mgmt.c: In function ‘mgmt_device_found’:
    net/bluetooth/mgmt.c:7028:7: warning: ‘match’ may be used uninitialized in this function [-Wmaybe-uninitialized]
    bool match;
    ^

    It seems that gcc can not clearly figure out the context of the match
    variable. So just change the branches for the extended inquiry response
    and advertising data around so that it is clear.

    Reported-by: Geert Uytterhoeven
    Signed-off-by: Marcel Holtmann
    Signed-off-by: Johan Hedberg

    Marcel Holtmann
     
  • allow specifying position of extent operation in multi-operations
    osd request. This is required for cephfs to convert inline data to
    normal data (compare xattr, then write object).

    Signed-off-by: Yan, Zheng
    Reviewed-by: Ilya Dryomov

    Yan, Zheng
     
  • Add CEPH_OSD_OP_CREATE support. Also change libceph to not treat
    CEPH_OSD_OP_DELETE as an extent op and add an assert to that end.

    Signed-off-by: Yan, Zheng
    Reviewed-by: Ilya Dryomov

    Yan, Zheng
     
  • Signed-off-by: Yan, Zheng
    Reviewed-by: Ilya Dryomov

    Yan, Zheng
     
  • Signed-off-by: Yan, Zheng
    Reviewed-by: Ilya Dryomov

    Yan, Zheng
     
  • Signed-off-by: Yan, Zheng

    Yan, Zheng
     
  • Session key is required when calculating message signature. Save the session
    key in authorizer, this avoid lookup ticket handler for each message

    Signed-off-by: Yan, Zheng

    Yan, Zheng
     
  • Use kvfree() from linux/mm.h instead, which is identical. Also fix the
    ceph_buffer comment: we will allocate with kmalloc() up to 32k - the
    value of PAGE_ALLOC_COSTLY_ORDER, but that really is just an
    implementation detail so don't mention it at all.

    Signed-off-by: Ilya Dryomov

    Ilya Dryomov
     

17 Dec, 2014

7 commits

  • When writing the code to allow per-station GTKs, I neglected to
    take into account the management frame keys (index 4 and 5) when
    freeing the station and only added code to free the first four
    data frame keys.

    Fix this by iterating the array of keys over the right length.

    Cc: stable@vger.kernel.org
    Fixes: e31b82136d1a ("cfg80211/mac80211: allow per-station GTKs")
    Signed-off-by: Johannes Berg

    Johannes Berg
     
  • Pull vfs pile #2 from Al Viro:
    "Next pile (and there'll be one or two more).

    The large piece in this one is getting rid of /proc/*/ns/* weirdness;
    among other things, it allows to (finally) make nameidata completely
    opaque outside of fs/namei.c, making for easier further cleanups in
    there"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
    coda_venus_readdir(): use file_inode()
    fs/namei.c: fold link_path_walk() call into path_init()
    path_init(): don't bother with LOOKUP_PARENT in argument
    fs/namei.c: new helper (path_cleanup())
    path_init(): store the "base" pointer to file in nameidata itself
    make default ->i_fop have ->open() fail with ENXIO
    make nameidata completely opaque outside of fs/namei.c
    kill proc_ns completely
    take the targets of /proc/*/ns/* symlinks to separate fs
    bury struct proc_ns in fs/proc
    copy address of proc_ns_ops into ns_common
    new helpers: ns_alloc_inum/ns_free_inum
    make proc_ns_operations work with struct ns_common * instead of void *
    switch the rest of proc_ns_operations to working with &...->ns
    netns: switch ->get()/->put()/->install()/->inum() to working with &net->ns
    make mntns ->get()/->put()/->install()/->inum() work with &mnt_ns->ns
    common object embedded into various struct ....ns

    Linus Torvalds
     
  • Pull nfsd updates from Bruce Fields:
    "A comparatively quieter cycle for nfsd this time, but still with two
    larger changes:

    - RPC server scalability improvements from Jeff Layton (using RCU
    instead of a spinlock to find idle threads).

    - server-side NFSv4.2 ALLOCATE/DEALLOCATE support from Anna
    Schumaker, enabling fallocate on new clients"

    * 'for-3.19' of git://linux-nfs.org/~bfields/linux: (32 commits)
    nfsd4: fix xdr4 count of server in fs_location4
    nfsd4: fix xdr4 inclusion of escaped char
    sunrpc/cache: convert to use string_escape_str()
    sunrpc: only call test_bit once in svc_xprt_received
    fs: nfsd: Fix signedness bug in compare_blob
    sunrpc: add some tracepoints around enqueue and dequeue of svc_xprt
    sunrpc: convert to lockless lookup of queued server threads
    sunrpc: fix potential races in pool_stats collection
    sunrpc: add a rcu_head to svc_rqst and use kfree_rcu to free it
    sunrpc: require svc_create callers to pass in meaningful shutdown routine
    sunrpc: have svc_wake_up only deal with pool 0
    sunrpc: convert sp_task_pending flag to use atomic bitops
    sunrpc: move rq_cachetype field to better optimize space
    sunrpc: move rq_splice_ok flag into rq_flags
    sunrpc: move rq_dropme flag into rq_flags
    sunrpc: move rq_usedeferral flag to rq_flags
    sunrpc: move rq_local field to rq_flags
    sunrpc: add a generic rq_flags field to svc_rqst and move rq_secure to it
    nfsd: minor off by one checks in __write_versions()
    sunrpc: release svc_pool_map reference when serv allocation fails
    ...

    Linus Torvalds
     
  • The current implementations all use dev_uc_add_excl() and such whose API
    doesn't support vlans, so we can't make it with NICs HW for now.

    Fixes: f6f6424ba773 ('net: make vid as a parameter for ndo_fdb_add/ndo_fdb_del')
    Signed-off-by: Or Gerlitz
    Reviewed-by: Jiri Pirko
    Acked-by: Jeff Kirsher
    Signed-off-by: David S. Miller

    Or Gerlitz
     
  • The encap->type comes straight from Netlink. Validate it against
    max supported encap types just like ip_encap_hlen() already does.

    Fixes: a8c5f9 ("ip_tunnel: Ops registration for secondary encap (fou, gue)")
    Signed-off-by: Thomas Graf
    Signed-off-by: David S. Miller

    Thomas Graf
     
  • The symbols are exported and could be used by external modules.

    Fixes: a8c5f9 ("ip_tunnel: Ops registration for secondary encap (fou, gue)")
    Signed-off-by: Thomas Graf
    Signed-off-by: David S. Miller

    Thomas Graf
     
  • John W. Linville says:

    ====================
    pull request: wireless 2014-12-16

    Please pull this batch of fixes intended for the 3.19 stream!

    For the Bluetooth bits, Johan says:

    "The patches consist of:

    - Coccinelle warning fix
    - hci_dev_lock/unlock fixes
    - Fixes for pending mgmt command handling
    - Fixes for properly following the force_lesc_support switch
    - Fix for a Microsoft branded Broadcom adapter
    - New device id for Atheros AR3012
    - Fix for BR/EDR Secure Connections enabling"

    Along with that...

    Brian Norris avoids leaking some kernel memory contents via printk in brcmsmac.

    Julia Lawall corrects some misspellings in a few drivers.

    Larry Finger gives us one more rtlwifi fix to correct a porting oversight.

    Wei Yongjun fixes a sparse warning in rtlwifi.

    Please let me know if there are problems!
    ====================

    Signed-off-by: David S. Miller

    David S. Miller
     

16 Dec, 2014

3 commits

  • …etooth/bluetooth-next

    John W. Linville
     
  • net/rds/message.c: In function ‘rds_message_inc_copy_to_user’:
    net/rds/message.c:328: warning: comparison of distinct pointer types lacks a cast

    Use min_t(unsigned long, ...) like is done in
    rds_message_copy_from_user().

    Signed-off-by: Geert Uytterhoeven
    Signed-off-by: David S. Miller

    Geert Uytterhoeven
     
  • The NBMA GRE tunnels temporarily push GRE header that contain the
    per-packet NBMA destination on the skb via header ops early in xmit
    path. It is the later pulled before the real GRE header is constructed.

    The inner mac was thus set differently in nbma case: the GRE header
    has been pushed by neighbor layer, and mac header points to beginning
    of the temporary gre header (set by dev_queue_xmit).

    Now that the offloads expect mac header to point to the gre payload,
    fix the xmit patch to:
    - pull first the temporary gre header away
    - and reset mac header to point to gre payload

    This fixes tso to work again with nbma tunnels.

    Fixes: 14051f0452a2 ("gre: Use inner mac length when computing tunnel length")
    Signed-off-by: Timo Teräs
    Cc: Tom Herbert
    Cc: Alexander Duyck
    Signed-off-by: David S. Miller

    Timo Teräs
     

15 Dec, 2014

1 commit

  • Pull driver core update from Greg KH:
    "Here's the set of driver core patches for 3.19-rc1.

    They are dominated by the removal of the .owner field in platform
    drivers. They touch a lot of files, but they are "simple" changes,
    just removing a line in a structure.

    Other than that, a few minor driver core and debugfs changes. There
    are some ath9k patches coming in through this tree that have been
    acked by the wireless maintainers as they relied on the debugfs
    changes.

    Everything has been in linux-next for a while"

    * tag 'driver-core-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (324 commits)
    Revert "ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries"
    fs: debugfs: add forward declaration for struct device type
    firmware class: Deletion of an unnecessary check before the function call "vunmap"
    firmware loader: fix hung task warning dump
    devcoredump: provide a one-way disable function
    device: Add dev__once variants
    ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries
    ath: use seq_file api for ath9k debugfs files
    debugfs: add helper function to create device related seq_file
    drivers/base: cacheinfo: remove noisy error boot message
    Revert "core: platform: add warning if driver has no owner"
    drivers: base: support cpu cache information interface to userspace via sysfs
    drivers: base: add cpu_device_create to support per-cpu devices
    topology: replace custom attribute macros with standard DEVICE_ATTR*
    cpumask: factor out show_cpumap into separate helper function
    driver core: Fix unbalanced device reference in drivers_probe
    driver core: fix race with userland in device_add()
    sysfs/kernfs: make read requests on pre-alloc files use the buffer.
    sysfs/kernfs: allow attributes to request write buffer be pre-allocated.
    fs: sysfs: return EGBIG on write if offset is larger than file size
    ...

    Linus Torvalds
     

14 Dec, 2014

1 commit

  • Pull crypto update from Herbert Xu:
    - The crypto API is now documented :)
    - Disallow arbitrary module loading through crypto API.
    - Allow get request with empty driver name through crypto_user.
    - Allow speed testing of arbitrary hash functions.
    - Add caam support for ctr(aes), gcm(aes) and their derivatives.
    - nx now supports concurrent hashing properly.
    - Add sahara support for SHA1/256.
    - Add ARM64 version of CRC32.
    - Misc fixes.

    * git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (77 commits)
    crypto: tcrypt - Allow speed testing of arbitrary hash functions
    crypto: af_alg - add user space interface for AEAD
    crypto: qat - fix problem with coalescing enable logic
    crypto: sahara - add support for SHA1/256
    crypto: sahara - replace tasklets with kthread
    crypto: sahara - add support for i.MX53
    crypto: sahara - fix spinlock initialization
    crypto: arm - replace memset by memzero_explicit
    crypto: powerpc - replace memset by memzero_explicit
    crypto: sha - replace memset by memzero_explicit
    crypto: sparc - replace memset by memzero_explicit
    crypto: algif_skcipher - initialize upon init request
    crypto: algif_skcipher - removed unneeded code
    crypto: algif_skcipher - Fixed blocking recvmsg
    crypto: drbg - use memzero_explicit() for clearing sensitive data
    crypto: drbg - use MODULE_ALIAS_CRYPTO
    crypto: include crypto- module prefix in template
    crypto: user - add MODULE_ALIAS
    crypto: sha-mb - remove a bogus NULL check
    crytpo: qat - Fix 64 bytes requests
    ...

    Linus Torvalds
     

12 Dec, 2014

12 commits

  • This patch addresses an issue with the level compression of the fib_trie.
    Specifically in the case of adding a new leaf that triggers a new node to
    be added that takes the place of the old node. The result is a trie where
    the 1 child tnode is on one side and one leaf is on the other which gives
    you a very deep trie. Below is the script I used to generate a trie on
    dummy0 with a 10.X.X.X family of addresses.

    ip link add type dummy
    ipval=184549374
    bit=2
    for i in `seq 1 23`
    do
    ifconfig dummy0:$bit $ipval/8
    ipval=`expr $ipval - $bit`
    bit=`expr $bit \* 2`
    done
    cat /proc/net/fib_triestat

    Running the script before the patch:

    Local:
    Aver depth: 10.82
    Max depth: 23
    Leaves: 29
    Prefixes: 30
    Internal nodes: 27
    1: 26 2: 1
    Pointers: 56
    Null ptrs: 1
    Total size: 5 kB

    After applying the patch and repeating:

    Local:
    Aver depth: 4.72
    Max depth: 9
    Leaves: 29
    Prefixes: 30
    Internal nodes: 12
    1: 3 2: 2 3: 7
    Pointers: 70
    Null ptrs: 30
    Total size: 4 kB

    What this fix does is start the rebalance at the newly created tnode
    instead of at the parent tnode. This way if there is a gap between the
    parent and the new node it doesn't prevent the new tnode from being
    coalesced with any pre-existing nodes that may have been pushed into one
    of the new nodes child branches.

    Signed-off-by: Alexander Duyck
    Signed-off-by: David S. Miller

    Alexander Duyck
     
  • Since the real device can segment packets by software, a vlan device
    can set TSO/UFO even when the real device doesn't have those features.
    Unlike GSO, this allows packets to be segmented after Qdisc.

    Signed-off-by: Toshiaki Makita
    Signed-off-by: David S. Miller

    Toshiaki Makita
     
  • Ad-hoc requires beaconing for regulatory purposes. Validate that the
    channel is valid for beaconing, and not only enabled.

    Signed-off-by: Arik Nemtsov
    Reviewed-by: Luis R. Rodriguez
    Signed-off-by: Johannes Berg

    Arik Nemtsov
     
  • This can happen and there is no point in added more
    detection code lower in the stack. Catching these in one
    single point (cfg80211) is enough. Stop WARNING about this
    case.

    This fixes:
    https://bugzilla.kernel.org/show_bug.cgi?id=89001

    Cc: stable@vger.kernel.org
    Fixes: 2f1c6c572d7b ("cfg80211: process non country IE conflicting first")
    Signed-off-by: Emmanuel Grumbach
    Signed-off-by: Johannes Berg

    Emmanuel Grumbach
     
  • When an adapter is removed (hci_unregister_dev) any pending mgmt
    commands for that adapter should get the appropriate INVALID_INDEX
    response. Since hci_unregister_dev() calls hci_dev_do_close() first
    that'd so far have caused "not powered" responses to be sent.

    Skipping the HCI_UNREGISTER case in mgmt_powered() is also not a
    solution since before reaching the mgmt_index_removed() stage any
    hci_conn callbacks (e.g. used by pairing) will get called, thereby
    causing "disconnected" status responses to be sent.

    The fix that covers all scenarios is to handle both INVALID_INDEX and
    NOT_POWERED responses through the mgmt_powered() function. The
    INVALID_INDEX response sending from mgmt_index_removed() is left
    untouched since there are a couple of places not related to powering off
    or removing an adapter that call it (e.g. configuring a new bdaddr).

    Signed-off-by: Johan Hedberg
    Signed-off-by: Marcel Holtmann

    Johan Hedberg
     
  • If we're in the AUTO_OFF stage the powered_update_hci() function is
    responsible for doing the updates to the HCI state that were not done
    during the actual mgmt command handlers. One of the updates needing done
    is for BR/EDR SC support. This patch adds the missing HCI command for SC
    support to the powered_update_hci() function.

    Signed-off-by: Johan Hedberg
    Signed-off-by: Marcel Holtmann

    Johan Hedberg
     
  • When the channel switch has been made, a vif is now using
    the channel context which was reserved. When that happens,
    we need to update the channel context since its parameters
    may change.

    I hit a case in which I switched to a 40Mhz channel but the
    reserved channel context was still on 20Mhz. The rate control
    would try to send 40Mhz packets on a 20Mhz channel context and
    that made iwlwifi's firmware unhappy.

    Signed-off-by: Emmanuel Grumbach
    Signed-off-by: Johannes Berg

    Emmanuel Grumbach
     
  • If the userspace passes a malformed sched scan request (or a net
    detect wowlan configuration) by adding a NL80211_ATTR_SCHED_SCAN_MATCH
    attribute without any nested matchsets, a NULL pointer dereference
    will occur. Fix this by checking that we do have matchsets in our
    array before trying to access it.

    BUG: unable to handle kernel NULL pointer dereference at 0000000000000024
    IP: [] nl80211_parse_sched_scan.part.67+0x6e9/0x900 [cfg80211]
    PGD 865c067 PUD 865b067 PMD 0
    Oops: 0002 [#1] SMP
    Modules linked in: iwlmvm(O) iwlwifi(O) mac80211(O) cfg80211(O) compat(O) [last unloaded: compat]
    CPU: 2 PID: 2442 Comm: iw Tainted: G O 3.17.2 #31
    Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011
    task: ffff880013800790 ti: ffff880008d80000 task.ti: ffff880008d80000
    RIP: 0010:[] [] nl80211_parse_sched_scan.part.67+0x6e9/0x900 [cfg80211]
    RSP: 0018:ffff880008d838d0 EFLAGS: 00010293
    RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
    RDX: 000000000000143c RSI: 0000000000000000 RDI: ffff880008ee8dd0
    RBP: ffff880008d83948 R08: 0000000000000002 R09: 0000000000000019
    R10: ffff88001d1b3c40 R11: 0000000000000002 R12: ffff880019e85e00
    R13: 00000000fffffed4 R14: ffff880009757800 R15: 0000000000001388
    FS: 00007fa3b6d13700(0000) GS:ffff88003e200000(0000) knlGS:0000000000000000
    CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
    CR2: 0000000000000024 CR3: 0000000008670000 CR4: 00000000000006e0
    Stack:
    ffff880009757800 ffff880000000001 0000000000000000 ffff880008ee84e0
    0000000000000000 ffff880009757800 00000000fffffed4 ffff880008d83948
    ffffffff814689c9 ffff880009757800 ffff880008ee8000 0000000000000000
    Call Trace:
    [] ? nla_parse+0xb9/0x120
    [] nl80211_set_wowlan+0x75e/0x960 [cfg80211]
    [] ? mark_held_locks+0x75/0xa0
    [] genl_family_rcv_msg+0x18b/0x360
    [] ? trace_hardirqs_on+0xd/0x10
    [] genl_rcv_msg+0x84/0xc0
    [] ? genl_family_rcv_msg+0x360/0x360
    [] netlink_rcv_skb+0xa9/0xd0
    [] genl_rcv+0x28/0x40
    [] netlink_unicast+0x105/0x180
    [] netlink_sendmsg+0x34f/0x7a0
    [] ? kvm_clock_read+0x27/0x40
    [] sock_sendmsg+0x8d/0xc0
    [] ? might_fault+0xb9/0xc0
    [] ? might_fault+0x5e/0xc0
    [] ? verify_iovec+0x56/0xe0
    [] ___sys_sendmsg+0x3d0/0x3e0
    [] ? sched_clock_cpu+0x98/0xd0
    [] ? __do_page_fault+0x254/0x580
    [] ? up_read+0x1f/0x40
    [] ? __do_page_fault+0x254/0x580
    [] ? __fget_light+0x13d/0x160
    [] __sys_sendmsg+0x42/0x80
    [] SyS_sendmsg+0x12/0x20
    [] system_call_fastpath+0x16/0x1b

    Fixes: ea73cbce4e1f ("nl80211: fix scheduled scan RSSI matchset attribute confusion")
    Cc: stable@vger.kernel.org [3.15+]
    Signed-off-by: Luciano Coelho
    Signed-off-by: Johannes Berg

    Luciano Coelho
     
  • In the already-set and intersect case of a driver-hint, the previous
    wiphy regdomain was not freed before being reset with a copy of the
    cfg80211 regdomain.

    Cc: stable@vger.kernel.org
    Signed-off-by: Arik Nemtsov
    Acked-by: Luis R. Rodriguez
    Signed-off-by: Johannes Berg

    Arik Nemtsov
     
  • The VHT supported channel width field is a two bit integer, not a
    bitfield. cfg80211_chandef_usable() was interpreting it incorrectly and
    ended up rejecting 160 MHz channel width if the driver indicated support
    for both 160 and 80+80 MHz channels.

    Cc: stable@vger.kernel.org (3.16+)
    Fixes: 3d9d1d6656a73 ("nl80211/cfg80211: support VHT channel configuration")
    (however, no real drivers had 160 MHz support it until 3.16)
    Signed-off-by: Jouni Malinen
    Signed-off-by: Johannes Berg

    Jouni Malinen
     
  • As multicast-frames can't be fragmented, "dot11MulticastReceivedFrameCount"
    stopped being incremented after the use-after-free fix. Furthermore, the
    RX-LED will be triggered by every multicast frame (which wouldn't happen
    before) which wouldn't allow the LED to rest at all.

    Fixes https://bugzilla.kernel.org/show_bug.cgi?id=89431 which also had the
    patch.

    Cc: stable@vger.kernel.org
    Fixes: b8fff407a180 ("mac80211: fix use-after-free in defragmentation")
    Signed-off-by: Andreas Müller
    [rewrite commit message]
    Signed-off-by: Johannes Berg

    Andreas Müller
     
  • Avoid a case where we would access uninitialized stack data if the AP
    advertises HT support without 40MHz channel support.

    Cc: stable@vger.kernel.org
    Fixes: f3000e1b43f1 ("mac80211: fix broken use of VHT/20Mhz with some APs")
    Signed-off-by: Jes Sorensen
    Signed-off-by: Johannes Berg

    Jes Sorensen