aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2008-10-31gianfar: Don't reset TBI<->SerDes link if it's already upTrent Piepho
The link may be up already via the chip's reset strapping, or though action of U-Boot, or from the last time the interface was brought up. Resetting the link causes it to go down for several seconds. This can significantly increase the time from power-on to DHCP completion and a device being accessible to the network. Signed-off-by: Trent Piepho <tpiepho@freescale.com> Acked-by: Andy Fleming <afleming@freescale.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-10-31gianfar: Fix race in TBI/SerDes configurationTrent Piepho
The init_phy() function attaches to the PHY, then configures the SerDes<->TBI link (in SGMII mode). The TBI is on the MDIO bus with the PHY (sort of) and is accessed via the gianfar's MDIO registers, using the functions gfar_local_mdio_read/write(), which don't do any locking. The previously attached PHY will start a work-queue on a timer, and probably an irq handler as well, which will talk to the PHY and thus use the MDIO bus. This uses phy_read/write(), which have locking, but not against the gfar_local_mdio versions. The result is that PHY code will try to use the MDIO bus at the same time as the SerDes setup code, corrupting the transfers. Setting up the SerDes before attaching to the PHY will insure that there is no race between the SerDes code and *our* PHY, but doesn't fix everything. Typically the PHYs for all gianfar devices are on the same MDIO bus, which is associated with the first gianfar device. This means that the first gianfar's SerDes code could corrupt the MDIO transfers for a different gianfar's PHY. The lock used by phy_read/write() is contained in the mii_bus structure, which is pointed to by the PHY. This is difficult to access from the gianfar drivers, as there is no link between a gianfar device and the mii_bus which shares the same MDIO registers. As far as the device layer and drivers are concerned they are two unrelated devices (which happen to share registers). Generally all gianfar devices' PHYs will be on the bus associated with the first gianfar. But this might not be the case, so simply locking the gianfar's PHY's mii bus might not lock the mii bus that the SerDes setup code is going to use. We solve this by having the code that creates the gianfar platform device look in the device tree for an mdio device that shares the gianfar's registers. If one is found the ID of its platform device is saved in the gianfar's platform data. A new function in the gianfar mii code, gfar_get_miibus(), can use the bus ID to search through the platform devices for a gianfar_mdio device with the right ID. The platform device's driver data is the mii_bus structure, which the SerDes setup code can use to lock the current bus. Signed-off-by: Trent Piepho <tpiepho@freescale.com> CC: Andy Fleming <afleming@freescale.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-10-31at91_ether: request/free GPIO for PHY interruptDavid Brownell
When the at91_ether driver is using a GPIO for its PHY interrupt, be sure to request (and later, if needed, free) that GPIO. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-10-31amd8111e: fix dma_free_coherent contextChunbo Luo
Acoording commit aa24886e379d2b641c5117e178b15ce1d5d366ba, dma_free_coherent() need irqs enabled. This patch fix following warning messages: WARNING: at linux/arch/x86/kernel/pci-dma.c:376 dma_free_coherent+0xaa/0xb0() Call Trace: [<ffffffff8023f80f>] warn_on_slowpath+0x5f/0x90 [<ffffffff80496ffa>] ? __kfree_skb+0x3a/0xa0 [<ffffffff802a4723>] ? discard_slab+0x23/0x40 [<ffffffff8021274a>] dma_free_coherent+0xaa/0xb0 [<ffffffff8043668f>] amd8111e_close+0x10f/0x1b0 [<ffffffff8049f3ae>] dev_close+0x5e/0xb0 [<ffffffff8049efa1>] dev_change_flags+0xa1/0x1e0 [<ffffffff806b2171>] ic_close_devs+0x36/0x4e [<ffffffff806b29ee>] ip_auto_config+0x581/0x10f3 [<ffffffff803a6e19>] ? kobject_add+0x69/0x90 [<ffffffff803a698a>] ? kobject_get+0x1a/0x30 [<ffffffff803a785b>] ? kobject_uevent+0xb/0x10 [<ffffffff803a6c62>] ? kset_register+0x52/0x60 [<ffffffff803a6f9b>] ? kset_create_and_add+0x6b/0xa0 [<ffffffff804e2e74>] ? tcp_ca_find+0x24/0x50 [<ffffffff806b246d>] ? ip_auto_config+0x0/0x10f3 [<ffffffff8020903c>] _stext+0x3c/0x150 [<ffffffff802772d3>] ? register_irq_proc+0xd3/0xf0 [<ffffffff802f0000>] ? mb_cache_create+0x80/0x1f0 [<ffffffff80688693>] kernel_init+0x141/0x1b8 [<ffffffff80688552>] ? kernel_init+0x0/0x1b8 [<ffffffff8020d609>] child_rip+0xa/0x11 [<ffffffff80688552>] ? kernel_init+0x0/0x1b8 [<ffffffff80688552>] ? kernel_init+0x0/0x1b8 [<ffffffff8020d5ff>] ? child_rip+0x0/0x11 Signed-off-by: Chunbo Luo <chunbo.luo@windriver.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-10-31atl1: fix vlan tag regressionJay Cliburn
Commit 401c0aabec4b97320f962a0161a846d230a6f7aa introduced a regression in the atl1 driver by storing the VLAN tag in the wrong TX descriptor field. This patch causes the VLAN tag to be stored in its proper location. Tested-by: Ramon Casellas <ramon.casellas@cttc.es> Signed-off-by: Jay Cliburn <jacliburn@bellsouth.net> Cc: stable@kernel.org Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-10-31SMC91x: delete unused local variable "lp"Mike Frysinger
Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-10-31myri10ge: fix stop/go mmio orderingBrice Goglin
Use mmiowb() to ensure "stop" and "go" commands are sent in order on ia64. Signed-off-by: Brice Goglin <brice@myri.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-10-31bonding: fix panic when taking bond interface down before removing moduleAndy Gospodarek
A panic was discovered with bonding when using mode 5 or 6 and trying to remove the slaves from the bond after the interface was taken down. When calling 'ifconfig bond0 down' the following happens: bond_close() bond_alb_deinitialize() tlb_deinitialize() kfree(bond_info->tx_hashtbl) bond_info->tx_hashtbl = NULL Unfortunately if there are still slaves in the bond, when removing the module the following happens: bonding_exit() bond_free_all() bond_release_all() bond_alb_deinit_slave() tlb_clear_slave() tx_hash_table = BOND_ALB_INFO(bond).tx_hashtbl u32 next_index = tx_hash_table[index].next As you might guess we panic when trying to access a few entries into the table that no longer exists. I experimented with several options (like moving the calls to tlb_deinitialize somewhere else), but it really makes the most sense to be part of the bond_close routine. It also didn't seem logical move tlb_clear_slave around too much, so the simplest option seems to add a check in tlb_clear_slave to make sure we haven't already wiped the tx_hashtbl away before searching for all the non-existent hash-table entries that used to point to the slave as the output interface. Signed-off-by: Andy Gospodarek <andy@greyhouse.net> Signed-off-by: Jay Vosburgh <fubar@us.ibm.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-10-31bonding: Clean up resource leaksJay Vosburgh
This patch reworks the resource free logic performed at the time a bonding device is released. This (a) closes two resource leaks, one for workqueues and one for multicast lists, and (b) improves commonality of code between the "destroy one" and "destroy all" paths by performing final free activity via destructor instead of explicitly (and differently) in each path. "Sean E. Millichamp" <sean@bruenor.org> reported the workqueue leak, and included a different patch. Signed-off-by: Jay Vosburgh <fubar@us.ibm.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-10-31bonding: fix miimon failure counterJay Vosburgh
During the rework of the mii monitor for: commit f0c76d61779b153dbfb955db3f144c62d02173c2 Author: Jay Vosburgh <fubar@us.ibm.com> Date: Wed Jul 2 18:21:58 2008 -0700 bonding: refactor mii monitor I left out the increment of the link failure counter. This patch corrects that omission. Signed-off-by: Jay Vosburgh <fubar@us.ibm.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-10-28amd8111e: Fix rx return codeChris Friesen
The amd8111e rx poll routine currently mishandles the case when we process exactly the number of packets specified in the budget. This patch is basically as suggested by David Miller. Signed-off-by: Chris Friesen <cfriesen@nortel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-10-28pktgen: fix multiple queue warningJesse Brandeburg
when testing the new pktgen module with multiple queues and ixgbe with: pgset "flag QUEUE_MAP_CPU" I found that I was getting errors in dmesg like: pktgen: WARNING: QUEUE_MAP_CPU disabled because CPU count (8) exceeds number <4>pktgen: WARNING: of tx queues (8) on eth15 you'll note, 8 really doesn't exceed 8. This patch seemed to fix the logic errors and also the attempts at limiting line length in printk (which didn't work anyway) Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: Robert Olsson <robert.olsson@its.uu.se> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-10-28Merge branch 'davem-fixes' of ↵David S. Miller
master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6
2008-10-27mac80211.h: fix kernel-doc excessesRandy Dunlap
Fix mac80211.h kernel-doc: it had some extra parameters that were no longer valid and incorrect format for a return value in 2 places. Warning(lin2628-rc2//include/net/mac80211.h:1487): Excess function parameter or struct member 'control' description in 'ieee80211_beacon_get' Warning(lin2628-rc2//include/net/mac80211.h:1596): Excess function parameter or struct member 'control' description in 'ieee80211_get_buffered_bc' Warning(lin2628-rc2//include/net/mac80211.h:1632): Excess function parameter or struct member 'rc4key' description in 'ieee80211_get_tkip_key' Warning(lin2628-rc2//include/net/mac80211.h:1735): Excess function parameter or struct member 'return' description in 'ieee80211_start_tx_ba_session' Warning(lin2628-rc2//include/net/mac80211.h:1775): Excess function parameter or struct member 'return' description in 'ieee80211_stop_tx_ba_session' Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Acked-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-10-27p54: fix build warningsChristian Lamparter
On Saturday 25 October 2008 10:24:10 Johannes Berg wrote: > just FYI in case you haven't seen them. the p54 one looks like a genuine > problem. > > drivers/net/wireless/p54/p54common.c: In function ‘p54_parse_eeprom’: > drivers/net/wireless/p54/p54common.c:325: warning: ‘synth’ may be used uninitialized in this function There you go. Yes, it is a genuine problem, if the device's eeprom is screwed really up. Signed-off-by: Christian Lamparter <chunkeey@web.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-10-27ath5k: Reset key cache on interface up, thus fixing resumeElias Oltmanns
After a s2ram / resume cycle, resetting the key cache does not work unless it is deferred until after the hardware has been reinitialised by a call to ath5k_hw_reset(). This fixes a regression introduced by "ath5k: fix suspend-related oops on rmmod". Signed-off-by: Elias Oltmanns <eo@nebensachen.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-10-27mac80211: correct warnings in minstrel rate control algorithmJohn W. Linville
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-10-27RFKILL: fix input layer initialisationDmitry Baryshkov
Initialise correctly last fields, so tasks can be actually executed. On some architectures the initial jiffies value is not zero, so later all rfkill incorrectly decides that rfkill_*.last is in future. Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-10-27p54: fix misbehavings when firmware can't be foundChristian Lamparter
This patch fixes a double-free error in p54pci ( http://bugzilla.kernel.org/show_bug.cgi?id=11782 ) Trying to free already-free IRQ 10 Pid: 108, comm: pccardd Not tainted 2.6.27-05577-g0cfd810-dirty #1 Call Trace:  [<c01265dc>] free_irq+0xad/0xb9  [<c01050dd>] dma_generic_alloc_coherent+0x0/0xd7  [<c01ba8e6>] p54p_stop+0x4a/0x1fa  [<c01050dd>] dma_generic_alloc_coherent+0x0/0xd7  [<c02348c5>] p54p_probe+0x23e/0x302 Tested-by: Sean Young Signed-off-by: Christian Lamparter <chunkeey@web.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-10-27dm9601: runtime mac address change supportPeter Korsgaard
Implement set_mac_address for runtime mac address change. Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-10-27via-velocity: use driver string instead of dev->name before register_netdev()Sven Hartge
This patch corrects a message bug in the via-velocity driver which bothered me for some time. The messages printed during device init look like the following: [ 8.486422] eth%d: set value of parameter Wake On Lan options to 0 ^^! [ 8.487340] eth0: VIA Networking Velocity Family Gigabit Ethernet Adapter Note the unresolved format string. dev->name is unavailable before register_netdev, so use dev_driver_string(&pdev->dev), which is also consistent with other drivers. "char *devname" parameters had to be converted to "const char *devname" to be consistent with dev_driver_string return value. Signed-off-by: Sven Hartge <sven@svenhartge.de> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-10-27drivers/net/wan/syncppp: Fix unused-var warningsJeff Garzik
Fix !CONFIG_INET warnings. Spotted, and original patch authored by: Manish Katiyar <mkatiyar@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-10-27mlx4: Setting the correct offset for default mac addressYevgeny Petrilin
Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-10-27mlx4_en: remove duplicated #includeHuang Weiyi
Removed duplicated #include <linux/cpumask.h> in drivers/net/mlx4/en_main.c. Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-10-27ibm_newemac: Fix typo in flow control config optionJosh Boyer
The recent build fix for ibm_newemac has a typo in the config option #ifdef used for disabling flow control. This corrects it to the proper Kconfig option name. Reported-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-10-27ehea: Detect 16GB hugepages for firmware restrictionThomas Klein
All kernel memory which is used for kernel/hardware data transfer must be registered with firmware using "memory regions". 16GB hugepages may not be part of a memory region due to firmware restrictions. This patch modifies the walk_memory_resource callback fn to filter hugepages and add only standard memory to the busmap which is later on used for MR registration. Signed-off-by: Thomas Klein <tklein@de.ibm.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-10-27dmfe: check pci_alloc_consistent errorsFUJITA Tomonori
We need to check the address that pci_alloc_consistent() returns since it might fail. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-10-27qeth: avoid skb_under_panic for malformatted inbound dataUrsula Braun
To make the qeth driver more robust in case of malformatted inbound packets due to hardware problems, an additional check for OSN-card-type is added for OSN-type packets. Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com> Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-10-27qeth: remove unnecessary support ckeck in sysfs route6Frank Blaschka
Removing this check improves usability because you do not have to set the device online to initially set ipv6 routing option. Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-10-27qeth: fix offset error in non prealloc header pathFrank Blaschka
For the non preallocated qeth header code path we should not change the header length. Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-10-27qeth: remove non-recover-thread checkingsUrsula Braun
IP-threads have been removed from the qeth driver. Only the recover-thread is left over. This makes checkings for non-recover threads superfluous. Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com> Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-10-26syncookies: fix inclusion of tcp options in syn-ackFlorian Westphal
David Miller noticed that commit 33ad798c924b4a1afad3593f2796d465040aadd5 '(tcp: options clean up') did not move the req->cookie_ts check. This essentially disabled commit 4dfc2817025965a2fc78a18c50f540736a6b5c24 '[Syncookies]: Add support for TCP options via timestamps.'. This restores the original logic. Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-10-26libertas: free sk_buff with kfree_skbSergio Luis
free sk_buff with kfree_skb, instead of kree Signed-off-by: Sergio Luis <sergio@larces.uece.br> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-10-26btsdio: free sk_buff with kfree_skbSergio Luis
free sk_buff with kfree_skb, instead of kree Signed-off-by: Sergio Luis <sergio@larces.uece.br> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-10-26Phonet: do not reply to indication reset packetsRemi Denis-Courmont
This fixes a potential error packet loop. Signed-off-by: Remi Denis-Courmont <remi.denis-courmont@nokia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-10-26Phonet: include generic link-layer header size in MAX_PHONET_HEADERRemi Denis-Courmont
This fixes an OOPS in hard_header if a Phonet address is assigned to a non-Phonet network interface. Signed-off-by: Remi Denis-Courmont <remi.denis-courmont@nokia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-10-26Merge branch 'for-linus' of git://neil.brown.name/mdLinus Torvalds
* 'for-linus' of git://neil.brown.name/md: md: allow extended partitions on md devices. md: use sysfs_notify_dirent to notify changes to md/dev-xxx/state md: use sysfs_notify_dirent to notify changes to md/array_state
2008-10-26Merge branch 'for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: psmouse - add support for Elantech touchpads Input: i8042 - add Blue FB5601 to noloop exception table
2008-10-26Merge branch 'for-linus' of git://git.o-hand.com/linux-mfdLinus Torvalds
* 'for-linus' of git://git.o-hand.com/linux-mfd: mfd: Make WM8400 depend on I2C until SPI is submitted mfd: add missing Kconfig entry for da903x
2008-10-26Merge branch 'for-upstream' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/dvrabel/uwb * 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/dvrabel/uwb: uwb: build UWB before USB/WUSB
2008-10-26Merge branch 'for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: HID: Add support for Sony Vaio VGX-TP1E HID: fix lock imbalance in hiddev HID: fix lock imbalance in hidraw HID: fix hidbus/appletouch device binding regression HID: add hid_type to general hid struct HID: quirk for OLED devices present in ASUS G50/G70/G71 HID: Remove "default m" for Thrustmaster and Zeroplus HID: fix hidraw_exit section mismatch HID: add support for another Gyration remote control Revert "HID: Invert HWHEEL mappings for some Logitech mice"
2008-10-26docbooks: fix fatal filename errorsRandy Dunlap
Fix docbook fatal errors (file location changed): docproc: lin2628-rc1/include/asm-x86/io_32.h: No such file or directory make[1]: *** [Documentation/DocBook/deviceiobook.xml] Error 1 docproc: lin2628-rc1/include/asm-x86/atomic_32.h: No such file or directory make[1]: *** [Documentation/DocBook/kernel-api.xml] Error 1 docproc: lin2628-rc1/include/asm-x86/mca_dma.h: No such file or directory make[1]: *** [Documentation/DocBook/mcabook.xml] Error 1 Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-10-26kernel-doc: allow more whitespace in macrosRandy Dunlap
Allow macros that are annotated with kernel-doc to contain whitespace between the '#' and "define". It's valid and being used, so allow it. Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-10-26Merge branch 'release' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6 * 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6: leds-hp-disk: fix build warning ACPI: Oops in ACPI with git latest ACPI suspend: build fix for ACPI_SLEEP=n && XEN_SAVE_RESTORE=y. toshiba_acpi: always call input_sync() after input_report_switch() ACPI: Always report a sync event after a lid state change ACPI: cpufreq, processor: fix compile error in drivers/acpi/processor_perflib.c i7300_idle: Fix compile warning CONFIG_I7300_IDLE_IOAT_CHANNEL not defined i7300_idle: Cleanup based review comments i7300_idle: Disable ioat channel only on platforms where ile driver can load
2008-10-26Linux 2.6.28-rc2Linus Torvalds
.. fix all the worst problems in -rc1
2008-10-26m68k: Disable Amiga serial console support if modularGeert Uytterhoeven
If CONFIG_AMIGA_BUILTIN_SERIAL=m, I get the following warnings: | drivers/char/amiserial.c: At top level: | drivers/char/amiserial.c:2138: warning: data definition has no type or storage class | drivers/char/amiserial.c:2138: warning: type defaults to 'int' in declaration of 'console_initcall' | drivers/char/amiserial.c:2138: warning: parameter names (without types) in function declaration | drivers/char/amiserial.c:2134: warning: 'amiserial_console_init' defined but not used because console_initcall() is not defined (nor really sensible) in the modular case. So disable serial console support if the driver is modular. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-10-26epoll: avoid double-inserts in case of EFAULTDavide Libenzi
In commit f337b9c58332bdecde965b436e47ea4c94d30da0 ("epoll: drop unnecessary test") Thomas found that there is an unnecessary (always true) test in ep_send_events(). The callback never inserts into ->rdllink while the send loop is performed, and also does the ~EP_PRIVATE_BITS test. Given we're holding the mutex during this time, the conditions tested inside the loop are always true. HOWEVER. The test "!ep_is_linked(&epi->rdllink)" wasn't there because we insert into ->rdllink, but because the send-events loop might terminate before the whole list is scanned (-EFAULT). In such cases, when the loop terminates early, and when a (leftover) file received an event while we're performing the lockless loop, we need such test to avoid to double insert the epoll items. The list_splice() done a few steps below, will correctly re-insert the ones that were left on "txlist". This should fix the kenrel.org bugzilla entry 11831. Signed-off-by: Davide Libenzi <davidel@xmailserver.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-10-26select: deal with math overflow from borderline valid userland dataArjan van de Ven
Some userland apps seem to pass in a "0" for the seconds, and several seconds worth of usecs to select(). The old kernels accepted this just fine, so the new kernels must too. However, due to the upscaling of the microseconds to nanoseconds we had some cases where we got math overflow, and depending on the GCC version (due to inlining decisions) that actually resulted in an -EINVAL return. This patch fixes this by adding the excess microseconds to the seconds field. Also with thanks to Marcin Slusarz for spotting some implementation bugs in the diagnostics patches. Reported-by: Carlos R. Mafra <crmafra2@gmail.com> Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-10-26wireless: fix regression caused by regulatory config optionArjan van de Ven
The default for the regulatory compatibility option is wrong; if you picked the default you ended up with a non-functional wifi system (at least I did on Fedora 9 with iwl4965). I don't think even the October 2008 releases of the various distros has the new userland so clearly the default is wrong, and also we can't just go about deleting this in 2.6.29... Change the default to "y" and also adjust the config text a little to reflect this. This patch fixes regression #11859 With thanks to Johannes Berg for the diagnostics Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-10-26cgroup: remove unused variableStephen Rothwell
/scratch/sfr/next/kernel/cgroup.c: In function 'cgroup_tasks_start': /scratch/sfr/next/kernel/cgroup.c:2107: warning: unused variable 'i' Introduced in commit cc31edceee04a7b87f2be48f9489ebb72d264844 "cgroups: convert tasks file to use a seq_file with shared pid array". Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>