18 Apr, 2008
7 commits
-
Fixes bugzilla #8895
If a super-tree leaf has 'rt' assigned to it and we
get an error from fib6_add_rt2node(), we'll leave
a reference to 'rt' in pn->leaf and then do an
unconditional dst_free().We should prune such references.
Based upon a report by Vincent Perrier.
Signed-off-by: David S. Miller
-
dev_get_by_index() may return NULL if nothing is found. In
net/netlabel/netlabel_unlabeled.c::netlbl_unlabel_staticlist_gen() the
function is called, but the return value is never checked. If it returns
NULL then we'll deref a NULL pointer on the very next line.
I checked the callers, and I don't think this can actually happen today,
but code changes over time and in the future it might happen and it does
no harm to be defensive and check for the failure, so that if/when it
happens we'll fail gracefully instead of crashing.Signed-off-by: Jesper Juhl
Acked-by: Paul Moore
Signed-off-by: David S. Miller -
datalen is unsigned so it can never be less than zero,
but that's ok because the attribute passed to nla_len()
has been validated and therefore a negative return
value is impossible.Signed-off-by: Patrick McHardy
Signed-off-by: David S. Miller -
This deblats ~200 bytes when ipv6 and dccp are 'y'.
Besides, this will ease compilation issues for patches
I'm working on to make inet hash tables more scalable
wrt net namespaces.Signed-off-by: Pavel Emelyanov
Signed-off-by: David S. Miller -
As I can see from the code, two places (tcp_v6_syn_recv_sock and
dccp_v6_request_recv_sock) that call this one already run with
BHs disabled, so it's safe to call __inet_inherit_port there.Besides (in case I missed smth with code review) the calltrace
tcp_v6_syn_recv_sock
`- tcp_v4_syn_recv_sock
`- __inet_inherit_port
and the similar for DCCP are valid, but assumes BHs to be disabled.Signed-off-by: Pavel Emelyanov
Signed-off-by: David S. Miller -
According to RFC4960 7.2.2,
When all of the data transmitted by the sender has
been acknowledged by the recerver, partial_bytes_acked is initialized to 0.This patch conforms to rfc requirement.
Without this fix, cwnd might be error incremented.Signed-off-by: Gui Jianfeng
Acked-by: Vlad Yasevich
Signed-off-by: David S. Miller
17 Apr, 2008
11 commits
-
This patch is a largely cosmetic cleanup of the TIPC reference
table code.
- The object reference field in each table entry is now single
32-bit integer instead of a union of two 32-bit integers.
- Variable naming has been made more consistent.
- Error message output has been made more consistent.
- Useless #includes have been eliminated.Signed-off-by: Allan Stephens
Signed-off-by: David S. Miller -
This patch modifies TIPC's reference table code to delay initializing
table entries until they are actually needed by applications.Signed-off-by: Allan Stephens
Signed-off-by: David S. Miller -
This patch converts the TIPC reference table locking routines
into non-inlined routines, since they are mainly called from
non-performance critical areas of TIPC and the added code
footprint incurred through inlining can no longer be justified.Signed-off-by: Allan Stephens
Signed-off-by: David S. Miller -
This patch reworks the scanning code (ieee80211_rx_bss_info) to take
more parameters from beacons and keep a BSS info structure alive when
only beacons for it are received. This fixes a problem with iwlwifi
drivers (where we don't understand the root cause of the problem yet)
and another driver for some broken hardware (which cannot send probe
requests unless associated, so can't always actively scan.)Signed-off-by: Bill Moss
[jmberg: reformatted comments, make probe_resp a bool]
Signed-off-by: Johannes Berg
Signed-off-by: John W. Linville -
This allows creating interfaces in WDS mode or switching
existing ones into WDS mode (both via cfg80211 and wext.)Signed-off-by: Johannes Berg
Signed-off-by: John W. Linville -
When we add multiple todo entries, we rely on them being executed
mostly in the right order, especially when a key is being replaced.
But when a default key is replaced, the todo list order will differ
from the order when the key being replaced is not a default key, so
problems will happen. Hence, just move each todo item to the end of
the list when it is added so we can in the other code ensure that
hw accel for a key will be disabled before it is enabled for the
replacement.Signed-off-by: Johannes Berg
Signed-off-by: John W. Linville -
When STAs are expired, we need to hold the sta_lock. Using
the same lock for keys too would then mean we'd need another
key free function, and that'll just lead to confusion, so just
use a new spinlock for all key lists.Signed-off-by: Johannes Berg
Signed-off-by: John W. Linville -
There is no need to send BSS changes to driver from beacons processed
during scanning. We are more interested in beacons from an AP with which
we are associated - these will still be used to send updates to driver as
the beacons are received without scanning.This change·removes the requirement that bss_info_changed needs to be atomic.
The beacons received during scanning are processed from a tasklet, but if we
do not call bss_info_changed for these beacons there is no need for it to be
atomic. This function (bss_info_changed) is called either from workqueue or
ioctl in all other instances.Signed-off-by: Reinette Chatre
Acked-by: Tomas Winkler
Acked-by: Johannes Berg
Signed-off-by: John W. Linville -
There were a few more instances of sta_info_get calls not being
protected by RCU, fix them.Signed-off-by: Johannes Berg
Signed-off-by: John W. Linville -
The previous key locking patch left a small race: it would be possible
to add a key and take the interface down before the key todo is run so
that hwaccel for that key is enabled on an interface that is down. Avoid
this by running the todo list when an interface is brought up or down.This patch also fixes a small bug: before this change, a few functions
used the key list without the lock that protects it.Signed-off-by: Johannes Berg
Signed-off-by: John W. Linville
16 Apr, 2008
22 commits
-
This one got renamed, complicating the merge a bit...this should restore
it to its intended state.Signed-off-by: John W. Linville
-
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
[TCP]: Add return value indication to tcp_prune_ofo_queue().
PS3: gelic: fix the oops on the broken IE returned from the hypervisor
b43legacy: fix DMA mapping leakage
mac80211: remove message on receiving unexpected unencrypted frames
Update rt2x00 MAINTAINERS entry
Add rfkill to MAINTAINERS file
rfkill: Fix device type check when toggling states
b43legacy: Fix usage of struct device used for DMAing
ssb: Fix usage of struct device used for DMAing
MAINTAINERS: move to generic repository for iwlwifi
b43legacy: fix initvals loading on bcm4303
rtl8187: Add missing priv->vif assignments
netconsole: only set CON_PRINTBUFFER if the user specifies a netconsole
[CAN]: Update documentation of struct sockaddr_can
MAINTAINERS: isdn4linux@listserv.isdn4linux.de is subscribers-only
[TCP]: Fix never pruned tcp out-of-order queue.
[NET_SCHED] sch_api: fix qdisc_tree_decrease_qlen() loop -
Describe debug parameters with their names (and not their values).
Signed-off-by: Paul Bolle
Signed-off-by: David Howells
Signed-off-by: Linus Torvalds -
The alloc_netdev_mq() tries to produce 32-bytes alignment for both
the net_device itself and its private data. The second alignment is
achieved by adding the NETDEV_ALIGN_CONST to the whole size of
the memory to be allocated.However, for those devices that do not need the private area, this
addition just makes the net_device weight 1024 + 32 = 1068 bytes,
i.e. consume twice as much memory.Since loopback device is such (sizeof_priv == 0 for it), and each
net namespace creates one, this can save a noticeable amount of
memory for kernel with net namespaces turned on.After this set the lo device is actually allocated from a size-1024
kmem cache on i386 box even with NETPOLL and WIRELESS_EXT turned on.Signed-off-by: Pavel Emelyanov
Signed-off-by: David S. Miller -
dev_set_net is called for
- just allocated devices
- devices moving from one namespace to another
release_net has proper check inside to distinguish these cases.Signed-off-by: Denis V. Lunev
Signed-off-by: David S. Miller -
Signed-off-by: Denis V. Lunev
Signed-off-by: David S. Miller -
Signed-off-by: Denis V. Lunev
Signed-off-by: David S. Miller -
Signed-off-by: Denis V. Lunev
Signed-off-by: David S. Miller -
Signed-off-by: Denis V. Lunev
Signed-off-by: David S. Miller -
Signed-off-by: Denis V. Lunev
Signed-off-by: David S. Miller -
Protocol control sockets and netlink kernel sockets should not prevent the
namespace stop request. They are initialized and disposed in a special way by
sk_change_net/sk_release_kernel.Signed-off-by: Denis V. Lunev
Signed-off-by: David S. Miller -
Make release_net/hold_net noop for performance-hungry people. This is a debug
staff and should be used in the debug mode only.Add check for net != NULL in hold/release calls. This will be required
later on.[ Added minor simplifications suggested by Brian Haley. -DaveM ]
Signed-off-by: Denis V. Lunev
Signed-off-by: David S. Miller -
And no need in some IPPROTO_XXX enabling, since ipv6 code
doesn't have any filtering.So, just set proper net and mark device with NETNS_LOCAL.
Signed-off-by: Pavel Emelyanov
Signed-off-by: David S. Miller -
All the ip_route_output_key(), dev_get_by_...() and ipv6_chk_addr()
calls are now stubbed with init_net.Fortunately, all the places already have where to get the proper
net from.Signed-off-by: Pavel Emelyanov
Signed-off-by: David S. Miller -
Move hashes in the struct ip6_tnl_net, replace tnls_xxx[] with
ip6n->tnlx_xxx[] and handle init and exit appropriately.Signed-off-by: Pavel Emelyanov
Signed-off-by: David S. Miller -
All the code, that reference it already has the ip6_tnl_net pointer,
so s/ip6_fb_tnl_dev/ip6n->fb_tnl_dev/ and move creation/releasing
code into net init/exit ops.Signed-off-by: Pavel Emelyanov
Signed-off-by: David S. Miller -
Calls to ip6_tnl_lookup were stubbed with init_net - give them
a proper one.Signed-off-by: Pavel Emelyanov
Signed-off-by: David S. Miller -
Hashes and fallback device used in them will be per-net.
Signed-off-by: Pavel Emelyanov
Signed-off-by: David S. Miller -
Signed-off-by: Pavel Emelyanov
Signed-off-by: David S. Miller -
This makes sit-generated traffic enter the namespace.
Signed-off-by: Pavel Emelyanov
Signed-off-by: David S. Miller -
Set proper net and mark a new device as NETNS_LOCAL before registering.
Signed-off-by: Pavel Emelyanov
Signed-off-by: David S. Miller -
I.e. replace init_net stubs in ip_route_output_key() calls.
Signed-off-by: Pavel Emelyanov
Signed-off-by: David S. Miller