id stringlengths 40 40 | instruction stringlengths 68 308 | input stringlengths 17 33.4k | output stringlengths 100 30k |
|---|---|---|---|
718deb6b61e34c200c1f2b706176d9aac334cb2d | Analyze and fix the following issue in the Linux kernel code: Fix breakage in shmem.c | Problem Details:
Replacing
error = 0;
if (error)
op
with nothing is not quite an equivalent transformation ;-)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> | ```diff
diff --git a/mm/shmem.c b/mm/shmem.c
index f8485062f3ba..eef4ebea5158 100644
--- a/mm/shmem.c
+++ b/mm/shmem.c
@@ -1830,6 +1830,8 @@ shmem_mknod(struct inode *dir, struct dentry *dentry, int mode, dev_t dev)
iput(inode);
return error;
}
+#else
+ error = 0;
#endif
if (dir->i_mode & S_ISGID) {
... |
329962503692b42d8088f31584e42d52db179d52 | Analyze and fix the following issue in the Linux kernel code: x86: Fix checking of SRAT when node 0 ram is not from 0 | Problem Details:
Found one system that boot from socket1 instead of socket0, SRAT get rejected...
[ 0.000000] SRAT: Node 1 PXM 0 0-a0000
[ 0.000000] SRAT: Node 1 PXM 0 100000-80000000
[ 0.000000] SRAT: Node 1 PXM 0 100000000-2080000000
[ 0.000000] SRAT: Node 0 PXM 1 2080000000-4080000000
[ 0.000000] SRA... | ```diff
diff --git a/arch/x86/mm/srat_32.c b/arch/x86/mm/srat_32.c
index 6f8aa33031c7..9324f13492d5 100644
--- a/arch/x86/mm/srat_32.c
+++ b/arch/x86/mm/srat_32.c
@@ -267,6 +267,8 @@ int __init get_memcfg_from_srat(void)
e820_register_active_regions(chunk->nid, chunk->start_pfn,
min(chunk->end_pfn, max_pf... |
47376ceba54600cec4dd9e7c4fe8b98e4269633a | Analyze and fix the following issue in the Linux kernel code: reiserfs: Fix reiserfs lock <-> inode mutex dependency inversion | Problem Details:
The reiserfs lock -> inode mutex dependency gets inverted when we
relax the lock while walking to the tree.
To fix this, use a specialized version of reiserfs_mutex_lock_safe
that takes care of mutex subclasses. Then we can grab the inode
mutex with I_MUTEX_XATTR subclass without any reiserfs lock
dep... | ```diff
diff --git a/fs/reiserfs/xattr.c b/fs/reiserfs/xattr.c
index 58aa8e75f7f5..8891cd88a3f4 100644
--- a/fs/reiserfs/xattr.c
+++ b/fs/reiserfs/xattr.c
@@ -243,7 +243,8 @@ static int reiserfs_for_each_xattr(struct inode *inode,
goto out_dir;
}
- mutex_lock_nested(&dir->d_inode->i_mutex, I_MUTEX_XATTR);
+ reis... |
b01f2c3a4a37d09a47ad73ccbb46d554d21cfeb0 | Analyze and fix the following issue in the Linux kernel code: drm/i915: only enable hotplug for detected outputs | Problem Details:
This patch changes around our hotplug enable code a bit to only enable
it for ports we actually detect and initialize. This prevents problems
with stuck or spurious interrupts on outputs that aren't actually wired
up, and is generally more correct.
Fixes FDO bug #23183.
Signed-off-by: Jesse Barnes <... | ```diff
diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
index 28d99b8a0490..e3e5d5094232 100644
--- a/drivers/gpu/drm/i915/i915_dma.c
+++ b/drivers/gpu/drm/i915/i915_dma.c
@@ -1249,6 +1249,8 @@ static int i915_load_modeset_init(struct drm_device *dev,
if (ret)
goto destroy_ringbuffer... |
5714868812b563ba8816c1d974f4f07c76941c30 | Analyze and fix the following issue in the Linux kernel code: PCI: fix section mismatch on update_res() | Problem Details:
Remark update_res from __init to __devinit as it is called also
from __devinit functions.
This patch removes the following warning message:
WARNING: vmlinux.o(.devinit.text+0x774a): Section mismatch
in reference from the function pci_root_bus_res() to the
function .init.text:update_res()
The ... | ```diff
diff --git a/arch/x86/pci/bus_numa.c b/arch/x86/pci/bus_numa.c
index 145df00e0387..f939d603adfa 100644
--- a/arch/x86/pci/bus_numa.c
+++ b/arch/x86/pci/bus_numa.c
@@ -51,7 +51,7 @@ void x86_pci_root_bus_res_quirks(struct pci_bus *b)
}
}
-void __init update_res(struct pci_root_info *info, size_t start,
+voi... |
73efc4681cb5e3c8807daf106f001e7f0798d8a0 | Analyze and fix the following issue in the Linux kernel code: re-export alloc_file() | Problem Details:
Commit 3d1e4631 ("get rid of init_file()") removed the export of
alloc_file() -- possibly inadvertently, since that commit mainly
consisted of deleting the lines between the end of alloc_file() and
the start of the code in init_file().
There is in fact one modular use of alloc_file() in the tree, in
d... | ```diff
diff --git a/fs/file_table.c b/fs/file_table.c
index 17a55b81be2d..0afacf654398 100644
--- a/fs/file_table.c
+++ b/fs/file_table.c
@@ -194,6 +194,7 @@ struct file *alloc_file(struct path *path, fmode_t mode,
ima_counts_get(file);
return file;
}
+EXPORT_SYMBOL(alloc_file);
void fput(struct file *file)
{... |
a2565377a5c31e25c77c7cabaf6752abe9a2d83a | Analyze and fix the following issue in the Linux kernel code: drm/i915: Update LVDS connector status when receiving ACPI LID event | Problem Details:
Dirk reports that nothing is displayed on LVDS when using ubuntu 9.1 after
close/reopen the LID. And I also reproduce this issue on another laptop.
After some tests and debug, it seems that it is related with that the
LVDS status is not updated in time in course of suspend/resume.
Now the LID state is... | ```diff
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index fbecac72f5bb..25c1047f6ecd 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -561,6 +561,7 @@ typedef struct drm_i915_private {
u16 orig_clock;
int child_dev_num;
struct child_device_co... |
a3cb5195f6db58dbebd8a31b877ddce082c9b63d | Analyze and fix the following issue in the Linux kernel code: drm/i915: Add MALATA PC-81005 to ACPI LID quirk list | Problem Details:
The MALATA PC-81005 laptop always reports that the LID status is closed and we
can't use it reliabily for LVDS detection. So add this box into the quirk list.
https://bugs.freedesktop.org/show_bug.cgi?id=25523
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Review-by: Jesse Barnes <jbarnes@virtuousg... | ```diff
diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds.c
index 539d97ee79e6..b3188a0b4979 100644
--- a/drivers/gpu/drm/i915/intel_lvds.c
+++ b/drivers/gpu/drm/i915/intel_lvds.c
@@ -608,6 +608,13 @@ static const struct dmi_system_id bad_lid_status[] = {
DMI_MATCH(DMI_PRODUCT_NAME, "... |
c2151433847e88ba05c6bb539d9397ea90d755e6 | Analyze and fix the following issue in the Linux kernel code: ASoC: Fix build of DA7210 | Problem Details:
DAC_VOICE_EN was not defined - looks to have been overly enthusiastically
deleted from a previous revision of the patch, pull the value from v1.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> | ```diff
diff --git a/sound/soc/codecs/da7210.c b/sound/soc/codecs/da7210.c
index 14f5f344b1d5..fbf3ab482015 100644
--- a/sound/soc/codecs/da7210.c
+++ b/sound/soc/codecs/da7210.c
@@ -81,6 +81,9 @@
#define DA7210_ADC_L_EN (1 << 3)
#define DA7210_ADC_R_EN (1 << 7)
+/* DAC_HPF fields */
+#define DA7210_DAC_VOICE_E... |
255173b40db448ce063a2caa680a552fb637ad20 | Analyze and fix the following issue in the Linux kernel code: ASoC: PLL computation in TLV320AIC3x SoC driver | Problem Details:
fix precision of PLL computation for TLV320AIC3x SoC driver,
test results are at http://pmeerw.net/clk
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Acked-by: Vladimir Barinov <vova.barinov@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfs... | ```diff
diff --git a/sound/soc/codecs/tlv320aic3x.c b/sound/soc/codecs/tlv320aic3x.c
index 2b4dc2b0b017..5a8f53ce2250 100644
--- a/sound/soc/codecs/tlv320aic3x.c
+++ b/sound/soc/codecs/tlv320aic3x.c
@@ -765,9 +765,10 @@ static int aic3x_hw_params(struct snd_pcm_substream *substream,
struct snd_soc_codec *codec = socd... |
3497b91946a3df42830c826939424d98251a3b0d | Analyze and fix the following issue in the Linux kernel code: ASoC: Fix sorting of codecs Makefile entries | Problem Details:
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> | ```diff
diff --git a/sound/soc/codecs/Makefile b/sound/soc/codecs/Makefile
index b328f293be65..c0fd3c86edad 100644
--- a/sound/soc/codecs/Makefile
+++ b/sound/soc/codecs/Makefile
@@ -96,11 +96,11 @@ obj-$(CONFIG_SND_SOC_WM8776) += snd-soc-wm8776.o
obj-$(CONFIG_SND_SOC_WM8900) += snd-soc-wm8900.o
obj-$(CONFIG_SND_SOC_... |
f2eeeae06a41d4f9c90f8382cc0ef1d35888d09a | Analyze and fix the following issue in the Linux kernel code: OMAP3: serial - fix bug introduced in | Problem Details:
Commit f62349ee9788b1d94c55eb6c291d74a1f69bdd9e had side effect that
causes kernel to oops when we are suspending to ram:
# echo mem > /sys/power/state
WARNING: at kernel/irq/manage.c:858 __free_irq+0x90/0x174()
Trying to free already-free IRQ 72
Modules linked in:
Backtrace:
[<c00328d0>] (dump... | ```diff
diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c
index 39b797bc14d6..19805a7de06c 100644
--- a/arch/arm/mach-omap2/serial.c
+++ b/arch/arm/mach-omap2/serial.c
@@ -640,12 +640,9 @@ void __init omap_serial_early_init(void)
uart->num = i;
p->private_data = uart;
uart->p = p;
- lis... |
ebeb53e1e1f11a51d8a93843a437f516e3528bfa | Analyze and fix the following issue in the Linux kernel code: mfd: twl: fix twl4030 rename for remaining driver, board files | Problem Details:
Recent drivers/mfd/twl4030* renames to twl broke compile for
various boards as the series was missing a patch to change
the board-*.c files.
This patch renames include twl4030.h to include twl.h
and also renames twl4030_i2c_ routines.
Signed-off-by: Balaji T K <balajitk@ti.com>
Acked-by: Mark Brown <... | ```diff
diff --git a/arch/arm/mach-omap2/board-cm-t35.c b/arch/arm/mach-omap2/board-cm-t35.c
index 1591aae64500..2626a9f8a73a 100644
--- a/arch/arm/mach-omap2/board-cm-t35.c
+++ b/arch/arm/mach-omap2/board-cm-t35.c
@@ -29,7 +29,7 @@
#include <linux/gpio.h>
#include <linux/i2c/at24.h>
-#include <linux/i2c/twl4030.h>... |
c46c0e9188685c0276b4c0adf9fb7e903937e35b | Analyze and fix the following issue in the Linux kernel code: hwmon: (w83627hf) Fix for "No such device" | Problem Details:
The commit b72656dbc491484765776a16eeb55ef2e90efea6 introduced
a bug leading to the w83627hf_find function no longer finding
any chips.
Signed-off-by: Christian Schulte <cs@schulte.it>
Signed-off-by: Jean Delvare <khali@linux-fr.org> | ```diff
diff --git a/drivers/hwmon/w83627hf.c b/drivers/hwmon/w83627hf.c
index b257c7223733..38e280523071 100644
--- a/drivers/hwmon/w83627hf.c
+++ b/drivers/hwmon/w83627hf.c
@@ -1135,6 +1135,7 @@ static int __init w83627hf_find(int sioaddr, unsigned short *addr,
"W83687THF",
};
+ sio_data->sioaddr = sioaddr;
... |
4235f684b66d6f00d2cd8849c884cf8f8b57ecad | Analyze and fix the following issue in the Linux kernel code: hwmon: (sht15) Off-by-one error in array index + incorrect constants | Problem Details:
Fix an off-by-one error in array index + incorrect constants.
Signed-off-by: Christoph Walser <walser@tik.ee.ethz.ch>
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Jean Delvare <khali@linux-fr.org> | ```diff
diff --git a/drivers/hwmon/sht15.c b/drivers/hwmon/sht15.c
index ebe38b680ee3..864a371f6eb9 100644
--- a/drivers/hwmon/sht15.c
+++ b/drivers/hwmon/sht15.c
@@ -305,7 +305,7 @@ static inline int sht15_calc_temp(struct sht15_data *data)
int d1 = 0;
int i;
- for (i = 1; i < ARRAY_SIZE(temppoints) - 1; i++)
+ ... |
61cf693159d6a968a7014e24905143f71ed8ddcf | Analyze and fix the following issue in the Linux kernel code: [sysctl] Fix breakage on systems with older glibc | Problem Details:
As predicted during code review, the sysctl(2) changes made systems with
old glibc nearly unusable. About every command gives a:
warning: process `ls' used the deprecated sysctl system call with 1.4
warning in the log.
I see this on a SUSE 10.0 system with glibc 2.3.5.
Don't warn for this common... | ```diff
diff --git a/kernel/sysctl_binary.c b/kernel/sysctl_binary.c
index b75dbf40f573..112533d5fc08 100644
--- a/kernel/sysctl_binary.c
+++ b/kernel/sysctl_binary.c
@@ -1399,6 +1399,13 @@ static void deprecated_sysctl_warning(const int *name, int nlen)
{
int i;
+ /*
+ * CTL_KERN/KERN_VERSION is used by older gl... |
a7a5ac58df0832daf7774b083c33032a7d26c792 | Analyze and fix the following issue in the Linux kernel code: PCMCIA: fix pxa2xx_lubbock modular build error | Problem Details:
Commit d0d26c33b63c7ec10c3fdf9c7ce0aa035f0b3200 broke the driver by
propagating a pointer to the platform_device where a pointer to the
generic device was expected, leading to a spectacular crash...
Signed-off-by: Marc Zyngier <maz@misterjones.org>
Acked-by: Dominik Brodowski <linux@dominikbrodowski.n... | ```diff
diff --git a/drivers/pcmcia/pxa2xx_base.c b/drivers/pcmcia/pxa2xx_base.c
index 3aabf1e37988..76e640bccde8 100644
--- a/drivers/pcmcia/pxa2xx_base.c
+++ b/drivers/pcmcia/pxa2xx_base.c
@@ -291,7 +291,7 @@ static int pxa2xx_drv_pcmcia_probe(struct platform_device *dev)
skt->nr = ops->first + i;
skt->ops = op... |
3fc98b1ac036675b95f6e3fafd5ef147b97d4d30 | Analyze and fix the following issue in the Linux kernel code: XFS: Free buffer pages array unconditionally | Problem Details:
The code in xfs_free_buf() only attempts to free the b_pages array if the
buffer is a page cache backed or page allocated buffer. The extra log buffer
that is used when the log wraps uses pages that are allocated to a different
log buffer, but it still has a b_pages array allocated when those pages
are... | ```diff
diff --git a/fs/xfs/linux-2.6/xfs_buf.c b/fs/xfs/linux-2.6/xfs_buf.c
index 162359b664ca..77b8be81c769 100644
--- a/fs/xfs/linux-2.6/xfs_buf.c
+++ b/fs/xfs/linux-2.6/xfs_buf.c
@@ -292,6 +292,7 @@ _xfs_buf_free_pages(
{
if (bp->b_pages != bp->b_page_array) {
kmem_free(bp->b_pages);
+ bp->b_pages = NULL;
... |
a5f9be58c2b87106100a6053d09b1f9f8d551c6e | Analyze and fix the following issue in the Linux kernel code: xfs: kill xfs_bmbt_rec_32/64 types | Problem Details:
For a long time we've always stored bmap btree records in the 64bit format,
so kill off the dead 32bit type, and make sure the 64bit type is named just
xfs_bmbt_rec everywhere, without any size postfix.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed... | ```diff
diff --git a/fs/xfs/xfs_bmap_btree.h b/fs/xfs/xfs_bmap_btree.h
index 5549d495947f..cf07ca7c22e7 100644
--- a/fs/xfs/xfs_bmap_btree.h
+++ b/fs/xfs/xfs_bmap_btree.h
@@ -46,20 +46,12 @@ typedef struct xfs_bmdr_block {
#define BMBT_STARTBLOCK_BITLEN 52
#define BMBT_BLOCKCOUNT_BITLEN 21
-
-#define BMBT_USE_64 1
... |
15293df82bd1c15196e7cb336130c243e9a41806 | Analyze and fix the following issue in the Linux kernel code: vgaarbiter: fix a typo in the vgaarbiter Documentation | Problem Details:
I detected a typo, while reading "Documentation/vgaarbiter.txt". Fix the
'fieldd' mispelling.
Signed-off-by: Detlef Riekenberg <wine.dev@web.de>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> | ```diff
diff --git a/Documentation/vgaarbiter.txt b/Documentation/vgaarbiter.txt
index 987f9b0a5ece..43a9b0694fdd 100644
--- a/Documentation/vgaarbiter.txt
+++ b/Documentation/vgaarbiter.txt
@@ -103,7 +103,7 @@ I.2 libpciaccess
----------------
To use the vga arbiter char device it was implemented an API inside the... |
bf8b4542f92c4d8222941b1cab055fa350ab2fb4 | Analyze and fix the following issue in the Linux kernel code: ACPI processor: Fix section mismatch for processor_add() | Problem Details:
Due to the merge of processor_start() (declared with __cpuinit) into
processor_add(), a section mismatch warning appears:
WARNING: drivers/built-in.o(.text+0x4d59d): Section mismatch in reference
from the function acpi_processor_add() to the function
.cpuinit.text:acpi_processor_power_init()
...
This... | ```diff
diff --git a/drivers/acpi/processor_core.c b/drivers/acpi/processor_core.c
index ecb2c5122040..709b590c2fb6 100644
--- a/drivers/acpi/processor_core.c
+++ b/drivers/acpi/processor_core.c
@@ -353,7 +353,7 @@ static int acpi_processor_info_open_fs(struct inode *inode, struct file *file)
PDE(inode)->data);
... |
b44b1126279b60597f96bbe77507b1650f88a969 | Analyze and fix the following issue in the Linux kernel code: xfs: check for not fully initialized inodes in xfs_ireclaim | Problem Details:
Add an assert for inodes not added to the inode cache in xfs_ireclaim,
to make sure we're not going to introduce something like the
famous nfsd inode cache bug again.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Alex Elder <aelder@sgi.com> | ```diff
diff --git a/fs/xfs/xfs_iget.c b/fs/xfs/xfs_iget.c
index f5c904a10c11..0de36c2a46f1 100644
--- a/fs/xfs/xfs_iget.c
+++ b/fs/xfs/xfs_iget.c
@@ -478,17 +478,21 @@ xfs_ireclaim(
{
struct xfs_mount *mp = ip->i_mount;
struct xfs_perag *pag;
+ xfs_agino_t agino = XFS_INO_TO_AGINO(mp, ip->i_ino);
XFS_STATS_I... |
70023de88c58a81a730ab4d13c51a30e537ec76e | Analyze and fix the following issue in the Linux kernel code: ACPI: Add a generic API for _OSC -v2 | Problem Details:
v2->v1:
.improve debug info as suggedted by Bjorn,Kenji
.API is using uuid string as suggested by Alexey
Add an API to execute _OSC. A lot of devices can have this method, so add a
generic API.
Signed-off-by: Shaohua Li <shaohua.li@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com> | ```diff
diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c
index 741191524353..12240be58f27 100644
--- a/drivers/acpi/bus.c
+++ b/drivers/acpi/bus.c
@@ -344,6 +344,128 @@ bool acpi_bus_can_wakeup(acpi_handle handle)
EXPORT_SYMBOL(acpi_bus_can_wakeup);
+static void acpi_print_osc_error(acpi_handle handle,
+ struc... |
53281b6d34d44308372d16acb7fb5327609f68b6 | Analyze and fix the following issue in the Linux kernel code: fasync: split 'fasync_helper()' into separate add/remove functions | Problem Details:
Yes, the add and remove cases do share the same basic loop and the
locking, but the compiler can inline and then CSE some of the end result
anyway. And splitting it up makes the code way easier to follow,
and makes it clearer exactly what the semantics are.
In particular, we must make sure that the F... | ```diff
diff --git a/fs/fcntl.c b/fs/fcntl.c
index 2cf93ec40a67..97e01dc0d95f 100644
--- a/fs/fcntl.c
+++ b/fs/fcntl.c
@@ -618,60 +618,90 @@ static DEFINE_RWLOCK(fasync_lock);
static struct kmem_cache *fasync_cache __read_mostly;
/*
- * fasync_helper() is used by almost all character device drivers
- * to set up th... |
5da9a0fb673a0ea0a093862f95f6b89b3390c31e | Analyze and fix the following issue in the Linux kernel code: sched: Fix select_task_rq() vs hotplug issues | Problem Details:
Since select_task_rq() is now responsible for guaranteeing
->cpus_allowed and cpu_active_mask, we need to verify this.
select_task_rq_rt() can blindly return
smp_processor_id()/task_cpu() without checking the valid masks,
select_task_rq_fair() can do the same in the rare case that all
SD_flags are dis... | ```diff
diff --git a/kernel/sched.c b/kernel/sched.c
index 63e55ac242d1..cc40bdadee7a 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -2317,6 +2317,43 @@ void task_oncpu_function_call(struct task_struct *p,
}
#ifdef CONFIG_SMP
+static int select_fallback_rq(int cpu, struct task_struct *p)
+{
+ int dest_cpu;
+ c... |
3802290628348674985d14914f9bfee7b9084548 | Analyze and fix the following issue in the Linux kernel code: sched: Fix sched_exec() balancing | Problem Details:
Since we access ->cpus_allowed without holding rq->lock we need
a retry loop to validate the result, this comes for near free
when we merge sched_migrate_task() into sched_exec() since that
already does the needed check.
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Mike Galbraith <efault... | ```diff
diff --git a/kernel/sched.c b/kernel/sched.c
index 33d7965f63f0..63e55ac242d1 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -2322,7 +2322,7 @@ void task_oncpu_function_call(struct task_struct *p,
*
* - fork, @p is stable because it isn't on the tasklist yet
*
- * - exec, @p is unstable XXX
+ * - ... |
e2912009fb7b715728311b0d8fe327a1432b3f79 | Analyze and fix the following issue in the Linux kernel code: sched: Ensure set_task_cpu() is never called on blocked tasks | Problem Details:
In order to clean up the set_task_cpu() rq dependencies we need
to ensure it is never called on blocked tasks because such usage
does not pair with consistent rq->lock usage.
This puts the migration burden on ttwu().
Furthermore we need to close a race against changing
->cpus_allowed, since select_ta... | ```diff
diff --git a/kernel/sched.c b/kernel/sched.c
index 1672823aabfe..33d7965f63f0 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -2018,22 +2018,15 @@ static inline void check_class_changed(struct rq *rq, struct task_struct *p,
*/
void kthread_bind(struct task_struct *p, unsigned int cpu)
{
- struct rq *rq ... |
e6c8fba7771563b2f3dfb96a78f36ec17e15bdf0 | Analyze and fix the following issue in the Linux kernel code: sched: Fix task_hot() test order | Problem Details:
Make sure not to access sched_fair fields before verifying it is
indeed a sched_fair task.
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Mike Galbraith <efault@gmx.de>
CC: stable@kernel.org
LKML-Reference: <20091216170517.577998058@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu> | ```diff
diff --git a/kernel/sched.c b/kernel/sched.c
index 9c30858b6463..1d8ca25dd6fb 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -2046,6 +2046,9 @@ task_hot(struct task_struct *p, u64 now, struct sched_domain *sd)
{
s64 delta;
+ if (p->sched_class != &fair_sched_class)
+ return 0;
+
/*
* Buddy candi... |
9ee349ad6d326df3633d43f54202427295999c47 | Analyze and fix the following issue in the Linux kernel code: sched: Fix set_cpu_active() in cpu_down() | Problem Details:
Sachin found cpu hotplug test failures on powerpc, which made
the kernel hang on his POWER box.
The problem is that we fail to re-activate a cpu when a
hot-unplug fails. Fix this by moving the de-activation into
_cpu_down after doing the initial checks.
Remove the synchronize_sched() calls and rely o... | ```diff
diff --git a/kernel/cpu.c b/kernel/cpu.c
index 291ac586f37f..1c8ddd6ee940 100644
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
@@ -209,6 +209,7 @@ static int __ref _cpu_down(unsigned int cpu, int tasks_frozen)
return -ENOMEM;
cpu_hotplug_begin();
+ set_cpu_active(cpu, false);
err = __raw_notifier_call_chain(&c... |
9634a627b330fcc7cdca25df4d7853ca9c7745de | Analyze and fix the following issue in the Linux kernel code: tc1100-wmi - add error handling for device registration | Problem Details:
Any of the platform API functions can fail; driver should be prepared
to handle such failures. Also:
- changed to platform_driver_probe() since the device is created
right there with the driver;
- added __devexit annotation to remove method;
- fixed memory leak on module unload - named platform_... | ```diff
diff --git a/drivers/platform/x86/tc1100-wmi.c b/drivers/platform/x86/tc1100-wmi.c
index 0d53d5166574..fa2995bfa1d9 100644
--- a/drivers/platform/x86/tc1100-wmi.c
+++ b/drivers/platform/x86/tc1100-wmi.c
@@ -47,22 +47,6 @@ MODULE_DESCRIPTION("HP Compaq TC1100 Tablet WMI Extras");
MODULE_LICENSE("GPL");
MODULE_... |
de078e5747fa3a95efac04fd6725dcceb4520416 | Analyze and fix the following issue in the Linux kernel code: msi-wmi: depend on backlight and fix corner-cases problems | Problem Details:
Now depends on BACKLIGHT_CLASS_DEVICE.
Driver will return an error if it can't get actual backlight value
Fix remapping of brightness keys when backlight is not controlled by ACPI.
Signed-off-by: Anisse Astier <anisse@astier.eu>
Signed-off-by: Len Brown <len.brown@intel.com> | ```diff
diff --git a/drivers/platform/x86/Kconfig b/drivers/platform/x86/Kconfig
index 1f82d6df96e1..a006dec3b3ef 100644
--- a/drivers/platform/x86/Kconfig
+++ b/drivers/platform/x86/Kconfig
@@ -369,6 +369,7 @@ config MSI_WMI
tristate "MSI WMI extras"
depends on ACPI_WMI
depends on INPUT
+ depends on BACKLIGHT_CL... |
822ddc042a12aa2a8c2030ad4ebc660bc0e66c3f | Analyze and fix the following issue in the Linux kernel code: msi-wmi: remove custom runtime debug implementation | Problem Details:
Rely on DYNAMIC_DEBUG instead if needed
Signed-off-by: Anisse Astier <anisse@astier.eu>
Signed-off-by: Len Brown <len.brown@intel.com> | ```diff
diff --git a/drivers/platform/x86/msi-wmi.c b/drivers/platform/x86/msi-wmi.c
index dcb048c0793f..75e422b27531 100644
--- a/drivers/platform/x86/msi-wmi.c
+++ b/drivers/platform/x86/msi-wmi.c
@@ -31,10 +31,6 @@ MODULE_AUTHOR("Thomas Renninger <trenn@suse.de>");
MODULE_DESCRIPTION("MSI laptop WMI hotkeys driver"... |
f4c4176f21533e22bcc292030da72bcfa105f5b8 | Analyze and fix the following issue in the Linux kernel code: perf events: Allow per-task-per-cpu counters | Problem Details:
In order to allow for per-task-per-cpu counters, useful for
scalability when profiling task hierarchies, we allow installing
events with event->cpu != -1 in task contexts.
__perf_event_sched_in() already skips events where ->cpu
mis-matches the current cpu, fix up __perf_install_in_context()
and __per... | ```diff
diff --git a/kernel/perf_event.c b/kernel/perf_event.c
index 0dd8e5d02c66..2e0aaa34fc7e 100644
--- a/kernel/perf_event.c
+++ b/kernel/perf_event.c
@@ -782,6 +782,9 @@ static void __perf_install_in_context(void *info)
add_event_to_ctx(event, ctx);
+ if (event->cpu != -1 && event->cpu != smp_processor_id())... |
96b47b65594fe2365f73aede060cb5203561fed3 | Analyze and fix the following issue in the Linux kernel code: drm/i915: fix order of fence release wrt flushing | Problem Details:
i915_gem_object_unbind had the ordering wrong. The other user,
i915_gem_object_put_fence_reg already has the correct ordering.
Results was usually corrupted pixmaps, especially garbled font glyphs
after a suspend/resume (because this evicts everything).
I'm still waiting for the feedback from the bug... | ```diff
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 8c463cf2050a..9e81a0ddafac 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -2021,9 +2021,6 @@ i915_gem_object_unbind(struct drm_gem_object *obj)
/* blow away mappings if mapped through GT... |
e9496ff46a20a8592fdc7bdaaf41b45eb808d310 | Analyze and fix the following issue in the Linux kernel code: fix mismerge with Trond's stuff (create_mnt_ns() export is gone now) | Problem Details:
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> | ```diff
diff --git a/fs/namespace.c b/fs/namespace.c
index 7d70d63ceb29..faab1273281e 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -2068,7 +2068,7 @@ struct mnt_namespace *copy_mnt_ns(unsigned long flags, struct mnt_namespace *ns,
* create_mnt_ns - creates a private namespace and adds a root filesystem
* @mn... |
306bb73d12f13684ffcd735838c3e6f7515ab626 | Analyze and fix the following issue in the Linux kernel code: fix the crap in dst/dcore | Problem Details:
* don't reinvent the wheels, please - open_bdev_exclusive() is there
for purpose
* both open_by_devnum() and open_bdev_exclusive() return ERR_PTR(...)
upon error, not NULL
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> | ```diff
diff --git a/drivers/staging/dst/dcore.c b/drivers/staging/dst/dcore.c
index fd5bd0ea1e0d..c83ca7e3d048 100644
--- a/drivers/staging/dst/dcore.c
+++ b/drivers/staging/dst/dcore.c
@@ -403,7 +403,7 @@ static void dst_node_cleanup(struct dst_node *n)
if (n->bdev) {
sync_blockdev(n->bdev);
- blkdev_put(n->b... |
6b18662e239a032f908b7f6e164bdf7e2e0a32c9 | Analyze and fix the following issue in the Linux kernel code: 9p connect fixes | Problem Details:
* if we fail in p9_conn_create(), we shouldn't leak references to struct file.
Logics in ->close() doesn't help - ->trans is already gone by the time it's
called.
* sock_create_kern() can fail.
* use of sock_map_fd() is all fscked up; I'd fixed most of that, but the
rest will have to wait for a b... | ```diff
diff --git a/net/9p/trans_fd.c b/net/9p/trans_fd.c
index 4dd873e3a1bb..be1cb909d8c0 100644
--- a/net/9p/trans_fd.c
+++ b/net/9p/trans_fd.c
@@ -42,6 +42,8 @@
#include <net/9p/client.h>
#include <net/9p/transport.h>
+#include <linux/syscalls.h> /* killme */
+
#define P9_PORT 564
#define MAX_SOCK_BUF (64*102... |
75b46c1321785c29cfbc4f839b6dc031428734ad | Analyze and fix the following issue in the Linux kernel code: ASoC: Fix disable of SPDIF on STAC9766 codec | Problem Details:
Change code so that switching to playing music through the analog output
disables SPDIF out instead of disabling it when stream ends.
Signed-off-by: Jon Smirl <jonsmirl@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> | ```diff
diff --git a/sound/soc/codecs/stac9766.c b/sound/soc/codecs/stac9766.c
index bbc72c2ddfca..81b8c9dfe7fc 100644
--- a/sound/soc/codecs/stac9766.c
+++ b/sound/soc/codecs/stac9766.c
@@ -191,6 +191,7 @@ static int ac97_analog_prepare(struct snd_pcm_substream *substream,
vra = stac9766_ac97_read(codec, AC97_EXTEND... |
125c4fad1e60751ceaab1ee2a73bddf31213e5ca | Analyze and fix the following issue in the Linux kernel code: perf report: Fix cut'n'paste error recently introduced | Problem Details:
Introduced in:
d599db3fc5dd4f1e8432fdbc6d899584b25f4dff
"perf report: Generalize perf_session__fprintf_hists()"
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Frédéric Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Pau... | ```diff
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
index c4f3a08f7c48..cf1d370f51cb 100644
--- a/tools/perf/builtin-report.c
+++ b/tools/perf/builtin-report.c
@@ -186,7 +186,7 @@ static int sample_type_check(struct perf_session *session)
static struct perf_event_ops event_ops = {
.process... |
2ce4d4c937ce4c14704f02ae60e2e07e3906c68a | Analyze and fix the following issue in the Linux kernel code: gru: fix GRU interrupt race at deallocate | Problem Details:
Fix a race where an interrupt could be received for a GRU context that has
been deallocated.
Signed-off-by: Jack Steiner <steiner@sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | ```diff
diff --git a/drivers/misc/sgi-gru/grufault.c b/drivers/misc/sgi-gru/grufault.c
index 929d6073e600..6ff6dfb7516d 100644
--- a/drivers/misc/sgi-gru/grufault.c
+++ b/drivers/misc/sgi-gru/grufault.c
@@ -360,7 +360,8 @@ static void gru_preload_tlb(struct gru_state *gru,
* < 0 = error code
*
*/
-static int gr... |
0cd2b0813aac660f5f7a6574083157a70c152dd5 | Analyze and fix the following issue in the Linux kernel code: gru: fix bug in allocation of kernel contexts | Problem Details:
Fix a bug in the assignment of GRU contexts used for kernel functions. If
a sleep occurs on the wait for a semaphore, the thread could switch cpus
and allocate resources on the wrong blade.
Signed-off-by: Jack Steiner <steiner@sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-o... | ```diff
diff --git a/drivers/misc/sgi-gru/grukservices.c b/drivers/misc/sgi-gru/grukservices.c
index c13342dda5fd..bfbf8fdbcd37 100644
--- a/drivers/misc/sgi-gru/grukservices.c
+++ b/drivers/misc/sgi-gru/grukservices.c
@@ -221,13 +221,21 @@ static int gru_free_kernel_contexts(void)
static struct gru_blade_state *gru_l... |
1848a710287b33a92c3c5b2f4c3ae201a879eb7e | Analyze and fix the following issue in the Linux kernel code: gru: fix bug in exception handling | Problem Details:
Fix a GRU driver bug converting a CBR address to the context that contains
the CBR. The conversion is rarely done so performance does not matter.
Signed-off-by: Jack Steiner <steiner@sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-founda... | ```diff
diff --git a/drivers/misc/sgi-gru/grukservices.c b/drivers/misc/sgi-gru/grukservices.c
index d9ff0289a1c3..c13342dda5fd 100644
--- a/drivers/misc/sgi-gru/grukservices.c
+++ b/drivers/misc/sgi-gru/grukservices.c
@@ -97,9 +97,6 @@
#define ASYNC_HAN_TO_BID(h) ((h) - 1)
#define ASYNC_BID_TO_HAN(b) ((b) + 1)
#def... |
563447d7eb04c9b382f90a132be126a21a635647 | Analyze and fix the following issue in the Linux kernel code: gru: add additional GRU statistics | Problem Details:
Add additional GRU statistics & debug messages.
Signed-off-by: Jack Steiner <steiner@sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | ```diff
diff --git a/drivers/misc/sgi-gru/grufault.c b/drivers/misc/sgi-gru/grufault.c
index a78aa798d50b..7d757e9c42f0 100644
--- a/drivers/misc/sgi-gru/grufault.c
+++ b/drivers/misc/sgi-gru/grufault.c
@@ -303,7 +303,7 @@ static int gru_try_dropin(struct gru_thread_state *gts,
struct gru_tlb_fault_handle *tfh,
... |
67bf04a5c2574e9495f660f418f6df776821d578 | Analyze and fix the following issue in the Linux kernel code: gru: fix prefetch and speculation bugs | Problem Details:
Fix several bugs related to prefetch, ordering & speculation:
- GRU cch_allocate() instruction causes cacheable memory
to be created. Add a barriers to prevent speculation
from prefetching data before it exists.
- Add memory barriers before cache-flush instructions to ensure
that previously... | ```diff
diff --git a/drivers/misc/sgi-gru/gru_instructions.h b/drivers/misc/sgi-gru/gru_instructions.h
index e033b6ce4a3f..32f358d9f429 100644
--- a/drivers/misc/sgi-gru/gru_instructions.h
+++ b/drivers/misc/sgi-gru/gru_instructions.h
@@ -325,6 +325,7 @@ static inline void gru_flush_cache(void *p)
static inline void g... |
e006043a4d2da52bba9fd9cb7e5a22e2951ff69b | Analyze and fix the following issue in the Linux kernel code: gru: check for valid vma | Problem Details:
Fix bug caused by failure to allocate a GRU gts structure. The old code
failed to handle the case where the vma was invalid.
Signed-off-by: Jack Steiner <steiner@sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | ```diff
diff --git a/drivers/misc/sgi-gru/grufault.c b/drivers/misc/sgi-gru/grufault.c
index ada7df7e0968..7466234450f3 100644
--- a/drivers/misc/sgi-gru/grufault.c
+++ b/drivers/misc/sgi-gru/grufault.c
@@ -90,19 +90,22 @@ static struct gru_thread_state *gru_alloc_locked_gts(unsigned long vaddr)
{
struct mm_struct *... |
b8229bedd1f39799dc83d5c0dad0bd9cd3e5f44c | Analyze and fix the following issue in the Linux kernel code: gru: add debug option for cache flushing | Problem Details:
Add a debug option to the SGI GRU driver for flushing GRU cache lines from
memory. In theory this is not needed but it is useful for debugging.
This has no use by end users.
Signed-off-by: Jack Steiner <steiner@sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Tor... | ```diff
diff --git a/drivers/misc/sgi-gru/grukdump.c b/drivers/misc/sgi-gru/grukdump.c
index 55eabfa85585..9b2062d17327 100644
--- a/drivers/misc/sgi-gru/grukdump.c
+++ b/drivers/misc/sgi-gru/grukdump.c
@@ -44,7 +44,8 @@ static int gru_user_copy_handle(void __user **dp, void *s)
static int gru_dump_context_data(void... |
7f2251b1bcdd3d2971b2fde3008b270ea11b8780 | Analyze and fix the following issue in the Linux kernel code: gru: handle failures to mmu_notifier_register | Problem Details:
Under some conditions, mmu_notifier_register() will fail to register a
mmu_notifier. Fix the GRU driver to correctly handle these failures.
Signed-off-by: Jack Steiner <steiner@sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.o... | ```diff
diff --git a/drivers/misc/sgi-gru/grufault.c b/drivers/misc/sgi-gru/grufault.c
index 9470303a9cb9..ada7df7e0968 100644
--- a/drivers/misc/sgi-gru/grufault.c
+++ b/drivers/misc/sgi-gru/grufault.c
@@ -96,7 +96,7 @@ static struct gru_thread_state *gru_alloc_locked_gts(unsigned long vaddr)
vma = gru_find_vma(vadd... |
f2965d68b6775290218ff2a040e64c8b40556280 | Analyze and fix the following issue in the Linux kernel code: gru: fix bug in module unload | Problem Details:
Fix bug in module unload. Previous code was not correctly deleting the
files in /proc.
Signed-off-by: Jack Steiner <steiner@sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | ```diff
diff --git a/drivers/misc/sgi-gru/gruprocfs.c b/drivers/misc/sgi-gru/gruprocfs.c
index a8a2e760cca3..4f6fc11a2637 100644
--- a/drivers/misc/sgi-gru/gruprocfs.c
+++ b/drivers/misc/sgi-gru/gruprocfs.c
@@ -351,7 +351,7 @@ static void delete_proc_files(void)
for (p = proc_files; p->name; p++)
if (p->entry)
... |
b61fc69bb61838e99b368d208e6e2ee363eba2a1 | Analyze and fix the following issue in the Linux kernel code: gru: fix istatus race in GRU tlb dropin | Problem Details:
TLB dropins require updates to the CBR instruction istatus field. This is
needed to resolve race conditions in the chip.
The code currently uses the user address of the CBR. This works but opens
up additional endcases related to stealing of contexts and accessing the
CBR from tasks that do not have ... | ```diff
diff --git a/drivers/misc/sgi-gru/grufault.c b/drivers/misc/sgi-gru/grufault.c
index 2605edfbaebe..a9f0cf483005 100644
--- a/drivers/misc/sgi-gru/grufault.c
+++ b/drivers/misc/sgi-gru/grufault.c
@@ -122,22 +122,11 @@ static void gru_unlock_gts(struct gru_thread_state *gts)
* is necessary to prevent the user f... |
046d6c563b1c6226bbf0f84e5b2413ad8ab921a1 | Analyze and fix the following issue in the Linux kernel code: x86: uv: XPC receive message reuse triggers invalid BUG_ON() | Problem Details:
This was a difficult bug to trip. XPC was in the middle of sending an
acknowledgement for a received message.
In xpc_received_payload_uv():
.
ret = xpc_send_gru_msg(ch->sn.uv.cached_notify_gru_mq_desc, msg,
sizeof(struct xpc_notify_mq_msghdr_uv));
if (re... | ```diff
diff --git a/drivers/misc/sgi-xp/xpc_uv.c b/drivers/misc/sgi-xp/xpc_uv.c
index 241ea5f01aaa..d2f4e9121f93 100644
--- a/drivers/misc/sgi-xp/xpc_uv.c
+++ b/drivers/misc/sgi-xp/xpc_uv.c
@@ -1428,7 +1428,6 @@ xpc_handle_notify_mq_msg_uv(struct xpc_partition *part,
msg_slot = ch_uv->recv_msg_slots +
(msg->hd... |
15b87d67ff3dc042bee42f991858d6b121b3b3ca | Analyze and fix the following issue in the Linux kernel code: x86: uv: xpc NULL deref when mesq becomes empty | Problem Details:
Under heavy load conditions, our set of xpc messages may become exhausted.
The code handles this correctly with the exception of the management code
which hits a NULL pointer dereference.
Signed-off-by: Robin Holt <holt@sgi.com>
Cc: Jack Steiner <steiner@sgi.com>
Cc: Ingo Molnar <mingo@elte.hu>
Signe... | ```diff
diff --git a/drivers/misc/sgi-xp/xpc_uv.c b/drivers/misc/sgi-xp/xpc_uv.c
index bbf0e2ee6fd9..19bd7b0ede91 100644
--- a/drivers/misc/sgi-xp/xpc_uv.c
+++ b/drivers/misc/sgi-xp/xpc_uv.c
@@ -949,11 +949,13 @@ xpc_get_fifo_entry_uv(struct xpc_fifo_head_uv *head)
head->first = first->next;
if (head->first == NU... |
729d69e6995fc4dea8ff70df256a7d4034a3d21d | Analyze and fix the following issue in the Linux kernel code: x86: uv: introduce a means to translate from gpa -> socket_paddr | Problem Details:
The UV BIOS has been updated to implement some of our interface
functionality differently than originally expected. These patches update
the kernel to the bios implementation and include a few minor bug fixes
which prevent us from doing significant testing on real hardware.
This patch:
For SGI UV sy... | ```diff
diff --git a/arch/x86/include/asm/uv/uv_hub.h b/arch/x86/include/asm/uv/uv_hub.h
index d1414af98559..0cc955f16aec 100644
--- a/arch/x86/include/asm/uv/uv_hub.h
+++ b/arch/x86/include/asm/uv/uv_hub.h
@@ -232,6 +232,19 @@ static inline unsigned long uv_gpa(void *v)
return uv_soc_phys_ram_to_gpa(__pa(v));
}
+... |
5fe878ae7f82fbf0830dbfaee4c5ca18f3aee442 | Analyze and fix the following issue in the Linux kernel code: direct-io: cleanup blockdev_direct_IO locking | Problem Details:
Currently the locking in blockdev_direct_IO is a mess, we have three
different locking types and very confusing checks for some of them. The
most complicated one is DIO_OWN_LOCKING for reads, which happens to not
actually be used.
This patch gets rid of the DIO_OWN_LOCKING - as mentioned above the re... | ```diff
diff --git a/fs/direct-io.c b/fs/direct-io.c
index 9f34bb9b1ecb..4012885d027f 100644
--- a/fs/direct-io.c
+++ b/fs/direct-io.c
@@ -53,13 +53,6 @@
*
* If blkfactor is zero then the user's request was aligned to the filesystem's
* blocksize.
- *
- * lock_type is DIO_LOCKING for regular files on direct-IO-na... |
23aee091d804efa8cc732a31c1ae5d625e1ec886 | Analyze and fix the following issue in the Linux kernel code: dio: don't zero out the pages array inside struct dio | Problem Details:
Intel reported a performance regression caused by the following commit:
commit 848c4dd5153c7a0de55470ce99a8e13a63b4703f
Author: Zach Brown <zach.brown@oracle.com>
Date: Mon Aug 20 17:12:01 2007 -0700
dio: zero struct dio with kzalloc instead of manually
This patch uses kzalloc to zero all ... | ```diff
diff --git a/fs/direct-io.c b/fs/direct-io.c
index b912270942fa..9f34bb9b1ecb 100644
--- a/fs/direct-io.c
+++ b/fs/direct-io.c
@@ -104,6 +104,18 @@ struct dio {
unsigned cur_page_len; /* Nr of bytes at cur_page_offset */
sector_t cur_page_block; /* Where it starts */
+ /* BIO completion state */
+ spinlo... |
ac2b3e67dd59b8c6ef8c199641444c6ea03535a6 | Analyze and fix the following issue in the Linux kernel code: dma-mapping: fix off-by-one error in dma_capable() | Problem Details:
dma_mask is, when interpreted as address, the last valid byte, and hence
comparison msut also be done using the last valid of the buffer in
question.
Also fix the open-coded instances in lib/swiotlb.c.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Cc: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp... | ```diff
diff --git a/arch/ia64/include/asm/dma-mapping.h b/arch/ia64/include/asm/dma-mapping.h
index 8d3c79cd81e7..7d09a09cdaad 100644
--- a/arch/ia64/include/asm/dma-mapping.h
+++ b/arch/ia64/include/asm/dma-mapping.h
@@ -73,7 +73,7 @@ static inline bool dma_capable(struct device *dev, dma_addr_t addr, size_t size)
... |
d4212093dca95c1f52197017d969cc66d5d962aa | Analyze and fix the following issue in the Linux kernel code: ipc/sem.c: sem preempt improve | Problem Details:
The strange sysv semaphore wakeup scheme has a kind of busy-wait lock
involved, which could deadlock if preemption is enabled during the "lock".
It is an implementation detail (due to a spinlock being held) that this is
actually the case. However if "spinlocks" are made preemptible, or if the
sem loc... | ```diff
diff --git a/ipc/sem.c b/ipc/sem.c
index d377b3adfc3d..2705fbbc4374 100644
--- a/ipc/sem.c
+++ b/ipc/sem.c
@@ -398,6 +398,27 @@ undo:
return result;
}
+/*
+ * Wake up a process waiting on the sem queue with a given error.
+ * The queue is invalid (may not be accessed) after the function returns.
+ */
+stat... |
7d6feeb287c61aafa88f06345387b1188edf4b86 | Analyze and fix the following issue in the Linux kernel code: ipc ns: fix memory leak (idr) | Problem Details:
We have apparently had a memory leak since
7ca7e564e049d8b350ec9d958ff25eaa24226352 "ipc: store ipcs into IDRs" in
2007. The idr of which 3 exist for each ipc namespace is never freed.
This patch simply frees them when the ipcns is freed. I don't believe any
idr_remove() are done from rcu (and could... | ```diff
diff --git a/ipc/msg.c b/ipc/msg.c
index 085bd58f2f07..af42ef8900a6 100644
--- a/ipc/msg.c
+++ b/ipc/msg.c
@@ -125,6 +125,7 @@ void msg_init_ns(struct ipc_namespace *ns)
void msg_exit_ns(struct ipc_namespace *ns)
{
free_ipcs(ns, &msg_ids(ns), freeque);
+ idr_destroy(&ns->ids[IPC_MSG_IDS].ipcs_idr);
}
#end... |
dd34200adc01c5217ef09b55905b5c2312d65535 | Analyze and fix the following issue in the Linux kernel code: signals: send_signal: use si_fromuser() to detect from_ancestor_ns | Problem Details:
Change send_signal() to use si_fromuser(). From now SEND_SIG_NOINFO
triggers the "from_ancestor_ns" check.
This fixes reparent_thread()->group_send_sig_info(pdeath_signal)
behaviour, before this patch send_signal() does not detect the
cross-namespace case when the child of the dying parent belongs to... | ```diff
diff --git a/kernel/signal.c b/kernel/signal.c
index a0ba428954b6..b65879d4e08f 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -960,9 +960,8 @@ static int send_signal(int sig, struct siginfo *info, struct task_struct *t,
int from_ancestor_ns = 0;
#ifdef CONFIG_PID_NS
- if (!is_si_special(info) && SI... |
2f0edac5555983dc28033acce8a355f588fd01b2 | Analyze and fix the following issue in the Linux kernel code: ptrace: change tracehook_report_syscall_exit() to handle stepping | Problem Details:
Suggested by Roland.
Change tracehook_report_syscall_exit() to look at step flag and send the
trap signal if needed.
This change affects ia64, microblaze, parisc, powerpc, sh. They pass
nonzero "step" argument to tracehook but since it was ignored the tracee
reports via ptrace_notify(), this is not ... | ```diff
diff --git a/include/linux/tracehook.h b/include/linux/tracehook.h
index 1eb44a924e56..10db0102a890 100644
--- a/include/linux/tracehook.h
+++ b/include/linux/tracehook.h
@@ -134,6 +134,13 @@ static inline __must_check int tracehook_report_syscall_entry(
*/
static inline void tracehook_report_syscall_exit(st... |
6580807da14c423f0d0a708108e6df6ebc8bc83d | Analyze and fix the following issue in the Linux kernel code: ptrace: copy_process() should disable stepping | Problem Details:
If the tracee calls fork() after PTRACE_SINGLESTEP, the forked child
starts with TIF_SINGLESTEP/X86_EFLAGS_TF bits copied from ptraced parent.
This is not right, especially when the new child is not auto-attaced: in
this case it is killed by SIGTRAP.
Change copy_process() to call user_disable_single_s... | ```diff
diff --git a/kernel/fork.c b/kernel/fork.c
index b6cbd33dde80..202a0ba63d3c 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -1210,9 +1210,10 @@ static struct task_struct *copy_process(unsigned long clone_flags,
p->sas_ss_sp = p->sas_ss_size = 0;
/*
- * Syscall tracing should be turned off in the child... |
9ab322caa347c4b580bcaf08f2253ea4cbd9e9ad | Analyze and fix the following issue in the Linux kernel code: memcg: remove memcg_tasklist | Problem Details:
memcg_tasklist was introduced at commit 7f4d454d(memcg: avoid deadlock
caused by race between oom and cpuset_attach) instead of cgroup_mutex to
fix a deadlock problem. The cgroup_mutex, which was removed by the
commit, in mem_cgroup_out_of_memory() was originally introduced at commit
c7ba5c9e (Memory ... | ```diff
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index a294b7576070..1aff6c3fcbd8 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -55,7 +55,6 @@ static int really_do_swap_account __initdata = 1; /* for remember boot option*/
#define do_swap_account (0)
#endif
-static DEFINE_MUTEX(memcg_tasklist); /* ca... |
d31f56dbf8bafaacb0c617f9a6f137498d5c7aed | Analyze and fix the following issue in the Linux kernel code: memcg: avoid oom-killing innocent task in case of use_hierarchy | Problem Details:
task_in_mem_cgroup(), which is called by select_bad_process() to check
whether a task can be a candidate for being oom-killed from memcg's limit,
checks "curr->use_hierarchy"("curr" is the mem_cgroup the task belongs
to).
But this check return true(it's false positive) when:
<some path>/aa use_hier... | ```diff
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 6273984f2e34..a294b7576070 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -760,7 +760,13 @@ int task_in_mem_cgroup(struct task_struct *task, const struct mem_cgroup *mem)
task_unlock(task);
if (!curr)
return 0;
- if (curr->use_hierarchy)
+ /*
+ ... |
d8046582d5ee24448800e71c6933fdb6813aa062 | Analyze and fix the following issue in the Linux kernel code: memcg: make memcg's file mapped consistent with global VM | Problem Details:
In global VM, FILE_MAPPED is used but memcg uses MAPPED_FILE. This makes
grep difficult. Replace memcg's MAPPED_FILE with FILE_MAPPED
And in global VM, mapped shared memory is accounted into FILE_MAPPED.
But memcg doesn't. fix it.
Note:
page_is_file_cache() just checks SwapBacked or not.
So, we ... | ```diff
diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h
index 91300c972e76..0b46c2068b96 100644
--- a/include/linux/memcontrol.h
+++ b/include/linux/memcontrol.h
@@ -122,7 +122,7 @@ static inline bool mem_cgroup_disabled(void)
}
extern bool mem_cgroup_oom_called(struct task_struct *task);
-void... |
569b846df54ffb2827b83ce3244c5f032394cba4 | Analyze and fix the following issue in the Linux kernel code: memcg: coalesce uncharge during unmap/truncate | Problem Details:
In massive parallel enviroment, res_counter can be a performance
bottleneck. One strong techinque to reduce lock contention is reducing
calls by coalescing some amount of calls into one.
Considering charge/uncharge chatacteristic,
- charge is done one by one via demand-paging.
- uncharge is done by... | ```diff
diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h
index bf9213b2db8f..91300c972e76 100644
--- a/include/linux/memcontrol.h
+++ b/include/linux/memcontrol.h
@@ -54,6 +54,11 @@ extern void mem_cgroup_rotate_lru_list(struct page *page, enum lru_list lru);
extern void mem_cgroup_del_lru(struct p... |
cd9b45b78a61e8df250e69385c74e729e5b66abf | Analyze and fix the following issue in the Linux kernel code: memcg: fix memory.memsw.usage_in_bytes for root cgroup | Problem Details:
A memory cgroup has a memory.memsw.usage_in_bytes file. It shows the sum
of the usage of pages and swapents in the cgroup. Presently the root
cgroup's memsw.usage_in_bytes shows the wrong value - the number of
swapents are not added.
So take MEM_CGROUP_STAT_SWAPOUT into account.
Signed-off-by: Kiri... | ```diff
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index e0c2066495e3..7b5b108c1c6b 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -2542,6 +2542,7 @@ static u64 mem_cgroup_read(struct cgroup *cont, struct cftype *cft)
val += idx_val;
mem_cgroup_get_recursive_idx_stat(mem,
MEM_CGROUP_STAT_SWAPOUT... |
e3c96f53ac132743fda1384910feb863a2eab916 | Analyze and fix the following issue in the Linux kernel code: reiserfs: don't compile procfs.o at all if no support | Problem Details:
* small define cleanup in header
* fix #ifdeffery in procfs.c via Kconfig
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | ```diff
diff --git a/fs/reiserfs/Makefile b/fs/reiserfs/Makefile
index 6a9e30c041dd..792b3cb2cd18 100644
--- a/fs/reiserfs/Makefile
+++ b/fs/reiserfs/Makefile
@@ -7,7 +7,11 @@ obj-$(CONFIG_REISERFS_FS) += reiserfs.o
reiserfs-objs := bitmap.o do_balan.o namei.o inode.o file.o dir.o fix_node.o \
super.o prints.o obj... |
7bf0dc9b0ca9e9b6524b1f70e0898c7f11eb10be | Analyze and fix the following issue in the Linux kernel code: ext2: avoid WARN() messages when failing to write to the superblock | Problem Details:
This fixes a common warning reported by kerneloops.org
[Kernel summit hacking hour]
[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
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 1388802b7803..f9cb54a585ce 100644
--- a/fs/ext2/super.c
+++ b/fs/ext2/super.c
@@ -1105,9 +1105,30 @@ failed_sbi:
return ret;
}
+static void ext2_clear_super_error(struct super_block *sb)
+{
+ struct buffer_head *sbh = EXT2_SB(sb)->s_sbh;
+
+ if (buffer_w... |
5116fa2b3a0a3ec625a10445ae45667f094c125b | Analyze and fix the following issue in the Linux kernel code: pnpbios: convert to seq_file | Problem Details:
Convert code away from ->read_proc/->write_proc interfaces. Switch to
proc_create()/proc_create_data() which make addition of proc entries
reliable wrt NULL ->proc_fops, NULL ->data and so on.
Problem with ->read_proc et al is described here commit
786d7e1612f0b0adb6046f19b906609e4fe8b1ba "Fix rmmod/... | ```diff
diff --git a/drivers/pnp/pnpbios/proc.c b/drivers/pnp/pnpbios/proc.c
index b35d921bac6e..2d8ac43f78e8 100644
--- a/drivers/pnp/pnpbios/proc.c
+++ b/drivers/pnp/pnpbios/proc.c
@@ -24,6 +24,7 @@
#include <linux/types.h>
#include <linux/proc_fs.h>
#include <linux/pnp.h>
+#include <linux/seq_file.h>
#include <l... |
cfbd646fe060f70fe6618be2f9c25f739c067e29 | Analyze and fix the following issue in the Linux kernel code: intelfb: fix setting of active pipe with LVDS displays | Problem Details:
The intelfb driver sets color map depending on currently active pipe.
However, if an LVDS display is attached (like in laptop) the active pipe
variable is never set. The default value is PIPE_A and can be wrong. Set
up the pipe variable during driver initialization after hardware state was
read.
Als... | ```diff
diff --git a/drivers/video/intelfb/intelfbdrv.c b/drivers/video/intelfb/intelfbdrv.c
index 0cafd642fbc0..5ba399991050 100644
--- a/drivers/video/intelfb/intelfbdrv.c
+++ b/drivers/video/intelfb/intelfbdrv.c
@@ -874,6 +874,9 @@ static int __devinit intelfb_pci_register(struct pci_dev *pdev,
if (bailearly == 18... |
8c651311a3a08c1e4815de6933e00a760e498dae | Analyze and fix the following issue in the Linux kernel code: matroxfb: fix problems with display stability | Problem Details:
Regression caused in 2.6.23 and then despite repeated requests never fixed
or dealt with (Petr promised to sort it in 2008 but seems to have
forgotten).
Enough is enough - remove the problem line that was added. If it upsets
someone they've had two years to deal with it and at the very least it'll
ra... | ```diff
diff --git a/drivers/video/matrox/g450_pll.c b/drivers/video/matrox/g450_pll.c
index 09f6e045d5be..c15f8a57498e 100644
--- a/drivers/video/matrox/g450_pll.c
+++ b/drivers/video/matrox/g450_pll.c
@@ -368,7 +368,8 @@ static int __g450_setclk(struct matrox_fb_info *minfo, unsigned int fout,
M1064_XDVICLKCTRL... |
8130b3b9e6773367b44a19b504bb7c0c23e81a0e | Analyze and fix the following issue in the Linux kernel code: drivers/video/via/viafbdev.c: fix oops with no /proc | Problem Details:
Fixed a typo: missing *. This would lead to a kernel oops if the kernel
was compiled without support for the /proc file system.
Found with a static checker. Compile tested.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Joseph Cha... | ```diff
diff --git a/drivers/video/via/viafbdev.c b/drivers/video/via/viafbdev.c
index 56ec696e8afa..10d8c4b4baeb 100644
--- a/drivers/video/via/viafbdev.c
+++ b/drivers/video/via/viafbdev.c
@@ -1797,7 +1797,7 @@ static const struct file_operations viafb_vt1636_proc_fops = {
static void viafb_init_proc(struct proc_dir... |
2d72b11cd2f4f81d7f817c3795224061bcefdd9e | Analyze and fix the following issue in the Linux kernel code: sm501: fix use of old <asm/io.h> instead of <linux/io.h> | Problem Details:
Fix the old style use of <asm/io.h> by replacing it with <linux/io.h>.
Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Simtec Linux Team <linux@simtec.co.uk>
Cc: Vincent Sanders <vince@simtec.co.uk>
Cc: Krzysztof Helt <krzysztof.h1@poczta.fm>
Signed-off-by: Andrew Morton <akpm@linux-foundat... | ```diff
diff --git a/drivers/video/sm501fb.c b/drivers/video/sm501fb.c
index 95be9e90e8b8..d1c8ea83b41f 100644
--- a/drivers/video/sm501fb.c
+++ b/drivers/video/sm501fb.c
@@ -29,8 +29,8 @@
#include <linux/platform_device.h>
#include <linux/clk.h>
#include <linux/console.h>
+#include <linux/io.h>
-#include <asm/io.... |
d60f6c2ba86243a3bbc0c70508f71f84c5308f8e | Analyze and fix the following issue in the Linux kernel code: sm501: fix missing uses of resource_size() | Problem Details:
There are several places in the SM501 fb driver that could do with using
resource_size() to calculate the size of a resource.
Also fix a bug where request_mem_region() is being passed one too few
bytes when requesting the register memory region, which was causing the
following in /proc/iomem:
13e800... | ```diff
diff --git a/drivers/video/sm501fb.c b/drivers/video/sm501fb.c
index 924d79462780..95be9e90e8b8 100644
--- a/drivers/video/sm501fb.c
+++ b/drivers/video/sm501fb.c
@@ -1338,7 +1338,7 @@ static int sm501fb_start(struct sm501fb_info *info,
}
info->regs_res = request_mem_region(res->start,
- res->end ... |
b689a9e8362ed909045f99517b735c7c60835f7c | Analyze and fix the following issue in the Linux kernel code: i810fb: fix stack exploding | Problem Details:
Alan Cox has found that the i810fb function "uses a whopping 2.5K of stack".
Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Reported-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | ```diff
diff --git a/drivers/video/i810/i810_dvt.c b/drivers/video/i810/i810_dvt.c
index 27fa703a2e0a..b4b3670667ab 100644
--- a/drivers/video/i810/i810_dvt.c
+++ b/drivers/video/i810/i810_dvt.c
@@ -212,24 +212,29 @@ inline void round_off_yres(u32 *xres, u32 *yres)
*yres = (*xres * 3) >> 2;
}
-void i810fb_encode_r... |
2ec509b96cce5e6d19ee43fdd818eab78e76328d | Analyze and fix the following issue in the Linux kernel code: mb862xxfb: add acceleration support for Coral-P/Coral-PA. * imageblt * copyarea * fillrect | Problem Details:
[akpm@linux-foundation.org: clean up comments, remove do-nothing tests, use min()]
[akpm@linux-foundation.org: fix Alexandr's email address]
[akpm@linux-foundation.org: export mb862xxfb_init_accel]
Signed-off-by: Valentin Sitdikov <valentin.sitdikov@siemens.com>
Cc: Krzysztof Helt <krzysztof.h1@poczta.... | ```diff
diff --git a/drivers/video/mb862xx/Makefile b/drivers/video/mb862xx/Makefile
index 07664814bb1d..d7777714166b 100644
--- a/drivers/video/mb862xx/Makefile
+++ b/drivers/video/mb862xx/Makefile
@@ -2,4 +2,4 @@
# Makefile for the MB862xx framebuffer driver
#
-obj-$(CONFIG_FB_MB862XX) := mb862xxfb.o
+obj-$(CONFI... |
09335865c34c2e74c7ba0a2c7224e302e0f1a5d8 | Analyze and fix the following issue in the Linux kernel code: fbdev: bfin-t350mcqb-fb: fix LCD dimensions | Problem Details:
The height/width framebuffer members need to be set in millimeters so that
software can do proper scaling.
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Tor... | ```diff
diff --git a/drivers/video/bfin-t350mcqb-fb.c b/drivers/video/bfin-t350mcqb-fb.c
index 46cb07f61b0f..2549c53b26a0 100644
--- a/drivers/video/bfin-t350mcqb-fb.c
+++ b/drivers/video/bfin-t350mcqb-fb.c
@@ -487,8 +487,8 @@ static int __devinit bfin_t350mcqb_probe(struct platform_device *pdev)
fbinfo->var.nonstd... |
4efec6272e8e61fc77132b4d2bae56d61b289956 | Analyze and fix the following issue in the Linux kernel code: gpio: fix test on unsigned in lnw_irq_type() | Problem Details:
The wrong test was used, gpio is unsigned and it had an off-by-one.
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Cc: Alek Du <alek.du@intel.com>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundatio... | ```diff
diff --git a/drivers/gpio/langwell_gpio.c b/drivers/gpio/langwell_gpio.c
index 4baf3d7d0f8e..6c0ebbdc659e 100644
--- a/drivers/gpio/langwell_gpio.c
+++ b/drivers/gpio/langwell_gpio.c
@@ -123,7 +123,7 @@ static int lnw_irq_type(unsigned irq, unsigned type)
void __iomem *grer = (void __iomem *)(&lnw->reg_base->... |
3151520d88b27b9dd4fb1c1f89a94807f0ad7ef1 | Analyze and fix the following issue in the Linux kernel code: rtc-stk17ta8: fix races around device registration | Problem Details:
- Call dev_set_drvdata before rtc device creation.
- Use its own spinlock instead of rtc->irq_lock. Because pdata->rtc
must be initialized to use the irq_lock (pdata->rtc->irq_lock). There
is a small window which rtc methods can be called before pdata->rtc is
initialized.
And there is no ne... | ```diff
diff --git a/drivers/rtc/rtc-stk17ta8.c b/drivers/rtc/rtc-stk17ta8.c
index 62c2969436a8..31ea22070e3d 100644
--- a/drivers/rtc/rtc-stk17ta8.c
+++ b/drivers/rtc/rtc-stk17ta8.c
@@ -62,7 +62,6 @@
struct rtc_plat_data {
struct rtc_device *rtc;
void __iomem *ioaddr;
- unsigned long baseaddr;
unsigned long las... |
ac18eb622f4d8cdd544222e56230db850259cd37 | Analyze and fix the following issue in the Linux kernel code: rtc-ds1742: fix races around device registration | Problem Details:
* Call dev_set_drvdata before rtc device creation
* Use devres APIs and simplify error/remove path
Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Acked-by: Alessandro Zummo <a.zummo@towertech.it>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Sig... | ```diff
diff --git a/drivers/rtc/rtc-ds1742.c b/drivers/rtc/rtc-ds1742.c
index 09249459e9a4..19d2f3333cf0 100644
--- a/drivers/rtc/rtc-ds1742.c
+++ b/drivers/rtc/rtc-ds1742.c
@@ -21,7 +21,7 @@
#include <linux/platform_device.h>
#include <linux/io.h>
-#define DRV_VERSION "0.3"
+#define DRV_VERSION "0.4"
#define R... |
618161f71cb10ff9bfe74c9bd766faf339f98274 | Analyze and fix the following issue in the Linux kernel code: rtc-ds1553: fix races around device registration | Problem Details:
* Call dev_set_drvdata before rtc device creation
* Use its own spinlock instead of rtc->irq_lock
* Check pdata->rtc before calling rtc_update_irq
* Use {alarm,update}_irq_enable and remove ioctl routine
* Use devres APIs and simplify error/remove path
Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.j... | ```diff
diff --git a/drivers/rtc/rtc-ds1553.c b/drivers/rtc/rtc-ds1553.c
index 717288527c6b..dadd0f517d5a 100644
--- a/drivers/rtc/rtc-ds1553.c
+++ b/drivers/rtc/rtc-ds1553.c
@@ -18,7 +18,7 @@
#include <linux/platform_device.h>
#include <linux/io.h>
-#define DRV_VERSION "0.2"
+#define DRV_VERSION "0.3"
#define R... |
af69a180e0675ce95842adb519079204ee5647ea | Analyze and fix the following issue in the Linux kernel code: rtc-tx4939: fix races around device registration | Problem Details:
* Use its own spinlock instead of rtc->irq_lock
* Check pdata->rtc before calling rtc_update_irq
* Disable interrupt after rtc_device_unregister
Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Acked-by: Alessandro Zummo <a.zummo@towertech.it>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by:... | ```diff
diff --git a/drivers/rtc/rtc-tx4939.c b/drivers/rtc/rtc-tx4939.c
index 4a6ed1104fbb..9ee81d8aa7c0 100644
--- a/drivers/rtc/rtc-tx4939.c
+++ b/drivers/rtc/rtc-tx4939.c
@@ -17,6 +17,7 @@
struct tx4939rtc_plat_data {
struct rtc_device *rtc;
struct tx4939_rtc_reg __iomem *rtcreg;
+ spinlock_t lock;
};
stat... |
ba4f3e47cb9ef72f864f1b5548688e0a195011e9 | Analyze and fix the following issue in the Linux kernel code: rtc-ds1511: fix races around device registration | Problem Details:
- Call dev_set_drvdata before rtc device creation.
- Use its own spinlock instead of rtc->irq_lock. Because pdata->rtc
must be initialized to use the irq_lock (pdata->rtc->irq_lock). There
is a small window which rtc methods can be called before pdata->rtc is
initialized.
And there is no ne... | ```diff
diff --git a/drivers/rtc/rtc-ds1511.c b/drivers/rtc/rtc-ds1511.c
index 539676e25fd8..4166b84cb514 100644
--- a/drivers/rtc/rtc-ds1511.c
+++ b/drivers/rtc/rtc-ds1511.c
@@ -87,7 +87,6 @@ enum ds1511reg {
struct rtc_plat_data {
struct rtc_device *rtc;
void __iomem *ioaddr; /* virtual base address */
- unsign... |
b74d2caa64f8e542e9c6716ae6ed4a60d681ea9f | Analyze and fix the following issue in the Linux kernel code: rtc: fix driver data issues in several rtc drivers | Problem Details:
Herton Ronaldo Krzesinski recently raised up, and fixed, an issue with the
rtc_cmos driver, which was referring to an inconsistent driver data.
This patch ensures that driver data registration happens before
rtc_device_register().
Signed-off-by: Alessandro Zummo <a.zummo@towertech.it>
Acked-by: Thoma... | ```diff
diff --git a/drivers/rtc/rtc-at32ap700x.c b/drivers/rtc/rtc-at32ap700x.c
index e1ec33e40e38..8825695777df 100644
--- a/drivers/rtc/rtc-at32ap700x.c
+++ b/drivers/rtc/rtc-at32ap700x.c
@@ -256,6 +256,8 @@ static int __init at32_rtc_probe(struct platform_device *pdev)
goto out_iounmap;
}
+ platform_set_drvd... |
135d5655dc58a24eda64e3f6c192d7d605e10050 | Analyze and fix the following issue in the Linux kernel code: proc: rename de_get() to pde_get() and inline it | Problem Details:
* de_get() is trivial -- make inline, save a few bits of code, drop
"refcount is 0" check -- it should be done in some generic refcount
code, don't recall it's was helpful
* rename GET and PUT functions to pde_get(), pde_put() for cool prefix!
* remove obvious and incorrent comments
* in remove_... | ```diff
diff --git a/fs/proc/generic.c b/fs/proc/generic.c
index fa678abc9db1..480cb1065eec 100644
--- a/fs/proc/generic.c
+++ b/fs/proc/generic.c
@@ -429,7 +429,7 @@ struct dentry *proc_lookup_de(struct proc_dir_entry *de, struct inode *dir,
unsigned int ino;
ino = de->low_ino;
- de_get(de);
+ pde_get(de... |
f065f41f48569122b5bcddbd1ba2354f7cc29fdc | Analyze and fix the following issue in the Linux kernel code: timecompare: fix half-Y2K38 problem in timecompare_update while calculating offset | Problem Details:
ktime will overflow from 03:14:07 UTC on Tuesday, 19 January 2038,
ktime_add() in timecompare_update() will overflow a half earlier. As a
result, wrong offset will be gotten, then cause some strange problems.
Signed-off-by: Barry Song <21cnbao@gmail.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: I... | ```diff
diff --git a/kernel/time/timecompare.c b/kernel/time/timecompare.c
index 96ff643a5a59..12f5c55090be 100644
--- a/kernel/time/timecompare.c
+++ b/kernel/time/timecompare.c
@@ -89,7 +89,7 @@ int timecompare_offset(struct timecompare *sync,
* source time
*/
sample.offset =
- ktime_to_ns(ktime_add(... |
4365a5676fa3aa1d5ae6c90c22a0044f09ba584e | Analyze and fix the following issue in the Linux kernel code: oom-kill: fix NUMA constraint check with nodemask | Problem Details:
Fix node-oriented allocation handling in oom-kill.c I myself think of this
as a bugfix not as an ehnancement.
In these days, things are changed as
- alloc_pages() eats nodemask as its arguments, __alloc_pages_nodemask().
- mempolicy don't maintain its own private zonelists.
(And cpuset doesn't u... | ```diff
diff --git a/drivers/char/sysrq.c b/drivers/char/sysrq.c
index 44203ff599da..1ae2de7d8b4f 100644
--- a/drivers/char/sysrq.c
+++ b/drivers/char/sysrq.c
@@ -339,7 +339,7 @@ static struct sysrq_key_op sysrq_term_op = {
static void moom_callback(struct work_struct *ignored)
{
- out_of_memory(node_zonelist(0, GF... |
3b4798cbc13dd8d1150aa6377f97f0e11450a67d | Analyze and fix the following issue in the Linux kernel code: oom-kill: show virtual size and rss information of the killed process | Problem Details:
In a typical oom analysis scenario, we frequently want to know whether the
killed process has a memory leak or not at the first step. This patch
adds vsz and rss information to the oom log to help this analysis. To
save time for the debugging.
example:
===============================================... | ```diff
diff --git a/mm/oom_kill.c b/mm/oom_kill.c
index 492c98624fc1..6bb8a7a7ec9a 100644
--- a/mm/oom_kill.c
+++ b/mm/oom_kill.c
@@ -352,6 +352,8 @@ static void dump_header(gfp_t gfp_mask, int order, struct mem_cgroup *mem)
dump_tasks(mem);
}
+#define K(x) ((x) << (PAGE_SHIFT-10))
+
/*
* Send SIGKILL to the ... |
f42647acc4eab1befa9e290691ed7a40f9a7d3cc | Analyze and fix the following issue in the Linux kernel code: fix ksm.h breakage of nommu build | Problem Details:
Commit 5ad6468801d28c4d4ac9f48ec19297817c915f6a "ksm: let shared pages
be swappable" breaks the build on m68knommu and I suspect on any nommu:
In file included from kernel/fork.c:52:
include/linux/ksm.h:129: warning: 'enum ttu_flags' declared inside parameter list
include/linux/ksm.h:129: warnin... | ```diff
diff --git a/include/linux/ksm.h b/include/linux/ksm.h
index bed5f16ba827..43bdab769fc3 100644
--- a/include/linux/ksm.h
+++ b/include/linux/ksm.h
@@ -94,12 +94,6 @@ void ksm_migrate_page(struct page *newpage, struct page *oldpage);
#else /* !CONFIG_KSM */
-static inline int ksm_madvise(struct vm_area_str... |
75e874c698bf7aeed005acd74d0fb13c47124939 | Analyze and fix the following issue in the Linux kernel code: [ARM] pxa: fix no reference of cpu_is_pxa25x() in devices.c | Problem Details:
Signed-off-by: Eric Miao <eric.y.miao@gmail.com> | ```diff
diff --git a/arch/arm/mach-pxa/devices.c b/arch/arm/mach-pxa/devices.c
index d4cc41d04b25..8e10db148f1b 100644
--- a/arch/arm/mach-pxa/devices.c
+++ b/arch/arm/mach-pxa/devices.c
@@ -13,6 +13,7 @@
#include <mach/pxa2xx_spi.h>
#include <mach/camera.h>
#include <mach/audio.h>
+#include <mach/hardware.h>
#incl... |
262ab9ac0daadebcece8e3cbf3ae66ee8774cfd7 | Analyze and fix the following issue in the Linux kernel code: V4L/DVB (13698): pms: replace asm/uaccess.h to linux/uaccess.h | Problem Details:
Fix a checkpatch.pl warning:
WARNING: Use #include <linux/uaccess.h> instead of <asm/uaccess.h>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com> | ```diff
diff --git a/drivers/media/video/pms.c b/drivers/media/video/pms.c
index 73ec970ca5ca..11a2c26399b5 100644
--- a/drivers/media/video/pms.c
+++ b/drivers/media/video/pms.c
@@ -31,7 +31,7 @@
#include <linux/init.h>
#include <linux/version.h>
#include <linux/mutex.h>
-#include <asm/uaccess.h>
+#include <linux/u... |
7ee0a28829e245648091040d4ba30feea5fa5ed5 | Analyze and fix the following issue in the Linux kernel code: V4L/DVB (13687): cx231xx: use NULL when pointer is needed | Problem Details:
The gpio field in the cx231xx_board.input structure is a pointer. Eliminate the
following sparse warnings (see "make C=1"):
* cx231xx-cards.c:72:13: warning: Using plain integer as NULL pointer
* cx231xx-cards.c:77:13: warning: Using plain integer as NULL pointer
* cx231xx-cards.c:84:13: warning: Us... | ```diff
diff --git a/drivers/media/video/cx231xx/cx231xx-cards.c b/drivers/media/video/cx231xx/cx231xx-cards.c
index ff534fe7f4a3..a54908235009 100644
--- a/drivers/media/video/cx231xx/cx231xx-cards.c
+++ b/drivers/media/video/cx231xx/cx231xx-cards.c
@@ -68,19 +68,19 @@ struct cx231xx_board cx231xx_boards[] = {
.t... |
b4d887cfd735a15d32dbab82334f227a75775b86 | Analyze and fix the following issue in the Linux kernel code: V4L/DVB (13684): Fix some cut-and-paste noise in dib0090.h | Problem Details:
Remove duplicated line on driver
[mchehab@redhat.com: second hunk of the original patch were already applied by another patch - remove it]
Cc: Patrick Boettcher <pboettcher@kernellabs.com>
Signed-off-by: Duncan Gibb <dg@duncangibb.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com> | ```diff
diff --git a/drivers/media/dvb/frontends/dib0090.h b/drivers/media/dvb/frontends/dib0090.h
index 24ab5bf69d50..aa7711e88776 100644
--- a/drivers/media/dvb/frontends/dib0090.h
+++ b/drivers/media/dvb/frontends/dib0090.h
@@ -57,7 +57,6 @@ extern u16 dib0090_get_wbd_offset(struct dvb_frontend *tuner);
extern int ... |
faa582610d87edf3ae1d07710a8f7e11c105686c | Analyze and fix the following issue in the Linux kernel code: V4L/DVB (13657): tw9910: Add revision control to tw9910_set_hsync | Problem Details:
Bits 10-3 of hsync control are the same for Rev0 and Rev1, but only Rev1
also has bits 2-0 for hsync. Account for this difference and also fix a
register name.
Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: M... | ```diff
diff --git a/drivers/media/video/tw9910.c b/drivers/media/video/tw9910.c
index 2256ba6e6147..8ec1031dacc3 100644
--- a/drivers/media/video/tw9910.c
+++ b/drivers/media/video/tw9910.c
@@ -117,7 +117,7 @@
#define LCTL24 0x68
#define LCTL25 0x69
#define LCTL26 0x6A
-#define HSGEGIN 0x6B
+#define HSBEGIN 0x... |
6d74e5f361bdacfdcfe14220868d562368aaadc2 | Analyze and fix the following issue in the Linux kernel code: V4L/DVB (13652): tw9910: Add revision control | Problem Details:
Also fix a badly chosen macro name.
Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com> | ```diff
diff --git a/drivers/media/video/tw9910.c b/drivers/media/video/tw9910.c
index 35373d8bf6a0..e3a4942e0f37 100644
--- a/drivers/media/video/tw9910.c
+++ b/drivers/media/video/tw9910.c
@@ -29,7 +29,7 @@
#include <media/tw9910.h>
#define GET_ID(val) ((val & 0xF8) >> 3)
-#define GET_ReV(val) (val & 0x07)
+#def... |
6ed7c03884ee7c05ff880cafb46ae20915e22e3c | Analyze and fix the following issue in the Linux kernel code: V4L/DVB (13646): sh_mobile_ceu_camera: do not mark host occupied, when adding a client fails | Problem Details:
Currently, if resetting the host interface, when adding a new client, fails, a
negative error code is returned, but the host is still marked as occupied. Fix
this bug.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com> | ```diff
diff --git a/drivers/media/video/sh_mobile_ceu_camera.c b/drivers/media/video/sh_mobile_ceu_camera.c
index 3271944f261c..2a38e1d90613 100644
--- a/drivers/media/video/sh_mobile_ceu_camera.c
+++ b/drivers/media/video/sh_mobile_ceu_camera.c
@@ -459,6 +459,7 @@ static int sh_mobile_ceu_add_device(struct soc_camera... |
5d28d525452f170e30bc038955439731462a5228 | Analyze and fix the following issue in the Linux kernel code: V4L/DVB (13645): soc-camera: fix multi-line comment coding style | Problem Details:
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com> | ```diff
diff --git a/drivers/media/video/mt9m001.c b/drivers/media/video/mt9m001.c
index 17be2d46fd40..cc9066000c2d 100644
--- a/drivers/media/video/mt9m001.c
+++ b/drivers/media/video/mt9m001.c
@@ -17,9 +17,11 @@
#include <media/v4l2-chip-ident.h>
#include <media/soc_camera.h>
-/* mt9m001 i2c address 0x5d
+/*
+ * ... |
facb6011f3993947283fa15d039dacb4ad140230 | Analyze and fix the following issue in the Linux kernel code: HWPOISON: Add soft page offline support | Problem Details:
This is a simpler, gentler variant of memory_failure() for soft page
offlining controlled from user space. It doesn't kill anything, just
tries to invalidate and if that doesn't work migrate the
page away.
This is useful for predictive failure analysis, where a page has
a high rate of corrected error... | ```diff
diff --git a/Documentation/ABI/testing/sysfs-memory-page-offline b/Documentation/ABI/testing/sysfs-memory-page-offline
new file mode 100644
index 000000000000..e14703f12fdf
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-memory-page-offline
@@ -0,0 +1,44 @@
+What: /sys/devices/system/memory/soft_offline_pa... |
4fd466eb46a6a917c317a87fb94bfc7252a0f7ed | Analyze and fix the following issue in the Linux kernel code: HWPOISON: add memory cgroup filter | Problem Details:
The hwpoison test suite need to inject hwpoison to a collection of
selected task pages, and must not touch pages not owned by them and
thus kill important system processes such as init. (But it's OK to
mis-hwpoison free/unowned pages as well as shared clean pages.
Mis-hwpoison of shared dirty pages wil... | ```diff
diff --git a/Documentation/vm/hwpoison.txt b/Documentation/vm/hwpoison.txt
index f454d3cd4d60..989e5afe740f 100644
--- a/Documentation/vm/hwpoison.txt
+++ b/Documentation/vm/hwpoison.txt
@@ -123,6 +123,22 @@ Only handle memory failures to pages associated with the file system defined
by block device major/mino... |
478c5ffc0b50527bd2390f2daa46cc16276b8413 | Analyze and fix the following issue in the Linux kernel code: HWPOISON: add page flags filter | Problem Details:
When specified, only poison pages if ((page_flags & mask) == value).
- corrupt-filter-flags-mask
- corrupt-filter-flags-value
This allows stress testing of many kinds of pages.
Strictly speaking, the buddy pages requires taking zone lock, to avoid
setting PG_hwpoison on a "was buddy but ... | ```diff
diff --git a/Documentation/vm/hwpoison.txt b/Documentation/vm/hwpoison.txt
index 4ef7bb30d15c..f454d3cd4d60 100644
--- a/Documentation/vm/hwpoison.txt
+++ b/Documentation/vm/hwpoison.txt
@@ -123,6 +123,16 @@ Only handle memory failures to pages associated with the file system defined
by block device major/mino... |
31d3d3484f9bd263925ecaa341500ac2df3a5d9b | Analyze and fix the following issue in the Linux kernel code: HWPOISON: limit hwpoison injector to known page types | Problem Details:
__memory_failure()'s workflow is
set PG_hwpoison
//...
unset PG_hwpoison if didn't pass hwpoison filter
That could kill unrelated process if it happens to page fault on the
page with the (temporary) PG_hwpoison. The race should be big enough to
appear in stress tests.
Fix it by grabbing the page ... | ```diff
diff --git a/Documentation/vm/hwpoison.txt b/Documentation/vm/hwpoison.txt
index fdf580464324..4ef7bb30d15c 100644
--- a/Documentation/vm/hwpoison.txt
+++ b/Documentation/vm/hwpoison.txt
@@ -103,7 +103,8 @@ hwpoison-inject module through debugfs
corrupt-pfn
-Inject hwpoison fault at PFN echoed into this fi... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.