id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
4a1b92793a0824d31f165fe3a97634dbb9a3ae18
Analyze and fix the following issue in the Linux kernel code: epson1355fb: color setting fixes
Problem Details: - the pseudo_palette is only 16 elements long - allocate the pseudo_palette as part of epson1355_par Signed-off-by: Antonino Daplas <adaplas@gmail.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/epson1355fb.c b/drivers/video/epson1355fb.c index ca2c54ce508e..67f58bae384d 100644 --- a/drivers/video/epson1355fb.c +++ b/drivers/video/epson1355fb.c @@ -63,6 +63,7 @@ struct epson1355_par { unsigned long reg_addr; + u32 pseudo_palette[16]; }; /* ---------------------------...
7592181005261c3d90398375ab6922f56cdd2bad
Analyze and fix the following issue in the Linux kernel code: cyblafb: fix pseudo_palette array overrun in setcolreg
Problem Details: The pseudo_palette has only 16 elements. Do not write if regno (the array index) is more than 15. Signed-off-by: Antonino Daplas <adaplas@gmail.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/cyblafb.c b/drivers/video/cyblafb.c index 94a66c2d2cf5..e23324d10be2 100644 --- a/drivers/video/cyblafb.c +++ b/drivers/video/cyblafb.c @@ -1068,15 +1068,18 @@ static int cyblafb_setcolreg(unsigned regno, unsigned red, unsigned green, out8(0x3C9, green >> 10); out8(0x3C9, blue >...
d1baa4ffa677bf6986c460fcfd4cdaf8bfe66f0e
Analyze and fix the following issue in the Linux kernel code: fbcon: set_con2fb_map fixes
Problem Details: set_con2fb_map() has regressed for some time. Using fbcon=map:01, for example, works only if there is only 1 working framebuffer. Trying to do a set_con2fb_map() on a non-allocated vc will freeze the system. - ensure that succeeding drivers after the first gets mapped to the console - remove fbcon_pr...
```diff diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c index 7ba21eb1676c..13b67ee8b3c0 100644 --- a/drivers/video/console/fbcon.c +++ b/drivers/video/console/fbcon.c @@ -192,9 +192,7 @@ static __inline__ void ypan_down(struct vc_data *vc, int count); static void fbcon_bmove_rec(struct vc_d...
10eb2659cc6059d0c4de2e2c66d1534091519f56
Analyze and fix the following issue in the Linux kernel code: fbdev: move arch-specific bits to their respective subdirectories
Problem Details: Move arch-specific bits of fb_mmap() to their respective subdirectories [bob.picco@hp.com: efi_range_is_wc is referenced but not declared] [bunk@stusta.de: fix include/asm-m68k/fb.h] Signed-off-by: Antonino Daplas <adaplas@gmail.com> Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: Adria...
```diff diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c index 38c2e2558f5e..8d6dbe8b8dd1 100644 --- a/drivers/video/fbmem.c +++ b/drivers/video/fbmem.c @@ -33,17 +33,10 @@ #include <linux/err.h> #include <linux/device.h> #include <linux/efi.h> +#include <linux/fb.h> -#if defined(__mc68000__) || defined(...
bad07ff74c32829defce8c83d7ff6ea69c329441
Analyze and fix the following issue in the Linux kernel code: fbcon: smart blitter usage for scrolling
Problem Details: This patch replaces the current SCROLL_MOVE method with smarter method using the same logic as the SCROLL_REDRAW method. This brings these two methods much closer in performance and benefits all framebuffers which uses the SCROLL_MOVE method. [adaplas] - remove unnecessary char attribute checking - w...
```diff diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c index 73813c60d03a..7888e319f9e1 100644 --- a/drivers/video/console/fbcon.c +++ b/drivers/video/console/fbcon.c @@ -1704,6 +1704,56 @@ static void fbcon_redraw_move(struct vc_data *vc, struct display *p, } } +static void fbcon_redra...
b306122df9f9dbec7751133073b4d19b9197d22e
Analyze and fix the following issue in the Linux kernel code: Char: istallion, init+locking fixes
Problem Details: Move brdp->iosize assignment in stli_initecp up a few lines to stop the driver from requesting an I/O region of length 0. Remove spin_lock_irqsave/spin_unlock_irqrestore from __stli_sendcmd as all users of that function take the lock already. Signed-off-by: Ingo Korb <ml@akana.de> Cc: Jiri Slaby <jir...
```diff diff --git a/drivers/char/istallion.c b/drivers/char/istallion.c index 809409922996..3c66f402f9d7 100644 --- a/drivers/char/istallion.c +++ b/drivers/char/istallion.c @@ -2163,14 +2163,10 @@ static void __stli_sendcmd(struct stlibrd *brdp, struct stliport *portp, unsigne cdkhdr_t __iomem *hdrp; cdkctrl_t __...
5b21f9dddd0817b761f1407f1950bee4f257411a
Analyze and fix the following issue in the Linux kernel code: Char: isicom, cleanup locking
Problem Details: Don't spin processor when not needed (use sleep instead of delay). Don't release the lock when needed in next iteration -- this actually fixes a bug -- missing braces Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds...
```diff diff --git a/drivers/char/isicom.c b/drivers/char/isicom.c index 761f77740d67..b133b92a0ad5 100644 --- a/drivers/char/isicom.c +++ b/drivers/char/isicom.c @@ -243,17 +243,18 @@ static inline int WaitTillCardIsFree(u16 base) static int lock_card(struct isi_board *card) { - char retries; unsigned long base...
c4923b4f13156455a9e84f0b918866aef300cc57
Analyze and fix the following issue in the Linux kernel code: Char: cyclades, fix sparse warning
Problem Details: cyclades, fix sparse warning Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/drivers/char/cyclades.c b/drivers/char/cyclades.c index b9bd4f67efb4..7b0839426e18 100644 --- a/drivers/char/cyclades.c +++ b/drivers/char/cyclades.c @@ -1890,11 +1890,11 @@ static void cyz_poll(unsigned long arg) struct cyclades_card *cinfo; struct cyclades_port *info; struct tty_struct *tty...
3b20b9b4e985fcc48b4eea401cb289a856422c93
Analyze and fix the following issue in the Linux kernel code: OSS trident: fix locking around write_voice_regs
Problem Details: trident_write_voice_regs() was getting called with the card spinlock held in only some cases. Fix it. Explanation: we allocate a new virtual channel in open, and then we frob some hardware registers (in write_voice_regs) for that channel. But the hardware registers are shared with other channels, wh...
```diff diff --git a/sound/oss/trident.c b/sound/oss/trident.c index 3e408f491927..2e3e78e1bf67 100644 --- a/sound/oss/trident.c +++ b/sound/oss/trident.c @@ -2702,6 +2702,7 @@ trident_open(struct inode *inode, struct file *file) struct trident_card *card = devs; struct trident_state *state = NULL; struct dmabuf ...
c065f35c17929067a367139d14e26897d60c7f6d
Analyze and fix the following issue in the Linux kernel code: rtc-ds1307 becomes new-style i2c driver
Problem Details: Convert the rtc-ds1307 driver into a "new style" driver. Also improve probe() checks: be more correct about switching out of AM/PM mode, and issue a (debug) diagnostic when failing due to bogus register values. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Cc: Andrew Victor <andrew...
```diff diff --git a/drivers/rtc/rtc-ds1307.c b/drivers/rtc/rtc-ds1307.c index 5306a1a5b873..5158a625671f 100644 --- a/drivers/rtc/rtc-ds1307.c +++ b/drivers/rtc/rtc-ds1307.c @@ -27,13 +27,8 @@ * This is currently a simple no-alarms driver. If your board has the * alarm irq wired up on a ds1337 or ds1339, and you ...
be5f59f4b67fbd4de26802a291bbcc2c623302b7
Analyze and fix the following issue in the Linux kernel code: rtc-ds1307: oscillator restart for ds13{37,38,39,40}
Problem Details: When we find a ds1337 or ds1339 with the oscillator powered off, turn it on. If the oscillator fault flag was set, clear it and warn that the clock needs to be set. David Brownell: Bugfixes; provide corresponding update for ds1338, and the core of the fix for ds1340. Use a common warning message ("S...
```diff diff --git a/drivers/rtc/rtc-ds1307.c b/drivers/rtc/rtc-ds1307.c index 75e30c6a7d5d..5306a1a5b873 100644 --- a/drivers/rtc/rtc-ds1307.c +++ b/drivers/rtc/rtc-ds1307.c @@ -52,6 +52,7 @@ I2C_CLIENT_INSMOD; /* RTC registers don't differ much, except for the century flag */ #define DS1307_REG_SECS 0x00 /* 00-59 ...
2e774c7caf84455d5e7d492d123bad6f417818b5
Analyze and fix the following issue in the Linux kernel code: rtc: add support for the ST M48T59 RTC
Problem Details: [akpm@linux-foundation.org: x86_64 build fix] [akpm@linux-foundation.org: The acpi guys changed the bin_attribute code] Signed-off-by: Mark Zhan <rongkai.zhan@windriver.com> Cc: Alessandro Zummo <a.zummo@towertech.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvald...
```diff diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig index 359323378c55..bcd18765a4ad 100644 --- a/drivers/rtc/Kconfig +++ b/drivers/rtc/Kconfig @@ -310,6 +310,16 @@ config RTC_DRV_M48T86 This driver can also be built as a module. If so, the module will be called rtc-m48t86. +config RTC_DRV_M48T59 +...
5663c14b4f3e22aece38970f9765ceb090efbb8c
Analyze and fix the following issue in the Linux kernel code: RTC Kconfig tweax
Problem Details: Minor fix to the Kconfig for RTCs: don't display section headers for I2C or SPI unless they're configured. And depend on SPI_MASTER; having slave support wouldn't help. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Acked-by: Alessandro Zummo <a.zummo@towertech.it> Signed-off-by: And...
```diff diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig index 361b1f4feed0..25bea05ffaaa 100644 --- a/drivers/rtc/Kconfig +++ b/drivers/rtc/Kconfig @@ -118,7 +118,7 @@ config RTC_DRV_TEST will be called rtc-test. comment "I2C RTC drivers" - depends on RTC_CLASS + depends on RTC_CLASS && I2C config RTC_...
fa04e78b2d44cb923177d7e6988ac32639beb2d0
Analyze and fix the following issue in the Linux kernel code: Driver for the Atmel on-chip RTC on AT32AP700x devices
Problem Details: Tested on the AT32AP7000/ATSTK1000. Driver does only suport time, wake up and a very simple alarm, because of hardware limitations. Hardware documentation can be found in the AT32AP7000 data sheet, which can be downloaded from http://www.atmel.com/dyn/products/datasheets.asp?family_id=682 From: Dav...
```diff diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig index 905d3308253b..d2bd8de9403f 100644 --- a/drivers/rtc/Kconfig +++ b/drivers/rtc/Kconfig @@ -379,6 +379,13 @@ config RTC_DRV_PL031 To compile this driver as a module, choose M here: the module will be called rtc-pl031. +config RTC_DRV_AT32AP700...
045e0e85f2f6ee6621d8f7bab3059e9c74076738
Analyze and fix the following issue in the Linux kernel code: rtc-ds1307 cleanups
Problem Details: This updates the rtc-ds1307 driver so that converting it to a "new style" driver (driver model, not legacy i2c model) will involve fewer changes. - Use pointer to i2c_client almost everywhere, so that it's easy to let the i2c core create that object; - Avoid using i2c_client.adapter, since that ...
```diff diff --git a/drivers/rtc/rtc-ds1307.c b/drivers/rtc/rtc-ds1307.c index 3f0f7b8fa813..75e30c6a7d5d 100644 --- a/drivers/rtc/rtc-ds1307.c +++ b/drivers/rtc/rtc-ds1307.c @@ -24,15 +24,22 @@ * setting the date and time), Linux can ignore the non-clock features. * That's a natural job for a factory or repair ben...
c381bfcf0cd100a37cd969fa0d3aa758e13b5bcc
Analyze and fix the following issue in the Linux kernel code: Couple fixes to fs/ecryptfs/inode.c
Problem Details: Following was uncovered by compiling the kernel with '-W' flag: CC [M] fs/ecryptfs/inode.o fs/ecryptfs/inode.c: In function ‘ecryptfs_lookup’: fs/ecryptfs/inode.c:304: warning: comparison of unsigned expression < 0 is always false fs/ecryptfs/inode.c: In function ‘ecryptfs_symlink’: fs/ecryptfs/ino...
```diff diff --git a/fs/ecryptfs/inode.c b/fs/ecryptfs/inode.c index 83e94fedd4e9..e77a2ec71aa5 100644 --- a/fs/ecryptfs/inode.c +++ b/fs/ecryptfs/inode.c @@ -282,7 +282,7 @@ static struct dentry *ecryptfs_lookup(struct inode *dir, struct dentry *dentry, struct dentry *lower_dentry; struct vfsmount *lower_mnt; ch...
2d3bb25209c1f9a27ea9535c7fd2f6729a5e7db1
Analyze and fix the following issue in the Linux kernel code: knfsd: nfsd: make all exp_finding functions return -errno's on err
Problem Details: Currently exp_find(), exp_get_by_name(), and friends, return an export on success, and on failure return: errors -EAGAIN (drop this request pending an upcall) or -ETIMEDOUT (an upcall has timed out), or return NULL, which can mean either that there was a memory allocation failure, or that an exp...
```diff diff --git a/fs/nfsd/export.c b/fs/nfsd/export.c index c518421a9355..d4accdcb53a2 100644 --- a/fs/nfsd/export.c +++ b/fs/nfsd/export.c @@ -739,16 +739,18 @@ exp_find_key(svc_client *clp, int fsid_type, u32 *fsidv, struct cache_req *reqp) int err; if (!clp) - return NULL; + return ERR_PTR(-ENOENT); ...
4b2ca38ad6c44ed0442092a829e6e954bf3580af
Analyze and fix the following issue in the Linux kernel code: knfsd: nfsd4: fix handling of acl errrors
Problem Details: nfs4_acl_nfsv4_to_posix() returns an error and returns any posix acls calculated in two caller-provided pointers. It was setting these pointers to -errno in some error cases, resulting in nfsd4_set_nfs4_acl() calling posix_acl_release() with a -errno as an argument. Fix both the caller and the callee...
```diff diff --git a/fs/nfsd/nfs4acl.c b/fs/nfsd/nfs4acl.c index 4adb5ee4759b..b6ed38380ab8 100644 --- a/fs/nfsd/nfs4acl.c +++ b/fs/nfsd/nfs4acl.c @@ -737,13 +737,16 @@ int nfs4_acl_nfsv4_to_posix(struct nfs4_acl *acl, struct posix_acl **pacl, *pacl = posix_state_to_acl(&effective_acl_state, flags); if (IS_ERR(*pac...
0ac68d17996eb421dde51452b89d5545ba07c6fe
Analyze and fix the following issue in the Linux kernel code: knfsd: nfsd4: fix enc_stateid_sz for nfsd callbacks
Problem Details: enc_stateid_sz should be given in u32 words units, not bytes, so we were overestimating the buffer space needed here. Signed-off-by: Benny Halevy <bhalevy@panasas.com> Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm...
```diff diff --git a/fs/nfsd/nfs4callback.c b/fs/nfsd/nfs4callback.c index 5443c52b57aa..31d6633c7fe4 100644 --- a/fs/nfsd/nfs4callback.c +++ b/fs/nfsd/nfs4callback.c @@ -75,7 +75,7 @@ enum nfs_cb_opnum4 { #define op_enc_sz 1 #define op_dec_sz 2 #define enc_nfs4_fh_sz (1 + (NFS4_FHSIZE >> 2)) -#define enc_stat...
33a1060ae7dc671a0208b341bd454009625bb5a6
Analyze and fix the following issue in the Linux kernel code: knfsd: nfsd4: fix NFSv4 filehandle size units confusion
Problem Details: NFS4_FHSIZE is measured in bytes, not 4-byte words, so much more space than necessary is being allocated for struct nfs4_cb_recall. I should have wondered why this structure was so much larger than it needed to be! Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu> Signed-off-by: Neil Brown <n...
```diff diff --git a/include/linux/nfsd/state.h b/include/linux/nfsd/state.h index ab5c236bd9a7..732de9cad4a8 100644 --- a/include/linux/nfsd/state.h +++ b/include/linux/nfsd/state.h @@ -67,7 +67,7 @@ struct nfs4_cb_recall { int cbr_trunc; stateid_t cbr_stateid; u32 cbr_fhlen; - u32 cbr_fhval[NFS4_FHSIZE];...
12127498c8f5e479df15ee374a0932f5659df49e
Analyze and fix the following issue in the Linux kernel code: nfsd warning fix
Problem Details: gcc-4.3: fs/nfsd/nfsctl.c: In function 'write_getfs': fs/nfsd/nfsctl.c:248: warning: cast from pointer to integer of different size Cc: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/fs/nfsd/nfsctl.c b/fs/nfsd/nfsctl.c index 71c686dc7257..5ab80edc795b 100644 --- a/fs/nfsd/nfsctl.c +++ b/fs/nfsd/nfsctl.c @@ -245,7 +245,7 @@ static ssize_t write_getfs(struct file *file, char *buf, size_t size) } exp_readunlock(); if (err == 0) - err = res->fh_size + (int)&((struct knfsd_fh...
a569425512253992cc64ebf8b6d00a62f986db3e
Analyze and fix the following issue in the Linux kernel code: knfsd: exportfs: add exportfs.h header
Problem Details: currently the export_operation structure and helpers related to it are in fs.h. fs.h is already far too large and there are very few places needing the export bits, so split them off into a separate header. [akpm@linux-foundation.org: fix cifs build] Signed-off-by: Christoph Hellwig <hch@lst.de> Sign...
```diff diff --git a/fs/cifs/export.c b/fs/cifs/export.c index 1d716392c3aa..96df1d51fdc3 100644 --- a/fs/cifs/export.c +++ b/fs/cifs/export.c @@ -29,6 +29,7 @@ */ #include <linux/fs.h> +#include <linux/exportfs.h> #ifdef CONFIG_CIFS_EXPERIMENTAL diff --git a/fs/efs/super.c b/fs/efs/super.c index e0a6839e6...
6dd4ac3b30b81b5bd0d628af1c89b7da689a38ea
Analyze and fix the following issue in the Linux kernel code: i2o debug output cleanup
Problem Details: Fix output of i2o debug messages, extra KERN_ are removed. Signed-off-by: Vasily Averin <vvs@sw.ru> Acked-by: Alan Cox <alan@lxorguk.ukuu.org.uk> Cc: Markus Lidel <Markus.Lidel@shadowconnect.com> Acked-by: Kirill Korotaev <dev@openvz.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed...
```diff diff --git a/drivers/message/i2o/debug.c b/drivers/message/i2o/debug.c index 8abe45e49ad7..ce62d8bfe1c8 100644 --- a/drivers/message/i2o/debug.c +++ b/drivers/message/i2o/debug.c @@ -24,7 +24,7 @@ void i2o_report_status(const char *severity, const char *str, if (cmd == I2O_CMD_UTIL_EVT_REGISTER) return; /...
44aaa9384faf68717cf3828dce6f8171a0a5d7bf
Analyze and fix the following issue in the Linux kernel code: i2o proc reading oops
Problem Details: Fix oops on reading from some i2o proc files (i2o_seq_show_driver_store() and other) because their handlers uses "exec" field in struct i2o_controller Signed-off-by: Vasily Averin <vvs@sw.ru> Acked-by: Alan Cox <alan@lxorguk.ukuu.org.uk> Cc: Markus Lidel <Markus.Lidel@shadowconnect.com> Acked-by: Kiri...
```diff diff --git a/drivers/message/i2o/exec-osm.c b/drivers/message/i2o/exec-osm.c index 809d4b63c0b3..8c83ee3b0920 100644 --- a/drivers/message/i2o/exec-osm.c +++ b/drivers/message/i2o/exec-osm.c @@ -339,6 +339,8 @@ static int i2o_exec_probe(struct device *dev) rc = device_create_file(dev, &dev_attr_product_id); ...
010904cbed3db3464213fbc602802cc6f53e56e1
Analyze and fix the following issue in the Linux kernel code: wrong memory access in i2o_block_device_lock()
Problem Details: This patch fixes access to memory that has not been allocated: i2o_msg_get_wait() can returns errors different from I2O_QUEUE_EMPTY. But the result is checked only against this code. If it is not I2O_QUEUE_EMPTY then we dereference the error code as the pointer later. Signed-off-by: Vasily Averin <v...
```diff diff --git a/drivers/message/i2o/i2o_block.c b/drivers/message/i2o/i2o_block.c index b17c4b2bc9ef..64a52bd7544a 100644 --- a/drivers/message/i2o/i2o_block.c +++ b/drivers/message/i2o/i2o_block.c @@ -215,7 +215,7 @@ static int i2o_block_device_lock(struct i2o_device *dev, u32 media_id) struct i2o_message *msg;...
1725d71d992f5947bdd5b4f9a30fe8a05571fe66
Analyze and fix the following issue in the Linux kernel code: i2o_cfg_passthru cleanup
Problem Details: This patch fixes a number of issues in i2o_cfg_passthru{,32}: - i2o_msg_get_wait() return vaile is not checked; - i2o_message memory leaks on error paths; - infinite loop to sg_list_cleanup in passthru32 It's important issue because of i2o_cfg_passthru is used by raidutils for monitorig controllers st...
```diff diff --git a/drivers/message/i2o/i2o_config.c b/drivers/message/i2o/i2o_config.c index 8ba275a12773..84e046e94f5f 100644 --- a/drivers/message/i2o/i2o_config.c +++ b/drivers/message/i2o/i2o_config.c @@ -554,8 +554,6 @@ static int i2o_cfg_passthru32(struct file *file, unsigned cmnd, return -ENXIO; } - msg...
2bf68a3699601bd3e53b4efce7f2d780e243aa35
Analyze and fix the following issue in the Linux kernel code: i4l: leak in eicon/idifunc.c
Problem Details: coverity spotted a possible leak in the idifunc.c file (bug id #1252), in um_new_card(), if the diva_user_mode_idi_create_adapter() fails, we dont free the memory allocated for card Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de> Acked-by: Armin Schindler <armin@melware.de> Cc: Karsten Keil <kkeil@s...
```diff diff --git a/drivers/isdn/hardware/eicon/idifunc.c b/drivers/isdn/hardware/eicon/idifunc.c index 4cbc68cf4dba..db87d5105422 100644 --- a/drivers/isdn/hardware/eicon/idifunc.c +++ b/drivers/isdn/hardware/eicon/idifunc.c @@ -106,6 +106,7 @@ static void um_new_card(DESCRIPTOR * d) } else { DBG_ERR(("could not...
5e6c20a93b700ba884a6bced498b2691e2dd821b
Analyze and fix the following issue in the Linux kernel code: isdn/capi warning fixes
Problem Details: drivers/isdn/capi/capi.c: In function 'handle_minor_send': drivers/isdn/capi/capi.c:552: warning: cast from pointer to integer of different size Of course, the code here might actually be buggy, in which case this patch should not be applied? Answer: No this field is ignored inside linux kernel.Ye...
```diff diff --git a/drivers/isdn/capi/capi.c b/drivers/isdn/capi/capi.c index 81661b8bd3a8..f449daef3eed 100644 --- a/drivers/isdn/capi/capi.c +++ b/drivers/isdn/capi/capi.c @@ -549,7 +549,7 @@ static int handle_minor_send(struct capiminor *mp) capimsg_setu8 (skb->data, 5, CAPI_REQ); capimsg_setu16(skb->data, 6,...
ccdc7bf925731ef37f0af95262d675b74544932f
Analyze and fix the following issue in the Linux kernel code: SPI: omap2_mcspi driver
Problem Details: Add OMAP24XX McSPI (Multichannel SPI) controller driver. This driver is tested very well under OMAP GIT tree with N800 - Nokia Internet Tablet, and some other OMAP2 boards. Recent updates included bugfixes, cleanups, speedups, and better conformance to the current SPI programming interface. This doe...
```diff diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig index 22feb3c8de55..5ac498bbf2b6 100644 --- a/drivers/spi/Kconfig +++ b/drivers/spi/Kconfig @@ -142,6 +142,12 @@ config SPI_OMAP_UWIRE help This hooks up to the MicroWire controller on OMAP1 chips. +config SPI_OMAP24XX + tristate "McSPI driver for O...
defbd3b4bbd9d85a68529f829f4ee39899c318dc
Analyze and fix the following issue in the Linux kernel code: atmel_spi: don't always deselect chip between messages
Problem Details: Update chipselect handling for atmel_spi: * Teach it how to leave chipselect active between messages; this helps various drivers work better. * Cope with at91rm0200 errata: nCS0 can't be managed with GPIOs. The MR.PCS value is now updated whenever a chipselect changes. (This requires...
```diff diff --git a/drivers/spi/atmel_spi.c b/drivers/spi/atmel_spi.c index 01ad6320d96c..ad144054da30 100644 --- a/drivers/spi/atmel_spi.c +++ b/drivers/spi/atmel_spi.c @@ -46,6 +46,7 @@ struct atmel_spi { struct clk *clk; struct platform_device *pdev; unsigned new_1:1; + struct spi_device *stay; u8 sto...
698ca47e8dba93f4b001b06b4c7037b09ac6eb09
Analyze and fix the following issue in the Linux kernel code: spi_mpc83xx.c underclocking hotfix
Problem Details: The MPC83xx SPI controller clock divider can divide the system clock by not more then 1024. The spi_mpc83xx driver does not check this and silently writes garbage to the SPI controller registers when asked to run at lower frequencies. I've tried to run the SPI on a 266MHz MPC8349E with 100kHz for deb...
```diff diff --git a/drivers/spi/spi_mpc83xx.c b/drivers/spi/spi_mpc83xx.c index 9cdbc12278e5..bbd51bc88a60 100644 --- a/drivers/spi/spi_mpc83xx.c +++ b/drivers/spi/spi_mpc83xx.c @@ -158,6 +158,12 @@ static void mpc83xx_spi_chipselect(struct spi_device *spi, int value) if ((mpc83xx_spi->sysclk / spi->max_speed_hz)...
78961a5740374a8143f8fe120300f2ed160dd276
Analyze and fix the following issue in the Linux kernel code: spi_lm70llp parport adapter driver
Problem Details: This adds a driver for the LM70-LLP parport adapter, which is an eval board for the LM70 temperature sensor. For those without that board, it may be a simpler example of a parport-to-SPI adapter then spi_butterfly. Signed-off-by: Kaiwan N Billimoria <kaiwan@designergraphix.com> Doc, coding style, an...
```diff diff --git a/Documentation/spi/spi-lm70llp b/Documentation/spi/spi-lm70llp new file mode 100644 index 000000000000..154bd02220b9 --- /dev/null +++ b/Documentation/spi/spi-lm70llp @@ -0,0 +1,69 @@ +spi_lm70llp : LM70-LLP parport-to-SPI adapter +============================================== + +Supported board/c...
ad241528c4919505afccb022acbab3eeb0db4d80
Analyze and fix the following issue in the Linux kernel code: CRC7 support
Problem Details: Add CRC7 routines, used for example in MMC over SPI communication. Kerneldoc updates [akpm@linux-foundation.org: fix funny mix of const and non-const] Signed-off-by: Jan Nikitenko <jan.nikitenko@gmail.com> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Cc: "Randy.Dunlap" <rdunlap@xeno...
```diff diff --git a/Documentation/DocBook/kernel-api.tmpl b/Documentation/DocBook/kernel-api.tmpl index 46bcff2849bd..fd2ef4d29b6d 100644 --- a/Documentation/DocBook/kernel-api.tmpl +++ b/Documentation/DocBook/kernel-api.tmpl @@ -139,8 +139,10 @@ X!Ilib/string.c !Elib/cmdline.c </sect1> - <sect1><title>CR...
8945495697d9f461d4c923e0ed26c0e309b0dffc
Analyze and fix the following issue in the Linux kernel code: IBMASM: miscellaneous fixes
Problem Details: IBMASM: miscellaneous fixes Fix some minor issues, such as: - properly set up ID of keyboard device (was mixed up with mouse) - constify translation tables - change some variables to #defines - set up input device's parent to form proper sysfs hierarchy - minor formatting changes Signed-off-by: ...
```diff diff --git a/drivers/misc/ibmasm/remote.c b/drivers/misc/ibmasm/remote.c index a40fda6c402c..0550ce075fc4 100644 --- a/drivers/misc/ibmasm/remote.c +++ b/drivers/misc/ibmasm/remote.c @@ -28,11 +28,10 @@ #include "ibmasm.h" #include "remote.h" -static int xmax = 1600; -static int ymax = 1200; +#define MOUSE_...
2a41de48b81e61fbe260ae5031ebcb6f935f35fb
Analyze and fix the following issue in the Linux kernel code: Fix sparse false positives re BUG_ON(ptr)
Problem Details: sparse now warns if one compares pointers with integers. However, there are false positives, like: fs/filesystems.c:72:2: warning: Using plain integer as NULL pointer Every time BUG_ON(ptr) is used, ptr is checked against integer zero. Avoid that and save ~70 false positives from allyesconfig run. ...
```diff diff --git a/include/asm-generic/bug.h b/include/asm-generic/bug.h index 7f30cce52857..344e3091af24 100644 --- a/include/asm-generic/bug.h +++ b/include/asm-generic/bug.h @@ -28,7 +28,7 @@ struct bug_entry { #endif #ifndef HAVE_ARCH_BUG_ON -#define BUG_ON(condition) do { if (unlikely((condition)!=0)) BUG();...
13c22168b7276dffe49dc66675d5a78f6d288e0d
Analyze and fix the following issue in the Linux kernel code: destroy_workqueue() can livelock
Problem Details: Pointed out by Michal Schmidt <mschmidt@redhat.com>. The bug was introduced in 2.6.22 by me. cleanup_workqueue_thread() does flush_cpu_workqueue(cwq) in a loop until ->worklist becomes empty. This is live-lockable, a re-niced caller can get CPU after wake_up() and insert a new barrier before the low...
```diff diff --git a/kernel/workqueue.c b/kernel/workqueue.c index 1935302cc645..58e5c152a6bb 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c @@ -752,18 +752,17 @@ static void cleanup_workqueue_thread(struct cpu_workqueue_struct *cwq, int cpu) if (cwq->thread == NULL) return; + flush_cpu_workqueue(cwq);...
9281acea6a3687ff0f262e0be31eac34895b95d7
Analyze and fix the following issue in the Linux kernel code: kallsyms: make KSYM_NAME_LEN include space for trailing '\0'
Problem Details: KSYM_NAME_LEN is peculiar in that it does not include the space for the trailing '\0', forcing all users to use KSYM_NAME_LEN + 1 when allocating buffer. This is nonsense and error-prone. Moreover, when the caller forgets that it's very likely to subtly bite back by corrupting the stack because the l...
```diff diff --git a/arch/parisc/kernel/unwind.c b/arch/parisc/kernel/unwind.c index 322167737de7..cf780cb3b916 100644 --- a/arch/parisc/kernel/unwind.c +++ b/arch/parisc/kernel/unwind.c @@ -242,7 +242,7 @@ static void unwind_frame_regs(struct unwind_frame_info *info) #ifdef CONFIG_KALLSYMS /* Handle some frequent ...
f284ce7269031947326bac6bb19a977705276222
Analyze and fix the following issue in the Linux kernel code: PTRACE_POKEDATA consolidation
Problem Details: Identical implementations of PTRACE_POKEDATA go into generic_ptrace_pokedata() function. AFAICS, fix bug on xtensa where successful PTRACE_POKEDATA will nevertheless return EPERM. Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Cc: Christoph Hellwig <hch@lst.de> Cc: <linux-arch@vger.kernel.org> ...
```diff diff --git a/arch/alpha/kernel/ptrace.c b/arch/alpha/kernel/ptrace.c index 0cd060598f9a..83a781842266 100644 --- a/arch/alpha/kernel/ptrace.c +++ b/arch/alpha/kernel/ptrace.c @@ -315,9 +315,7 @@ do_sys_ptrace(long request, long pid, long addr, long data, /* When I and D space are separate, this will have to b...
787d2214c19bcc9b6ac48af0ce098277a801eded
Analyze and fix the following issue in the Linux kernel code: fs: introduce some page/buffer invariants
Problem Details: It is a bug to set a page dirty if it is not uptodate unless it has buffers. If the page has buffers, then the page may be dirty (some buffers dirty) but not uptodate (some buffers not uptodate). The exception to this rule is if the set_page_dirty caller is racing with truncate or invalidate. A buff...
```diff diff --git a/fs/buffer.c b/fs/buffer.c index d654a3b6209e..0f9006714230 100644 --- a/fs/buffer.c +++ b/fs/buffer.c @@ -675,6 +675,39 @@ void mark_buffer_dirty_inode(struct buffer_head *bh, struct inode *inode) } EXPORT_SYMBOL(mark_buffer_dirty_inode); +/* + * Mark the page dirty, and set it dirty in the rad...
8ab1372fac5684de56c68f0da1ddc90e1c4ce740
Analyze and fix the following issue in the Linux kernel code: SLUB: Fix CONFIG_SLUB_DEBUG use for CONFIG_NUMA
Problem Details: We currently cannot disable CONFIG_SLUB_DEBUG for CONFIG_NUMA. Now that embedded systems start to use NUMA we may need this. Put an #ifdef around places where NUMA only code uses fields only valid for CONFIG_SLUB_DEBUG. Signed-off-by: Christoph Lameter <clameter@sgi.com> Signed-off-by: Andrew Morton...
```diff diff --git a/mm/slub.c b/mm/slub.c index 1c5d6a068556..52a4f44be394 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -1853,7 +1853,9 @@ static void init_kmem_cache_node(struct kmem_cache_node *n) atomic_long_set(&n->nr_slabs, 0); spin_lock_init(&n->list_lock); INIT_LIST_HEAD(&n->partial); +#ifdef CONFIG_SLUB_DEB...
12ad6843dd145050231ec5a27fe326c2085f9095
Analyze and fix the following issue in the Linux kernel code: SLUB: Style fix up the loop to disable small slabs
Problem Details: Do proper spacing and we only need to do this in steps of 8. Signed-off-by: Christoph Lameter <clameter@sgi.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/mm/slub.c b/mm/slub.c index b1635f929b87..bb278c886927 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -2578,7 +2578,7 @@ void __init kmem_cache_init(void) BUILD_BUG_ON(KMALLOC_MIN_SIZE > 256 || (KMALLOC_MIN_SIZE & (KMALLOC_MIN_SIZE - 1))); - for (i = 8; i < KMALLOC_MIN_SIZE;i++) + for (i = 8; i <...
0c710013200e72b5e0bc680ff4ec6bdac53c5ce8
Analyze and fix the following issue in the Linux kernel code: SLUB: add some more inlines and #ifdef CONFIG_SLUB_DEBUG
Problem Details: Add #ifdefs around data structures only needed if debugging is compiled into SLUB. Add inlines to small functions to reduce code size. Signed-off-by: Christoph Lameter <clameter@sgi.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation....
```diff diff --git a/include/linux/slub_def.h b/include/linux/slub_def.h index 579b0a22858e..bae11111458f 100644 --- a/include/linux/slub_def.h +++ b/include/linux/slub_def.h @@ -16,7 +16,9 @@ struct kmem_cache_node { unsigned long nr_partial; atomic_long_t nr_slabs; struct list_head partial; +#ifdef CONFIG_SLUB_...
d45f39cb06610ea456e1d689149b9becacda8b40
Analyze and fix the following issue in the Linux kernel code: SLUB Debug: fix initial object debug state of NUMA bootstrap objects
Problem Details: The function we are calling to initialize object debug state during early NUMA bootstrap sets up an inactive object giving it the wrong redzone signature. The bootstrap nodes are active objects and should have active redzone signatures. Currently slab validation complains and reverts the object to act...
```diff diff --git a/mm/slub.c b/mm/slub.c index 03ae5490c3dd..a18708821c1e 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -1876,7 +1876,8 @@ static struct kmem_cache_node * __init early_kmem_cache_node_alloc(gfp_t gfpflag page->freelist = get_freepointer(kmalloc_caches, n); page->inuse++; kmalloc_caches->node[node] =...
6300ea75031e7aebfe3331245b7f750d82621223
Analyze and fix the following issue in the Linux kernel code: SLUB: ensure that the number of objects per slab stays low for high orders
Problem Details: Currently SLUB has no provision to deal with too high page orders that may be specified on the kernel boot line. If an order higher than 6 (on a 4k platform) is generated then we will BUG() because slabs get more than 65535 objects. Add some logic that decreases order for slabs that have too many obj...
```diff diff --git a/mm/slub.c b/mm/slub.c index a5832f82234c..03ae5490c3dd 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -205,6 +205,11 @@ static inline void ClearSlabDebug(struct page *page) #define ARCH_SLAB_MINALIGN __alignof__(unsigned long long) #endif +/* + * The page->inuse field is 16 bit thus we have this lim...
2492268472e7d326a6fe10f92f9211c4578f2482
Analyze and fix the following issue in the Linux kernel code: SLUB: change error reporting format to follow lockdep loosely
Problem Details: Changes the error reporting format to loosely follow lockdep. If data corruption is detected then we generate the following lines: ============================================ BUG <slab-cache>: <problem> -------------------------------------------- INFO: <more information> [possibly multiple times] ...
```diff diff --git a/Documentation/vm/slub.txt b/Documentation/vm/slub.txt index df812b03b65d..d17f324db9f5 100644 --- a/Documentation/vm/slub.txt +++ b/Documentation/vm/slub.txt @@ -127,13 +127,20 @@ SLUB Debug output Here is a sample of slub debug output: -*** SLUB kmalloc-8: Redzone Active@0xc90f6d20 slab 0xc52...
5ad333eb66ff1e52a87639822ae088577669dcf9
Analyze and fix the following issue in the Linux kernel code: Lumpy Reclaim V4
Problem Details: When we are out of memory of a suitable size we enter reclaim. The current reclaim algorithm targets pages in LRU order, which is great for fairness at order-0 but highly unsuitable if you desire pages at higher orders. To get pages of higher order we must shoot down a very high proportion of memory;...
```diff diff --git a/fs/buffer.c b/fs/buffer.c index 94344b2e0b46..d654a3b6209e 100644 --- a/fs/buffer.c +++ b/fs/buffer.c @@ -356,7 +356,7 @@ static void free_more_memory(void) for_each_online_pgdat(pgdat) { zones = pgdat->node_zonelists[gfp_zone(GFP_NOFS)].zones; if (*zones) - try_to_free_pages(zones, GFP_N...
396faf0303d273219db5d7eb4a2879ad977ed185
Analyze and fix the following issue in the Linux kernel code: Allow huge page allocations to use GFP_HIGH_MOVABLE
Problem Details: Huge pages are not movable so are not allocated from ZONE_MOVABLE. However, as ZONE_MOVABLE will always have pages that can be migrated or reclaimed, it can be used to satisfy hugepage allocations even when the system has been running a long time. This allows an administrator to resize the hugepage p...
```diff diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h index 2c13715e9dde..49b7053043ad 100644 --- a/include/linux/hugetlb.h +++ b/include/linux/hugetlb.h @@ -15,6 +15,7 @@ static inline int is_vm_hugetlb_page(struct vm_area_struct *vma) } int hugetlb_sysctl_handler(struct ctl_table *, int, struct f...
2a1e274acf0b1c192face19a4be7c12d4503eaaf
Analyze and fix the following issue in the Linux kernel code: Create the ZONE_MOVABLE zone
Problem Details: The following 8 patches against 2.6.20-mm2 create a zone called ZONE_MOVABLE that is only usable by allocations that specify both __GFP_HIGHMEM and __GFP_MOVABLE. This has the effect of keeping all non-movable pages within a single memory partition while allowing movable allocations to be satisfied fr...
```diff diff --git a/include/linux/gfp.h b/include/linux/gfp.h index e5882fe49f83..bc68dd9a6d41 100644 --- a/include/linux/gfp.h +++ b/include/linux/gfp.h @@ -106,6 +106,9 @@ static inline enum zone_type gfp_zone(gfp_t flags) if (flags & __GFP_DMA32) return ZONE_DMA32; #endif + if ((flags & (__GFP_HIGHMEM | __GFP...
769848c03895b63e5662eb7e4ec8c4866f7d0183
Analyze and fix the following issue in the Linux kernel code: Add __GFP_MOVABLE for callers to flag allocations from high memory that may be migrated
Problem Details: It is often known at allocation time whether a page may be migrated or not. This patch adds a flag called __GFP_MOVABLE and a new mask called GFP_HIGH_MOVABLE. Allocations using the __GFP_MOVABLE can be either migrated using the page migration mechanism or reclaimed by syncing with backing storage and...
```diff diff --git a/fs/buffer.c b/fs/buffer.c index 424165b569f8..94344b2e0b46 100644 --- a/fs/buffer.c +++ b/fs/buffer.c @@ -982,7 +982,7 @@ grow_dev_page(struct block_device *bdev, sector_t block, struct buffer_head *bh; page = find_or_create_page(inode->i_mapping, index, - mapping_gfp_mask(inode->i_mapping) ...
a32ea1e1f925399e0d81ca3f7394a44a6dafa12c
Analyze and fix the following issue in the Linux kernel code: Fix read/truncate race
Problem Details: do_generic_mapping_read currently samples the i_size at the start and doesn't do so again unless it needs to call ->readpage to load a page. After ->readpage it has to re-sample i_size as a truncate may have caused that page to be filled with zeros, and the read() call should not see these. However t...
```diff diff --git a/mm/filemap.c b/mm/filemap.c index 100b99c2d504..5d5449f3d41c 100644 --- a/mm/filemap.c +++ b/mm/filemap.c @@ -867,13 +867,11 @@ void do_generic_mapping_read(struct address_space *mapping, { struct inode *inode = mapping->host; unsigned long index; - unsigned long end_index; unsigned long off...
e1b30a392835e92581db09a4e8b4b2ad53a0c370
Analyze and fix the following issue in the Linux kernel code: [IA64] Add mapping table between irq and vector
Problem Details: Add mapping tables between irqs and vectors, and its management code. This is necessary for supporting multiple vector domain because 1:1 mapping between irq and vector will be changed to n:1. The irq == vector relationship between irqs and vectors is explicitly remained for percpu interrupts, platfor...
```diff diff --git a/arch/ia64/kernel/iosapic.c b/arch/ia64/kernel/iosapic.c index cffb443a557c..cf27cfb4d165 100644 --- a/arch/ia64/kernel/iosapic.c +++ b/arch/ia64/kernel/iosapic.c @@ -117,6 +117,9 @@ static DEFINE_SPINLOCK(iosapic_lock); * These tables map IA-64 vectors to the IOSAPIC pin that generates this * v...
4bbdec7a84ca8ce786c44bc338a37d97a13cbf20
Analyze and fix the following issue in the Linux kernel code: [IA64] Fix invalid irq vector assumption for iosapic
Problem Details: Many of IOSAPIC codes depends on the flollowing assumptions, but these would become invalid when multiple vector domain will be supported in the future. - 1:1 mapping between IRQ and vector - IRQ == vector To fix those invalid assumptions, this patch changes iosapic_intr_info[] to be indexed by i...
```diff diff --git a/arch/ia64/kernel/iosapic.c b/arch/ia64/kernel/iosapic.c index 4c531953e2e1..bcf91dceaf5d 100644 --- a/arch/ia64/kernel/iosapic.c +++ b/arch/ia64/kernel/iosapic.c @@ -147,7 +147,7 @@ static struct iosapic_intr_info { unsigned char polarity: 1; /* interrupt polarity * (see iosapic.h) */ u...
5d3a8cd34beb1521a2697c6ed7b647ef9bafdbf1
Analyze and fix the following issue in the Linux kernel code: bsg: fix missing space in version print
Problem Details: Tomo introduced a bug in his commit, removing the space between "driver" and "version" in the init printk. Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
```diff diff --git a/block/bsg.c b/block/bsg.c index 8e5fcf2d70e6..baa04e7adf19 100644 --- a/block/bsg.c +++ b/block/bsg.c @@ -1073,7 +1073,7 @@ static int __init bsg_init(void) if (ret) goto remove_cdev; - printk(KERN_INFO BSG_DESCRIPTION "version " BSG_VERSION + printk(KERN_INFO BSG_DESCRIPTION " version " BSG...
b824325443bb010689d22262c6a4e0feb63bad56
Analyze and fix the following issue in the Linux kernel code: xtensa: use DATA_DATA in xtensa
Problem Details: * Sam Ravnborg (sam@ravnborg.org) wrote: > From your patch it looks like I originally missed out > powerpc + xtensa when introducing DATA_DATA - would be nice if > you could fix that. > > Sam Use DATA_DATA in xtensa Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca> Cc: Chris Zankel <ch...
```diff diff --git a/arch/xtensa/kernel/vmlinux.lds.S b/arch/xtensa/kernel/vmlinux.lds.S index b0582c3c5f8d..bb3f1f3097a8 100644 --- a/arch/xtensa/kernel/vmlinux.lds.S +++ b/arch/xtensa/kernel/vmlinux.lds.S @@ -118,7 +118,8 @@ SECTIONS _fdata = .; .data : { - *(.data) CONSTRUCTORS + DATA_DATA + CONSTR...
3ae0aa9f45c69055294b6514ddbb5bd07d2535c2
Analyze and fix the following issue in the Linux kernel code: powerpc: add missing DATA_DATA to powerpc
Problem Details: * Sam Ravnborg (sam@ravnborg.org) wrote: > From your patch it looks like I originally missed out > powerpc + xtensa when introducing DATA_DATA - would be nice if > you could fix that. > > Sam Add missing DATA_DATA in powerpc Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca> Cc: Paul Ma...
```diff diff --git a/arch/powerpc/kernel/vmlinux.lds.S b/arch/powerpc/kernel/vmlinux.lds.S index 21c39ff2dc39..24ff7d983114 100644 --- a/arch/powerpc/kernel/vmlinux.lds.S +++ b/arch/powerpc/kernel/vmlinux.lds.S @@ -173,7 +173,9 @@ SECTIONS } #else .data : { - *(.data .data.rel* .toc1) + DATA_DATA + *(.data.rel*...
5c617c6ff0379f9e55178165478e10761fa109e2
Analyze and fix the following issue in the Linux kernel code: cris: use DATA_DATA in cris
Problem Details: * Sam Ravnborg (sam@ravnborg.org) wrote: > From your patch it looks like I originally missed out > powerpc + xtensa when introducing DATA_DATA - would be nice if > you could fix that. > Use DATA_DATA in CRIS Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca> Cc: Mikael Starvik <starvik@a...
```diff diff --git a/arch/cris/arch-v10/vmlinux.lds.S b/arch/cris/arch-v10/vmlinux.lds.S index 4b348b38cf33..9859d49d088b 100644 --- a/arch/cris/arch-v10/vmlinux.lds.S +++ b/arch/cris/arch-v10/vmlinux.lds.S @@ -44,7 +44,7 @@ SECTIONS ___data_start = . ; __Sdata = . ; .data : { /* Data */ - *(...
a412c1723da5133843688078b6f1f069fa9c93f7
Analyze and fix the following issue in the Linux kernel code: kbuild: fix the warning when running make tags
Problem Details: make tags was giving the below warning. ctags: Warning: arch/x86_64/kernel/head.S:124: null expansion of name pattern "\1" Fix the same by making sure we taken only ENTRY pattern found at the begining of the line. Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: Andre...
```diff diff --git a/Makefile b/Makefile index 4f0bd65a38d8..b4de51d72771 100644 --- a/Makefile +++ b/Makefile @@ -1333,7 +1333,7 @@ define xtags -I __initdata,__exitdata,__acquires,__releases \ -I EXPORT_SYMBOL,EXPORT_SYMBOL_GPL \ --extra=+f --c-kinds=+px \ - --regex-asm='/ENTRY\(([^)]*)\).*/\1/'; \ + --reg...
a07a5b336f699e21d405764931a9d5426dc4f945
Analyze and fix the following issue in the Linux kernel code: [S390] Fix broken logic, SIGA flags must be bitwise ORed
Problem Details: Signed-off-by: Jan Glauber <jan.glauber@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
```diff diff --git a/drivers/s390/cio/qdio.c b/drivers/s390/cio/qdio.c index ae437322c9ca..ed026a1dc324 100644 --- a/drivers/s390/cio/qdio.c +++ b/drivers/s390/cio/qdio.c @@ -2306,8 +2306,8 @@ qdio_get_ssqd_information(struct qdio_irq *irq_ptr) if (!ssqd_area) { QDIO_PRINT_WARN("Could not get memory for chs...
d9d119f12fdb14d57e96e4698ef2ec303b102ae9
Analyze and fix the following issue in the Linux kernel code: [S390] vmcp cleanup
Problem Details: A number of small changes to vmcp: - Change preferred email address. - Use PRINT_xxx machros from debug.h like most s390 drivers, define "vmcp:" as PRINTK_HEADER and wrap error message at column 80. - Add error number to error message. - Update copyright, as I touched this file. - Small whitesp...
```diff diff --git a/drivers/s390/char/vmcp.c b/drivers/s390/char/vmcp.c index 82e6a6b253eb..2f419b0ea628 100644 --- a/drivers/s390/char/vmcp.c +++ b/drivers/s390/char/vmcp.c @@ -1,7 +1,7 @@ /* - * Copyright (C) 2004,2005 IBM Corporation + * Copyright IBM Corp. 2004,2007 * Interface implementation for communication ...
92d154b6c54f76016d36a7eb4aab6eea27737fdb
Analyze and fix the following issue in the Linux kernel code: [S390] Fix disassembly of RX_URRD, SI_URD & PC-relative instructions.
Problem Details: The instructions with format RX_URRD and SI_URD and instructions with a PC relative operand are not disassembled correctly. For RX_URRD and SI_URD instructions find_insn sets opfrag to code[0]. The mask byte of these two formats is 0x00. table->opfrag will never be identical to (opfrag & opmask) and no...
```diff diff --git a/arch/s390/kernel/dis.c b/arch/s390/kernel/dis.c index a057ebf108a7..d3057318f2bf 100644 --- a/arch/s390/kernel/dis.c +++ b/arch/s390/kernel/dis.c @@ -240,8 +240,8 @@ static const unsigned char formats[][7] = { [INSTR_RXY_FRRD] = { 0xff, F_8,D20_20,X_12,B_16,0,0 },/* e.g. ley */ [INSTR_RX_FRR...
0ed081ce203b0fd9a44763b70f41e36596f9b431
Analyze and fix the following issue in the Linux kernel code: bsg: minor cleanup
Problem Details: - fix MODULE_DESCRIPTION typo. - unify MODULE_DESCRIPTION and bsg_version. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
```diff diff --git a/block/bsg.c b/block/bsg.c index 55a4303ed21f..8e5fcf2d70e6 100644 --- a/block/bsg.c +++ b/block/bsg.c @@ -33,7 +33,8 @@ #include <scsi/scsi_driver.h> #include <scsi/sg.h> -const static char bsg_version[] = "block layer sg (bsg) 0.4"; +#define BSG_DESCRIPTION "Block layer SCSI generic (bsg) driv...
9b9f770cef0037fd0e4d623f31ddfa8acda38205
Analyze and fix the following issue in the Linux kernel code: bsg: fix initialization error handling bugs
Problem Details: This fixes the following bugs and cleans up the initialization code: - cdev_del is missing. - unregister_chrdev_region should be used instead of unregister_chrdev. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
```diff diff --git a/block/bsg.c b/block/bsg.c index cdb00e5544b1..b25378459ff0 100644 --- a/block/bsg.c +++ b/block/bsg.c @@ -1057,39 +1057,37 @@ static int __init bsg_init(void) bsg_class = class_create(THIS_MODULE, "bsg"); if (IS_ERR(bsg_class)) { - kmem_cache_destroy(bsg_cmd_cachep); - return PTR_ERR(bsg_cl...
a5eb6a502b71ee6bf1a9768b12ff4545cb7a50fe
Analyze and fix the following issue in the Linux kernel code: modpost white list pattern adjustment
Problem Details: gcc puts data into .data.rel or .data.rel.* on some architectures (e.g. ia64) or under certain conditions, so whatever is legal relative to .data should also be legal for those other sections. Fixes a few modpost warnings on ia64. Signed-off-by: Jan Beulich <jbeulich@novell.com> Signed-off-by: Sam Rav...
```diff diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index ec036c261fb1..3f3848f805f5 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c @@ -609,7 +609,7 @@ static int strrcmp(const char *s, const char *sub) * warn here. * the pattern is identified by: * tosec = .init.text | .exi...
cca5307d178c931e70a642302b56fa2701d02253
Analyze and fix the following issue in the Linux kernel code: drm: fix problem with SiS typedef with sisfb enabled.
Problem Details: Reported by: Avuton Olrich <avuton@gmail.com> Signed-off-by: Dave Airlie <airlied@linux.ie>
```diff diff --git a/drivers/char/drm/sis_mm.c b/drivers/char/drm/sis_mm.c index 0580fa33cb77..441bbdbf1510 100644 --- a/drivers/char/drm/sis_mm.c +++ b/drivers/char/drm/sis_mm.c @@ -94,7 +94,7 @@ static int sis_fb_init(DRM_IOCTL_ARGS) mutex_lock(&dev->struct_mutex); #if defined(CONFIG_FB_SIS) { - drm_sman_mm_t s...
d4e2cbe9cb9219fc924191a6baa2369140cb5ea8
Analyze and fix the following issue in the Linux kernel code: drm: convert drawable code to using idr
Problem Details: This converts the code for allocating drawables to the Linux idr, Fixes from: Michel Dänzer <michel@tungstengraphics.com>, Kristian Høgsberg <krh@redhat.com> Signed-off-by: Dave Airlie <airlied@linux.ie>
```diff diff --git a/drivers/char/drm/drmP.h b/drivers/char/drm/drmP.h index b1cafe36611e..0df87fc3dcb2 100644 --- a/drivers/char/drm/drmP.h +++ b/drivers/char/drm/drmP.h @@ -751,10 +751,7 @@ struct drm_device { /** \name Drawable information */ /*@{ */ spinlock_t drw_lock; - unsigned int drw_bitfield_length; - u...
62968144e673016180f530fdfe170874b80ab5a7
Analyze and fix the following issue in the Linux kernel code: drm: convert drm context code to use Linux idr
Problem Details: This converts the drm context allocator to an idr, using the new idr interface features from Kristian. Fixes from Kristian Hoegsberg <krh@redhat.com> Signed-off-by: Dave Airlie <airlied@linux.ie>
```diff diff --git a/drivers/char/drm/drmP.h b/drivers/char/drm/drmP.h index 1277693e9ca4..b1cafe36611e 100644 --- a/drivers/char/drm/drmP.h +++ b/drivers/char/drm/drmP.h @@ -75,6 +75,8 @@ #include <asm/pgalloc.h> #include "drm.h" +#include <linux/idr.h> + #define __OS_HAS_AGP (defined(CONFIG_AGP) || (defined(CONF...
7713a7d195c2e11d7ba6a973317da0af862d1264
Analyze and fix the following issue in the Linux kernel code: [HRTIMER] Fix cpu pointer arg to clockevents_notify()
Problem Details: All of the clockevent notifiers expect a pointer to an "unsigned int" cpu argument, but hrtimer_cpu_notify() passes in a pointer to a long. [ Discussed with and ok by Thomas Gleixner ] Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/kernel/hrtimer.c b/kernel/hrtimer.c index 23c03f43e196..72d034258ba1 100644 --- a/kernel/hrtimer.c +++ b/kernel/hrtimer.c @@ -1406,7 +1406,7 @@ static void migrate_hrtimers(int cpu) static int __cpuinit hrtimer_cpu_notify(struct notifier_block *self, unsigned long action, void *hcpu) { - lo...
f798634d806615bee27d1b83479034087a02aa0f
Analyze and fix the following issue in the Linux kernel code: [SERIAL] SUNHV: Fix jerky console on LDOM guests.
Problem Details: Mixing putchar() and write() hvcalls does not work %100 correctly. But we should be using write() all the time if we can, even from ->start_tx(), anyways. Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/serial/sunhv.c b/drivers/serial/sunhv.c index 17bcca53d6a1..d82be42ff29a 100644 --- a/drivers/serial/sunhv.c +++ b/drivers/serial/sunhv.c @@ -258,17 +258,7 @@ static void sunhv_stop_tx(struct uart_port *port) /* port->lock held by caller. */ static void sunhv_start_tx(struct uart_port *p...
778feeb4757daef5d7118feab2319142367910dd
Analyze and fix the following issue in the Linux kernel code: [SPARC64]: Fix race between MD update and dr-cpu add.
Problem Details: We need to make sure the MD update occurs before we try to process dr-cpu configure requests. MD update and dr-cpu were being processed by seperate threads so that did not happen occaisionally. Fix this by executing all domain services data packets from a single thread, in order. This will help simp...
```diff diff --git a/arch/sparc64/kernel/ds.c b/arch/sparc64/kernel/ds.c index 1c587107cef0..ba01533f4e03 100644 --- a/arch/sparc64/kernel/ds.c +++ b/arch/sparc64/kernel/ds.c @@ -228,7 +228,7 @@ static struct ds_cap_state *find_cap_by_string(const char *name) return NULL; } -static int ds_send(struct ldc_channel *...
3ac66e33eaf0b2313f7e3c8c023aa0420577a0c2
Analyze and fix the following issue in the Linux kernel code: [SPARC64]: SMP build fix.
Problem Details: The UP build fix had some unintended consequences. Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/arch/sparc64/kernel/setup.c b/arch/sparc64/kernel/setup.c index dc928e49e341..aafde3dd9fd4 100644 --- a/arch/sparc64/kernel/setup.c +++ b/arch/sparc64/kernel/setup.c @@ -454,9 +454,9 @@ static int show_cpuinfo(struct seq_file *m, void *__unused) ncpus_probed, num_online_cpus(), dc...
c5e3ae8823693b260ce1f217adca8add1bc0b3de
Analyze and fix the following issue in the Linux kernel code: forcedeth bug fix: realtek phy
Problem Details: This patch contains errata fixes for the realtek phy. Signed-off-by: Ayaz Abdulla <aabdulla@nvidia.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
```diff diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c index f66c521d429d..a361dba5ddaa 100644 --- a/drivers/net/forcedeth.c +++ b/drivers/net/forcedeth.c @@ -551,6 +551,7 @@ union ring_type { #define PHY_OUI_MARVELL 0x5043 #define PHY_OUI_CICADA 0x03f1 #define PHY_OUI_VITESSE 0x01c1 +#define PHY_OUI...
d215d8a269f397d303c3d5f7c74e98592e8284f1
Analyze and fix the following issue in the Linux kernel code: forcedeth bug fix: vitesse phy
Problem Details: This patch contains errata fixes for the vitesse phy. Signed-off-by: Ayaz Abdulla <aabdulla@nvidia.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
```diff diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c index 998afb927d44..f66c521d429d 100644 --- a/drivers/net/forcedeth.c +++ b/drivers/net/forcedeth.c @@ -550,6 +550,7 @@ union ring_type { /* PHY defines */ #define PHY_OUI_MARVELL 0x5043 #define PHY_OUI_CICADA 0x03f1 +#define PHY_OUI_VITESSE 0x01...
14a67f3c6ca319edd011db4edad63dd686426ae2
Analyze and fix the following issue in the Linux kernel code: forcedeth bug fix: cicada phy
Problem Details: This patch contains errata fixes for the cicada phy. It only renamed the defines to be phy specific. Signed-off-by: Ayaz Abdulla <aabdulla@nvidia.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
```diff diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c index 42ba1c012ee2..998afb927d44 100644 --- a/drivers/net/forcedeth.c +++ b/drivers/net/forcedeth.c @@ -557,12 +557,12 @@ union ring_type { #define PHYID2_MODEL_MASK 0x03f0 #define PHY_MODEL_MARVELL_E3016 0x220 #define PHY_MARVELL_E3016_INITMAS...
2ca13da705ac9780ff7cd2ea7948e25303c42f81
Analyze and fix the following issue in the Linux kernel code: atl1: fix excessively indented code
Problem Details: Move excessively indented code to separate functions. Also move ring pointer initialization to its own function. Signed-off-by: Jay Cliburn <jacliburn@bellsouth.net> Signed-off-by: Jeff Garzik <jeff@garzik.org>
```diff diff --git a/drivers/net/atl1/atl1_main.c b/drivers/net/atl1/atl1_main.c index b40f1c7901fe..67ddf8dcf764 100644 --- a/drivers/net/atl1/atl1_main.c +++ b/drivers/net/atl1/atl1_main.c @@ -220,8 +220,6 @@ s32 atl1_setup_ring_resources(struct atl1_adapter *adapter) tpd_ring->dma += offset; tpd_ring->desc = (u8...
53ffb42cdf3d01f7b6e2101eebed3d12e71a30f5
Analyze and fix the following issue in the Linux kernel code: atl1: cleanup atl1_main
Problem Details: Fix indentation, remove dead code, improve some comments, change dev_dbg to dev_printk. Signed-off-by: Jay Cliburn <jacliburn@bellsouth.net> Signed-off-by: Jeff Garzik <jeff@garzik.org>
```diff diff --git a/drivers/net/atl1/atl1_main.c b/drivers/net/atl1/atl1_main.c index 6c8cf986bee4..b40f1c7901fe 100644 --- a/drivers/net/atl1/atl1_main.c +++ b/drivers/net/atl1/atl1_main.c @@ -38,7 +38,7 @@ * TODO: * Fix TSO; tx performance is horrible with TSO enabled. * Wake on LAN. - * Add more ethtool funct...
8910b49fbb8d4517a20bb3de7dc239dcfa7d2b6f
Analyze and fix the following issue in the Linux kernel code: Fix a potential NULL pointer dereference in free_shared_mem() in drivers/net/s2io.c
Problem Details: This patch fixes a potential null dereference bug where we dereference nic before a null check. This patch simply moves the dereferencing after the null check. Signed-off-by: Micah Gruber < micah.gruber@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
```diff diff --git a/drivers/net/s2io.c b/drivers/net/s2io.c index fa29a403a247..7d549355815a 100644 --- a/drivers/net/s2io.c +++ b/drivers/net/s2io.c @@ -796,12 +796,14 @@ static void free_shared_mem(struct s2io_nic *nic) struct mac_info *mac_control; struct config_param *config; int lst_size, lst_per_page; - st...
2e27afb300b56d83bb03fbfa68852b9c1e2920c6
Analyze and fix the following issue in the Linux kernel code: Revert "[NET]: Fix races in net_rx_action vs netpoll."
Problem Details: This reverts commit 29578624e354f56143d92510fff33a8b2aaa2c03. Ingo Molnar reports complete breakage with his e1000 card (no networking, card reports transmit timeouts), and bisected it down to this commit. Let's figure out what went wrong, but not keep breaking machines until we do. Cc: Ingo Molnar ...
```diff diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 322b5eae57dd..da7a13c97eb8 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -262,8 +262,6 @@ enum netdev_state_t __LINK_STATE_LINKWATCH_PENDING, __LINK_STATE_DORMANT, __LINK_STATE_QDISC_RUNNING, - /* Set by t...
10fa16e75c70c8e7ec4675c5f985548a6565dca2
Analyze and fix the following issue in the Linux kernel code: 9p: fix debug compilation error
Problem Details: s/9p/v9fs.c: In function 'v9fs_parse_options': fs/9p/v9fs.c:134: error: 'p9_debug_level' undeclared (first use in this function) Signed-off-by: Dave Jones <davej@redhat.com> Acked-by: Eric Van Hensbergen <ericvh@gmail.com>
```diff diff --git a/fs/9p/v9fs.c b/fs/9p/v9fs.c index 45c35986d49f..0a7068e30ecb 100644 --- a/fs/9p/v9fs.c +++ b/fs/9p/v9fs.c @@ -131,7 +131,9 @@ static void v9fs_parse_options(char *options, struct v9fs_session_info *v9ses) switch (token) { case Opt_debug: v9ses->debug = option; +#ifdef CONFIG_NET_9P_DEBUG ...
b70e325cfe824ea0f6a1666b8b8db986e99c9603
Analyze and fix the following issue in the Linux kernel code: kconfig: fix update-po-config
Problem Details: Massimo Maiurana <maiurana@gmail.com> reported that update-po-config was broken: 1) spelling errors in Makefile so arch/um failed 2) UTF-8 was not supported The following patch address the above problems. kxgettext now append the output to the .pot file generated by xgettext - so we have a header. In ...
```diff diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile index fb2bb3099dd9..8986a48c8c49 100644 --- a/scripts/kconfig/Makefile +++ b/scripts/kconfig/Makefile @@ -22,24 +22,25 @@ oldconfig: $(obj)/conf silentoldconfig: $(obj)/conf $< -s arch/$(ARCH)/Kconfig +# Create new linux.po file +# Adjust cha...
f5e83fa4c07488406b4a4e0ab7c4efd8df9ad676
Analyze and fix the following issue in the Linux kernel code: powerpc: Refuse to build 64-bit with GCC-4.2.0 and CONFIG_MODULES
Problem Details: ...since this won't work (compiler bug, see <http://gcc.gnu.org/PR31490>). Signed-off-by: Segher Boessenkool <segher@kernel.crashing.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
```diff diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile index fbafd965dcd2..85be60504eb4 100644 --- a/arch/powerpc/Makefile +++ b/arch/powerpc/Makefile @@ -201,6 +201,14 @@ checkbin: false; \ fi ; \ fi + @if test "$(call cc-fullversion)" = "040200" \ + && test "x${CONFIG_MODULES}${CONFIG_PPC64}"...
0ab2a272e6b55e5d58168d6983da99e2dc09b8b2
Analyze and fix the following issue in the Linux kernel code: kbuild: New 'cc-fullversion' macro
Problem Details: Prints a six-digit string including the GCC patchlevel. Also fix the 'usage' comment for cc-version. Signed-off-by: Segher Boessenkool <segher@kernel.crashing.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
```diff diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include index 06c1a377c4c5..677bc6c175cb 100644 --- a/scripts/Kbuild.include +++ b/scripts/Kbuild.include @@ -100,9 +100,14 @@ cc-option-align = $(subst -functions=0,,\ $(call cc-option,-falign-functions=0,-malign-functions=0)) # cc-version -# Usage gcc-...
5b37696fda07b8acf37beba3853f83106397ccdf
Analyze and fix the following issue in the Linux kernel code: utime(s): Honour CAP_FOWNER when times==NULL
Problem Details: do_utimes() does not honour CAP_FOWNER when times==NULL. Trivial and obvious one-line fix. Signed-off-by: Satyam Sharma <ssatyam@cse.iitk.ac.in> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/fs/utimes.c b/fs/utimes.c index b3c88952465f..83a7e69e706c 100644 --- a/fs/utimes.c +++ b/fs/utimes.c @@ -106,7 +106,7 @@ long do_utimes(int dfd, char __user *filename, struct timespec *times, int flags if (IS_IMMUTABLE(inode)) goto dput_and_out; - if (c...
9793c3266755b4cae8915982825b2c07cd12e1c6
Analyze and fix the following issue in the Linux kernel code: Fix too few arguments to function `scsi_cmd_ioctl'
Problem Details: This corrects the following compile error introduced by the merge of the new bsg layer in commit e245befce7af0a1e1347079ed62695b059594bd4: caglar@zangetsu linux-2.6 $ make CHK include/linux/version.h CHK include/linux/utsrelease.h CALL scripts/checksyscalls.sh CHK incl...
```diff diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c index 0fcad430474e..a2d6612b80d2 100644 --- a/drivers/block/cciss.c +++ b/drivers/block/cciss.c @@ -1170,7 +1170,7 @@ static int cciss_ioctl(struct inode *inode, struct file *filep, case SG_EMULATED_HOST: case SG_IO: case SCSI_IOCTL_SEND_COMMAND: ...
959bc220df38317bed9a677600b3945a8571fc1c
Analyze and fix the following issue in the Linux kernel code: Fix LDM for new field in the VOL5 VBLK.
Problem Details: Teach LDM about a new field encountered with Windows Vista. This fixes LDM for people using Vista who have disabled drive letter assignment from one or more volumes. Doing this introduces a so far unknown field in the LDM database in the VOL5 VBLK structure which causes the LDM driver to fail to pars...
```diff diff --git a/fs/partitions/ldm.c b/fs/partitions/ldm.c index 99873a2b4cbc..e7dd1d4e3473 100644 --- a/fs/partitions/ldm.c +++ b/fs/partitions/ldm.c @@ -677,15 +677,24 @@ static bool ldm_create_data_partitions (struct parsed_partitions *pp, * Return: -1 Error, the calculated offset exceeded the size of the buf...
7144521f5ac741e9ad3033953b9d9fdede015ee0
Analyze and fix the following issue in the Linux kernel code: Remove duplicate comments from sysctl.c
Problem Details: Randy Dunlap noticed that the recent comment clarifications from Andrew had somehow gotten duplicated. Quoth Andrew: "hm, that could have been some late-night reject-fixing." Fix it up. Cc: From: Andrew Morton <akpm@linux-foundation.org> Cc: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Linu...
```diff diff --git a/kernel/sysctl.c b/kernel/sysctl.c index 7dca326648d5..2ce7acf841ae 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c @@ -995,10 +995,6 @@ static ctl_table vm_table[] = { .extra1 = &zero, }, #endif -/* - * NOTE: do not add new entries to this table unless you have read - * Documentation/sysc...
abce891a10559343d8ac9f79b46d78afdba63a40
Analyze and fix the following issue in the Linux kernel code: Fix new generic block device SG compile
Problem Details: We had a merge issue with the "dentry" field going away from the kobject, and being replaced by a sysfs_dirent field (named "sd") instead. That broke the BSG compile. Cc: Jens Axboe <jens.axboe@oracle.com> Cc: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Cc: James Bottomley <James.Bottomley@SteelE...
```diff diff --git a/block/bsg.c b/block/bsg.c index 461c9f56f3ee..576933fe1860 100644 --- a/block/bsg.c +++ b/block/bsg.c @@ -1011,7 +1011,7 @@ retry: } bcd->class_dev = class_dev; - if (q->kobj.dentry) { + if (q->kobj.sd) { ret = sysfs_create_link(&q->kobj, &bcd->class_dev->kobj, "bsg"); if (ret) goto...
98283bb49c6c8c070ebde9f47489d3e9a83c1323
Analyze and fix the following issue in the Linux kernel code: fat: Fix the race of read/write the FAT12 entry
Problem Details: FAT12 entry is 12bits, so it needs 2 phase to update the value. And writer and reader access it without any lock, so reader can get the half updated value. This fixes the long standing race condition by adding a global spinlock to only FAT12 for avoiding any impact against FAT16/32. Signed-off-by: O...
```diff diff --git a/fs/fat/fatent.c b/fs/fat/fatent.c index ab171ea8e869..2c1b73fb82ae 100644 --- a/fs/fat/fatent.c +++ b/fs/fat/fatent.c @@ -17,6 +17,8 @@ struct fatent_operations { int (*ent_next)(struct fat_entry *); }; +static DEFINE_SPINLOCK(fat12_entry_lock); + static void fat12_ent_blocknr(struct super_bl...
347e03df1696ab22963f6b8c4f2220c41ec17f82
Analyze and fix the following issue in the Linux kernel code: cpwatchdog build fix
Problem Details: sparc64: drivers/sbus/char/cpwatchdog.c: In function `wd_toggleintr': drivers/sbus/char/cpwatchdog.c:523: error: implicit declaration of function `readb' drivers/sbus/char/cpwatchdog.c:533: error: implicit declaration of function `writeb' drivers/sbus/char/cpwatchdog.c: In function `wd_pingtimer': dri...
```diff diff --git a/drivers/sbus/char/cpwatchdog.c b/drivers/sbus/char/cpwatchdog.c index 022e869c44dd..7b5773d88212 100644 --- a/drivers/sbus/char/cpwatchdog.c +++ b/drivers/sbus/char/cpwatchdog.c @@ -24,6 +24,7 @@ #include <linux/ioport.h> #include <linux/timer.h> #include <linux/smp_lock.h> +#include <linux/io.h...
5e70030d4cf91613530a23b40ad9919bb9ee114f
Analyze and fix the following issue in the Linux kernel code: ext4: statfs speed up
Problem Details: This is a patch that speeds up statfs. It is very simple - the "overhead" calculation, which takes a huge amount of time for large filesystems, never changes unless the size of the filesystem itself changes. That means we can store it in memory and only recalculate if the filesystem has been resized ...
```diff diff --git a/fs/ext4/super.c b/fs/ext4/super.c index adcbfadfcb4c..d0d8c76c7edb 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -2500,19 +2500,19 @@ static int ext4_statfs (struct dentry * dentry, struct kstatfs * buf) struct super_block *sb = dentry->d_sb; struct ext4_sb_info *sbi = EXT4_SB(sb); st...
a71ce8c6c9bf269b192f352ea555217815cf027e
Analyze and fix the following issue in the Linux kernel code: ext3: statfs speed up
Problem Details: This is a patch that speeds up statfs. It is very simple - the "overhead" calculation, which takes a huge amount of time for large filesystems, never changes unless the size of the filesystem itself changes. That means we can store it in memory and only recalculate if the filesystem has been resized ...
```diff diff --git a/fs/ext3/super.c b/fs/ext3/super.c index 8b75f73ba3b4..51d1c456cdab 100644 --- a/fs/ext3/super.c +++ b/fs/ext3/super.c @@ -2426,19 +2426,19 @@ static int ext3_statfs (struct dentry * dentry, struct kstatfs * buf) struct super_block *sb = dentry->d_sb; struct ext3_sb_info *sbi = EXT3_SB(sb); st...
2235219b7721b8e74de6841e79240936561a2b63
Analyze and fix the following issue in the Linux kernel code: ext2: statfs speed up
Problem Details: This is a patch that speeds up statfs. It is very simple - the "overhead" calculation, which takes a huge amount of time for large filesystems, never changes unless the size of the filesystem itself changes. That means we can store it in memory and only recalculate if the filesystem has been resized ...
```diff diff --git a/fs/ext2/super.c b/fs/ext2/super.c index 5de5061eb331..b2efd9083b9b 100644 --- a/fs/ext2/super.c +++ b/fs/ext2/super.c @@ -1099,15 +1099,18 @@ static int ext2_statfs (struct dentry * dentry, struct kstatfs * buf) struct super_block *sb = dentry->d_sb; struct ext2_sb_info *sbi = EXT2_SB(sb); st...
4b4e5a1411c8b970983fb6022db1da31c4f5c301
Analyze and fix the following issue in the Linux kernel code: Fix trivial typos in anon_inodes.c comments
Problem Details: Trivial typo and grammar fixes. Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu> Cc: Davide Libenzi <davidel@xmailserver.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/fs/anon_inodes.c b/fs/anon_inodes.c index 40fe3a3222e4..a260198306c2 100644 --- a/fs/anon_inodes.c +++ b/fs/anon_inodes.c @@ -53,7 +53,7 @@ static struct dentry_operations anon_inodefs_dentry_operations = { }; /** - * anon_inode_getfd - creates a new file instance by hooking it up to and + * an...
1492192b4a0bb84dd9b792cc0bd30583220a28a7
Analyze and fix the following issue in the Linux kernel code: kernel/printk.c: document possible deadlock against scheduler
Problem Details: kernel/printk.c: document possible deadlock against scheduler The printk's comment states that it can be called from every context, which might lead to false illusion that it could be called from everywhere without any restrictions. This is however not true - a call to printk() could deadlock if call...
```diff diff --git a/kernel/printk.c b/kernel/printk.c index fccacf706f53..051d27e36a6c 100644 --- a/kernel/printk.c +++ b/kernel/printk.c @@ -486,6 +486,9 @@ static int have_callable_console(void) * @fmt: format string * * This is printk(). It can be called from any context. We want it to work. + * Be aware of...
24da1cbff9cfce50868c2dfdcda82a68ac5cb707
Analyze and fix the following issue in the Linux kernel code: modules: remove modlist_lock
Problem Details: Now we always use stop_machine for module insertion or deletion, we no longer need the modlist_lock: merely disabling preemption is sufficient to block against list manipulation. This avoids deadlock on OOPSen where we can potentially grab the lock twice. Bug: 8695 Signed-off-by: Rusty Russell <rusty...
```diff diff --git a/kernel/module.c b/kernel/module.c index 7a1a4d3558d5..539fed9ac83c 100644 --- a/kernel/module.c +++ b/kernel/module.c @@ -61,10 +61,8 @@ extern int module_sysfs_initialized; /* If this is set, the section belongs in the init part of the module */ #define INIT_OFFSET_MASK (1UL << (BITS_PER_LONG-1)...
6c675bd43ccc36927c855d53d2e0042cdd1074ab
Analyze and fix the following issue in the Linux kernel code: ext4: fix error handling in ext4_create_journal
Problem Details: Fix error handling in ext4_create_journal according to kernel conventions. Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de> Cc: <linux-ext4@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/fs/ext4/super.c b/fs/ext4/super.c index bd9aff9701c0..adcbfadfcb4c 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -2158,6 +2158,7 @@ static int ext4_create_journal(struct super_block * sb, unsigned int journal_inum) { journal_t *journal; + int err; if (sb->s_flags & MS_RDON...
952d9de116ad87261de106464a9eeec038c4cd14
Analyze and fix the following issue in the Linux kernel code: ext3: fix error handling in ext3_create_journal()
Problem Details: Fix error handling in ext3_create_journal according to kernel conventions. Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/fs/ext3/super.c b/fs/ext3/super.c index 440c35d98993..8b75f73ba3b4 100644 --- a/fs/ext3/super.c +++ b/fs/ext3/super.c @@ -2084,6 +2084,7 @@ static int ext3_create_journal(struct super_block * sb, unsigned int journal_inum) { journal_t *journal; + int err; if (sb->s_flags & MS_RDON...
d375b97037c40d51b41d3b00b15729f6730c2cfe
Analyze and fix the following issue in the Linux kernel code: UDF: fix function name from udf_crc16 to udf_crc
Problem Details: We have to change udf_crc16() name to udf_crc() to be able to play with CRC test. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com> Cc: Jan Kara <jack@ucw.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/fs/udf/crc.c b/fs/udf/crc.c index 1b82a4adc2f7..ef2bfaa19d75 100644 --- a/fs/udf/crc.c +++ b/fs/udf/crc.c @@ -106,8 +106,8 @@ int main(void) { unsigned short x; - x = udf_crc16(bytes, sizeof bytes); - printf("udf_crc16: calculated = %4.4x, correct = %4.4x\n", x, 0x3299U); + x = udf_crc(bytes, ...
608e2619682e951f525b08e7a48669a3c0263b41
Analyze and fix the following issue in the Linux kernel code: generic bug: use show_regs() instead of dump_stack()
Problem Details: The current generic bug implementation has a call to dump_stack() in case a WARN_ON(whatever) gets hit. Since report_bug(), which calls dump_stack(), gets called from an exception handler we can do better: just pass the pt_regs structure to report_bug() and pass it to show_regs() in case of a warning....
```diff diff --git a/arch/avr32/kernel/traps.c b/arch/avr32/kernel/traps.c index 86d107511dd4..aaa792815cd7 100644 --- a/arch/avr32/kernel/traps.c +++ b/arch/avr32/kernel/traps.c @@ -184,7 +184,7 @@ asmlinkage void do_illegal_opcode(unsigned long ecr, struct pt_regs *regs) if (!user_mode(regs) && (ecr == ECR_ILLEGAL_...
cc2ea416b2aa04d0c34ff2281a23dae5b76b7b3b
Analyze and fix the following issue in the Linux kernel code: uninline check_signature()
Problem Details: This is a rather bizarre thing to have inlined in io.h. Stick it in lib/ instead. While we're there, despaghetti it a bit, and fix its off-by-one behaviour when passed a zero length. Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org...
```diff diff --git a/include/linux/io.h b/include/linux/io.h index 8423dd376514..e3b2dda6c8eb 100644 --- a/include/linux/io.h +++ b/include/linux/io.h @@ -63,32 +63,7 @@ void __iomem * devm_ioremap(struct device *dev, unsigned long offset, void __iomem * devm_ioremap_nocache(struct device *dev, unsigned long offset, ...
e7c310c36e5fdf1b83a459e5db167bfbd86137db
Analyze and fix the following issue in the Linux kernel code: parport_pc: it887x fix
Problem Details: The IO port range requested by parport_pc.c:sio_ite_8872_probe is too small. The IO-ports of ttyS1 (0x2f8) will be missconfigured by the ITE-chip. The ITE starts looking for the chip a 0x2a0. An IO-portrange of 32 will not overwrite the ports of ttyS1. Therefore register 0x60 should be written with ...
```diff diff --git a/drivers/parport/parport_pc.c b/drivers/parport/parport_pc.c index 7bfbad57879d..5d58ad55d85c 100644 --- a/drivers/parport/parport_pc.c +++ b/drivers/parport/parport_pc.c @@ -2424,7 +2424,6 @@ static int __devinit sio_ite_8872_probe (struct pci_dev *pdev, int autoirq, u32 ite8872set; u32 ite8872...