aboutsummaryrefslogtreecommitdiffstats
path: root/include (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2011-05-26mm: don't access vm_flags as 'int'KOSAKI Motohiro4-8/+10
The type of vma->vm_flags is 'unsigned long'. Neither 'int' nor 'unsigned int'. This patch fixes such misuse. Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> [ Changed to use a typedef - we'll extend it to cover more cases later, since there has been discussion about making it a 64-bit type.. - Linus ] Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-05-25tmpfs: fix XATTR N overriding POSIX_ACL YEric Paris1-14/+15
Choosing TMPFS_XATTR default N was switching off TMPFS_POSIX_ACL, even if it had been Y in oldconfig; and Linus reports that PulseAudio goes subtly wrong unless it can use ACLs on /dev/shm. Make TMPFS_POSIX_ACL select TMPFS_XATTR (and depend upon TMPFS), and move the TMPFS_POSIX_ACL entry before the TMPFS_XATTR entry, to avoid asking unnecessary questions then ignoring their answers. Signed-off-by: Hugh Dickins <hughd@google.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-05-25video: mb862xx: udelay need linux/delay.hStephen Rothwell1-0/+1
Fix this: drivers/video/mb862xx/mb862xx-i2c.c: In function 'mb862xx_i2c_wait_event': drivers/video/mb862xx/mb862xx-i2c.c:25: error: implicit declaration of function 'udelay' caused by commit f8a6b1f44833 ("video: mb862xx: add support for controller's I2C bus adapter"). Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-05-25slub: remove no-longer used 'unlock_out' labelLinus Torvalds1-1/+0
Commit a71ae47a2cbf ("slub: Fix double bit unlock in debug mode") removed the only goto to this label, resulting in mm/slub.c: In function '__slab_alloc': mm/slub.c:1834: warning: label 'unlock_out' defined but not used fixed trivially by the removal of the label itself too. Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Cc: Christoph Lameter <cl@linux.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-05-25hrtimers: Fix typo causing erratic timersThomas Gleixner1-1/+1
commit 9ec2690758a5 ("timerfd: Manage cancelable timers in timerfd") introduced a CONFIG_HIGHRES_TIMERS (should be CONFIG_HIGH_RES_TIMERS) typo, which caused applications depending on CLOCK_REALTIME timers to become sluggy due to the fact that the time base of the realtime timers was not updated when the wall clock time was set. This causes anything from 100% CPU use for some applications to odd delays and hickups. Reported-bisected-and-tested-by: Anca Emanuel <anca.emanuel@gmail.com> Tested-by: Linus Torvalds <torvalds@linux-foundation.org> Fatfingered-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-05-25bonding: documentation and code cleanup for resend_igmpFlavio Leitner3-12/+23
Improves the documentation about how IGMP resend parameter works, fix two missing checks and coding style issues. Signed-off-by: Flavio Leitner <fbl@redhat.com> Acked-by: Rick Jones <rick.jones2@hp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-05-25bonding: prevent deadlock on slave store with alb mode (v3)Neil Horman3-16/+10
This soft lockup was recently reported: [root@dell-per715-01 ~]# echo +bond5 > /sys/class/net/bonding_masters [root@dell-per715-01 ~]# echo +eth1 > /sys/class/net/bond5/bonding/slaves bonding: bond5: doing slave updates when interface is down. bonding bond5: master_dev is not up in bond_enslave [root@dell-per715-01 ~]# echo -eth1 > /sys/class/net/bond5/bonding/slaves bonding: bond5: doing slave updates when interface is down. BUG: soft lockup - CPU#12 stuck for 60s! [bash:6444] CPU 12: Modules linked in: bonding autofs4 hidp rfcomm l2cap bluetooth lockd sunrpc be2d Pid: 6444, comm: bash Not tainted 2.6.18-262.el5 #1 RIP: 0010:[<ffffffff80064bf0>] [<ffffffff80064bf0>] .text.lock.spinlock+0x26/00 RSP: 0018:ffff810113167da8 EFLAGS: 00000286 RAX: ffff810113167fd8 RBX: ffff810123a47800 RCX: 0000000000ff1025 RDX: 0000000000000000 RSI: ffff810123a47800 RDI: ffff81021b57f6f8 RBP: ffff81021b57f500 R08: 0000000000000000 R09: 000000000000000c R10: 00000000ffffffff R11: ffff81011d41c000 R12: ffff81021b57f000 R13: 0000000000000000 R14: 0000000000000282 R15: 0000000000000282 FS: 00002b3b41ef3f50(0000) GS:ffff810123b27940(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b CR2: 00002b3b456dd000 CR3: 000000031fc60000 CR4: 00000000000006e0 Call Trace: [<ffffffff80064af9>] _spin_lock_bh+0x9/0x14 [<ffffffff886937d7>] :bonding:tlb_clear_slave+0x22/0xa1 [<ffffffff8869423c>] :bonding:bond_alb_deinit_slave+0xba/0xf0 [<ffffffff8868dda6>] :bonding:bond_release+0x1b4/0x450 [<ffffffff8006457b>] __down_write_nested+0x12/0x92 [<ffffffff88696ae4>] :bonding:bonding_store_slaves+0x25c/0x2f7 [<ffffffff801106f7>] sysfs_write_file+0xb9/0xe8 [<ffffffff80016b87>] vfs_write+0xce/0x174 [<ffffffff80017450>] sys_write+0x45/0x6e [<ffffffff8005d28d>] tracesys+0xd5/0xe0 It occurs because we are able to change the slave configuarion of a bond while the bond interface is down. The bonding driver initializes some data structures only after its ndo_open routine is called. Among them is the initalization of the alb tx and rx hash locks. So if we add or remove a slave without first opening the bond master device, we run the risk of trying to lock/unlock a spinlock that has garbage for data in it, which results in our above softlock. Note that sometimes this works, because in many cases an unlocked spinlock has the raw_lock parameter initialized to zero (meaning that the kzalloc of the net_device private data is equivalent to calling spin_lock_init), but thats not true in all cases, and we aren't guaranteed that condition, so we need to pass the relevant spinlocks through the spin_lock_init function. Fix it by moving the spin_lock_init calls for the tx and rx hashtable locks to the ndo_init path, so they are ready for use by the bond_store_slaves path. Change notes: v2) Based on conversation with Jay and Nicolas it seems that the ability to enslave devices while the bond master is down should be safe to do. As such this is an outlier bug, and so instead we'll just initalize the errant spinlocks in the init path rather than the open path, solving the problem. We'll also remove the warnings about the bond being down during enslave operations, since it should be safe v3) Fix spelling error Signed-off-by: Neil Horman <nhorman@tuxdriver.com> Reported-by: jtluka@redhat.com CC: Jay Vosburgh <fubar@us.ibm.com> CC: Andy Gospodarek <andy@greyhouse.net> CC: nicolas.2p.debian@gmail.com CC: "David S. Miller" <davem@davemloft.net> Signed-off-by: Jay Vosburgh <fubar@us.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-05-25net: hold rtnl again in dump callbacksEric Dumazet2-2/+8
Commit e67f88dd12f6 (dont hold rtnl mutex during netlink dump callbacks) missed fact that rtnl_fill_ifinfo() must be called with rtnl held. Because of possible deadlocks between two mutexes (cb_mutex and rtnl), its not easy to solve this problem, so revert this part of the patch. It also forgot one rcu_read_unlock() in FIB dump_rules() Add one ASSERT_RTNL() in rtnl_fill_ifinfo() to remind us the rule. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> CC: Patrick McHardy <kaber@trash.net> CC: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-05-25Add Fujitsu 1000base-SX PCI ID to tg3Meelis Roos1-0/+1
This patch adds the PCI ID of Fujitsu 1000base-SX NIC to tg3 driver. Tested to detect the card, MAC and serdes, not tested with link at the moment since I have no fiber switch here. I did not add new constants to the pci_ids.h header file since these constants are used only here. Signed-off-by: Meelis Roos <mroos@linux.ee> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-05-25bnx2x: protect sequence increment with mutexDmitry Kravkov1-1/+2
Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-05-25sch_sfq: fix peek() implementationEric Dumazet1-13/+1
Since commit eeaeb068f139 (sch_sfq: allow big packets and be fair), sfq_peek() can return a different skb that would be normally dequeued by sfq_dequeue() [ if current slot->allot is negative ] Use generic qdisc_peek_dequeued() instead of custom implementation, to get consistent result. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> CC: Jarek Poplawski <jarkao2@gmail.com> CC: Patrick McHardy <kaber@trash.net> CC: Jesper Dangaard Brouer <hawk@diku.dk> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-05-25isdn: netjet - blacklist Digium TDM400PPrarit Bhargava1-0/+6
[2nd try ... 1st attempt didn't make it to netdev mailing list] A quick google search reveals that people with this card are blacklisting it in the initramfs and in the module blacklist based on a statement that it is unsupported. Since the older Digium is also unsupported I'm pretty confident that this newer card is also not supported. lspci -xxx -vv shows 04:07.0 Communication controller: Tiger Jet Network Inc. Tiger3XX Modem/ISDN interface Subsystem: Device b100:0003 P. ----8<---- The Asterisk Voice Card, DIGIUM TDM400P is unsupported by the netjet driver. Blacklist it like the Digium X100P/X101P card. Signed-off-by: Prarit Bhargava <prarit@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-05-25via-velocity: don't annotate MAC registers as packedUlrich Hecht1-1/+1
On ARM, memory accesses through packed pointers behave in unexpected ways in GCC releases 4.3 and higher; see https://lkml.org/lkml/2011/2/2/163 for discussion. In this particular case, 32-bit I/O registers are accessed bytewise, causing incorrect setting of the DMA address registers which in turn leads to an error interrupt storm that brings the system to a halt. Since the mac_regs structure does not need any packing anyway, this patch simply removes the attribute to fix the issue. Signed-off-by: Ulrich Hecht <uli@suse.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-05-25xen: netfront: hold RTNL when updating features.Ian Campbell1-0/+2
Konrad reports: [ 0.930811] RTNL: assertion failed at /home/konrad/ssd/linux/net/core/dev.c (5258) [ 0.930821] Pid: 22, comm: xenwatch Not tainted 2.6.39-05193-gd762f43 #1 [ 0.930825] Call Trace: [ 0.930834] [<ffffffff8143bd0e>] __netdev_update_features+0xae/0xe0 [ 0.930840] [<ffffffff8143dd41>] netdev_update_features+0x11/0x30 [ 0.930847] [<ffffffffa0037105>] netback_changed+0x4e5/0x800 [xen_netfront] [ 0.930854] [<ffffffff8132a838>] xenbus_otherend_changed+0xa8/0xb0 [ 0.930860] [<ffffffff8157ca99>] ? _raw_spin_unlock_irqrestore+0x19/0x20 [ 0.930866] [<ffffffff8132adfe>] backend_changed+0xe/0x10 [ 0.930871] [<ffffffff8132875a>] xenwatch_thread+0xba/0x180 [ 0.930876] [<ffffffff810a8ba0>] ? wake_up_bit+0x40/0x40 [ 0.930881] [<ffffffff813286a0>] ? split+0xf0/0xf0 [ 0.930886] [<ffffffff810a8646>] kthread+0x96/0xa0 [ 0.930891] [<ffffffff815855a4>] kernel_thread_helper+0x4/0x10 [ 0.930896] [<ffffffff815846b3>] ? int_ret_from_sys_call+0x7/0x1b [ 0.930901] [<ffffffff8157cf61>] ? retint_restore_args+0x5/0x6 [ 0.930906] [<ffffffff815855a0>] ? gs_change+0x13/0x13 This update happens in xenbus watch callback context and hence does not already hold the rtnl. Take the lock as necessary. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Tested-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-05-25sctp: fix memory leak of the ASCONF queue when free asocWei Yongjun1-0/+16
If an ASCONF chunk is outstanding, then the following ASCONF chunk will be queued for later transmission. But when we free the asoc, we forget to free the ASCONF queue at the same time, this will cause memory leak. Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2011-05-25net: make dev_disable_lro use physical device if passed a vlan dev (v2)Neil Horman1-0/+7
If the device passed into dev_disable_lro is a vlan, then repoint the dev poniter so that we actually modify the underlying physical device. Signed-of-by: Neil Horman <nhorman@tuxdriver.com> CC: davem@davemloft.net CC: bhutchings@solarflare.com Signed-off-by: David S. Miller <davem@davemloft.net>
2011-05-25net: move is_vlan_dev into public header file (v2)Neil Horman2-5/+5
Migrate is_vlan_dev() to if_vlan.h so that core networkig can use it Signed-off-by: Neil Horman <nhorman@tuxdriver.com> CC: davem@davemloft.net CC: bhutchings@solarflare.com Signed-off-by: David S. Miller <davem@davemloft.net>
2011-05-25mmc: core: eMMC bus width may not work on all platformsPhilip Rakity1-10/+102
CMD19 -- The offical way to validate bus widths from the JEDEC spec does not work on all platforms. Some platforms that use PCI/PCIe to connect their SD controllers are known to fail. If the quirk MMC_BUS_WIDTH_TEST is not defined we try to figure out the bus width by reading the ext_csd at different bus widths and compare this against the ext_csd read in 1 bit mode. If no ext_csd is available we default to 1 bit operations. Code has been tested on mmp2 against 8 bit eMMC and Transcend 2GB card that is known to not work in 4 bit mode. The physical pins on the card are not present to support 4 bit operation. Signed-off-by: Philip Rakity <prakity@marvell.com> Signed-off-by: Chris Ball <cjb@laptop.org>
2011-05-25mmc: sdhci: Auto-CMD23 fixes.Andrei Warkentin1-2/+2
Fixes bugs in Auto-CMD23 feature enable decision. Auto-CMD23 should be enabled if host is >= v3, and SDMA is not in use. USE_ADMA | USE_SDMA | Auto-CMD23 ---------+----------+----------- 0 | 0 | 1 ---------+----------+----------- 0 | 1 | 0 ---------+----------+----------- 1 | 0 | 1 ---------+----------+----------- 1 | 1 | 1 Signed-off-by: Andrei Warkentin <andreiw@motorola.com> Signed-off-by: Chris Ball <cjb@laptop.org>
2011-05-25mmc: sdhci: Auto-CMD23 support.Andrei Warkentin3-1/+19
Enables Auto-CMD23 support where available (SDHCI 3.0 controllers) Signed-off-by: Andrei Warkentin <andreiw@motorola.com> Tested-by: Arindam Nath <arindam.nath@amd.com> Signed-off-by: Chris Ball <cjb@laptop.org>
2011-05-25mmc: core: Block CMD23 support for UHS104/SDXC cards.Andrei Warkentin4-4/+12
SD cards operating at UHS104 or better support SET_BLOCK_COUNT. Signed-off-by: Andrei Warkentin <andreiw@motorola.com> Reviewed-by: Arindam Nath <arindam.nath@amd.com> Signed-off-by: Chris Ball <cjb@laptop.org>
2011-05-25mmc: sdhci: Implement MMC_CAP_CMD23 for SDHCI.Andrei Warkentin3-17/+49
Implements support for multiblock transfers bounded by SET_BLOCK_COUNT (CMD23). Signed-off-by: Andrei Warkentin <andreiw@motorola.com> Signed-off-by: Chris Ball <cjb@laptop.org>
2011-05-25mmc: core: Use CMD23 for multiblock transfers when we can.Andrei Warkentin5-29/+93
CMD23-prefixed instead of open-ended multiblock transfers have a performance advantage on some MMC cards. Signed-off-by: Andrei Warkentin <andreiw@motorola.com> Signed-off-by: Chris Ball <cjb@laptop.org>
2011-05-25arch/tile: prefer "tilepro" as the name of the 32-bit architectureChris Metcalf2-0/+3
With this change, you can (and should) build with ARCH=tilepro for the current 32-bit chips. Building with ARCH=tile continues to work, but we've renamed the defconfig file to tilepro_defconfig for consistency. Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
2011-05-25hwmon: New driver for the SMSC EMC6W201Jean Delvare4-0/+592
This is a new driver for the SMSC EMC6W201 hardware monitoring device. The device is functionally close to the EMC6D100 series, but is register-incompatible. Signed-off-by: Jean Delvare <khali@linux-fr.org> Tested-by: Harry G McGavran Jr <w5pny@arrl.net> Tested-by: Jeff Rickman <jrickman@myamigos.us> Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
2011-05-25hwmon: (abituguru) Depend on DMIJean Delvare3-18/+2
The abituguru drivers are only built on X86, where DMI support is now enabled by default. So let these drivers depend on DMI, for the following gains: * Robustness and safety. Detection of these devices is weak and uses non-standard methods, it should really be limited to Abit boards unless the user explicitly asks otherwise. * Code simplicity. The code is easier to read without ifdefs. * Better build testing coverage. Now there's only one way to build the drivers, so no risk of build failure on exotic systems. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Guenter Roeck <guenter.roeck@ericsson.com> Acked-by: Alistair John Strachan <alistair@devzero.co.uk> Acked-by: Hans de Goede <hdegoede@redhat.com>
2011-05-25hwmon: (it87) Use request_muxed_regionNat Gurumoorthy1-12/+19
Serialize access to the hardware by using "request_muxed_region" macro defined by Alan Cox. Call to this macro will hold off the requestor if the resource is currently busy. "superio_enter" will return an error if call to "request_muxed_region" fails. Rest of the code change is to ripple an error return from superio_enter to the top level. Signed-off-by: Nat Gurumoorthy <natg@google.com> Acked-by: Guenter Roeck <guenter.roeck@ericsson.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2011-05-25hwmon: (sch5627) Trigger Vbat measurementsHans de Goede1-1/+22
The sch5627 needs to be explicitly told to start an adc conversion for Vbat, once in a while. Without this Vbat may read 0, and will never get updated. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2011-05-25hwmon: (sch5627) Add sch5627_send_cmd functionHans de Goede1-4/+19
This patch generalizes sch5627_read_virtual_reg so that it can be used to write virtual regs too. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Sigend-off-by: Jean Delvare <khali@linux-fr.org>
2011-05-25i8k: Integrate with the hwmon subsystemJean Delvare2-0/+163
Let i8k create an hwmon class device so that libsensors will expose the CPU temperature and fan speeds to monitoring applications. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Guenter Roeck <guenter.roeck@ericsson.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@redhat.com> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Massimo Dal Zotto <dz@debian.org>
2011-05-25hwmon: (max6650) Properly support the MAX6650Jean Delvare2-10/+36
The MAX6650 has only one fan input. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: "Hans J. Koch" <hjk@hansjkoch.de> Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
2011-05-25hwmon: (max6650) Drop device detectionJean Delvare2-45/+8
MAX6650 device detection is unreliable, we got reports of false positives. We now have many ways to let users instantiate the devices explicitly, so unreliable detection should be dropped. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: "Hans J. Koch" <hjk@hansjkoch.de> Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
2011-05-25Move ACPI power meter driver to hwmonJean Delvare5-12/+11
As discussed earlier, the ACPI power meter driver would better live in drivers/hwmon, as its only purpose is to create hwmon-style interfaces for ACPI 4.0 power meter devices. Users are more likely to look for it there, and less likely to accidentally hide it by unselecting its dependencies. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: "Darrick J. Wong" <djwong@us.ibm.com> Acked-by: Guenter Roeck <guenter.roeck@ericsson.com> Cc: Len Brown <lenb@kernel.org>
2011-05-25hwmon: (f71882fg) Add support for F71808AHans de Goede3-4/+89
Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2011-05-25hwmon: (f71882fg) Split has_beep in fan_has_beep and temp_has_beepHans de Goede1-7/+21
Needed for upcoming support of the F71808A. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2011-05-25hwmon: (asc7621) Drop duplicate dependencyJean Delvare1-1/+1
The config SENSORS_ASC7621 entry is inside an if HWMON / endif block, so it already depends on HWMON. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
2011-05-25hwmon: (jc42) Change detection classJean Delvare2-2/+2
While the JC42-compatible chips are temperature sensors, I2C_CLASS_SPD makes more sense because these chips always live on memory modules. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Guenter Roeck <guenter.roeck@ericsson.com>
2011-05-25hwmon: Add driver for AMD family 15h processor power informationAndreas Herrmann5-0/+284
This CPU family provides NB register values to gather following TDP information * ProcessorPwrWatts: Specifies in Watts the maximum amount of power the processor can support. * CurrPwrWatts: Specifies in Watts the current amount of power being consumed by the processor. This driver provides * power1_crit (ProcessorPwrWatts) * power1_input (CurrPwrWatts) Signed-off-by: Andreas Herrmann <andreas.herrmann3@amd.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2011-05-25hwmon: (k10temp) Add support for Fam15h (Bulldozer)Andre Przywara3-5/+7
AMDs upcoming CPUs use the same mechanism for the internal temperature reporting as the Fam10h CPUs, so we just needed to add the appropriate PCI-ID to the list. This allows to use the k10temp driver on those CPUs. While at it change the Kconfig entry to be more generic. Signed-off-by: Andre Przywara <andre.przywara@amd.com> Acked-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2011-05-25hwmon: Use helper functions to set and get driver dataJean Delvare6-27/+27
Use helper functions to set and get driver data. This is more elegant. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Andreas Herrmann <andreas.herrmann3@amd.com> Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
2011-05-25i8k: Avoid lahf in 64-bit codeLuca Tettamanti1-2/+2
i8k uses lahf to read the flag register in 64-bit code; early x86-64 CPUs, however, lack this instruction and we get an invalid opcode exception at runtime. Use pushf to load the flag register into the stack instead. Signed-off-by: Luca Tettamanti <kronos.it@gmail.com> Reported-by: Jeff Rickman <jrickman@myamigos.us> Tested-by: Jeff Rickman <jrickman@myamigos.us> Tested-by: Harry G McGavran Jr <w5pny@arrl.net> Cc: stable@kernel.org Cc: Massimo Dal Zotto <dz@debian.org> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2011-05-25signal: sys_pause() should check signal_pending()Oleg Nesterov1-2/+4
ERESTART* is always wrong without TIF_SIGPENDING. Teach sys_pause() to handle the spurious wakeup correctly. Signed-off-by: Oleg Nesterov <oleg@redhat.com>
2011-05-25ptrace: ptrace_resume() shouldn't wake up !TASK_TRACED threadOleg Nesterov1-1/+1
It is not clear why ptrace_resume() does wake_up_process(). Unless the caller is PTRACE_KILL the tracee should be TASK_TRACED so we can use wake_up_state(__TASK_TRACED). If sys_ptrace() races with SIGKILL we do not need the extra and potentionally spurious wakeup. If the caller is PTRACE_KILL, wake_up_process() is even more wrong. The tracee can sleep in any state in any place, and if we have a buggy code which doesn't handle a spurious wakeup correctly PTRACE_KILL can be used to exploit it. For example: int main(void) { int child, status; child = fork(); if (!child) { int ret; assert(ptrace(PTRACE_TRACEME, 0,0,0) == 0); ret = pause(); printf("pause: %d %m\n", ret); return 0x23; } sleep(1); assert(ptrace(PTRACE_KILL, child, 0,0) == 0); assert(child == wait(&status)); printf("wait: %x\n", status); return 0; } prints "pause: -1 Unknown error 514", -ERESTARTNOHAND leaks to the userland. In this case sys_pause() is buggy as well and should be fixed. I do not know what was the original rationality behind PTRACE_KILL. The man page is simply wrong and afaics it was always wrong. Imho it should be deprecated, or may be it should do send_sig(SIGKILL) as Denys suggests, but in any case I do not think that the current behaviour was intentional. Note: there is another problem, ptrace_resume() changes ->exit_code and this can race with SIGKILL too. Eventually we should change ptrace to not use ->exit_code. Signed-off-by: Oleg Nesterov <oleg@redhat.com>
2011-05-25drivers/tty/serial/pch_uart.c needs slab.hAndrew Morton1-0/+1
alpha allmodconfig: drivers/tty/serial/pch_uart.c: In function 'dma_handle_tx': drivers/tty/serial/pch_uart.c:873: error: implicit declaration of function 'kzalloc' drivers/tty/serial/pch_uart.c:873: warning: assignment makes pointer from integer without a cast drivers/tty/serial/pch_uart.c: In function 'pch_uart_init_port': drivers/tty/serial/pch_uart.c:1403: warning: assignment makes pointer from integer without a cast Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Cc: Greg KH <greg@kroah.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-05-25drivers/gpio/ml_ioh_gpio.c needs slab.hAndrew Morton1-0/+3
alpha allmodconfig: drivers/gpio/ml_ioh_gpio.c: In function 'ioh_gpio_probe': drivers/gpio/ml_ioh_gpio.c:205: error: implicit declaration of function 'kzalloc' drivers/gpio/ml_ioh_gpio.c:205: warning: assignment makes pointer from integer without a cast also fix this: drivers/gpio/ml_ioh_gpio.c:145: warning: 'ioh_gpio_save_reg_conf' defined but not used drivers/gpio/ml_ioh_gpio.c:154: warning: 'ioh_gpio_restore_reg_conf' defined but not used Cc: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-05-25drivers/gpio/vx855_gpio.c needs slab.hAndrew Morton1-0/+1
alpha allmodconfig: drivers/gpio/vx855_gpio.c: In function 'vx855gpio_probe': drivers/gpio/vx855_gpio.c:233: error: implicit declaration of function 'kzalloc' drivers/gpio/vx855_gpio.c:233: warning: assignment makes pointer from integer without a cast Cc: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-05-25fs/ncpfs/inode.c: suppress used-uninitialised warningAndrew Morton1-3/+1
We get this spurious warning: fs/ncpfs/inode.c: In function 'ncp_fill_super': fs/ncpfs/inode.c:451: warning: 'data.mounted_vol[1u]' may be used uninitialized in this function fs/ncpfs/inode.c:451: warning: 'data.mounted_vol[2u]' may be used uninitialized in this function fs/ncpfs/inode.c:451: warning: 'data.mounted_vol[3u]' may be used uninitialized in this function ... It's notabug, but we can easily fix it with a memset(). Reported-by: Harry Wei <jiaweiwei.xiyou@gmail.com> Cc: Petr Vandrovec <petr@vandrovec.name> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-05-25checkpatch: fix defect in printk(KERN_<LEVEL> 80 column exceptionsJoe Perches1-1/+1
Currently, printk lines with a only KERN_PREFIX and a quoted string without a comma or close paren that exceed 80 columns are flagged with a warning. ie: printk(KERN_WARNING "some long string that extends beond 80 cols..." "and is continued on another line\n"); Allow this form instead of emitting a warning. Signed-off-by: Joe Perches <joe@perches.com> Cc: Andy Whitcroft <apw@canonical.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-05-25checkpatch: add <foo>_<level> and MODULE_<BAR> to 80 column exceptionsJoe Perches1-3/+3
Many module or file local logging functions use specific prefixes other than pr|dev|netdev. Allow all forms like foo_printk and foo_err to be longer than 80 columns. Also allow MODULE_<BAR> declarations to be longer than 80 columns. Signed-off-by: Joe Perches <joe@perches.com> Cc: Andy Whitcroft <apw@canonical.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-05-25checkpatch: add check for line continuations in quoted stringsJoe Perches1-0/+5
Add a warning for unterminated quoted strings with line continuations as these frequently add unwanted whitespace. Signed-off-by: Joe Perches <joe@perches.com> Cc: Andy Whitcroft <apw@canonical.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>