summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [TCP]: tcp probe wraparound handling and other changesStephen Hemminger2007-07-111-70/+124
| | | | | | | | | | | | | Switch from formatting messages in probe routine and copying with kfifo, to using a small circular queue of information and formatting on read. This avoids wraparound issues with kfifo, and saves one copy. Also make sure to state correct license, rather than copying off some other driver I started with. Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* [RTNETLINK]: rtnl_link: allow specifying initial device addressPatrick McHardy2007-07-115-4/+44
| | | | | | | | Drivers need to validate the initial addresses in their netlink attribute validation function or manually reject them if they can't support this. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* [RTNETLINK]: rtnl_link API simplificationPatrick McHardy2007-07-114-131/+23
| | | | | | | | | | | | | | All drivers need to unregister their devices in the module unload function. While doing so they must hold the rtnl and atomically unregister the rtnl_link ops as well. This makes the rtnl_link_unregister function that takes the rtnl itself completely useless. Provide default newlink/dellink functions, make __rtnl_link_unregister and rtnl_link_unregister unregister all devices with matching rtnl_link_ops and change the existing users to take advantage of that. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* [VLAN]: Fix MAC address handlingPatrick McHardy2007-07-114-45/+57
| | | | | | | | | | | | | | | | | | The VLAN MAC address handling is broken in multiple ways. When the address differs when setting it, the real device is put in promiscous mode twice, but never taken out again. Additionally it doesn't resync when the real device's address is changed and needlessly puts it in promiscous mode when the vlan device is still down. Fix by moving address handling to vlan_dev_open/vlan_dev_stop and properly deal with address changes in the device notifier. Also switch to dev_unicast_add (which needs the exact same handling). Since the set_mac_address handler is identical to the generic ethernet one with these changes, kill it and use ether_setup(). Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* [ETH]: Validate address in eth_mac_addrPatrick McHardy2007-07-111-0/+3
| | | | | Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge master.kernel.org:/pub/scm/linux/kernel/git/holtmann/bluetooth-2.6David S. Miller2007-07-1110-142/+195
|\
| * [Bluetooth] Add basics to better support and handle eSCO linksMarcel Holtmann2007-07-115-37/+66
| | | | | | | | | | | | | | | | To better support and handle eSCO links in the future a bunch of constants needs to be added and some basic routines need to be updated. This is the initial step. Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
| * [Bluetooth] Keep rfcomm_dev on the list until it is freedVille Tervo2007-07-112-8/+23
| | | | | | | | | | | | | | | | | | This patch changes the RFCOMM TTY release process so that the TTY is kept on the list until it is really freed. A new device flag is used to keep track of released TTYs. Signed-off-by: Ville Tervo <ville.tervo@nokia.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
| * [Bluetooth] Hangup TTY before releasing rfcomm_devMikko Rapeli2007-07-111-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | The core problem is that RFCOMM socket layer ioctl can release rfcomm_dev struct while RFCOMM TTY layer is still actively using it. Calling tty_vhangup() is needed for a synchronous hangup before rfcomm_dev is freed. Addresses the oops at http://bugzilla.kernel.org/show_bug.cgi?id=7509 Acked-by: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
| * [Bluetooth] Remove the redundant non-seekable llseek methodRobert P. J. Day2007-07-111-6/+0
| | | | | | | | | | | | | | | | Remove the llseek method given that the open method already calls nonseekable_open(). Signed-off-by: Robert P. J. Day <rpjday@mindspring.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
| * [Bluetooth] Use hci_recv_fragment() within HCI USB driverMarcel Holtmann2007-07-112-89/+4
| | | | | | | | | | | | | | This patch modifies the HCI USB driver to use the new helper function for reassembling HCI data packets and events. Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
| * [Bluetooth] Add hci_recv_fragment() helper functionMarcel Holtmann2007-07-112-2/+98
| | | | | | | | | | | | | | | | Most drivers must handle fragmented HCI data packets and events. This patch adds a generic function for their reassembly to the Bluetooth core layer and thus allows to shrink the complexity of the drivers. Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
* | [NET]: Fix races in net_rx_action vs netpoll.Olaf Kirch2007-07-112-0/+18
| | | | | | | | | | | | | | | | Keep netpoll/poll_napi from messing with the poll_list. Only net_rx_action is allowed to manipulate the list. Signed-off-by: Olaf Kirch <olaf.kirch@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | [AF_UNIX]: Rewrite garbage collector, fixes race.Miklos Szeredi2007-07-113-144/+190
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Throw out the old mark & sweep garbage collector and put in a refcounting cycle detecting one. The old one had a race with recvmsg, that resulted in false positives and hence data loss. The old algorithm operated on all unix sockets in the system, so any additional locking would have meant performance problems for all users of these. The new algorithm instead only operates on "in flight" sockets, which are very rare, and the additional locking for these doesn't negatively impact the vast majority of users. In fact it's probable, that there weren't *any* heavy senders of sockets over sockets, otherwise the above race would have been discovered long ago. The patch works OK with the app that exposed the race with the old code. The garbage collection has also been verified to work in a few simple cases. Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> Signed-off-by: David S. Miller <davem@davemloft.net>
* | [NETFILTER]: {ip, nf}_conntrack_sctp: fix remotely triggerable NULL ptr ↵Patrick McHardy2007-07-101-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dereference (CVE-2007-2876) When creating a new connection by sending an unknown chunk type, we don't transition to a valid state, causing a NULL pointer dereference in sctp_packet when accessing sctp_timeouts[SCTP_CONNTRACK_NONE]. Fix by don't creating new conntrack entry if initial state is invalid. Noticed by Vilmos Nebehaj <vilmos.nebehaj@ramsys.hu> Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Chris Wright <chrisw@sous-sol.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* | [NET]: Make all initialized struct seq_operations const.Philippe De Muyter2007-07-1056-76/+76
| | | | | | | | | | | | | | Make all initialized struct seq_operations in net/ const Signed-off-by: Philippe De Muyter <phdm@macqel.be> Signed-off-by: David S. Miller <davem@davemloft.net>
* | [UDP]: Fix length check.Patrick McHardy2007-07-101-7/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rémi Denis-Courmont wrote: > Right. By the way, shouldn't "len" rather be signed in there? > > unsigned int len; > > /* if we're overly short, let UDP handle it */ > len = skb->len - sizeof(struct udphdr); > if (len <= 0) > goto udp; It should, but the < 0 case can't happen since __udp4_lib_rcv already makes sure that we have at least a complete UDP header. Anyways, this patch fixes it. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* | [IPV6]: Remove unneeded pointer idev from addrconf_cleanup().Micah Gruber2007-07-101-2/+1
| | | | | | | | | | | | | | | | | | This trivial patch removes the unneeded pointer idev returned from __in6_dev_get(), which is never used. The check for NULL can be simply done by if (__in6_dev_get(dev) == NULL). Signed-off-by: Micah Gruber <micah.gruber@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | [DECNET]: Another unnecessary net/tcp.h inclusion in net/dn.hIlpo Järvinen2007-07-101-1/+0
| | | | | | | | | | | | | | No longer needed. Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi> Signed-off-by: David S. Miller <davem@davemloft.net>
* | [IPV6]: Make IPV6_{RECV,2292}RTHDR boolean options.YOSHIFUJI Hideaki2007-07-102-8/+4
| | | | | | | | | | | | | | | | | | Because reversing RH0 is no longer supported by deprecation of RH0, let's make IPV6_{RECV,2292}RTHDR boolean options. Boolean are more appropriate from standard POV. Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* | [IPV6]: Do not send RH0 anymore.YOSHIFUJI Hideaki2007-07-108-130/+5
| | | | | | | | | | | | | | Based on <draft-ietf-ipv6-deprecate-rh0-00.txt>. Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* | [IPV6]: Restore semantics of Routing Header processing.YOSHIFUJI Hideaki2007-07-101-31/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | The "fix" for emerging security threat was overkill and it broke basic semantic of IPv6 routing header processing. We should assume RT0 (or even RT2, depends on configuration) as "unknown" RH type so that we - silently ignore the routing header if segleft == 0 - send ICMPv6 Parameter Problem message back to the sender, otherwise. Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* | [NET_SCHED]: Make HTB scheduler work with TSO.Ranjit Manomohan2007-07-101-10/+10
| | | | | | | | | | | | | | | | | | Currently the HTB scheduler does not correctly account for TSO packets which causes large inaccuracies in the bandwidth control when using TSO. This patch allows the HTB scheduler to work with TSO enabled devices. Signed-off-by: Ranjit Manomohan <ranjitm@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | [NET]: Update comments for skb checksumsHerbert Xu2007-07-101-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | Rusty (whose comments we should all study and emulate :) pointed out that our comments for skb checksums are no longer up-to-date. So here is a patch to 1) add the case of partial checksums on input; 2) update partial checksum case to mention csum_start/csum_offset; 3) mention the new IPv6 feature bit. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
* | [NET]: Avoid copying writable clones in tunnel driversPatrick McHardy2007-07-104-5/+8
| | | | | | | | | | Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* | [IPV4]: Make ip_tos2prio const.Philippe De Muyter2007-07-102-2/+2
| | | | | | | | | | Signed-off-by: Philippe De Muyter <phdm@macqel.be> Signed-off-by: David S. Miller <davem@davemloft.net>
* | [NET]: Fix gen_estimator timer removal racePatrick McHardy2007-07-101-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | As noticed by Jarek Poplawski <jarkao2@o2.pl>, the timer removal in gen_kill_estimator races with the timer function rearming the timer. Check whether the timer list is empty before rearming the timer in the timer function to fix this. Signed-off-by: Patrick McHardy <kaber@trash.net> Acked-by: Jarek Poplawski <jarkao2@o2.pl> Signed-off-by: David S. Miller <davem@davemloft.net>
* | [NETPOLL]: Fix a leak-n-bug in netpoll_cleanup()Satyam Sharma2007-07-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 93ec2c723e3f8a216dde2899aeb85c648672bc6b applied excessive duct tape to the netpoll beast's netpoll_cleanup(), thus substituting one leak with another, and opening up a little buglet :-) net_device->npinfo (netpoll_info) is a shared and refcounted object and cannot simply be set NULL the first time netpoll_cleanup() is called. Otherwise, further netpoll_cleanup()'s see np->dev->npinfo == NULL and become no-ops, thus leaking. And it's a bug too: the first call to netpoll_cleanup() would thus (annoyingly) "disable" other (still alive) netpolls too. Maybe nobody noticed this because netconsole (only user of netpoll) never supported multiple netpoll objects earlier. This is a trivial and obvious one-line fixlet. Signed-off-by: Satyam Sharma <ssatyam@cse.iitk.ac.in> Signed-off-by: David S. Miller <davem@davemloft.net>
* | [RXRPC]: Remove Makefile reference to obsolete RXRPC config variableRobert P. J. Day2007-07-101-1/+0
| | | | | | | | | | | | | | | | | | | | Since there is no Kconfig variable RXRPC anywhere in the tree, and the variable AF_RXRPC performs exactly the same function, remove the reference to CONFIG_RXRPC from net/Makefile. Signed-off-by: Robert P. J. Day <rpjday@mindspring.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* | [NETFILTER] net/ipv4/netfilter/ip_tables.c: lower printk severityDan Aloni2007-07-101-1/+1
| | | | | | | | | | | | Signed-off-by: Dan Aloni <da-x@monatomic.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* | [DCCP]: Make struct dccp_li_cachep static.Adrian Bunk2007-07-101-1/+1
| | | | | | | | | | | | Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* | [IRDA]: use mutex instead of semaphore in VLSI 82C147 IrDA controller driverMatthias Kaehlcke2007-07-102-14/+15
| | | | | | | | | | | | | | | | | | The VLSI 82C147 IrDA controller driver uses a semaphore as mutex. Use the mutex API instead of the (binary) semaphore. Signed-off-by: Matthias Kaehlcke <matthias.kaehlcke@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* | [NET]: "wrong timeout value in sk_wait_data()": cleanupsAndrew Morton2007-07-101-1/+2
| | | | | | | | | | | | | | | | | | | | - save 4 bytes - it's read-mostly. Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Acked-by: Vasily Averin <vvs@sw.ru> Signed-off-by: David S. Miller <davem@davemloft.net>
* | [NET]: Make some network-related proc files use seq_list_xxx helpersPavel Emelianov2007-07-102-77/+10
| | | | | | | | | | | | | | | | | | | | | | This includes /proc/net/protocols, /proc/net/rxrpc_calls and /proc/net/rxrpc_connections files. All three need seq_list_start_head to show some header. Signed-off-by: Pavel Emelianov <xemul@openvz.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* | [ATM] br2684: Use seq_list_xxx helpersPavel Emelianov2007-07-101-18/+4
| | | | | | | | | | | | | | | | | | The .show callback receives the list_head pointer now, not the struct br2684_dev one. Signed-off-by: Pavel Emelianov <xemul@openvz.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* | [NET]: netdevice mtu assumptions documentationStephen Hemminger2007-07-101-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | Document the expectations about device MTU handling. The documentation about oversize packet handling is probably too loose. IMHO devices should drop oversize packets for robustness, but many devices allow it now. For example, if you set mtu to 1200 bytes, most ether devices will allow a 1500 byte frame in. Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* | [NET]: netdevice locking assumptions documentationStephen Hemminger2007-07-101-7/+8
| | | | | | | | | | | | | | Update the documentation about locking assumptions. Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* | [BNX2]: Seems to not need net/tcp.hIlpo Järvinen2007-07-101-1/+0
| | | | | | | | | | | | | | Got bored to always recompile it for no reason. Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi> Signed-off-by: David S. Miller <davem@davemloft.net>
* | [BNX2]: Update version to 1.6.2.Michael Chan2007-07-101-2/+2
| | | | | | | | | | Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | [BNX2]: Print management firmware version.Michael Chan2007-07-102-8/+42
| | | | | | | | | | | | | | Add management firmware version for ethtool -i. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | [BNX2]: Enhance the heartbeat.Michael Chan2007-07-102-4/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In addition to the periodic heartbeat, we're adding a heartbeat request interrupt when the heartbeat is late. This is needed during netpoll where the timer is not available. -rt kernels will also benefit since the timer is not as accurate. [ We discussed this patch last time and we decided that the -rt kernel problem alone did not justify this patch. I think the netpoll problem makes this patch necessary. ] Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | [BNX2]: Reduce spurious INTA interrupts.Michael Chan2007-07-101-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Spurious interrupts are often encountered especially on systems using the 8259 PIC mode. This is because the I/O write to deassert the interrupt is posted and won't get to the chip immediately. As a result, the IRQ may remain asserted after the IRQ handler exits, causing spurious interrupts. Add read back to flush the I/O write to deassert the IRQ immediately. We also store the last_status_idx immediately in the IRQ handler to help detect whether the interrupt is ours or not when the IRQ is entered again before ->poll gets called. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | [BNX2]: Modify link up message.Michael Chan2007-07-101-2/+12
| | | | | | | | | | | | | | Modify the link up dmesg to report remote copper or Serdes link. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | [BNX2]: Add ethtool support for remote PHY.Michael Chan2007-07-101-27/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Modify the driver's ethtool_ops->get_settings and set_settings functions to support remote PHY. Users control the remote copper PHY settings by specifying link settings for the tp (twisted pair) port. The nway_reset function is also modified to support remote PHY. mii-tool operations are not supported on remote PHY and we will return -EOPNOTSUPP. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | [BNX2]: Add support for remote PHY.Michael Chan2007-07-101-8/+269
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In blade servers, the Serdes PHY in 5708S can control the remote copper PHY through autonegotiation on the backplane. This patch adds the logic to interface with the firmware to control the remote PHY autonegotiation and to handle remote PHY link events. When remote PHY is present, the 5708S Serdes device practically becomes a copper device with full control over the 1000Base-T link settings. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | [BNX2]: Add remote PHY bit definitions.Michael Chan2007-07-101-1/+50
| | | | | | | | | | | | | | | | Add new fields in struct bnx2 and other bit definitions in shared memory to support remote PHY. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | [BNX2]: Add bnx2_set_default_link().Michael Chan2007-07-101-18/+25
| | | | | | | | | | | | | | | | | | | | | | Put existing code to setup the default link settings in this new function. This makes it easier to support the remote PHY feature in the next few patches. Also change ETHTOOL_ALL_FIBRE_SPEED to include 2500Mbps if supported. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | [NETFILTER]: x_tables: add more detail to error message about match/target ↵Balazs Scheidler2007-07-101-4/+5
| | | | | | | | | | | | | | | | mask mismatch Signed-off-by: Balazs Scheidler <bazsi@balabit.hu> Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* | [NETFILTER]: nf_queue: Use RCU and mutex for queue handlersYasuyuki Kozakai2007-07-101-23/+29
| | | | | | | | | | | | | | | | Queue handlers are registered/unregistered in only process context. Signed-off-by: Yasuyuki Kozakai <yasuyuki.kozakai@toshiba.co.jp> Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* | [NETFILTER]: nfnetlink_queue: don't unregister handler of other subsystemYasuyuki Kozakai2007-07-103-5/+9
| | | | | | | | | | | | | | | | | | | | | | The queue handlers registered by ip[6]_queue.ko at initialization should not be unregistered according to requests from userland program using nfnetlink_queue. If we allow that, there is no way to register the handlers of built-in ip[6]_queue again. Signed-off-by: Yasuyuki Kozakai <yasuyuki.kozakai@toshiba.co.jp> Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
OpenPOWER on IntegriCloud