- Feb 24, 2008
-
-
David S. Miller authored
MAC_FMT had only one user and we tried to get rid of that, but this created more problems than it solved. As a result, this reverts three commits: 235365f3 ("net/8021q/vlan_dev.c: Use print_mac."), fea5fa87 ("[NET]: Remove MAC_FMT"), and 8f789c48 ("[NET]: Elminate spurious print_mac() calls.") Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Pavel Emelyanov authored
The neigh_hash_grow() may update the tbl->hash_rnd value, which is used in all tbl->hash callbacks to calculate the hashval. Two lookup routines may race with this, since they call the ->hash callback without the tbl->lock held. Since the hash_rnd is changed with this lock write-locked moving the calls to ->hash under this lock read-locked closes this gap. Signed-off-by:
Pavel Emelyanov <xemul@openvz.org> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Thomas Graf authored
RTM_NEWLINK allows for already existing links to be modified. For this purpose do_setlink() is called which expects address attributes with a payload length of at least dev->addr_len. This patch adds the necessary validation for the RTM_NEWLINK case. The address length for links to be created is not checked for now as the actual attribute length is used when copying the address to the netdevice structure. It might make sense to report an error if less than addr_len bytes are provided but enforcing this might break drivers trying to be smart with not transmitting all zero addresses. Signed-off-by:
Thomas Graf <tgraf@suug.ch> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Feb 20, 2008
-
-
Denis V. Lunev authored
release_net is missed on the error path in pneigh_lookup. Signed-off-by:
Denis V. Lunev <den@openvz.org> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Pavel Emelyanov authored
This counter is currently write-only. Drawing an analogy with the similar tcp counter, I think that this one should be pointed by the sockets_allocated members of sctp_prot and sctpv6_prot. Signed-off-by:
Pavel Emelyanov <xemul@openvz.org> Acked-by:
Vlad Yasevich <vladislav.yasevich@hp.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Jan Engelhardt authored
The host address parts need to be converted to host-endian first before arithmetic makes any sense on them. Signed-off-by:
Jan Engelhardt <jengelh@computergmbh.de> Signed-off-by:
Patrick McHardy <kaber@trash.net> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Jan Engelhardt authored
By allocating ->hinfo, we already have the needed indirection to cope with the per-cpu xtables struct match_entry. [Patrick: do this now before the revision 1 struct is used by userspace] Signed-off-by:
Jan Engelhardt <jengelh@computergmbh.de> Signed-off-by:
Patrick McHardy <kaber@trash.net> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Joonwoo Park authored
http://bugzilla.kernel.org/show_bug.cgi?id=9920 The function skb_make_writable returns true or false. Signed-off-by:
Joonwoo Park <joonwpark81@gmail.com> Signed-off-by:
Patrick McHardy <kaber@trash.net> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Pavel Emelyanov authored
The int ret variable is used only to trigger the BUG_ON() after the skb_copy_bits() call, so check the call failure directly and drop the variable. Signed-off-by:
Pavel Emelyanov <xemul@openvz.org> Signed-off-by:
Patrick McHardy <kaber@trash.net> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Patrick McHardy authored
As reported by Tomas Simonaitis <tomas.simonaitis@gmail.com>, inserting new data in skbs queued over {ip,ip6,nfnetlink}_queue triggers a SKB_LINEAR_ASSERT in skb_put(). Going back through the git history, it seems this bug is present since at least 2.6.12-rc2, probably even since the removal of skb_linearize() for netfilter. Linearize non-linear skbs through skb_copy_expand() when enlarging them. Tested by Thomas, fixes bugzilla #9933. Signed-off-by:
Patrick McHardy <kaber@trash.net> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Adrian Bunk authored
Unless I miss a guaranteed relation between between "f" and "new_fa->fa_info" this patch is required for fixing a NULL dereference introduced by commit a6501e08 ("[IPV4] FIB_HASH: Reduce memory needs and speedup lookups") and spotted by the Coverity checker. Eric Dumazet says: Hum, you are right, kmem_cache_free() doesnt allow a NULL object, like kfree() does. Signed-off-by:
Adrian Bunk <bunk@kernel.org> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Adrian Bunk authored
The Coverity checker spotted that less memory than required was allocated. Signed-off-by:
Adrian Bunk <bunk@kernel.org> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Thomas Graf authored
IFLA_LINK is no longer a write-only attribute on the kernel side and must thus be validated. Same goes for the newly introduced IFLA_LINKINFO. Fixes undefined behaviour if either of the attributes are not well formed. Signed-off-by:
Thomas Graf <tgraf@suug.ch> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Feb 19, 2008
-
-
Jorge Boncompte [DTI2] authored
Commit a0a400d7 ("[NET]: dev_mcast: add multicast list synchronization helpers") from you introduced a new field "da_synced" to struct dev_addr_list that is not properly initialized to 0. So when any of the current users (8021q, macvlan, mac80211) calls dev_mc_sync/unsync they mess the address list for both devices. The attached patch fixed it for me and avoid future problems. Signed-off-by:
Jorge Boncompte [DTI2] <jorge@dti2.net> Signed-off-by:
Patrick McHardy <kaber@trash.net> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@openvz.org> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Denis V. Lunev authored
The result of the ip_route_output is not assigned to skb. This means that - it is leaked - possible OOPS below dereferrencing skb->dst - no ICMP message for this case Signed-off-by:
Denis V. Lunev <den@openvz.org> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Dave Young authored
hci conn child devices other than rfcomm tty should not be moved here. This is my lost, thanks for Barnaby's reporting and testing. Signed-off-by:
Dave Young <hidave.darkstar@gmail.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Dave Young authored
Move hci_dev_put to del_conn to avoid hci dev going away before hci conn. Signed-off-by:
Dave Young <hidave.darkstar@gmail.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Feb 18, 2008
-
-
David S. Miller authored
net/bluetooth/hci_sysfs.c: In function ‘del_conn’: net/bluetooth/hci_sysfs.c:339: warning: suggest parentheses around assignment used as truth value Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Joe Perches authored
Remove direct use of MAC_FMT Signed-off-by:
Joe Perches <joe@perches.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
YOSHIFUJI Hideaki authored
Keep ordering of policy entries with same selector in xfrm_dst_hash_transfer(). Issue should not appear in usual cases because multiple policy entries with same selector are basically not allowed so far. Bug was pointed out by Sebastien Decugis <sdecugis@hongo.wide.ad.jp>. We could convert bydst from hlist to list and use list_add_tail() instead. Signed-off-by:
YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Acked-by:
Sebastien Decugis <sdecugis@hongo.wide.ad.jp> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
S.Çağlar Onur authored
The functions time_before, time_before_eq, time_after, and time_after_eq are more robust for comparing jiffies against other values. So following patch implements usage of the time_after() macro, defined at linux/jiffies.h, which deals with wrapping correctly Signed-off-by:
S.Çağlar Onur <caglar@pardus.org.tr> Acked-by:
Marcel Holtmann <marcel@holtmann.org> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Wang Chen authored
Rusty hardcoded the old module code. We can remove it now. Signed-off-by:
Wang Chen <wangchen@cn.fujitsu.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Pavel Emelyanov authored
Everything that is called from netlbl_init() can be marked with __init. This moves 620 bytes from .text section to .text.init one. Signed-off-by:
Pavel Emelyanov <xemul@openvz.org> Acked-by:
Paul Moore <paul.moore@hp.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Pavel Emelyanov authored
Turning them to array and registration in a loop saves 80 lines of code and ~300 bytes from text section. Signed-off-by:
Pavel Emelyanov <xemul@openvz.org> Acked-by:
Paul Moore <paul.moore@hp.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Jarek Poplawski authored
According to some OOPS reports ax25_kick tries to clone NULL skbs sometimes. It looks like a race with ax25_clear_queues(). Probably there is no need to add more than a simple check for this yet. Another report suggested there are probably also cases where ax25 ->paclen == 0 can happen in ax25_output(); this wasn't confirmed during testing but let's leave this debugging check for some time. Reported-and-tested-by:
Jann Traschewski <jann@gmx.de> Signed-off-by:
Jarek Poplawski <jarkao2@gmail.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Kris Katterjohn authored
Signed-off-by:
Kris Katterjohn <katterjohn@gmail.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Uwe Kleine-König authored
Make the indented lines aligned in the output (not in the code). Signed-off-by:
Uwe Kleine-Koenig <Uwe.Kleine-Koenig@digi.com> Signed-off-by:
Andrew Morton <akpm@linux-foundation.org> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Julia Lawall authored
if (...) BUG(); should be replaced with BUG_ON(...) when the test has no side-effects to allow a definition of BUG_ON that drops the code completely. The semantic patch that makes this change is as follows: (http://www.emn.fr/x-info/coccinelle/ ) // <smpl> @ disable unlikely @ expression E,f; @@ ( if (<... f(...) ...>) { BUG(); } | - if (unlikely(E)) { BUG(); } + BUG_ON(E); ) @@ expression E,f; @@ ( if (<... f(...) ...>) { BUG(); } | - if (E) { BUG(); } + BUG_ON(E); ) // </smpl> Signed-off-by:
Julia Lawall <julia@diku.dk> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Julia Lawall authored
if (...) BUG(); should be replaced with BUG_ON(...) when the test has no side-effects to allow a definition of BUG_ON that drops the code completely. The semantic patch that makes this change is as follows: (http://www.emn.fr/x-info/coccinelle/ ) // <smpl> @ disable unlikely @ expression E,f; @@ ( if (<... f(...) ...>) { BUG(); } | - if (unlikely(E)) { BUG(); } + BUG_ON(E); ) @@ expression E,f; @@ ( if (<... f(...) ...>) { BUG(); } | - if (E) { BUG(); } + BUG_ON(E); ) // </smpl> Signed-off-by:
Julia Lawall <julia@diku.dk> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
David S. Miller authored
This reverts commit 69cc64d8. It causes recursive locking in IPV6 because unlike other neighbour layer clients, it even needs neighbour cache entries to send neighbour soliciation messages :-( We'll have to find another way to fix this race. Signed-off-by:
David S. Miller <davem@davemloft.net>
-
David S. Miller authored
This reverts commit 45b50354. It break locking around dev->link_mode as well as cause other bootup problems. Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Feb 15, 2008
-
-
Michael Buesch authored
On the initial device-open we need to defer the hardware reconfiguration after we incremented the open_count, because the hw_config checks this flag and won't call the lowlevel driver in case it is zero. Signed-off-by:
Michael Buesch <mb@bu3sch.de> Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-
Rémi Denis-Courmont authored
Fixes a segmentation fault when trying to splice from a non-TCP socket. Signed-off-by:
Rémi Denis-Courmont <rdenis@simphalempin.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Herbert Xu authored
I managed to reverse the local_df test when forward-porting this patch so it actually makes things worse by never fragmenting at all. Thanks to David Stevens for testing and reporting this bug. Bill Fink pointed out that the local_df setting is also the wrong way around. Signed-off-by:
Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
- Feb 14, 2008
-
-
YOSHIFUJI Hideaki authored
From: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> When we destory a new policy entry, we need to tell xfrm_policy_destroy() explicitly that the entry is not alive yet. Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Kazunori MIYAZAWA authored
This patch fix a BUG when adding spds which have same selector. Signed-off-by:
Kazunori MIYAZAWA <kazunori@miyazawa.org> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Jozsef Kadlecsik authored
Signed-off-by:
Jozsef Kadlecsik <kadlec@blackhole.kfki.hu> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Paul Mundt authored
net/built-in.o: In function `xfrm_policy_init': /home/pmundt/devel/git/sh-2.6.25/net/xfrm/xfrm_policy.c:2338: undefined reference to `snmp_mib_init' snmp_mib_init() is only built in if CONFIG_INET is set. Signed-off-by:
Paul Mundt <lethal@linux-sh.org> Signed-off-by:
Andrew Morton <akpm@linux-foundation.org> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Adrian Bunk authored
This patch makes the needlessly global secmark_tg_destroy() static. Signed-off-by:
Adrian Bunk <bunk@kernel.org> Signed-off-by:
David S. Miller <davem@davemloft.net>
-