id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
73f73415caddbc01d9f10c03e0a677d5b3d11569
Analyze and fix the following issue in the Linux kernel code: Btrfs: change how we mount subvolumes
Problem Details: This work is in preperation for being able to set a different root as the default mounting root. There is currently a problem with how we mount subvolumes. We cannot currently mount a subvolume of a subvolume, you can only mount subvolumes/snapshots of the default subvolume. So say you take a snapsh...
```diff diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index abbce4d90c1b..07d956977a07 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h @@ -2335,7 +2335,7 @@ int btrfs_init_cachep(void); void btrfs_destroy_cachep(void); long btrfs_ioctl_trans_end(struct file *file); struct inode *btrfs_iget(struct super_block...
12534832cb7b0abc7369298246e8b7af03b863ca
Analyze and fix the following issue in the Linux kernel code: Btrfs: make set/get functions for the super compat_ro flags use compat_ro
Problem Details: Our set/get functions for compat_ro_flags actually look at compat_flags. This will mess any attempt to use compat flags up. The fix is obvious. Thanks, Signed-off-by: Josef Bacik <josef@redhat.com> Signed-off-by: Chris Mason <chris.mason@oracle.com>
```diff diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index 2aa8ec6a0981..abbce4d90c1b 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h @@ -1842,7 +1842,7 @@ BTRFS_SETGET_STACK_FUNCS(super_num_devices, struct btrfs_super_block, BTRFS_SETGET_STACK_FUNCS(super_compat_flags, struct btrfs_super_block, compat_f...
30c96ce56a195963764de9521087202ba73e9bff
Analyze and fix the following issue in the Linux kernel code: powerpc/BSR: fix device_create() return value check
Problem Details: Use IS_ERR() instead of comparing to NULL. Signed-off-by: Jani Nikula <ext-jani.1.nikula@nokia.com> Acked-by: Sonny Rao <sonnyrao@us.ibm.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
```diff diff --git a/drivers/char/bsr.c b/drivers/char/bsr.c index c02db01f736e..3b31f744b7af 100644 --- a/drivers/char/bsr.c +++ b/drivers/char/bsr.c @@ -252,7 +252,7 @@ static int bsr_add_node(struct device_node *bn) cur->bsr_device = device_create(bsr_class, NULL, cur->bsr_dev, cur, cur->bsr_name); - if...
b89ebadc3421f8ff85030768ec14144794984877
Analyze and fix the following issue in the Linux kernel code: ARM: Add final piece to fix XIP decompressor in read-only memory
Problem Details: This defines STATIC_RW_DATA, which prevents the read/write malloc management data being declared with a static attribute. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
```diff diff --git a/arch/arm/boot/compressed/decompress.c b/arch/arm/boot/compressed/decompress.c index 0da382f33157..9c097073ce4c 100644 --- a/arch/arm/boot/compressed/decompress.c +++ b/arch/arm/boot/compressed/decompress.c @@ -11,6 +11,7 @@ extern unsigned long free_mem_end_ptr; extern void error(char *); #defi...
320cc51d90832231cece478f0db6550ef367f8f3
Analyze and fix the following issue in the Linux kernel code: mm: fix typo in refill_stock() comment
Problem Details: Change refill_stock() comment: s/consumt_stock()/consume_stock()/ Signed-off-by: Greg Thelen <gthelen@google.com> Acked-by: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
```diff diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 7973b5221fb8..6e8533e2861b 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -1435,7 +1435,7 @@ static void drain_local_stock(struct work_struct *dummy) /* * Cache charges(val) which is from res_counter, to local per_cpu area. - * This will be consum...
32e688b8c1afafa389223a4813b97e8c128a1636
Analyze and fix the following issue in the Linux kernel code: Documentation/filesystems/proc.txt typo fix.
Problem Details: Typo fix for a filename in procfs documentation. Signed-off-by: Rob Landley <rob@landley.net> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
```diff diff --git a/Documentation/filesystems/proc.txt b/Documentation/filesystems/proc.txt index a4f30faa4f1f..770700317c2c 100644 --- a/Documentation/filesystems/proc.txt +++ b/Documentation/filesystems/proc.txt @@ -305,7 +305,7 @@ Table 1-4: Contents of the stat files (as of 2.6.30-rc7) cgtime guest time ...
31a2d31dbd01a7d530a748e6f708ba047c37fb90
Analyze and fix the following issue in the Linux kernel code: kconfig: util: Fix typo in comment
Problem Details: sting replaced with string Signed-off-by: Thomas Weber <weber@corscience.de> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
```diff diff --git a/scripts/kconfig/util.c b/scripts/kconfig/util.c index b6b2a46af14c..25d1ec4ca28a 100644 --- a/scripts/kconfig/util.c +++ b/scripts/kconfig/util.c @@ -72,7 +72,7 @@ int file_write_dep(const char *name) } -/* Allocate initial growable sting */ +/* Allocate initial growable string */ struct gstr...
cf36df6bfb49fd265a39f676bfc9718029fef160
Analyze and fix the following issue in the Linux kernel code: firewire: core: fw_iso_resource_manage: fix error handling
Problem Details: If the bandwidth allocation fails, the error must be returned in *channel regardless of whether the channel allocation succeeded. Checking for c >= 0 is not correct if no channel allocation was requested, in which case this part of the code is reached with c == -EINVAL. Signed-off-by: Clemens Ladisch ...
```diff diff --git a/drivers/firewire/core-iso.c b/drivers/firewire/core-iso.c index 1c0b504a42f3..99c20f1b613a 100644 --- a/drivers/firewire/core-iso.c +++ b/drivers/firewire/core-iso.c @@ -331,8 +331,9 @@ void fw_iso_resource_manage(struct fw_card *card, int generation, if (ret < 0) *bandwidth = 0; - if (alloc...
2cda2728aa1c8c006418a24f867b25e5eb7a32e2
Analyze and fix the following issue in the Linux kernel code: block: Fix overrun in lcm() and move it to lib
Problem Details: lcm() was defined to take integer-sized arguments. The supplied arguments are multiplied, however, causing us to overflow given sufficiently large input. That in turn led to incorrect optimal I/O size reporting in some cases (RAID over RAID). Switch lcm() over to unsigned long similar to gcd() and m...
```diff diff --git a/block/blk-settings.c b/block/blk-settings.c index 31e7a9375c13..4c4700dca56a 100644 --- a/block/blk-settings.c +++ b/block/blk-settings.c @@ -8,6 +8,7 @@ #include <linux/blkdev.h> #include <linux/bootmem.h> /* for max_pfn/max_low_pfn */ #include <linux/gcd.h> +#include <linux/lcm.h> #include <l...
9c4cc0bdede1c39bde60a0d5d9251aac71fbe719
Analyze and fix the following issue in the Linux kernel code: ALSA: hda - Fix secondary ADC of ALC260 basic model
Problem Details: Fix adc_nids[] for ALC260 basic model to match with num_adc_nids. Otherwise you get an invalid NID in the secondary "Input Source" mixer element. Signed-off-by: Takashi Iwai <tiwai@suse.de> Cc: <stable@kernel.org>
```diff diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 3a8371990d75..ba45868d5242 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -6477,7 +6477,7 @@ static struct alc_config_preset alc260_presets[] = { .num_dacs = ARRAY_SIZE(alc260_dac_nids), .da...
725398322d05486109375fbb85c3404108881e17
Analyze and fix the following issue in the Linux kernel code: drm: remove the EDID blob stored in the EDID property when it is disconnected
Problem Details: Now the EDID property will be updated when the corresponding EDID can be obtained from the external display device. But after the external device is plugged-out, the EDID property is not updated. In such case we still get the corresponding EDID property although it is already detected as disconnected. ...
```diff diff --git a/drivers/gpu/drm/drm_crtc_helper.c b/drivers/gpu/drm/drm_crtc_helper.c index f2aaf39be398..51103aa469f8 100644 --- a/drivers/gpu/drm/drm_crtc_helper.c +++ b/drivers/gpu/drm/drm_crtc_helper.c @@ -104,6 +104,7 @@ int drm_helper_probe_single_connector_modes(struct drm_connector *connector, if (connec...
96a4c8d50de20da865296a380b996f73204d6b34
Analyze and fix the following issue in the Linux kernel code: drm/radeon/kms: fix i2c prescale calc on older radeons
Problem Details: Should fix fdo bug 26430 Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
```diff diff --git a/drivers/gpu/drm/radeon/radeon_i2c.c b/drivers/gpu/drm/radeon/radeon_i2c.c index 5d93418f9fca..f007fcb1191b 100644 --- a/drivers/gpu/drm/radeon/radeon_i2c.c +++ b/drivers/gpu/drm/radeon/radeon_i2c.c @@ -183,11 +183,10 @@ static void set_data(void *i2c_priv, int data) static u32 radeon_get_i2c_pre...
ae08819c2a4729444676f1bb55e5e28263f6f5a1
Analyze and fix the following issue in the Linux kernel code: drm/radeon/kms: fix for hw i2c
Problem Details: use the i2c pads to drive SDA Possible fix for fdo bug 26430 Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
```diff diff --git a/drivers/gpu/drm/radeon/radeon_i2c.c b/drivers/gpu/drm/radeon/radeon_i2c.c index 4ae50c19589f..5d93418f9fca 100644 --- a/drivers/gpu/drm/radeon/radeon_i2c.c +++ b/drivers/gpu/drm/radeon/radeon_i2c.c @@ -291,6 +291,7 @@ static int r100_hw_i2c_xfer(struct i2c_adapter *i2c_adap, prescale = radeon_get...
15f7207761cfcf8f53fb6e5cacffe060478782c3
Analyze and fix the following issue in the Linux kernel code: drm/radeon/kms: fix pal tv-out support on legacy IGP chips
Problem Details: Based on ddx patch by Andrzej Hajda. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Cc: stable@kernel.org Signed-off-by: Dave Airlie <airlied@redhat.com>
```diff diff --git a/drivers/gpu/drm/radeon/radeon_legacy_tv.c b/drivers/gpu/drm/radeon/radeon_legacy_tv.c index 417684daef4c..f2ed27c8055b 100644 --- a/drivers/gpu/drm/radeon/radeon_legacy_tv.c +++ b/drivers/gpu/drm/radeon/radeon_legacy_tv.c @@ -57,6 +57,10 @@ #define NTSC_TV_PLL_N_14 693 #define NTSC_TV_PLL_P_14 7 ...
267364ac17f6474c69b03034340f769b22f46105
Analyze and fix the following issue in the Linux kernel code: drm/radeon/kms: further spread spectrum fixes
Problem Details: Adjust modeset ordering to fix spread spectrum. The spread spectrum command table relies on the crtc routing to already be set in order to work properly on some asics. Should fix fdo bug 25741. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
```diff diff --git a/drivers/gpu/drm/radeon/atombios_crtc.c b/drivers/gpu/drm/radeon/atombios_crtc.c index a8cd637d92fa..7c30e2e74c85 100644 --- a/drivers/gpu/drm/radeon/atombios_crtc.c +++ b/drivers/gpu/drm/radeon/atombios_crtc.c @@ -1127,9 +1127,6 @@ int atombios_crtc_mode_set(struct drm_crtc *crtc, /* TODO color...
b792210e7d1f9fb102061e2016da96cf2ad5cdbd
Analyze and fix the following issue in the Linux kernel code: drm/radeon/kms/atom: spread spectrum fix
Problem Details: The atom spread spectrum table does not always disable ss. Explicitly disable it and then use the atom table to enable later if needed (currently only used for LVDS). Fixes display issues on some systems. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Cc: stable@kernel.org Signed-off-by: Dave A...
```diff diff --git a/drivers/gpu/drm/radeon/atombios_crtc.c b/drivers/gpu/drm/radeon/atombios_crtc.c index dd9fdf560611..0c676696a0dd 100644 --- a/drivers/gpu/drm/radeon/atombios_crtc.c +++ b/drivers/gpu/drm/radeon/atombios_crtc.c @@ -353,12 +353,55 @@ static void atombios_crtc_set_timing(struct drm_crtc *crtc, atom_...
d330a5befb88875a9b3d2db62f9b74dadf660b13
Analyze and fix the following issue in the Linux kernel code: ext4: Fix estimate of # of blocks needed to write indirect-mapped files
Problem Details: http://bugzilla.kernel.org/show_bug.cgi?id=15420 Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
```diff diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index 986120f30066..11119e07233b 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c @@ -1035,7 +1035,7 @@ static int ext4_indirect_calc_metadata_amount(struct inode *inode, sector_t lblock) { struct ext4_inode_info *ei = EXT4_I(inode); - int dind_mas...
181427a7e01beab76c789414334375839f026128
Analyze and fix the following issue in the Linux kernel code: tomoyo: fix potential use after free
Problem Details: The original code returns a freed pointer. This function is expected to return NULL on errors. Signed-off-by: Dan Carpenter <error27@gmail.com> Acked-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> Signed-off-by: James Morris <jmorris@namei.org>
```diff diff --git a/security/tomoyo/common.c b/security/tomoyo/common.c index ff51f1026b57..ef89947a774b 100644 --- a/security/tomoyo/common.c +++ b/security/tomoyo/common.c @@ -886,6 +886,7 @@ static struct tomoyo_profile *tomoyo_find_or_assign_new_profile(const unsigned ptr = kmalloc(sizeof(*ptr), GFP_KERNEL); i...
d06070509147c948a06056da619c9dc2ed349805
Analyze and fix the following issue in the Linux kernel code: acpiphp: Execute ACPI _REG method for hotadded devices
Problem Details: Per ACPI spec, _ERG method should be executed before device driver gets control for hotpluged device. Firmware might do some configuration there. See http://bugzilla.kernel.org/show_bug.cgi?id=10805. In this machine, _REG method of docked device will configure cardbus bridge. Signed-off-by: Shaohua Li...
```diff diff --git a/drivers/pci/hotplug/acpiphp_glue.c b/drivers/pci/hotplug/acpiphp_glue.c index cb2fd01eddae..b5dad9f37453 100644 --- a/drivers/pci/hotplug/acpiphp_glue.c +++ b/drivers/pci/hotplug/acpiphp_glue.c @@ -749,6 +749,24 @@ static int acpiphp_bus_trim(acpi_handle handle) return retval; } +static void a...
3f17522ce461a31e7ced6311b28fcf5b8a763316
Analyze and fix the following issue in the Linux kernel code: Video: ARM CLCD: Better fix for swapped IENB and CNTL registers
Problem Details: On PL111, as found on Realview and other platforms, these registers are always arranged as CNTL then IENB. On PL110, these registers are IENB then CNTL, except on Versatile platforms. Re-arrange the handling of these register swaps so that PL111 always gets it right without resorting to ifdefs, leavi...
```diff diff --git a/drivers/video/amba-clcd.c b/drivers/video/amba-clcd.c index a21efcd10b78..afe21e6eb544 100644 --- a/drivers/video/amba-clcd.c +++ b/drivers/video/amba-clcd.c @@ -65,16 +65,16 @@ static void clcdfb_disable(struct clcd_fb *fb) if (fb->board->disable) fb->board->disable(fb); - val = readl(fb->r...
02ca6c407e0d43e6de5d646d26d87fc2eaa7a98b
Analyze and fix the following issue in the Linux kernel code: Add include to i2c-xii.c to fix build error
Problem Details: drivers/i2c/busses/i2c-xiic.c:493: error: implicit declaration of function 'mdelay' Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Cc: "Richard Röjfors" <richard.rojfors@pelagicore.com> Cc: "Ben Dooks (embedded platforms)" <ben-linux@fluff.org> Cc: linux-i2c@vger.kernel.org Signed-off-by: Steph...
```diff diff --git a/drivers/i2c/busses/i2c-xiic.c b/drivers/i2c/busses/i2c-xiic.c index eece39a5a30e..f0ef8da6c554 100644 --- a/drivers/i2c/busses/i2c-xiic.c +++ b/drivers/i2c/busses/i2c-xiic.c @@ -32,6 +32,7 @@ #include <linux/module.h> #include <linux/init.h> #include <linux/errno.h> +#include <linux/delay.h> #i...
2aa2b50dd62b5d0675bd7453fbeb5732dc2d7866
Analyze and fix the following issue in the Linux kernel code: x86/mce: Fix build bug with CONFIG_PROVE_LOCKING=y && CONFIG_X86_MCE_INTEL=y
Problem Details: Commit f56e8a076 "x86/mce: Fix RCU lockdep splats" introduced the following build bug: arch/x86/kernel/cpu/mcheck/mce.c: In function 'mce_log': arch/x86/kernel/cpu/mcheck/mce.c:166: error: 'mce_read_mutex' undeclared (first use in this function) arch/x86/kernel/cpu/mcheck/mce.c:166: error: (Each...
```diff diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c index bd58de4d7a29..3ab9c886b613 100644 --- a/arch/x86/kernel/cpu/mcheck/mce.c +++ b/arch/x86/kernel/cpu/mcheck/mce.c @@ -46,6 +46,8 @@ #include "mce-internal.h" +static DEFINE_MUTEX(mce_read_mutex); + #define rcu_dereference...
c91ed059a080c6f9a7ba525e5027c65d19115d15
Analyze and fix the following issue in the Linux kernel code: Input: ALPS - fix stuck buttons on some touchpads
Problem Details: Enable button release event redirection to the device that got the button press not only for touchpads with interleaved protocols, but unconditionally for all Alps touchpads. This is required at least for the touchpads in Dell Inspiron 8200 and Latitude d630. Signed-off-by: Martin Buck <mb-tmp-yvahk-v...
```diff diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c index f6dad83539e0..7490f1da4a53 100644 --- a/drivers/input/mouse/alps.c +++ b/drivers/input/mouse/alps.c @@ -120,40 +120,27 @@ static void alps_report_buttons(struct psmouse *psmouse, struct input_dev *dev1, struct input_dev *dev2, ...
7a65004bbaa6a21a0438aac9c64814e46084dc3f
Analyze and fix the following issue in the Linux kernel code: nilfs2: fix various typos in comments
Problem Details: This fixes various typos I found in comments of nilfs2. Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
```diff diff --git a/fs/nilfs2/alloc.h b/fs/nilfs2/alloc.h index f4543ac4f560..5cccf874d692 100644 --- a/fs/nilfs2/alloc.h +++ b/fs/nilfs2/alloc.h @@ -42,7 +42,7 @@ void *nilfs_palloc_block_get_entry(const struct inode *, __u64, const struct buffer_head *, void *); /** - * nilfs_palloc_req - persistent alloc...
1621562b6ac55aa69239895d90276577547a5f62
Analyze and fix the following issue in the Linux kernel code: nilfs2: fix typo "cout" -> "count" in error message
Problem Details: Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
```diff diff --git a/fs/nilfs2/dir.c b/fs/nilfs2/dir.c index 0092840492ee..85c89dfc71f0 100644 --- a/fs/nilfs2/dir.c +++ b/fs/nilfs2/dir.c @@ -396,7 +396,7 @@ nilfs_find_entry(struct inode *dir, const struct qstr *qstr, /* next page is past the blocks we've got */ if (unlikely(n > (dir->i_blocks >> (PAGE_CACHE_SH...
9ccf56c13831c5fe0edecd8c1184c9a6fe805d23
Analyze and fix the following issue in the Linux kernel code: nilfs2: fix function name typos in docbook comments
Problem Details: Fixes the following typos in docbook comments: nilfs_detroy_transaction_cache -> nilfs_destroy_transaction_cache nilfs_secgtor_start_timer -> nilfs_segctor_start_timer Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
```diff diff --git a/fs/nilfs2/segment.c b/fs/nilfs2/segment.c index ada2f1b947a3..3265bfc57e42 100644 --- a/fs/nilfs2/segment.c +++ b/fs/nilfs2/segment.c @@ -141,7 +141,7 @@ int nilfs_init_transaction_cache(void) } /** - * nilfs_detroy_transaction_cache - destroy the cache for transaction info + * nilfs_destroy_tr...
6c477d44a7dad43a2783b4dea7f4ca3882d77126
Analyze and fix the following issue in the Linux kernel code: nilfs2: fix discrepancy in use of static specifier
Problem Details: Two segbuf functions, nilfs_segbuf_write and nilfs_segbuf_wait, are declared with the static storage class specifier, but their implementations are not. This fixes the discrepancy. Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
```diff diff --git a/fs/nilfs2/segbuf.c b/fs/nilfs2/segbuf.c index ab56fe44e377..68b08f21c648 100644 --- a/fs/nilfs2/segbuf.c +++ b/fs/nilfs2/segbuf.c @@ -470,8 +470,8 @@ static int nilfs_segbuf_submit_bh(struct nilfs_segment_buffer *segbuf, * * %-ENOMEM - Insufficient memory available. */ -int nilfs_segbuf_write...
c251c7f738cd94eb3a1febda318078c661eccb4d
Analyze and fix the following issue in the Linux kernel code: drivers/net/tulip/eeprom.c: fix bogus "(null)" in tulip init messages
Problem Details: On Wed, 2010-03-10 at 08:41 -0800, David Miller wrote: > From: Mikael Pettersson <mikpe@it.uu.se> > Date: Wed, 10 Mar 2010 16:33:28 +0100 > > Booting 2.6.34-rc1 on a machine with a tulip nic I see > > a number of kernel messages that include "(null)" where > > previous kernels included the string "tuli...
```diff diff --git a/drivers/net/tulip/eeprom.c b/drivers/net/tulip/eeprom.c index 93f4e8309f81..49f05d1431f5 100644 --- a/drivers/net/tulip/eeprom.c +++ b/drivers/net/tulip/eeprom.c @@ -143,6 +143,12 @@ static void __devinit tulip_build_fake_mediatable(struct tulip_private *tp) void __devinit tulip_parse_eeprom(str...
f78233dd44a110c574fe760ad6f9c1e8741a0d00
Analyze and fix the following issue in the Linux kernel code: 9p: Skip check for mandatory locks when unlocking
Problem Details: While investigating a bug, I came across a possible bug in v9fs. The problem is similar to the one reported for NFS by ASANO Masahiro in http://lkml.org/lkml/2005/12/21/334. v9fs_file_lock() will skip locks on file which has mode set to 02666. This is a problem in cases where the mode of the file is c...
```diff diff --git a/fs/9p/vfs_file.c b/fs/9p/vfs_file.c index 019f1cd8750b..df52d488d2a6 100644 --- a/fs/9p/vfs_file.c +++ b/fs/9p/vfs_file.c @@ -114,7 +114,7 @@ static int v9fs_file_lock(struct file *filp, int cmd, struct file_lock *fl) P9_DPRINTK(P9_DEBUG_VFS, "filp: %p lock: %p\n", filp, fl); /* No mandatory ...
fc0f296126433e61600539325975b6c30681c07e
Analyze and fix the following issue in the Linux kernel code: 9p: Fixes a simple bug enabling writes beyond 2GB.
Problem Details: Fixes a simple bug so that large files beyond 2GB can be created. Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com> Signed-off-by: Badari Pulavarty <pbadari@us.ibm.com> Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
```diff diff --git a/fs/9p/vfs_file.c b/fs/9p/vfs_file.c index 36122683fae8..019f1cd8750b 100644 --- a/fs/9p/vfs_file.c +++ b/fs/9p/vfs_file.c @@ -215,7 +215,7 @@ v9fs_file_write(struct file *filp, const char __user * data, struct p9_fid *fid; struct p9_client *clnt; struct inode *inode = filp->f_path.dentry->d_i...
d10fca9f39238b07cc670b441d2b423de30359d2
Analyze and fix the following issue in the Linux kernel code: ARM: 5960/1: ARM: perf-events: fix v7 event selection mask
Problem Details: The event selection mask for ARMv7 cores [ARMV7_EVTSEL_MASK] is incorrectly set to 0x7f. This means that the top bit of an event ID is ignored, so counting branch misses (id=0x10) and ISBs (id=0x90) give the same results. This patch sets the event selection mask to the correct value of 0xff. Signed-o...
```diff diff --git a/arch/arm/kernel/perf_event.c b/arch/arm/kernel/perf_event.c index b44d15948b56..c45a155a73dc 100644 --- a/arch/arm/kernel/perf_event.c +++ b/arch/arm/kernel/perf_event.c @@ -1625,7 +1625,7 @@ enum armv7_counters { /* * EVTSEL: Event selection reg */ -#define ARMV7_EVTSEL_MASK 0x7f /* Mask for...
ddee87f208b6229d2910dd5930c87089dc56c87e
Analyze and fix the following issue in the Linux kernel code: ARM: 5959/1: ARM: perf-events: request PMU interrupts with IRQF_NOBALANCING
Problem Details: If IRQ balancing is used on a multicore ARM system, PMU interrupt lines may be relocated onto CPUs other than the one causing the counter overflow. This can result in misattribution of events to the wrong core and, in the case that the CPU handling the interrupt has not experience counter overflow, the...
```diff diff --git a/arch/arm/kernel/perf_event.c b/arch/arm/kernel/perf_event.c index c54ceb3d1f97..b44d15948b56 100644 --- a/arch/arm/kernel/perf_event.c +++ b/arch/arm/kernel/perf_event.c @@ -332,7 +332,8 @@ armpmu_reserve_hardware(void) for (i = 0; i < pmu_irqs->num_irqs; ++i) { err = request_irq(pmu_irqs->i...
bb35579b45bcb0b74167a2165d3ea973f640bf00
Analyze and fix the following issue in the Linux kernel code: ARM: 5987/1: fix warning in kernel/elfcore.c from ARM's elf.h
Problem Details: 2.6.34-rc1 added kernel/elfcore.c which includes <asm/elf.h>. On ARM, this results in: In file included from include/linux/elf.h:7, from kernel/elfcore.c:1: /tmp/linux-2.6.34-rc1/arch/arm/include/asm/elf.h:101: warning: 'struct task_struct' declared inside parameter list /tmp/linux-2....
```diff diff --git a/arch/arm/include/asm/elf.h b/arch/arm/include/asm/elf.h index a399bb5730f1..bff056489cc1 100644 --- a/arch/arm/include/asm/elf.h +++ b/arch/arm/include/asm/elf.h @@ -98,6 +98,7 @@ extern int elf_check_arch(const struct elf32_hdr *); extern int arm_elf_read_implies_exec(const struct elf32_hdr *, in...
a2302b45d8ab41a55e84c39a6c6f813586ad8493
Analyze and fix the following issue in the Linux kernel code: ARM: 5985/2: ARM: Fix Samsung build after "ARM: Eliminate decompressor -Dstatic= PIC hack"
Problem Details: Commit 5de813b6 (ARM: Eliminate decompressor -Dstatic= PIC hack) among other things changed the declared type of the error() function to an extern, conflicting with the forward declartion in the Samsung plat/uncompress.h which appears to have been relying on the static being defined away, causing build...
```diff diff --git a/arch/arm/boot/compressed/misc.c b/arch/arm/boot/compressed/misc.c index d32bc71c1f78..d2b2ef41cd4f 100644 --- a/arch/arm/boot/compressed/misc.c +++ b/arch/arm/boot/compressed/misc.c @@ -33,6 +33,7 @@ unsigned int __machine_arch_type; #else static void putstr(const char *ptr); +extern void error...
32cbd7dfce93382a70f155bf539871b4c55bed29
Analyze and fix the following issue in the Linux kernel code: crypto: aesni-intel - Fix CTR optimization build failure with gas 2.16.1
Problem Details: Andrew Morton reported that AES-NI CTR optimization failed to compile with gas 2.16.1, the error message is as follow: arch/x86/crypto/aesni-intel_asm.S: Assembler messages: arch/x86/crypto/aesni-intel_asm.S:752: Error: suffix or operands invalid for `movq' arch/x86/crypto/aesni-intel_asm.S:753: Error...
```diff diff --git a/arch/x86/crypto/aesni-intel_asm.S b/arch/x86/crypto/aesni-intel_asm.S index 822846a9eba9..ff16756a51c1 100644 --- a/arch/x86/crypto/aesni-intel_asm.S +++ b/arch/x86/crypto/aesni-intel_asm.S @@ -749,8 +749,8 @@ _aesni_inc_init: movaps IV, CTR PSHUFB_XMM BSWAP_MASK CTR mov $1, TCTR_LOW - movq T...
0e152cd7c16832bd5cadee0c2e41d9959bc9b6f9
Analyze and fix the following issue in the Linux kernel code: x86, k8 nb: Fix boot crash: enable k8_northbridges unconditionally on AMD systems
Problem Details: de957628ce7c84764ff41331111036b3ae5bad0f changed setting of the x86_init.iommu.iommu_init function ptr only when GART IOMMU is found. One side effect of it is that num_k8_northbridges is not initialized anymore if not explicitly called. This resulted in uninitialized pointers in <arch/x86/kernel/cpu/i...
```diff diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index eb4092568f9e..ddb52b8d38a7 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -627,7 +627,7 @@ config GART_IOMMU bool "GART IOMMU support" if EMBEDDED default y select SWIOTLB - depends on X86_64 && PCI + depends on X86_64 && PCI && K8_NB ---he...
fc6ceea045031658d0b59af562369eae980b4370
Analyze and fix the following issue in the Linux kernel code: perf probe: Fix need_dwarf flag if lazy matching is used
Problem Details: Set need_dwarf if lazy matching pattern is specified, because lazy matching requires real source path for which we must use debuginfo. Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com> Cc: systemtap <systemtap@sources.redhat.com> Cc: DLE <dle-develop@lists.sourceforge.net> LKML-Reference: <2010031...
```diff diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c index 53181dbfe4a8..7c004b6ef24f 100644 --- a/tools/perf/util/probe-event.c +++ b/tools/perf/util/probe-event.c @@ -242,7 +242,7 @@ void parse_perf_probe_event(const char *str, struct probe_point *pp, /* Parse probe point */ parse_...
594087a04eea544356f9c52e83c1a9bc380ce80f
Analyze and fix the following issue in the Linux kernel code: perf probe: Fix probe_point buffer overrun
Problem Details: Fix probe_point array-size overrun problem. In some cases (e.g. inline function), one user-specified probe-point can be translated to many probe address, and it overruns pre-defined array-size. This also removes redundant MAX_PROBES macro definition. Signed-off-by: Masami Hiramatsu <mhiramat@redhat.co...
```diff diff --git a/tools/perf/builtin-probe.c b/tools/perf/builtin-probe.c index c30a33592340..152d6c9b1fa4 100644 --- a/tools/perf/builtin-probe.c +++ b/tools/perf/builtin-probe.c @@ -47,7 +47,6 @@ #include "util/probe-event.h" #define MAX_PATH_LEN 256 -#define MAX_PROBES 128 /* Session management structure *...
567e54790e5c07152a93b6de4d0210af8b77da87
Analyze and fix the following issue in the Linux kernel code: perf tools: Fix non-newt build
Problem Details: The use_browser needs to be in a file that is always built and also we need a browser__show_help stub in that case. Reported-by: Anton Blanchard <anton@samba.org> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Frédéric Weisbecker <fweisbec@gmail.com> Cc: Mike Galbraith <efault@gmx.de> C...
```diff diff --git a/tools/perf/perf.c b/tools/perf/perf.c index 9ff186b57cb7..0d4b9edfab12 100644 --- a/tools/perf/perf.c +++ b/tools/perf/perf.c @@ -16,6 +16,8 @@ #include "util/string.h" #include "util/debugfs.h" +bool use_browser; + const char perf_usage_string[] = "perf [--version] [--help] COMMAND [ARGS]";...
b6345879ccbd9b92864fbd7eb8ac48acdb4d6b15
Analyze and fix the following issue in the Linux kernel code: tracing: Do not record user stack trace from NMI context
Problem Details: A bug was found with Li Zefan's ftrace_stress_test that caused applications to segfault during the test. Placing a tracing_off() in the segfault code, and examining several traces, I found that the following was always the case. The lock tracer was enabled (lockdep being required) and userstack was en...
```diff diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index 484337d33959..e52683f7c3b2 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c @@ -1284,6 +1284,13 @@ ftrace_trace_userstack(struct ring_buffer *buffer, unsigned long flags, int pc) if (!(trace_flags & TRACE_ITER_USERSTACKTRACE)) retur...
a2f8071428ed9a0f06865f417c962421c9a6b488
Analyze and fix the following issue in the Linux kernel code: tracing: Disable buffer switching when starting or stopping trace
Problem Details: When the trace iterator is read, tracing_start() and tracing_stop() is called to stop tracing while the iterator is processing the trace output. These functions disable both the standard buffer and the max latency buffer. But if the wakeup tracer is running, it can switch these buffers between the two...
```diff diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index 60de37bd0f75..484337d33959 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c @@ -950,6 +950,8 @@ void tracing_start(void) goto out; } + /* Prevent the buffers from switching */ + arch_spin_lock(&ftrace_max_lock); buffer = globa...
6db823cf4b44f235b5e1da8ec1fe3c3cd63647fe
Analyze and fix the following issue in the Linux kernel code: Fix up .gitignore for top-level file patterns
Problem Details: Some of the gitignore file patters were explicitly meant to be only for the top level, but weren't marked that way, so they would trigger recursively in subdirectories too. Normally that was harmless, but at least "linux" happened to trigger elsewhere too. Fix it up. And other patterns in that sectio...
```diff diff --git a/.gitignore b/.gitignore index efab0ebec859..a2939fc10b22 100644 --- a/.gitignore +++ b/.gitignore @@ -34,14 +34,18 @@ modules.builtin # # Top-level generic files # -tags -TAGS -linux -vmlinux -vmlinuz -System.map -Module.markers -Module.symvers +/tags +/TAGS +/linux +/vmlinux +/vmlinuz +/System....
f5c9c9be267f73eda6a668ac81ddde56ed7fa793
Analyze and fix the following issue in the Linux kernel code: sparc: Convert sparc to use read/update_persistent_clock
Problem Details: This patch converts the sparc architecture to use the generic read_persistent_clock and update_persistent_clock interfaces, reducing the amount of arch specific code we have to maintain, and allowing for further cleanups in the future. [ davem: compile fix: Here's a version that compiles, you have to ...
```diff diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig index 4097f6a10860..0e8ec2ad8477 100644 --- a/arch/sparc/Kconfig +++ b/arch/sparc/Kconfig @@ -72,7 +72,7 @@ config ARCH_USES_GETTIMEOFFSET config GENERIC_CMOS_UPDATE bool - default y if SPARC64 + default y config GENERIC_CLOCKEVENTS bool diff --git ...
e69eae65523b457a3ac4262a66cfff57f2c924a9
Analyze and fix the following issue in the Linux kernel code: zlib: make new optimized inflate endian independent
Problem Details: Commit 6846ee5ca68d81e6baccf0d56221d7a00c1be18b ("zlib: Fix build of powerpc boot wrapper") made the new optimized inflate only available on arch's that define CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS. This patch will again enable the optimization for all arch's by defining our own endian independent ve...
```diff diff --git a/lib/zlib_inflate/inffast.c b/lib/zlib_inflate/inffast.c index 215447c55261..fa62fc7a94f9 100644 --- a/lib/zlib_inflate/inffast.c +++ b/lib/zlib_inflate/inffast.c @@ -8,21 +8,6 @@ #include "inflate.h" #include "inffast.h" -/* Only do the unaligned "Faster" variant when - * CONFIG_HAVE_EFFICIENT_...
5ceaa2f39bfa73c4398cd01e78f1c3ebde3d3383
Analyze and fix the following issue in the Linux kernel code: decompress: fix new decompressor for PIC
Problem Details: The ARM kernel decompressor wants to be able to relocate r/w data independently from the rest of the image, and we do this by ensuring that r/w data has global visibility. Define STATIC_RW_DATA to be empty to achieve this. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Cc: Alain Knaff <ala...
```diff diff --git a/include/linux/decompress/mm.h b/include/linux/decompress/mm.h index 5032b9a31ae7..ad5ec1d0475e 100644 --- a/include/linux/decompress/mm.h +++ b/include/linux/decompress/mm.h @@ -14,11 +14,21 @@ /* Code active when included from pre-boot environment: */ +/* + * Some architectures want to ensure...
0fbcae222b8aa3a47034a484e02e7fc14050c783
Analyze and fix the following issue in the Linux kernel code: drivers/char/mmtimer.c: eliminate useless code
Problem Details: The variable x is initialized twice to the same (side effect-free) expression. Drop one initialization. A simplified version of the semantic match that finds this problem is: (http://coccinelle.lip6.fr/) // <smpl> @forall@ idexpression *x; identifier f!=ERR_PTR; @@ x = f(...) ... when != x ( x = f(...
```diff diff --git a/drivers/char/mmtimer.c b/drivers/char/mmtimer.c index 918711aa56f3..04fd0d843b3b 100644 --- a/drivers/char/mmtimer.c +++ b/drivers/char/mmtimer.c @@ -546,7 +546,7 @@ static void mmtimer_tasklet(unsigned long data) { int nodeid = data; struct mmtimer_node *mn = &timers[nodeid]; - struct mmtimer...
582ef52a5d5650931f6d76c81d824bd98419ac8a
Analyze and fix the following issue in the Linux kernel code: w1: mxc_w1: move probe() and remove() to the dev* text area
Problem Details: This fixes the section mismatch warning for mxc_w1_probe() Cc: Evgeniy Polyakov <johnpol@2ka.mipt.ru> Cc: Sascha Hauer <s.hauer@pengutronix.de> Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@l...
```diff diff --git a/drivers/w1/masters/mxc_w1.c b/drivers/w1/masters/mxc_w1.c index 65244c02551b..492670358cbf 100644 --- a/drivers/w1/masters/mxc_w1.c +++ b/drivers/w1/masters/mxc_w1.c @@ -102,7 +102,7 @@ static u8 mxc_w1_ds2_touch_bit(void *data, u8 bit) return ((__raw_readb(ctrl_addr)) >> 3) & 0x1; } -static i...
6786073927c3ff3eb7fc3d2192e761e86fa0d352
Analyze and fix the following issue in the Linux kernel code: w1: fix test in ds2482_wait_1wire_idle()
Problem Details: With `while (++retries < DS2482_WAIT_IDLE_TIMEOUT)' retries reaches DS2482_WAIT_IDLE_TIMEOUT after the loop Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Cc: Evgeniy Polyakov <johnpol@2ka.mipt.ru> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux...
```diff diff --git a/drivers/w1/masters/ds2482.c b/drivers/w1/masters/ds2482.c index 406caa6a71cb..e5f74416d4b7 100644 --- a/drivers/w1/masters/ds2482.c +++ b/drivers/w1/masters/ds2482.c @@ -214,7 +214,7 @@ static int ds2482_wait_1wire_idle(struct ds2482_data *pdev) (++retries < DS2482_WAIT_IDLE_TIMEOUT)); } -...
a0880df0ccde8d551fc4d88c455acb2ee0801e26
Analyze and fix the following issue in the Linux kernel code: pps: serial clients support
Problem Details: Adds support, by using the PPS line discipline, for the PPS sources connected with the CD (Carrier Detect) pin of a serial port. [akpm@linux-foundation.org: fix cast size warnings] Signed-off-by: Rodolfo Giometti <giometti@linux.it> Cc: David Woodhouse <dwmw2@infradead.org> Cc: Greg KH <greg@kroah.com...
```diff diff --git a/drivers/pps/clients/Kconfig b/drivers/pps/clients/Kconfig index 43ccd3b644f0..4e801bd7254f 100644 --- a/drivers/pps/clients/Kconfig +++ b/drivers/pps/clients/Kconfig @@ -15,4 +15,11 @@ config PPS_CLIENT_KTIMER This driver can also be built as a module. If so, the module will be called pps-...
697fb85fcf21b5229a3072440222d14b05ef2abe
Analyze and fix the following issue in the Linux kernel code: pps: LinuxPPS clients support
Problem Details: Each PPS source can be registered/deregistered into the system by using special modules called "clients". They simply define the PPS sources' attributes and implement the time signal registration mechanism. This patch adds a special directory for such clients and adds a dummy client that can be usefu...
```diff diff --git a/drivers/pps/Kconfig b/drivers/pps/Kconfig index cc2eb8edb514..1afe4e03440f 100644 --- a/drivers/pps/Kconfig +++ b/drivers/pps/Kconfig @@ -30,4 +30,6 @@ config PPS_DEBUG messages to the system log. Select this if you are having a problem with PPS support and want to see more of what is goin...
216bf58f4092df33262bea498f0460657f4842a4
Analyze and fix the following issue in the Linux kernel code: Documentation: convert PCI-DMA-mapping.txt to use the generic DMA API
Problem Details: - replace the PCI DMA API (i.e. pci_dma_*) with the generic DMA API. - make the document more generic (use the PCI specific explanation as an example). [akpm@linux-foundation.org: fix things Randy noticed] Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Cc: James Bottomley <James.Bot...
```diff diff --git a/Documentation/PCI/PCI-DMA-mapping.txt b/Documentation/PCI/PCI-DMA-mapping.txt index ecad88d9fe59..52618ab069ad 100644 --- a/Documentation/PCI/PCI-DMA-mapping.txt +++ b/Documentation/PCI/PCI-DMA-mapping.txt @@ -1,12 +1,12 @@ - Dynamic DMA mapping - =================== + Dynamic DMA mapping...
13aa9a6b0f2371d2ce0de57c2ede62ab7a787157
Analyze and fix the following issue in the Linux kernel code: pid_ns: zap_pid_ns_processes: use SEND_SIG_NOINFO instead of force_sig()
Problem Details: zap_pid_ns_processes() uses force_sig(SIGKILL) to ensure SIGKILL will be delivered to sub-namespace inits as well. This is correct, but we are going to change force_sig_info() semantics. See http://bugzilla.kernel.org/show_bug.cgi?id=15395#c31 We can use send_sig_info(SEND_SIG_NOINFO) instead, since...
```diff diff --git a/kernel/pid_namespace.c b/kernel/pid_namespace.c index 86b3796b0436..79aac93acf99 100644 --- a/kernel/pid_namespace.c +++ b/kernel/pid_namespace.c @@ -161,13 +161,12 @@ void zap_pid_ns_processes(struct pid_namespace *pid_ns) rcu_read_lock(); /* - * Use force_sig() since it clears SIGNAL_UN...
2f95d51308a72288d877c3c8dc4597c9a93f7344
Analyze and fix the following issue in the Linux kernel code: ipmi: fix slave_addrs setting to actually work
Problem Details: Actually use the slave_addrs module parameter if it is specified, and make things consistent about passing zero in for the slave address for the default. Signed-off-by: Bela Lubkin <blubkin@vmware.com> Signed-off-by: Corey Minyard <minyard@acm.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.o...
```diff diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c index c234ada64565..4462b113ba3f 100644 --- a/drivers/char/ipmi/ipmi_si_intf.c +++ b/drivers/char/ipmi/ipmi_si_intf.c @@ -1201,7 +1201,7 @@ static int regsizes[SI_MAX_PARMS]; static unsigned int num_regsizes; static int...
e34112e3966fc466ced2698e6c196bb50b1ee20e
Analyze and fix the following issue in the Linux kernel code: m32r: use generic ptrace_resume code
Problem Details: Use the generic ptrace_resume code for PTRACE_SYSCALL, PTRACE_CONT, PTRACE_KILL and PTRACE_SINGLESTEP. This implies defining arch_has_single_step in <asm/ptrace.h> and implementing the user_enable_single_step and user_disable_single_step functions, which also causes the breakpoint information to be cl...
```diff diff --git a/arch/m32r/include/asm/ptrace.h b/arch/m32r/include/asm/ptrace.h index a0755b982028..840a1231edeb 100644 --- a/arch/m32r/include/asm/ptrace.h +++ b/arch/m32r/include/asm/ptrace.h @@ -120,6 +120,8 @@ struct pt_regs { #include <asm/m32r.h> /* M32R_PSW_BSM, M32R_PSW_BPM */ +#define arch_has_singl...
290ba3aef58ff21c977585ff6b687e457f80bf54
Analyze and fix the following issue in the Linux kernel code: cris arch-v32: use generic ptrace_resume code
Problem Details: Use the generic ptrace_resume code for PTRACE_SYSCALL, PTRACE_CONT, PTRACE_KILL and PTRACE_SINGLESTEP. This implies defining arch_has_single_step in <asm/ptrace.h> and implementing the user_enable_single_step and user_disable_single_step functions, which also causes the breakpoint information to be cl...
```diff diff --git a/arch/cris/arch-v32/kernel/ptrace.c b/arch/cris/arch-v32/kernel/ptrace.c index dd401473f5b5..f4ebd1e7d0f5 100644 --- a/arch/cris/arch-v32/kernel/ptrace.c +++ b/arch/cris/arch-v32/kernel/ptrace.c @@ -78,6 +78,35 @@ int put_reg(struct task_struct *task, unsigned int regno, unsigned long data) return...
6d75ca10225be4c7509026f9b61c740b22e734e4
Analyze and fix the following issue in the Linux kernel code: xtensa: use generic ptrace_resume code
Problem Details: Use the generic ptrace_resume code for PTRACE_SYSCALL, PTRACE_CONT, PTRACE_KILL and PTRACE_SINGLESTEP. This implies defining arch_has_single_step in <asm/ptrace.h> and implementing the user_enable_single_step and user_disable_single_step functions, which also causes the breakpoint information to be cl...
```diff diff --git a/arch/xtensa/include/asm/ptrace.h b/arch/xtensa/include/asm/ptrace.h index 905e1e619654..3c549f798727 100644 --- a/arch/xtensa/include/asm/ptrace.h +++ b/arch/xtensa/include/asm/ptrace.h @@ -113,6 +113,7 @@ struct pt_regs { #include <variant/core.h> +# define arch_has_single_step() (1) # defin...
1bd095083558928cc3b36b826422d69bcd743dca
Analyze and fix the following issue in the Linux kernel code: um: use generic ptrace_resume code
Problem Details: Use the generic ptrace_resume code for PTRACE_SYSCALL, PTRACE_CONT, PTRACE_KILL and PTRACE_SINGLESTEP. This implies defining arch_has_single_step in <asm/ptrace.h> and implementing the user_enable_single_step and user_disable_single_step functions, which also causes the breakpoint information to be cl...
```diff diff --git a/arch/um/include/asm/ptrace-generic.h b/arch/um/include/asm/ptrace-generic.h index 6c8899013c92..2cd899f75a3c 100644 --- a/arch/um/include/asm/ptrace-generic.h +++ b/arch/um/include/asm/ptrace-generic.h @@ -16,6 +16,8 @@ struct pt_regs { struct uml_pt_regs regs; }; +#define arch_has_single_step...
857fb252a1858ccded2e31ee98c6c0ab79c07999
Analyze and fix the following issue in the Linux kernel code: h8300: use generic ptrace_resume code
Problem Details: Use the generic ptrace_resume code for PTRACE_SYSCALL, PTRACE_CONT, PTRACE_KILL and PTRACE_SINGLESTEP. This implies defining arch_has_single_step in <asm/ptrace.h> and implementing the user_enable_single_step and user_disable_single_step functions, which also causes the breakpoint information to be cl...
```diff diff --git a/arch/h8300/include/asm/ptrace.h b/arch/h8300/include/asm/ptrace.h index c2e05e4b512e..d866c0efba87 100644 --- a/arch/h8300/include/asm/ptrace.h +++ b/arch/h8300/include/asm/ptrace.h @@ -55,6 +55,8 @@ struct pt_regs { /* Find the stack offset for a register, relative to thread.esp0. */ #define PT_...
1d8393171b1f6c30a889fd7cb16fc193f689923c
Analyze and fix the following issue in the Linux kernel code: avr32: use generic ptrace_resume code
Problem Details: Use the generic ptrace_resume code for PTRACE_SYSCALL, PTRACE_CONT, PTRACE_KILL and PTRACE_SINGLESTEP. This implies defining arch_has_single_step in <asm/ptrace.h> and implementing the user_enable_single_step and user_disable_single_step functions, which also causes the breakpoint information to be cl...
```diff diff --git a/arch/avr32/include/asm/ptrace.h b/arch/avr32/include/asm/ptrace.h index 9e2d44f4e0fe..e53dd0d900f5 100644 --- a/arch/avr32/include/asm/ptrace.h +++ b/arch/avr32/include/asm/ptrace.h @@ -124,6 +124,8 @@ struct pt_regs { #include <asm/ocd.h> +#define arch_has_single_step() (1) + #define arch_p...
440e6ca79aebdc274ce4c625a6f42c8bf3c7bc91
Analyze and fix the following issue in the Linux kernel code: arm: use generic ptrace_resume code
Problem Details: Use the generic ptrace_resume code for PTRACE_SYSCALL, PTRACE_CONT, PTRACE_KILL and PTRACE_SINGLESTEP. This implies defining arch_has_single_step in <asm/ptrace.h> and implementing the user_enable_single_step and user_disable_single_step functions, which also causes the breakpoint information to be cl...
```diff diff --git a/arch/arm/include/asm/ptrace.h b/arch/arm/include/asm/ptrace.h index eec6e897ceb2..9dcb11e59026 100644 --- a/arch/arm/include/asm/ptrace.h +++ b/arch/arm/include/asm/ptrace.h @@ -128,6 +128,8 @@ struct pt_regs { #ifdef __KERNEL__ +#define arch_has_single_step() (1) + #define user_mode(regs) \ ...
fd341abba65e3d93fc24c132e4c0278d18b6d2fc
Analyze and fix the following issue in the Linux kernel code: alpha: use generic ptrace_resume code
Problem Details: Use the generic ptrace_resume code for PTRACE_SYSCALL, PTRACE_CONT, PTRACE_KILL and PTRACE_SINGLESTEP. This implies defining arch_has_single_step in <asm/ptrace.h> and implementing the user_enable_single_step and user_disable_single_step functions, which also causes the breakpoint information to be cl...
```diff diff --git a/arch/alpha/include/asm/ptrace.h b/arch/alpha/include/asm/ptrace.h index 32c7a5cddd59..65cf3e28e2f4 100644 --- a/arch/alpha/include/asm/ptrace.h +++ b/arch/alpha/include/asm/ptrace.h @@ -68,6 +68,7 @@ struct switch_stack { #ifdef __KERNEL__ +#define arch_has_single_step() (1) #define user_mod...
7baab93f9297da3e42a8cecfbf91d5f22f415500
Analyze and fix the following issue in the Linux kernel code: nodemask: fix the declaration of NODEMASK_ALLOC()
Problem Details: we can't declarate two variable at the same scope by NODEMASK_ALLOC(). This patch fixes it. Signed-off-by: Miao Xie <miaox@cn.fujitsu.com> Cc: David Rientjes <rientjes@google.com> Cc: Lee Schermerhorn <lee.schermerhorn@hp.com> Cc: Nick Piggin <npiggin@suse.de> Cc: Paul Menage <menage@google.com> Cc: ...
```diff diff --git a/include/linux/nodemask.h b/include/linux/nodemask.h index c4fa64b585ff..dba35e413371 100644 --- a/include/linux/nodemask.h +++ b/include/linux/nodemask.h @@ -483,7 +483,7 @@ static inline int num_node_state(enum node_states state) type *name = kmalloc(sizeof(*name), gfp_flags) #define NODEMASK...
867578cbccb0893cc14fc29c670f7185809c90d6
Analyze and fix the following issue in the Linux kernel code: memcg: fix oom kill behavior
Problem Details: In current page-fault code, handle_mm_fault() -> ... -> mem_cgroup_charge() -> map page or handle error. -> check return code. If page fault's return code is VM_FAULT_OOM, page_fault_out_of_memory() is called. But if it's caused by memcg, OOM should have been already invoked. Then, I added ...
```diff diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h index 1f9b119f4ace..44301c6affa8 100644 --- a/include/linux/memcontrol.h +++ b/include/linux/memcontrol.h @@ -124,7 +124,6 @@ static inline bool mem_cgroup_disabled(void) return false; } -extern bool mem_cgroup_oom_called(struct task_stru...
0263c12c12ccc90edc9d856fa839f8936183e6d1
Analyze and fix the following issue in the Linux kernel code: memcg: fix typos in memcg_test.txt
Problem Details: Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name> Reviewed-by: Balbir Singh <balbir@linux.vnet.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/Documentation/cgroups/memcg_test.txt b/Documentation/cgroups/memcg_test.txt index 4d32e0ed1917..f7f68b2ac199 100644 --- a/Documentation/cgroups/memcg_test.txt +++ b/Documentation/cgroups/memcg_test.txt @@ -337,7 +337,7 @@ Under below explanation, we assume CONFIG_MEM_RES_CTRL_SWAP=y. race and loc...
4ab78683c17d739c2a2077141dcf81a02b7fb57e
Analyze and fix the following issue in the Linux kernel code: cgroups: fix race between userspace and kernelspace
Problem Details: Notify userspace about cgroup removing only after rmdir of cgroup directory to avoid race between userspace and kernelspace. eventfd are used to notify about two types of event: - control file-specific, like crossing memory threshold; - cgroup removing. To understand what really happen, userspace c...
```diff diff --git a/kernel/cgroup.c b/kernel/cgroup.c index ea94984a3895..87441fc75663 100644 --- a/kernel/cgroup.c +++ b/kernel/cgroup.c @@ -795,28 +795,15 @@ static struct inode *cgroup_new_inode(mode_t mode, struct super_block *sb) static int cgroup_call_pre_destroy(struct cgroup *cgrp) { struct cgroup_subsys *...
2e72b6347c9459e6cff5634ddc815485bae6985f
Analyze and fix the following issue in the Linux kernel code: memcg: implement memory thresholds
Problem Details: It allows to register multiple memory and memsw thresholds and gets notifications when it crosses. To register a threshold application need: - create an eventfd; - open memory.usage_in_bytes or memory.memsw.usage_in_bytes; - write string like "<event_fd> <memory.usage_in_bytes> <threshold>" to cgrou...
```diff diff --git a/Documentation/cgroups/memory.txt b/Documentation/cgroups/memory.txt index 1f59a1a38bd9..268ab08222dd 100644 --- a/Documentation/cgroups/memory.txt +++ b/Documentation/cgroups/memory.txt @@ -468,7 +468,24 @@ Note: More type of pages(e.g. file cache, shmem,) will be supported by other - All of movin...
0dea116876eefc9c7ca9c5d74fe665481e499fa3
Analyze and fix the following issue in the Linux kernel code: cgroup: implement eventfd-based generic API for notifications
Problem Details: This patchset introduces eventfd-based API for notifications in cgroups and implements memory notifications on top of it. It uses statistics in memory controler to track memory usage. Output of time(1) on building kernel on tmpfs: Root cgroup before changes: make -j2 506.37 user 60.93s system 193%...
```diff diff --git a/Documentation/cgroups/cgroups.txt b/Documentation/cgroups/cgroups.txt index c0358c30c64f..fd588ff0e296 100644 --- a/Documentation/cgroups/cgroups.txt +++ b/Documentation/cgroups/cgroups.txt @@ -23,6 +23,7 @@ CONTENTS: 2.1 Basic Usage 2.2 Attaching processes 2.3 Mounting hierarchies by name...
024914477e15ef8b17f271ec47f1bb8a589f0806
Analyze and fix the following issue in the Linux kernel code: memcg: move charges of anonymous swap
Problem Details: This patch is another core part of this move-charge-at-task-migration feature. It enables moving charges of anonymous swaps. To move the charge of swap, we need to exchange swap_cgroup's record. In current implementation, swap_cgroup's record is protected by: - page lock: if the entry is on swap ...
```diff diff --git a/Documentation/cgroups/memory.txt b/Documentation/cgroups/memory.txt index e726fb0df719..1f59a1a38bd9 100644 --- a/Documentation/cgroups/memory.txt +++ b/Documentation/cgroups/memory.txt @@ -420,6 +420,8 @@ NOTE2: It is recommended to set the soft limit always below the hard limit, Users can move...
8ca712ea84728531d36841ca8f98f9e8680bcf4e
Analyze and fix the following issue in the Linux kernel code: cgroups: fix CONTENTS in cgroups documentation
Problem Details: Add a forgotten item into CONTENTS. Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name> Acked-by: Paul Menage <menage@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/Documentation/cgroups/cgroups.txt b/Documentation/cgroups/cgroups.txt index 764007b63921..c0358c30c64f 100644 --- a/Documentation/cgroups/cgroups.txt +++ b/Documentation/cgroups/cgroups.txt @@ -22,6 +22,7 @@ CONTENTS: 2. Usage Examples and Syntax 2.1 Basic Usage 2.2 Attaching processes + 2....
aae8aab40367036931608fdaf9e2dc568b516f19
Analyze and fix the following issue in the Linux kernel code: cgroups: revamp subsys array
Problem Details: This patch series provides the ability for cgroup subsystems to be compiled as modules both within and outside the kernel tree. This is mainly useful for classifiers and subsystems that hook into components that are already modules. cls_cgroup and blkio-cgroup serve as the example use cases for this ...
```diff diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h index 14160b5b693f..28319a9fe569 100644 --- a/include/linux/cgroup.h +++ b/include/linux/cgroup.h @@ -40,13 +40,19 @@ extern int cgroupstats_build(struct cgroupstats *stats, extern const struct file_operations proc_cgroup_operations; -/* Define t...
4c98ecaf350737cd424eb94140e9e9f1a3408956
Analyze and fix the following issue in the Linux kernel code: scripts/kernel-doc: fix empty function description section
Problem Details: scripts/kernel-doc mishandles a function that has a multi-line function short description and no function parameters. The observed problem was from drivers/scsi/scsi_netlink.c: /** * scsi_netlink_init - Called by SCSI subsystem to intialize * the SCSI transport netlink interface * **/ kernel-do...
```diff diff --git a/scripts/kernel-doc b/scripts/kernel-doc index 208ad3b0ca51..c7865c362d28 100755 --- a/scripts/kernel-doc +++ b/scripts/kernel-doc @@ -2103,7 +2103,7 @@ sub process_file($) { $section = $newsection; } elsif (/$doc_end/) { - if ($contents ne "") { + if (($contents ne "") && ($contents ne...
70bace8c1edefa700c7f7af522c5374ef63860ae
Analyze and fix the following issue in the Linux kernel code: Documentation/vm/: split txt and source files
Problem Details: Documentation/vm/: Expose example and tool source files in the Documentation/ directory in their own files instead of being buried (almost hidden) in readme/txt files. This should help to prevent bitrot. This will make them more visible/usable to users who may need to use them, to developers who may n...
```diff diff --git a/Documentation/vm/00-INDEX b/Documentation/vm/00-INDEX index e57d6a9dd32b..dca82d7c83d8 100644 --- a/Documentation/vm/00-INDEX +++ b/Documentation/vm/00-INDEX @@ -4,23 +4,35 @@ active_mm.txt - An explanation from Linus about tsk->active_mm vs tsk->mm. balance - various information on memory bal...
d49129accc21ddb2e779d375dacafb612b1bd28d
Analyze and fix the following issue in the Linux kernel code: Documentation/laptop/: split txt and source files
Problem Details: Documentation/laptops/laptop-mode.txt: Expose example and tool source files in the Documentation/ directory in their own files instead of being buried (almost hidden) in readme/txt files. This should help to prevent bitrot. This will make them more visible/usable to users who may need to use them, to ...
```diff diff --git a/Documentation/Makefile b/Documentation/Makefile index 78d74f6a3834..bde1ca1fbd2b 100644 --- a/Documentation/Makefile +++ b/Documentation/Makefile @@ -1,3 +1,3 @@ obj-m := DocBook/ accounting/ auxdisplay/ connector/ \ - filesystems/configfs/ ia64/ networking/ \ + filesystems/configfs/ ia64/ laptops...
e61863099f58e458f08c101da87da752a1e009f5
Analyze and fix the following issue in the Linux kernel code: Documentation/timers/: split txt and source files
Problem Details: Documentation/timers/hpet.txt: Expose example and tool source files in the Documentation/timers/ directory in their own files instead of being buried (almost hidden) in readme/txt files. This should help to prevent bitrot. This will make them more visible/usable to users who may need to use them, to d...
```diff diff --git a/Documentation/Makefile b/Documentation/Makefile index 94b945733534..78d74f6a3834 100644 --- a/Documentation/Makefile +++ b/Documentation/Makefile @@ -1,3 +1,3 @@ obj-m := DocBook/ accounting/ auxdisplay/ connector/ \ filesystems/configfs/ ia64/ networking/ \ - pcmcia/ spi/ video4linux/ vm/ watch...
ad25ad979a309963e580015d57e4ec7da72bb7d4
Analyze and fix the following issue in the Linux kernel code: ufs: make solaris fsck happy
Problem Details: Alex Viskovatoff let me know that after copying data to solaris's ufs from linux, solaris's fsck sees some errors in cylinder summary information. This is because of solaris expects find some data on another places, then curernt implementation save it. This patch fixes this issue. It is tested by me,...
```diff diff --git a/fs/ufs/ufs_fs.h b/fs/ufs/ufs_fs.h index eb9c0f2d19ec..6943ec677c0b 100644 --- a/fs/ufs/ufs_fs.h +++ b/fs/ufs/ufs_fs.h @@ -233,11 +233,16 @@ typedef __u16 __bitwise __fs16; */ #define ufs_cbtocylno(bno) \ ((bno) * uspi->s_nspf / uspi->s_spc) -#define ufs_cbtorpos(bno) \ +#define ufs_cbtorpos(bn...
d7d4d849b4e3acc405ec222884936800ffb26d48
Analyze and fix the following issue in the Linux kernel code: drivers/char/mem.c: cleanups
Problem Details: - fix switch statement layout - fix whitespace stuff - fix comment layout - remove unneeded inlining - use __weak - remove trailing whitespace - move uncached_access() inside `#ifndef __HAVE_PHYS_MEM_ACCESS_PROT' - it is otherwise unused. Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> ...
```diff diff --git a/drivers/char/mem.c b/drivers/char/mem.c index e3f5577cbce3..1f3215ac085b 100644 --- a/drivers/char/mem.c +++ b/drivers/char/mem.c @@ -3,7 +3,7 @@ * * Copyright (C) 1991, 1992 Linus Torvalds * - * Added devfs support. + * Added devfs support. * Jan-11-1998, C. Scott Ananian <cananian...
dcefafb6ac90ece8d68a6c203105f3d313e52da4
Analyze and fix the following issue in the Linux kernel code: /dev/mem: dont allow seek to last page
Problem Details: So as to return a uniform error -EOVERFLOW instead of a random one: # kmem-seek 0xfffffffffffffff0 seek /dev/kmem: Device or resource busy # kmem-seek 0xfffffffffffffff1 seek /dev/kmem: Block device required Suggested by OGAWA Hirofumi. Cc: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> Reviewed-by: K...
```diff diff --git a/drivers/char/mem.c b/drivers/char/mem.c index 48788db4e280..e3f5577cbce3 100644 --- a/drivers/char/mem.c +++ b/drivers/char/mem.c @@ -708,16 +708,23 @@ static loff_t memory_lseek(struct file * file, loff_t offset, int orig) mutex_lock(&file->f_path.dentry->d_inode->i_mutex); switch (orig) { -...
a8b1925430339be1464a9a028754d94984dacfdb
Analyze and fix the following issue in the Linux kernel code: video: fix first line of kernel-doc for a few functions
Problem Details: The function name must be followed by a space, hypen, space, and a short description. Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/drivers/video/modedb.c b/drivers/video/modedb.c index 0129f1bc3522..b895aae41630 100644 --- a/drivers/video/modedb.c +++ b/drivers/video/modedb.c @@ -893,7 +893,7 @@ const struct fb_videomode *fb_match_mode(const struct fb_var_screeninfo *var, } /** - * fb_add_videomode: adds videomode entry to...
2c0e0c88422033c9b6162bf7875aecdd095130b7
Analyze and fix the following issue in the Linux kernel code: drivers/video/via: fix continuation line formats
Problem Details: String constants that are continued on subsequent lines with \ will cause spurious whitespace in the resulting output. Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Lin...
```diff diff --git a/drivers/video/via/dvi.c b/drivers/video/via/dvi.c index 0e0852e6df26..abe59b8c7a05 100644 --- a/drivers/video/via/dvi.c +++ b/drivers/video/via/dvi.c @@ -411,8 +411,8 @@ static void dvi_get_panel_size_from_DDCv1(struct tmds_chip_information tmds_setting->max_vres = 1080; break; default: - ...
55a23c4af83df9c8fdf55690a09a3f0a92bd127b
Analyze and fix the following issue in the Linux kernel code: intelfb: new maintainer
Problem Details: It seems that Sylvain no longer maintain the intelfb driver. Two weeks ago I had a short mail conversation with Jean regarding who can replace him. Well I will do it, because I know the driver and use it very often. Attached is a patch which update the maintainer file to make bug reporting easier. ...
```diff diff --git a/MAINTAINERS b/MAINTAINERS index a39449278a19..22116520e72a 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2811,7 +2811,7 @@ S: Maintained F: drivers/input/ INTEL FRAMEBUFFER DRIVER (excluding 810 and 815) -M: Sylvain Meyer <sylvain.meyer@worldonline.fr> +M: Maik Broemme <mbroemme@plusserver.de>...
b32bfc3843f7fd090d30853d98866d923cfb8fff
Analyze and fix the following issue in the Linux kernel code: broadsheetfb: support storing waveform
Problem Details: This patch adds waveform storing capability to broadsheetfb. It uses the firmware class to retrieve the waveform, and the request to initiate the waveform storing is done via a driver sysfs entry, loadstore_waveform. Broadsheet is a framebuffer device. It is slightly different from a typical framebuf...
```diff diff --git a/drivers/video/broadsheetfb.c b/drivers/video/broadsheetfb.c index 57dc1a0065c2..ebda6876d3a9 100644 --- a/drivers/video/broadsheetfb.c +++ b/drivers/video/broadsheetfb.c @@ -29,6 +29,7 @@ #include <linux/init.h> #include <linux/platform_device.h> #include <linux/list.h> +#include <linux/firmware...
415559fbf2353f4271a4cd6e11259b8bbc97cc33
Analyze and fix the following issue in the Linux kernel code: viafb: rework color setting
Problem Details: This is a rewritten version of viafb_setcolreg. The hardware register writes were split up and moved to hw.c where they belong as this is really low level stuff. It was made dual fb aware. Furthermore viafb_setcmap was removed as the problem with 8bpp originated from a bug in writing multiple color ...
```diff diff --git a/drivers/video/via/hw.c b/drivers/video/via/hw.c index 47d9024d7c30..1823253a6f40 100644 --- a/drivers/video/via/hw.c +++ b/drivers/video/via/hw.c @@ -691,7 +691,7 @@ void viafb_set_primary_color_depth(u8 depth) DEBUG_MSG(KERN_DEBUG "viafb_set_primary_color_depth(%d)\n", depth); switch (depth)...
dbb7884be758ca9ac5ec84cbe7eb21f21bce9d8f
Analyze and fix the following issue in the Linux kernel code: viafb: some virtual_xres handling fixes
Problem Details: Do not require the virtual_xres to be aligned as line length is for such purposes. Calculate always the smallest line length required. Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> Cc: Joseph Chan <JosephChan@via.com.tw> Cc: Scott Fang <ScottFang@viatech.com.cn> Signed-off-by: A...
```diff diff --git a/drivers/video/via/viafbdev.c b/drivers/video/via/viafbdev.c index bd8db75236ab..0fe748d66a6c 100644 --- a/drivers/video/via/viafbdev.c +++ b/drivers/video/via/viafbdev.c @@ -107,8 +107,7 @@ static void viafb_update_fix(struct fb_info *info) info->fix.visual = bpp == 8 ? FB_VISUAL_PSEUDOCOLOR...
bd140691bda491b417a6d1e81b03416b54cb8d8d
Analyze and fix the following issue in the Linux kernel code: viafb: rework color checking
Problem Details: Make color checking a bit more tolerant in what values it allows and more fine grained to later support 15 and 30 bits formats. It splits the filling of the color information in var to a seperate function and sets some color related values in var that where previously untouched. This could be a bug f...
```diff diff --git a/drivers/video/via/hw.c b/drivers/video/via/hw.c index ed8d78a35b29..47d9024d7c30 100644 --- a/drivers/video/via/hw.c +++ b/drivers/video/via/hw.c @@ -2622,36 +2622,6 @@ void viafb_fill_var_timing_info(struct fb_var_screeninfo *var, int refresh, } crt_reg = crt_timing[index].crtc; - switch (va...
0d3580d40cc38bbaf63d0b2756931e0ae241a9ea
Analyze and fix the following issue in the Linux kernel code: asiliantfb: fix test of unsigned in asiliant_calc_dclk2()
Problem Details: Ftarget, Fret, n and m are unsigned so the tests did not work. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Cc: Andres Salomon <dilinger@debian.org> Cc: Krzysztof Helt <krzysztof.h1@poczta.fm> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-fo...
```diff diff --git a/drivers/video/asiliantfb.c b/drivers/video/asiliantfb.c index 9fe90ce928fb..e70bc225fe31 100644 --- a/drivers/video/asiliantfb.c +++ b/drivers/video/asiliantfb.c @@ -140,7 +140,7 @@ static void asiliant_calc_dclk2(u32 *ppixclock, u8 *dclk2_m, u8 *dclk2_n, u8 *dc /* 3 <= m <= 257 */ if (m >=...
6e3e37a5a7c91045497553bcbd6a5faea98b21b3
Analyze and fix the following issue in the Linux kernel code: coredump: plug a memory leak situation on dump_seek()
Problem Details: After having started writing the coredump, if filesystem reports an error anytime while writing part of the core file, we would leak a memory page when bailing out. Signed-off-by: André Goddard Rosa <andre.goddard@gmail.com> Acked-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Cc: Alexander Viro...
```diff diff --git a/include/linux/coredump.h b/include/linux/coredump.h index b3c91d7cede4..8ba66a9d9022 100644 --- a/include/linux/coredump.h +++ b/include/linux/coredump.h @@ -16,6 +16,8 @@ static inline int dump_write(struct file *file, const void *addr, int nr) static inline int dump_seek(struct file *file, lof...
87f530d8f1733651f3e34b81c801d6e1bb635936
Analyze and fix the following issue in the Linux kernel code: drivers/block/floppy.c: add debug_dcl(...) macro
Problem Details: Converted #ifdef DCL_DEBUG if (test) DPRINTK(...); #endif to debug_dcl(test, ...); Signed-off-by: Joe Perches <joe@perches.com> Cc: Stephen Hemminger <shemminger@vyatta.com> Cc: Jens Axboe <jens.axboe@oracle.com> Cc: Marcin Slusarz <marcin.slusarz@gmail.com> Cc: Bartlomiej Zolnierkiewicz <bzolnier@gma...
```diff diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c index 50bd9e9370dd..41f366327193 100644 --- a/drivers/block/floppy.c +++ b/drivers/block/floppy.c @@ -152,6 +152,15 @@ #define DEBUGT 2 #define DCL_DEBUG /* debug disk change line */ +#ifdef DCL_DEBUG +#define debug_dcl(test, fmt, args...) \ + do...
53bddb4e9f3f53df02a783751984ddeade71b085
Analyze and fix the following issue in the Linux kernel code: nommu: fix build breakage
Problem Details: Commit 34e55232e59f7b19050267a05ff1226e5cd122a5 ("mm: avoid false sharing of mm_counter") added sync_mm_rss() for syncing loosely accounted rss counters. It's for CONFIG_MMU but sync_mm_rss is called even in NOMMU enviroment (kerne/exit.c, fs/exec.c). Above commit doesn't handle it well. This patch ...
```diff diff --git a/include/linux/mm.h b/include/linux/mm.h index 3899395a03de..7f693b272c4a 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -971,7 +971,13 @@ static inline void setmax_mm_hiwater_rss(unsigned long *maxrss, *maxrss = hiwater_rss; } +#if defined(SPLIT_RSS_COUNTING) void sync_mm_rss(st...
104f9c471ffb425fd081074ef31521b38d77592a
Analyze and fix the following issue in the Linux kernel code: xtensa: Fix unnecessary setting of xtime
Problem Details: xtensa supports read_persisitent_clock(), so there is no reason for the arch specific code to be setting xtime. Setting xtime will be done by the generic timekeeping code. Signed-off-by: John Stultz <johnstul@us.ibm.com> Cc: Chris Zankel <chris@zankel.net> Cc: Ingo Molnar <mingo@elte.hu> Signed-off-b...
```diff diff --git a/arch/xtensa/kernel/time.c b/arch/xtensa/kernel/time.c index 19f7df30937f..19df764f6399 100644 --- a/arch/xtensa/kernel/time.c +++ b/arch/xtensa/kernel/time.c @@ -60,11 +60,6 @@ static struct irqaction timer_irqaction = { void __init time_init(void) { - /* FIXME: xtime&wall_to_monotonic are set ...
802702e0c2618465b813242d4dfee6a233ba0beb
Analyze and fix the following issue in the Linux kernel code: timer: Try to survive timer callback preempt_count leak
Problem Details: If a timer callback leaks preempt_count we currently assert a BUG(). That makes it unnecessarily hard to retrieve information about the problem especially on laptops and headless stations. There is a decent chance to survive the preempt_count leak by restoring the preempt_count to the value before the...
```diff diff --git a/kernel/timer.c b/kernel/timer.c index 45229694dc6a..7e12e7bc7ce6 100644 --- a/kernel/timer.c +++ b/kernel/timer.c @@ -982,9 +982,15 @@ static void call_timer_fn(struct timer_list *timer, void (*fn)(unsigned long), lock_map_release(&lockdep_map); if (preempt_count != preempt_count()) { - prin...
06f71b922ce5a05352acd706564ca4ae1f2add0e
Analyze and fix the following issue in the Linux kernel code: timer: Print function name for timer callbacks modifying preemption count
Problem Details: A function scheduled with a timer must not exit with a different preempt count than it was entered. To make helping users running into the corresponding BUG() easier also print the name of the bad function not only its address. [ tglx: Sanitized printk ] Signed-off-by: Uwe Kleine-König <u.kleine-koen...
```diff diff --git a/kernel/timer.c b/kernel/timer.c index c61a7949387f..f82f4bfe2d88 100644 --- a/kernel/timer.c +++ b/kernel/timer.c @@ -1027,11 +1027,8 @@ static inline void __run_timers(struct tvec_base *base) lock_map_release(&lockdep_map); if (preempt_count != preempt_count()) { - printk(KERN_ERR ...
a72042c08a8ba3b685dc9cba62c57c48188ef2c8
Analyze and fix the following issue in the Linux kernel code: RDMA/nes: Fix CX4 link problem in back-to-back configuration
Problem Details: Commit 09124e19 ("RDMA/nes: Add support for KR device id 0x0110") took out too much code and broke CX4 link detection in back-to-back configuration. Put back the code that does the link check. Signed-off-by: Chien Tung <chien.tin.tung@intel.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
```diff diff --git a/drivers/infiniband/hw/nes/nes_nic.c b/drivers/infiniband/hw/nes/nes_nic.c index a1d79b6856ac..91fdde382e82 100644 --- a/drivers/infiniband/hw/nes/nes_nic.c +++ b/drivers/infiniband/hw/nes/nes_nic.c @@ -1595,7 +1595,6 @@ struct net_device *nes_netdev_init(struct nes_device *nesdev, struct nes_vnic...
829b6c1ef488856c6a46a2f705f5068062d5f34c
Analyze and fix the following issue in the Linux kernel code: timer stats: Fix del_timer_sync() and try_to_del_timer_sync()
Problem Details: These functions forgot to run timer_stats_timer_clear_start_info(). It's unobvious what effect this has and whether it matters much - we won't be printing it out anyway if the timer's detached. Untested, just an Ingo trollpatch. [ Nevertheless correct - tglx ] Signed-off-by: Andrew Morton <akpm@lin...
```diff diff --git a/kernel/timer.c b/kernel/timer.c index c61a7949387f..fc965eae0e87 100644 --- a/kernel/timer.c +++ b/kernel/timer.c @@ -880,6 +880,7 @@ int try_to_del_timer_sync(struct timer_list *timer) if (base->running_timer == timer) goto out; + timer_stats_timer_clear_start_info(timer); ret = 0; if (...
80a05b9ffa7dc13f6693902dd8999a2b61a3a0d7
Analyze and fix the following issue in the Linux kernel code: clockevents: Sanitize min_delta_ns adjustment and prevent overflows
Problem Details: The current logic which handles clock events programming failures can increase min_delta_ns unlimited and even can cause overflows. Sanitize it by: - prevent zero increase when min_delta_ns == 1 - limiting min_delta_ns to a jiffie - bail out if the jiffie limit is hit - add retries stats for /proc...
```diff diff --git a/include/linux/clockchips.h b/include/linux/clockchips.h index 0cf725bdd2a1..fc53492b6ad7 100644 --- a/include/linux/clockchips.h +++ b/include/linux/clockchips.h @@ -73,6 +73,7 @@ enum clock_event_nofitiers { * @list: list head for the management code * @mode: operating mode assigned by the m...
c3746a07f13f8711885fd3909c03477a1b47ab82
Analyze and fix the following issue in the Linux kernel code: ASoC: tlv320dac33: Start/stop sequence change
Problem Details: To avoid race condition especially in FIFO modes the sequence for enabling and disabling the codec need to be changed. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
```diff diff --git a/sound/soc/codecs/tlv320dac33.c b/sound/soc/codecs/tlv320dac33.c index f9f367d29a90..e845c4b9066e 100644 --- a/sound/soc/codecs/tlv320dac33.c +++ b/sound/soc/codecs/tlv320dac33.c @@ -310,7 +310,8 @@ static inline void dac33_soft_power(struct snd_soc_codec *codec, int power) if (power) reg |= DA...
b4f5296f0eec2aa7061dfd8bb8c0744f095f9bd1
Analyze and fix the following issue in the Linux kernel code: perf tools: Use eprintf for pr_{err,warning,info} too
Problem Details: Just like we do for pr_debug, so that we can have a single point where to redirect to the currently used output system, be it stdio or newt. 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...
```diff diff --git a/tools/perf/util/debug.h b/tools/perf/util/debug.h index c6c24c522dea..58720a181591 100644 --- a/tools/perf/util/debug.h +++ b/tools/perf/util/debug.h @@ -7,8 +7,6 @@ extern int verbose; extern int dump_trace; -int eprintf(int level, - const char *fmt, ...) __attribute__((format(printf, 2, 3...
fe2197b8bb2f318c1e0b0f589f24f781dd27d1f2
Analyze and fix the following issue in the Linux kernel code: perf symbols: Bump plt synthesizing warning debug level
Problem Details: 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: Paul Mackerras <paulus@samba.org> LKML-Reference: <1268349164-5822-1-git-send-email-acme@infradead.org> Signed-off-by...
```diff diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c index 323c0aea0a91..75cd46807c70 100644 --- a/tools/perf/util/symbol.c +++ b/tools/perf/util/symbol.c @@ -862,8 +862,8 @@ out_close: if (err == 0) return nr; out: - pr_warning("%s: problems reading %s PLT info.\n", - __func__, self->long...
8447b360a3897bdfb0677107564d1dd9ab6e63be
Analyze and fix the following issue in the Linux kernel code: x86, UV: Fix target_cpus() in x2apic_uv_x.c
Problem Details: target_cpu() should initially target all cpus, not just cpu 0. Otherwise systems with lots of disks can exhaust the interrupt vectors on cpu 0 if a large number of disks are discovered before the irq balancer is running. Note: UV code only... Signed-off-by: Jack Steiner <steiner@sgi.com> LKML-Referen...
```diff diff --git a/arch/x86/kernel/apic/x2apic_uv_x.c b/arch/x86/kernel/apic/x2apic_uv_x.c index 21db3cbea7dc..af0ca80e38a9 100644 --- a/arch/x86/kernel/apic/x2apic_uv_x.c +++ b/arch/x86/kernel/apic/x2apic_uv_x.c @@ -114,11 +114,9 @@ EXPORT_SYMBOL_GPL(uv_possible_blades); unsigned long sn_rtc_cycles_per_second; EXP...
0b861225a5890f22445f08ca9cc7a87cff276ff7
Analyze and fix the following issue in the Linux kernel code: x86, perf: Fix NULL deref on not assigned x86_pmu
Problem Details: In case of not assigned x86_pmu and software events NULL dereference may being hit via x86_pmu::schedule_events method. Fix it by checking if x86_pmu is initialized at all. Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org> Cc: Lin Ming <ming.m.lin@intel.com> Cc: Arnaldo Carvalho de Melo <acme@redh...
```diff diff --git a/arch/x86/kernel/cpu/perf_event.c b/arch/x86/kernel/cpu/perf_event.c index e6a3f5f81c96..5586a02067d8 100644 --- a/arch/x86/kernel/cpu/perf_event.c +++ b/arch/x86/kernel/cpu/perf_event.c @@ -1269,6 +1269,9 @@ int hw_perf_group_sched_in(struct perf_event *leader, int assign[X86_PMC_IDX_MAX]; int ...
c12ec0a2d94001003dfb929ce14c287fca0522b0
Analyze and fix the following issue in the Linux kernel code: paride: fix off-by-one test
Problem Details: With `while (j++ < PX_SPIN)' j reaches PX_SPIN + 1 after the loop. This is probably unlikely to produce a problem. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Cc: Jens Axboe <jens.axboe@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jens Axboe <jens.axboe@ora...
```diff diff --git a/drivers/block/paride/pcd.c b/drivers/block/paride/pcd.c index 8866ca369d5e..71acf4e53356 100644 --- a/drivers/block/paride/pcd.c +++ b/drivers/block/paride/pcd.c @@ -341,11 +341,11 @@ static int pcd_wait(struct pcd_unit *cd, int go, int stop, char *fun, char *msg) && (j++ < PCD_SPIN)) u...