aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2010-11-17ext4: fix setting random pages PageUptodateMarkus Trippelsdorf1-2/+2
ext4_end_bio calls put_page and kmem_cache_free before calling SetPageUpdate(). This can result in setting the PageUptodate bit on random pages and causes the following BUG: BUG: Bad page state in process rm pfn:52e54 page:ffffea0001222260 count:0 mapcount:0 mapping: (null) index:0x0 arch kernel: page flags: 0x4000000000000008(uptodate) Fix the problem by moving put_io_page() after the SetPageUpdate() call. Thanks to Hugh Dickins for analyzing this problem. Reported-by: Markus Trippelsdorf <[email protected]> Tested-by: Markus Trippelsdorf <[email protected]> Signed-off-by: Markus Trippelsdorf <[email protected]> Signed-off-by: "Theodore Ts'o" <[email protected]>
2010-11-17hardirq.h: remove now-empty #ifdef/#endif pairLinus Torvalds1-2/+0
Commit 451a3c24b013 ("BKL: remove extraneous #include <smp_lock.h>") removed the #include line that was the only thing that was surrounded by the #ifdef/#endif. So now that #ifdef is guarding nothing at all. Just remove it. Reported-by: Byeong-ryeol Kim <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-11-17Fix build failure due to hwirq.h needing smp_lock.hLinus Torvalds2-4/+1
Arnd Bergmann did an automated scripting run to find left-over instances of <linux/smp_lock.h>, and had made it trigger it on the normal BKL use of lock_kernel and unlock_lernel (and apparently release_kernel_lock and reacquire_kernel_lock too, used by the scheduler). That resulted in commit 451a3c24b013 ("BKL: remove extraneous #include <smp_lock.h>"). However, hardirq.h was the only remaining user of the old 'kernel_locked()' interface, and Arnd's script hadn't checked for that. So depending on your configuration and what header files had been included, you would get errors like "implicit declaration of function 'kernel_locked'" during the build. The right fix is not to just re-instate the smp_lock.h include - it is to just remove 'kernel_locked()' entirely, since the only use was this one special low-level detail. Just make hardirq.h do it directly. In fact this simplifies and clarifies the code, because some trivial analysis makes it clear that hardirq.h only ever used _one_ of the two definitions of kernel_locked(), so we can remove the other one entirely. Reported-by: Zimny Lech <[email protected]> Reported-and-acked-by: Randy Dunlap <[email protected]> Acked-by: Arnd Bergmann <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-11-17KVM: VMX: Fix host userspace gsbase corruptionAvi Kivity1-8/+7
We now use load_gs_index() to load gs safely; unfortunately this also changes MSR_KERNEL_GS_BASE, which we managed separately. This resulted in confusion and breakage running 32-bit host userspace on a 64-bit kernel. Fix by - saving guest MSR_KERNEL_GS_BASE before we we reload the host's gs - doing the host save/load unconditionally, instead of only when in guest long mode Things can be cleaned up further, but this is the minmal fix for now. Signed-off-by: Avi Kivity <[email protected]> Signed-off-by: Marcelo Tosatti <[email protected]>
2010-11-17KVM: Correct ordering of ldt reload wrt fs/gs reloadAvi Kivity2-3/+3
If fs or gs refer to the ldt, they must be reloaded after the ldt. Reorder the code to that effect. Userspace code that uses the ldt with kvm is nonexistent, so this doesn't fix a user-visible bug. Signed-off-by: Avi Kivity <[email protected]> Signed-off-by: Marcelo Tosatti <[email protected]>
2010-11-17gianfar: fix signedness issueNicolas Kaiser1-4/+3
irq_of_parse_and_map() has an unsigned return type. Testing for a negative error value doesn't work here. Signed-off-by: Nicolas Kaiser <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2010-11-17net: bnx2x: fix error value signVasiliy Kulikov1-1/+1
bnx2x_init_one() should return negative value on error. By mistake it returns ENODEV instead of -ENODEV. Signed-off-by: Vasiliy Kulikov <[email protected]> Acked-by: Eilon Greenstein <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2010-11-178139cp: fix checksum brokenShan Wei1-6/+4
I am not family with RealTek RTL-8139C+ series 10/100 PCI Ethernet driver. I try to guess the meaning of RxProtoIP and IPFail. RxProtoIP stands for received IPv4 packet that upper protocol is not tcp and udp. !(status & IPFail) is true means that driver correctly to check checksum in IPv4 header. If these are right, driver will set ip_summed with CHECKSUM_UNNECESSARY for other upper protocol, e.g. sctp, igmp protocol. This will cause protocol stack ignores checksum check for packets with invalid checksum. This patch is only compile-test. Signed-off-by: Shan Wei <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2010-11-17r8169: fix checksum brokenShan Wei1-2/+1
If r8196 received packets with invalid sctp/igmp(not tcp, udp) checksum, r8196 set skb->ip_summed wit CHECKSUM_UNNECESSARY. This cause that upper protocol don't check checksum field. I am not family with r8196 driver. I try to guess the meaning of RxProtoIP and IPFail. RxProtoIP stands for received IPv4 packet that upper protocol is not tcp and udp. !(opts1 & IPFail) is true means that driver correctly to check checksum in IPv4 header. If it's right, I think we should not set ip_summed wit CHECKSUM_UNNECESSARY for my sctp packets with invalid checksum. If it's not right, please tell me. Signed-off-by: Shan Wei <[email protected]> Acked-by: Francois Romieu <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2010-11-17rds: Integer overflow in RDS cmsg handlingDan Rosenberg1-1/+1
In rds_cmsg_rdma_args(), the user-provided args->nr_local value is restricted to less than UINT_MAX. This seems to need a tighter upper bound, since the calculation of total iov_size can overflow, resulting in a small sock_kmalloc() allocation. This would probably just result in walking off the heap and crashing when calling rds_rdma_pages() with a high count value. If it somehow doesn't crash here, then memory corruption could occur soon after. Signed-off-by: Dan Rosenberg <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2010-11-17kgdb,ppc: Fix regression in evr register handlingDongdong Deng1-2/+2
Commit ff10b88b5a05c8f1646dd15fb9f6093c1384ff6d (kgdb,ppc: Individual register get/set for ppc) introduced a problem where memcpy was used incorrectly to read and write the evr registers with a kernel that has: CONFIG_FSL_BOOKE=y CONFIG_SPE=y CONFIG_KGDB=y This patch also fixes the following compilation problems: arch/powerpc/kernel/kgdb.c: In function 'dbg_get_reg': arch/powerpc/kernel/kgdb.c:341: error: passing argument 2 of 'memcpy' makes pointer from integer without a cast arch/powerpc/kernel/kgdb.c: In function 'dbg_set_reg': arch/powerpc/kernel/kgdb.c:366: error: passing argument 1 of 'memcpy' makes pointer from integer without a cast [[email protected]: Remove void * casts and fix patch header] Reported-by: Milton Miller <[email protected]> Signed-off-by: Dongdong Deng <[email protected]> Acked-by: Kumar Gala <[email protected]> Signed-off-by: Jason Wessel <[email protected]> CC: [email protected]
2010-11-17kgdb,x86: fix regression in detach handlingJason Wessel1-4/+8
The fix from ba773f7c510c0b252145933926c636c439889207 (x86,kgdb: Fix hw breakpoint regression) was not entirely complete. The kgdb_remove_all_hw_break() function also needs to call the hw_break_release_slot() or else a breakpoint can get activated again after the debugger has detached. The kgdb test suite exposes the behavior in the form of either a hang or repetitive failure. The kernel config that exposes the problem contains all of the following: CONFIG_DEBUG_RODATA=y CONFIG_KGDB_TESTS=y CONFIG_KGDB_TESTS_ON_BOOT=y CONFIG_KGDB_TESTS_BOOT_STRING="V1F100" Reported-by: Frederic Weisbecker <[email protected]> Signed-off-by: Jason Wessel <[email protected]> Tested-by: Frederic Weisbecker <[email protected]>
2010-11-17kdb: fix crash when KDB_BASE_CMD_MAX is exceededJovi Zhang1-4/+4
When the number of dyanmic kdb commands exceeds KDB_BASE_CMD_MAX, the kernel will fault. Signed-off-by: Jovi Zhang <[email protected]> Signed-off-by: Jason Wessel <[email protected]>
2010-11-17kdb: fix memory leak in kdb_main.cJovi Zhang1-6/+7
Call kfree in the error path as well as the success path in kdb_ll(). Signed-off-by: Jovi Zhang <[email protected]> Signed-off-by: Jason Wessel <[email protected]>
2010-11-17ASoC: davinci: fixes for multi-componentChris Paulson-Ellis8-30/+69
Multi-component commit f0fba2ad broke a few things which this patch should fix. Tested on the DM355 EVM. I've been as careful as I can, but it would be good if those with access to other Davinci boards could test. -- The multi-component commit put the initialisation of snd_soc_dai.[capture|playback]_dma_data into snd_soc_dai_ops.hw_params of the McBSP, McASP & VCIF drivers (davinci-i2s.c, davinci-mcasp.c & davinci-vcif.c). The initialisation had to be moved from the probe function in these drivers because davinci_*_dai changed from snd_soc_dai to snd_soc_dai_driver. Unfortunately, the DMA params pointer is needed by davinci_pcm_open (in davinci-pcm.c) before hw_params is called. I have moved the initialisation to a new snd_soc_dai_ops.startup function in each of these drivers. This fix indicates that all platforms that use davinci-pcm must have been broken and need to test with this fix. -- The multi-component commit also changed the McBSP driver name from "davinci-asp" to "davinci-i2s" in davinci-i2s.c without updating the board level references to the driver name. This change is understandable, as there is a similarly named "davinci-mcasp" driver in davinci-mcasp.c. There is probably no 'correct' name for this driver. The DM6446 datasheet calls it the "ASP" and describes it as a "specialised McBSP". The DM355 datasheet calls it the "ASP" and describes it as a "specialised ASP". The DM365 datasheet calls it the "McBSP". Rather than fix this problem by reverting to "davinci-asp", I've elected to avoid future confusion with the "davinci-mcasp" driver by changing it to "davinci-mcbsp", which is also consistent with the names of the functions in the driver. There are other fixes required, so it was never going to be as simple as a revert anyway. -- The DM365 only has one McBSP port (of the McBSP platforms, only the DM355 has 2 ports), so I've changed the the id of the platform_device from 0 to -1. -- In davinci-evm.c, the DM6446 EVM can no longer share a snd_soc_dai_link structure with the DM355 EVM as they use different cpu DAI names (the DM355 has 2 ports and the EVM uses the second port, but the DM6446 only has 1 port). This also means that the 2 boards need different snd_soc_card structures. -- The codec_name entries in davinci-evm.c didn't match the i2c ids in the board files. I have only checked and fixed the details of the names used for the McBSP based platforms. Someone with a McASP based platform (eg DA8xx) should check the others. Signed-off-by: Chris Paulson-Ellis <[email protected]> Acked-by: Liam Girdwood <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2010-11-17ASoC: Fix register cache setup WM8994 for multi-componentMark Brown1-0/+2
During the multi-component conversion the WM8994 register cache init got lost. Signed-off-by: Mark Brown <[email protected]> Acked-by: Liam Girdwood <[email protected]>
2010-11-17[libata] remove SCSI host lock and serial number usage from ata_scsi_queuecmdJeff Garzik1-12/+9
cmd->serial_number is never tested in any path we reach; therefore we may remove the call to scsi_cmd_get_serial() inside DEF_SCSI_QCMD, the SCSI host_lock acquisition surrounding it, and our own SCSI host_lock unlock+relock cycle. Signed-off-by: Jeff Garzik <[email protected]>
2010-11-17BKL: remove references to lock_kernel from commentsArnd Bergmann1-4/+4
Lock_kernel is gone from the code, so the comments should be updated, too. nfsd now uses lock_flocks instead of lock_kernel to protect against posix file locks. Signed-off-by: Arnd Bergmann <[email protected]> Acked-by: J. Bruce Fields <[email protected]> Cc: [email protected] Signed-off-by: Linus Torvalds <[email protected]>
2010-11-17BKL: remove extraneous #include <smp_lock.h>Arnd Bergmann137-137/+0
The big kernel lock has been removed from all these files at some point, leaving only the #include. Remove this too as a cleanup. Signed-off-by: Arnd Bergmann <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-11-17staging/stradis: mark as "depends on BKL"Arnd Bergmann1-1/+1
The stradis driver is on its way out, but it should still be marked correctly as depending on the big kernel lock. It could easily be changed to not require it if someone decides to revive the driver and port it to v4l2 in the process. Signed-off-by: Arnd Bergmann <[email protected]> Reported-by: Sedat Dilek <[email protected]> Cc: Nathan Laredo <[email protected]> Acked-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-11-16kernel: make /proc/kallsyms mode 400 to reduce ease of attackingMarcus Meissner1-1/+1
Making /proc/kallsyms readable only for root by default makes it slightly harder for attackers to write generic kernel exploits by removing one source of knowledge where things are in the kernel. This is the second submit, discussion happened on this on first submit and mostly concerned that this is just one hole of the sieve ... but one of the bigger ones. Changing the permissions of at least System.map and vmlinux is also required to fix the same set, but a packaging issue. Target of this starter patch and follow ups is removing any kind of kernel space address information leak from the kernel. [ Side note: the default of root-only reading is the "safe" value, and it's easy enough to then override at any time after boot. The /proc filesystem allows root to change the permissions with a regular chmod, so you can "revert" this at run-time by simply doing chmod og+r /proc/kallsyms as root if you really want regular users to see the kernel symbols. It does help some tools like "perf" figure them out without any setup, so it may well make sense in some situations. - Linus ] Signed-off-by: Marcus Meissner <[email protected]> Acked-by: Tejun Heo <[email protected]> Acked-by: Eugene Teo <[email protected]> Reviewed-by: Jesper Juhl <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-11-16Merge branch 'bugfixes' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6Linus Torvalds10-58/+86
* 'bugfixes' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6: nfs: Ignore kmemleak false positive in nfs_readdir_make_qstr SUNRPC: Simplify rpc_alloc_iostats by removing pointless local variable nfs: trivial: remove unused nfs_wait_event macro NFS: readdir shouldn't read beyond the reply returned by the server NFS: Fix a couple of regressions in readdir. Revert "NFSv4: Fall back to ordinary lookup if nfs4_atomic_open() returns EISDIR" Regression: fix mounting NFS when NFSv3 support is not compiled NLM: Fix a regression in lockd
2010-11-16Merge branch 'sched-fixes-for-linus' of ↵Linus Torvalds4-22/+62
git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: sched: Fix cross-sched-class wakeup preemption sched: Fix runnable condition for stoptask sched: Use group weight, idle cpu metrics to fix imbalances during idle
2010-11-16Merge branch 'pm-fixes' of ↵Linus Torvalds4-6/+39
git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6 * 'pm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6: PM / PM QoS: Fix reversed min and max PM / OPP: Hide OPP configuration when SoCs do not provide an implementation PM: Allow devices to be removed during late suspend and early resume
2010-11-16xen/events: use locked set|clear_bit() for cpu_evtchn_maskJeremy Fitzhardinge1-2/+2
The per-cpu event channel masks can be updated unlocked from multiple CPUs, so use the locked variant. Signed-off-by: Jeremy Fitzhardinge <[email protected]>
2010-11-16xen/evtchn: clear secondary CPUs' cpu_evtchn_mask[] after restoreJan Beulich1-2/+5
To bind all event channels to CPU#0, it is not sufficient to set all of its cpu_evtchn_mask[] bits; all other CPUs also need to get their bits cleared. Otherwise, evtchn_do_upcall() will start handling interrupts on CPUs they're not intended to run on, which can be particularly bad for per-CPU ones. [ linux-2.6.18-xen.hg 7de7453dee36 ] Signed-off-by: Jan Beulich <[email protected]> Signed-off-by: Jeremy Fitzhardinge <[email protected]>
2010-11-16Merge branch 'futexes-for-linus' of ↵Linus Torvalds2-2/+4
git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'futexes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: futex: Address compiler warnings in exit_robust_list
2010-11-16USB: EHCI: fix obscure race in ehci_endpoint_disableAlan Stern1-5/+5
This patch (as1435) fixes an obscure and unlikely race in ehci-hcd. When an async URB is unlinked, the corresponding QH is removed from the async list. If the QH's endpoint is then disabled while the URB is being given back, ehci_endpoint_disable() won't find the QH on the async list, causing it to believe that the QH has been lost. This will lead to a memory leak at best and quite possibly to an oops. The solution is to trust usbcore not to lose track of endpoints. If the QH isn't on the async list then it doesn't need to be taken off the list, but the driver should still wait for the QH to become IDLE before disabling it. In theory this fixes Bugzilla #20182. In fact the race is so rare that it's not possible to tell whether the bug is still present. However, adding delays and making other changes to force the race seems to show that the patch works. Signed-off-by: Alan Stern <[email protected]> Reported-by: Stefan Richter <[email protected]> CC: David Brownell <[email protected]> CC: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-11-16USB: gadget: AT91: fix typo in atmel_usba_udc driverJosh Wu1-1/+1
compile fix for bug introduced by 969affff547027) Signed-off-by: Josh Wu <[email protected]> Cc: Jiri Kosina <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-11-16USB: isp1362-hcd - fix section mismatch warningAxel Lin1-1/+1
Fix section mismatch warning by using "__devinit" annotation for isp1362_probe. WARNING: drivers/usb/host/isp1362-hcd.o(.data+0x0): Section mismatch in reference from the variable isp1362_driver to the function .init.text:isp1362_probe() The variable isp1362_driver references the function __init isp1362_probe() If the reference is valid then annotate the variable with __init* or __refdata (see linux/init.h) or name the variable: *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console, Signed-off-by: Axel Lin <[email protected]> Acked-by: Mike Frysinger <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-11-16USB: EHCI: AMD periodic frame list table quirkAndiry Xu4-5/+57
On AMD SB700/SB800/Hudson-2/3 platforms, USB EHCI controller may read/write to memory space not allocated to USB controller if there is longer than normal latency on DMA read encountered. In this condition the exposure will be encountered only if the driver has following format of Periodic Frame List link pointer structure: For any idle periodic schedule, the Frame List link pointers that have the T-bit set to 1 intending to terminate the use of frame list link pointer as a physical memory pointer. Idle periodic schedule Frame List Link pointer shoule be in the following format to avoid the issue: Frame list link pointer should be always contains a valid pointer to a inactive QHead with T-bit set to 0. Signed-off-by: Andiry Xu <[email protected]> Acked-by: David Brownell <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-11-16SCSI host lock push-downJeff Garzik115-199/+347
Move the mid-layer's ->queuecommand() invocation from being locked with the host lock to being unlocked to facilitate speeding up the critical path for drivers who don't need this lock taken anyway. The patch below presents a simple SCSI host lock push-down as an equivalent transformation. No locking or other behavior should change with this patch. All existing bugs and locking orders are preserved. Additionally, add one parameter to queuecommand, struct Scsi_Host * and remove one parameter from queuecommand, void (*done)(struct scsi_cmnd *) Scsi_Host* is a convenient pointer that most host drivers need anyway, and 'done' is redundant to struct scsi_cmnd->scsi_done. Minimal code disturbance was attempted with this change. Most drivers needed only two one-line modifications for their host lock push-down. Signed-off-by: Jeff Garzik <[email protected]> Acked-by: James Bottomley <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-11-16cfg80211: fix extension channel checks to initiate communicationLuis R. Rodriguez1-0/+52
When operating in a mode that initiates communication and using HT40 we should fail if we cannot use both primary and secondary channels to initiate communication. Our current ht40 allowmap only covers STA mode of operation, for beaconing modes we need a check on the fly as the mode of operation is dynamic and there other flags other than disable which we should read to check if we can initiate communication. Do not allow for initiating communication if our secondary HT40 channel has is either disabled, has a passive scan flag, a no-ibss flag or is a radar channel. Userspace now has similar checks but this is also needed in-kernel. Reported-by: Jouni Malinen <[email protected]> Cc: [email protected] Signed-off-by: Luis R. Rodriguez <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2010-11-16ath9k_hw: Set proper eeprom offset for AR9287 HTC devicesRajkumar Manoharan2-1/+5
AR9287 based PCI & USB devices are differed in eeprom start offset. So set proper the offset for HTC devices to read nvram correctly. Cc: [email protected] Signed-off-by: Rajkumar Manoharan <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2010-11-16ath9k_htc: Add new devices into AR7010Rajkumar Manoharan3-1/+9
Treat new PIDs (0xA704, 0x1200) as AR7010 devices. Cc: [email protected] Signed-off-by: Rajkumar Manoharan <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2010-11-16ath9k_htc: Update usb device ID listRajkumar Manoharan1-0/+5
Added new VID/PIDs into supported devices list Cc: [email protected] Signed-off-by: Rajkumar Manoharan <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2010-11-16ath9k: Remove pm_qos request after hw unregister.Vivek Natarajan1-2/+1
Update pm_qos before removing it in deinit_device to prevent this warning: pm_qos_update_request() called for unknown object. Signed-off-by: Vivek Natarajan <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2010-11-16xfrm: update flowi saddr in icmp_send if unsetUlrich Weber1-0/+3
otherwise xfrm_lookup will fail to find correct policy Signed-off-by: Ulrich Weber <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2010-11-16xen/xenfs: update xenfs_mount for new prototypeJeremy Fitzhardinge1-3/+3
.mount now returns a struct dentry *. Signed-off-by: Jeremy Fitzhardinge <[email protected]>
2010-11-16Merge commit 'v2.6.37-rc2' into upstream/xenfsJeremy Fitzhardinge10476-524028/+1006958
* commit 'v2.6.37-rc2': (10093 commits) Linux 2.6.37-rc2 capabilities/syslog: open code cap_syslog logic to fix build failure i2c: Sanity checks on adapter registration i2c: Mark i2c_adapter.id as deprecated i2c: Drivers shouldn't include <linux/i2c-id.h> i2c: Delete unused adapter IDs i2c: Remove obsolete cleanup for clientdata include/linux/kernel.h: Move logging bits to include/linux/printk.h Fix gcc 4.5.1 miscompiling drivers/char/i8k.c (again) hwmon: (w83795) Check for BEEP pin availability hwmon: (w83795) Clear intrusion alarm immediately hwmon: (w83795) Read the intrusion state properly hwmon: (w83795) Print the actual temperature channels as sources hwmon: (w83795) List all usable temperature sources hwmon: (w83795) Expose fan control method hwmon: (w83795) Fix fan control mode attributes hwmon: (lm95241) Check validity of input values hwmon: Change mail address of Hans J. Koch PCI: sysfs: fix printk warnings GFS2: Fix inode deallocation race ...
2010-11-16xen: fix header export to userspaceRandy Dunlap1-4/+1
scripts/headers_install.pl prevents "__user" from being exported to userspace headers, so just use compiler.h to make sure that __user is defined and avoid the error. unifdef: linux-next-20101112/xx64/usr/include/xen/privcmd.h.tmp: 79: Premature EOF (#if line 33 depth 1) Signed-off-by: Randy Dunlap <[email protected]> Cc: Jeremy Fitzhardinge <[email protected]> Cc: Konrad Rzeszutek Wilk <[email protected]> Cc: [email protected] (moderated for non-subscribers) Cc: [email protected] Cc: Tony Finch <[email protected]> Signed-off-by: Jeremy Fitzhardinge <[email protected]>
2010-11-16Merge branch 'for-linus' of ↵Linus Torvalds1-1/+1
git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6: PCI: fix offset check for sysfs mmapped files
2010-11-16irda: irttp: allow zero byte packetsWolfram Sang1-6/+19
Sending zero byte packets is not neccessarily an error (AF_INET accepts it, too), so just apply a shortcut. This was discovered because of a non-working software with WINE. See http://bugs.winehq.org/show_bug.cgi?id=19397#c86 http://thread.gmane.org/gmane.linux.irda.general/1643 for very detailed debugging information and a testcase. Kudos to Wolfgang for those! Reported-by: Wolfgang Schwotzer <[email protected]> Signed-off-by: Wolfram Sang <[email protected]> Tested-by: Mike Evans <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2010-11-16Merge branch 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6Linus Torvalds8-44/+167
* 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6: [S390] kprobes: Fix the return address of multiple kretprobes [S390] kprobes: disable interrupts throughout [S390] ftrace: build without frame pointers on s390 [S390] mm: add devmem_is_allowed() for STRICT_DEVMEM checking [S390] vmlogrdr: purge after recording is switched off [S390] cio: fix incorrect ccw_device_init_count [S390] tape: add medium state notifications [S390] fix get_user_pages_fast
2010-11-16PCI: fix offset check for sysfs mmapped filesDarrick J. Wong1-1/+1
I just loaded 2.6.37-rc2 on my machines, and I noticed that X no longer starts. Running an strace of the X server shows that it's doing this: open("/sys/bus/pci/devices/0000:07:00.0/resource0", O_RDWR) = 10 mmap(NULL, 16777216, PROT_READ|PROT_WRITE, MAP_SHARED, 10, 0) = -1 EINVAL (Invalid argument) This code seems to be asking for a shared read/write mapping of 16MB worth of BAR0 starting at file offset 0, and letting the kernel assign a starting address. Unfortunately, this -EINVAL causes X not to start. Looking into dmesg, there's a complaint like so: process "Xorg" tried to map 0x01000000 bytes at page 0x00000000 on 0000:07:00.0 BAR 0 (start 0x 96000000, size 0x 1000000) ...with the following code in pci_mmap_fits: pci_start = (mmap_api == PCI_MMAP_SYSFS) ? pci_resource_start(pdev, resno) >> PAGE_SHIFT : 0; if (start >= pci_start && start < pci_start + size && start + nr <= pci_start + size) It looks like the logic here is set up such that when the mmap call comes via sysfs, the check in pci_mmap_fits wants vma->vm_pgoff to be between the resource's start and end address, and the end of the vma to be no farther than the end. However, the sysfs PCI resource files always start at offset zero, which means that this test always fails for programs that mmap the sysfs files. Given the comment in the original commit 3b519e4ea618b6943a82931630872907f9ac2c2b, I _think_ the old procfs files require that the file offset be equal to the resource's base address when mmapping. I think what we want here is for pci_start to be 0 when mmap_api == PCI_MMAP_PROCFS. The following patch makes that change, after which the Matrox and Mach64 X drivers work again. Acked-by: Martin Wilck <[email protected]> Signed-off-by: Darrick J. Wong <[email protected]> Signed-off-by: Jesse Barnes <[email protected]>
2010-11-16nfs: Ignore kmemleak false positive in nfs_readdir_make_qstrCatalin Marinas1-0/+6
Strings allocated via kmemdup() in nfs_readdir_make_qstr() are referenced from the nfs_cache_array which is stored in a page cache page. Kmemleak does not scan such pages and it reports several false positives. This patch annotates the string->name pointer so that kmemleak does not consider it a real leak. Signed-off-by: Catalin Marinas <[email protected]> Cc: Bryan Schumaker <[email protected]> Cc: Trond Myklebust <[email protected]> Signed-off-by: Trond Myklebust <[email protected]>
2010-11-16SUNRPC: Simplify rpc_alloc_iostats by removing pointless local variableJesper Juhl1-3/+1
Hi, We can simplify net/sunrpc/stats.c::rpc_alloc_iostats() a bit by getting rid of the unneeded local variable 'new'. Please CC me on replies. Signed-off-by: Jesper Juhl <[email protected]> Signed-off-by: Trond Myklebust <[email protected]>
2010-11-16nfs: trivial: remove unused nfs_wait_event macroJeff Layton1-6/+0
Nothing uses this macro anymore. Signed-off-by: Jeff Layton <[email protected]> Signed-off-by: Trond Myklebust <[email protected]>
2010-11-16kernel/sysctl.c: Fix build failure with !CONFIG_PRINTKJoe Perches1-1/+1
Sigh... Signed-off-by: Joe Perches <[email protected]> Acked-by: Eric Paris <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-11-15Input: aiptek - tighten up permissions on sysfs attributesDmitry Torokhov1-14/+14
Sysfs attributes affecting device behavior should not be, by default, world-writeable. If distributions want to allow console users access these attributes they need to employ udev and friends to adjust permissions as needed. Signed-off-by: Dmitry Torokhov <[email protected]>