17 Mar, 2008
5 commits
-
spurious cpu_to_le64()
Signed-off-by: Al Viro
Signed-off-by: Jeff Garzik -
Signed-off-by: Al Viro
Signed-off-by: Jeff Garzik -
Signed-off-by: Al Viro
Signed-off-by: Jeff Garzik -
kmalloc intermediate buffer(), do copy_from_user() + memcpy_toio()
Signed-off-by: Al Viro
Signed-off-by: Jeff Garzik -
pci_unmap_single() on little-endian address
Signed-off-by: Al Viro
Signed-off-by: Jeff Garzik
13 Mar, 2008
1 commit
-
Comparing with kernel 2.6.24, tbench result has regression with
2.6.25-rc1.1) On 2 quad-core processor stoakley: 4%.
2) On 4 quad-core processor tigerton: more than 30%.bisect located below patch.
b4ce92775c2e7ff9cf79cca4e0a19c8c5fd6287b is first bad commit
commit b4ce92775c2e7ff9cf79cca4e0a19c8c5fd6287b
Author: Herbert Xu
Date: Tue Nov 13 21:33:32 2007 -0800[IPV6]: Move nfheader_len into rt6_info
The dst member nfheader_len is only used by IPv6. It's also currently
creating a rather ugly alignment hole in struct dst. Therefore this patch
moves it from there into struct rt6_info.Above patch changes the cache line alignment, especially member
__refcnt. I did a testing by adding 2 unsigned long pading before
lastuse, so the 3 members, lastuse/__refcnt/__use, are moved to next
cache line. The performance is recovered.I created a patch to rearrange the members in struct dst_entry.
With Eric and Valdis Kletnieks's suggestion, I made finer arrangement.
1) Move tclassid under ops in case CONFIG_NET_CLS_ROUTE=y. So
sizeof(dst_entry)=200 no matter if CONFIG_NET_CLS_ROUTE=y/n. I
tested many patches on my 16-core tigerton by moving tclassid to
different place. It looks like tclassid could also have impact on
performance. If moving tclassid before metrics, or just don't move
tclassid, the performance isn't good. So I move it behind metrics.2) Add comments before __refcnt.
On 16-core tigerton:
If CONFIG_NET_CLS_ROUTE=y, the result with below patch is about 18%
better than the one without the patch;If CONFIG_NET_CLS_ROUTE=n, the result with below patch is about 30%
better than the one without the patch.With 32bit 2.6.25-rc1 on 8-core stoakley, the new patch doesn't
introduce regression.Thank Eric, Valdis, and David!
Signed-off-by: Zhang Yanmin
Acked-by: Eric Dumazet
Signed-off-by: David S. Miller
12 Mar, 2008
7 commits
-
Since the lists are circular, we need to explicitely tag
the address to be deleted since we might end up freeing
the list head instead. This fixes some interesting SCTP
crashes.Signed-off-by: Chidambar 'ilLogict' Zinnoury
Signed-off-by: Vlad Yasevich
Signed-off-by: David S. Miller -
fs/built-in.o:(.rodata+0x1134): undefined reference to `proc_net_inode_operations'
fs/built-in.o:(.rodata+0x1138): undefined reference to `proc_net_operations'Signed-off-by: Andrew Morton
Signed-off-by: David S. Miller -
With TSO it was possible to send past the receiver window when the skb
to be sent was the last in the write queue while the receiver window
is the limiting factor. One can notice that there's a loophole in the
tcp_mss_split_point that lacked a receiver window check for the
tcp_write_queue_tail() if also cwnd was smaller than the full skb.Noticed by Thomas Gleixner in form of "Treason
uncloaked! Peer ... shrinks window .... Repaired." messages (the peer
didn't actually shrink its window as the message suggests, we had just
sent something past it without a permission to do so).Signed-off-by: Ilpo Järvinen
Tested-by: Thomas Gleixner
Signed-off-by: David S. Miller -
Signed-off-by: Ivo van Doorn
Signed-off-by: John W. Linville -
On rt73 and rt61 disabling reception of multicast packets also disables
broadcast traffic which we never want to do. Therefore we should never
disable multicast.Signed-off-by: Adam Baker
Signed-off-by: Ivo van Doorn
Signed-off-by: John W. Linville -
|libertas: Invalid CMD_RESP 8012 to command 50!
The special case got mixed up in 8a96df80b3.
Signed-off-by: Sebastian Siewior
Signed-off-by: John W. Linville -
Signed-off-by: John W. Linville
11 Mar, 2008
9 commits
-
Commit ce7663d84:
[NETFILTER]: nfnetlink_queue: don't unregister handler of other subsystem
changed nf_unregister_queue_handler to return an error when attempting to
unregister a queue handler that is not identical to the one passed in.
This is correct in case we really do have a different queue handler already
registered, but some existing userspace code always does an unbind before
bind and aborts if that fails, so try to be nice and return success in
that case.Signed-off-by: Patrick McHardy
Signed-off-by: David S. Miller -
Similar to the nfnetlink_log problem, nfnetlink_queue incorrectly
returns -EPERM when binding or unbinding to an address family and
queueing instance 0 exists and is owned by a different process. Unlike
nfnetlink_log it previously completes the operation, but it is still
incorrect.Signed-off-by: Patrick McHardy
Signed-off-by: David S. Miller -
When binding or unbinding to an address family, the res_id is usually set
to zero. When logging instance 0 already exists and is owned by a different
process, this makes nfunl_recv_config return -EPERM without performing
the bind operation.Since no operation on the foreign logging instance itself was requested,
this is incorrect. Move bind/unbind commands before the queue instance
permissions checks.Also remove an incorrect comment.
Signed-off-by: Patrick McHardy
Signed-off-by: David S. Miller -
There's a horrible slab abuse in net/netfilter/nf_conntrack_extend.c
that can be replaced with a call to ksize().Cc: Christoph Lameter
Signed-off-by: Pekka Enberg
Signed-off-by: Patrick McHardy
Signed-off-by: David S. Miller -
Signed-off-by: Alexey Dobriyan
Signed-off-by: Patrick McHardy
Signed-off-by: David S. Miller -
From: Andrew Schulman
xt_time_match() in net/netfilter/xt_time.c in kernel 2.6.24 never
matches on Sundays. On my host I have a rule likeiptables -A OUTPUT -m time --weekdays Sun -j REJECT
and it never matches. The problem is in localtime_2(), which uses
r->weekday = (4 + r->dse) % 7;
to map the epoch day onto a weekday in {0,...,6}. In particular this
gives 0 for Sundays. But 0 has to be wrong; a weekday of 0 can never
match. xt_time_match() hasif (!(info->weekdays_match & (1 << current_time.weekday)))
return false;and when current_time.weekday = 0, the result of the & is always
zero, even when info->weekdays_match = XT_TIME_ALL_WEEKDAYS = 0xFE.Signed-off-by: Jan Engelhardt
Signed-off-by: Patrick McHardy
Signed-off-by: David S. Miller -
This patch is similar to nfnetlink_queue fixes. It fixes the computation
of skb size by using NLMSG_SPACE instead of NLMSG_ALIGN.Signed-off-by: Eric Leblond
Signed-off-by: Patrick McHardy
Signed-off-by: David S. Miller -
Size of the netlink skb was wrongly computed because the formula was using
NLMSG_ALIGN instead of NLMSG_SPACE. NLMSG_ALIGN does not add the room for
netlink header as NLMSG_SPACE does. This was causing a failure of message
building in some cases.On my test system, all messages for packets in range [8*k+41, 8*k+48] where k
is an integer were invalid and the corresponding packets were dropped.Signed-off-by: Eric Leblond
Signed-off-by: Patrick McHardy
Signed-off-by: David S. Miller -
Use __KERNEL__ instead of __KERNEL to make sure the headers are not
usable by the kernel.Signed-off-by: Patrick McHardy
Signed-off-by: David S. Miller
08 Mar, 2008
2 commits
-
Signed-off-by: Kirill A. Shutemov
Signed-off-by: David S. Miller -
Current /proc/net is done with so called "shadows", but current
implementation is broken and has little chances to get fixed.The problem is that dentries subtree of /proc/net directory has
fancy revalidation rules to make processes living in different
net namespaces see different entries in /proc/net subtree, but
currently, tasks see in the /proc/net subdir the contents of any
other namespace, depending on who opened the file first.The proposed fix is to turn /proc/net into a symlink, which points
to /proc/self/net, which in turn shows what previously was in
/proc/net - the network-related info, from the net namespace the
appropriate task lives in.# ls -l /proc/net
lrwxrwxrwx 1 root root 8 Mar 5 15:17 /proc/net -> self/netIn other words - this behaves like /proc/mounts, but unlike
"mounts", "net" is not a file, but a directory.Changes from v2:
* Fixed discrepancy of /proc/net nlink count and selinux labeling
screwup pointed out by Stephen.To get the correct nlink count the ->getattr callback for /proc/net
is overridden to read one from the net->proc_net entry.To make selinux still work the net->proc_net entry is initialized
properly, i.e. with the "net" name and the proc_net parent.Selinux fixes are
Acked-by: Stephen SmalleyChanges from v1:
* Fixed a task_struct leak in get_proc_task_net, pointed out by Paul.Signed-off-by: Pavel Emelyanov
Acked-by: "Eric W. Biederman"
Signed-off-by: David S. Miller
06 Mar, 2008
16 commits
-
Fix rxrpc_recvmsg() to return msg_name correctly. We shouldn't
overwrite the *msg struct, but should rather write into msg->msg_name
(there's a '&' unary operator that shouldn't be there).Signed-off-by: David Howells
Signed-off-by: Andrew Morton
Signed-off-by: David S. Miller -
Prevent oops on enc28j60 packet RX: make sure buffers are aligned.
Not all architectures support unaligned accesses in kernel space.Signed-off-by: David Brownell
Acked-by: Claudio Lanconelli
Signed-off-by: David S. Miller -
Replace init_module and cleanup_module with static functions and
module_init/module_exit.Signed-off-by: Jon Schindler
Signed-off-by: Andrew Morton
Signed-off-by: David S. Miller -
Replaced init_module and cleanup_module with static functions and
module_init/module_exit.Signed-off-by: Jon Schindler
Signed-off-by: Andrew Morton
Signed-off-by: David S. Miller -
Replaced init_module and cleanup_module with static functions and
module_init/module_exit.Signed-off-by: Jon Schindler
Signed-off-by: Andrew Morton
Signed-off-by: David S. Miller -
Replaced init_module and cleanup_module with static functions and
module_init/module_exit.Signed-off-by: Jon Schindler
Signed-off-by: Andrew Morton
Signed-off-by: David S. Miller -
bnep_sock_cleanup() always returns 0 and its return value isn't used
anywhere in the code.Signed-off-by: Tobias Klauser
Signed-off-by: Andrew Morton
Signed-off-by: David S. Miller -
hci_sock_cleanup() always returns 0 and its return value isn't used
anywhere in the code.Compile-tested with 'make allyesconfig && make net/bluetooth/bluetooth.ko'
Signed-off-by: Tobias Klauser
Signed-off-by: Andrew Morton
Acked-by: Marcel Holtmann -
Alon Bar-Lev reports:
Feb 16 23:41:33 alon1 usb 3-1: configuration #1 chosen from 1 choice
Feb 16 23:41:33 alon1 BUG: unable to handle kernel NULL pointer
dereference at virtual address 00000008
Feb 16 23:41:33 alon1 printing eip: c01b2db6 *pde = 00000000
Feb 16 23:41:33 alon1 Oops: 0000 [#1] PREEMPT
Feb 16 23:41:33 alon1 Modules linked in: ppp_deflate zlib_deflate
zlib_inflate bsd_comp ppp_async rfcomm l2cap hci_usb vmnet(P)
vmmon(P) tun radeon drm autofs4 ipv6 aes_generic crypto_algapi
ieee80211_crypt_ccmp nf_nat_irc nf_nat_ftp nf_conntrack_irc
nf_conntrack_ftp ipt_MASQUERADE iptable_nat nf_nat ipt_REJECT
xt_tcpudp ipt_LOG xt_limit xt_state nf_conntrack_ipv4 nf_conntrack
iptable_filter ip_tables x_tables snd_pcm_oss snd_mixer_oss
snd_seq_dummy snd_seq_oss snd_seq_midi_event snd_seq snd_seq_device
bluetooth ppp_generic slhc ioatdma dca cfq_iosched cpufreq_powersave
cpufreq_ondemand cpufreq_conservative acpi_cpufreq freq_table uinput
fan af_packet nls_cp1255 nls_iso8859_1 nls_utf8 nls_base pcmcia
snd_intel8x0 snd_ac97_codec ac97_bus snd_pcm nsc_ircc snd_timer
ipw2200 thinkpad_acpi irda snd ehci_hcd yenta_socket uhci_hcd
psmouse ieee80211 soundcore intel_agp hwmon rsrc_nonstatic pcspkr
e1000 crc_ccitt snd_page_alloc i2c_i801 ieee80211_crypt pcmcia_core
agpgart thermal bat!
tery nvram rtc sr_mod ac sg firmware_class button processor cdrom
unix usbcore evdev ext3 jbd ext2 mbcache loop ata_piix libata sd_mod
scsi_mod
Feb 16 23:41:33 alon1
Feb 16 23:41:33 alon1 Pid: 4, comm: events/0 Tainted: P
(2.6.24-gentoo-r2 #1)
Feb 16 23:41:33 alon1 EIP: 0060:[] EFLAGS: 00010282 CPU: 0
Feb 16 23:41:33 alon1 EIP is at sysfs_get_dentry+0x26/0x80
Feb 16 23:41:33 alon1 EAX: 00000000 EBX: 00000000 ECX: 00000000 EDX:
f48a2210
Feb 16 23:41:33 alon1 ESI: f72eb900 EDI: f4803ae0 EBP: f4803ae0 ESP:
f7c49efc
Feb 16 23:41:33 alon1 hcid[7004]: HCI dev 0 registered
Feb 16 23:41:33 alon1 DS: 007b ES: 007b FS: 0000 GS: 0000 SS: 0068
Feb 16 23:41:33 alon1 Process events/0 (pid: 4, ti=f7c48000
task=f7c3efc0 task.ti=f7c48000)
Feb 16 23:41:33 alon1 Stack: f7cb6140 f4822668 f7e71e10 c01b304d
ffffffff ffffffff fffffffe c030ba9c
Feb 16 23:41:33 alon1 f7cb6140 f4822668 f6da6720 f7cb6140 f4822668
f6da6720 c030ba8e c01ce20b
Feb 16 23:41:33 alon1 f6e9dd00 c030ba8e f6da6720 f6e9dd00 f6e9dd00
00000000 f4822600 00000000
Feb 16 23:41:33 alon1 Call Trace:
Feb 16 23:41:33 alon1 [] sysfs_move_dir+0x3d/0x1f0
Feb 16 23:41:33 alon1 [] kobject_move+0x9b/0x120
Feb 16 23:41:33 alon1 [] device_move+0x51/0x110
Feb 16 23:41:33 alon1 [] del_conn+0x0/0x70 [bluetooth]
Feb 16 23:41:33 alon1 [] del_conn+0x19/0x70 [bluetooth]
Feb 16 23:41:33 alon1 [] run_workqueue+0x81/0x140
Feb 16 23:41:33 alon1 [] schedule+0x168/0x2e0
Feb 16 23:41:33 alon1 [] autoremove_wake_function+0x0/0x50
Feb 16 23:41:33 alon1 [] worker_thread+0x9b/0xf0
Feb 16 23:41:33 alon1 [] autoremove_wake_function+0x0/0x50
Feb 16 23:41:33 alon1 [] worker_thread+0x0/0xf0
Feb 16 23:41:33 alon1 [] kthread+0x42/0x70
Feb 16 23:41:33 alon1 [] kthread+0x0/0x70
Feb 16 23:41:33 alon1 [] kernel_thread_helper+0x7/0x18
Feb 16 23:41:33 alon1 =======================
Feb 16 23:41:33 alon1 Code: 26 00 00 00 00 57 89 c7 a1 50 1b 3a c0
56 53 8b 70 38 85 f6 74 08 8b 0e 85 c9 74 58 ff 06 8b 56 50 39 fa 74
47 89 fb eb 02 89 c3 43 08 39 c2 75 f7 8b 46 08 83 c0 68 e8 98
e7 10 00 8b 43 10
Feb 16 23:41:33 alon1 EIP: [] sysfs_get_dentry+0x26/0x80
SS:ESP 0068:f7c49efc
Feb 16 23:41:33 alon1 ---[ end trace aae864e9592acc1d ]---Defer hci_unregister_sysfs because hci device could be destructed
while hci conn devices still there.Signed-off-by: Dave Young
Tested-by: Stefan Seyfried
Acked-by: Alon Bar-Lev
Signed-off-by: Andrew Morton
Acked-by: Marcel Holtmann -
From: SDiZ
Fix the CONWISE Technology based adapters with buggy SCO support issue
(bugzilla #9027)Signed-off-by: Andrew Morton
Acked-by: Marcel Holtmann
Signed-off-by: David S. Miller -
When walking a session's packet reorder queue, use
skb_queue_walk_safe() since the list could be modified inside the
loop.Rearrange the unlinking skbs from the reorder queue such that it is
done while the queue lock is held in pppol2tp_recv_dequeue() when
walking the skb list.A version of this patch was suggested by Jarek Poplawski.
Signed-off-by: James Chapman
Signed-off-by: David S. Miller -
Fix locking issues in the pppol2tp driver which can cause a kernel
crash on SMP boxes. There were two problems:-1. The driver was violating read_lock() and write_lock() scheduling
rules because it wasn't using softirq-safe locks in softirq
contexts. So we now consistently use the _bh variants of the lock
functions.2. The driver was calling sk_dst_get() in pppol2tp_xmit() which was
taking sk_dst_lock in softirq context. We now call __sk_dst_get().Signed-off-by: James Chapman
Signed-off-by: David S. Miller -
__FUNCTION__ is gcc-specific, use __func__
Signed-off-by: Harvey Harrison
Signed-off-by: David S. Miller -
Signed-off-by: Harvey Harrison
Signed-off-by: Andrew Morton
Signed-off-by: David S. Miller -
Signed-off-by: Harvey Harrison
Signed-off-by: Andrew Morton
Signed-off-by: David S. Miller -
Signed-off-by: Harvey Harrison
Signed-off-by: Andrew Morton
Signed-off-by: David S. Miller