aboutsummaryrefslogtreecommitdiff
path: root/net
AgeCommit message (Collapse)AuthorFilesLines
2012-11-07mac80211: fix TX error pathJohannes Berg1-0/+1
One error path in ieee80211_subif_start_xmit() will double-free the SKB. Set it to NULL to prevent that. This issue was introduced by my channel context changes. Signed-off-by: Johannes Berg <[email protected]>
2012-11-07mac80211: include export.h in aes_cmacEmmanuel Grumbach1-0/+1
This is needed since this file exports functions. Signed-off-by: Emmanuel Grumbach <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
2012-11-07mac80211: use kstrtoull return valueJohannes Berg1-1/+1
If kstrtoull() returns an error code (a value smaller than zero), use it since it can be an error other than -EINVAL. Signed-off-by: Johannes Berg <[email protected]>
2012-11-07mac80211: fix race in TKIP MIC test debugfs fileJohannes Berg1-2/+5
Accessing sdata->vif.bss_conf.bssid without any protection here is racy, use u.mgd.associated instead and lock the correct mutex for it. Signed-off-by: Johannes Berg <[email protected]>
2012-11-07mac80211: use mac_ptonJohannes Berg1-28/+2
Instead of implementing practically the same function (hwaddr_aton) use mac_pton. Signed-off-by: Johannes Berg <[email protected]>
2012-11-07nl80211: send the NL80211_ATTR_SSID in nl80211_send_iface()Antonio Quartulli1-0/+5
The userspace may want to know what is the current ssid that a given interface is using. This patch enables nl80211 to send the NL80211_ATTR_SSID attribute in nl80211_send_iface(). Signed-off-by: Antonio Quartulli <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
2012-11-07cfg80211: store the ssid into wirless_dev in AP modeAntonio Quartulli2-0/+3
Store the configured ssid in wdev->ssid when starting an AP Signed-off-by: Antonio Quartulli <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
2012-11-06htb: fix two bugsEric Dumazet1-12/+5
Commit 56b765b79e9 (htb: improved accuracy at high rates) introduced two bugs : 1) one bstats_update() was inadvertently removed from htb_dequeue_tree(), breaking statistics/rate estimation. 2) Missing qdisc_put_rtab() calls in htb_change_class(), leaking kernel memory, now struct htb_class no longer retains pointers to qdisc_rate_table structs. Since only rate is used, dont use qdisc_get_rtab() calls copying data we ignore anyway. Signed-off-by: Eric Dumazet <[email protected]> Cc: Vimalkumar <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-11-06mac80211: pass P2P powersave parameters to driverJohannes Berg3-0/+46
While connected to a GO, parse the P2P NoA attribute and pass the CT Window and opportunistic powersave parameters to the driver. Signed-off-by: Johannes Berg <[email protected]>
2012-11-06wireless: add utility function to get P2P attributeJohannes Berg1-0/+99
Parsing the P2P attributes can be tricky as their contents can be split across multiple (vendor) IEs. Thus, it's not possible to parse them like IEs (by returning a pointer to the data.) Instead, provide a function that copies the attribute data into a caller-provided buffer and returns the size needed (useful in case the buffer was too small.) Signed-off-by: Johannes Berg <[email protected]>
2012-11-05cfg80211: allow registering more than one beacon listenerBen Greear4-30/+74
The commit: commit 5e760230e42cf759bd923457ca2753aacf2e656e Author: Johannes Berg <[email protected]> Date: Fri Nov 4 11:18:17 2011 +0100 cfg80211: allow registering to beacons allowed only a single process to register for beacon events per wiphy. This breaks cases where a user may want two or more VIFs on a wiphy and run a seperate hostapd process on each vif. This patch allows multiple beacon listeners, fixing the regression. Signed-off-by: Ben Greear <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
2012-11-05mac80211: implement set_mcast_rate() callbackAntonio Quartulli1-0/+11
This new callback can be used to tune the rate to be used to send multicast frames. In the current state the multicast rate can be specified on IBSS/MESH joining only. This makes it impossible to select a custom multicast rate when then join command is sent by an external program (e.g. wpa_supplicant) Signed-off-by: Antonio Quartulli <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
2012-11-05nl/cfg80211: add the NL80211_CMD_SET_MCAST_RATE commandAntonio Quartulli1-0/+39
This command triggers a new callback: set_mcast_rate(). It enables the user to change the rate used to send multicast frames for vif configured as IBSS or MESH_POINT Signed-off-by: Antonio Quartulli <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
2012-11-05mac80211: sync acccess to tx_filtered/ps_tx_buf queuesArik Nemtsov1-0/+5
These are accessed without a lock when ending STA PSM. If the sta_cleanup timer accesses these lists at the same time, we might crash. This may fix some mysterious crashes we had during ieee80211_sta_ps_deliver_wakeup. Cc: [email protected] Signed-off-by: Arik Nemtsov <[email protected]> Signed-off-by: Ido Yariv <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
2012-11-05mac80211: send deauth only with channel contextJohannes Berg1-14/+18
When userspace asks to deauthenticate and we're just authenticated (or still authenticating) send a deauth frame instead of deleting the auth request. On the other hand, if we've just disassociated and therefore deleted all our state already, drop the deauth request because we no longer have a channel context to send it on. Signed-off-by: Johannes Berg <[email protected]>
2012-11-04SUNRPC: Clean up rpc_bind_new_programTrond Myklebust1-10/+8
We can and should use the rpc_create_args and __rpc_clone_client() to change the program and version number on the resulting rpc_client. Signed-off-by: Trond Myklebust <[email protected]>
2012-11-04SUNRPC: remove BUG_ON from rpc_call_syncWeston Andros Adamson1-1/+6
Use WARN_ON_ONCE instead of calling BUG_ON and return -EINVAL when RPC_TASK_ASYNC flag is passed to rpc_call_sync. Signed-off-by: Weston Andros Adamson <[email protected]> Signed-off-by: Trond Myklebust <[email protected]>
2012-11-04SUNRPC: remove BUG_ON in rpc_release_taskWeston Andros Adamson1-1/+1
Replace BUG_ON() with WARN_ON_ONCE(). Signed-off-by: Weston Andros Adamson <[email protected]> Signed-off-by: Trond Myklebust <[email protected]>
2012-11-04SUNRPC: remove BUG_ON in svc_delete_xprtWeston Andros Adamson1-1/+1
Replace BUG_ON() with WARN_ON_ONCE(). Signed-off-by: Weston Andros Adamson <[email protected]> Signed-off-by: Trond Myklebust <[email protected]>
2012-11-04SUNRPC: remove BUG_ONs checking RPC_IS_QUEUEDWeston Andros Adamson1-2/+6
Replace two BUG_ON() calls with WARN_ON_ONCE() and early returns. Signed-off-by: Weston Andros Adamson <[email protected]> Signed-off-by: Trond Myklebust <[email protected]>
2012-11-04SUNRPC: remove BUG_ON from __rpc_sleep_on_priorityWeston Andros Adamson1-1/+1
Replace BUG_ON() with WARN_ON_ONCE(). Signed-off-by: Weston Andros Adamson <[email protected]> Signed-off-by: Trond Myklebust <[email protected]>
2012-11-04SUNRPC: remove BUG_ON in svc_registerWeston Andros Adamson1-1/+3
Instead of calling BUG_ON(), do a WARN_ON_ONCE() and return -EINVAL. Signed-off-by: Weston Andros Adamson <[email protected]> Signed-off-by: Trond Myklebust <[email protected]>
2012-11-04SUNRPC: remove BUG_ON from encode_rpcb_stringWeston Andros Adamson1-1/+4
Replace BUG_ON() with WARN_ON_ONCE() and truncate the encoded string if len > max. Signed-off-by: Weston Andros Adamson <[email protected]> Signed-off-by: Trond Myklebust <[email protected]>
2012-11-04SUNRPC: remove BUG_ON from bc_mallocWeston Andros Adamson1-2/+4
Replace BUG_ON() with WARN_ON_ONCE() and NULL return - the caller will handle this like a memory allocation failure. Signed-off-by: Weston Andros Adamson <[email protected]> Signed-off-by: Trond Myklebust <[email protected]>
2012-11-04SUNRPC: remove BUG_ON in xdr_shrink_bufheadWeston Andros Adamson1-1/+4
Replace bounds checking BUG_ON() with a WARN_ON_ONCE() and resetting the requested len to the max. Signed-off-by: Weston Andros Adamson <[email protected]> Signed-off-by: Trond Myklebust <[email protected]>
2012-11-04SUNRPC: remove BUG_ONs checking RPCSVC_MAXPAGESWeston Andros Adamson2-2/+7
Replace two bounds checking BUG_ON() calls with WARN_ON_ONCE() and resetting the requested size to RPCSVC_MAXPAGES. Signed-off-by: Weston Andros Adamson <[email protected]> Signed-off-by: Trond Myklebust <[email protected]>
2012-11-04SUNRPC: remove BUG_ON in svc_xprt_receivedWeston Andros Adamson1-1/+3
Replace BUG_ON() with a WARN_ON_ONCE() and early return. Signed-off-by: Weston Andros Adamson <[email protected]> Signed-off-by: Trond Myklebust <[email protected]>
2012-11-04SUNRPC: remove BUG_ONs from *_reclassify_socket*Weston Andros Adamson2-4/+9
Replace multiple BUG_ON() calls with WARN_ON_ONCE() and early return when sanity checking socket ownership (lock). The bind call will fail if the socket was unsuccessfully reclassified. Signed-off-by: Weston Andros Adamson <[email protected]> Signed-off-by: Trond Myklebust <[email protected]>
2012-11-04SUNRPC: remove BUG_ON from svc_pool_map_set_cpumaskWeston Andros Adamson1-1/+3
Replace BUG_ON() with a WARN() and early return. Signed-off-by: Weston Andros Adamson <[email protected]> Signed-off-by: Trond Myklebust <[email protected]>
2012-11-04SUNRPC: remove two BUG_ON assertsWeston Andros Adamson1-2/+2
Replace two BUG_ON() calls checking the RPC_BC_PA_IN_USE flag with WARN_ON_ONCE(). Signed-off-by: Weston Andros Adamson <[email protected]> Signed-off-by: Trond Myklebust <[email protected]>
2012-11-04SUNRPC: remove BUG_ON in rpc_put_sb_netWeston Andros Adamson1-1/+1
Replace BUG_ON() with WARN_ON() - the condition is definitely a misuse of the API, but shouldn't cause a crash. Signed-off-by: Weston Andros Adamson <[email protected]> Signed-off-by: Trond Myklebust <[email protected]>
2012-11-04SUNRPC: remove BUG_ON calls from cache_readWeston Andros Adamson1-2/+2
Replace BUG_ON() with WARN_ON_ONCE() in two parts of cache_read(). Signed-off-by: Weston Andros Adamson <[email protected]> Signed-off-by: Trond Myklebust <[email protected]>
2012-11-04SUNRPC: remove BUG_ON from bc_sendWeston Andros Adamson1-1/+1
Replace BUG_ON() with WARN_ON_ONCE(). The error condition is a simple ref counting sanity check and the following code will not free anything until final put. Signed-off-by: Weston Andros Adamson <[email protected]> Signed-off-by: Trond Myklebust <[email protected]>
2012-11-04SUNRPC: remove BUG_ON from xprt_destroy_backchannelWeston Andros Adamson1-1/+4
If max_reqs is 0, do nothing besides the usual dprintks. Signed-off-by: Weston Andros Adamson <[email protected]> Signed-off-by: Trond Myklebust <[email protected]>
2012-11-04SUNRPC: remove BUG_ON from rpc_sleep_on*Weston Andros Adamson1-2/+12
Replace BUG_ON() with WARN_ON_ONCE() and clean up after inactive task. Signed-off-by: Weston Andros Adamson <[email protected]> Signed-off-by: Trond Myklebust <[email protected]>
2012-11-04SUNRPC: remove BUG_ON from call_bc_transmitWeston Andros Adamson1-1/+0
Remove redundant BUG_ON(). Signed-off-by: Weston Andros Adamson <[email protected]> Signed-off-by: Trond Myklebust <[email protected]>
2012-11-04SUNRPC: remove BUG_ON from call_bc_transmitWeston Andros Adamson1-1/+1
Replace BUG_ON() with WARN_ON_ONCE(). Signed-off-by: Weston Andros Adamson <[email protected]> Signed-off-by: Trond Myklebust <[email protected]>
2012-11-04SUNRPC: remove BUG_ON from call_transmitWeston Andros Adamson1-1/+0
Remove unneeded BUG_ON() Signed-off-by: Weston Andros Adamson <[email protected]> Signed-off-by: Trond Myklebust <[email protected]>
2012-11-04SUNRPC: remove BUG_ON from rpc_run_bc_taskWeston Andros Adamson1-1/+1
Replace BUG_ON() with WARN_ON_ONCE() - rpc_run_bc_task calls rpc_init_task() then increments the tk_count, so this is a simple sanity check that if hit once would hit every time this code path is executed. Signed-off-by: Weston Andros Adamson <[email protected]> Signed-off-by: Trond Myklebust <[email protected]>
2012-11-04SUNRPC: remove BUG_ON in __rpc_clnt_handle_eventWeston Andros Adamson1-2/+5
Print a KERN_INFO message before rpc_d_lookup_sb returns NULL, like other error paths in that function. Signed-off-by: Weston Andros Adamson <[email protected]> Signed-off-by: Trond Myklebust <[email protected]>
2012-11-04SUNRPC: add WARN_ON_ONCE for potential deadlockWeston Andros Adamson1-0/+7
rpc_shutdown_client should never be called from a workqueue context. If it is, it could deadlock looping forever trying to kill tasks that are assigned to the same kworker thread (and will never run rpc_exit_task). Signed-off-by: Weston Andros Adamson <[email protected]> Signed-off-by: Trond Myklebust <[email protected]>
2012-11-04bridge: Avoid 'statement with no effect' compiler warningsLee Jones1-4/+4
Instead of issuing (0) statements when !CONFIG_SYSFS which will cause 'warning: ', we'll use inline statements instead. This will effectively do the same thing, but suppress any unnecessary warnings. Cc: Stephen Hemminger <[email protected]> Cc: [email protected] Cc: [email protected] Signed-off-by: Lee Jones <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-11-04net: inet_diag -- Return error code if protocol handler is missedCyrill Gorcunov1-1/+4
We've observed that in case if UDP diag module is not supported in kernel the netlink returns NLMSG_DONE without notifying a caller that handler is missed. This patch makes __inet_diag_dump to return error code instead. So as example it become possible to detect such situation and handle it gracefully on userspace level. Signed-off-by: Cyrill Gorcunov <[email protected]> CC: David Miller <[email protected]> CC: Eric Dumazet <[email protected]> CC: Pavel Emelyanov <[email protected]> Acked-by: Pavel Emelyanov <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-11-03Merge tag 'nfs-for-3.7-4' of git://git.linux-nfs.org/projects/trondmy/linux-nfsLinus Torvalds1-1/+1
Pull NFS client bugfixes from Trond Myklebust: - Fix a bunch of deadlock situations: * State recovery can deadlock if we fail to release sequence ids before scheduling the recovery thread. * Calling deactivate_super() from an RPC workqueue thread can deadlock because of the call to rpc_shutdown_client. - Display the device name correctly in /proc/*/mounts - Fix a number of incorrect error return values: * When NFSv3 mounts fail due to a timeout. * On NFSv4.1 backchannel setup failure * On NFSv4 open access checks - pnfs_find_alloc_layout() must check the layout pointer for NULL - Fix a regression in the legacy DNS resolved * tag 'nfs-for-3.7-4' of git://git.linux-nfs.org/projects/trondmy/linux-nfs: NFS4: nfs4_opendata_access should return errno NFSv4: Initialise the NFSv4.1 slot table highest_used_slotid correctly SUNRPC: return proper errno from backchannel_rqst NFS: add nfs_sb_deactive_async to avoid deadlock nfs: Show original device name verbatim in /proc/*/mount{s,info} nfsv3: Make v3 mounts fail with ETIMEDOUTs instead EIO on mountd timeouts nfs: Check whether a layout pointer is NULL before free it NFS: fix bug in legacy DNS resolver. NFSv4: nfs4_locku_done must release the sequence id NFSv4.1: We must release the sequence id when we fail to get a session slot NFS: Wait for session recovery to finish before returning
2012-11-03net: fix bridge notify hook to manage flags correctlyJohn Fastabend1-8/+18
The bridge notify hook rtnl_bridge_notify() was not handling the case where the master flags was set or with both flags set. First flags are not being passed correctly and second the logic to parse them is broken. This patch passes the original flags value and fixes the logic. Reported-by: Ben Hutchings <[email protected]> Signed-off-by: John Fastabend <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-11-03rtnetlink: Use nlmsg type RTM_NEWNEIGH from dflt fdb dumpJohn Fastabend1-1/+2
Change the dflt fdb dump handler to use RTM_NEWNEIGH to be compatible with bridge dump routines. The dump reply from the network driver handlers should match the reply from bridge handler. The fact they were not in the ixgbe case was effectively a bug. This patch resolves it. Applications that were not checking the nlmsg type will continue to work. And now applications that do check the type will work as expected. Signed-off-by: John Fastabend <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-11-03htb: improved accuracy at high ratesVimalkumar1-38/+90
Current HTB (and TBF) uses rate table computed by the "tc" userspace program, which has the following issue: The rate table has 256 entries to map packet lengths to token (time units). With TSO sized packets, the 256 entry granularity leads to loss/gain of rate, making the token bucket inaccurate. Thus, instead of relying on rate table, this patch explicitly computes the time and accounts for packet transmission times with nanosecond granularity. This greatly improves accuracy of HTB with a wide range of packet sizes. Example: tc qdisc add dev $dev root handle 1: \ htb default 1 tc class add dev $dev classid 1:1 parent 1: \ rate 5Gbit mtu 64k Here is an example of inaccuracy: $ iperf -c host -t 10 -i 1 With old htb: eth4: 34.76 Mb/s In 5827.98 Mb/s Out - 65836.0 p/s In 481273.0 p/s Out [SUM] 9.0-10.0 sec 669 MBytes 5.61 Gbits/sec [SUM] 0.0-10.0 sec 6.50 GBytes 5.58 Gbits/sec With new htb: eth4: 28.36 Mb/s In 5208.06 Mb/s Out - 53704.0 p/s In 430076.0 p/s Out [SUM] 9.0-10.0 sec 594 MBytes 4.98 Gbits/sec [SUM] 0.0-10.0 sec 5.80 GBytes 4.98 Gbits/sec The bits per second on the wire is still 5200Mb/s with new HTB because qdisc accounts for packet length using skb->len, which is smaller than total bytes on the wire if GSO is used. But that is for another patch regardless of how time is accounted. Many thanks to Eric Dumazet for review and feedback. Signed-off-by: Vimalkumar <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-11-03tipc: do not use tasklet_disable before tasklet_killXiaotian Feng1-1/+0
If tasklet_disable() is called before related tasklet handled, tasklet_kill will never be finished. tasklet_kill is enough. Signed-off-by: Xiaotian Feng <[email protected]> Cc: Jon Maloy <[email protected]> Cc: Allan Stephens <[email protected]> Cc: "David S. Miller" <[email protected]> Cc: [email protected] Cc: [email protected] Signed-off-by: David S. Miller <[email protected]>
2012-11-03ipv6: introduce ip6_rt_put()Amerigo Wang10-26/+23
As suggested by Eric, we could introduce a helper function for ipv6 too, to avoid checking if rt is NULL before dst_release(). Cc: Eric Dumazet <[email protected]> Cc: David S. Miller <[email protected]> Signed-off-by: Cong Wang <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-11-03sctp: Clean up type-punning in sctp_cmd_t unionNeil Horman2-25/+23
Lots of points in the sctp_cmd_interpreter function treat the sctp_cmd_t arg as a void pointer, even though they are written as various other types. Theres no need for this as doing so just leads to possible type-punning issues that could cause crashes, and if we remain type-consistent we can actually just remove the void * member of the union entirely. Change Notes: v2) * Dropped chunk that modified SCTP_NULL to create a marker pattern should anyone try to use a SCTP_NULL() assigned sctp_arg_t, Assigning to .zero provides the same effect and should be faster, per Vlad Y. v3) * Reverted part of V2, opting to use memset instead of .zero, so that the entire union is initalized thus avoiding the i164 speculative load problems previously encountered, per Dave M.. Also rewrote SCTP_[NO]FORCE so as to use common infrastructure a little more Signed-off-by: Neil Horman <[email protected] CC: Vlad Yasevich <[email protected]> CC: "David S. Miller" <[email protected]> CC: [email protected] Signed-off-by: David S. Miller <[email protected]>