id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
a0dd25b2c83de4623487ca4de9c1d962b552ca0f
Analyze and fix the following issue in the Linux kernel code: ACPI: thermal: buildfix for CONFIG_THERMAL=n
Problem Details: This fixes the build, but acpi_fan_add() still needs to be updated to handle thermal_cooling_device_register() returning NULL as a non-fatal condition. Signed-off-by: Len Brown <len.brown@intel.com>
```diff diff --git a/include/linux/thermal.h b/include/linux/thermal.h index bba7712cadc7..818ca1cf0b6d 100644 --- a/include/linux/thermal.h +++ b/include/linux/thermal.h @@ -79,7 +79,9 @@ struct thermal_zone_device { }; struct thermal_zone_device *thermal_zone_device_register(char *, int, void *, - struct ther...
a6869cc4cfd633d909918f1489a6a8ac668cd6aa
Analyze and fix the following issue in the Linux kernel code: cpuidle: build fix for non-x86
Problem Details: The last posted version of this patch gave compile error on IA64. So, here goes yet another rewrite of the patch. Convert cpu_idle_wait() to cpuidle_kick_cpus() which is SMP-only, and gives error on non supported CPU. Changes from last patch sent by Kevin: Moved the definition of kick_cpus back to cp...
```diff diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 65a70b777c12..a64d532dff4c 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -102,6 +102,9 @@ config ARCH_HAS_ILOG2_U32 config ARCH_HAS_ILOG2_U64 def_bool n +config ARCH_HAS_CPU_IDLE_WAIT + def_bool y + config GENERIC_CALIBRATE_DELAY def_bool ...
4609d029aa8a2c7e0ad71e329c6e3493e1e95040
Analyze and fix the following issue in the Linux kernel code: acer-wmi: Fix backlight on AMW0 (V1) laptops
Problem Details: There is some leftover cruft from the old quirk infrastructure that causes us to be unable to set the backlight on older laptops. Signed-off-by: Carlos Corbacho <carlos@strangeworlds.co.uk> Signed-off-by: Len Brown <len.brown@intel.com>
```diff diff --git a/drivers/misc/acer-wmi.c b/drivers/misc/acer-wmi.c index a4d677504250..d7aea93081f2 100644 --- a/drivers/misc/acer-wmi.c +++ b/drivers/misc/acer-wmi.c @@ -428,11 +428,9 @@ static acpi_status AMW0_set_u32(u32 value, u32 cap, struct wmi_interface *iface) if (value > max_brightness) return AE_BA...
bbafbecb24190959d77a8fee7bd23798b81e25c2
Analyze and fix the following issue in the Linux kernel code: ACPI: SBS: Host controller must initialize before SBS.
Problem Details: In static case sbshc must be compiled ahead of sbs, so that hc is configured first. http://bugzilla.kernel.org/show_bug.cgi?id=9910 Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
```diff diff --git a/drivers/acpi/Makefile b/drivers/acpi/Makefile index f29812a86533..40b0fcae4c78 100644 --- a/drivers/acpi/Makefile +++ b/drivers/acpi/Makefile @@ -60,5 +60,5 @@ obj-$(CONFIG_ACPI_ASUS) += asus_acpi.o obj-$(CONFIG_ACPI_TOSHIBA) += toshiba_acpi.o obj-$(CONFIG_ACPI_HOTPLUG_MEMORY) += acpi_memhotplug...
3bf8f5a92cd4b04e3f1e162a1b4b99759a882b5d
Analyze and fix the following issue in the Linux kernel code: x86: fix pgtable_t build breakage
Problem Details: Commit 2f569afd9ced9ebec9a6eb3dbf6f83429be0a7b4 ("CONFIG_HIGHPTE vs. sub-page page tables") caused some build breakage due to pgtable_t only getting declared in the CONFIG_X86_PAE case. Move the declaration outside the PAE section. Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Linus Torva...
```diff diff --git a/include/asm-x86/page_32.h b/include/asm-x86/page_32.h index ba715d9798b0..984998a30741 100644 --- a/include/asm-x86/page_32.h +++ b/include/asm-x86/page_32.h @@ -50,11 +50,13 @@ typedef unsigned long phys_addr_t; typedef union { pteval_t pte, pte_low; } pte_t; typedef pte_t boot_pte_t; -typedef...
11b0cc3a4af65413ca3bb5698769e091486e0b22
Analyze and fix the following issue in the Linux kernel code: x25_asy: Fix ref count rule violation
Problem Details: x25_asy does not take an ldisc reference before calling the flush method. Fix it to use the helper function we provide. Signed-off-by: Alan Cox <alan@redhat.com> Cc: Krzysztof Halasa <khc@pm.waw.pl> Cc: "David S. Miller" <davem@davemloft.net> Cc: Jeff Garzik <jeff@garzik.org> Signed-off-by: Andrew Mor...
```diff diff --git a/drivers/net/wan/x25_asy.c b/drivers/net/wan/x25_asy.c index 1e89d4de1bb7..5e2d763c6b5f 100644 --- a/drivers/net/wan/x25_asy.c +++ b/drivers/net/wan/x25_asy.c @@ -554,6 +554,7 @@ static void x25_asy_receive_buf(struct tty_struct *tty, const unsigned char *cp, static int x25_asy_open_tty(struct tty_...
3a984a85050e320993f87ba47a22973f32853206
Analyze and fix the following issue in the Linux kernel code: fix xtensa timerfd breakage
Problem Details: In file included from /home/bunk/linux/kernel-2.6/git/linux-2.6/arch/xtensa/kernel/syscall.c:39: include2/asm/unistd.h:681: error: 'sys_timerfd' undeclared here (not in a function) Signed-off-by: Adrian Bunk <bunk@kernel.org> Cc: Christian Zankel <chris@zankel.net> Signed-off-by: Andrew Morton <akpm@l...
```diff diff --git a/include/asm-xtensa/unistd.h b/include/asm-xtensa/unistd.h index 92968aabe34e..c092c8fbb2cf 100644 --- a/include/asm-xtensa/unistd.h +++ b/include/asm-xtensa/unistd.h @@ -677,8 +677,8 @@ __SYSCALL(303, sys_ni_syscall, 0) #define __NR_signalfd 304 __SYSCALL(304, sys_signalfd, 3) -#define __NR_...
6784fd5931a58559673f500a333030ceaadb69bb
Analyze and fix the following issue in the Linux kernel code: Fix FRV cmpxchg_local
Problem Details: Fix the FRV cmpxchg_local by breaking the following header dependency loop : linux/kernel.h -> linux/bitops.h -> asm-frv/bitops.h -> asm-frv/atomic.h -> asm-frv/system.h -> asm-generic/cmpxchg_local.h -> typecheck() defined in linux/kernel.h and linux/kernel.h -> linux/bitops.h -> asm-frv/bitops...
```diff diff --git a/include/asm-frv/atomic.h b/include/asm-frv/atomic.h index 6ec494a5bc5a..46d696b331e7 100644 --- a/include/asm-frv/atomic.h +++ b/include/asm-frv/atomic.h @@ -125,87 +125,6 @@ static inline void atomic_dec(atomic_t *v) #define atomic_dec_and_test(v) (atomic_sub_return(1, (v)) == 0) #define atomic...
b55fcb22d445a7460cbbc138ceae096d5617715a
Analyze and fix the following issue in the Linux kernel code: revert "proc: fix the threaded proc self"
Problem Details: Revert commit c6caeb7c4544608e8ae62731334661fc396c7f85 ("proc: fix the threaded /proc/self"), since Eric says "The patch really is wrong. There is at least one corner case in procps that cares." Cc: Eric W. Biederman <ebiederm@xmission.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: "Guillaume Chazarain" <gu...
```diff diff --git a/fs/proc/base.c b/fs/proc/base.c index a0c4ba6c6e57..7c6b4ec83cb7 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c @@ -2102,22 +2102,22 @@ static int proc_self_readlink(struct dentry *dentry, char __user *buffer, int buflen) { struct pid_namespace *ns = dentry->d_sb->s_fs_info; - pid_t ...
785285fc8bc7f846ab68a063a8bf5a009d67725d
Analyze and fix the following issue in the Linux kernel code: [IA64] Fix large MCA bootmem allocation
Problem Details: The MCA code allocates bootmem memory for NR_CPUS, regardless of how many cpus the system actually has. This change allocates memory only for cpus that actually exist. On my test system with NR_CPUS = 1024, reserved memory was reduced by 130944k. Before: Memory: 27886976k/28111168k available (8282k ...
```diff diff --git a/arch/ia64/kernel/mca.c b/arch/ia64/kernel/mca.c index 846e7e036b13..6e17aed53135 100644 --- a/arch/ia64/kernel/mca.c +++ b/arch/ia64/kernel/mca.c @@ -17,7 +17,7 @@ * Copyright (C) 2000 Intel * Copyright (C) Chuck Fleckenstein <cfleck@co.intel.com> * - * Copyright (C) 1999, 2004 Silicon Graphi...
3b2ce0b17824c42bc2e46f7dd903b4acf5e9fff9
Analyze and fix the following issue in the Linux kernel code: [IA64] Synchronize kernel RSE to user-space and back
Problem Details: This is base kernel patch for ptrace RSE bug. It's basically a backport from the utrace RSE patch I sent out several weeks ago. please review. when a thread is stopped (ptraced), debugger might change thread's user stack (change memory directly), and we must avoid the RSE stored in kernel to override ...
```diff diff --git a/arch/ia64/kernel/process.c b/arch/ia64/kernel/process.c index 5c9efe626563..be6c6f7be027 100644 --- a/arch/ia64/kernel/process.c +++ b/arch/ia64/kernel/process.c @@ -163,6 +163,8 @@ void tsk_clear_notify_resume(struct task_struct *tsk) if (tsk->thread.pfm_needs_checking) return; #endif + if (...
e27a93a944a5ba6a0112750c8243abba86d56e94
Analyze and fix the following issue in the Linux kernel code: ARM: OMAP1: Misc clean-up
Problem Details: This patch cleans up omap1 files to sync up with linux-omap tree: - Remove omap-generic MMC config as it should be defined in board-*.c files instead of using board-generic.c - New style I2C board_info from David Brownell <dbrownell@users.sourceforge.net> - Init section fixes from Dirk Behme <dirk.b...
```diff diff --git a/arch/arm/mach-omap1/board-generic.c b/arch/arm/mach-omap1/board-generic.c index 005bf0e3e1e3..c711bf23f7b4 100644 --- a/arch/arm/mach-omap1/board-generic.c +++ b/arch/arm/mach-omap1/board-generic.c @@ -55,33 +55,14 @@ static struct omap_usb_config generic1610_usb_config __initdata = { .hmc_mode =...
010bb0cf42fe2fa0a00753e0c11a3e8bfefb37a3
Analyze and fix the following issue in the Linux kernel code: ARM: OMAP1: PM fixes for OMAP1
Problem Details: This patch does the following: - Fixes the omap_pm_idle() code so that we enter WFI mode in idle. - /sys/power/sleep_while_idle is created only when 32k timer is used Signed-off-by: Vivek Kutal <vivek.kutal@celunite.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
```diff diff --git a/arch/arm/mach-omap1/pm.c b/arch/arm/mach-omap1/pm.c index 06b7e54a0128..64adb24ffb7f 100644 --- a/arch/arm/mach-omap1/pm.c +++ b/arch/arm/mach-omap1/pm.c @@ -67,6 +67,8 @@ static unsigned int mpui730_sleep_save[MPUI730_SLEEP_SAVE_SIZE]; static unsigned int mpui1510_sleep_save[MPUI1510_SLEEP_SAVE_S...
5492fb1a46ada0d1e89eb580c2a56db8924e3141
Analyze and fix the following issue in the Linux kernel code: ARM: OMAP: Add 3430 gpio support
Problem Details: This patch adds 3430 gpio support. It also contains a fix by Paul Walmsley <paul@pwsan.com> to use the correct clock names for OMAP3430. Signed-off-by: Syed Mohammed Khasim <x0khasim@ti.com> Signed-off-by: Paul Walmsley <paul@pwsan.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
```diff diff --git a/arch/arm/plat-omap/gpio.c b/arch/arm/plat-omap/gpio.c index b2a87b8ef673..7dd50a43fbcf 100644 --- a/arch/arm/plat-omap/gpio.c +++ b/arch/arm/plat-omap/gpio.c @@ -117,17 +117,29 @@ #define OMAP24XX_GPIO_CLEARDATAOUT 0x0090 #define OMAP24XX_GPIO_SETDATAOUT 0x0094 +/* + * omap34xx specific GPIO re...
67f2d33ec011621d1be6f0b17b8226c0eb3c3746
Analyze and fix the following issue in the Linux kernel code: [Blackfin] arch: fix build fails only include header files when enabled
Problem Details: Signed-off-by: Mike Frysinger <vapier.adi@gmail.com> Signed-off-by: Bryan Wu <bryan.wu@analog.com>
```diff diff --git a/arch/blackfin/mach-bf527/boards/ezkit.c b/arch/blackfin/mach-bf527/boards/ezkit.c index b0c17afd4b76..337515fba612 100644 --- a/arch/blackfin/mach-bf527/boards/ezkit.c +++ b/arch/blackfin/mach-bf527/boards/ezkit.c @@ -41,7 +41,9 @@ #include <linux/irq.h> #include <linux/interrupt.h> #include <li...
28ae094c625a9b719c01cf5ec45b8640e6911f53
Analyze and fix the following issue in the Linux kernel code: ext3 can fail badly when device stops accepting BIO_RW_BARRIER requests
Problem Details: Some devices - notably dm and md - can change their behaviour in response to BIO_RW_BARRIER requests. They might start out accepting such requests but on reconfiguration, they find out that they cannot any more. ext3 (and other filesystems) deal with this by always testing if BIO_RW_BARRIER requests ...
```diff diff --git a/fs/jbd/commit.c b/fs/jbd/commit.c index 31853eb65b4c..8e08efcaede2 100644 --- a/fs/jbd/commit.c +++ b/fs/jbd/commit.c @@ -131,6 +131,8 @@ static int journal_write_commit_record(journal_t *journal, barrier_done = 1; } ret = sync_dirty_buffer(bh); + if (barrier_done) + clear_buffer_ordered(bh...
ac2a659968f5318a180213f0409c2ea21f072820
Analyze and fix the following issue in the Linux kernel code: uml: fix mm_context memory leak
Problem Details: [ Spotted by Miklos ] Fix a memory leak in init_new_context. The struct page ** buffer allocated for install_special_mapping was never recorded, and thus leaked when the mm_struct was freed. Fix it by saving the pointer in mm_context_t and freeing it in arch_exit_mmap. Signed-off-by: Jeff Dike <jdi...
```diff diff --git a/arch/um/include/um_mmu.h b/arch/um/include/um_mmu.h index 82865fcf6872..f575ff91f2a0 100644 --- a/arch/um/include/um_mmu.h +++ b/arch/um/include/um_mmu.h @@ -13,6 +13,7 @@ typedef struct mm_context { struct mm_id id; struct uml_ldt ldt; + struct page **stub_pages; } mm_context_t; extern vo...
5134d8fea06ab51459fd095d091d1e6f73a44553
Analyze and fix the following issue in the Linux kernel code: uml: style fixes in arch/um/os-Linux
Problem Details: Style changes under arch/um/os-Linux: include trimming CodingStyle fixes some printks needed severity indicators make_tempfile turns out not to be used outside of mem.c, so it is now static. Its declaration in tempfile.h is no longer needed, and tempfile.h itself is no longer needed. create_tmp_fi...
```diff diff --git a/arch/um/include/tempfile.h b/arch/um/include/tempfile.h deleted file mode 100644 index d441eac936b9..000000000000 --- a/arch/um/include/tempfile.h +++ /dev/null @@ -1,11 +0,0 @@ -/* - * Copyright (C) 2000, 2001, 2002 Jeff Dike (jdike@karaya.com) - * Licensed under the GPL - */ - -#ifndef __TEMPFIL...
536788fe2d28e11db6aeda74207d95d750fb761f
Analyze and fix the following issue in the Linux kernel code: uml: runtime host VMSPLIT detection
Problem Details: Calculate TASK_SIZE at run-time by figuring out the host's VMSPLIT - this is needed on i386 if UML is to run on hosts with varying VMSPLITs without recompilation. TASK_SIZE is now defined in terms of a variable, task_size. This gets rid of an include of pgtable.h from processor.h, which can cause inc...
```diff diff --git a/arch/um/Kconfig b/arch/um/Kconfig index 99e51d059a02..dba8e05f0287 100644 --- a/arch/um/Kconfig +++ b/arch/um/Kconfig @@ -203,17 +203,6 @@ config NR_CPUS depends on SMP default "32" -config NEST_LEVEL - int "Nesting level" - default "0" - help - This is set to the number of layers of...
13214adf738abc92b0a00c0763fd3be79eebaa7c
Analyze and fix the following issue in the Linux kernel code: update checkpatch.pl to version 0.14
Problem Details: This version brings the remainder of the queued fixes. A number of fixes for items missed reported by Andrew Morton and others. Also a handful of new checks and fixes for false positives. Of note: - new warning associated with --file to try and avoid cleanup only patches, - corrected handling of ...
```diff diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 545471a99eea..2086a856400a 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -9,7 +9,7 @@ use strict; my $P = $0; $P =~ s@.*/@@g; -my $V = '0.13'; +my $V = '0.14'; use Getopt::Long qw(:config no_auto_abbrev); @@ -24,6 +24,...
535ee2fbf79ab52d26bce3d2e127c9007503581e
Analyze and fix the following issue in the Linux kernel code: buffer_head: fix private_list handling
Problem Details: There are two possible races in handling of private_list in buffer cache. 1) When fsync_buffers_list() processes a private_list, it clears b_assoc_mapping and moves buffer to its private list. Now drop_buffers() comes, sees a buffer is on list so it calls __remove_assoc_queue() which complai...
```diff diff --git a/fs/buffer.c b/fs/buffer.c index 6f0bddddcf4a..3ebccf4aa7e3 100644 --- a/fs/buffer.c +++ b/fs/buffer.c @@ -678,7 +678,7 @@ void mark_buffer_dirty_inode(struct buffer_head *bh, struct inode *inode) } else { BUG_ON(mapping->assoc_mapping != buffer_mapping); } - if (list_empty(&bh->b_assoc_buffe...
06b2a76d25d3cfbd14680021c1d356c91be6904e
Analyze and fix the following issue in the Linux kernel code: Add new string functions strict_strto* and convert kernel params to use them
Problem Details: Currently, for every sysfs node, the callers will be responsible for implementing store operation, so many many callers are doing duplicate things to validate input, they have the same mistakes because they are calling simple_strtol/ul/ll/uul, especially for module params, they are just numeric, but yo...
```diff diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 8f28d35867f8..2df44e773270 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h @@ -141,6 +141,10 @@ extern unsigned long simple_strtoul(const char *,char **,unsigned int); extern long simple_strtol(const char *,char **,unsigned int...
10e6f32bdf02448f787d78647e75cf98a02f19a4
Analyze and fix the following issue in the Linux kernel code: getdelays: fix gcc warnings
Problem Details: Fix gcc warnings in getdelays.c: Documentation/accounting/getdelays.c: In function 'task_context_switch_counts': Documentation/accounting/getdelays.c:214: warning: format '%15lu' expects type 'long unsigned int', but argument 4 has type '__u64' Documentation/accounting/getdelays.c:214: warning: format...
```diff diff --git a/Documentation/accounting/getdelays.c b/Documentation/accounting/getdelays.c index d6cb1a86fd61..40121b5cca14 100644 --- a/Documentation/accounting/getdelays.c +++ b/Documentation/accounting/getdelays.c @@ -168,7 +168,7 @@ int get_family_id(int sd) char buf[256]; } ans; - int id, rc; + int id...
fa7303e22c829a3364b5b7227aec9ed2d8623b2c
Analyze and fix the following issue in the Linux kernel code: cpu: fix section mismatch warnings for enable_nonboot_cpus
Problem Details: Fix following warning: WARNING: o-x86_64/kernel/built-in.o(.text+0x36d8b): Section mismatch in reference from the function enable_nonboot_cpus() to the function .cpuinit.text:_cpu_up() enable_nonboot_cpus() are used solely from CONFIG_CONFIG_PM_SLEEP_SMP=y and PM_SLEEP_SMP imply HOTPLUG_CPU therefore ...
```diff diff --git a/kernel/cpu.c b/kernel/cpu.c index e0d3a4f56ecb..2eff3f63abed 100644 --- a/kernel/cpu.c +++ b/kernel/cpu.c @@ -389,7 +389,7 @@ int disable_nonboot_cpus(void) return error; } -void enable_nonboot_cpus(void) +void __ref enable_nonboot_cpus(void) { int cpu, error; ```
48d13e483c5b450be451f78cc9cb43c0bdd6b7bb
Analyze and fix the following issue in the Linux kernel code: Don't operate with pid_t in rtmutex tester
Problem Details: The proper behavior to store task's pid and get this task later is to get the struct pid pointer and get the task with the pid_task() call. Make it for rt_mutex_waiter->deadlock_task_pid field. Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Cc: "Eric W. Biederman" <ebiederm@xmission.com> Cc: Ingo ...
```diff diff --git a/kernel/rtmutex-debug.c b/kernel/rtmutex-debug.c index 56d73cb8826d..5fcb4fe645e2 100644 --- a/kernel/rtmutex-debug.c +++ b/kernel/rtmutex-debug.c @@ -130,7 +130,7 @@ void debug_rt_mutex_deadlock(int detect, struct rt_mutex_waiter *act_waiter, task = rt_mutex_owner(act_waiter->lock); if (task ...
6da80894cc11b5c0d79130a194789bab043a9b4b
Analyze and fix the following issue in the Linux kernel code: mount options: fix udf
Problem Details: Add a .show_options super operation to udf. Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> Acked-by: Cyrill Gorcunov <gorcunov@gmail.com> Acked-by: Jan Kara <jack@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/fs/udf/super.c b/fs/udf/super.c index 3afe7647f94a..f3ac4abfc946 100644 --- a/fs/udf/super.c +++ b/fs/udf/super.c @@ -53,6 +53,8 @@ #include <linux/vfs.h> #include <linux/vmalloc.h> #include <linux/errno.h> +#include <linux/mount.h> +#include <linux/seq_file.h> #include <asm/byteorder.h> #in...
b76db735407a26c1036fdfef249ddc35eb969bc4
Analyze and fix the following issue in the Linux kernel code: mount-options-fix-tmpfs-fix
Problem Details: Documentation/SubmitCheckist, please. Cc: Hugh Dickins <hugh@veritas.com> Cc: Miklos Szeredi <mszeredi@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/mm/shmem.c b/mm/shmem.c index 2f961a6dbf57..90b576cbc06e 100644 --- a/mm/shmem.c +++ b/mm/shmem.c @@ -85,6 +85,7 @@ enum sgp_type { SGP_WRITE, /* may exceed i_size, may allocate page */ }; +#ifdef CONFIG_TMPFS static unsigned long shmem_default_max_blocks(void) { return totalram_pages / 2;...
680d794babebc74484c141448baa9b95b211cf5e
Analyze and fix the following issue in the Linux kernel code: mount options: fix tmpfs
Problem Details: Add .show_options super operation to tmpfs. Signed-off-by: Hugh Dickins <hugh@veritas.com> Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/include/linux/shmem_fs.h b/include/linux/shmem_fs.h index f3c51899117f..8d5fb36ea047 100644 --- a/include/linux/shmem_fs.h +++ b/include/linux/shmem_fs.h @@ -30,9 +30,12 @@ struct shmem_sb_info { unsigned long free_blocks; /* How many are left for allocation */ unsigned long max_inodes; /* H...
90d09e141bb23bf0df5e31c40fb3175c17e8bda2
Analyze and fix the following issue in the Linux kernel code: mount options: fix spufs
Problem Details: Add a .show_options super operation to spufs. Use generic_show_options() and save the complete option string in spufs_fill_super(). Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> Cc: Paul Mackerras <paulus@samba.org> Cc: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Andrew Morton <akpm@linux-foundat...
```diff diff --git a/arch/powerpc/platforms/cell/spufs/inode.c b/arch/powerpc/platforms/cell/spufs/inode.c index 90784c029f25..e6e6559c55ed 100644 --- a/arch/powerpc/platforms/cell/spufs/inode.c +++ b/arch/powerpc/platforms/cell/spufs/inode.c @@ -755,8 +755,11 @@ spufs_fill_super(struct super_block *sb, void *data, int...
cdf6ccc8b88d667b3d326d3c506bca60b8c09939
Analyze and fix the following issue in the Linux kernel code: mount options: fix reiserfs
Problem Details: Add a .show_options super operation to reiserfs. Use generic_show_options() and save the complete option string in reiserfs_fill_super() and reiserfs_remount(). Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <tor...
```diff diff --git a/fs/reiserfs/super.c b/fs/reiserfs/super.c index 5cd85fe5df5d..6033f0c3bd0b 100644 --- a/fs/reiserfs/super.c +++ b/fs/reiserfs/super.c @@ -617,6 +617,7 @@ static const struct super_operations reiserfs_sops = { .unlockfs = reiserfs_unlockfs, .statfs = reiserfs_statfs, .remount_fs = reiserfs_rem...
564cd138cb30658c12e80c33582bf50816ec7a41
Analyze and fix the following issue in the Linux kernel code: mount options: fix ncpfs
Problem Details: Add a .show_options super operation to ncpfs. Small fix: add FS_BINARY_MOUNTDATA to the filesystem type flags, since it can take binary data, as well as text (similarly to NFS). Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Li...
```diff diff --git a/fs/ncpfs/inode.c b/fs/ncpfs/inode.c index eff1f18d034f..fbbb9f7afa1a 100644 --- a/fs/ncpfs/inode.c +++ b/fs/ncpfs/inode.c @@ -28,6 +28,8 @@ #include <linux/init.h> #include <linux/smp_lock.h> #include <linux/vfs.h> +#include <linux/mount.h> +#include <linux/seq_file.h> #include <linux/ncp_fs....
d0132eea7a295623e34e26b0977638cc0f62a2c6
Analyze and fix the following issue in the Linux kernel code: mount options: fix isofs
Problem Details: Add a .show_options super operation to isofs. Use generic_show_options() and save the complete option string in isofs_fill_super(). Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> Acked-by: Jan Kara <jack@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds...
```diff diff --git a/fs/isofs/inode.c b/fs/isofs/inode.c index c3240b42ebf5..044a254d526b 100644 --- a/fs/isofs/inode.c +++ b/fs/isofs/inode.c @@ -110,6 +110,7 @@ static const struct super_operations isofs_sops = { .put_super = isofs_put_super, .statfs = isofs_statfs, .remount_fs = isofs_remount, + .show_options...
10f19a86a5e106edb86d354137ba6e7388ecd1ce
Analyze and fix the following issue in the Linux kernel code: mount options: fix hugetlbfs
Problem Details: Add a .show_options super operation to hugetlbfs. Use generic_show_options() and save the complete option string in hugetlbfs_fill_super(). Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> Cc: Adam Litke <agl@us.ibm.com> Cc: Badari Pulavarty <pbadari@us.ibm.com> Cc: Ken Chen <kenchen@google.com> Cc: ...
```diff diff --git a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c index 3b3cc28cdefc..eee9487ae47f 100644 --- a/fs/hugetlbfs/inode.c +++ b/fs/hugetlbfs/inode.c @@ -734,6 +734,7 @@ static const struct super_operations hugetlbfs_ops = { .delete_inode = hugetlbfs_delete_inode, .drop_inode = hugetlbfs_drop_inode, .put...
6d9c1fd425e6e1f0998218104cc046589e3af3d8
Analyze and fix the following issue in the Linux kernel code: mount options: fix hpfs
Problem Details: Add a .show_options super operation to hpfs. Use generic_show_options() and save the complete option string in hpfs_fill_super() and hpfs_remount_fs(). Also add a small fix: hpfs_remount_fs() should return -EINVAL on error, instead of 1, which is not an error value. Signed-off-by: Miklos Szeredi <ms...
```diff diff --git a/fs/hpfs/super.c b/fs/hpfs/super.c index 00971d999964..f63a699ec659 100644 --- a/fs/hpfs/super.c +++ b/fs/hpfs/super.c @@ -386,6 +386,7 @@ static int hpfs_remount_fs(struct super_block *s, int *flags, char *data) int lowercase, conv, eas, chk, errs, chkdsk, timeshift; int o; struct hpfs_sb_inf...
dd2cc4dff3b08ab54c4c177a080046bcc84ac41d
Analyze and fix the following issue in the Linux kernel code: mount options: fix hostfs
Problem Details: Add the "host path" option to /proc/mounts for UML hostfs filesystems. The mount source (mnt_devname) should really be used for this, but not easy to change now in a backward compatible way. Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> Cc: Jeff Dike <jdike@addtoit.com> Signed-off-by: Andrew Morto...
```diff diff --git a/fs/hostfs/hostfs_kern.c b/fs/hostfs/hostfs_kern.c index 2b9b35733aac..d0549cb4fb23 100644 --- a/fs/hostfs/hostfs_kern.c +++ b/fs/hostfs/hostfs_kern.c @@ -11,6 +11,7 @@ #include <linux/mm.h> #include <linux/pagemap.h> #include <linux/statfs.h> +#include <linux/seq_file.h> #include "hostfs.h" #i...
d1875dbaa58e4894f7d9321d1c280fb23ca9f9e5
Analyze and fix the following issue in the Linux kernel code: mount options: fix fuse
Problem Details: Add blksize= option to /proc/mounts for fuseblk filesystems. Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c index 574707409bbf..033f7bdd47e8 100644 --- a/fs/fuse/inode.c +++ b/fs/fuse/inode.c @@ -29,6 +29,8 @@ DEFINE_MUTEX(fuse_mutex); #define FUSE_SUPER_MAGIC 0x65735546 +#define FUSE_DEFAULT_BLKSIZE 512 + struct fuse_mount_data { int fd; unsigned rootmode; @@ ...
c1fca3b6090f45018b3754eff0276521edb8ac3e
Analyze and fix the following issue in the Linux kernel code: mount options: fix fat
Problem Details: Add flush option to /proc/mounts for msdos and vfat filesystems. Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> Acked-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/fs/fat/inode.c b/fs/fat/inode.c index 085269e07fb3..53f3cf62b7c1 100644 --- a/fs/fat/inode.c +++ b/fs/fat/inode.c @@ -837,6 +837,8 @@ static int fat_show_options(struct seq_file *m, struct vfsmount *mnt) if (!opts->numtail) seq_puts(m, ",nonumtail"); } + if (sbi->options.flush) + seq_puts...
35c879dc302cc08cbbf108deb2be1c2859da0d18
Analyze and fix the following issue in the Linux kernel code: mount options: fix ext2
Problem Details: Add noreservation option to /proc/mounts for ext2 filesystems. Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> Acked-by: Jan Kara <jack@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/fs/ext2/super.c b/fs/ext2/super.c index 22f1010bf79f..088b011bb97e 100644 --- a/fs/ext2/super.c +++ b/fs/ext2/super.c @@ -285,6 +285,9 @@ static int ext2_show_options(struct seq_file *seq, struct vfsmount *vfs) seq_puts(seq, ",xip"); #endif + if (!test_opt(sb, RESERVATION)) + seq_puts(seq, "...
b87a267eb7291d075df76ebabd43c7f961b12f67
Analyze and fix the following issue in the Linux kernel code: mount options: fix devpts
Problem Details: Add a .show_options super operation to devpts. Small cleanup: when parsing the "mode" option, mask with S_IALLUGO instead of ~S_IFMT. Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> Acked-by: H. Peter Anvin <hpa@zytor.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus...
```diff diff --git a/fs/devpts/inode.c b/fs/devpts/inode.c index 06ef9a255c76..f120e1207874 100644 --- a/fs/devpts/inode.c +++ b/fs/devpts/inode.c @@ -20,9 +20,12 @@ #include <linux/devpts_fs.h> #include <linux/parser.h> #include <linux/fsnotify.h> +#include <linux/seq_file.h> #define DEVPTS_SUPER_MAGIC 0x1cd1 ...
e55e212c083f0c51a7d4eccd1746b6dca40ffc41
Analyze and fix the following issue in the Linux kernel code: mount options: fix capifs
Problem Details: Add a .show_options super operation to capifs. Use generic_show_options() and save the complete option string in capifs_remount(). Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> Acked-by: Karsten Keil <kkeil@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torv...
```diff diff --git a/drivers/isdn/capi/capifs.c b/drivers/isdn/capi/capifs.c index 2dd1b57b0ba4..6d7c47ec0367 100644 --- a/drivers/isdn/capi/capifs.c +++ b/drivers/isdn/capi/capifs.c @@ -52,6 +52,7 @@ static int capifs_remount(struct super_block *s, int *flags, char *data) gid_t gid = 0; umode_t mode = 0600; char...
552c3c6c565d08857df48e77e8ce2b223517c3ee
Analyze and fix the following issue in the Linux kernel code: mount options: fix befs
Problem Details: Add a .show_options super operation to befs. Use generic_show_options() and save the complete option string in befs_fill_super(). Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> Cc: Sergey S. Kostyliov <rathamahata@php4.ru> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linu...
```diff diff --git a/fs/befs/linuxvfs.c b/fs/befs/linuxvfs.c index 403fe661c144..82123ff3e1dd 100644 --- a/fs/befs/linuxvfs.c +++ b/fs/befs/linuxvfs.c @@ -57,6 +57,7 @@ static const struct super_operations befs_sops = { .put_super = befs_put_super, /* uninit super */ .statfs = befs_statfs, /* statfs */ .remount_...
979db7542d9c73db0d770110edb31c1252ef6c4a
Analyze and fix the following issue in the Linux kernel code: mount options: fix autofs
Problem Details: Add a .show_options super operation to autofs. Use generic_show_options() and save the complete option string in autofs_fill_super(). Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> Acked-by: H. Peter Anvin <hpa@zytor.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus...
```diff diff --git a/fs/autofs/inode.c b/fs/autofs/inode.c index 708bdb89fea1..dda510d31f84 100644 --- a/fs/autofs/inode.c +++ b/fs/autofs/inode.c @@ -54,6 +54,7 @@ out_kill_sb: static const struct super_operations autofs_sops = { .statfs = simple_statfs, + .show_options = generic_show_options, }; enum {Opt_e...
aef97cb9031755422c23cc64f7a089a0fbbcca7a
Analyze and fix the following issue in the Linux kernel code: mount options: fix autofs4
Problem Details: Add uid= and gid= options to /proc/mounts for autofs4 filesystems. Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> Acked-by: Ian Kent <raven@themaw.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/fs/autofs4/inode.c b/fs/autofs4/inode.c index 7f05d6ccdb13..2fdcf5e1d236 100644 --- a/fs/autofs4/inode.c +++ b/fs/autofs4/inode.c @@ -176,11 +176,16 @@ out_kill_sb: static int autofs4_show_options(struct seq_file *m, struct vfsmount *mnt) { struct autofs_sb_info *sbi = autofs4_sbi(mnt->mnt_sb);...
969729d56ef2c8b709844bc0071805f86dfbd2f9
Analyze and fix the following issue in the Linux kernel code: mount options: fix afs
Problem Details: Add a .show_options super operation to afs. Use generic_show_options() and save the complete option string in afs_get_sb(). Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> Cc: David Howells <dhowells@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <...
```diff diff --git a/fs/afs/super.c b/fs/afs/super.c index 4b2558c42213..36bbce45f44b 100644 --- a/fs/afs/super.c +++ b/fs/afs/super.c @@ -52,6 +52,7 @@ static const struct super_operations afs_super_ops = { .clear_inode = afs_clear_inode, .umount_begin = afs_umount_begin, .put_super = afs_put_super, + .show_opti...
e9b3961b66bb1e93762895d809be074ea109c77c
Analyze and fix the following issue in the Linux kernel code: mount options: fix affs
Problem Details: Add a .show_options super operation to affs. Use generic_show_options() and save the complete option string in affs_fill_super() and affs_remount(). Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> Cc: Roman Zippel <zippel@linux-m68k.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signe...
```diff diff --git a/fs/affs/super.c b/fs/affs/super.c index 3c45d49c0d26..d2dc047cb479 100644 --- a/fs/affs/super.c +++ b/fs/affs/super.c @@ -122,6 +122,7 @@ static const struct super_operations affs_sops = { .write_super = affs_write_super, .statfs = affs_statfs, .remount_fs = affs_remount, + .show_options = g...
e11400b0cadc97cb1062912c1028e965c93fa9b3
Analyze and fix the following issue in the Linux kernel code: mount options: fix adfs
Problem Details: Add a .show_options super operation to adfs. Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> Acked-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/fs/adfs/super.c b/fs/adfs/super.c index b36695ae5c2e..9e421eeb672b 100644 --- a/fs/adfs/super.c +++ b/fs/adfs/super.c @@ -20,6 +20,8 @@ #include <linux/vfs.h> #include <linux/parser.h> #include <linux/bitops.h> +#include <linux/mount.h> +#include <linux/seq_file.h> #include <asm/uaccess.h> #...
f84e3f521e1449300e0fdc314b7b43b418a66dc3
Analyze and fix the following issue in the Linux kernel code: mount options: add documentation
Problem Details: This series addresses the problem of showing mount options in /proc/mounts. Several filesystems which use mount options, have not implemented a .show_options superblock operation. Several others have implemented this callback, but have not kept it fully up to date with the parsed options. Q: Why do ...
```diff diff --git a/Documentation/filesystems/vfs.txt b/Documentation/filesystems/vfs.txt index bd55038b56f5..81e5be6e6e35 100644 --- a/Documentation/filesystems/vfs.txt +++ b/Documentation/filesystems/vfs.txt @@ -151,7 +151,7 @@ The get_sb() method has the following arguments: const char *dev_name: the device name...
bdc807871d58285737d50dc6163d0feb72cb0dc2
Analyze and fix the following issue in the Linux kernel code: avoid overflows in kernel/time.c
Problem Details: When the conversion factor between jiffies and milli- or microseconds is not a single multiply or divide, as for the case of HZ == 300, we currently do a multiply followed by a divide. The intervening result, however, is subject to overflows, especially since the fraction is not simplified (for HZ == ...
```diff diff --git a/arch/alpha/Kconfig b/arch/alpha/Kconfig index d9df913a464d..5b7dcd5a0e75 100644 --- a/arch/alpha/Kconfig +++ b/arch/alpha/Kconfig @@ -615,6 +615,11 @@ config VERBOSE_MCHECK_ON Take the default (1) unless you want more control or more info. +config HZ + int + default 1200 if ALPHA_RAWHIDE + ...
9a1e8eb1f0b76b5e72a2343ad881c81b08dd6410
Analyze and fix the following issue in the Linux kernel code: Basic PWM driver for AVR32 and AT91
Problem Details: PWM device setup, and a simple PWM driver exposing a programming interface giving access to each channel's full capabilities. Note that this doesn't support starting several channels in synch. [hskinnemoen@atmel.com: allocate platform device dynamically] [hskinnemoen@atmel.com: Kconfig fix] Signed-of...
```diff diff --git a/arch/avr32/mach-at32ap/at32ap700x.c b/arch/avr32/mach-at32ap/at32ap700x.c index 14e61f05e1f6..7678fee9a885 100644 --- a/arch/avr32/mach-at32ap/at32ap700x.c +++ b/arch/avr32/mach-at32ap/at32ap700x.c @@ -1185,6 +1185,59 @@ err_dup_modedb: } #endif +/* ---------------------------------------------...
6433471d33c09d69d029b1c4b7bdd1612c492587
Analyze and fix the following issue in the Linux kernel code: atmel_serial: fix broken RX buffer allocation
Problem Details: Introduced by atmel_serial-split-the-interrupt-handler.patch. Thanks to michael <trimarchi@gandalf.sssup.it> for spotting it. Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org...
```diff diff --git a/drivers/serial/atmel_serial.c b/drivers/serial/atmel_serial.c index d15ab2243289..e08fe64e4466 100644 --- a/drivers/serial/atmel_serial.c +++ b/drivers/serial/atmel_serial.c @@ -1469,7 +1469,8 @@ static int __devinit atmel_serial_probe(struct platform_device *pdev) if (!atmel_use_dma_rx(&port->...
a66706158d6bc4d9eb29c37852001f78f4c8989c
Analyze and fix the following issue in the Linux kernel code: atmel_serial: add DMA support
Problem Details: This patch is based on the DMA-patch by Chip Coldwell for the AT91/AT32 serial USARTS, with some tweaks to make it apply neatly on top of the other patches in this series. The RX and TX code has been moved to a tasklet and reworked a bit. Instead of depending on the ENDRX and TIMEOUT bits in CSR, we ...
```diff diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig index 84a054d7e986..b82595cf13e8 100644 --- a/drivers/serial/Kconfig +++ b/drivers/serial/Kconfig @@ -380,6 +380,21 @@ config SERIAL_ATMEL_CONSOLE console is the device which receives all kernel messages and warnings and which allows logins in...
dfa7f343e526f3595d8f1d99807d141ae0c08601
Analyze and fix the following issue in the Linux kernel code: atmel_serial: fix bugs in probe() error path and remove()
Problem Details: When an error happens in probe(), the clocks should be disabled, but only if the port isn't already used as a console. In remove(), the port struct shouldn't be freed because it's defined statically. Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com> Cc: Andrew Victor <linux@maxim.org.za> Test...
```diff diff --git a/drivers/serial/atmel_serial.c b/drivers/serial/atmel_serial.c index 0b7b2743b996..e06c6c8f4dd8 100644 --- a/drivers/serial/atmel_serial.c +++ b/drivers/serial/atmel_serial.c @@ -934,8 +934,18 @@ static int __init atmel_late_console_init(void) core_initcall(atmel_late_console_init); +static inl...
a1cfac48ba4c7481bb749e0f4f37c85cb871b2d1
Analyze and fix the following issue in the Linux kernel code: MAINTAINERS: add Haavard as maintainer of the atmel_serial driver
Problem Details: The following patchset cleans up the atmel_serial driver a bit, moves a significant portion of the interrupt handler into a tasklet, and adds DMA support. This is the result of a combined effort by Chip Coldwell, Remy Bohmer and me. The patches should apply cleanly onto Linus' latest git tree, and I'...
```diff diff --git a/MAINTAINERS b/MAINTAINERS index e91eeba3f3e3..a24631f4eab1 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -688,6 +688,12 @@ W: http://www.atmel.com/products/AT91/ W: http://www.at91.com/ S: Maintained +ATMEL AT91 / AT32 SERIAL DRIVER +P: Haavard Skinnemoen +M: hskinnemoen@atmel.com +L: linux-ker...
13050d89019a4127178c0945733fb23649f9f3fe
Analyze and fix the following issue in the Linux kernel code: parport: fix ieee1284_epp_read_addr
Problem Details: We bought cheap notebooks to control our custom data acquisition system, which requires EPP mode (read/write, data/addr). The bios does not offer EPP mode, and indeed hardware EPP mode appears not to work, although the parport driver tries to use it. EPPSWE mode does work for data r/w and addr write,...
```diff diff --git a/drivers/parport/ieee1284_ops.c b/drivers/parport/ieee1284_ops.c index 525312f2fe9c..2e21af43d91e 100644 --- a/drivers/parport/ieee1284_ops.c +++ b/drivers/parport/ieee1284_ops.c @@ -888,7 +888,7 @@ size_t parport_ieee1284_epp_read_addr (struct parport *port, /* Event 59: set nSelectIn (nAStrb)...
c2fdda0dfbe85ad5d68d4799ff7c5af89db8ac19
Analyze and fix the following issue in the Linux kernel code: update checkpatch.pl to version 0.13
Problem Details: This version brings a large number of fixes which have built up over the Christmas period. Mostly these are fixes for false positives, both through improvments to unary checks and possible type detection. It also brings new checks for while location and CVS keywords. Of note: - a number of fixes ...
```diff diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 579f50fa838c..545471a99eea 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -9,7 +9,7 @@ use strict; my $P = $0; $P =~ s@.*/@@g; -my $V = '0.12'; +my $V = '0.13'; use Getopt::Long qw(:config no_auto_abbrev); @@ -25,6 +25,...
69759454873fd90130007bdb60948a79e880cd82
Analyze and fix the following issue in the Linux kernel code: fs/afs/security.c: fix uninitialized var warning
Problem Details: fs/afs/security.c: In function 'afs_permission': fs/afs/security.c:290: warning: 'access' may be used uninitialized in this function Cc: David Howells <dhowells@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/fs/afs/security.c b/fs/afs/security.c index 9446a1fd108a..3bcbeceba1bb 100644 --- a/fs/afs/security.c +++ b/fs/afs/security.c @@ -287,7 +287,7 @@ static int afs_check_permit(struct afs_vnode *vnode, struct key *key, int afs_permission(struct inode *inode, int mask, struct nameidata *nd) { struc...
8aa84ab99b1e47973f0b82258f0eab945d0b114d
Analyze and fix the following issue in the Linux kernel code: fs/hfsplus/unicode.c: fix uninitialized var warning
Problem Details: fs/hfsplus/unicode.c: In function 'hfsplus_hash_dentry': fs/hfsplus/unicode.c:328: warning: 'dsize' may be used uninitialized in this function Cc: Roman Zippel <zippel@linux-m68k.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/fs/hfsplus/unicode.c b/fs/hfsplus/unicode.c index 9e10f9444b64..628ccf6fa402 100644 --- a/fs/hfsplus/unicode.c +++ b/fs/hfsplus/unicode.c @@ -325,7 +325,7 @@ int hfsplus_hash_dentry(struct dentry *dentry, struct qstr *str) struct super_block *sb = dentry->d_sb; const char *astr; const u16 *ds...
05343c4f2ee1a4f81f287d95b28c80ee565817c4
Analyze and fix the following issue in the Linux kernel code: udf: fix adding entry to a directory
Problem Details: When adding directory entry to a directory, we have to properly increase length of the last extent. Handle this similarly as extending regular files - make extents always have size multiple of block size (it will be truncated down to proper size in udf_clear_inode()). Signed-off-by: Jan Kara <jack@su...
```diff diff --git a/fs/udf/inode.c b/fs/udf/inode.c index f792681f2f73..24cfa55d0fdc 100644 --- a/fs/udf/inode.c +++ b/fs/udf/inode.c @@ -289,7 +289,7 @@ struct buffer_head *udf_expand_dir_adinicb(struct inode *inode, int *block, eloc.logicalBlockNum = *block; eloc.partitionReferenceNum = iinfo->i_location.pa...
af793295bf9ee92660f5e77d337b0493cea3f9b9
Analyze and fix the following issue in the Linux kernel code: udf: cleanup directory offset handling
Problem Details: Position in directory returned by readdir is offset of directory entry divided by four (don't ask me why). Make this conversion only when reading f_pos from userspace / writing it there and internally work in bytes. It makes things more easily readable and also fixes a bug (we forgot to divide length...
```diff diff --git a/fs/udf/directory.c b/fs/udf/directory.c index be16d7698a8c..2820f8fcf4cc 100644 --- a/fs/udf/directory.c +++ b/fs/udf/directory.c @@ -95,7 +95,7 @@ struct fileIdentDesc *udf_fileident_read(struct inode *dir, loff_t *nf_pos, if (!fi) return NULL; - *nf_pos += ((fibh->eoffset - fibh->soffse...
32a8f24dd75c2be34606e77414afba7bc6b5b366
Analyze and fix the following issue in the Linux kernel code: udf: avoid unnecessary synchronous writes
Problem Details: Fix udf_clear_inode() to request asynchronous writeout in icache reclaim path. Signed-off-by: Mike Galbraith <efault@gmx.de> Acked-by: Jan Kara <jack@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/fs/udf/inode.c b/fs/udf/inode.c index 466d2eea0eca..3483274fb5ba 100644 --- a/fs/udf/inode.c +++ b/fs/udf/inode.c @@ -119,7 +119,7 @@ void udf_clear_inode(struct inode *inode) udf_discard_prealloc(inode); udf_truncate_tail_extent(inode); unlock_kernel(); - write_inode_now(inode, 1); + wr...
7f3fbd08976f1d2562d6174d5fe4c85d12bb7d54
Analyze and fix the following issue in the Linux kernel code: udf: fix signedness issue
Problem Details: sparse generated: fs/udf/namei.c:896:15: originally declared here fs/udf/namei.c:1147:41: warning: incorrect type in argument 3 (different signedness) fs/udf/namei.c:1147:41: expected int *offset fs/udf/namei.c:1147:41: got unsigned int *<noident> fs/udf/namei.c:1152:78: warning: incorrect type i...
```diff diff --git a/fs/udf/namei.c b/fs/udf/namei.c index 35e5bebe4fab..4bf83d570456 100644 --- a/fs/udf/namei.c +++ b/fs/udf/namei.c @@ -1195,7 +1195,7 @@ static int udf_rename(struct inode *old_dir, struct dentry *old_dentry, } } if (S_ISDIR(old_inode->i_mode)) { - uint32_t offset = udf_ext0_offset(old_inode...
1ed161718a8f763130e6e349f2bbb1b764e6c5b3
Analyze and fix the following issue in the Linux kernel code: udf: fix 3 signedness & 1 unitialized variable warnings
Problem Details: sparse generated: fs/udf/inode.c:324:41: warning: incorrect type in argument 4 (different signedness) fs/udf/inode.c:324:41: expected long *<noident> fs/udf/inode.c:324:41: got unsigned long *<noident> inode_getblk always set 4th argument to uint32_t value 3rd parameter of map_bh is sector_t (wh...
```diff diff --git a/fs/udf/directory.c b/fs/udf/directory.c index d8ceb44f4f22..be16d7698a8c 100644 --- a/fs/udf/directory.c +++ b/fs/udf/directory.c @@ -282,7 +282,7 @@ static extent_ad *udf_get_fileextent(void *buffer, int bufsize, int *offset) } #endif -short_ad *udf_get_fileshortad(uint8_t *ptr, int maxoffset,...
756fa92f4d725698ffa4ac1faeb8f4e8cdb6cd95
Analyze and fix the following issue in the Linux kernel code: udf: fix udf_debug macro
Problem Details: udf_debug should be enclosed with do { } while (0) to be safely used in code like below: if (something) udf_debug(); else anything; (Otherwise compiler will not compile it with: "error: expected expression before 'else'") Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Cc: Jan Kara <jack@su...
```diff diff --git a/include/linux/udf_fs.h b/include/linux/udf_fs.h index 36c684e1b110..c954527a41be 100644 --- a/include/linux/udf_fs.h +++ b/include/linux/udf_fs.h @@ -39,11 +39,11 @@ #ifdef UDFFS_DEBUG #define udf_debug(f, a...) \ - { \ + do { \ printk (KERN_DEBUG "UDF-fs DEBUG %s:%d:%s: ", \ __FILE__, _...
bd45a420f93d18c91115f3f0568dd6a2555aa15a
Analyze and fix the following issue in the Linux kernel code: udf: fix sparse warnings (shadowing & mismatch between declaration and definition)
Problem Details: fix sparse warnings: fs/udf/super.c:1431:24: warning: symbol 'bh' shadows an earlier one fs/udf/super.c:1347:21: originally declared here fs/udf/super.c:472:6: warning: symbol 'udf_write_super' was not declared. Should it be static? Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Cc: Ben Fenn...
```diff diff --git a/fs/udf/super.c b/fs/udf/super.c index c19ee38e85b3..3cd5a855033b 100644 --- a/fs/udf/super.c +++ b/fs/udf/super.c @@ -474,7 +474,7 @@ static int udf_parse_options(char *options, struct udf_options *uopt) return 1; } -void udf_write_super(struct super_block *sb) +static void udf_write_super(str...
3a71fc5de56338076fe99f24f50bccfebabefe18
Analyze and fix the following issue in the Linux kernel code: udf: fix coding style of super.c
Problem Details: fix coding style errors found by checkpatch: - assignments in if conditions - braces {} around single statement blocks - no spaces after commas - printks without KERN_* - lines longer than 80 characters before: total: 50 errors, 207 warnings, 1835 lines checked after: total: 0 errors, 164 warnings, 18...
```diff diff --git a/fs/udf/super.c b/fs/udf/super.c index 4360c7a05743..57788f1ba2da 100644 --- a/fs/udf/super.c +++ b/fs/udf/super.c @@ -33,8 +33,8 @@ * 10/17/98 added freespace count for "df" * 11/11/98 gr added novrs option * 11/26/98 dgb added fileset,anchor mount options - * 12/06/98 blf really...
8b88b0998e35d239e74446cc30f354bdab86df89
Analyze and fix the following issue in the Linux kernel code: libfs: allow error return from simple attributes
Problem Details: Sometimes simple attributes might need to return an error, e.g. for acquiring a mutex interruptibly. In fact we have that situation in spufs already which is the original user of the simple attributes. This patch merged the temporarily forked attributes in spufs back into the main ones and allows to ...
```diff diff --git a/arch/avr32/kernel/ocd.c b/arch/avr32/kernel/ocd.c index c4f023294d75..1b0245d4e0ca 100644 --- a/arch/avr32/kernel/ocd.c +++ b/arch/avr32/kernel/ocd.c @@ -90,25 +90,29 @@ static struct dentry *ocd_debugfs_DC; static struct dentry *ocd_debugfs_DS; static struct dentry *ocd_debugfs_count; -static ...
90b315af12b427eeb09b2812343fb4ef9d01cf17
Analyze and fix the following issue in the Linux kernel code: ufs: fix symlink creation on ufs2
Problem Details: If we create symlink on UFS2 filesystem under Linux, it looks wrong under other OSes, because of max symlink length field was not initialized properly, and data blocks were not used to save short symlink names. [akpm@linux-foundation.org: add missing fs32_to_cpu()] Signed-off-by: Evgeniy Dushistov <du...
```diff diff --git a/fs/ufs/super.c b/fs/ufs/super.c index 73deff475e63..d18ccf36ba34 100644 --- a/fs/ufs/super.c +++ b/fs/ufs/super.c @@ -131,6 +131,8 @@ static void ufs_print_super_stuff(struct super_block *sb, printk(KERN_INFO" cs_nffree(Num of free frags): %llu\n", (unsigned long long) fs64_...
25478445c4a39318acbe08ba8df7945766cbb5b5
Analyze and fix the following issue in the Linux kernel code: Fix container_of() usage
Problem Details: Using "attr" twice is not OK, because it effectively prohibits such container_of() on variables not named "attr". Signed-off-by: Alexey Dobriyan <adobriyan@sw.ru> Acked-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <tor...
```diff diff --git a/arch/sh/kernel/cpu/sh4/sq.c b/arch/sh/kernel/cpu/sh4/sq.c index 3008c00eea6b..8250e017bd4e 100644 --- a/arch/sh/kernel/cpu/sh4/sq.c +++ b/arch/sh/kernel/cpu/sh4/sq.c @@ -263,7 +263,7 @@ struct sq_sysfs_attr { ssize_t (*store)(const char *buf, size_t count); }; -#define to_sq_sysfs_attr(attr) c...
7df620d852642d424afc9777fe57880e02c92832
Analyze and fix the following issue in the Linux kernel code: aoe: add module parameter for users who need more outstanding I/O
Problem Details: An AoE target provides an estimate of the number of outstanding commands that the AoE initiator can send before getting a response. The aoe_maxout parameter provides a way to set an even lower limit. It will not allow a user to use more outstanding commands than the target permits. If a user discove...
```diff diff --git a/drivers/block/aoe/aoecmd.c b/drivers/block/aoe/aoecmd.c index 7a9618313ea3..e92d885803a3 100644 --- a/drivers/block/aoe/aoecmd.c +++ b/drivers/block/aoe/aoecmd.c @@ -18,6 +18,11 @@ static int aoe_deadsecs = 60 * 3; module_param(aoe_deadsecs, int, 0644); MODULE_PARM_DESC(aoe_deadsecs, "After aoe_d...
6b9699bbd24e82d2ec3bb5a43100099a936ded04
Analyze and fix the following issue in the Linux kernel code: aoe: only install new AoE device once
Problem Details: An aoe driver user who had about 70 AoE targets found that he was hitting a BUG in sysfs_create_file because the aoe driver was trying to tell the kernel about an AoE device more than once. Each AoE device was reachable by several local network interfaces, and multiple ATA device indentify responses w...
```diff diff --git a/drivers/block/aoe/aoecmd.c b/drivers/block/aoe/aoecmd.c index b49e06ef121e..7a9618313ea3 100644 --- a/drivers/block/aoe/aoecmd.c +++ b/drivers/block/aoe/aoecmd.c @@ -698,6 +698,8 @@ ataid_complete(struct aoedev *d, struct aoetgt *t, unsigned char *id) d->fw_ver, (long long)ssize); d->ssize = ...
9bb237b6a670fa7a6af3adc65231b1f6fda44510
Analyze and fix the following issue in the Linux kernel code: aoe: dynamically allocate a capped number of skbs when necessary
Problem Details: What this Patch Does Even before this recent series of 12 patches to 2.6.22-rc4, the aoe driver was reusing a small set of skbs that were allocated once and were only used for outbound AoE commands. The network layer cannot be allowed to put_page on the data that is still associated with a ...
```diff diff --git a/drivers/block/aoe/aoe.h b/drivers/block/aoe/aoe.h index 2248ab226576..67ef4d755e64 100644 --- a/drivers/block/aoe/aoe.h +++ b/drivers/block/aoe/aoe.h @@ -89,6 +89,7 @@ enum { MIN_BUFS = 16, NTARGETS = 8, NAOEIFS = 8, + NSKBPOOLMAX = 128, TIMERTICK = HZ / 10, MINTIMER = HZ >> 2, @@ -138,...
8b21985c91ffb3062bfbd3f2bfbeceb5333afaac
Analyze and fix the following issue in the Linux kernel code: constify tables in kernel/sysctl_check.c
Problem Details: Remains the question whether it is intended that many, perhaps even large, tables are compiled in without ever having a chance to get used, i.e. whether there shouldn't #ifdef CONFIG_xxx get added. [akpm@linux-foundation.org: fix cut-n-paste error] Signed-off-by: Jan Beulich <jbeulich@novell.com> Acke...
```diff diff --git a/kernel/sysctl_check.c b/kernel/sysctl_check.c index 006365b69eaf..c09350d564f2 100644 --- a/kernel/sysctl_check.c +++ b/kernel/sysctl_check.c @@ -8,10 +8,10 @@ struct trans_ctl_table { int ctl_name; const char *procname; - struct trans_ctl_table *child; + const struct trans_ctl_table *child...
ec7015840ad7a8cdc87f52367ffe9c0b0401d919
Analyze and fix the following issue in the Linux kernel code: Remove fastcall from linux/include
Problem Details: [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/include/linux/irq.h b/include/linux/irq.h index 4669be080617..a19b381d4112 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h @@ -25,7 +25,7 @@ #include <asm/irq_regs.h> struct irq_desc; -typedef void fastcall (*irq_flow_handler_t)(unsigned int irq, +typedef void (*irq_flow_handler_t)(u...
9f741cb8fecef923cce1dff820ac6aa78c12d136
Analyze and fix the following issue in the Linux kernel code: lib: remove fastcall from lib/*
Problem Details: [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/lib/iomap.c b/lib/iomap.c index 72c42687ba10..db004a9ff509 100644 --- a/lib/iomap.c +++ b/lib/iomap.c @@ -69,27 +69,27 @@ static void bad_io_access(unsigned long port, const char *access) #define mmio_read32be(addr) be32_to_cpu(__raw_readl(addr)) #endif -unsigned int fastcall ioread8(void __iom...
7ad5b3a505e68cfdc342933d6e0fc0eaa5e0a4f7
Analyze and fix the following issue in the Linux kernel code: kernel: remove fastcall in kernel/*
Problem Details: [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Acked-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/kernel/exit.c b/kernel/exit.c index 81345ba4b253..3b893e78ce61 100644 --- a/kernel/exit.c +++ b/kernel/exit.c @@ -458,7 +458,7 @@ struct files_struct *get_files_struct(struct task_struct *task) return files; } -void fastcall put_files_struct(struct files_struct *files) +void put_files_struct(s...
fc9b52cd8f5f459b88adcf67c47668425ae31a78
Analyze and fix the following issue in the Linux kernel code: fs: remove fastcall, it is always empty
Problem Details: [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/fs/aio.c b/fs/aio.c index 8a37dbbf3437..8a48ab0c278d 100644 --- a/fs/aio.c +++ b/fs/aio.c @@ -317,7 +317,7 @@ out: /* wait_on_sync_kiocb: * Waits on the given sync kiocb to complete. */ -ssize_t fastcall wait_on_sync_kiocb(struct kiocb *iocb) +ssize_t wait_on_sync_kiocb(struct kiocb *iocb) { ...
1eb114112381eb66ebacdace1b6e70d30d603f9c
Analyze and fix the following issue in the Linux kernel code: aout: remove unnecessary inclusions of {asm, linux}/a.out.h
Problem Details: Remove now unnecessary inclusions of {asm,linux}/a.out.h. [akpm@linux-foundation.org: fix alpha build] Signed-off-by: David Howells <dhowells@redhat.com> Cc: <linux-arch@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.o...
```diff diff --git a/arch/alpha/kernel/osf_sys.c b/arch/alpha/kernel/osf_sys.c index 72f9a619a66d..973c5c3705e3 100644 --- a/arch/alpha/kernel/osf_sys.c +++ b/arch/alpha/kernel/osf_sys.c @@ -22,7 +22,6 @@ #include <linux/ptrace.h> #include <linux/slab.h> #include <linux/user.h> -#include <linux/a.out.h> #include <l...
3eb056764dd806bbe84eb604e45e7470feeaafd8
Analyze and fix the following issue in the Linux kernel code: time: fix typo in comments
Problem Details: Fix typo in comments. BTW: I have to fix coding style in arch/ia64/kernel/time.c also, otherwise checkpatch.pl will be complaining. Signed-off-by: Li Zefan <lizf@cn.fujitsu.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@elte.hu> Cc: john stultz <johnstul@us.ibm.com> Signed-off-b...
```diff diff --git a/arch/ia64/kernel/time.c b/arch/ia64/kernel/time.c index 3ab042720970..17fda5293c67 100644 --- a/arch/ia64/kernel/time.c +++ b/arch/ia64/kernel/time.c @@ -49,13 +49,13 @@ EXPORT_SYMBOL(last_cli_ip); #endif static struct clocksource clocksource_itc = { - .name = "itc", - ....
56496c1d83dfae0c74e2f43adb45d2d95e16c0d5
Analyze and fix the following issue in the Linux kernel code: Pidns: fix badly converted mqueues pid handling
Problem Details: When sending the pid namespaces patches I wrongly converted the tsk->tgid into task_pid_vnr(tsk) in mqueue-s (the git id of this patch is b488893a390edfe027bae7a46e9af8083e740668). The proper behavior is to get the task_tgid_vnr(tsk). This seem to be the only mistake of that kind. Signed-off-by: Pav...
```diff diff --git a/ipc/mqueue.c b/ipc/mqueue.c index 147d50238c7b..60f7a27f7a9e 100644 --- a/ipc/mqueue.c +++ b/ipc/mqueue.c @@ -509,7 +509,7 @@ static void __do_notify(struct mqueue_inode_info *info) sig_i.si_errno = 0; sig_i.si_code = SI_MESGQ; sig_i.si_value = info->notify.sigev_value; - sig_i.si_pid...
d36174bc2bce0372693a9cfbdef8b2689c9982cb
Analyze and fix the following issue in the Linux kernel code: uglify kill_pid_info() to fix kill() vs exec() race
Problem Details: kill_pid_info()->pid_task() could be the old leader of the execing process. In that case it is possible that the leader will be released before we take siglock. This means that kill_pid_info() (and thus sys_kill()) can return a false -ESRCH. Change the code to retry when lock_task_sighand() fails. The...
```diff diff --git a/kernel/signal.c b/kernel/signal.c index 3d3adb94561d..b0b43a4ad8dd 100644 --- a/kernel/signal.c +++ b/kernel/signal.c @@ -1050,17 +1050,26 @@ int kill_pgrp_info(int sig, struct siginfo *info, struct pid *pgrp) int kill_pid_info(int sig, struct siginfo *info, struct pid *pid) { - int error; + in...
f374ada53bd1ca7c16d7607369fccc6769704956
Analyze and fix the following issue in the Linux kernel code: pid: fix solaris_procids
Problem Details: Use task_pgrp_vnr not task_pgrp_nr so we return the process id the processes pid namespace and not in the initial pid namespace. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Cc: Pavel Emelyanov <xemul@openvz.org> Cc: Oleg Nesterov <oleg@tv-sign.ru> Cc: "David S. Miller" <davem@davemloft.ne...
```diff diff --git a/arch/sparc64/solaris/misc.c b/arch/sparc64/solaris/misc.c index c86cb3091a8e..d3e48e9701bf 100644 --- a/arch/sparc64/solaris/misc.c +++ b/arch/sparc64/solaris/misc.c @@ -415,7 +415,7 @@ asmlinkage int solaris_procids(int cmd, s32 pid, s32 pgid) switch (cmd) { case 0: /* getpgrp */ - return ...
69440e76f6121fe7a5193a82f45ccec08e4bb24b
Analyze and fix the following issue in the Linux kernel code: pid: fix mips irix emulation pid usage
Problem Details: [m.kozlowski@tuxland.pl: fix unbalanced parenthesis in irix_BSDsetpgrp()] Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Cc: Pavel Emelyanov <xemul@openvz.org> Cc: Oleg Nesterov <oleg@tv-sign.ru> Cc: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl> ...
```diff diff --git a/arch/mips/kernel/irixelf.c b/arch/mips/kernel/irixelf.c index 7852c7cdf29e..290d8e3a664d 100644 --- a/arch/mips/kernel/irixelf.c +++ b/arch/mips/kernel/irixelf.c @@ -591,9 +591,9 @@ static void irix_map_prda_page(void) return; pp = (struct prda *) v; - pp->prda_sys.t_pid = current->pid; + p...
44c4e1b2581f7273ab14ef30b6430618801c57b1
Analyze and fix the following issue in the Linux kernel code: pid: Extend/Fix pid_vnr
Problem Details: pid_vnr returns the user space pid with respect to the pid namespace the struct pid was allocated in. What we want before we return a pid to user space is the user space pid with respect to the pid namespace of current. pid_vnr is a very nice optimization but because it isn't quite what we want it is...
```diff diff --git a/include/linux/pid.h b/include/linux/pid.h index 061abb6c0796..b91f4732dc1b 100644 --- a/include/linux/pid.h +++ b/include/linux/pid.h @@ -127,9 +127,8 @@ extern void FASTCALL(free_pid(struct pid *pid)); * the helpers to get the pid's id seen from different namespaces * * pid_nr() : global ...
161550d74c07303ffa6187ba776f62df5a906a21
Analyze and fix the following issue in the Linux kernel code: pid: sys_wait... fixes
Problem Details: This modifies do_wait and eligible child to take a pair of enum pid_type and struct pid *pid to precisely specify what set of processes are eligible to be waited for, instead of the raw pid_t value from sys_wait4. This fixes a bug in sys_waitid where you could not wait for children in just process gro...
```diff diff --git a/kernel/exit.c b/kernel/exit.c index 2b332d170327..2567de3487bd 100644 --- a/kernel/exit.c +++ b/kernel/exit.c @@ -1090,20 +1090,23 @@ asmlinkage void sys_exit_group(int error_code) do_group_exit((error_code & 0xff) << 8); } -static int eligible_child(pid_t pid, int options, struct task_struct ...
5dee1707dfbfc55eb7569b9ae5abaf932bd4c377
Analyze and fix the following issue in the Linux kernel code: move the related code from exit_notify() to exit_signals()
Problem Details: The previous bugfix was not optimal, we shouldn't care about group stop when we are the only thread or the group stop is in progress. In that case nothing special is needed, just set PF_EXITING and return. Also, take the related "TIF_SIGPENDING re-targeting" code from exit_notify(). So, from the per...
```diff diff --git a/kernel/exit.c b/kernel/exit.c index 8f3bf53a5b4d..2b332d170327 100644 --- a/kernel/exit.c +++ b/kernel/exit.c @@ -745,24 +745,6 @@ static void exit_notify(struct task_struct *tsk) struct task_struct *t; struct pid *pgrp; - if (signal_pending(tsk) && !(tsk->signal->flags & SIGNAL_GROUP_EXIT) -...
6806aac6d282d58b97763f5e17e2787e62c3b440
Analyze and fix the following issue in the Linux kernel code: sys_setsid: remove now unneeded session != 1 check
Problem Details: Eric's "fix clone(CLONE_NEWPID)" eliminated the last reason for this hack. Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru> Cc: "Eric W. Biederman" <ebiederm@xmission.com> Cc: Roland McGrath <roland@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torva...
```diff diff --git a/kernel/sys.c b/kernel/sys.c index 7de9c984f696..ee2e78dbea6c 100644 --- a/kernel/sys.c +++ b/kernel/sys.c @@ -1056,11 +1056,8 @@ asmlinkage long sys_setsid(void) /* Fail if a process group id already exists that equals the * proposed session id. - * - * Don't check if session == 1, clone(C...
d12619b5ff5664623524aef796514d1946ea3b4a
Analyze and fix the following issue in the Linux kernel code: fix group stop with exit race
Problem Details: do_signal_stop() counts all sub-thread and sets ->group_stop_count accordingly. Every thread should decrement ->group_stop_count and stop, the last one should notify the parent. However a sub-thread can exit before it notices the signal_pending(), or it may be somewhere in do_exit() already. In that...
```diff diff --git a/include/linux/signal.h b/include/linux/signal.h index 7e095147656c..42d2e0a948f4 100644 --- a/include/linux/signal.h +++ b/include/linux/signal.h @@ -241,6 +241,7 @@ extern int show_unhandled_signals; struct pt_regs; extern int get_signal_to_deliver(siginfo_t *info, struct k_sigaction *return_k...
e4cc0a9c876d4d4eadaef97a2bff4a199946d202
Analyze and fix the following issue in the Linux kernel code: fix setsid() for sub-namespace /sbin/init
Problem Details: sys_setsid() still deals with pid_t's from the global namespace. This means that the "session > 1" check can't help for sub-namespace init, setsid() can't succeed because copy_process(CLONE_NEWPID) populates PIDTYPE_PGID/SID links. Remove the usage of task_struct->pid and convert the code to use "stru...
```diff diff --git a/kernel/sys.c b/kernel/sys.c index 42136dd453d1..e13bc518b444 100644 --- a/kernel/sys.c +++ b/kernel/sys.c @@ -1045,35 +1045,33 @@ asmlinkage long sys_getsid(pid_t pid) asmlinkage long sys_setsid(void) { struct task_struct *group_leader = current->group_leader; - pid_t session; + struct pid *sid...
f2cc3eb133baa2e9dc8efd40f417106b2ee520f3
Analyze and fix the following issue in the Linux kernel code: do_wait: fix security checks
Problem Details: Imho, the current usage of security_task_wait() is not logical. Suppose we have the single child p, and security_task_wait(p) return -EANY. In that case waitpid(-1) returns this error. Why? Isn't it better to return ECHLD? We don't really have reapable children. Now suppose that child was stolen by...
```diff diff --git a/kernel/exit.c b/kernel/exit.c index 9ee229ea97e4..ee607720ae58 100644 --- a/kernel/exit.c +++ b/kernel/exit.c @@ -1142,10 +1142,14 @@ static int eligible_child(pid_t pid, int options, struct task_struct *p) return 0; err = security_task_wait(p); - if (err) - return err; + if (likely(!err)) ...
96fabbf55ae79826f2e8a86f4066d7e8834315ae
Analyze and fix the following issue in the Linux kernel code: do_wait: cleanup delay_group_leader() usage
Problem Details: eligible_child() == 2 means delay_group_leader(). With the previous patch this only matters for EXIT_ZOMBIE task, we can move that special check to the only place it is really needed. Also, with this patch we don't skip security_task_wait() for the group leaders in a non-empty thread group. I don't ...
```diff diff --git a/kernel/exit.c b/kernel/exit.c index 190a4cdcdb4d..9ee229ea97e4 100644 --- a/kernel/exit.c +++ b/kernel/exit.c @@ -1140,12 +1140,6 @@ static int eligible_child(pid_t pid, int options, struct task_struct *p) if (((p->exit_signal != SIGCHLD) ^ ((options & __WCLONE) != 0)) && !(options & __WALL...
20686a309aa98c518adbbd9b57cdbb1804143deb
Analyze and fix the following issue in the Linux kernel code: ptrace_stop: fix racy nonstop_code setting
Problem Details: If the tracer is gone and we are not going to stop, ptrace_stop() sets ->exit_code = nostop_code. However, the tracer could actually clear the exit code before detaching. In that case get_signal_to_deliver() "resends" the signal which was cancelled by the debugger. For example, it is possible that a...
```diff diff --git a/kernel/signal.c b/kernel/signal.c index 678bffa437c1..3fca710a5cd7 100644 --- a/kernel/signal.c +++ b/kernel/signal.c @@ -1591,10 +1591,10 @@ static int sigkill_pending(struct task_struct *tsk) * That makes it a way to test a stopped process for * being ptrace-stopped vs being job-control-stopp...
9cbab8100538efdd93aeae6fc37787d986f2f558
Analyze and fix the following issue in the Linux kernel code: do_wait: factor out "retval != 0" checks
Problem Details: Every branch if the main "if" statement does the same code at the end. Move it down. Also, fix the indentation. Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru> Cc: Roland McGrath <roland@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux...
```diff diff --git a/kernel/exit.c b/kernel/exit.c index da293ac7e379..723a69b69fa1 100644 --- a/kernel/exit.c +++ b/kernel/exit.c @@ -1511,6 +1511,7 @@ repeat: } allowed = 1; + retval = 0; if (task_is_stopped_or_traced(p)) { /* * It's stopped now, so it might later @@ -1524,8 +1525,6 @@ repe...
ee7c82da830ea860b1f9274f1f0cdf99f206e7c2
Analyze and fix the following issue in the Linux kernel code: wait_task_stopped: simplify and fix races with SIGCONT/SIGKILL/untrace
Problem Details: wait_task_stopped() has multiple races with SIGCONT/SIGKILL. tasklist_lock does not pin the child in TASK_TRACED/TASK_STOPPED stated, almost all info reported (including exit_code) may be wrong. In fact, the code under write_lock_irq(tasklist_lock) is not safe. The child may be PTRACE_DETACH'ed at t...
```diff diff --git a/kernel/exit.c b/kernel/exit.c index b5ff2b121093..da293ac7e379 100644 --- a/kernel/exit.c +++ b/kernel/exit.c @@ -1355,17 +1355,35 @@ static int wait_task_stopped(struct task_struct *p, int delayed_group_leader, int noreap, struct siginfo __user *infop, int __user *stat_addr, stru...
6405f7f4675884b671bee66678e1c2859bdb0e56
Analyze and fix the following issue in the Linux kernel code: ptrace_stop: fix the race with ptrace detach+attach
Problem Details: If the tracer went away (may_ptrace_stop() failed), ptrace_stop() drops tasklist and then changes the ->state from TASK_TRACED to TASK_RUNNING. This can fool another tracer which attaches to us in between. Change the ->state under tasklist_lock to ensure that ptrace_check_attach() can't wrongly succe...
```diff diff --git a/kernel/signal.c b/kernel/signal.c index 6d6d1ab39e7e..678bffa437c1 100644 --- a/kernel/signal.c +++ b/kernel/signal.c @@ -1638,11 +1638,11 @@ static void ptrace_stop(int exit_code, int nostop_code, siginfo_t *info) } else { /* * By the time we got the lock, our tracer went away. - * Don'...
6b39c7bfbd1436836c0fb34c5b437fda1a7a3dd4
Analyze and fix the following issue in the Linux kernel code: kill PT_ATTACHED
Problem Details: Since the patch "Fix ptrace_attach()/ptrace_traceme()/de_thread() race" commit f5b40e363ad6041a96e3da32281d8faa191597b9 we set PT_ATTACHED and change child->parent "atomically" wrt task_list lock. This means we can remove the checks like "PT_ATTACHED && ->parent != ptracer" which were needed to ca...
```diff diff --git a/include/linux/ptrace.h b/include/linux/ptrace.h index 6ab80714a916..ebe0c17039cf 100644 --- a/include/linux/ptrace.h +++ b/include/linux/ptrace.h @@ -67,7 +67,6 @@ #define PT_TRACE_EXEC 0x00000080 #define PT_TRACE_VFORK_DONE 0x00000100 #define PT_TRACE_EXIT 0x00000200 -#define PT_ATTACHED 0x0000...
66c6ceae39534c029c3434489c036f5ae2c6a593
Analyze and fix the following issue in the Linux kernel code: tty_audit: fix checkpatch complaint
Problem Details: Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/drivers/char/tty_audit.c b/drivers/char/tty_audit.c index bacded0eefab..7722466e052f 100644 --- a/drivers/char/tty_audit.c +++ b/drivers/char/tty_audit.c @@ -27,7 +27,7 @@ static struct tty_audit_buf *tty_audit_buf_alloc(int major, int minor, { struct tty_audit_buf *buf; - buf = kmalloc(sizeof...
92dfc9dc7ba63134f721b6e745dbdcfc13ea341b
Analyze and fix the following issue in the Linux kernel code: fix "modules: make module_address_lookup() safe"
Problem Details: Get the constness right, avoid nasty cast. Cc: Ingo Molnar <mingo@elte.hu> Cc: Kyle McMartin <kyle@mcmartin.ca> Cc: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/include/linux/module.h b/include/linux/module.h index ac481e2094fd..ac28e8761e84 100644 --- a/include/linux/module.h +++ b/include/linux/module.h @@ -449,7 +449,7 @@ static inline void __module_get(struct module *module) /* For kallsyms to ask for address resolution. namebuf should be at * leas...
88173507e4fc1e7ecd111b0565e8cba0cb7dae6d
Analyze and fix the following issue in the Linux kernel code: Modules: handle symbols that have a zero value
Problem Details: The module subsystem cannot handle symbols that are zero. If symbols are present that have a zero value then the module resolver prints out a message that these symbols are unresolved. [akinobu.mita@gmail.com: fix __find_symbl() error checks] Cc: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca> Cc: K...
```diff diff --git a/kernel/module.c b/kernel/module.c index bd60278ee703..dc04d4d88d02 100644 --- a/kernel/module.c +++ b/kernel/module.c @@ -290,7 +290,7 @@ static unsigned long __find_symbol(const char *name, } } DEBUGP("Failed to find symbol %s\n", name); - return 0; + return -ENOENT; } /* Search for mod...
d94afc6ccf6690b30ae112ec8101b3f10d50114e
Analyze and fix the following issue in the Linux kernel code: intel-iommu: fault_reason index cleanup
Problem Details: Fix an off by one bug in the fault reason string reporting function, and clean up some of the code around this buglet. [akpm@linux-foundation.org: cleanup] Signed-off-by: mark gross <mgross@linux.intel.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Andi Kleen <ak@sus...
```diff diff --git a/drivers/pci/intel-iommu.c b/drivers/pci/intel-iommu.c index 585e188c1746..a4c3089f892a 100644 --- a/drivers/pci/intel-iommu.c +++ b/drivers/pci/intel-iommu.c @@ -745,7 +745,7 @@ static int iommu_disable_translation(struct intel_iommu *iommu) /* iommu interrupt handling. Most stuff are MSI-like. ...
2d3a4e3666325a9709cc8ea2e88151394e8f20fc
Analyze and fix the following issue in the Linux kernel code: proc: fix ->open'less usage due to ->proc_fops flip
Problem Details: Typical PDE creation code looks like: pde = create_proc_entry("foo", 0, NULL); if (pde) pde->proc_fops = &foo_proc_fops; Notice that PDE is first created, only then ->proc_fops is set up to final value. This is a problem because right after creation a) PDE is fully visible in /proc , and b) ->pro...
```diff diff --git a/fs/proc/generic.c b/fs/proc/generic.c index b9dd3628d43a..68971e66cd41 100644 --- a/fs/proc/generic.c +++ b/fs/proc/generic.c @@ -562,7 +562,7 @@ static int proc_register(struct proc_dir_entry * dir, struct proc_dir_entry * dp return 0; } -static struct proc_dir_entry *proc_create(struct proc_...