aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2013-01-07asus-laptop: Do not call HWRS on initBen Hutchings1-13/+4
Since commit 8871e99f89b7 ('asus-laptop: HRWS/HWRS typo'), module initialisation is very slow on the Asus UL30A. The HWRS method takes about 12 seconds to run, and subsequent initialisation also seems to be delayed. Since we don't really need the result, don't bother calling it on init. Those who are curious can still get the result through the 'infos' device attribute. Update the comment about HWRS in show_infos(). Reported-by: ryan <[email protected]> References: http://bugs.debian.org/692436 Signed-off-by: Ben Hutchings <[email protected]> Signed-off-by: Corentin Chary <[email protected]> Signed-off-by: Matthew Garrett <[email protected]>
2013-01-07sony-laptop: fix SNC buffer calls when SN06 returns IntegersMattia Dongili1-7/+8
SN06 in some cases returns an Integer instead of a buffer. While the code handling the return value was trying to cope with the difference, the memcpy call was not making any difference between the two types of acpi_object union. This regression was introduced in 3.5. While there also rework the return value logic to improve readability. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=48671 Cc: <[email protected]> Cc: Fabrizio Narni <[email protected]> Cc: <[email protected]> Signed-off-by: Mattia Dongili <[email protected]> Signed-off-by: Matthew Garrett <[email protected]>
2013-01-07samsung-laptop: Add quirk for broken acpi_video backlight on N250PSeth Forshee1-0/+10
BugLink: http://bugs.launchpad.net/bugs/1086921 Cc: [email protected] # v3.4+ Signed-off-by: Seth Forshee <[email protected]> Signed-off-by: Matthew Garrett <[email protected]>
2013-01-07acer-wmi: add Aspire 5741G touchpad toggle keySergey Senozhatsky1-0/+1
Add Aspire 5741G KEY_TOUCHPAD_TOGGLE to wmi keymap, preventing "acer_wmi: Unknown key number - 0x85" error. Signed-off-by: Sergey Senozhatsky <[email protected]> Signed-off-by: Matthew Garrett <[email protected]>
2013-01-07acer-wmi: change to emit touchpad on off keyLee, Chun-Yi1-3/+10
KEY_TOUCHPAD_TOOGLE key is for notice userland change touchpad state via xf86-input-synaptics on the machine that don't toggle touchpad in hardware. But, acer laptop actually toggle touchpad in hardware. So, this patch change to emit KEY_TOUCHPAD_ON/OFF key when acer-wmi grab device state of touchpad. Reference: brc#848270 https://bugzilla.redhat.com/show_bug.cgi?id=848270 Tested-by: Nathanael Noblet <[email protected]> Cc: Carlos Corbacho <[email protected]> Cc: Matthew Garrett <[email protected]> Cc: Dmitry Torokhov <[email protected]> Cc: Corentin Chary <[email protected]> Cc: Thomas Renninger <[email protected]> Signed-off-by: Lee, Chun-Yi <[email protected]> Signed-off-by: Matthew Garrett <[email protected]>
2013-01-07acer-wmi: fix obj is NULL but dereferencedLee, Chun-Yi1-21/+25
Fengguang Wu run coccinelle and warns about: drivers/platform/x86/acer-wmi.c:1200:17-21: ERROR: obj is NULL but dereferenced. drivers/platform/x86/acer-wmi.c:891:17-21: ERROR: obj is NULL but dereferenced. drivers/platform/x86/acer-wmi.c:1953:17-21: ERROR: obj is NULL but dereferenced. It causes by the code in patch 987dfbaa65b2c3568b85e29d2598da08a011ee09 doesn't check obj variable should not be NULL. There have risk for dereference a NULL obj, so add this patch to fix. Cc: Carlos Corbacho <[email protected]> Cc: Matthew Garrett <[email protected]> Cc: Dmitry Torokhov <[email protected]> Cc: Corentin Chary <[email protected]> Cc: Thomas Renninger <[email protected]> Signed-off-by: Lee, Chun-Yi <[email protected]> Signed-off-by: Matthew Garrett <[email protected]>
2013-01-07MAINTAINERS: change the mail address of acer-wmi/msi-laptop maintainerLee, Chun-Yi1-2/+2
Due to I moved to use suse.com mail address, so, add patch to change the mail address in MAINTAINERS file. Cc: Matthew Garrett <[email protected]> Signed-off-by: Lee, Chun-Yi <[email protected]> Signed-off-by: Matthew Garrett <[email protected]>
2013-01-07Merge tag 'nfs-for-3.8-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfsLinus Torvalds9-31/+61
Pull NFS client bugfixes from Trond Myklebust: - Fix a permissions problem when opening NFSv4 files that only have the exec bit set. - Fix a couple of typos in pNFS (inverted logic), and the mount parsing (missing pointer dereference). - Work around a series of deadlock issues due to workqueues using struct work_struct pointer address comparisons in the re-entrancy tests. Ensure that we don't free struct work_struct prematurely if our work function involves waiting for completion of other work items (e.g. by calling rpc_shutdown_client). - Revert the part of commit 168e4b3 that is causing unnecessary warnings to be issued in the nfsd callback code. * tag 'nfs-for-3.8-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs: nfs: avoid dereferencing null pointer in initiate_bulk_draining SUNRPC: Partial revert of commit 168e4b39d1afb79a7e3ea6c3bb246b4c82c6bdb9 NFS: Ensure that we free the rpc_task after read and write cleanups are done SUNRPC: Ensure that we free the rpc_task after cleanups are done nfs: fix null checking in nfs_get_option_str() pnfs: Increase the refcount when LAYOUTGET fails the first time NFS: Fix access to suid/sgid executables
2013-01-07Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linusLinus Torvalds22-104/+44
Pull MIPS fixes from Ralf Baechle: "Various fixes across the tree. The modpost error due to virt_addr_valid() not being usable from modules required a number of preparatory cleanups so a clean fix was possible." * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: MIPS: 64-bit: Fix build if !CONFIG_MODULES MIPS: Wire up finit_module syscall. MIPS: Fix modpost error in modules attepting to use virt_addr_valid(). MIPS: page.h: Remove now unnecessary #ifndef __ASSEMBLY__ wrapper. MIPS: Switch remaining assembler PAGE_SIZE users to <asm/asm-offsets.h>. MIPS: Include PAGE_S{IZE,HIFT} in <asm/offset.h>. MIPS: Don't include <asm/page.h> unnecessarily. MIPS: Fix comment. Revert "MIPS: Optimise TLB handlers for MIPS32/64 R2 cores." MIPS: perf: Fix build failure in XLP perf support. MIPS: Alchemy: Make 32kHz and r4k timer coexist peacefully
2013-01-07Merge branch 'akpm' (fixes from Andrew)Linus Torvalds24-200/+1035
Merge emailed fixes from Andrew Morton: "Bunch of fixes: - delayed IPC updates. I held back on this because of some possible outstanding bug reports, but they appear to have been addressed in later versions - A bunch of MAINTAINERS updates - Yet Another RTC driver. I'd held this back while a couple of little issues were being worked out. I'm expecting an intrusive-but-simple patchset from Joe Perches which splits up printk.c into kernel/printk/*. That will be a pig to maintain for two months so if it passes testing I'd like to get it upstream after a week or so." * emailed patches from Andrew Morton <[email protected]>: (35 commits) printk: fix incorrect length from print_time() when seconds > 99999 drivers/rtc/rtc-vt8500.c: fix handling of data passed in struct rtc_time drivers/rtc/rtc-vt8500.c: correct handling of CR_24H bitfield rtc: add RTC driver for TPS6586x MAINTAINERS: fix drivers/staging/sm7xx/ MAINTAINERS: remove include/linux/of_pwm.h MAINTAINERS: remove arch/*/lib/perf_event*.c MAINTAINERS: remove drivers/mmc/host/imxmmc.* MAINTAINERS: fix Documentation/mei/ MAINTAINERS: remove arch/x86/platform/mrst/pmu.* MAINTAINERS: remove firmware/isci/ MAINTAINERS: fix drivers/ieee802154/ MAINTAINERS: fix .../plat-mxc/include/mach/imxfb.h MAINTAINERS: remove drivers/video/epson1355fb.c MAINTAINERS: fix drivers/media/usb/dvb-usb/cxusb* MAINTAINERS: adjust for UAPI MAINTAINERS: fix drivers/media/platform/atmel-isi.c MAINTAINERS: fix arch/arm/mach-at91/include/mach/at_hdmac.h MAINTAINERS: fix drivers/rtc/rtc-vt8500.c MAINTAINERS: remove arch/arm/plat-s5p/ ...
2013-01-07Merge branch 'next' of git://git.monstr.eu/linux-2.6-microblazeLinus Torvalds8-56/+90
Pull microblaze update from Michal Simek: "This fixes noMMU kernel and I have also added defconfig updates which fix issue with one external dependency and enable all xilinx device drivers for 0-day testing system. Additionally wire up finit_module system call, and do highmem fixup and pci warnings reported by the 0-day testing system" * 'next' of git://git.monstr.eu/linux-2.6-microblaze: microblaze: Update microblaze defconfigs microblaze: Fix pci compilation and sparse warnings microblaze: Add finit_module syscall microblaze: Kill __kmap_atomic() microblaze: Change section flags for noMMU microblaze: Microblaze wants sys_fork for noMMU too
2013-01-07Merge branch 'for-linus' of ↵Linus Torvalds3-5/+11
git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security Pull integrity subsystem regression fix from James Morris: "Commit fdf90729e578 "ima: support new kernel module syscall" by error modified init_module() to return INTEGRITY_UNKNOWN (which is 4) to user space if the kernel was built with CONFIG_IMA_APPRAISE=y. As a result, user space can no longer load kernel modules using init_module(). This commit fixes this regression." * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security: ima: fallback to MODULE_SIG_ENFORCE for existing kernel module syscall
2013-01-07Merge branch 'for-Linus' of ↵James Morris3-5/+11
git://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity into for-linus Pulled from Mimi's tree.
2013-01-05signals: set_current_blocked() can use __set_current_blocked()Oleg Nesterov1-6/+2
Cleanup. And I think we need more cleanups, in particular __set_current_blocked() and sigprocmask() should die. Nobody should ever block SIGKILL or SIGSTOP. - Change set_current_blocked() to use __set_current_blocked() - Change sys_sigprocmask() to use set_current_blocked(), this way it should not worry about SIGKILL/SIGSTOP. Signed-off-by: Oleg Nesterov <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-01-05signals: sys_ssetmask() uses uninitialized newmaskOleg Nesterov1-0/+1
Commit 77097ae503b1 ("most of set_current_blocked() callers want SIGKILL/SIGSTOP removed from set") removed the initialization of newmask by accident, causing ltp to complain like this: ssetmask01 1 TFAIL : sgetmask() failed: TEST_ERRNO=???(0): Success Restore the proper initialization. Reported-and-tested-by: CAI Qian <[email protected]> Signed-off-by: Oleg Nesterov <[email protected]> Cc: [email protected] # v3.5+ Signed-off-by: Linus Torvalds <[email protected]>
2013-01-05nfs: avoid dereferencing null pointer in initiate_bulk_drainingNickolai Zeldovich1-1/+1
Fix an inverted null pointer check in initiate_bulk_draining(). Signed-off-by: Nickolai Zeldovich <[email protected]> Signed-off-by: Trond Myklebust <[email protected]> Cc: [email protected] [>= 3.7]
2013-01-04printk: fix incorrect length from print_time() when seconds > 99999Roland Dreier1-2/+3
print_prefix() passes a NULL buf to print_time() to get the length of the time prefix; when printk times are enabled, the current code just returns the constant 15, which matches the format "[%5lu.%06lu] " used to print the time value. However, this is obviously incorrect when the whole seconds part of the time gets beyond 5 digits (100000 seconds is a bit more than a day of uptime). The simple fix is to use snprintf(NULL, 0, ...) to calculate the actual length of the time prefix. This could be micro-optimized but it seems better to have simpler, more readable code here. The bug leads to the syslog system call miscomputing which messages fit into the userspace buffer. If there are enough messages to fill log_buf_len and some have a timestamp >= 100000, dmesg may fail with: # dmesg klogctl: Bad address When this happens, strace shows that the failure is indeed EFAULT due to the kernel mistakenly accessing past the end of dmesg's buffer, since dmesg asks the kernel how big a buffer it needs, allocates a bit more, and then gets an error when it asks the kernel to fill it: syslog(0xa, 0, 0) = 1048576 mmap(NULL, 1052672, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fa4d25d2000 syslog(0x3, 0x7fa4d25d2010, 0x100008) = -1 EFAULT (Bad address) As far as I can see, the bug has been there as long as print_time(), which comes from commit 084681d14e42 ("printk: flush continuation lines immediately to console") in 3.5-rc5. Signed-off-by: Roland Dreier <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> Cc: Joe Perches <[email protected]> Cc: Sylvain Munaut <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-01-04drivers/rtc/rtc-vt8500.c: fix handling of data passed in struct rtc_timeTony Prisk1-3/+4
tm_mon is 0..11, whereas vt8500 expects 1..12 for the month field, causing invalid date errors for January, and causing the day field to roll over incorrectly. The century flag is only handled in vt8500_rtc_read_time, but not set in vt8500_rtc_set_time. This patch corrects the behaviour of the century flag. Signed-off-by: Edgar Toernig <[email protected]> Signed-off-by: Tony Prisk <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-01-04drivers/rtc/rtc-vt8500.c: correct handling of CR_24H bitfieldTony Prisk1-2/+2
Control register bitfield for 12H/24H mode is handled incorrectly. Setting CR_24H actually enables 12H mode. This patch renames the define and changes the initialization code to correctly set 24H mode. Signed-off-by: Tony Prisk <[email protected]> Cc: Edgar Toernig <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-01-04rtc: add RTC driver for TPS6586xLaxman Dewangan3-0/+365
Add an RTC driver for TPS6586X chips by TI. This driver supports: - Setting and getting time and date. - Setting and reading alarm time. - Alarm and interrupt functionlity. [[email protected]: remove stray semicolons] [[email protected]: start epoch in 2009] Signed-off-by: Laxman Dewangan <[email protected]> Tested-by: Marc Dietrich <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-01-04MAINTAINERS: fix drivers/staging/sm7xx/Cesar Eduardo Barros1-1/+1
This directory was moved to drivers/staging/sm7xxfb/ by commit 925aa6600cee ("staging: sm7xxfb: sm7xx becomes sm7xxfb"). Signed-off-by: Cesar Eduardo Barros <[email protected]> Cc: Teddy Wang <[email protected]> Acked-by: Javier Muñoz <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-01-04MAINTAINERS: remove include/linux/of_pwm.hCesar Eduardo Barros1-1/+0
Added by commit 200efedd8766 ("pwm: Take over maintainership of the PWM subsystem"), but I could not find any trace of that file being ever added to the repository. Signed-off-by: Cesar Eduardo Barros <[email protected]> Acked-by: Thierry Reding <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-01-04MAINTAINERS: remove arch/*/lib/perf_event*.cCesar Eduardo Barros1-1/+0
This pattern only matched arch/frv/lib/perf_event.c, which was removed by commit e360adbe2924 ("irq_work: Add generic hardirq context callbacks"). Signed-off-by: Cesar Eduardo Barros <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Arnaldo Carvalho de Melo <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-01-04MAINTAINERS: remove drivers/mmc/host/imxmmc.*Cesar Eduardo Barros1-6/+0
This driver was removed by commit 6187fee46f4b ("mmc: remove imxmmc driver"). Signed-off-by: Cesar Eduardo Barros <[email protected]> Cc: Sascha Hauer <[email protected]> Acked-by: Pavel Pisa <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-01-04MAINTAINERS: fix Documentation/mei/Cesar Eduardo Barros1-1/+1
The documentation was moved to Documentation/misc-devices/mei/ instead. Signed-off-by: Cesar Eduardo Barros <[email protected]> Acked-by: Tomas Winkler <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-01-04MAINTAINERS: remove arch/x86/platform/mrst/pmu.*Cesar Eduardo Barros1-6/+0
These files were removed by commit 1a8359e411eb ("x86/mid: Remove Intel Moorestown"). Signed-off-by: Cesar Eduardo Barros <[email protected]> Cc: Alan Cox <[email protected]> Cc: Len Brown <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-01-04MAINTAINERS: remove firmware/isci/Cesar Eduardo Barros1-1/+0
This directory was removed by commit 7d99b3abaf84 ("isci, firmware: Remove isci fallback parameter blob and generator"). Signed-off-by: Cesar Eduardo Barros <[email protected]> Cc: Ben Hutchings <[email protected]> Cc: Dan Williams <[email protected]> Cc: James Bottomley <[email protected]> Cc: Intel SCU Linux support <[email protected]> Cc: Lukasz Dorau <[email protected]> Cc: Maciej Patelczyk <[email protected]> Cc: Dave Jiang <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-01-04MAINTAINERS: fix drivers/ieee802154/Cesar Eduardo Barros1-1/+1
This directory was moved to drivers/net/ieee802154/ by commit 31d178bffcff ("drivers/ieee802154: move ieee802154 drivers to net folder"). Signed-off-by: Cesar Eduardo Barros <[email protected]> Cc: Alexander Smirnov <[email protected]> Cc: Dmitry Eremin-Solenikov <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-01-04MAINTAINERS: fix .../plat-mxc/include/mach/imxfb.hCesar Eduardo Barros1-1/+1
This file was moved to include/linux/platform_data/video-imxfb.h by commit 82906b13a6f4 ("ARM: imx: move platform_data definitions"). Signed-off-by: Cesar Eduardo Barros <[email protected]> Acked-by: Sascha Hauer <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-01-04MAINTAINERS: remove drivers/video/epson1355fb.cCesar Eduardo Barros1-6/+0
This driver was removed by commit 1c3a918f78b7 ("ARM: clps711x: Remove board support for CEIVA"). Signed-off-by: Cesar Eduardo Barros <[email protected]> Cc: Christopher Hoover <[email protected]> Cc: Christopher Hoover <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-01-04MAINTAINERS: fix drivers/media/usb/dvb-usb/cxusb*Cesar Eduardo Barros1-1/+1
This driver was never at dvb-usb-v2, as far as I could see. Signed-off-by: Cesar Eduardo Barros <[email protected]> Cc: Michael Krufky <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-01-04MAINTAINERS: adjust for UAPICesar Eduardo Barros1-41/+115
Several headers were moved or split to uapi/. Signed-off-by: Cesar Eduardo Barros <[email protected]> Acked-by: David Howells <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-01-04MAINTAINERS: fix drivers/media/platform/atmel-isi.cCesar Eduardo Barros1-1/+1
This file was moved to drivers/media/platform/soc_camera/atmel-isi.c by commit b47ff4a3ed42 ("[media] move soc_camera to its own directory"). Signed-off-by: Cesar Eduardo Barros <[email protected]> Cc: Mauro Carvalho Chehab <[email protected]> Cc: Josh Wu <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-01-04MAINTAINERS: fix arch/arm/mach-at91/include/mach/at_hdmac.hCesar Eduardo Barros1-1/+1
This file was moved to include/linux/platform_data/dma-atmel.h by commit 7cdc39eeadf1 ("ARM: at91: move platform_data definitions"). Signed-off-by: Cesar Eduardo Barros <[email protected]> Cc: Nicolas Ferre <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-01-04MAINTAINERS: fix drivers/rtc/rtc-vt8500.cCesar Eduardo Barros1-1/+1
Signed-off-by: Cesar Eduardo Barros <[email protected]> Cc: Tony Prisk <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-01-04MAINTAINERS: remove arch/arm/plat-s5p/Cesar Eduardo Barros1-3/+1
These files were merged into plat-samsung. Signed-off-by: Cesar Eduardo Barros <[email protected]> Cc: Ben Dooks <[email protected]> Acked-by: Kukjin Kim <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-01-04MAINTAINERS: remove arch/arm/common/time-acorn.cCesar Eduardo Barros1-1/+0
This file was moved to arch/arm/mach-rpc/time.c by commit a1be5d649699 ("ARM: riscpc: move time-acorn.c to mach-rpc"), and the pattern for arch/arm/mach-rpc/ already exists. Signed-off-by: Cesar Eduardo Barros <[email protected]> Cc: Russell King <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-01-04MAINTAINERS: remove drivers/platform/msm/Cesar Eduardo Barros1-1/+0
This subdirectory entry was added by commit 8a5700cd6754 ("MAINTAINERS: add drivers/platform/msm to MSM subsystem") back in 2011, but I could not find any trace of that directory being ever added to the repository. Signed-off-by: Cesar Eduardo Barros <[email protected]> Cc: Kenneth Heitke <[email protected]> Acked-by: David Brown <[email protected]> Cc: Daniel Walker <[email protected]> Cc: Bryan Huntsman <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-01-04mm: limit mmu_gather batching to fix soft lockups on !CONFIG_PREEMPTMichal Hocko2-0/+14
Since commit e303297e6c3a ("mm: extended batches for generic mmu_gather") we are batching pages to be freed until either tlb_next_batch cannot allocate a new batch or we are done. This works just fine most of the time but we can get in troubles with non-preemptible kernel (CONFIG_PREEMPT_NONE or CONFIG_PREEMPT_VOLUNTARY) on large machines where too aggressive batching might lead to soft lockups during process exit path (exit_mmap) because there are no scheduling points down the free_pages_and_swap_cache path and so the freeing can take long enough to trigger the soft lockup. The lockup is harmless except when the system is setup to panic on softlockup which is not that unusual. The simplest way to work around this issue is to limit the maximum number of batches in a single mmu_gather. 10k of collected pages should be safe to prevent from soft lockups (we would have 2ms for one) even if they are all freed without an explicit scheduling point. This patch doesn't add any new explicit scheduling points because it relies on zap_pmd_range during page tables zapping which calls cond_resched per PMD. The following lockup has been reported for 3.0 kernel with a huge process (in order of hundreds gigs but I do know any more details). BUG: soft lockup - CPU#56 stuck for 22s! [kernel:31053] Modules linked in: af_packet nfs lockd fscache auth_rpcgss nfs_acl sunrpc mptctl mptbase autofs4 binfmt_misc dm_round_robin dm_multipath bonding cpufreq_conservative cpufreq_userspace cpufreq_powersave pcc_cpufreq mperf microcode fuse loop osst sg sd_mod crc_t10dif st qla2xxx scsi_transport_fc scsi_tgt netxen_nic i7core_edac iTCO_wdt joydev e1000e serio_raw pcspkr edac_core iTCO_vendor_support acpi_power_meter rtc_cmos hpwdt hpilo button container usbhid hid dm_mirror dm_region_hash dm_log linear uhci_hcd ehci_hcd usbcore usb_common scsi_dh_emc scsi_dh_alua scsi_dh_hp_sw scsi_dh_rdac scsi_dh dm_snapshot pcnet32 mii edd dm_mod raid1 ext3 mbcache jbd fan thermal processor thermal_sys hwmon cciss scsi_mod Supported: Yes CPU 56 Pid: 31053, comm: kernel Not tainted 3.0.31-0.9-default #1 HP ProLiant DL580 G7 RIP: 0010: _raw_spin_unlock_irqrestore+0x8/0x10 RSP: 0018:ffff883ec1037af0 EFLAGS: 00000206 RAX: 0000000000000e00 RBX: ffffea01a0817e28 RCX: ffff88803ffd9e80 RDX: 0000000000000200 RSI: 0000000000000206 RDI: 0000000000000206 RBP: 0000000000000002 R08: 0000000000000001 R09: ffff887ec724a400 R10: 0000000000000000 R11: dead000000200200 R12: ffffffff8144c26e R13: 0000000000000030 R14: 0000000000000297 R15: 000000000000000e FS: 00007ed834282700(0000) GS:ffff88c03f200000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b CR2: 000000000068b240 CR3: 0000003ec13c5000 CR4: 00000000000006e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 Process kernel (pid: 31053, threadinfo ffff883ec1036000, task ffff883ebd5d4100) Call Trace: release_pages+0xc5/0x260 free_pages_and_swap_cache+0x9d/0xc0 tlb_flush_mmu+0x5c/0x80 tlb_finish_mmu+0xe/0x50 exit_mmap+0xbd/0x120 mmput+0x49/0x120 exit_mm+0x122/0x160 do_exit+0x17a/0x430 do_group_exit+0x3d/0xb0 get_signal_to_deliver+0x247/0x480 do_signal+0x71/0x1b0 do_notify_resume+0x98/0xb0 int_signal+0x12/0x17 DWARF2 unwinder stuck at int_signal+0x12/0x17 Signed-off-by: Michal Hocko <[email protected]> Cc: <[email protected]> [3.0+] Cc: Mel Gorman <[email protected]> Cc: Rik van Riel <[email protected]> Cc: Peter Zijlstra <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-01-04mm: fix zone_watermark_ok_safe() accounting of isolated pagesBartlomiej Zolnierkiewicz3-59/+2
Commit 702d1a6e0766 ("memory-hotplug: fix kswapd looping forever problem") added an isolated pageblocks counter (nr_pageblock_isolate in struct zone) and used it to adjust free pages counter in zone_watermark_ok_safe() to prevent kswapd looping forever problem. Then later, commit 2139cbe627b8 ("cma: fix counting of isolated pages") fixed accounting of isolated pages in global free pages counter. It made the previous zone_watermark_ok_safe() fix unnecessary and potentially harmful (cause now isolated pages may be accounted twice making free pages counter incorrect). This patch removes the special isolated pageblocks counter altogether which fixes zone_watermark_ok_safe() free pages check. Reported-by: Tomasz Stanislawski <[email protected]> Signed-off-by: Bartlomiej Zolnierkiewicz <[email protected]> Signed-off-by: Kyungmin Park <[email protected]> Cc: Minchan Kim <[email protected]> Cc: KOSAKI Motohiro <[email protected]> Cc: Aaditya Kumar <[email protected]> Cc: KAMEZAWA Hiroyuki <[email protected]> Cc: Mel Gorman <[email protected]> Cc: Michal Hocko <[email protected]> Cc: Marek Szyprowski <[email protected]> Cc: Michal Nazarewicz <[email protected]> Cc: Hugh Dickins <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-01-04Documentation/sysctl/kernel.txt: document /proc/sys/shmallCarlos Alberto Lopez Perez1-0/+13
Signed-off-by: Carlos Alberto Lopez Perez <[email protected]> Cc: Rob Landley <[email protected]> Cc: Larry Finger <[email protected]> Cc: Neil Horman <[email protected]> Cc: Mitsuo Hayasaka <[email protected]> Cc: Tejun Heo <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-01-04ipc: add more comments to message copying related codeStanislav Kinsbursky1-0/+8
Signed-off-by: Stanislav Kinsbursky <[email protected]> Cc: "Eric W. Biederman" <[email protected]> Cc: James Morris <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-01-04ipc: simplify message copyingStanislav Kinsbursky2-16/+14
Remove the redundant and confusing fill_copy(). Also add copy_msg() check for error. In this case exit from the function have to be done instead of break, because further code interprets any error as EAGAIN. Also define copy_msg() for the case when CONFIG_CHECKPOINT_RESTORE is disabled. Signed-off-by: Stanislav Kinsbursky <[email protected]> Cc: "Eric W. Biederman" <[email protected]> Cc: James Morris <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-01-04ipc: convert prepare_copy() from macro to functionStanislav Kinsbursky1-2/+9
This code works if CONFIG_CHECKPOINT_RESTORE is disabled. [[email protected]: remove __maybe_unused] Signed-off-by: Stanislav Kinsbursky <[email protected]> Cc: "Eric W. Biederman" <[email protected]> Cc: James Morris <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-01-04ipc: simplify free_copy() callStanislav Kinsbursky1-6/+8
Passing and checking of msgflg to free_copy() is redundant. This patch sets copy to NULL on declaration instead and checks for non-NULL in free_copy(). Note: in case of copy allocation failure, error is returned immediately. So no need to check for IS_ERR() in free_copy(). Signed-off-by: Stanislav Kinsbursky <[email protected]> Cc: "Eric W. Biederman" <[email protected]> Cc: James Morris <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-01-04selftests: IPC message queue copy feature testStanislav Kinsbursky4-2/+275
This test can be used to check wheither kernel supports IPC message queue copy and restore features (required by CRIU project). Signed-off-by: Stanislav Kinsbursky <[email protected]> Cc: Serge Hallyn <[email protected]> Cc: "Eric W. Biederman" <[email protected]> Cc: Pavel Emelyanov <[email protected]> Cc: Al Viro <[email protected]> Cc: KOSAKI Motohiro <[email protected]> Cc: Michael Kerrisk <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-01-04ipc: introduce message queue copy featureStanislav Kinsbursky4-2/+102
This patch is required for checkpoint/restore in userspace. c/r requires some way to get all pending IPC messages without deleting them from the queue (checkpoint can fail and in this case tasks will be resumed, so queue have to be valid). To achive this, new operation flag MSG_COPY for sys_msgrcv() system call was introduced. If this flag was specified, then mtype is interpreted as number of the message to copy. If MSG_COPY is set, then kernel will allocate dummy message with passed size, and then use new copy_msg() helper function to copy desired message (instead of unlinking it from the queue). Notes: 1) Return -ENOSYS if MSG_COPY is specified, but CONFIG_CHECKPOINT_RESTORE is not set. Signed-off-by: Stanislav Kinsbursky <[email protected]> Cc: Serge Hallyn <[email protected]> Cc: "Eric W. Biederman" <[email protected]> Cc: Pavel Emelyanov <[email protected]> Cc: Al Viro <[email protected]> Cc: KOSAKI Motohiro <[email protected]> Cc: Michael Kerrisk <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-01-04ipc: message queue receive cleanupStanislav Kinsbursky3-49/+45
Move all message related manipulation into one function msg_fill(). Actually, two functions because of the compat one. [[email protected]: checkpatch fixes] Signed-off-by: Stanislav Kinsbursky <[email protected]> Cc: Serge Hallyn <[email protected]> Cc: "Eric W. Biederman" <[email protected]> Cc: Pavel Emelyanov <[email protected]> Cc: Al Viro <[email protected]> Cc: KOSAKI Motohiro <[email protected]> Cc: Michael Kerrisk <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-01-04ipc: add sysctl to specify desired next object idStanislav Kinsbursky5-4/+65
Add 3 new variables and sysctls to tune them (by one "next_id" variable for messages, semaphores and shared memory respectively). This variable can be used to set desired id for next allocated IPC object. By default it's equal to -1 and old behaviour is preserved. If this variable is non-negative, then desired idr will be extracted from it and used as a start value to search for free IDR slot. Notes: 1) this patch doesn't guarantee that the new object will have desired id. So it's up to user space how to handle new object with wrong id. 2) After a sucessful id allocation attempt, "next_id" will be set back to -1 (if it was non-negative). [[email protected]: checkpatch fixes] Signed-off-by: Stanislav Kinsbursky <[email protected]> Cc: Serge Hallyn <[email protected]> Cc: "Eric W. Biederman" <[email protected]> Cc: Pavel Emelyanov <[email protected]> Cc: Al Viro <[email protected]> Cc: KOSAKI Motohiro <[email protected]> Cc: Michael Kerrisk <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-01-04ipc: remove forced assignment of selected messageStanislav Kinsbursky1-4/+1
This is a cleanup patch. The assignment is redundant. Signed-off-by: Stanislav Kinsbursky <[email protected]> Cc: Serge Hallyn <[email protected]> Cc: "Eric W. Biederman" <[email protected]> Cc: Pavel Emelyanov <[email protected]> Cc: Al Viro <[email protected]> Cc: KOSAKI Motohiro <[email protected]> Cc: Michael Kerrisk <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>