id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
051b982bcc620695de629d29c333c95b66e9b95e
Analyze and fix the following issue in the Linux kernel code: kaweth: Fix memory leak in kaweth_control()
Problem Details: kaweth_control() never frees the buffer that it allocates for the USB control message. Test case: while :; do ifconfig eth2 down ; ifconfig eth2 up ; done This is a tiny buffer so it is a slow leak. If you want to speed up the process, you can change the allocation size to e.g. 16384 bytes, and it ...
```diff diff --git a/drivers/net/usb/kaweth.c b/drivers/net/usb/kaweth.c index e2a39b9be96e..e391ef969c28 100644 --- a/drivers/net/usb/kaweth.c +++ b/drivers/net/usb/kaweth.c @@ -263,6 +263,7 @@ static int kaweth_control(struct kaweth_device *kaweth, int timeout) { struct usb_ctrlrequest *dr; + int retval; ...
95acf7d7ed95fdb9bfd5b7a71752701a0e382bd9
Analyze and fix the following issue in the Linux kernel code: net: xilinx_emaclite: Fix problem with first incoming packet
Problem Details: You can't ping the board or connect to it unless you send any packet out from board. Tested-by: John Williams <john.williams@petalogix.com> Signed-off-by: Michal Simek <monstr@monstr.eu> Acked-by: John Linn <john.linn@xilinx.com> Acked-by: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: David ...
```diff diff --git a/drivers/net/xilinx_emaclite.c b/drivers/net/xilinx_emaclite.c index dc22782633a5..83a044dbd1d7 100644 --- a/drivers/net/xilinx_emaclite.c +++ b/drivers/net/xilinx_emaclite.c @@ -134,18 +134,15 @@ static void xemaclite_enable_interrupts(struct net_local *drvdata) } /* Enable the Rx interrupts ...
07653aa3afe7b74cbddfe3bca82a898c413855b1
Analyze and fix the following issue in the Linux kernel code: netxen: fix firmware init after resume
Problem Details: After successful firmware init, return instead of falling to error path (leading to detach) after resuming to D0 state. This was broken in recent firmware reset rehaul. Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/netxen/netxen_nic_main.c b/drivers/net/netxen/netxen_nic_main.c index b8c723539dd2..b5aa974827e5 100644 --- a/drivers/net/netxen/netxen_nic_main.c +++ b/drivers/net/netxen/netxen_nic_main.c @@ -1469,6 +1469,7 @@ netxen_nic_resume(struct pci_dev *pdev) } netxen_schedule_work(adapte...
a598ae177a11ebae065e20059d9bc63a5da4ccc3
Analyze and fix the following issue in the Linux kernel code: netxen: fix minor tx timeout bug
Problem Details: Fix minor bug in netdev tx timeout handling which could always lead to firmware reset instead of pci function reset. netxen_nic_reset_context() requires __NX_RESETTING bit cleared. Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/netxen/netxen_nic_main.c b/drivers/net/netxen/netxen_nic_main.c index f7bdde111dfc..b8c723539dd2 100644 --- a/drivers/net/netxen/netxen_nic_main.c +++ b/drivers/net/netxen/netxen_nic_main.c @@ -1903,12 +1903,13 @@ static void netxen_tx_timeout_task(struct work_struct *work) netif_w...
1aaf179d043856d80bbb354f9feaf706b9cfbcd3
Analyze and fix the following issue in the Linux kernel code: [S390] hibernate: Do real CPU swap at resume time
Problem Details: Currently, when the physical resume CPU is not equal to the physical suspend CPU, we swap the CPUs logically, by modifying the logical/physical CPU mapping. This has two major drawbacks: First the change is visible from user space (e.g. CPU sysfs files) and second it is hard to ensure that nowhere in t...
```diff diff --git a/arch/s390/include/asm/lowcore.h b/arch/s390/include/asm/lowcore.h index a3ff9b01bf7d..f2ef4b619ce1 100644 --- a/arch/s390/include/asm/lowcore.h +++ b/arch/s390/include/asm/lowcore.h @@ -86,6 +86,7 @@ #define __LC_PGM_OLD_PSW 0x0150 #define __LC_MCK_OLD_PSW 0x0160 #define __LC_IO_OLD_PSW 0x01...
bdd42b28cde0453fb8c3d9b4e4868ca2d8124806
Analyze and fix the following issue in the Linux kernel code: [S390] fix disabled_wait inline assembly clobber list
Problem Details: The disabled_wait inline assmembly also clobbers register r1, but it is missing in the clobber list. Fixes recursive Oops on panic. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
```diff diff --git a/arch/s390/include/asm/processor.h b/arch/s390/include/asm/processor.h index cf8eed3fa779..b42715458312 100644 --- a/arch/s390/include/asm/processor.h +++ b/arch/s390/include/asm/processor.h @@ -295,7 +295,7 @@ static inline void ATTRIB_NORET disabled_wait(unsigned long code) " oi 0x384(1),0x10\n...
846955c8afe5ebca2f8841b042ca3342e08a092b
Analyze and fix the following issue in the Linux kernel code: [S390] hibernation: fix guest page hinting related crash
Problem Details: On resume the system that loads the to be resumed image might have unstable pages. When the resume image is copied back and a write access happen to an unstable page this causes an exception and the system crashes. To fix this set all free pages to stable before copying the resumed image data. Also af...
```diff diff --git a/arch/s390/kernel/swsusp_asm64.S b/arch/s390/kernel/swsusp_asm64.S index 7cd6b096f0d1..9a86ccb91a8a 100644 --- a/arch/s390/kernel/swsusp_asm64.S +++ b/arch/s390/kernel/swsusp_asm64.S @@ -102,6 +102,9 @@ swsusp_arch_resume: aghi %r15,-STACK_FRAME_OVERHEAD stg %r1,__SF_BACKCHAIN(%r15) + /* Make ...
1d7e1500a6acfc89415aa2524e2c475c980ac42a
Analyze and fix the following issue in the Linux kernel code: [S390] qdio: reduce per device debug messages
Problem Details: Even if turned off the debug message overhead is measurable in the hot path. Reduce the number of debug message calls in do_QDIO and qdio_kick_handler. Also use hex numbers to save space in the debug entries. Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwi...
```diff diff --git a/drivers/s390/cio/qdio_main.c b/drivers/s390/cio/qdio_main.c index 9aef402a5f1b..21766c791ad6 100644 --- a/drivers/s390/cio/qdio_main.c +++ b/drivers/s390/cio/qdio_main.c @@ -401,7 +401,7 @@ static void announce_buffer_error(struct qdio_q *q, int count) if ((!q->is_input_q && (q->sbal[q->fir...
703e5c9993639284bc0a8929b6de362424df7019
Analyze and fix the following issue in the Linux kernel code: [S390] cio: introduce consistent subchannel scanning
Problem Details: Previously, there were multiple subchannel scanning mechanisms which could potentially conflict with each other. Fix this problem by moving blacklist and ccw driver triggered scanning to the existing evaluation method. Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com> Signed-off-by: Martin Schw...
```diff diff --git a/drivers/s390/cio/css.c b/drivers/s390/cio/css.c index 5e217bbf8797..91c25706fa83 100644 --- a/drivers/s390/cio/css.c +++ b/drivers/s390/cio/css.c @@ -31,7 +31,6 @@ #include "chp.h" int css_init_done = 0; -static int need_reprobe = 0; int max_ssid; struct channel_subsystem *channel_subsystem...
9173a8ef24a6b1b8031507b35b8ffe5f85a87692
Analyze and fix the following issue in the Linux kernel code: ARM: 5719/1: [AT91] Fix AC97 breakage
Problem Details: Fix AC97 build breakage with converting to the shared AT91/AVR32 AC97 driver: struct atmel_ac97_data -> struct ac97c_platform_data CONFIG_SND_AT91_AC97 -> CONFIG_SND_ATMEL_AC97C Signed-off-by: Andrew Victor <linux@maxim.org.za> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
```diff diff --git a/arch/arm/mach-at91/at91cap9_devices.c b/arch/arm/mach-at91/at91cap9_devices.c index 412aa49ad2fb..d1f775e86353 100644 --- a/arch/arm/mach-at91/at91cap9_devices.c +++ b/arch/arm/mach-at91/at91cap9_devices.c @@ -771,9 +771,9 @@ void __init at91_add_device_pwm(u32 mask) {} * AC97 * --------------...
14c0abf14a5e67e793131116bd97f57da37ccce3
Analyze and fix the following issue in the Linux kernel code: x86: mce, inject: Use real inject-msg in raise_local
Problem Details: Current raise_local() uses a struct mce that comes from mce_write() as a parameter instead of the real inject-msg, so when we set mce.finished = 0 to clear injected MCE, the real inject stays valid. This will cause the remaining inject-msg affect the next injection, which is not desired. To fix this,...
```diff diff --git a/arch/x86/kernel/cpu/mcheck/mce-inject.c b/arch/x86/kernel/cpu/mcheck/mce-inject.c index 7029f0e2acad..472763d92098 100644 --- a/arch/x86/kernel/cpu/mcheck/mce-inject.c +++ b/arch/x86/kernel/cpu/mcheck/mce-inject.c @@ -98,8 +98,9 @@ static struct notifier_block mce_raise_nb = { }; /* Inject mce ...
7ce618db9878689f87897b673fa3329070860fc7
Analyze and fix the following issue in the Linux kernel code: Btrfs: fix early enospc during balancing
Problem Details: We now do extra checks before a balance to make sure there is room for the balance to take place. One of the checks was testing to see if we were trying to balance away the last block group of a given type. If there is no space available for new chunks, we should not try and balance away the last blo...
```diff diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index 1b9b87870f51..90d314eeff6d 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c @@ -6756,22 +6756,16 @@ int btrfs_can_relocate(struct btrfs_root *root, u64 bytenr) /* * if this is the last block group we have in this space, we...
b417c9fd8690637f0c91479435ab3e2bf450c038
Analyze and fix the following issue in the Linux kernel code: x86: mce: Fix thermal throttling message storm
Problem Details: If a system switches back and forth between hot and cold mode, the MCE code will print a stream of critical kernel messages. Extend the throttling code to properly notice this, by only printing the first hot + cold transition and omitting the rest up to CHECK_INTERVAL (5 minutes). This way we'll only...
```diff diff --git a/arch/x86/kernel/cpu/mcheck/therm_throt.c b/arch/x86/kernel/cpu/mcheck/therm_throt.c index db80b577f601..b3a1dba75330 100644 --- a/arch/x86/kernel/cpu/mcheck/therm_throt.c +++ b/arch/x86/kernel/cpu/mcheck/therm_throt.c @@ -42,6 +42,7 @@ struct thermal_state { u64 next_check; unsigned long t...
00b01b246bc2e28763cbd85f0dc949d6c0d38c13
Analyze and fix the following issue in the Linux kernel code: m32r: Move GET_THREAD_INFO definition out of asm/thread_info.h.
Problem Details: Previously, asm/thread_info.h was not usable from linker scripts because it contains a piece of .macro code. Since that code was only used in the m32r entry.S, the right fix is probably to move the macro there. Signed-off-by: Tim Abbott <tabbott@ksplice.com> Signed-off-by: Hirokazu Takata <takata@lin...
```diff diff --git a/arch/m32r/include/asm/thread_info.h b/arch/m32r/include/asm/thread_info.h index 4d6616936c36..ed240b6e8e77 100644 --- a/arch/m32r/include/asm/thread_info.h +++ b/arch/m32r/include/asm/thread_info.h @@ -125,15 +125,6 @@ static inline unsigned int get_thread_fault_code(void) return ti->flags >> TI_...
560a64a2b501add585b494b2b9cd9f68c0636b50
Analyze and fix the following issue in the Linux kernel code: hwmon: fix freeing of gpio_data and irq
Problem Details: If already requested, gpio_data and irq should be freed in the case of an error. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Acked-by: Jonathan Cameron <jic23@cam.ac.uk> Cc: David Brownell <david-b@pacbell.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds...
```diff diff --git a/drivers/hwmon/sht15.c b/drivers/hwmon/sht15.c index 6290a259456e..303c02694c3c 100644 --- a/drivers/hwmon/sht15.c +++ b/drivers/hwmon/sht15.c @@ -562,7 +562,7 @@ static int __devinit sht15_probe(struct platform_device *pdev) ret = sysfs_create_group(&pdev->dev.kobj, &sht15_attr_group); if (ret)...
2cd9645e2f0d60ed12268fe1738e79c119e2fe5a
Analyze and fix the following issue in the Linux kernel code: lis3: add power management functions
Problem Details: This enabled power management functions for the SPI transport layer of the lis3 devices. The device's suspend mode is only entered in case no wakeup threshold has been given. In this case, the device is supposed to wake up the system and must thus not be put to deep sleep. [randy.dunlap@oracle.com: ...
```diff diff --git a/drivers/hwmon/lis3lv02d_spi.c b/drivers/hwmon/lis3lv02d_spi.c index 3827ff04485f..2bc84930a428 100644 --- a/drivers/hwmon/lis3lv02d_spi.c +++ b/drivers/hwmon/lis3lv02d_spi.c @@ -87,6 +87,32 @@ static int __devexit lis302dl_spi_remove(struct spi_device *spi) return 0; } +#ifdef CONFIG_PM +stati...
0ec48915e8bbb37dea3df85c41e4c3498b95664b
Analyze and fix the following issue in the Linux kernel code: lis3: fix typo
Problem Details: Bit 0x80 in CTRL_REG3 is an ACTIVE_LOW rather than an ACTIVE_HIGH function, I got that wrong during my last change. Signed-off-by: Daniel Mack <daniel@caiaq.de> Acked-by: Pavel Machek <pavel@ucw.cz> Cc: Eric Piel <eric.piel@tremplin-utc.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Sig...
```diff diff --git a/include/linux/lis3lv02d.h b/include/linux/lis3lv02d.h index ad651f4e45ac..113778b5df36 100644 --- a/include/linux/lis3lv02d.h +++ b/include/linux/lis3lv02d.h @@ -32,7 +32,7 @@ struct lis3lv02d_platform_data { #define LIS3_IRQ2_DATA_READY (4 << 3) #define LIS3_IRQ2_CLICK (7 << 3) #define LIS3_IR...
fb9e9096ba94385b738a8ad6c5864b5778285957
Analyze and fix the following issue in the Linux kernel code: checkpatch: limit sN/uN matches to actual bit sizes
Problem Details: Limit our type matcher to the s/u/le/be etc sizes that actually exist to prevent miss categorising s2 as a type. Fix up the spelling of the error also. Signed-off-by: Andy Whitcroft <apw@canonical.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@li...
```diff diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 57df90699219..7fee82384ed4 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -182,7 +182,7 @@ our $UTF8 = qr { }x; our $typeTypedefs = qr{(?x: - (?:__)?(?:u|s|be|le)(?:\d|\d\d)| + (?:__)?(?:u|s|be|le)(?:8|16|32|64)| atomic_t ...
113f04a836481e9ecc26e8dee8b0e4d52878a288
Analyze and fix the following issue in the Linux kernel code: checkpatch: handle C99 comments correctly (performance issue)
Problem Details: This fixes the sanitation process in checkpatch.pl so that it blocks out the text after a C99 style comment the same way it does with block style comments. This prevents the text from getting processed as regular code. Signed-off-by: Daniel Walker <dwalker@fifo99.com> Signed-off-by: Andy Whitcroft <a...
```diff diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index fd6481649258..aa009a3b5b81 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -356,6 +356,13 @@ sub sanitise_line { $off++; next; } + if ($sanitise_quote eq '' && substr($line, $off, 2) eq '//') { + $sanitise_quote = '...
4e04d5a3d57accb0b05d381aa84d93d3749b15e2
Analyze and fix the following issue in the Linux kernel code: MAINTAINERS: omap: fix regex
Problem Details: Otherwise 'arch/arm/*omap*/foo.c' wouldn't match Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Cc: Joe Perches <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/MAINTAINERS b/MAINTAINERS index 8d30ce808d63..4dd43f8621ec 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3737,7 +3737,7 @@ W: http://www.muru.com/linux/omap/ W: http://linux.omap.com/ T: git git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6.git S: Maintained -F: arch/arm/*omap...
b781655a6f6d15bdcc96f2cc1d56b0658f9cf0b4
Analyze and fix the following issue in the Linux kernel code: scripts/get_maintainer.pl: add maintainers in order listed in matched section
Problem Details: Previous behavior was "bottom-up" in each section from the pattern "F:" entry that matched. Now information is entered into the various lists in the "as entered" order for each matched section. This also allows the F: entry to be put anywhere in a section, not just as the last entries in the section....
```diff diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl index 473b6741d55f..cdb44b63342e 100755 --- a/scripts/get_maintainer.pl +++ b/scripts/get_maintainer.pl @@ -313,22 +313,22 @@ if ($email || $email_list) { } if ($scm) { - @scm = sort_and_uniq(@scm); + @scm = uniq(@scm); output(@sc...
4d04c70754eec6d0fd342a5bc3f684db69cc2226
Analyze and fix the following issue in the Linux kernel code: uml: fix order of pud and pmd_free()
Problem Details: If pmd_alloc() fails we should only free the prior allocated pud, if pte_alloc_map() fails, we should free pmd as well. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Cc: Jeff Dike <jdike@addtoit.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@li...
```diff diff --git a/arch/um/kernel/skas/mmu.c b/arch/um/kernel/skas/mmu.c index 0cd9a7a05e77..8bfd1e905812 100644 --- a/arch/um/kernel/skas/mmu.c +++ b/arch/um/kernel/skas/mmu.c @@ -38,10 +38,10 @@ static int init_stub_pte(struct mm_struct *mm, unsigned long proc, *pte = pte_mkread(*pte); return 0; - out_pmd: - ...
69d25870f20c4b2563304f2b79c5300dd60a067e
Analyze and fix the following issue in the Linux kernel code: cpuidle: fix the menu governor to boost IO performance
Problem Details: Fix the menu idle governor which balances power savings, energy efficiency and performance impact. The reason for a reworked governor is that there have been serious performance issues reported with the existing code on Nehalem server systems. To show this I'm sure Andrew wants to see benchmark resul...
```diff diff --git a/drivers/cpuidle/governors/menu.c b/drivers/cpuidle/governors/menu.c index f1df59f59a37..9f3d77532ab9 100644 --- a/drivers/cpuidle/governors/menu.c +++ b/drivers/cpuidle/governors/menu.c @@ -2,8 +2,12 @@ * menu.c - the menu idle governor * * Copyright (C) 2006-2007 Adam Belay <abelay@novell.co...
95ad759c6b0f30ad9aa5efbdbcecb9597238c00f
Analyze and fix the following issue in the Linux kernel code: m32r: convert to use arch_gettimeoffset()
Problem Details: Convert m32r to use GENERIC_TIME via the arch_getoffset() infrastructure, reducing the amount of arch specific code we need to maintain. I also noted that m32r doesn't seem to be taking the xtime write lock before calling do_timer()! That looks like a pretty bad bug to me. If folks agree, let me kno...
```diff diff --git a/arch/m32r/Kconfig b/arch/m32r/Kconfig index cabba332cc48..c41234f1b825 100644 --- a/arch/m32r/Kconfig +++ b/arch/m32r/Kconfig @@ -41,6 +41,12 @@ config HZ int default 100 +config GENERIC_TIME + def_bool y + +config ARCH_USES_GETTIMEOFFSET + def_bool y + source "init/Kconfig" source "kerne...
4f543fa41e78bd366123424a3378f2f4918c0f33
Analyze and fix the following issue in the Linux kernel code: alpha: convert to use arch_gettimeoffset()
Problem Details: Converts alpha to use GENERIC_TIME via the arch_getoffset() infrastructure, reducing the amount of arch specific code we need to maintain. I suspect the alpha arch could even be further improved to provide and rpcc() based clocksource, but not having the hardware, I don't feel comfortable attempting t...
```diff diff --git a/arch/alpha/Kconfig b/arch/alpha/Kconfig index 9fb8aae5c391..443448154f32 100644 --- a/arch/alpha/Kconfig +++ b/arch/alpha/Kconfig @@ -45,6 +45,14 @@ config GENERIC_CALIBRATE_DELAY bool default y +config GENERIC_TIME + bool + default y + +config ARCH_USES_GETTIMEOFFSET + bool + default y + co...
470967dc6c38696f853b7f338eb9d743c28a9e11
Analyze and fix the following issue in the Linux kernel code: pcmcia: fix read buffer overflow
Problem Details: If count > 0 and dev->rlen == dev->rpos and dev->proto == 0 then we read and write dev->rbuf[-1]; Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Cc: Harald Welte <laforge@gnumonks.org> Cc: Dominik Brodowski <linux@dominikbrodowski.net> Cc: Greg KH <greg@kroah.com> Signed-off-by: Andrew Morton <akpm@...
```diff diff --git a/drivers/char/pcmcia/cm4000_cs.c b/drivers/char/pcmcia/cm4000_cs.c index 881934c068c8..c250a31efa53 100644 --- a/drivers/char/pcmcia/cm4000_cs.c +++ b/drivers/char/pcmcia/cm4000_cs.c @@ -1017,7 +1017,7 @@ static ssize_t cmm_read(struct file *filp, __user char *buf, size_t count, } } - if (dev...
425fbf047cc70bb30dff368a6da02c8c2d229318
Analyze and fix the following issue in the Linux kernel code: shmem: initialize struct shmem_sb_info to zero
Problem Details: Fixes the following kmemcheck false positive (the compiler is using a 32-bit mov to load the 16-bit sbinfo->mode in shmem_fill_super): [ 0.337000] Total of 1 processors activated (3088.38 BogoMIPS). [ 0.352000] CPU0 attaching NULL sched-domain. [ 0.360000] WARNING: kmemcheck: Caught 32-bit re...
```diff diff --git a/mm/shmem.c b/mm/shmem.c index b4b56fd1e772..b206a7a32e2a 100644 --- a/mm/shmem.c +++ b/mm/shmem.c @@ -2309,17 +2309,14 @@ int shmem_fill_super(struct super_block *sb, void *data, int silent) int err = -ENOMEM; /* Round up to L1_CACHE_BYTES to resist false sharing */ - sbinfo = kmalloc(max((in...
4e52780d41a741fb4861ae1df2413dd816ec11b1
Analyze and fix the following issue in the Linux kernel code: hugetlb: add MAP_HUGETLB for mmaping pseudo-anonymous huge page regions
Problem Details: Add a flag for mmap that will be used to request a huge page region that will look like anonymous memory to userspace. This is accomplished by using a file on the internal vfsmount. MAP_HUGETLB is a modifier of MAP_ANONYMOUS and so must be specified with it. The region will behave the same as a MAP_...
```diff diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h index f6505ad86657..176e7ee73eff 100644 --- a/include/linux/hugetlb.h +++ b/include/linux/hugetlb.h @@ -112,12 +112,19 @@ static inline void hugetlb_report_meminfo(struct seq_file *m) #endif /* !CONFIG_HUGETLB_PAGE */ +#define HUGETLB_ANON_FILE...
1ac0cb5d0e22d5e483f56b2bc12172dec1cf7536
Analyze and fix the following issue in the Linux kernel code: mm: fix anonymous dirtying
Problem Details: do_anonymous_page() has been wrong to dirty the pte regardless. If it's not going to mark the pte writable, then it won't help to mark it dirty here, and clogs up memory with pages which will need swap instead of being thrown away. Especially wrong if no overcommit is chosen, and this vma is not yet V...
```diff diff --git a/mm/memory.c b/mm/memory.c index 6359a4f80c4a..fc38d4ed9ad9 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -2653,7 +2653,8 @@ static int do_anonymous_page(struct mm_struct *mm, struct vm_area_struct *vma, goto oom_free_page; entry = mk_pte(page, vma->vm_page_prot); - entry = maybe_mkwrite(pte_...
5d3bc2709114b416cab588c577e02c2470e40a6c
Analyze and fix the following issue in the Linux kernel code: mm: fix NUMA accounting in numastat.txt
Problem Details: In Documentation/numastat.txt, it confused me. For example, there are nodes [0,1] in system. barrios:~$ cat /proc/zoneinfo | egrep 'numa|zone' Node 0, zone DMA numa_hit 33226 numa_miss 1739 numa_foreign 27978 .. .. Node 1, zone DMA numa_hit 307 numa_miss 46900 numa_foreign 0 1) In node 0, N...
```diff diff --git a/Documentation/numastat.txt b/Documentation/numastat.txt index 80133ace1eb2..9fcc9a608dc0 100644 --- a/Documentation/numastat.txt +++ b/Documentation/numastat.txt @@ -7,10 +7,10 @@ All units are pages. Hugepages have separate counters. numa_hit A process wanted to allocate memory from this node...
a6f9edd65beaef24836e8934c8912c1e974dd45c
Analyze and fix the following issue in the Linux kernel code: page-allocator: maintain rolling count of pages to free from the PCP
Problem Details: When round-robin freeing pages from the PCP lists, empty lists may be encountered. In the event one of the lists has more pages than another, there may be numerous checks for list_empty() which is undesirable. This patch maintains a count of pages to free which is incremented when empty lists are enc...
```diff diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 1b1c39e6a9b8..6877e22e3aa1 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -525,32 +525,38 @@ static void free_pcppages_bulk(struct zone *zone, int count, struct per_cpu_pages *pcp) { int migratetype = 0; + int batch_free = 0; spin_lock(&zo...
5d863b89688e5811cd9e5bd0082cb38abe03adf3
Analyze and fix the following issue in the Linux kernel code: oom: fix oom_adjust_write() input sanity check
Problem Details: Andrew Morton pointed out oom_adjust_write() has very strange EIO and new line handling. this patch fixes it. Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Cc: Paul Menage <menage@google.com> Cc: David Rientjes <rientjes@google.com> Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.c...
```diff diff --git a/fs/proc/base.c b/fs/proc/base.c index 71a34253dcbb..55c4c805a756 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c @@ -1021,21 +1021,24 @@ static ssize_t oom_adjust_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos) { struct task_struct *task; - char buffer[PROC_NUM...
4738e1b9cf8f9e28d7de080a5e6ce5d0095ea18f
Analyze and fix the following issue in the Linux kernel code: memory hotplug: fix updating of num_physpages for hot plugged memory
Problem Details: Sizing of memory allocations shouldn't depend on the number of physical pages found in a system, as that generally includes (perhaps a huge amount of) non-RAM pages. The amount of what actually is usable as storage should instead be used as a basis here. In line with that, the memory hotplug code sho...
```diff diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c index 616236e6343f..efe3e0ec2e61 100644 --- a/mm/memory_hotplug.c +++ b/mm/memory_hotplug.c @@ -339,8 +339,11 @@ EXPORT_SYMBOL_GPL(__remove_pages); void online_page(struct page *page) { + unsigned long pfn = page_to_pfn(page); + totalram_pages++; - nu...
78986a678f6ec3759a01976749f4437d8bf2d6c3
Analyze and fix the following issue in the Linux kernel code: page-allocator: limit the number of MIGRATE_RESERVE pageblocks per zone
Problem Details: After anti-fragmentation was merged, a bug was reported whereby devices that depended on high-order atomic allocations were failing. The solution was to preserve a property in the buddy allocator which tended to keep the minimum number of free pages in the zone at the lower physical addresses and cont...
```diff diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 4c847cc57caf..33b1a4762a7b 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -2836,7 +2836,8 @@ static void setup_zone_migrate_reserve(struct zone *zone) { unsigned long start_pfn, pfn, end_pfn; struct page *page; - unsigned long reserve, block_migra...
72ff13b7036bc7923e0f2b5f4a724ca260d49aab
Analyze and fix the following issue in the Linux kernel code: mm: includecheck fix for mm/nommu.c
Problem Details: Fix the following 'make includecheck' warning: mm/nommu.c: internal.h is included more than once. Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com> Cc: David Howells <dhowells@redhat.com> Acked-by: Greg Ungerer <gerg@snapgear.com> Signed-off-by: Andrew Morton <akpm@linux-foundation....
```diff diff --git a/mm/nommu.c b/mm/nommu.c index 66e81e7e9fe9..3b90086e85a2 100644 --- a/mm/nommu.c +++ b/mm/nommu.c @@ -56,8 +56,6 @@ void no_printk(const char *fmt, ...) no_printk(KERN_DEBUG FMT"\n", ##__VA_ARGS__) #endif -#include "internal.h" - void *high_memory; struct page *mem_map; unsigned long max_ma...
cff397e6b3c5bd67e26946792e81ab064c9acc1f
Analyze and fix the following issue in the Linux kernel code: mm: includecheck fix for mm/shmem.c
Problem Details: Fix the following 'make includecheck' warning: mm/shmem.c: linux/vfs.h is included more than once. Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com> Cc: Hugh Dickins <hugh.dickins@tiscali.co.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <...
```diff diff --git a/mm/shmem.c b/mm/shmem.c index 376d8f0a8f6b..25ba75d02580 100644 --- a/mm/shmem.c +++ b/mm/shmem.c @@ -49,7 +49,6 @@ static struct vfsmount *shm_mnt; #include <linux/backing-dev.h> #include <linux/shmem_fs.h> #include <linux/writeback.h> -#include <linux/vfs.h> #include <linux/blkdev.h> #includ...
0d3d062a6e289e065bd0aa537a6806a1806bf8aa
Analyze and fix the following issue in the Linux kernel code: tracing, page-allocator: add trace event for page traffic related to the buddy lists
Problem Details: The page allocation trace event reports that a page was successfully allocated but it does not specify where it came from. When analysing performance, it can be important to distinguish between pages coming from the per-cpu allocator and pages coming from the buddy lists as the latter requires the zon...
```diff diff --git a/include/trace/events/kmem.h b/include/trace/events/kmem.h index aae16ee17601..eaf46bdd18a5 100644 --- a/include/trace/events/kmem.h +++ b/include/trace/events/kmem.h @@ -299,6 +299,57 @@ TRACE_EVENT(mm_page_alloc, show_gfp_flags(__entry->gfp_flags)) ); +TRACE_EVENT(mm_page_alloc_zone_locked, ...
cc013a88906bad9d2832d6316de1c7dbc1c2a794
Analyze and fix the following issue in the Linux kernel code: arches: drop superfluous casts in nr_free_pages() callers
Problem Details: Commit 96177299416dbccb73b54e6b344260154a445375 ("Drop free_pages()") modified nr_free_pages() to return 'unsigned long' instead of 'unsigned int'. This made the casts to 'unsigned long' in most callers superfluous, so remove them. [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Geert ...
```diff diff --git a/arch/alpha/mm/init.c b/arch/alpha/mm/init.c index af71d38c8e41..a0902c20d677 100644 --- a/arch/alpha/mm/init.c +++ b/arch/alpha/mm/init.c @@ -299,7 +299,7 @@ printk_memory_info(void) initsize = (unsigned long) &__init_end - (unsigned long) &__init_begin; printk("Memory: %luk/%luk available (...
d0107eb07320b5d37c0f8a9f015534caebb28a48
Analyze and fix the following issue in the Linux kernel code: kcore: fix vread/vwrite to be aware of holes
Problem Details: vread/vwrite access vmalloc area without checking there is a page or not. In most case, this works well. In old ages, the caller of get_vm_ara() is only IOREMAP and there is no memory hole within vm_struct's [addr...addr + size - PAGE_SIZE] ( -PAGE_SIZE is for a guard page.) After per-cpu-alloc patch...
```diff diff --git a/mm/vmalloc.c b/mm/vmalloc.c index c4071fa8e12a..9216b2555d07 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c @@ -25,7 +25,7 @@ #include <linux/rcupdate.h> #include <linux/pfn.h> #include <linux/kmemleak.h> - +#include <linux/highmem.h> #include <asm/atomic.h> #include <asm/uaccess.h> #include <a...
a913e182ab9484308e870af37a14d372742d53b0
Analyze and fix the following issue in the Linux kernel code: ksm: clean up obsolete references
Problem Details: A few cleanups, given the munlock fix: the comment on ksm_test_exit() no longer applies, and it can be made private to ksm.c; there's no more reference to mmu_gather or tlb.h, and mmap.c doesn't need ksm.h. Signed-off-by: Hugh Dickins <hugh.dickins@tiscali.co.uk> Acked-by: Izik Eidus <ieidus@redhat.co...
```diff diff --git a/include/linux/ksm.h b/include/linux/ksm.h index 0e26de6adb51..a485c14ecd5d 100644 --- a/include/linux/ksm.h +++ b/include/linux/ksm.h @@ -12,8 +12,6 @@ #include <linux/sched.h> #include <linux/vmstat.h> -struct mmu_gather; - #ifdef CONFIG_KSM int ksm_madvise(struct vm_area_struct *vma, unsign...
1c2fb7a4c2ca7a958b02bc1e615d0254990bba8d
Analyze and fix the following issue in the Linux kernel code: ksm: fix deadlock with munlock in exit_mmap
Problem Details: Rawhide users have reported hang at startup when cryptsetup is run: the same problem can be simply reproduced by running a program int main() { mlockall(MCL_CURRENT | MCL_FUTURE); return 0; } The problem is that exit_mmap() applies munlock_vma_pages_all() to clean up VM_LOCKED areas, and its current i...
```diff diff --git a/include/linux/ksm.h b/include/linux/ksm.h index 2d64ff30c0de..0e26de6adb51 100644 --- a/include/linux/ksm.h +++ b/include/linux/ksm.h @@ -18,8 +18,7 @@ struct mmu_gather; int ksm_madvise(struct vm_area_struct *vma, unsigned long start, unsigned long end, int advice, unsigned long *vm_flags); i...
9ba6929480088a85c1ff60a4b1f1c9fc80dbd2b7
Analyze and fix the following issue in the Linux kernel code: ksm: fix oom deadlock
Problem Details: There's a now-obvious deadlock in KSM's out-of-memory handling: imagine ksmd or KSM_RUN_UNMERGE handling, holding ksm_thread_mutex, trying to allocate a page to break KSM in an mm which becomes the OOM victim (quite likely in the unmerge case): it's killed and goes to exit, and hangs there waiting to a...
```diff diff --git a/include/linux/ksm.h b/include/linux/ksm.h index a485c14ecd5d..2d64ff30c0de 100644 --- a/include/linux/ksm.h +++ b/include/linux/ksm.h @@ -12,11 +12,14 @@ #include <linux/sched.h> #include <linux/vmstat.h> +struct mmu_gather; + #ifdef CONFIG_KSM int ksm_madvise(struct vm_area_struct *vma, unsi...
d952b79136a6c32a3f97e0628ca78340f1d5c6f9
Analyze and fix the following issue in the Linux kernel code: ksm: fix endless loop on oom
Problem Details: break_ksm has been looping endlessly ignoring VM_FAULT_OOM: that should only be a problem for ksmd when a memory control group imposes limits (normally the OOM killer will kill others with an mm until it succeeds); but in general (especially for MADV_UNMERGEABLE and KSM_RUN_UNMERGE) we do need to route...
```diff diff --git a/mm/ksm.c b/mm/ksm.c index c49bb7156a1d..d9e3cfcc150c 100644 --- a/mm/ksm.c +++ b/mm/ksm.c @@ -294,10 +294,10 @@ static inline int in_stable_tree(struct rmap_item *rmap_item) * Could a ksm page appear anywhere else? Actually yes, in a VM_PFNMAP * mmap of /dev/mem or /dev/kmem, where we would no...
21333b2b66b805a360641568588e5a0bb06d9d1f
Analyze and fix the following issue in the Linux kernel code: ksm: no debug in page_dup_rmap()
Problem Details: page_dup_rmap(), used on each mapped page when forking, was originally just an inline atomic_inc of mapcount. 2.6.22 added CONFIG_DEBUG_VM out-of-line checks to it, which would need to be ever-so-slightly complicated to allow for the PageKsm() we're about to define. But I think these checks never cau...
```diff diff --git a/include/linux/rmap.h b/include/linux/rmap.h index bf116d0dbf23..477841d29fce 100644 --- a/include/linux/rmap.h +++ b/include/linux/rmap.h @@ -71,14 +71,10 @@ void page_add_new_anon_rmap(struct page *, struct vm_area_struct *, unsigned lon void page_add_file_rmap(struct page *); void page_remove_r...
bf88c8c83e4425d17e29daa5354ffb1f8ba7b225
Analyze and fix the following issue in the Linux kernel code: vmalloc.c: fix double error checking
Problem Details: There is no need for double error checking. Signed-off-by: Figo.zhang <figo1802@gmail.com> Acked-by: Tejun Heo <tj@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/mm/vmalloc.c b/mm/vmalloc.c index 204b8243d8ab..759deae4539a 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c @@ -168,11 +168,9 @@ static int vmap_page_range_noflush(unsigned long start, unsigned long end, next = pgd_addr_end(addr, end); err = vmap_pud_range(pgd, addr, next, prot, pages, &nr); ...
945a11136ebdfa7fcce319ee6215958e84cb85f6
Analyze and fix the following issue in the Linux kernel code: mm: add gfp mask checking for __get_free_pages()
Problem Details: __get_free_pages() with __GFP_HIGHMEM is not safe because the return address cannot represent a highmem page. get_zeroed_page() already has such a debug checking. Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvald...
```diff diff --git a/mm/page_alloc.c b/mm/page_alloc.c index afda8fd16484..81926c7ef6f0 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -1922,31 +1922,25 @@ EXPORT_SYMBOL(__alloc_pages_nodemask); */ unsigned long __get_free_pages(gfp_t gfp_mask, unsigned int order) { - struct page * page; + struct page *page;...
b35ea17b7bbf5dea35faa0de11030acc620c3197
Analyze and fix the following issue in the Linux kernel code: mm: shrink_inactive_list() nr_scan accounting fix fix
Problem Details: If sc->isolate_pages() return 0, we don't need to call shrink_page_list(). In past days, shrink_inactive_list() handled it properly. But commit fb8d14e1 (three years ago commit!) breaked it. current shrink_inactive_list() always call shrink_page_list() although isolate_pages() return 0. This patch r...
```diff diff --git a/mm/vmscan.c b/mm/vmscan.c index 45a150a3a442..d86a91f8c16b 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -1076,6 +1076,20 @@ static unsigned long shrink_inactive_list(unsigned long max_scan, nr_taken = sc->isolate_pages(sc->swap_cluster_max, &page_list, &nr_scan, sc->order, mode, z...
57dd28fb0513d2f772bb215f27925165e7b9ce5f
Analyze and fix the following issue in the Linux kernel code: hugetlb: restore interleaving of bootmem huge pages
Problem Details: I noticed that alloc_bootmem_huge_page() will only advance to the next node on failure to allocate a huge page, potentially filling nodes with huge-pages. I asked about this on linux-mm and linux-numa, cc'ing the usual huge page suspects. Mel Gorman responded: I strongly suspect that the same node ...
```diff diff --git a/mm/hugetlb.c b/mm/hugetlb.c index f10cc274a7d9..c001f846f17d 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c @@ -1031,6 +1031,7 @@ int __weak alloc_bootmem_huge_page(struct hstate *h) NODE_DATA(h->next_nid_to_alloc), huge_page_size(h), huge_page_size(h), 0); + hstate_next_node_to_alloc(h)...
55a4462af5722d2814858bc51ee8d58ca29544ab
Analyze and fix the following issue in the Linux kernel code: page_alloc: fix kernel-doc warning
Problem Details: Ummark function as having kernel-doc notation, fixing the kernel-doc warning. Warning(mm/page_alloc.c:4519): No description found for parameter 'zone' Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds...
```diff diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 7b4d4e4ea64f..91ae36c30330 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -4541,7 +4541,7 @@ void setup_per_zone_wmarks(void) calculate_totalreserve_pages(); } -/** +/* * The inactive anon list should be small enough that the VM never has to *...
112067f0905b2de862c607ee62411cf47d2fe5c4
Analyze and fix the following issue in the Linux kernel code: memory hotplug: update zone pcp at memory online
Problem Details: In my test, 128M memory is hot added, but zone's pcp batch is 0, which is an obvious error. When pages are onlined, zone pcp should be updated accordingly. [akpm@linux-foundation.org: fix warnings] Signed-off-by: Shaohua Li <shaohua.li@intel.com> Cc: Mel Gorman <mel@csn.ul.ie> Cc: Christoph Lameter <...
```diff diff --git a/include/linux/mm.h b/include/linux/mm.h index 9a72cc78e6b8..d3c8ae7c8015 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -1058,6 +1058,8 @@ extern void setup_per_cpu_pageset(void); static inline void setup_per_cpu_pageset(void) {} #endif +extern void zone_pcp_update(struct zone *zon...
a5abeeacc44bbef2935a7a8e939264c28962def2
Analyze and fix the following issue in the Linux kernel code: mm: make swap token dummies static inlines
Problem Details: Make use of the compiler's typechecking on !CONFIG_SWAP as well. [akpm@linux-foundation.org: build fix] Signed-off-by: Johannes Weiner <hannes@cmpxchg.org> Reviewed-by: Rik van Riel <riel@redhat.com> Cc: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Si...
```diff diff --git a/include/linux/swap.h b/include/linux/swap.h index 7c15334f3ff2..6c990e658f4e 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h @@ -419,10 +419,22 @@ static inline swp_entry_t get_swap_page(void) } /* linux/mm/thrash.c */ -#define put_swap_token(mm) do { } while (0) -#define grab_swap...
00d3803b656a5f0935518d746f6bb27d5181d29d
Analyze and fix the following issue in the Linux kernel code: drivers/mfd/ab3100-core.c: fix powerpc build error
Problem Details: drivers/mfd/ab3100-core.c:647: error: ab3100_init_settings causes a section type conflict Cc: Anton Vorontsov <avorontsov@ru.mvista.com> Cc: Samuel Ortiz <sameo@linux.intel.com> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: <stable@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-found...
```diff diff --git a/drivers/mfd/ab3100-core.c b/drivers/mfd/ab3100-core.c index c533f86ff5ea..5447da16a170 100644 --- a/drivers/mfd/ab3100-core.c +++ b/drivers/mfd/ab3100-core.c @@ -647,7 +647,7 @@ struct ab3100_init_setting { u8 setting; }; -static const struct ab3100_init_setting __initdata +static const struct...
580be0837a7a59b207c3d5c661d044d8dd0a6a30
Analyze and fix the following issue in the Linux kernel code: fs: make sure data stored into inode is properly seen before unlocking new inode
Problem Details: In theory it could happen that on one CPU we initialize a new inode but clearing of I_NEW | I_LOCK gets reordered before some of the initialization. Thus on another CPU we return not fully uptodate inode from iget_locked(). This seems to fix a corruption issue on ext3 mounted over NFS. [akpm@linux-f...
```diff diff --git a/fs/inode.c b/fs/inode.c index b2ba83d2c4e1..798052f87035 100644 --- a/fs/inode.c +++ b/fs/inode.c @@ -695,13 +695,15 @@ void unlock_new_inode(struct inode *inode) } #endif /* - * This is special! We do not need the spinlock - * when clearing I_LOCK, because we're guaranteed - * that nobody...
c7f7fea30b7e52c9d4b9cef271110a98d59adcbc
Analyze and fix the following issue in the Linux kernel code: perf stat: Fix zero total printouts
Problem Details: Before: 0 sched:sched_switch # nan M/sec After: 0 sched:sched_switch # 0.000 M/sec Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Mike Galbraith <efault@gmx.de> Cc: Paul Mackerras <paulus@samba.org> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Frederic Wei...
```diff diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c index 16af2d82e858..e5f6ece65a13 100644 --- a/tools/perf/builtin-stat.c +++ b/tools/perf/builtin-stat.c @@ -338,14 +338,24 @@ static void nsec_printout(int counter, double avg) static void abs_printout(int counter, double avg) { + double tot...
55c1d7c60d9b269551cd7cc31e6be8323e1d94ec
Analyze and fix the following issue in the Linux kernel code: regulator: fix voltage range in da9034 ldo12
Problem Details: Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
```diff diff --git a/drivers/regulator/da903x.c b/drivers/regulator/da903x.c index c9de73098470..aa224d936e0d 100644 --- a/drivers/regulator/da903x.c +++ b/drivers/regulator/da903x.c @@ -301,7 +301,7 @@ static int da9034_set_ldo12_voltage(struct regulator_dev *rdev, } val = (min_uV - info->min_uV + info->step_uV ...
2e7e65ce55566fc81036960b00e5e15f5d9578ea
Analyze and fix the following issue in the Linux kernel code: regulator: fix typos
Problem Details: Fix a couple of typos I found while working with this subsystem. Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
```diff diff --git a/Documentation/power/regulator/machine.txt b/Documentation/power/regulator/machine.txt index ce3487d99abe..63728fed620b 100644 --- a/Documentation/power/regulator/machine.txt +++ b/Documentation/power/regulator/machine.txt @@ -87,7 +87,7 @@ static struct platform_device regulator_devices[] = { }, ...
656d0498ea14c51cd8ec00081b5e0662acc72614
Analyze and fix the following issue in the Linux kernel code: regulator: fix calculation of voltage range in da9034_set_ldo12_voltage()
Problem Details: For val to be greater than 7 or less than 20 is logically always true. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Cc: Liam Girdwood <lrg@slimlogic.co.uk> Cc: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Acked-by: Mark Brown <broonie@op...
```diff diff --git a/drivers/regulator/da903x.c b/drivers/regulator/da903x.c index 7d9c2506d215..c9de73098470 100644 --- a/drivers/regulator/da903x.c +++ b/drivers/regulator/da903x.c @@ -301,7 +301,7 @@ static int da9034_set_ldo12_voltage(struct regulator_dev *rdev, } val = (min_uV - info->min_uV + info->step_uV ...
6f2653e63a4aedf877efbbcdbd4cea7db088bf29
Analyze and fix the following issue in the Linux kernel code: drivers/regulator/Kconfig: fix typo (s/Usersapce/Userspace/) in REGULATOR_USERSPACE_CONSUMER description
Problem Details: Signed-off-by: Michael Prokop <mika@grml.org> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
```diff diff --git a/drivers/regulator/Kconfig b/drivers/regulator/Kconfig index 29910e3a3e41..2b52a4ffcd31 100644 --- a/drivers/regulator/Kconfig +++ b/drivers/regulator/Kconfig @@ -52,7 +52,7 @@ config REGULATOR_USERSPACE_CONSUMER default n help There are some classes of devices that are controlled entirely -...
9e108d33edcb88bac3db39ba1683fc2c0591d7d4
Analyze and fix the following issue in the Linux kernel code: regulator: tps650xx - build fixes for x86_64
Problem Details: Fixes the following errors on both tps650xx regulator drivers :- drivers/regulator/tps65023-regulator: struct i2c_device_id is 32 bytes. The last of 1 is: 0x74 0x70 0x73 0x36 0x35 0x30 0x32 0x33 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0...
```diff diff --git a/drivers/regulator/tps65023-regulator.c b/drivers/regulator/tps65023-regulator.c index 1e54f46af674..07fda0a75adf 100644 --- a/drivers/regulator/tps65023-regulator.c +++ b/drivers/regulator/tps65023-regulator.c @@ -587,9 +587,10 @@ static const struct tps_info tps65023_regs[] = { }, }; -static ...
040932cdcfca9b0ac55a4f74f194c2e2c8a2527b
Analyze and fix the following issue in the Linux kernel code: Fix some regulator documentation
Problem Details: This fixes a spelling error and an API function signature mismatch in the regulator documentation. Signed-off-by: Linus Walleij <linus.walleij@stericsson.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
```diff diff --git a/Documentation/power/regulator/overview.txt b/Documentation/power/regulator/overview.txt index 0cded696ca01..50b8fa85604a 100644 --- a/Documentation/power/regulator/overview.txt +++ b/Documentation/power/regulator/overview.txt @@ -29,7 +29,7 @@ Some terms used in this document:- o PMIC ...
9ed2099edca26d07947beb42c12bd1d6669e82bc
Analyze and fix the following issue in the Linux kernel code: regulator: Fix support for deviceless supply mappings
Problem Details: The patch to add support for looking up consumers by device name had the side effect of causing us to require a device which is at best premature since at least cpufreq still operates outside the device model. Remove that requirement. Reported-by: Haojian Zhuang <haojian.zhuang@gmail.com> Signed-off-b...
```diff diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index 79a6910eb894..e38db55600e0 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c @@ -872,6 +872,7 @@ static int set_consumer_device_supply(struct regulator_dev *rdev, const char *supply) { struct regulator_map *node; + in...
edaac8e3167501cda336231d00611bf59c164346
Analyze and fix the following issue in the Linux kernel code: ratelimit: Fix/allow use in atomic contexts
Problem Details: I'd like to use printk_ratelimit() in NMI context, but it's not robust right now due to spinlock usage in lib/ratelimit.c. If an NMI is unlucky enough to hit just that spot we might lock up trying to take the spinlock again. Fix that by using a trylock variant. If we contend on that lock we can genuin...
```diff diff --git a/lib/ratelimit.c b/lib/ratelimit.c index 0e2c28e8a0ca..69bfcacda16d 100644 --- a/lib/ratelimit.c +++ b/lib/ratelimit.c @@ -28,7 +28,15 @@ int __ratelimit(struct ratelimit_state *rs) if (!rs->interval) return 1; - spin_lock_irqsave(&rs->lock, flags); + /* + * If we contend on this state's loc...
0729e196147692d84d4c099fcff056eba2ed61d8
Analyze and fix the following issue in the Linux kernel code: futex: Fix wakeup race by setting TASK_INTERRUPTIBLE before queue_me()
Problem Details: PI futexes do not use the same plist_node_empty() test for wakeup. It was possible for the waiter (in futex_wait_requeue_pi()) to set TASK_INTERRUPTIBLE after the waker assigned the rtmutex to the waiter. The waiter would then note the plist was not empty and call schedule(). The task would not be foun...
```diff diff --git a/kernel/futex.c b/kernel/futex.c index f92afbe3d3a1..463af2efa512 100644 --- a/kernel/futex.c +++ b/kernel/futex.c @@ -1656,17 +1656,8 @@ out: static void futex_wait_queue_me(struct futex_hash_bucket *hb, struct futex_q *q, struct hrtimer_sleeper *timeout) { - queue_me(q, hb); - - /* - * The...
79fe249c8368be35c9ca05982e80c68e959505e1
Analyze and fix the following issue in the Linux kernel code: tracing: Fix failure path in ftrace_regex_open()
Problem Details: Don't forget to free trace_parser if seq_open() returned failure. Signed-off-by: Li Zefan <lizf@cn.fujitsu.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Steven Rostedt <rostedt@goodmis.org> LKML-Reference: <4AB86694.4040803@cn.fujitsu.com> Signed-off-by: Ingo M...
```diff diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c index 5c5cb9be8e8c..e70af98bb99c 100644 --- a/kernel/trace/ftrace.c +++ b/kernel/trace/ftrace.c @@ -1621,8 +1621,10 @@ ftrace_regex_open(struct inode *inode, struct file *file, int enable) if (!ret) { struct seq_file *m = file->private_data; ...
1eb90f138b3fb4cc15f3acec94aa788e846269f7
Analyze and fix the following issue in the Linux kernel code: tracing: Fix failure path in ftrace_graph_write()
Problem Details: Don't call trace_parser_put() on uninitialized trace_parser. Signed-off-by: Li Zefan <lizf@cn.fujitsu.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Steven Rostedt <rostedt@goodmis.org> LKML-Reference: <4AB86639.3000003@cn.fujitsu.com> Signed-off-by: Ingo Molnar...
```diff diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c index a8fe4782ebad..5c5cb9be8e8c 100644 --- a/kernel/trace/ftrace.c +++ b/kernel/trace/ftrace.c @@ -2561,12 +2561,12 @@ ftrace_graph_write(struct file *file, const char __user *ubuf, if (ftrace_graph_count >= FTRACE_GRAPH_MAX_FUNCS) { ret = -EBUS...
3c235a337e205da0f614e456be72881483dcde6e
Analyze and fix the following issue in the Linux kernel code: tracing: Fix off-by-one in trace_get_user()
Problem Details: Leave the last slot for the tailing '\0'. Signed-off-by: Li Zefan <lizf@cn.fujitsu.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Steven Rostedt <rostedt@goodmis.org> LKML-Reference: <4AB865FA.5080801@cn.fujitsu.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
```diff diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index a35925d222ba..ae17453dc0f9 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c @@ -415,7 +415,7 @@ int trace_get_user(struct trace_parser *parser, const char __user *ubuf, /* read the non-space input */ while (cnt && !isspace(ch)) { -...
cfa9a775b9ddcef7f53c35e489a71cfed8c02710
Analyze and fix the following issue in the Linux kernel code: microblaze: Fix _start symbol to physical address
Problem Details: _start is setup to physical kernel start address. This caused that when you load vmlinux (with MMU kernel) via XMD program counter (pc) is setup correctly and then you can write con and start kernel. Signed-off-by: Michal Simek <monstr@monstr.eu>
```diff diff --git a/arch/microblaze/kernel/vmlinux.lds.S b/arch/microblaze/kernel/vmlinux.lds.S index dbb98f830f3e..e704188d7855 100644 --- a/arch/microblaze/kernel/vmlinux.lds.S +++ b/arch/microblaze/kernel/vmlinux.lds.S @@ -20,6 +20,7 @@ jiffies = jiffies_64 + 4; SECTIONS { . = CONFIG_KERNEL_START; + _start = C...
d6f61770f910a976050458807ff8891e78303297
Analyze and fix the following issue in the Linux kernel code: microblaze: Actually show KiB rather than pages in "Freeing initrd memory:"
Problem Details: Fix "Freeing initrd memory:" message on microblaze to show kilobytes as claimed rather than number of pages. Signed-off-by: Lennart Sorensen <lsorense@csclub.uwaterloo.ca> Signed-off-by: Michal Simek <monstr@monstr.eu>
```diff diff --git a/arch/microblaze/mm/init.c b/arch/microblaze/mm/init.c index f207f1a94dbc..42cbc15e015a 100644 --- a/arch/microblaze/mm/init.c +++ b/arch/microblaze/mm/init.c @@ -180,7 +180,8 @@ void free_initrd_mem(unsigned long start, unsigned long end) totalram_pages++; pages++; } - printk(KERN_NOTICE "F...
e469b0eb36c8abf033435c4918b03eaab159e002
Analyze and fix the following issue in the Linux kernel code: microblaze: Use correct kbuild variable KBUILD_CFLAGS
Problem Details: Fixes the bug introduced in 9552158573f847aa429334bb97995bb290bb4b0d Signed-off-by: John Williams <john.williams@petalogix.com>
```diff diff --git a/arch/microblaze/Makefile b/arch/microblaze/Makefile index 8439598d4655..737a4dc72ed9 100644 --- a/arch/microblaze/Makefile +++ b/arch/microblaze/Makefile @@ -37,12 +37,12 @@ CPUFLAGS-$(CONFIG_XILINX_MICROBLAZE0_USE_PCMP_INSTR) += -mxl-pattern-compare CPUFLAGS-1 += $(call cc-option,-mcpu=v$(CPU_VER...
a8f90e906783f1f815120eefe813b23cb396e9bd
Analyze and fix the following issue in the Linux kernel code: perf_event, powerpc: Fix compilation after big perf_counter rename
Problem Details: This fixes two places in the powerpc perf_event (perf_counter) code where 'list_entry' needs to be changed to 'group_entry', but were missed in commit 65abc865 ("perf_counter: Rename list_entry -> group_entry, counter_list -> group_list"). This also changes 'event' back to 'counter' in a couple of con...
```diff diff --git a/arch/powerpc/include/asm/perf_event.h b/arch/powerpc/include/asm/perf_event.h index 2499aaadaeb9..3288ce3997e0 100644 --- a/arch/powerpc/include/asm/perf_event.h +++ b/arch/powerpc/include/asm/perf_event.h @@ -14,7 +14,7 @@ #define MAX_HWEVENTS 8 #define MAX_EVENT_ALTERNATIVES 8 -#define MAX_L...
4c6ab3ee4cdb86cbd4e9400dd22fad7701cbe795
Analyze and fix the following issue in the Linux kernel code: crypto: padlock-sha - Fix stack alignment
Problem Details: The PadLock hardware requires the output buffer for SHA to be 128-bit aligned. We currentply place the buffer on the stack, and ask gcc to align it to 128 bits. That doesn't work on i386 because the kernel stack is only aligned to 32 bits. This patch changes the code to align the buffer by hand so t...
```diff diff --git a/drivers/crypto/padlock-sha.c b/drivers/crypto/padlock-sha.c index 76cb6b345e7b..0af80577dc7b 100644 --- a/drivers/crypto/padlock-sha.c +++ b/drivers/crypto/padlock-sha.c @@ -24,6 +24,12 @@ #include <asm/i387.h> #include "padlock.h" +#ifdef CONFIG_64BIT +#define STACK_ALIGN 16 +#else +#define ST...
877ae70763fa0b19ffbe25e7e119fc96f52fbbd3
Analyze and fix the following issue in the Linux kernel code: ASoC: wm8753: fix mapping when MONOMIX is set to Stereo
Problem Details: When MONOMIX is set to Stereo, Left PGA was not powered on but should be. Add a mapping from Capture Left Mux to Capture Left Mixer to fix the issue. Signed-off-by: Phil Vandry <vandry@TZoNE.ORG> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
```diff diff --git a/sound/soc/codecs/wm8753.c b/sound/soc/codecs/wm8753.c index d80d414cfbbd..5ad677ce80da 100644 --- a/sound/soc/codecs/wm8753.c +++ b/sound/soc/codecs/wm8753.c @@ -595,6 +595,7 @@ static const struct snd_soc_dapm_route audio_map[] = { /* Mono Capture mixer-mux */ {"Capture Right Mixer", "Stereo...
98235a4bb01f288c82f7b878996e507f6159fd69
Analyze and fix the following issue in the Linux kernel code: ASoC: some minor changes for AD1836 and AD1938 codec drivers
Problem Details: 1. delete redundant assignment to bus field in spi_driver structure 2. fix lost assignment to set_bias_level entry in ad1938 codec dai 3. change spi driver name of ad1836 from "ad1836-spi" to "ad1836" Signed-off-by: Barry Song <barry.song@analog.com> Signed-off-by: Mark Brown <broonie@opensource.wolfs...
```diff diff --git a/sound/soc/codecs/ad1836.c b/sound/soc/codecs/ad1836.c index 01343dc984fd..c48485f2c55d 100644 --- a/sound/soc/codecs/ad1836.c +++ b/sound/soc/codecs/ad1836.c @@ -251,8 +251,7 @@ static int __devexit ad1836_spi_remove(struct spi_device *spi) static struct spi_driver ad1836_spi_driver = { .drive...
25891f796d8d30f2b86b1e84d78721b44d573d70
Analyze and fix the following issue in the Linux kernel code: Btrfs: fix extent entry threshold calculation
Problem Details: There is a slight problem with the extent entry threshold calculation for the free space cache. We only adjust the threshold down as we add bitmaps, but never actually adjust the threshold up as we add bitmaps. This means we could fragment the free space so badly that we end up using all bitmaps to d...
```diff diff --git a/fs/btrfs/free-space-cache.c b/fs/btrfs/free-space-cache.c index 4eb296426061..5c2caad76212 100644 --- a/fs/btrfs/free-space-cache.c +++ b/fs/btrfs/free-space-cache.c @@ -259,7 +259,9 @@ static int link_free_space(struct btrfs_block_group_cache *block_group, static void recalculate_thresholds(str...
f019f4264ae8c0169332592bcee419ee90e7c827
Analyze and fix the following issue in the Linux kernel code: Btrfs: fix bitmap size tracking
Problem Details: When we first go to add free space, we allocate a new info and set the offset and bytes to the space we are adding. This is fine, except we actually set the size of a bitmap as we set the bits in it, so if we add space to a bitmap, we'd end up counting the same space twice. This isn't a huge deal, it...
```diff diff --git a/fs/btrfs/free-space-cache.c b/fs/btrfs/free-space-cache.c index 5edcee3a617f..4eb296426061 100644 --- a/fs/btrfs/free-space-cache.c +++ b/fs/btrfs/free-space-cache.c @@ -403,6 +403,7 @@ static void add_new_bitmap(struct btrfs_block_group_cache *block_group, BUG_ON(block_group->total_bitmaps >= ma...
ba1bf4818baf68d914ef9e3b06fbea6acb674fe4
Analyze and fix the following issue in the Linux kernel code: Btrfs: make balance code choose more wisely when relocating
Problem Details: Currently, we can panic the box if the first block group we go to move is of a type where there is no space left to move those extents. For example, if we fill the disk up with data, and then we try to balance and we have no room to move the data nor room to allocate new chunks, we will panic. Change...
```diff diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index bc57e236ac64..2b15fb97d23f 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h @@ -2006,6 +2006,7 @@ int btrfs_write_dirty_block_groups(struct btrfs_trans_handle *trans, int btrfs_extent_readonly(struct btrfs_root *root, u64 bytenr); int btrfs_free_block...
181f7c5dd3832763bdf2756b6d2d8a49bdf12791
Analyze and fix the following issue in the Linux kernel code: kmemcheck: add missing braces to do-while in kmemcheck_annotate_bitfield
Problem Details: Whether or not the sparse warning warning: do-while statement is not a compound statement is justified or not in this case, it is annoying and trivial to fix. [vegard.nossum@gmail.com: title and cleanup] Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Vegard Nossum <vegard.n...
```diff diff --git a/include/linux/kmemcheck.h b/include/linux/kmemcheck.h index 47b39b7c7e84..06c6c5501f13 100644 --- a/include/linux/kmemcheck.h +++ b/include/linux/kmemcheck.h @@ -137,7 +137,10 @@ static inline void kmemcheck_mark_initialized_pages(struct page *p, int name##_end[0]; #define kmemcheck_annotate_b...
1fb58a6051cd904a9f8e0344b22e31921d6b5a4d
Analyze and fix the following issue in the Linux kernel code: Btrfs: fix arithmetic error in clone ioctl
Problem Details: Fix an arithmetic error that was breaking extents cloned via the clone ioctl starting in the second half of a file. Signed-off-by: Sage Weil <sage@newdream.net> Signed-off-by: Chris Mason <chris.mason@oracle.com>
```diff diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index a13fd556db74..a8577a7f26ab 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c @@ -1105,8 +1105,7 @@ static noinline long btrfs_ioctl_clone(struct file *file, unsigned long srcfd, datao += off - key.offset; datal -= off - key.offset; } - ...
0a1f87cbdbf26e1257b36cc5e9c00a08c2236ff2
Analyze and fix the following issue in the Linux kernel code: ixgbe: fix sfp_timer clean up in ixgbe_down
Problem Details: We weren't stoping the sfp_timer after the device was brought down. This patch properly cleans up. Signed-off-by: Shannon Nelson <shannon.nelson@intel.com> Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com> Acked-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com> Signed-off-by: Jeff Ki...
```diff diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c index 59ad9590e700..056434c9831c 100644 --- a/drivers/net/ixgbe/ixgbe_main.c +++ b/drivers/net/ixgbe/ixgbe_main.c @@ -2926,6 +2926,8 @@ void ixgbe_down(struct ixgbe_adapter *adapter) ixgbe_napi_disable_all(adapter); + clear_bit(_...
dedcf2971c250473e724b642c0100d3621116616
Analyze and fix the following issue in the Linux kernel code: net: fix CONFIG_NET=n build on sparc64
Problem Details: sparc64 allnoconfig: arch/sparc/kernel/built-in.o(.text+0x134e0): In function `sys32_recvfrom': : undefined reference to `compat_sys_recvfrom' arch/sparc/kernel/built-in.o(.text+0x134e4): In function `sys32_recvfrom': : undefined reference to `compat_sys_recvfrom' Signed-off-by: Andrew Morton <akpm@l...
```diff diff --git a/kernel/sys_ni.c b/kernel/sys_ni.c index 68320f6b07b5..44e5936118d2 100644 --- a/kernel/sys_ni.c +++ b/kernel/sys_ni.c @@ -49,6 +49,7 @@ cond_syscall(sys_sendmsg); cond_syscall(compat_sys_sendmsg); cond_syscall(sys_recvmsg); cond_syscall(compat_sys_recvmsg); +cond_syscall(compat_sys_recvfrom); c...
762c6aa14c541f0fef44d030f9d422b47583365d
Analyze and fix the following issue in the Linux kernel code: cpmac: fix compilation errors against undeclared BUS_ID_SIZE
Problem Details: With the removal of BUS_ID_SIZE, cpmac was not fully converted to use MII_BUS_ID_SIZE as it ought to. This patch fixes the following cpmac build failure: CC drivers/net/cpmac.o drivers/net/cpmac.c: In function 'cpmac_start_xmit': drivers/net/cpmac.c:563: warning: comparison of distinct pointer ty...
```diff diff --git a/drivers/net/cpmac.c b/drivers/net/cpmac.c index 3e3fab8afb1e..61f9da2b4943 100644 --- a/drivers/net/cpmac.c +++ b/drivers/net/cpmac.c @@ -1109,7 +1109,7 @@ static int external_switch; static int __devinit cpmac_probe(struct platform_device *pdev) { int rc, phy_id; - char mdio_bus_id[BUS_ID_SIZE...
cdef57dbb618608bfffda2fc32c8d0a4012a1d3a
Analyze and fix the following issue in the Linux kernel code: ioat3: fix uninitialized var warnings
Problem Details: drivers/dma/ioat/dma_v3.c: In function 'ioat3_prep_memset_lock': drivers/dma/ioat/dma_v3.c:439: warning: 'fill' may be used uninitialized in this function drivers/dma/ioat/dma_v3.c:437: warning: 'desc' may be used uninitialized in this function drivers/dma/ioat/dma_v3.c: In function '__ioat3_prep_xor_l...
```diff diff --git a/drivers/dma/ioat/dma_v3.c b/drivers/dma/ioat/dma_v3.c index 3686dddf6bff..35d1e33afd5b 100644 --- a/drivers/dma/ioat/dma_v3.c +++ b/drivers/dma/ioat/dma_v3.c @@ -448,7 +448,8 @@ ioat3_prep_memset_lock(struct dma_chan *c, dma_addr_t dest, int value, /* pass */; else return NULL; - for (i = 0...
f477f5b3316f39c841aa121a219b82b3a56e7da7
Analyze and fix the following issue in the Linux kernel code: drivers/dma/ioat/dma_v2.c: fix warnings
Problem Details: drivers/dma/ioat/dma_v2.c: In function 'ioat2_dma_prep_memcpy_lock': drivers/dma/ioat/dma_v2.c:680: warning: 'hw' may be used uninitialized in this function drivers/dma/ioat/dma_v2.c:681: warning: 'desc' may be used uninitialized in this function Cc: Maciej Sosnowski <maciej.sosnowski@intel.com> Signe...
```diff diff --git a/drivers/dma/ioat/dma_v2.c b/drivers/dma/ioat/dma_v2.c index 8fd0b59f1902..96ffab7d37a7 100644 --- a/drivers/dma/ioat/dma_v2.c +++ b/drivers/dma/ioat/dma_v2.c @@ -692,7 +692,8 @@ ioat2_dma_prep_memcpy_lock(struct dma_chan *c, dma_addr_t dma_dest, /* pass */; else return NULL; - for (i = 0; i...
4321532cec25e1747961d83fb4f78ec24ea92966
Analyze and fix the following issue in the Linux kernel code: ARM: 5718/1: Sane busids for RealView board components
Problem Details: This removes the totally bogus bus ID:s with two-digit hex numerals either referring to the base address of corresponding versatile machine or just some arbitrarily chosen digit in favor of just using the device identifier as a string. I kept the "dev:" prefix for DevChips, "fpga:" prefix for FPGA:s an...
```diff diff --git a/arch/arm/mach-realview/core.c b/arch/arm/mach-realview/core.c index dc3519c50ab2..5a5e1f72461e 100644 --- a/arch/arm/mach-realview/core.c +++ b/arch/arm/mach-realview/core.c @@ -296,31 +296,31 @@ static struct clk ref24_clk = { static struct clk_lookup lookups[] = { { /* UART0 */ - .dev_id =...
388dba30471c236a290c4082bce5f2b5cd1a7a06
Analyze and fix the following issue in the Linux kernel code: Driver-Core: fix devnode callbacks for dabusb and industrialio
Problem Details: The build of the dabusb driver broke: drivers/media/video/dabusb.c:758: error: unknown field 'nodename' specified in initializer drivers/media/video/dabusb.c:758: warning: initialization from incompatible pointer type make[3]: *** wait: No child processes. Stop. Due to this commit: e454cea:...
```diff diff --git a/drivers/media/video/dabusb.c b/drivers/media/video/dabusb.c index 0664d111085f..ee43876adb06 100644 --- a/drivers/media/video/dabusb.c +++ b/drivers/media/video/dabusb.c @@ -748,14 +748,14 @@ static const struct file_operations dabusb_fops = .release = dabusb_release, }; -static char *dabusb_n...
c0a9eedf9acafb083adf3ddbff0a1e4d6d9a6949
Analyze and fix the following issue in the Linux kernel code: ALSA: ak4114 - fix errors in output selector bits
Problem Details: * the previous version had a typo - values of AK4114_OPS10-12 were identical with AK4114_OPS00-02 * Since no cards actually use this feature, the bug was not identified earlier Signed-off-by: Pavel Hofman <pavel.hofman@ivitera.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
```diff diff --git a/include/sound/ak4114.h b/include/sound/ak4114.h index d293d36a66b8..3ce69fd92523 100644 --- a/include/sound/ak4114.h +++ b/include/sound/ak4114.h @@ -95,13 +95,13 @@ /* AK4114_REG_IO0 */ #define AK4114_TX1E (1<<7) /* TX1 Output Enable (1 = enable) */ -#define AK4114_OPS12 (1<<2) /* Output Tho...
48d0764998ad4ab7570afab8bb3bee0fbfa55b2a
Analyze and fix the following issue in the Linux kernel code: nfs: initialize the backing_dev_info when creating the server
Problem Details: NFS may free the server structure without ever having used the bdi, so we either need to flag the bdi as being uninitialized or initialize it up front. This does the latter. This fixes a crash with mounting more than one NFS file system, should people ever need that kind of obscure NFS functionality. ...
```diff diff --git a/fs/nfs/client.c b/fs/nfs/client.c index e350bd6a2334..a7ce15d3c248 100644 --- a/fs/nfs/client.c +++ b/fs/nfs/client.c @@ -933,10 +933,6 @@ static int nfs_probe_fsinfo(struct nfs_server *server, struct nfs_fh *mntfh, str goto out_error; nfs_server_set_fsinfo(server, &fsinfo); - error = bdi_in...
24ed7a97464db44592495f98cff8bcee02f92bc2
Analyze and fix the following issue in the Linux kernel code: trivial: fix typo in aic7xxx comment
Problem Details: Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
```diff diff --git a/drivers/scsi/aic7xxx/aic7xxx_core.c b/drivers/scsi/aic7xxx/aic7xxx_core.c index e6f2bb7365e6..8dfb59d58992 100644 --- a/drivers/scsi/aic7xxx/aic7xxx_core.c +++ b/drivers/scsi/aic7xxx/aic7xxx_core.c @@ -5223,7 +5223,7 @@ ahc_chip_init(struct ahc_softc *ahc) /* * Setup the allowed SCSI Sequenc...
ad452d64c625147c77fca7e3986d59d1826fca84
Analyze and fix the following issue in the Linux kernel code: trivial: fix comment typo in drivers/ata/pata_hpt37x.c
Problem Details: A comment fix in drivers/ata/pata_hpt37x.c. Signed-off-by: Krzysztof Ha³asa <khc@pm.waw.pl> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
```diff diff --git a/drivers/ata/pata_hpt37x.c b/drivers/ata/pata_hpt37x.c index 122c786449a9..d0a7df2e5ca7 100644 --- a/drivers/ata/pata_hpt37x.c +++ b/drivers/ata/pata_hpt37x.c @@ -624,7 +624,7 @@ static struct ata_port_operations hpt374_fn1_port_ops = { }; /** - * htp37x_clock_slot - Turn timing to PC clock entr...
6afb1c65d0e67547cef19e2d4c40f7b2d8578bff
Analyze and fix the following issue in the Linux kernel code: trivial: fix typo in tracing documentation
Problem Details: Signed-off-by: Michal Sojka <sojkam1@fel.cvut.cz> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
```diff diff --git a/Documentation/trace/events.txt b/Documentation/trace/events.txt index 78c45a87be57..02ac6ed38b2d 100644 --- a/Documentation/trace/events.txt +++ b/Documentation/trace/events.txt @@ -72,7 +72,7 @@ To enable all events in sched subsystem: # echo 1 > /sys/kernel/debug/tracing/events/sched/enable ...
0e6b9e8c2c7b55569333a15e39d684dec986e226
Analyze and fix the following issue in the Linux kernel code: trivial: add __init macro/ fix of __exit macro location in ipmi_poweroff.c
Problem Details: Trivial patch which adds the __init to the module_init function of drivers/char/ipmi/ipmy_poweroff.c and corrects the location of __exit for the cleanup function. Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Acked-by: Corey Minyard <minyard@acm.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
```diff diff --git a/drivers/char/ipmi/ipmi_poweroff.c b/drivers/char/ipmi/ipmi_poweroff.c index a261bd735dfb..2e66b5f773dd 100644 --- a/drivers/char/ipmi/ipmi_poweroff.c +++ b/drivers/char/ipmi/ipmi_poweroff.c @@ -691,7 +691,7 @@ static struct ctl_table_header *ipmi_table_header; /* * Startup and shutdown functions...
2944fcbe03d65a704f07e43efe14adb0d226fd09
Analyze and fix the following issue in the Linux kernel code: trivial: Fix duplicated word "options" in comment
Problem Details: this was introduced in 5e0a093 (tracing: fix config options to not show when automatically selected) Signed-off-by: Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: trivial@kernel.org Signed-off-by: Jiri Kosina <jkosina@suse.cz>
```diff diff --git a/kernel/trace/Kconfig b/kernel/trace/Kconfig index e71634604400..b416512ad17f 100644 --- a/kernel/trace/Kconfig +++ b/kernel/trace/Kconfig @@ -83,7 +83,7 @@ config RING_BUFFER_ALLOW_SWAP # This allows those options to appear when no other tracer is selected. But the # options do not appear when so...
22f8b458223151272f6a1e57847b90979958cc7b
Analyze and fix the following issue in the Linux kernel code: trivial: improve help text for mm debug config options
Problem Details: Improve the help text for PAGE_POISONING. Also fix some typos and improve consistency within the file. Signed-of-by: Frans Pop <elendil@planet.nl> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
```diff diff --git a/mm/Kconfig.debug b/mm/Kconfig.debug index aa99fd1f7109..af7cfb43d2f0 100644 --- a/mm/Kconfig.debug +++ b/mm/Kconfig.debug @@ -6,7 +6,7 @@ config DEBUG_PAGEALLOC ---help--- Unmap pages from the kernel linear mapping after free_pages(). This results in a large slowdown, but helps to find ce...
8103b5cc6216d461047514d188248bd14873624a
Analyze and fix the following issue in the Linux kernel code: trivial: SubmittingPatches: Fix reference to renumbered step
Problem Details: This patch fixes a reference to step "Select e-mail destination." which has been renumbered from 4) to 5) in linux-2.6.22. Signed-off-by: Michael Brunner <mibru@gmx.de> Acked-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
```diff diff --git a/Documentation/SubmittingPatches b/Documentation/SubmittingPatches index 5c555a8b39e5..b7f9d3b4bbf6 100644 --- a/Documentation/SubmittingPatches +++ b/Documentation/SubmittingPatches @@ -183,7 +183,7 @@ the MAN-PAGES maintainer (as listed in the MAINTAINERS file) a man-pages patch, or at least a no...
3dbda77e6f3375f87090cfce97b2551d3723521b
Analyze and fix the following issue in the Linux kernel code: trivial: fix typos "man[ae]g?ment" -> "management"
Problem Details: Signed-off-by: Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
```diff diff --git a/Documentation/DocBook/mtdnand.tmpl b/Documentation/DocBook/mtdnand.tmpl index 8e145857fc9d..df0d089d0fb9 100644 --- a/Documentation/DocBook/mtdnand.tmpl +++ b/Documentation/DocBook/mtdnand.tmpl @@ -568,7 +568,7 @@ static void board_select_chip (struct mtd_info *mtd, int chip) <para> The bl...
3c78f5d81ae8131a24577b5551a6d1467b30e0af
Analyze and fix the following issue in the Linux kernel code: trivial: fix typo in CONFIG_DEBUG_FS in gcov doc
Problem Details: The correct name is CONFIG_DEBUG_FS, add the missing underscore. Signed-off-by: Marton Nemeth <nm127@freemail.hu> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
```diff diff --git a/Documentation/gcov.txt b/Documentation/gcov.txt index 40ec63352760..e7ca6478cd93 100644 --- a/Documentation/gcov.txt +++ b/Documentation/gcov.txt @@ -47,7 +47,7 @@ Possible uses: Configure the kernel with: - CONFIG_DEBUGFS=y + CONFIG_DEBUG_FS=y CONFIG_GCOV_KERNEL=y an...
7da8b6ddc7a03346f825925e0d981ca2bd1ed617
Analyze and fix the following issue in the Linux kernel code: trivial: fix missing printk space in amd_k7_smp_check
Problem Details: This trivial patch fixes one missing space in printk. I already fixed it about half a year ago or more, but the change (in arch/x86/kernel/cpu/smpboot.c at that time) didn't made into mainline yet. Signed-off-by: Michael Tokarev <mjt@tls.msk.ru> index 28e5f59..6c139ed 100644 Signed-off-by: Jiri Kosi...
```diff diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c index f32fa71ccf97..c910a716a71c 100644 --- a/arch/x86/kernel/cpu/amd.c +++ b/arch/x86/kernel/cpu/amd.c @@ -184,7 +184,7 @@ static void __cpuinit amd_k7_smp_check(struct cpuinfo_x86 *c) * approved Athlon */ WARN_ONCE(1, "WARNING: This co...
36726dd9229af008f31edd46b22a658354783232
Analyze and fix the following issue in the Linux kernel code: trivial: fix typo s/ketymap/keymap/ in comment
Problem Details: Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
```diff diff --git a/drivers/input/keyboard/atkbd.c b/drivers/input/keyboard/atkbd.c index c9523e48c6ad..adb09e2ba394 100644 --- a/drivers/input/keyboard/atkbd.c +++ b/drivers/input/keyboard/atkbd.c @@ -229,7 +229,7 @@ struct atkbd { }; /* - * System-specific ketymap fixup routine + * System-specific keymap fixup r...
fd589a8f0a13f53a2dd580b1fe170633cf6b095f
Analyze and fix the following issue in the Linux kernel code: trivial: fix typo "to to" in multiple files
Problem Details: Signed-off-by: Anand Gadiyar <gadiyar@ti.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
```diff diff --git a/Documentation/hwmon/pc87427 b/Documentation/hwmon/pc87427 index d1ebbe510f35..db5cc1227a83 100644 --- a/Documentation/hwmon/pc87427 +++ b/Documentation/hwmon/pc87427 @@ -34,5 +34,5 @@ Fan rotation speeds are reported as 14-bit values from a gated clock signal. Speeds down to 83 RPM can be measured...
4f37940d64a155c025968118849b596f6aaa8128
Analyze and fix the following issue in the Linux kernel code: trivial: fix typos in comments s/DGBU/DBGU/
Problem Details: DBGU means Debug Unit, was refered as "DGBU" in some files. Fixed to "DBGU". Signed-off-by: Samuel R. C. Vale <srcvale@holoscopio.com> Acked-by: Andrew Victor <linux@maxim.org.za> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
```diff diff --git a/arch/arm/mach-at91/board-afeb-9260v1.c b/arch/arm/mach-at91/board-afeb-9260v1.c index 61e52b66bc72..50667bed7cc9 100644 --- a/arch/arm/mach-at91/board-afeb-9260v1.c +++ b/arch/arm/mach-at91/board-afeb-9260v1.c @@ -53,7 +53,7 @@ static void __init afeb9260_map_io(void) /* Initialize processor: 18....