20 May, 2011
14 commits
-
Signed-off-by: David S. Miller
-
I backed off from trying to just eliminate this variable, since
transforming atomic_inc_return() into atomic_inc() takes away
the memory barriers.Signed-off-by: David S. Miller
-
Signed-off-by: David S. Miller
-
Signed-off-by: David S. Miller
-
Signed-off-by: David S. Miller
-
I checked the history and this has been like this since the
beginning of time.Signed-off-by: David S. Miller
-
Probably just cut and pasted from the other parse_opts() implementations
in the 9p sources.Signed-off-by: David S. Miller
-
Signed-off-by: David S. Miller
-
v3 -> v4: fix return boolean false instead of 0 for ic_is_init_dev
Currently the ip auto configuration has a hardcoded delay of 1 second.
When (ethernet) link takes longer to come up (e.g. more than 3 seconds),
nfs root may not be found.Remove the hardcoded delay, and wait for carrier on at least one network
device.Signed-off-by: Micha Nelissen
Cc: David Miller
Signed-off-by: David S. Miller -
During the sctp_close() call, we do not use rcu primitives to
destroy the address list attached to the endpoint. At the same
time, we do the removal of addresses from this list before
attempting to remove the socket from the port hashAs a result, it is possible for another process to find the socket
in the port hash that is in the process of being closed. It then
proceeds to traverse the address list to find the conflict, only
to have that address list suddenly disappear without rcu() critical
section.Fix issue by closing address list removal inside RCU critical
section.Race can result in a kernel crash with general protection fault or
kernel NULL pointer dereference:kernel: general protection fault: 0000 [#1] SMP
kernel: RIP: 0010:[] [] sctp_bind_addr_conflict+0x64/0x82 [sctp]
kernel: Call Trace:
kernel: [] ? sctp_get_port_local+0x17b/0x2a3 [sctp]
kernel: [] ? sctp_bind_addr_match+0x33/0x68 [sctp]
kernel: [] ? sctp_do_bind+0xd3/0x141 [sctp]
kernel: [] ? sctp_bindx_add+0x4d/0x8e [sctp]
kernel: [] ? sctp_setsockopt_bindx+0x112/0x4a4 [sctp]
kernel: [] ? generic_file_aio_write+0x7f/0x9b
kernel: [] ? sctp_setsockopt+0x14f/0xfee [sctp]
kernel: [] ? do_sync_write+0xab/0xeb
kernel: [] ? fsnotify+0x239/0x282
kernel: [] ? alloc_file+0x18/0xb1
kernel: [] ? compat_sys_setsockopt+0x1a5/0x1d9
kernel: [] ? compat_sys_socketcall+0x143/0x1a4
kernel: [] ? sysenter_dispatch+0x7/0x32Signed-off-by: Jacek Luczak
Acked-by: Vlad Yasevich
CC: Eric Dumazet
Reviewed-by: Eric Dumazet
Signed-off-by: David S. Miller -
ipv6 has per device ICMP SNMP counters, taking too much space because
they use percpu storage.needed size per device is :
(512+4)*sizeof(long)*number_of_possible_cpus*2On a 32bit kernel, 16 possible cpus, this wastes more than 64kbytes of
memory per ipv6 enabled network device, taken in vmalloc pool.Since ICMP messages are rare, just use shared counters (atomic_long_t)
Per network space ICMP counters are still using percpu memory, we might
also convert them to shared counters in a future patch.Signed-off-by: Eric Dumazet
CC: Denys Fedoryshchenko
Signed-off-by: David S. Miller -
The characters in a line should be no more than 80.
Signed-off-by: Changli Gao
Signed-off-by: David S. Miller -
As these functions are only used in this file.
Signed-off-by: Changli Gao
Signed-off-by: David S. Miller
19 May, 2011
4 commits
-
Signed-off-by: David S. Miller
-
This will next trickle down to rt_bind_peer().
Signed-off-by: David S. Miller
-
This way the caller can get at the fully resolved fl4->{daddr,saddr}
etc.Signed-off-by: David S. Miller
-
It's way past it's usefulness. And this gets rid of a bunch
of stray ->rt_{dst,src} references.Even the comment documenting the macro was inaccurate (stated
default was 1 when it's 0).If reintroduced, it should be done properly, with dynamic debug
facilities.Signed-off-by: David S. Miller
18 May, 2011
9 commits
-
Commit 7fee226ad239 (add a noref bit on skb dst) forgot to use
skb_dst_force() on packets queued in sk_error_queueThis triggers following warning, for applications using IP_CMSG_PKTINFO
receiving one error status------------[ cut here ]------------
WARNING: at include/linux/skbuff.h:457 ip_cmsg_recv_pktinfo+0xa6/0xb0()
Hardware name: 2669UYD
Modules linked in: isofs vboxnetadp vboxnetflt nfsd ebtable_nat ebtables
lib80211_crypt_ccmp uinput xcbc hdaps tp_smapi thinkpad_ec radeonfb fb_ddc
radeon ttm drm_kms_helper drm ipw2200 intel_agp intel_gtt libipw i2c_algo_bit
i2c_i801 agpgart rng_core cfbfillrect cfbcopyarea cfbimgblt video raid10 raid1
raid0 linear md_mod vboxdrv
Pid: 4697, comm: miredo Not tainted 2.6.39-rc6-00569-g5895198-dirty #22
Call Trace:
[] ? printk+0x1d/0x1f
[] warn_slowpath_common+0x72/0xa0
[] ? ip_cmsg_recv_pktinfo+0xa6/0xb0
[] ? ip_cmsg_recv_pktinfo+0xa6/0xb0
[] warn_slowpath_null+0x20/0x30
[] ip_cmsg_recv_pktinfo+0xa6/0xb0
[] ip_cmsg_recv+0x127/0x260
[] ? skb_dequeue+0x4d/0x70
[] ? skb_copy_datagram_iovec+0x53/0x300
[] ? sub_preempt_count+0x24/0x50
[] ip_recv_error+0x23d/0x270
[] udp_recvmsg+0x264/0x2b0
[] inet_recvmsg+0xd9/0x130
[] sock_recvmsg+0xf2/0x120
[] ? might_fault+0x4b/0xa0
[] ? verify_iovec+0x4c/0xc0
[] ? sock_recvmsg_nosec+0x100/0x100
[] __sys_recvmsg+0x114/0x1e0
[] ? __lock_acquire+0x365/0x780
[] ? fget_light+0xa6/0x3e0
[] ? fget_light+0xbf/0x3e0
[] ? fget_light+0x2e/0x3e0
[] sys_recvmsg+0x39/0x60Close bug https://bugzilla.kernel.org/show_bug.cgi?id=34622
Reported-by: Witold Baryluk
Signed-off-by: Eric Dumazet
CC: Stephen Hemminger
Signed-off-by: David S. Miller -
Conflicts:
drivers/net/vmxnet3/vmxnet3_ethtool.c
net/core/dev.c -
Noticed by Joe Perches.
Signed-off-by: David S. Miller
-
Signed-off-by: Michał Mirosław
Signed-off-by: David S. Miller -
Cool, how about we make 'Features changed' debug as well?
This way userspace can't fill up the log just by tweaking tun features
with an ioctl.Signed-off-by: Michael S. Tsirkin
Signed-off-by: David S. Miller -
recvmmsg fails on a raw socket with EINVAL. The reason for this is
packet_recvmsg checks the incoming flags:err = -EINVAL;
if (flags & ~(MSG_PEEK|MSG_DONTWAIT|MSG_TRUNC|MSG_CMSG_COMPAT|MSG_ERRQUEUE))
goto out;This patch strips out MSG_WAITFORONE when calling recvmmsg which
fixes the issue.Signed-off-by: Anton Blanchard
Cc: stable@kernel.org [2.6.34+]
Signed-off-by: David S. Miller -
If CONFIG_PROC_SYSCTL=n the building process fails:
ping.c:(.text+0x52af3): undefined reference to `inet_get_ping_group_range_net'
Moved inet_get_ping_group_range_net() to ping.c.
Reported-by: Randy Dunlap
Signed-off-by: Vasiliy Kulikov
Acked-by: Eric Dumazet
Acked-by: Randy Dunlap
Signed-off-by: David S. Miller -
Using plain hlist_del() in dev_change_name() is wrong since a
concurrent reader can crash trying to dereference LIST_POISON1.Bug introduced in commit 72c9528bab94 (net: Introduce
dev_get_by_name_rcu())Signed-off-by: Eric Dumazet
Signed-off-by: David S. Miller
17 May, 2011
13 commits
-
net/bluetooth/l2cap_core.c: In function ‘l2cap_recv_frame’:
net/bluetooth/l2cap_core.c:3758:15: warning: ‘sk’ may be used uninitialized in this function
net/bluetooth/l2cap_core.c:3758:15: note: ‘sk’ was declared here
net/bluetooth/l2cap_core.c:3791:15: warning: ‘sk’ may be used uninitialized in this function
net/bluetooth/l2cap_core.c:3791:15: note: ‘sk’ was declared hereSigned-off-by: David S. Miller
-
…wireless-next-2.6 into for-davem
Conflicts:
drivers/net/wireless/iwlwifi/iwl-agn-tx.c
net/mac80211/sta_info.h -
Those reduced to DEBUG can possibly be triggered by unprivileged processes
and are nothing exceptional. Illegal checksum combinations can only be
caused by driver bug, so promote those messages to WARN.Since GSO without SG will now only cause DEBUG message from
netdev_fix_features(), remove the workaround from register_netdevice().Signed-off-by: Michał Mirosław
Signed-off-by: David S. Miller -
We plan to remove cpu_xx() old api later. Thus this patch
convert it.This patch has no functional change.
Signed-off-by: KOSAKI Motohiro
Signed-off-by: David S. Miller -
Commit 6623e3b24a5e (ipv4: IP defragmentation must be ECN aware) was an
attempt to not lose "Congestion Experienced" (CE) indications when
performing datagram defragmentation.Stefanos Harhalakis raised the point that RFC 3168 requirements were not
completely met by this commit.In particular, we MUST detect invalid combinations and eventually drop
illegal frames.Reported-by: Stefanos Harhalakis
Signed-off-by: Eric Dumazet
Signed-off-by: David S. Miller -
Currently the devices that have already stripped IEEE 802.11
header from the AMSDU SKB can not use ieee80211_amsdu_to_8023s
routine. This patch enhances ieee80211_amsdu_to_8023s() API by
changing mandatory removing of IEEE 802.11 header from AMSDU
to optional.Signed-off-by: Yogesh Ashok Powar
Signed-off-by: Bing Zhao
Signed-off-by: John W. Linville -
These definitions need to be exposed now that we can set the peer link
states via NL80211_ATTR_STA_PLINK_STATE. They were already being
(opaquely) reported by NL80211_STA_INFO_PLINK_STATE.Signed-off-by: Javier Cardona
Signed-off-by: John W. Linville -
The list_for_each_entry loop can fail, in which case the list element is
not removed from the list rfkill_fds. Since this list is not accessed by
the loop, the addition of &data->list into the list is just moved after the
loop.The sematic match that finds this problem is as follows:
(http://coccinelle.lip6.fr/)//
@@
expression E,E1,E2;
identifier l;
@@*list_add(&E->l,E1);
... when != E1
when != list_del(&E->l)
when != list_del_init(&E->l)
when != E = E2
*kfree(E);//Signed-off-by: Julia Lawall
Signed-off-by: John W. Linville -
This adds sparse RCU annotations to most of
mac80211, only the mesh code remains to be
done.Due the the previous patches, the annotations
are pretty simple. The only thing that this
actually changes is removing the RCU usage of
key->sta in debugfs since this pointer isn't
actually an RCU-managed pointer (it only has
a single assignment done before the key even
goes live). As that is otherwise harmless, I
decided to make it part of this patch.Signed-off-by: Johannes Berg
Signed-off-by: John W. Linville -
During my quest to make mac80211 not have any RCU
warnings from sparse, I came across the a-MPDU code
again and it wasn't quite clear why it isn't racy.
So instead of assigning the tid_tx array with just
the spinlock held in ieee80211_start_tx_ba_session
use a separate temporary array protected only by
the spinlock and protect all assignments to the
"live" array by both the spinlock and the mutex so
that other code is easily verified to be correct.Due to pointer assignment atomicity I don't think
this is a real issue, but I'm not sure, especially
on Alpha the current code might be problematic.Signed-off-by: Johannes Berg
Signed-off-by: John W. Linville -
Add the ability to advertise interface combinations in nl80211.
This allows the driver to indicate what the combinations are
that it supports. "Combinations" of just a single interface are
implicit, as previously. Note that cfg80211 will enforce that
the restrictions are met, but not for all drivers yet (once all
drivers are updated, we can remove the flag and enforce for all).When no combinations are actually supported, an empty list will
be exported so that userspace can know if the kernel exported
this info or not (although it isn't clear to me what tools using
the info should do if the kernel didn't export it).Since some interface types are purely virtual/software and don't
fit the restrictions, those are exposed in a new list of pure SW
types, not subject to restrictions. This mainly exists to handle
AP-VLAN and monitor interfaces in mac80211.Signed-off-by: Johannes Berg
Signed-off-by: John W. Linville -
At these points we have a fully filled in value via the IP
header the form of ip_hdr(skb)->saddrSigned-off-by: David S. Miller