id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
cf3c34c87f921c5c63d47285c9860345cdaf5170
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (5391): Saa7134: Clean up printk()s
Problem Details: Change some debug messages from printk() to dprintk(). Add KERN_WARNING and KERN_ERR level indicators to other printk()s that lacked them. Format printk lines with consistent ("%s/dvb: ", dev->name) prefix. Fixed dprintk macro, which had an if with no else that wasn't protected with a do {} while(0)...
```diff diff --git a/drivers/media/video/saa7134/saa7134-dvb.c b/drivers/media/video/saa7134/saa7134-dvb.c index 3887f04cc60a..aa17873aa163 100644 --- a/drivers/media/video/saa7134/saa7134-dvb.c +++ b/drivers/media/video/saa7134/saa7134-dvb.c @@ -60,8 +60,12 @@ static int debug = 0; module_param(debug, int, 0644); MO...
a415783bbb9fba7be2eeaeb5e3e08262bd3d64a1
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (5388): Ivtv warning fix
Problem Details: drivers/media/video/ivtv/ivtv-i2c.c:547: warning: initializer-string for array of chars is too long drivers/media/video/ivtv/ivtv-i2c.c:547: warning: (near initialization for 'ivtv_i2c_client_template.name') Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Hans Verkuil <hverkuil...
```diff diff --git a/drivers/media/video/ivtv/ivtv-i2c.c b/drivers/media/video/ivtv/ivtv-i2c.c index 696af35e0282..82ff66585e00 100644 --- a/drivers/media/video/ivtv/ivtv-i2c.c +++ b/drivers/media/video/ivtv/ivtv-i2c.c @@ -544,7 +544,7 @@ static struct i2c_algo_bit_data ivtv_i2c_algo_template = { }; static struct i...
2575f84a50f71b867d8d2ff2994eefc92d60ac79
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (5385): Fix compilation issue with zr364xx when V4L1 is disabled
Problem Details: Add a missing header to fix compilation issue in the zr364xx driver when CONFIG_VIDEO_V4L1 and CONFIG_VIDEO_V4L1_COMPAT are not set. Signed-off-by: Antoine Jacquet <royale@zerezo.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
```diff diff --git a/drivers/media/video/zr364xx.c b/drivers/media/video/zr364xx.c index c055cf017cf5..16bb3576b6ea 100644 --- a/drivers/media/video/zr364xx.c +++ b/drivers/media/video/zr364xx.c @@ -33,6 +33,7 @@ #include <linux/vmalloc.h> #include <linux/slab.h> #include <linux/proc_fs.h> +#include <linux/highmem.h...
a6210b7bea86305871bdca32f38b115b3ea67edf
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (5383): Fix duplicated codes in Pinnacle Grey remote
Problem Details: The keymap for this remote had duplicated labels for different keys, which resulted in those key pairs being unable to function as different inputs. Signed-off-by: Emil Georgiev <emilonlinester@gmail.com> Signed-off-by: Ricardo Cerqueira <v4l@cerqueira.org> Signed-off-by: Mauro Carvalho Chehab <mcheha...
```diff diff --git a/drivers/media/common/ir-keymaps.c b/drivers/media/common/ir-keymaps.c index 03b47a262f27..5ead66f3dcb2 100644 --- a/drivers/media/common/ir-keymaps.c +++ b/drivers/media/common/ir-keymaps.c @@ -667,7 +667,7 @@ IR_KEYTAB_TYPE ir_codes_pinnacle_grey[IR_KEYTAB_SIZE] = { [ 0x1f ] = KEY_L, [ 0x2b ] ...
14500d4a5140252f2524d8d89a22166ef2313614
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (5381): Dvb-ttpci: Update frontend lock status in transfer mode (bugfix)
Problem Details: In transfer/replay mode the frontend lock status was never updated. This caused a 'black screen' if VDR switched from transfer mode to live mode on the same transponder. Thanks to Marco Schluessler for spotting the problem. Signed-off-by: Oliver Endriss <o.endriss@gmx.de> Signed-off-by: Mauro Carvalho...
```diff diff --git a/drivers/media/dvb/ttpci/av7110.c b/drivers/media/dvb/ttpci/av7110.c index 3cd85231a0cd..67becdd4db60 100644 --- a/drivers/media/dvb/ttpci/av7110.c +++ b/drivers/media/dvb/ttpci/av7110.c @@ -1914,8 +1914,10 @@ static int av7110_fe_lock_fix(struct av7110* av7110, fe_status_t status) if (av7110->fe_...
387e69adff3d441616b45002ff85c5b36001be9e
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (5373): [PATCH] Hauppauge Nova-T endianess problem on powerpc
Problem Details: When trying to use a Hauppauge Nova-T Stick on a big-endian architecture (such as powerpc) no frontend can be attached. The attached patch fixes this problem by removing two lines in dib0700_ctrl_rd() that try to correct the endianess on two values that already are correct: - /* think about swapp...
```diff diff --git a/drivers/media/dvb/dvb-usb/dib0700_core.c b/drivers/media/dvb/dvb-usb/dib0700_core.c index 6a4d150784a6..dddf164f269a 100644 --- a/drivers/media/dvb/dvb-usb/dib0700_core.c +++ b/drivers/media/dvb/dvb-usb/dib0700_core.c @@ -56,10 +56,6 @@ static int dib0700_ctrl_rd(struct dvb_usb_device *d, u8 *tx, u...
ede2200d79777d461cf2f0fd19cf7a17f633d3a4
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (5369): Fixed 1 byte too short buffer in tda827x.c
Problem Details: - The i2c data buffer in tda827xa_set_params was 1 byte too short - saa7134-dvb now gives an error mesage if tda827x could not be attached - coding style fix in tda1004x.c Signed-off-by: Hartmut Hackmann <hartmut.hackmann@t-online.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
```diff diff --git a/drivers/media/dvb/frontends/tda1004x.c b/drivers/media/dvb/frontends/tda1004x.c index 3de729b3b4bf..f4882457d021 100644 --- a/drivers/media/dvb/frontends/tda1004x.c +++ b/drivers/media/dvb/frontends/tda1004x.c @@ -695,7 +695,8 @@ static int tda1004x_set_fe(struct dvb_frontend* fe, // set frequenc...
8481a7506bc71622bb5bbd89bc89b2f38bff5ead
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (5367): Pvrusb2: (trivial) Fix too-wide source line
Problem Details: Signed-off-by: Mike Isely <isely@pobox.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
```diff diff --git a/drivers/media/video/pvrusb2/pvrusb2-hdw.c b/drivers/media/video/pvrusb2/pvrusb2-hdw.c index 9916cf32494d..504301ee56fe 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-hdw.c +++ b/drivers/media/video/pvrusb2/pvrusb2-hdw.c @@ -3275,7 +3275,9 @@ int pvr2_hdw_register_access(struct pvr2_hdw *hdw, mu...
9ab1ba38e6a25a480234f196aa26239e28ac2407
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (5361): Dvb-pll: Fix Kconfig files and allow dvb-pll to be optional
Problem Details: A number of drivers selected DVB_PLL when they did not need it, and some that did need it did not select it. The DVB_PLL option is given a name and help text, so that it will show up in the config menu. DVB_PLL support can be turned on if an out-of-tree driver needs it. The standard dvb fe customiza...
```diff diff --git a/drivers/media/dvb/dvb-usb/Kconfig b/drivers/media/dvb/dvb-usb/Kconfig index 80f67a51b908..cb727b812692 100644 --- a/drivers/media/dvb/dvb-usb/Kconfig +++ b/drivers/media/dvb/dvb-usb/Kconfig @@ -33,6 +33,7 @@ config DVB_USB_A800 config DVB_USB_DIBUSB_MB tristate "DiBcom USB DVB-T devices (based o...
51dec1f1abef9771d9085c2336234b28b3e78821
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (5356): Fix bogus error messages in ivtv for VIDIOC_G_CHIP_IDENT
Problem Details: Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
```diff diff --git a/drivers/media/video/ivtv/ivtv-i2c.c b/drivers/media/video/ivtv/ivtv-i2c.c index 17353415b0a3..07c7ed0fe445 100644 --- a/drivers/media/video/ivtv/ivtv-i2c.c +++ b/drivers/media/video/ivtv/ivtv-i2c.c @@ -567,7 +567,8 @@ int ivtv_call_i2c_client(struct ivtv *itv, int addr, unsigned int cmd, void *arg ...
4217e25275eeb1973ca5bed65645f70b8f6c199d
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (5324): This patch fixes request_module_depend()
Problem Details: this patch fixes request_module_depend() Signed-off-by: Markus Rechberger <markus.rechberger@amd.com> Signed-off-by: Hartmut Hackmann <hartmut.hackmann@t-online.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
```diff diff --git a/drivers/media/video/saa7134/saa7134-core.c b/drivers/media/video/saa7134/saa7134-core.c index 5f74ea467d4e..f05b0a9a5e6f 100644 --- a/drivers/media/video/saa7134/saa7134-core.c +++ b/drivers/media/video/saa7134/saa7134-core.c @@ -182,55 +182,28 @@ int saa7134_tuner_callback(void *ptr, int command, ...
06be3035f96d73cf64dc20a8ee37c902d7a2ff2d
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (5318): Fix tda8290 code for tda827x module
Problem Details: During tuner attach, the pointers to host dev structure are not set yet, so the I2c adapter needs to be accessed differently. This patch also does some minor cleanup in the saa7134-dvb module. Signed-off-by: Hartmut Hackmann <hartmut.hackmann@t-online.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@...
```diff diff --git a/drivers/media/video/saa7134/saa7134-dvb.c b/drivers/media/video/saa7134/saa7134-dvb.c index 7985d9e860e9..bbb1a1e55af2 100644 --- a/drivers/media/video/saa7134/saa7134-dvb.c +++ b/drivers/media/video/saa7134/saa7134-dvb.c @@ -634,7 +634,6 @@ static void philips_tda827x_lna_gain(struct dvb_frontend ...
3434eb7e14d9587ee56f3462bcfa5726b62dadb9
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (5306): Add support for VIDIOC_G_CHIP_IDENT
Problem Details: VIDIOC_G_CHIP_IDENT improves debugging of card problems: it can be used to detect which chips are on the board and based on that information selected register dumps can be made, making it easy to debug complicated media chips containing tens or hundreds of registers. This ioctl replaces the internal VI...
```diff diff --git a/drivers/media/video/cafe_ccic.c b/drivers/media/video/cafe_ccic.c index 710c11a68296..4d4db7b2b611 100644 --- a/drivers/media/video/cafe_ccic.c +++ b/drivers/media/video/cafe_ccic.c @@ -22,6 +22,7 @@ #include <linux/spinlock.h> #include <linux/videodev2.h> #include <media/v4l2-common.h> +#includ...
acf2821282bdd912f9ca46780879a21679429f85
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (5297): Fix identation on tda10021.c
Problem Details: Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
```diff diff --git a/drivers/media/dvb/frontends/tda10021.c b/drivers/media/dvb/frontends/tda10021.c index 5b9c5bb29b23..9348e76fe2e0 100644 --- a/drivers/media/dvb/frontends/tda10021.c +++ b/drivers/media/dvb/frontends/tda10021.c @@ -447,7 +447,7 @@ static struct dvb_frontend_ops tda10021_ops = { .frequency_max = 8...
3721929ed327ac2a6a879ad0b7dcbfc8ba2ae93f
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (5293): Make dvb_usb_gl861_debug static
Problem Details: Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
```diff diff --git a/drivers/media/dvb/dvb-usb/gl861.c b/drivers/media/dvb/dvb-usb/gl861.c index c9f38a5e70d3..d50f41feadec 100644 --- a/drivers/media/dvb/dvb-usb/gl861.c +++ b/drivers/media/dvb/dvb-usb/gl861.c @@ -12,7 +12,7 @@ #include "qt1010.h" /* debug */ -int dvb_usb_gl861_debug; +static int dvb_usb_gl861_deb...
404d5b185b4eb56d6fa2f7bd27833f8df1c38ce4
Analyze and fix the following issue in the Linux kernel code: dev_dbg: check dev_dbg() arguments
Problem Details: Duplicate what Zach Brown did for pr_debug in commit 8b2a1fd1b394c60eaa2587716102dd5e9b4e5990 [akpm@linux-foundation.org: fix a couple of things which broke] Signed-off-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartma...
```diff diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index b89a98e61323..7a6028599d62 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c @@ -119,8 +119,7 @@ MODULE_PARM_DESC(use_both_schemes, "first one fails"); -#ifdef DEBUG -static inline char *portspeed (int portstatus) +static i...
523ded71de0c5e66973335bf99a80edfda9f401b
Analyze and fix the following issue in the Linux kernel code: device_schedule_callback() needs a module reference
Problem Details: This patch (as896b) fixes an oversight in the design of device_schedule_callback(). It is necessary to acquire a reference to the module owning the callback routine, to prevent the module from being unloaded before the callback can run. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Cc: Satyam...
```diff diff --git a/drivers/base/core.c b/drivers/base/core.c index f69305c7269d..8aa090da1cd7 100644 --- a/drivers/base/core.c +++ b/drivers/base/core.c @@ -480,9 +480,10 @@ void device_remove_bin_file(struct device *dev, struct bin_attribute *attr) EXPORT_SYMBOL_GPL(device_remove_bin_file); /** - * device_schedu...
45cd8d8e1e56fba41b1e4fae988f40fe938045c2
Analyze and fix the following issue in the Linux kernel code: sysfs: bin.c printk fix
Problem Details: fs/sysfs/bin.c: In function 'read': fs/sysfs/bin.c:77: warning: format '%zd' expects type 'signed size_t', but argument 4 has type 'int' Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/fs/sysfs/bin.c b/fs/sysfs/bin.c index d3b9f5f07db1..8ea2a51ce883 100644 --- a/fs/sysfs/bin.c +++ b/fs/sysfs/bin.c @@ -59,7 +59,7 @@ read(struct file * file, char __user * userbuf, size_t count, loff_t * off) if (copy_to_user(userbuf, buffer, count)) return -EFAULT; - pr_debug("offs = %lld, *...
2753133eb3321feb81dcb9c88141dd2aa5973ee1
Analyze and fix the following issue in the Linux kernel code: kobject: Comment and warning fixes to kobject.c
Problem Details: This dots some i's and crosses some t's after left over from when kobject_kset_add_dir was built from kobject_add_dir. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/lib/kobject.c b/lib/kobject.c index 2882aff6f3d1..cecf2fbede3e 100644 --- a/lib/kobject.c +++ b/lib/kobject.c @@ -519,7 +519,7 @@ static struct kobj_type dir_ktype = { }; /** - * kobject__kset_add_dir - add sub directory of object. + * kobject_kset_add_dir - add sub directory of object. * @ks...
2f66858a0ae48faf4c8dc19042f3aff52208dc57
Analyze and fix the following issue in the Linux kernel code: qeth: Remove usage of subsys.rwsem
Problem Details: the current driver tree contains the removal of subsys.rwsem. Unfortunately, this breaks qeth. However, it should be no problem to fix the walking of the devices for /proc/qeth: No need to take subsys.rwsem during walking the devices, driver_find_devices() should already suffice. Signed-off-by: Corne...
```diff diff --git a/drivers/s390/net/qeth_proc.c b/drivers/s390/net/qeth_proc.c index 81f805cc5ee7..89d56c8ecdd2 100644 --- a/drivers/s390/net/qeth_proc.c +++ b/drivers/s390/net/qeth_proc.c @@ -37,7 +37,6 @@ qeth_procfile_seq_start(struct seq_file *s, loff_t *offset) struct device *dev = NULL; loff_t nr = 0; - d...
b7bb125dc3d0ca3f72c9116525ce0f018a9844e1
Analyze and fix the following issue in the Linux kernel code: SCSI: use the proper semaphore to protect the class lists
Problem Details: SCSI was using the incorrect lock to protect walking the list of all devices in the class. This patch fixes this. Cc: James Bottomley <James.Bottomley@SteelEye.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/scsi/hosts.c b/drivers/scsi/hosts.c index 38c3a291efac..bd8e7f323c69 100644 --- a/drivers/scsi/hosts.c +++ b/drivers/scsi/hosts.c @@ -435,7 +435,7 @@ struct Scsi_Host *scsi_host_lookup(unsigned short hostnum) struct class_device *cdev; struct Scsi_Host *shost = ERR_PTR(-ENXIO), *p; - ...
f89cbc399ecd924c4bd879344e662aace2274b4f
Analyze and fix the following issue in the Linux kernel code: Driver core: add suspend() and resume() to struct device_type
Problem Details: Driver core: add suspend() and resume() to struct device_type In cases when there are devices of different types in the same class we can't use class's implementation of suspend and resume methods and we need to add them to struct device_type instead. Also fix error handling in resume code (we should...
```diff diff --git a/drivers/base/power/resume.c b/drivers/base/power/resume.c index 020be36705a6..a2c64188d713 100644 --- a/drivers/base/power/resume.c +++ b/drivers/base/power/resume.c @@ -26,7 +26,9 @@ int resume_device(struct device * dev) TRACE_DEVICE(dev); TRACE_RESUME(0); + down(&dev->sem); + if (dev->...
1b0b3b9980e482ab7c603430462538334f69f14a
Analyze and fix the following issue in the Linux kernel code: kref: fix CPU ordering with respect to krefs
Problem Details: some atomic operations are only atomic, not ordered. Thus a CPU is allowed to reorder memory references to an object to before the reference is obtained. This fixes it. Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/lib/kref.c b/lib/kref.c index 0d07cc31c818..a6dc3ec328e0 100644 --- a/lib/kref.c +++ b/lib/kref.c @@ -21,6 +21,7 @@ void kref_init(struct kref *kref) { atomic_set(&kref->refcount,1); + smp_mb(); } /** @@ -31,6 +32,7 @@ void kref_get(struct kref *kref) { WARN_ON(!atomic_read(&kref->refcou...
a456b7023e0abf80bb03b0bdf5471b48878e5c49
Analyze and fix the following issue in the Linux kernel code: dev_printk and new-style class devices
Problem Details: As the new-style class devices (as opposed to old-style struct class_device) are becoming more widely used, I noticed that the dev_printk-based functions are not working properly with these. New-style class devices have no driver nor bus, almost by definition, and as a result dev_driver_string(), which...
```diff diff --git a/drivers/base/core.c b/drivers/base/core.c index 658eae5dacda..9ea12d9b48a6 100644 --- a/drivers/base/core.c +++ b/drivers/base/core.c @@ -43,7 +43,8 @@ int (*platform_notify_remove)(struct device * dev) = NULL; const char *dev_driver_string(struct device *dev) { return dev->driver ? dev->driver...
864062457a2e444227bd368ca5f2a2b740de604f
Analyze and fix the following issue in the Linux kernel code: driver core: fix namespace issue with devices assigned to classes
Problem Details: - uses a kset in "struct class" to keep track of all directories belonging to this class - merges with the /sys/devices/virtual logic. - removes the namespace-dir if the last member of that class leaves the directory. There may be locking or refcounting fixes left, I stopped when it seemed...
```diff diff --git a/drivers/base/class.c b/drivers/base/class.c index d5968128be2b..80bbb2074636 100644 --- a/drivers/base/class.c +++ b/drivers/base/class.c @@ -145,6 +145,7 @@ int class_register(struct class * cls) INIT_LIST_HEAD(&cls->children); INIT_LIST_HEAD(&cls->devices); INIT_LIST_HEAD(&cls->interfaces);...
00ed8e3dda47f8421b11da17e353d7db8c878121
Analyze and fix the following issue in the Linux kernel code: driver core: fix device_add error path
Problem Details: - At the moment we jump here device was't added to dev->class->devices list yet. Signed-off-by: Monakhov Dmitriy <dmonakhov@openvz.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/base/core.c b/drivers/base/core.c index d7fcf823a42a..db3a151be4a1 100644 --- a/drivers/base/core.c +++ b/drivers/base/core.c @@ -677,15 +677,6 @@ int device_add(struct device *dev) #endif sysfs_remove_link(&dev->kobj, "device"); } - - down(&dev->class->sem); - /* notify any inter...
39bc89fd4019b164002adaacef92c4140e37955a
Analyze and fix the following issue in the Linux kernel code: make SysRq-T show all tasks again
Problem Details: show_state() (SysRq-T) developed the buggy habbit of not showing TASK_RUNNING tasks. This was due to the mistaken belief that state_filter == -1 would be a pass-through filter - while in reality it did not let TASK_RUNNING == 0 p->state values through. Fix this by restoring the original '!state_filte...
```diff diff --git a/include/linux/sched.h b/include/linux/sched.h index 49fe2997a016..a1707583de49 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -196,13 +196,13 @@ extern void init_idle(struct task_struct *idle, int cpu); extern cpumask_t nohz_cpu_mask; /* - * Only dump TASK_* tasks. (-1 for al...
a4c9bb7d22aa61ec585984f46df185669e557e3d
Analyze and fix the following issue in the Linux kernel code: [MIPS] Replace old fashioned "__typeof" with "__typeof__".
Problem Details: [Robert's original log message said this was a bug but it isn't, it's just very old fashioned syntax that is not (no longer?) documented in the gcc documentation. So for the sake of uniformity I'm applying his patch but with a modified log message. -- Ralf] Signed-off-by: Robert P. J. Day <rpjday@min...
```diff diff --git a/include/asm-mips/paccess.h b/include/asm-mips/paccess.h index 147844ef103b..8c08fa904b2c 100644 --- a/include/asm-mips/paccess.h +++ b/include/asm-mips/paccess.h @@ -34,7 +34,7 @@ struct __large_pstruct { unsigned long buf[100]; }; #define __get_dbe(x,ptr,size) \ ({ \ long __gu_err...
639702bd725b3cc1a9bd442a7822c83849d66e91
Analyze and fix the following issue in the Linux kernel code: [MIPS] Register PCI host bridge resource earlier
Problem Details: PCI based SNI RM machines have their EISA bus behind an Intel PCI/EISA bridge. So the PCI IO range must start at 0x0000. Changing that will break the PCI bus, because i8259.c already has registered it's IO addresses before the PCI bus gets initialized. Below is a patch, which will register the PCI host...
```diff diff --git a/arch/mips/kernel/i8259.c b/arch/mips/kernel/i8259.c index 9c79703979b2..2345160e63fc 100644 --- a/arch/mips/kernel/i8259.c +++ b/arch/mips/kernel/i8259.c @@ -328,8 +328,8 @@ void __init init_i8259_irqs (void) { int i; - request_resource(&ioport_resource, &pic1_io_resource); - request_resource(...
d619f38fdacb5cec0c841798bbadeaf903868852
Analyze and fix the following issue in the Linux kernel code: [MIPS] Add bcm1480 ZBus trace support, fix wait related bugs
Problem Details: Make ZBus tracing generic - moving it to a common direcotry under arch/mips/sibyte, add bcm1480 support and fix some wait related bugs (thanks to Ralf for assistance on that). Signed-off-by: Mark Mason <mason@broadcom.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
```diff diff --git a/arch/mips/Makefile b/arch/mips/Makefile index 92bca6ad6ab1..f2f742df32c7 100644 --- a/arch/mips/Makefile +++ b/arch/mips/Makefile @@ -530,25 +530,29 @@ cflags-$(CONFIG_SGI_IP32) += -Iinclude/asm-mips/mach-ip32 load-$(CONFIG_SGI_IP32) += 0xffffffff80004000 # -# Sibyte SB1250 SOC +# Sibyte SB125...
7f5a7716dc0b380fd3c85ca5a5841969555feaa7
Analyze and fix the following issue in the Linux kernel code: [MIPS] Fix AP/SP to work in the reality of modern kernels.
Problem Details: Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
```diff diff --git a/arch/mips/kernel/kspd.c b/arch/mips/kernel/kspd.c index 29eadd404fa5..c6580018c94b 100644 --- a/arch/mips/kernel/kspd.c +++ b/arch/mips/kernel/kspd.c @@ -17,6 +17,7 @@ */ #include <linux/kernel.h> #include <linux/module.h> +#include <linux/sched.h> #include <linux/unistd.h> #include <linux/fi...
6d4740c89c187ee8f5ac7355c4eeffda26493d1f
Analyze and fix the following issue in the Linux kernel code: [S390] sclp: fix coding style.
Problem Details: Use only capital letters for defines. Cc: Peter Oberparleiter <peter.oberparleiter@de.ibm.com> Signed-off-by: Stefan Haberland <stefan.haberland@de.ibm.com> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
```diff diff --git a/drivers/s390/char/sclp.c b/drivers/s390/char/sclp.c index bd219ab22869..fa62e6944057 100644 --- a/drivers/s390/char/sclp.c +++ b/drivers/s390/char/sclp.c @@ -511,7 +511,7 @@ sclp_state_change_cb(struct evbuf_header *evbuf) } static struct sclp_register sclp_state_change_event = { - .receive_mas...
be7962856d299a0f231ac36f89f4a89cbecfe0ff
Analyze and fix the following issue in the Linux kernel code: [S390] Improved kernel stack overflow checking.
Problem Details: Recent cvs versions of gcc have support for an improved stack overflow checking that calculates the size of the guard size for each function. If the compiler accepts -mstack-size without -mstack-guard then the new stack check is available. We always want to use the new stack checker. Signed-off-by: Ma...
```diff diff --git a/arch/s390/Makefile b/arch/s390/Makefile index b1e558496469..ece5adc05606 100644 --- a/arch/s390/Makefile +++ b/arch/s390/Makefile @@ -67,8 +67,10 @@ endif ifeq ($(call cc-option-yn,-mstack-size=8192 -mstack-guard=128),y) cflags-$(CONFIG_CHECK_STACK) += -mstack-size=$(STACK_SIZE) +ifneq ($(call ...
c0007f1a65762eaf55633d403b380130ec60adad
Analyze and fix the following issue in the Linux kernel code: [S390] Use generic bug.
Problem Details: Generic bug implementation for s390. Will increase the value of the console output on BUG() statements since registers r0-r5,r14 will not be clobbered by a printk() call that was previously done before the illegal instruction of BUG() was hit. Also implements an architecture specific WARN_ON(). Output ...
```diff diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig index 0f293aa7b0fa..0f9517bc8e70 100644 --- a/arch/s390/Kconfig +++ b/arch/s390/Kconfig @@ -41,6 +41,11 @@ config GENERIC_HWEIGHT config GENERIC_TIME def_bool y +config GENERIC_BUG + bool + depends on BUG + default y + config NO_IOMEM def_bool y diff ...
8c4941c53b14e5a08ed2f270e9f087b410a9abcc
Analyze and fix the following issue in the Linux kernel code: [S390] cio: cm_enable memory leak.
Problem Details: We allocage two pages when channel path measurements are enabled via cm_enable. We must not forget to free them again when channel path measurements are disabled again. Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
```diff diff --git a/drivers/s390/cio/chsc.c b/drivers/s390/cio/chsc.c index 0841e16b6a82..ea92ac4d6577 100644 --- a/drivers/s390/cio/chsc.c +++ b/drivers/s390/cio/chsc.c @@ -818,7 +818,7 @@ chsc_secm(struct channel_subsystem *css, int enable) } else chsc_remove_cmg_attr(css); } - if (enable && !css->cm_enable...
7ad6a24970325294a22a08446d473384c15b928e
Analyze and fix the following issue in the Linux kernel code: [S390] cio: fix subchannel channel-path data usage
Problem Details: Ensure that channel-path related subchannel data is only retrieved and used when it is valid and that it is updated when it may have changed. Signed-off-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
```diff diff --git a/drivers/s390/cio/chsc.c b/drivers/s390/cio/chsc.c index 89a130a62654..0841e16b6a82 100644 --- a/drivers/s390/cio/chsc.c +++ b/drivers/s390/cio/chsc.c @@ -26,155 +26,84 @@ static void *sei_page; -/* FIXME: this is _always_ called for every subchannel. shouldn't we - * process more than one at...
8224ca195874525533665bbcd23b6da1e575aa4d
Analyze and fix the following issue in the Linux kernel code: [AVR32] Fix compile error with gcc 4.1
Problem Details: gcc 4.1 doesn't seem to like const variables as inline assembly outputs. Drop support for reading 64-bit values using get_user() so that we can use an unsigned long to hold the result regardless of the actual size. This should be safe since many architectures, including i386, doesn't support reading 64...
```diff diff --git a/include/asm-avr32/uaccess.h b/include/asm-avr32/uaccess.h index 74a679e9098c..ed092395215e 100644 --- a/include/asm-avr32/uaccess.h +++ b/include/asm-avr32/uaccess.h @@ -181,24 +181,23 @@ extern int __put_user_bad(void); #define __get_user_nocheck(x, ptr, size) \ ({ \ - typeof(*(ptr)...
e3e7d8d4ea37b8372ee417452d03171c5dc55125
Analyze and fix the following issue in the Linux kernel code: [AVR32] Make I/O access macros work with external devices
Problem Details: Fix the I/O access macros so that they work with externally connected devices accessed in little-endian mode over any bus width: * Use a set of macros to define I/O port- and memory operations borrowed from MIPS. * Allow subarchitecture to specify address- and data-mangling * Implement at32ap-specif...
```diff diff --git a/arch/avr32/mach-at32ap/Kconfig b/arch/avr32/mach-at32ap/Kconfig index d7497715cc02..eb307838457b 100644 --- a/arch/avr32/mach-at32ap/Kconfig +++ b/arch/avr32/mach-at32ap/Kconfig @@ -2,6 +2,30 @@ if PLATFORM_AT32AP menu "Atmel AVR32 AP options" +choice + prompt "AT32AP7000 static memory bus wid...
92b728c147adb8c690b520304f4c9ee3eee43c21
Analyze and fix the following issue in the Linux kernel code: [AVR32] Fix NMI handler
Problem Details: Fix a problem with the NMI handler entry code related to the NMI handler sharing some code with the exception handlers. This is not a good idea because the RSR and RAR registers are not the same, and the NMI handler runs with interrupts masked the whole time so there's no need to check for pending work...
```diff diff --git a/arch/avr32/kernel/entry-avr32b.S b/arch/avr32/kernel/entry-avr32b.S index 5f5f7e42f51b..484e08310f15 100644 --- a/arch/avr32/kernel/entry-avr32b.S +++ b/arch/avr32/kernel/entry-avr32b.S @@ -340,12 +340,34 @@ do_bus_error_read: do_nmi_ll: sub sp, 4 stmts --sp, r0-lr - /* FIXME: Make sure RAR_NM...
535c806c26ef602d578792083df52b31803b961e
Analyze and fix the following issue in the Linux kernel code: [AVR32] Clean up asm/sysreg.h
Problem Details: Fix indentation and remove spurious comments in asm-avr32/sysreg.h Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
```diff diff --git a/include/asm-avr32/sysreg.h b/include/asm-avr32/sysreg.h index f91975f330f6..c02bc8304b13 100644 --- a/include/asm-avr32/sysreg.h +++ b/include/asm-avr32/sysreg.h @@ -7,326 +7,281 @@ * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. ...
188ff65d49dadf7b0e9b6718abc3fe98a5098711
Analyze and fix the following issue in the Linux kernel code: [AVR32] Don't enable clocks with no users
Problem Details: Bring the code that sets the initial PM clock masks in line with the comment preceding it by only enabling clocks that have users != 0. Fix SM clock definition and avr32_hpt_init() so that the SM and TC0 clocks keep ticking. Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
```diff diff --git a/arch/avr32/mach-at32ap/at32ap7000.c b/arch/avr32/mach-at32ap/at32ap7000.c index 6eeda60b8288..56db45b99a0f 100644 --- a/arch/avr32/mach-at32ap/at32ap7000.c +++ b/arch/avr32/mach-at32ap/at32ap7000.c @@ -417,7 +417,15 @@ struct platform_device at32_sm_device = { .resource = sm_resource, .num_reso...
e4bb688d9f11d7fee927312cc97d443472c7c212
Analyze and fix the following issue in the Linux kernel code: [POWERPC] bootwrapper: Fix array handling in dt_xlate_reg().
Problem Details: This fixes a few bugs in how dt_xlate_reg() handles address arrays: 1. copy_val() was copying into the wrong end of the array, resulting in random stack garbage at the other end. 2. dt_xlate_reg() was getting the result from the wrong end of the array. 3. add_reg() and sub_reg() were treating the arra...
```diff diff --git a/arch/powerpc/boot/devtree.c b/arch/powerpc/boot/devtree.c index 23492d7fb556..ac4b5ee92d58 100644 --- a/arch/powerpc/boot/devtree.c +++ b/arch/powerpc/boot/devtree.c @@ -123,15 +123,17 @@ static void get_reg_format(void *node, u32 *naddr, u32 *nsize) static void copy_val(u32 *dest, u32 *src, int...
f13659e0b3907548402ce1f47bf866544b804260
Analyze and fix the following issue in the Linux kernel code: [POWERPC] Fix WARN_ON when entering xmon
Problem Details: Whenever we enter xmon we get a WARN_ON out of the rtas code since it thinks interrupts are still on: Unable to handle kernel paging request for data at address 0x00000000 Faulting instruction address: 0xd000000000080008 cpu 0x3: Vector: 300 (Data Access) at [c0000000075dba00] pc: d000000000080008...
```diff diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c index f12687d0354d..b481db1dacb4 100644 --- a/arch/powerpc/xmon/xmon.c +++ b/arch/powerpc/xmon/xmon.c @@ -330,18 +330,17 @@ static void release_output_lock(void) static int xmon_core(struct pt_regs *regs, int fromipi) { int cmd = 0; - unsigned...
5dd60166c22dbbb7a8684c119d28cb88b6087784
Analyze and fix the following issue in the Linux kernel code: [POWERPC] Fix typos in booting-without-of.txt
Problem Details: Fix typos + some cosmetic changes. Signed-off-by: Domen Puncer <domen.puncer@telargo.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
```diff diff --git a/Documentation/powerpc/booting-without-of.txt b/Documentation/powerpc/booting-without-of.txt index 88cdb592fdf9..033a3f3b3ab7 100644 --- a/Documentation/powerpc/booting-without-of.txt +++ b/Documentation/powerpc/booting-without-of.txt @@ -39,7 +39,7 @@ and property data. ...
ebbd90a730711280142017e482f27ec3fbb4f227
Analyze and fix the following issue in the Linux kernel code: [IPV6]: Fix thinko in ipv6_rthdr_rcv() changes.
Problem Details: Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/ipv6/exthdrs.c b/net/ipv6/exthdrs.c index 4aa7fb024b3a..6d8e4ac7bdad 100644 --- a/net/ipv6/exthdrs.c +++ b/net/ipv6/exthdrs.c @@ -400,6 +400,7 @@ static int ipv6_rthdr_rcv(struct sk_buff **skbp) switch (hdr->type) { #ifdef CONFIG_IPV6_MIP6 + case IPV6_SRCRT_TYPE_2: break; #endif case...
116ab40df8decf8c519368e31825e9584c86adf2
Analyze and fix the following issue in the Linux kernel code: [POWERPC] pasemi: Kconfig for gpio_mdio
Problem Details: arch/powerpc/platforms/pasemi/gpio_mdio.c really depends on CONFIG_PHYLIB. Add a config option for it, allow for it to be disabled if needed and fix the dependency. Signed-off-by: Olof Johansson <olof@lixom.net> Signed-off-by: Paul Mackerras <paulus@samba.org>
```diff diff --git a/arch/powerpc/platforms/pasemi/Kconfig b/arch/powerpc/platforms/pasemi/Kconfig index 64e55250ef46..eb4dbc705b06 100644 --- a/arch/powerpc/platforms/pasemi/Kconfig +++ b/arch/powerpc/platforms/pasemi/Kconfig @@ -19,4 +19,11 @@ config PPC_PASEMI_IOMMU help IOMMU support for PA6T-1682M +config ...
a4d73ee168eeaed3baea86542ad42e1fd7e192d3
Analyze and fix the following issue in the Linux kernel code: [WIRELESS] cfg80211: Fix locking in wiphy_new.
Problem Details: This patch fixes the locking in wiphy new. Ingo Oeser <netdev@axxeo.de> noticed that locking in the error case was wrong and also suggested this fix. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: David S. Miller <davem@...
```diff diff --git a/net/wireless/core.c b/net/wireless/core.c index 532e1e09e028..24a21add0ba6 100644 --- a/net/wireless/core.c +++ b/net/wireless/core.c @@ -53,21 +53,25 @@ struct wiphy *wiphy_new(struct cfg80211_ops *ops, int sizeof_priv) mutex_lock(&cfg80211_drv_mutex); - if (unlikely(wiphy_counter<0)) { + dr...
235c107ba08becb3ae6c3d3449c8b1053a5a9d75
Analyze and fix the following issue in the Linux kernel code: [WEXT]: Remove dead debug code.
Problem Details: This patch kills a whole bunch of code that can only ever be used by defining some things in wext.c. Also, the things that are printed are mostly useless since the API is fairly well-tested. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.co...
```diff diff --git a/net/wireless/wext.c b/net/wireless/wext.c index a6cf1034e07c..1db2be7ba2f2 100644 --- a/net/wireless/wext.c +++ b/net/wireless/wext.c @@ -103,11 +103,6 @@ /**************************** CONSTANTS ****************************/ -/* Debugging stuff */ -#undef WE_IOCTL_DEBUG /* Debug IOCTL API */ ...
68c708fd5e90f6d178c84bb7e641589eb2842319
Analyze and fix the following issue in the Linux kernel code: [RXRPC]: Fix pointers passed to bitops.
Problem Details: CC [M] net/rxrpc/ar-input.o net/rxrpc/ar-input.c: In function ‘rxrpc_fast_process_data’: net/rxrpc/ar-input.c:171: warning: passing argument 2 of ‘__test_and_set_bit’ from incompatible pointer type net/rxrpc/ar-input.c:180: warning: passing argument 2 of ‘__clear_bit’ from incompatible pointer type ne...
```diff diff --git a/net/rxrpc/ar-input.c b/net/rxrpc/ar-input.c index ceb5d619a1d4..91b5bbb003e2 100644 --- a/net/rxrpc/ar-input.c +++ b/net/rxrpc/ar-input.c @@ -168,7 +168,7 @@ static int rxrpc_fast_process_data(struct rxrpc_call *call, /* we may already have the packet in the out of sequence queue */ ackbit = se...
3e1dcb00d59473d52d4ca80a57408b3d953e4573
Analyze and fix the following issue in the Linux kernel code: firewire: fw-device printk fix
Problem Details: You don't know what type is used to implement u64. Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
```diff diff --git a/drivers/firewire/fw-device.c b/drivers/firewire/fw-device.c index 7503b8d9abe5..3841086048d6 100644 --- a/drivers/firewire/fw-device.c +++ b/drivers/firewire/fw-device.c @@ -362,7 +362,8 @@ guid_show(struct device *dev, struct device_attribute *attr, char *buf) guid = ((u64)device->config_rom[3...
ba3e0e1accd8d5bb12eaeb0977429d8dc04f6d1e
Analyze and fix the following issue in the Linux kernel code: [AFS]: Fix u64 printing in debug logging.
Problem Details: Need 'unsigned long long' casts to quiet warnings on 64-bit platforms when using %ll on a u64. Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/fs/afs/dir.c b/fs/afs/dir.c index dbbe75d6023b..dac5b990c0cd 100644 --- a/fs/afs/dir.c +++ b/fs/afs/dir.c @@ -419,7 +419,8 @@ static int afs_lookup_filldir(void *_cookie, const char *name, int nlen, struct afs_lookup_cookie *cookie = _cookie; _enter("{%s,%Zu},%s,%u,,%llu,%u", - cookie-...
8110b073a9135acf0a71bccfc20c0d1023f179c6
Analyze and fix the following issue in the Linux kernel code: ocfs2: Fix up i_blocks calculation to know about holes
Problem Details: Older file systems which didn't support holes did a dumb calculation of i_blocks based on i_size. This is no longer accurate, so fix things up to take actual allocation into account. Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
```diff diff --git a/fs/ocfs2/aops.c b/fs/ocfs2/aops.c index ff71e0b430cd..b74971e19d54 100644 --- a/fs/ocfs2/aops.c +++ b/fs/ocfs2/aops.c @@ -1271,7 +1271,7 @@ ssize_t ocfs2_buffered_write_cluster(struct file *file, loff_t pos, i_size_write(inode, pos); mark_inode_dirty(inode); } - inode->i_blocks = ocfs2_alig...
4f902c37727bbedbc0508a1477874c58ddcc9af8
Analyze and fix the following issue in the Linux kernel code: ocfs2: Fix extent lookup to return true size of holes
Problem Details: Initially, we had wired things to return a size '1' of holes. Cook up a small amount of code to find the next extent and calculate the number of clusters between the virtual offset and the next allocated extent. Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
```diff diff --git a/fs/ocfs2/aops.c b/fs/ocfs2/aops.c index eb67c902b002..ff71e0b430cd 100644 --- a/fs/ocfs2/aops.c +++ b/fs/ocfs2/aops.c @@ -439,8 +439,7 @@ static int ocfs2_direct_IO_get_blocks(struct inode *inode, sector_t iblock, struct buffer_head *bh_result, int create) { int ret; - u64 p_blkno, ino...
25baf2da1473d9dcde1a4c7b0ab26e7d67d9bf62
Analyze and fix the following issue in the Linux kernel code: ocfs2: Teach ocfs2_get_block() about holes
Problem Details: ocfs2_get_block() didn't understand sparse files, fix that. Also remove some code that isn't really useful anymore. We can fix up ocfs2_direct_IO_get_blocks() at the same time. Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
```diff diff --git a/fs/ocfs2/aops.c b/fs/ocfs2/aops.c index 8368036f434a..acf8f0006725 100644 --- a/fs/ocfs2/aops.c +++ b/fs/ocfs2/aops.c @@ -137,6 +137,7 @@ static int ocfs2_get_block(struct inode *inode, sector_t iblock, { int err = 0; u64 p_blkno, past_eof; + struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); ...
be9e986b824b41c9d5cc5eca34ee3424c35fd162
Analyze and fix the following issue in the Linux kernel code: ocfs2: Local mounts should skip inode updates
Problem Details: We don't want the extent map and uptodate cache destruction in ocfs2_meta_lock_update() on a local mount, so skip that. This fixes several bugs with uptodate being cleared on buffers and extent maps being corrupted. Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
```diff diff --git a/fs/ocfs2/dlmglue.c b/fs/ocfs2/dlmglue.c index e335541727f9..31d519a6dbd2 100644 --- a/fs/ocfs2/dlmglue.c +++ b/fs/ocfs2/dlmglue.c @@ -1479,12 +1479,15 @@ static int ocfs2_meta_lock_update(struct inode *inode, { int status = 0; struct ocfs2_inode_info *oi = OCFS2_I(inode); - struct ocfs2_lock_r...
756a1501ddbbe73098aa031939460930f6edc9cd
Analyze and fix the following issue in the Linux kernel code: ocfs2_dlm: fix race in dlm_remaster_locks
Problem Details: There is a possibility that dlm_remaster_locks could overwride node->state with DLM_RECO_NODE_DATA_REQUESTED after dlm_reco_data_done_handler sets the node->state to DLM_RECO_NODE_DATA_DONE. This could lead to recovery getting stuck and requires a cluster reboot. Synchronize with dlm_reco_state_lock sp...
```diff diff --git a/fs/ocfs2/dlm/dlmrecovery.c b/fs/ocfs2/dlm/dlmrecovery.c index 6d4a83d50152..c1807a42c49f 100644 --- a/fs/ocfs2/dlm/dlmrecovery.c +++ b/fs/ocfs2/dlm/dlmrecovery.c @@ -611,6 +611,7 @@ static int dlm_remaster_locks(struct dlm_ctxt *dlm, u8 dead_node) } } while (status != 0); + spin_lock(&dlm...
22c970f3468a6766b362d57fa32ebb92cb8cd6db
Analyze and fix the following issue in the Linux kernel code: [CPUFREQ] Fix limited cpufreq when booted on battery
Problem Details: References: https://bugzilla.novell.com/show_bug.cgi?id=231107 https://bugzilla.novell.com/show_bug.cgi?id=264077 Fix limited cpufreq when booted on battery If booted on battery: cpufreq_set_policy (evil) is invoked which calls verify_within_limits. max_freq gets lowered and therefore users_policy.ma...
```diff diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index 3162010900c9..fcb86dd8903d 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c @@ -768,6 +768,9 @@ static int cpufreq_add_dev (struct sys_device * sys_dev) unlock_policy_rwsem_write(cpu); goto err_out; } + policy...
e8e49190f64896afe79f7136a67c2bdefbd3e322
Analyze and fix the following issue in the Linux kernel code: Fix preemption warnings in speedstep-centrino.c
Problem Details: BUG: using smp_processor_id() in preemptible [00000001] code: kondemand/0/2473 caller is centrino_target+0xfb/0x600 [<401e3646>] debug_smp_processor_id+0x9e/0xb0 [<40112afb>] centrino_target+0xfb/0x600 [<40112a00>] centrino_target+0x0/0x600 [<40305bd9>] __cpufreq_driver_target+0x5c/0x6b [<f897a537>] do...
```diff diff --git a/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c b/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c index f43b987f952b..35489fd68852 100644 --- a/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c +++ b/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c @@ -720,6 +720,7 @@ static int centrino_targe...
b826b4d6e497f862239c16b25fe864026858aad5
Analyze and fix the following issue in the Linux kernel code: [AGPGART] Fix sparse warning in sgi-agp.c
Problem Details: drivers/char/agp/sgi-agp.c:51:10: warning: Using plain integer as NULL pointer Signed-off-by: Dave Jones <davej@redhat.com>
```diff diff --git a/drivers/char/agp/sgi-agp.c b/drivers/char/agp/sgi-agp.c index ee8f50edde1b..cda608c42bea 100644 --- a/drivers/char/agp/sgi-agp.c +++ b/drivers/char/agp/sgi-agp.c @@ -47,9 +47,8 @@ static void *sgi_tioca_alloc_page(struct agp_bridge_data *bridge) nid = info->ca_closest_node; page = alloc_pages...
89cf7ccc936db979e5e9d9ce49437ef859cdd889
Analyze and fix the following issue in the Linux kernel code: [AGPGART] Intel-agp adjustments
Problem Details: Fix a call to __free_page where __free_pages(, 2) was meant, and do proper error path handling. Also remove a redundant conditional. Signed-off-by: Jan Beulich <jbeulich@novell.com> Signed-off-by: Dave Jones <davej@redhat.com>
```diff diff --git a/drivers/char/agp/intel-agp.c b/drivers/char/agp/intel-agp.c index 55392a45a14b..9c69f2e761f5 100644 --- a/drivers/char/agp/intel-agp.c +++ b/drivers/char/agp/intel-agp.c @@ -186,8 +186,9 @@ static void *i8xx_alloc_pages(void) return NULL; if (change_page_attr(page, 4, PAGE_KERNEL_NOCACHE) < ...
82eab1306c20f67f718cb5439f7efd62f4e86fc8
Analyze and fix the following issue in the Linux kernel code: [AGPGART] prevent probe collision of sis-agp and amd64_agp
Problem Details: For some vendor/id pairs the kernel will autoload both the sis-agp and the amd64_agp modules as the sis-agp module will load for all sis devices. This collision causes the bug reported in: http://bugzilla.novell.com/show_bug.cgi?id=248665 As currently sis_probe does its own matching, requesting the wh...
```diff diff --git a/drivers/char/agp/sis-agp.c b/drivers/char/agp/sis-agp.c index 125f4282d955..eb1a1c738190 100644 --- a/drivers/char/agp/sis-agp.c +++ b/drivers/char/agp/sis-agp.c @@ -143,96 +143,6 @@ static struct agp_bridge_driver sis_driver = { .agp_type_to_mask_type = agp_generic_type_to_mask_type, }; -sta...
a165b4205e0097c7544ec3c59522a3b20ec14eb1
Analyze and fix the following issue in the Linux kernel code: [SPARC64]: Fix PCI rework to adhere to of_get_property() const return.
Problem Details: Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/arch/sparc64/kernel/of_device.c b/arch/sparc64/kernel/of_device.c index f18eec6ad691..9ac9a307999a 100644 --- a/arch/sparc64/kernel/of_device.c +++ b/arch/sparc64/kernel/of_device.c @@ -317,7 +317,7 @@ static unsigned int of_bus_default_get_flags(const u32 *addr) static int of_bus_pci_match(struct...
f1cfdb55f16596752e8a61a8570a90ee26af183a
Analyze and fix the following issue in the Linux kernel code: [SPARC64]: Document and fix calculation of pages_avail.
Problem Details: It should be set to the total number of pages that the system will really have available after things like initmem, the bootmem map, and initrd are freed up. Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/arch/sparc64/mm/init.c b/arch/sparc64/mm/init.c index 40276189c107..cafadcbcdf38 100644 --- a/arch/sparc64/mm/init.c +++ b/arch/sparc64/mm/init.c @@ -938,6 +938,20 @@ static void __init trim_pavail(unsigned long *cur_size_p, } } +/* About pages_avail, this is the value we will use to calculate...
9753f0d6502acd65761ff15244d26d0e88f0820a
Analyze and fix the following issue in the Linux kernel code: [SPARC64]: Kill sparc_ultra_dump_{i,d}tlb()
Problem Details: While useful in odd circumstances to debug something, they are normally totally unused and anyone can fetch this code out of the history if they really need it. And in any event, the person who needs this kind of code is usually me :-) Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/arch/sparc64/mm/init.c b/arch/sparc64/mm/init.c index 83a76a2eb71e..668b7bba90e8 100644 --- a/arch/sparc64/mm/init.c +++ b/arch/sparc64/mm/init.c @@ -761,93 +761,6 @@ out: smp_new_mmu_context_version(); } -void sparc_ultra_dump_itlb(void) -{ - int slot; - - if (tlb_type == spitfire) { ...
4be5c34dc47b5a9e6f91c8f5937a93c464870b8e
Analyze and fix the following issue in the Linux kernel code: [SPARC64]: Privatize sun4u_get_pte() and fix name.
Problem Details: __get_phys is only called from init.c as is prom_virt_to_phys(), __get_iospace() is not called at all, and sun4u_get_pte() is largely misnamed. Privatize the implementation and helper functions of sun4u_get_phys() to mm/init.c, and rename to kvaddr_to_paddr(). The only used of this thing is flush_ica...
```diff diff --git a/arch/sparc64/mm/init.c b/arch/sparc64/mm/init.c index 56be943a6f0e..3cacea5da6ce 100644 --- a/arch/sparc64/mm/init.c +++ b/arch/sparc64/mm/init.c @@ -392,6 +392,67 @@ out: put_cpu(); } +struct linux_prom_translation { + unsigned long virt; + unsigned long size; + unsigned long data; +}; + +/* ...
01f94c4a6ced476ce69b895426fc29bfc48c69bd
Analyze and fix the following issue in the Linux kernel code: [SPARC64]: Fix sabre pci controllers with new probing scheme.
Problem Details: The SIMBA APB bridge is strange, it is a PCI bridge but it lacks some standard OF properties, in particular it lacks a 'ranges' property. What you have to do is read the IO and MEM range registers in the APB bridge to determine the ranges handled by each bridge. So fill in the bus resources by doing t...
```diff diff --git a/arch/sparc64/kernel/of_device.c b/arch/sparc64/kernel/of_device.c index 6b8798141f2c..8964eacb0048 100644 --- a/arch/sparc64/kernel/of_device.c +++ b/arch/sparc64/kernel/of_device.c @@ -317,6 +317,11 @@ static unsigned int of_bus_default_get_flags(const u32 *addr) static int of_bus_pci_match(struc...
a378fd0ee8ea6af5dafd0ab3d634f22b926b5ac4
Analyze and fix the following issue in the Linux kernel code: [SPARC64]: Fix obppath pci device sysfs creation.
Problem Details: Need to traverse recursively down child busses else we only get the file created under devices at the top-level. Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/arch/sparc64/kernel/pci.c b/arch/sparc64/kernel/pci.c index ec0d12a48c2b..425e883e7e3b 100644 --- a/arch/sparc64/kernel/pci.c +++ b/arch/sparc64/kernel/pci.c @@ -585,6 +585,7 @@ static DEVICE_ATTR(obppath, S_IRUSR | S_IRGRP | S_IROTH, show_pciobppath_attr, N static void __devinit pci_bus_register_...
d62c6f093a1ef8fa5f8951e8da93c8ddd3ce193a
Analyze and fix the following issue in the Linux kernel code: [SPARC64]: Fix sparc64_next_event() error return.
Problem Details: It should return an error code not a boolean. Based upon an hpet timer fix by Thomas Gleixner. Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/arch/sparc64/kernel/time.c b/arch/sparc64/kernel/time.c index 21e3b0b9d9ce..0eb846534ff4 100644 --- a/arch/sparc64/kernel/time.c +++ b/arch/sparc64/kernel/time.c @@ -910,7 +910,7 @@ static struct notifier_block sparc64_cpufreq_notifier_block = { static int sparc64_next_event(unsigned long delta, ...
74da9d88bf5ffd31aed61a0b19519684ad744ded
Analyze and fix the following issue in the Linux kernel code: [BLUETOOTH] rfcomm_worker(): fix wakeup race
Problem Details: Set TASK_INTERRUPTIBLE prior to testing the flag to avoid missed wakeups. Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Acked-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/bluetooth/rfcomm/core.c b/net/bluetooth/rfcomm/core.c index 10cc13cfae6c..fe7df90eb707 100644 --- a/net/bluetooth/rfcomm/core.c +++ b/net/bluetooth/rfcomm/core.c @@ -1851,18 +1851,18 @@ static void rfcomm_worker(void) BT_DBG(""); while (!atomic_read(&terminate)) { + set_current_state(TAS...
9198d2220d29b87ac3a05a3b791c50bb8a014d63
Analyze and fix the following issue in the Linux kernel code: [NET]: bonding documentation fix for multiple bonding interfaces
Problem Details: Fix bonding driver documentation for the case of multiple bonding interfaces. Signed-off-by: "Alexandra N. Kossovsky" <Alexandra.Kossovsky@oktetlabs.ru> Acked-by: Jay Vosburgh <fubar@us.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.ne...
```diff diff --git a/Documentation/networking/bonding.txt b/Documentation/networking/bonding.txt index de809e58092f..1da566630831 100644 --- a/Documentation/networking/bonding.txt +++ b/Documentation/networking/bonding.txt @@ -920,40 +920,9 @@ options, you may wish to use the "max_bonds" module parameter, documented a...
1c8ea5aee0b16409295d96a5e8984bd902f06a77
Analyze and fix the following issue in the Linux kernel code: [IRDA] irda_device_dongle_init: fix kzalloc(GFP_KERNEL) in spinlock
Problem Details: Fix http://bugzilla.kernel.org/show_bug.cgi?id=8343 Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Samuel Ortiz <samuel@sortiz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/irda/irda_device.c b/net/irda/irda_device.c index e717801b38f9..7b5def1ea633 100644 --- a/net/irda/irda_device.c +++ b/net/irda/irda_device.c @@ -375,7 +375,7 @@ EXPORT_SYMBOL(alloc_irdadev); dongle_t *irda_device_dongle_init(struct net_device *dev, int type) { struct dongle_reg *reg; - don...
f8a6d97043f9adc25889876b681998b77f543bfa
Analyze and fix the following issue in the Linux kernel code: [AF_IUCV]: Fix compilation on s390-up
Problem Details: CC [M] net/iucv/iucv.o net/iucv/iucv.c: In function 'iucv_init': net/iucv/iucv.c:1556: error: 'iucv_cpu_notifier' undeclared (first use in this function) Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David S. Miller <davem...
```diff diff --git a/net/iucv/iucv.c b/net/iucv/iucv.c index 1b10d576f222..60f293842a39 100644 --- a/net/iucv/iucv.c +++ b/net/iucv/iucv.c @@ -519,7 +519,6 @@ static void iucv_disable(void) kfree(iucv_path_table); } -#ifdef CONFIG_HOTPLUG_CPU static int __cpuinit iucv_cpu_notify(struct notifier_block *self, ...
55404bca6c45595fee1a546f1a0cc616aeef0b00
Analyze and fix the following issue in the Linux kernel code: [NET]: Fix yam.c
Problem Details: drivers/net/hamradio/yam.c: In function `yam_tx_byte': drivers/net/hamradio/yam.c:643: warning: passing arg 1 of `skb_copy_from_linear_data_offset' from incompatible pointer type Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/hamradio/yam.c b/drivers/net/hamradio/yam.c index ac2d6dd9dbe4..467559debfd6 100644 --- a/drivers/net/hamradio/yam.c +++ b/drivers/net/hamradio/yam.c @@ -638,7 +638,7 @@ static void yam_tx_byte(struct net_device *dev, struct yam_port *yp) dev_kfree_skb_any(skb); break; ...
06d63cc51d47f572009138a7f3ac34d95773405d
Analyze and fix the following issue in the Linux kernel code: [MTD] [MAPS] fix plat-ram printk format
Problem Details: drivers/mtd/maps/plat-ram.c:172: warning: format '%lx' expects type 'long unsigned int', but argument 4 has type 'resource_size_t' Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
```diff diff --git a/drivers/mtd/maps/plat-ram.c b/drivers/mtd/maps/plat-ram.c index 2b6504ecbbd1..894c0b271289 100644 --- a/drivers/mtd/maps/plat-ram.c +++ b/drivers/mtd/maps/plat-ram.c @@ -169,7 +169,8 @@ static int platram_probe(struct platform_device *pdev) goto exit_free; } - dev_dbg(&pdev->dev, "got platfo...
f6449f4ece2bf283500bda73edcbea82f2cb3a1b
Analyze and fix the following issue in the Linux kernel code: [JFFS2] Fix compr_rubin.c build after include file elimination.
Problem Details: It seems to be silly season lately. (Oops, test builds are more useful if the file in question is actually configured on. dwmw2). Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
```diff diff --git a/fs/jffs2/compr_rubin.c b/fs/jffs2/compr_rubin.c index 1f3a4410523b..ea0431e047d5 100644 --- a/fs/jffs2/compr_rubin.c +++ b/fs/jffs2/compr_rubin.c @@ -21,16 +21,6 @@ #define LOWER_BITS_RUBIN ((((long) 1)<<(RUBIN_REG_SIZE-1))-1) -struct rubin_state { - unsigned long p; - unsigned long q; - uns...
f50393fe869ba457cd75569c74c0f9bd2e7f7a0f
Analyze and fix the following issue in the Linux kernel code: e1000: FIX: Stop raw interrupts disabled nag from RT
Problem Details: Current e1000_xmit_frame spews raw interrupt disabled nag messages when used with RT kernel patches. This patch uses spin_trylock_irqsave, which allows RT patches to properly manage the irq semantics. Signed-off-by: Mark Huth <mhuth@mvista.com> Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signe...
```diff diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c index dd66f8816b2f..eb3ff1ff746e 100644 --- a/drivers/net/e1000/e1000_main.c +++ b/drivers/net/e1000/e1000_main.c @@ -3378,12 +3378,9 @@ e1000_xmit_frame(struct sk_buff *skb, struct net_device *netdev) (adapter->hw.mac_type == e1...
31d76442f719af834718cbf5bf866370acc36093
Analyze and fix the following issue in the Linux kernel code: e1000: FIX: firmware handover bits
Problem Details: Upon code inspection it was spotted that the firmware handover bit get/set mismatched, which may have resulted in management issues on PCI-E adapters. Setting them correctly may fix some management issues such as arp routing etc. Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: Bruce ...
```diff diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c index f777d37d8e66..dd66f8816b2f 100644 --- a/drivers/net/e1000/e1000_main.c +++ b/drivers/net/e1000/e1000_main.c @@ -409,25 +409,21 @@ e1000_release_hw_control(struct e1000_adapter *adapter) { uint32_t ctrl_ext; uint32_t swsm; - ...
e0aac5a289b1dacbc94bd9ae8c449bcdf9ab508c
Analyze and fix the following issue in the Linux kernel code: e1000: FIX: be ready for incoming irq at pci_request_irq
Problem Details: DEBUG_SHIRQ code exposed that e1000 was not ready for incoming interrupts after having called pci_request_irq. This obviously requires us to finish our software setup which assigns the irq handler before we request the irq. Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: Jeff Garzik ...
```diff diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c index b28a915bd980..f777d37d8e66 100644 --- a/drivers/net/e1000/e1000_main.c +++ b/drivers/net/e1000/e1000_main.c @@ -522,14 +522,15 @@ e1000_release_manageability(struct e1000_adapter *adapter) } } -int -e1000_up(struct e1000_ada...
30041e4af426bc9ab7a73440ce4a7c78881b6001
Analyze and fix the following issue in the Linux kernel code: [IPV6]: Fix Makefile thinko.
Problem Details: obj-$(CONFIG_PROC_FS) --> ipv6-$(CONFIG_PROC_FS) Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/ipv6/Makefile b/net/ipv6/Makefile index 0acf64dc5775..bb33309044c9 100644 --- a/net/ipv6/Makefile +++ b/net/ipv6/Makefile @@ -15,6 +15,7 @@ ipv6-$(CONFIG_XFRM) += xfrm6_policy.o xfrm6_state.o xfrm6_input.o \ ipv6-$(CONFIG_NETFILTER) += netfilter.o ipv6-$(CONFIG_IPV6_MULTIPLE_TABLES) += fib6_r...
bb7ec6dfb5aa32b5b4d7d6388b4098b33cd01e8c
Analyze and fix the following issue in the Linux kernel code: [IPV4]: Fix build without procfs.
Problem Details: Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/ipv4/Makefile b/net/ipv4/Makefile index 4ff6c151d7f3..3bd25f56f5da 100644 --- a/net/ipv4/Makefile +++ b/net/ipv4/Makefile @@ -10,11 +10,11 @@ obj-y := route.o inetpeer.o protocol.o \ tcp_minisocks.o tcp_cong.o \ datagram.o raw.o udp.o udplite.o \ arp.o icmp.o devinet.o ...
84299b3bc4eaedc0734fcc9052b01291e44445fc
Analyze and fix the following issue in the Linux kernel code: [TCP]: Fix linkage errors on i386.
Problem Details: To avoid raw division, use ktime_to_timeval() to get usec. Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/include/linux/ktime.h b/include/linux/ktime.h index 248305bb9a18..81bb9c7a4eb3 100644 --- a/include/linux/ktime.h +++ b/include/linux/ktime.h @@ -259,6 +259,12 @@ static inline s64 ktime_to_ns(const ktime_t kt) #endif +static inline s64 ktime_to_us(const ktime_t kt) +{ + struct timeval tv = kt...
65d1b4a7e73fe0e1f5275ad7d2d3547981480886
Analyze and fix the following issue in the Linux kernel code: [TCP]: TCP Illinois update.
Problem Details: This version more closely matches the paper, and fixes several math errors. The biggest difference is that it updates alpha/beta once per RTT Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/ipv4/tcp_illinois.c b/net/ipv4/tcp_illinois.c index 91a2a34604cd..ae6298600886 100644 --- a/net/ipv4/tcp_illinois.c +++ b/net/ipv4/tcp_illinois.c @@ -23,74 +23,106 @@ #define ALPHA_MIN ((3*ALPHA_SCALE)/10) /* ~0.3 */ #define ALPHA_MAX (10*ALPHA_SCALE) /* 10.0 */ #define ALPHA_BASE ALPHA_SCAL...
952a10be3272c4b5b7839b09cb0483dc72137101
Analyze and fix the following issue in the Linux kernel code: [IPV6] SNMP: Fix several warnings without procfs.
Problem Details: Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
```diff diff --git a/net/ipv6/route.c b/net/ipv6/route.c index 6264ec3bb154..b46ad53044ba 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c @@ -2489,8 +2489,9 @@ ctl_table ipv6_route_table[] = { void __init ip6_route_init(void) { +#ifdef CONFIG_PROC_FS struct proc_dir_entry *p; - +#endif ip6_dst_ops.kmem_ca...
38b4da383705394788aa09208917ba200792de4b
Analyze and fix the following issue in the Linux kernel code: [NET]: Fix comments for register_netdev().
Problem Details: Correct the function name in the comments supplied with register_netdev() Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/core/dev.c b/net/core/dev.c index 431998d9cee9..f3b99701da5b 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -3130,7 +3130,7 @@ out: * chain. 0 is returned on success. A negative errno code is returned * on a failure to set up the device, or if the name is a duplicate. * - * This is a...
599b1fa91439cff8605a71f1a2b5bb42c177b667
Analyze and fix the following issue in the Linux kernel code: [IrDA]: Adding carriage returns to mcs7780 debug statements
Problem Details: Signed-off-by: Samuel Ortiz <samuel@sortiz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/irda/mcs7780.c b/drivers/net/irda/mcs7780.c index 54d1d543c92c..0de867288a47 100644 --- a/drivers/net/irda/mcs7780.c +++ b/drivers/net/irda/mcs7780.c @@ -200,14 +200,14 @@ static inline int mcs_setup_transceiver_vishay(struct mcs_cb *mcs) /* Setup a communication between mcs7780 and ag...
6e66aa15d8873ae7418d5afc6476daec466ff93b
Analyze and fix the following issue in the Linux kernel code: [IrDA] af_irda: Silence kernel message in irda_recvmsg_stream
Problem Details: This patch silences an IRDA_ASSERT in irda_recvmsg_stream, as described in http://bugzilla.kernel.org/show_bug.cgi?id=7512 irda_disconnect_indication would set sk->sk_err to ECONNRESET, and a subsequent call to recvmsg would print an irritating kernel message and return -1. When a connected socket is ...
```diff diff --git a/net/irda/af_irda.c b/net/irda/af_irda.c index a0dbe07a1b19..e9aa1626ea89 100644 --- a/net/irda/af_irda.c +++ b/net/irda/af_irda.c @@ -131,14 +131,12 @@ static void irda_disconnect_indication(void *instance, void *sap, } /* Prevent race conditions with irda_release() and irda_shutdown() */ + b...
42dc9cd54b7290f862874a2544e50395e5719985
Analyze and fix the following issue in the Linux kernel code: [PPPOE]: Fix device tear-down notification.
Problem Details: pppoe_flush_dev() kicks all sockets bound to a device that is going down. In doing so, locks must be taken in the right order consistently (sock lock, followed by the pppoe_hash_lock). However, the scan process is based on us holding the sock lock. So, when something is found in the scan we must rele...
```diff diff --git a/drivers/net/pppoe.c b/drivers/net/pppoe.c index bc4fc30bc85e..6f98834e6ace 100644 --- a/drivers/net/pppoe.c +++ b/drivers/net/pppoe.c @@ -241,54 +241,53 @@ static inline struct pppox_sock *delete_item(unsigned long sid, char *addr, int static void pppoe_flush_dev(struct net_device *dev) { int h...
202a03acf9994076055df40ae093a5c5474ad0bd
Analyze and fix the following issue in the Linux kernel code: [PPPOE]: memory leak when socket is release()d before PPPIOCGCHAN has been called on it
Problem Details: below you find a patch that fixes a memory leak when a PPPoE socket is release()d after it has been connect()ed, but before the PPPIOCGCHAN ioctl ever has been called on it. This is somewhat of a security problem, too, since PPPoE sockets can be created by any user, so any user can easily allocate all...
```diff diff --git a/drivers/net/pppox.c b/drivers/net/pppox.c index 9315046b3f55..3f8115db4d54 100644 --- a/drivers/net/pppox.c +++ b/drivers/net/pppox.c @@ -58,7 +58,7 @@ void pppox_unbind_sock(struct sock *sk) { /* Clear connection to ppp device, if attached. */ - if (sk->sk_state & (PPPOX_BOUND | PPPOX_ZOMBIE)...
74b885cf86def9bc836772e3c1788c00b72a35c9
Analyze and fix the following issue in the Linux kernel code: [PPPOE]: race between interface going down and connect()
Problem Details: below you find a patch that (hopefully) fixes a race between an interface going down and a connect() to a peer on that interface. Before, connect() would determine that an interface is up, then the interface could go down and all entries referring to that interface in the item_hash_table would be marke...
```diff diff --git a/drivers/net/pppoe.c b/drivers/net/pppoe.c index f761a9aae4c8..bc4fc30bc85e 100644 --- a/drivers/net/pppoe.c +++ b/drivers/net/pppoe.c @@ -218,17 +218,6 @@ static inline struct pppox_sock *get_item_by_addr(struct sockaddr_pppox *sp) return get_item(sp->sa_addr.pppoe.sid, sp->sa_addr.pppoe.remote, ...
3e6cf558b0098a15d8c360c4eaad3e4d719a555a
Analyze and fix the following issue in the Linux kernel code: [BRIDGE]: Fix warning in net-2.6.22
Problem Details: The following is leftover from earlier change in net-2.6.22. Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/bridge/br_device.c b/net/bridge/br_device.c index 39b87dad35b7..5e1892d8d874 100644 --- a/net/bridge/br_device.c +++ b/net/bridge/br_device.c @@ -88,7 +88,6 @@ static int br_set_mac_address(struct net_device *dev, void *p) { struct net_bridge *br = netdev_priv(dev); struct sockaddr *addr =...
334901700f9f58993ebd7f6136d3f9062460d34d
Analyze and fix the following issue in the Linux kernel code: [IPV4] SNMP: Move some statistic bits to net/ipv4/proc.c.
Problem Details: This also fixes memory leak in error path. Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/include/net/ip.h b/include/net/ip.h index 75f226d26e0d..f41ce07f6700 100644 --- a/include/net/ip.h +++ b/include/net/ip.h @@ -166,6 +166,9 @@ DECLARE_SNMP_STAT(struct linux_mib, net_statistics); #define NET_ADD_STATS_BH(field, adnd) SNMP_ADD_STATS_BH(net_statistics, field, adnd) #define NET_ADD_S...
f73f7097c986aab159491dcded7fc918e76e9ec3
Analyze and fix the following issue in the Linux kernel code: [DCCP]: Debug statements for Elapsed Time option
Problem Details: This prints the value of the parsed Elapsed Time when received via a Timestamp Echo option [RFC 4342, 13.3]. Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk> Acked-by: Ian McDonald <ian.mcdonald@jandi.co.nz> Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net> Signed-off-by: David S. ...
```diff diff --git a/net/dccp/options.c b/net/dccp/options.c index 14b621227323..34d536d5f1a1 100644 --- a/net/dccp/options.c +++ b/net/dccp/options.c @@ -172,21 +172,25 @@ int dccp_parse_options(struct sock *sk, struct sk_buff *skb) opt_recv->dccpor_timestamp_echo = ntohl(*(__be32 *)value); dccp_pr_debug("%s...
b2449fdc30ccac550344df5e60d38bb8427b109c
Analyze and fix the following issue in the Linux kernel code: [DCCP]: Fix bug in the calculation of very low sending rates
Problem Details: This fixes an error in the calculation of t_ipi when X converges towards very low sending rates (between 1 and 64 bytes per second). Although this case may not sound likely, it can be reproduced by connecting, hitting enter (1 byte sent) and waiting for some time, during which the nofeedback timer hal...
```diff diff --git a/net/dccp/ccids/ccid3.c b/net/dccp/ccids/ccid3.c index c3abd7695d55..d7d9ce737244 100644 --- a/net/dccp/ccids/ccid3.c +++ b/net/dccp/ccids/ccid3.c @@ -102,8 +102,8 @@ static inline u64 rfc3390_initial_rate(struct sock *sk) static inline void ccid3_update_send_interval(struct ccid3_hc_tx_sock *hctx)...
cb8c181f288a1157bc717cc7a02412d4d1dc19bc
Analyze and fix the following issue in the Linux kernel code: [S390]: Fix build on 31-bit.
Problem Details: Allow s390 to properly override the generic __div64_32() implementation by: 1) Using obj-y for div64.o in s390's makefile instead of lib-y 2) Adding the weak attribute to the generic implementation. Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/arch/s390/lib/Makefile b/arch/s390/lib/Makefile index 7a44fed21b35..59aea65ce99f 100644 --- a/arch/s390/lib/Makefile +++ b/arch/s390/lib/Makefile @@ -5,6 +5,6 @@ EXTRA_AFLAGS := -traditional lib-y += delay.o string.o uaccess_std.o uaccess_pt.o qrnnd.o -lib-$(CONFIG_32BIT) += div64.o +obj-$(CONF...
efd1e8d569b3d35a3a636683c2a9ebffec9c1fcf
Analyze and fix the following issue in the Linux kernel code: [SK_BUFF]: Fix missing offset adjustment in skb_copy_expand
Problem Details: skb_copy_expand changes the headroom, so it needs to adjust the header offsets by the difference between the old and the new value. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/core/skbuff.c b/net/core/skbuff.c index 52a4fdd4f31c..c7a1b24b7374 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c @@ -736,7 +736,9 @@ struct sk_buff *skb_copy_expand(const struct sk_buff *skb, */ struct sk_buff *n = alloc_skb(newheadroom + skb->len + newtailroom, gfp_mas...
ac758e3c55c529714354fc268892ca4d23ca1e99
Analyze and fix the following issue in the Linux kernel code: [XFRM]: beet: fix worst case header_len calculation
Problem Details: esp_init_state doesn't account for the beet pseudo header in the header_len calculation, which may result in undersized skbs hitting xfrm4_beet_output, causing unnecessary reallocations in ip_finish_output2. The skbs should still always have enough room to avoid causing skb_under_panic in skb_push sin...
```diff diff --git a/net/ipv4/esp4.c b/net/ipv4/esp4.c index a315d5d22764..47c95e8ef045 100644 --- a/net/ipv4/esp4.c +++ b/net/ipv4/esp4.c @@ -294,7 +294,6 @@ static u32 esp4_get_mtu(struct xfrm_state *x, int mtu) break; case XFRM_MODE_BEET: /* The worst case. */ - mtu -= IPV4_BEET_PHMAXLEN; mtu += min_t(u3...
c5c2523893747f88a83376abad310c8ad13f7197
Analyze and fix the following issue in the Linux kernel code: [XFRM]: Optimize MTU calculation
Problem Details: Replace the probing based MTU estimation, which usually takes 2-3 iterations to find a fitting value and may underestimate the MTU, by an exact calculation. Also fix underestimation of the XFRM trailer_len, which causes unnecessary reallocations. Signed-off-by: Patrick McHardy <kaber@trash.net> Signe...
```diff diff --git a/include/net/xfrm.h b/include/net/xfrm.h index 5a00aa85b756..e144a25814bd 100644 --- a/include/net/xfrm.h +++ b/include/net/xfrm.h @@ -279,7 +279,7 @@ struct xfrm_type xfrm_address_t *(*local_addr)(struct xfrm_state *, xfrm_address_t *); xfrm_address_t *(*remote_addr)(struct xfrm_state *, xfrm...
557922584d9c5b6b990bcfb2fec3134f0e73a05d
Analyze and fix the following issue in the Linux kernel code: [XFRM]: esp: fix skb_tail_pointer conversion bug
Problem Details: Fix incorrect switch of "trailer" skb by "skb" during skb_tail_pointer conversion: - *(u8*)(trailer->tail - 1) = top_iph->protocol; + *(skb_tail_pointer(skb) - 1) = top_iph->protocol; - *(u8 *)(trailer->tail - 1) = *skb_network_header(skb); + *(skb_tail_pointer(skb) - 1) = *sk...
```diff diff --git a/net/ipv4/esp4.c b/net/ipv4/esp4.c index 5e5613930ffb..bdc65d8af181 100644 --- a/net/ipv4/esp4.c +++ b/net/ipv4/esp4.c @@ -64,7 +64,7 @@ static int esp_output(struct xfrm_state *x, struct sk_buff *skb) esph = (struct ip_esp_hdr *)(skb_network_header(skb) + top_iph->ihl * 4); top_iph->t...
56eb88828b78f6f3b11a2996350092a40745301f
Analyze and fix the following issue in the Linux kernel code: [SK_BUFF]: Fix missing offset adjustment in pskb_expand_head
Problem Details: Since we're increasing the headroom, the header offsets need to be increased by the same amount as well. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/core/skbuff.c b/net/core/skbuff.c index f927b6e8027e..4965df29768b 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c @@ -667,14 +667,15 @@ int pskb_expand_head(struct sk_buff *skb, int nhead, int ntail, skb->data += off; #ifdef NET_SKBUFF_DATA_USES_OFFSET skb->end = size; + of...
3dbad80ac7632f243b824d469301abb97ec634a1
Analyze and fix the following issue in the Linux kernel code: [NET]: Fix warnings in 3c523.c and ni52.c
Problem Details: We have to put back the cast to "char *" because these pointers are volatile. Reported by Andrew Morton. Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/3c523.c b/drivers/net/3c523.c index a384f7d478ab..da1a22c13865 100644 --- a/drivers/net/3c523.c +++ b/drivers/net/3c523.c @@ -1145,7 +1145,7 @@ static int elmc_send_packet(struct sk_buff *skb, struct net_device *dev) if (len != skb->len) memset((char *) p->xmit_cbuffs[p->xmit_cou...