id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
4f8ad655dbc82cf05d2edc11e66b78a42d38bf93
Analyze and fix the following issue in the Linux kernel code: writeback: Refactor writeback_single_inode()
Problem Details: The code in writeback_single_inode() is relatively complex. The list requeing logic makes sense only for flusher thread but not really for sync_inode() or write_inode_now() callers. Also when we want to get rid of inode references held by flusher thread, we will need a special I_SYNC handling there. S...
```diff diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c index 3b87dc80fd30..5f2c68289610 100644 --- a/fs/fs-writeback.c +++ b/fs/fs-writeback.c @@ -364,6 +364,15 @@ static void requeue_inode(struct inode *inode, struct bdi_writeback *wb, (wbc->sync_mode == WB_SYNC_ALL || wbc->tagged_writepages)) inode->dirt...
9a8422d205ea142a27c2573e5ca3d2cc87d75260
Analyze and fix the following issue in the Linux kernel code: max17042_battery: Add support for max17047/50 chip
Problem Details: max17047 is improved version of max17042 chip. It has few HW bug fixes with minor changes in register set. max17050 is same as max17047 chip except its silicon packging. So from driver's point of view there is no difference btw max1047 and max1050. This patch adds the support to dynamically detect th...
```diff diff --git a/drivers/power/Kconfig b/drivers/power/Kconfig index b711795c6664..e3a3b4956f08 100644 --- a/drivers/power/Kconfig +++ b/drivers/power/Kconfig @@ -181,14 +181,15 @@ config BATTERY_MAX17040 to operate with a single lithium cell config BATTERY_MAX17042 - tristate "Maxim MAX17042/8997/8966 Fuel ...
840b91bda91ebaa6230caec0ccf005daf9305fb6
Analyze and fix the following issue in the Linux kernel code: power_supply: Fix a typo in BATTERY_DS2781 Kconfig entry
Problem Details: Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Evgeniy Polyakov <zbr@ioremap.net> Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
```diff diff --git a/drivers/power/Kconfig b/drivers/power/Kconfig index 2259dea525e0..b711795c6664 100644 --- a/drivers/power/Kconfig +++ b/drivers/power/Kconfig @@ -77,7 +77,7 @@ config BATTERY_DS2780 Say Y here to enable support for batteries with ds2780 chip. config BATTERY_DS2781 - tristate "2781 battery dr...
49a5f3cf6a956360bb43e5f8d0c592a8daea8ebd
Analyze and fix the following issue in the Linux kernel code: TTY: pdc_cons, fix regression in close
Problem Details: The test in pdc_console_tty_close '!tty->count' was always wrong because tty->count is decremented after tty->ops->close is called and thus can never be zero. Hence the 'then' branch was never executed and the timer never deleted. This did not matter until commit 5dd5bc40f3b6 ("TTY: pdc_cons, use tty_...
```diff diff --git a/arch/parisc/kernel/pdc_cons.c b/arch/parisc/kernel/pdc_cons.c index 4f004596a6e7..0b3393381a81 100644 --- a/arch/parisc/kernel/pdc_cons.c +++ b/arch/parisc/kernel/pdc_cons.c @@ -104,7 +104,7 @@ static int pdc_console_tty_open(struct tty_struct *tty, struct file *filp) static void pdc_console_tty...
6237dd132d4eb408ffa80830fe395448e5657ab0
Analyze and fix the following issue in the Linux kernel code: PM / Documentation: suspend-and-cpuhotplug.txt: Fix typo
Problem Details: sysfs was expected in this context. Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com> Acked-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
```diff diff --git a/Documentation/power/suspend-and-cpuhotplug.txt b/Documentation/power/suspend-and-cpuhotplug.txt index f28f9a6f0347..e13dafc8e8f1 100644 --- a/Documentation/power/suspend-and-cpuhotplug.txt +++ b/Documentation/power/suspend-and-cpuhotplug.txt @@ -29,7 +29,7 @@ More details follow: ...
040e5bf65e1ee66266bc314c5965518a7c21ff36
Analyze and fix the following issue in the Linux kernel code: PM / Sleep: Fix a mistake in a conditional in autosleep_store()
Problem Details: The condition check in autosleep_store() is incorrect and prevents /sys/power/autosleep from working as advertised. Fix that. [rjw: Added the changelog.] Signed-off-by: Arve Hjønnevåg <arve@android.com> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
```diff diff --git a/kernel/power/main.c b/kernel/power/main.c index 54ec071de337..428f8a034e96 100644 --- a/kernel/power/main.c +++ b/kernel/power/main.c @@ -422,7 +422,7 @@ static ssize_t autosleep_store(struct kobject *kobj, int error; if (state == PM_SUSPEND_ON - && !(strncmp(buf, "off", 3) && strncmp(buf...
95698570510b7be9ab1542a4a908242c05a9b0ed
Analyze and fix the following issue in the Linux kernel code: kbuild: refactor final link of sparc32
Problem Details: sparc32 uses an additional final link to support btfix. Introduce a new set of exported variables in the top-level Makefile to make the extra linking step simpler. sparc32 has hardcoded knowledge of kallsyms support. This fix include support for EXTRA_KALLSYM_PASS=1. The ugly part is that it is hardco...
```diff diff --git a/Makefile b/Makefile index 06aff741e91a..7ea0c07779bd 100644 --- a/Makefile +++ b/Makefile @@ -723,6 +723,11 @@ libs-y1 := $(patsubst %/, %/lib.a, $(libs-y)) libs-y2 := $(patsubst %/, %/built-in.o, $(libs-y)) libs-y := $(libs-y1) $(libs-y2) +# externally visible symbols +export KBUILD_VMLINUX...
5fe9fe8c98eeed86650e9e5e9eaa156cf0ce1282
Analyze and fix the following issue in the Linux kernel code: drm/i915: fix gen4 gpu reset
Problem Details: While trying to fix up gen4 gpu reset in commit f49f0586191fe16140410db0a46d43bdc690d6af Author: Kenneth Graunke <kenneth@whitecape.org> Date: Sat Sep 11 01:19:14 2010 -0700 drm/i915: Actually set the reset bit in i965_reset a little confusion about when wait_for times out has been introduced ...
```diff diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c index 133f1014ed90..77b7a50e2014 100644 --- a/drivers/gpu/drm/i915/i915_drv.c +++ b/drivers/gpu/drm/i915/i915_drv.c @@ -707,7 +707,7 @@ static int i965_reset_complete(struct drm_device *dev) { u8 gdrst; pci_read_config_byte(dev-...
d54423037f141518950f324af88a551a82449496
Analyze and fix the following issue in the Linux kernel code: drm/i915: allow the existing error_state to be destroyed
Problem Details: ... by writing (anything) to i915_error_state. This way we can simulate a bunch of gpu hangs and run the error_state capture code every time (without the need to reload the module). To make that happen we need to abandon the simple seq_file wrappers provided by the drm core. While at it put the new e...
```diff diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c index 72c73de35065..950f72a0d729 100644 --- a/drivers/gpu/drm/i915/i915_debugfs.c +++ b/drivers/gpu/drm/i915/i915_debugfs.c @@ -688,21 +688,19 @@ static void i915_ring_error_state(struct seq_file *m, seq_printf(m, " ring->...
e5eb3d63c6182d3f21fbfc836ded748d49d521f9
Analyze and fix the following issue in the Linux kernel code: drm/i915: add interface to simulate gpu hangs
Problem Details: gpu reset is a very important piece of our infrastructure. Unfortunately we only really it test by actually hanging the gpu, which often has bad side-effects for the entire system. And the gpu hang handling code is one of the rather complicated pieces of code we have, consisting of - hang detection - e...
```diff diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c index ae68ac1c488e..192b27e9046c 100644 --- a/drivers/gpu/drm/i915/i915_debugfs.c +++ b/drivers/gpu/drm/i915/i915_debugfs.c @@ -1585,6 +1585,64 @@ static const struct file_operations i915_wedged_fops = { .llseek = default_l...
377485f6244af255b04d662cf19cddbbc4ae4310
Analyze and fix the following issue in the Linux kernel code: init: don't try mounting device as nfs root unless type fully matches
Problem Details: Currently, we'll try mounting any device who's major device number is UNNAMED_MAJOR as NFS root. This would happen for non-NFS devices as well (such as 9p devices) but it wouldn't cause any issues since mounting the device as NFS would fail quickly and the code proceeded to doing the proper mount: ...
```diff diff --git a/init/do_mounts.c b/init/do_mounts.c index 0e93f92a0345..42b0707c3481 100644 --- a/init/do_mounts.c +++ b/init/do_mounts.c @@ -472,7 +472,7 @@ void __init change_floppy(char *fmt, ...) void __init mount_root(void) { #ifdef CONFIG_ROOT_NFS - if (MAJOR(ROOT_DEV) == UNNAMED_MAJOR) { + if (ROOT_DEV =...
6a68b6f574c8ad2c1d90f0db8fd95b8abe8a0a73
Analyze and fix the following issue in the Linux kernel code: ARM: 7411/1: audit: fix treatment of saved ip register during syscall tracing
Problem Details: The ARM audit code incorrectly uses the saved application ip register value to infer syscall entry or exit. Additionally, the saved value will be clobbered if the current task is not being traced, which can lead to libc corruption if ip is live (apparently glibc uses it for the TLS pointer). This patc...
```diff diff --git a/arch/arm/kernel/ptrace.c b/arch/arm/kernel/ptrace.c index 80abafb9bf33..d8dbe9ca66b0 100644 --- a/arch/arm/kernel/ptrace.c +++ b/arch/arm/kernel/ptrace.c @@ -916,14 +916,7 @@ asmlinkage int syscall_trace(int why, struct pt_regs *regs, int scno) { unsigned long ip; - /* - * Save IP. IP is use...
8cd725a1de1df8e5a2d694abc1e6b6aad5ce7d06
Analyze and fix the following issue in the Linux kernel code: MAINTAINERS: Fix 'F' entry for the power supply class
Problem Details: For some reason the maintainers file only specifies power supply core files. We're surely interested in individual drivers as well, so fix the entry. Reported-by: Grazvydas Ignotas <notasas@gmail.com> Reported-by: NeilBrown <neilb@suse.de> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
```diff diff --git a/MAINTAINERS b/MAINTAINERS index bb76fc42fc42..3766f6a273e2 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -5290,7 +5290,7 @@ M: David Woodhouse <dwmw2@infradead.org> T: git git://git.infradead.org/battery-2.6.git S: Maintained F: include/linux/power_supply.h -F: drivers/power/power_supply* +F: dr...
53c50ef508cc7b47c8b912549d4e2593fd0e5049
Analyze and fix the following issue in the Linux kernel code: ARM: mmp: fix build issue on mmp with device tree
Problem Details: Since irq_domain_add_simple() is removed, remove it in mmp-dt.c also. Signed-off-by: Haojian Zhuang <haojian.zhuang@gmail.com> Acked-by: Arnd Bergmann <arnd@arndb.de>
```diff diff --git a/arch/arm/mach-mmp/mmp-dt.c b/arch/arm/mach-mmp/mmp-dt.c index 67075395e400..ca22e3c04e90 100644 --- a/arch/arm/mach-mmp/mmp-dt.c +++ b/arch/arm/mach-mmp/mmp-dt.c @@ -32,31 +32,9 @@ static const struct of_dev_auxdata mmp_auxdata_lookup[] __initconst = { {} }; -static int __init mmp_intc_add_irq...
243e3527ffbda96434429e618324f80ca0d98902
Analyze and fix the following issue in the Linux kernel code: max17042_battery: Fix power supply and irq registration ordering
Problem Details: IRQ registration should happen only after power supply object usable. This patch fixes the ordering of power supply and irq registration calls. Signed-off-by: Ramakrishna Pallala <ramakrishna.pallala@intel.com> Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
```diff diff --git a/drivers/power/max17042_battery.c b/drivers/power/max17042_battery.c index 42c4be9a664b..b4c8af016278 100644 --- a/drivers/power/max17042_battery.c +++ b/drivers/power/max17042_battery.c @@ -690,6 +690,12 @@ static int __devinit max17042_probe(struct i2c_client *client, max17042_write_reg(client,...
1cc0c998fdf2cb665d625fb565a0d6db5c81c639
Analyze and fix the following issue in the Linux kernel code: ACPI: Fix D3hot v D3cold confusion
Problem Details: Before this patch, ACPI_STATE_D3 incorrectly referenced D3hot in some places, but D3cold in other places. After this patch, ACPI_STATE_D3 always means ACPI_STATE_D3_COLD; and all references to D3hot use ACPI_STATE_D3_HOT. ACPI's _PR3 method is used to enter both D3hot and D3cold states. What distingu...
```diff diff --git a/drivers/acpi/power.c b/drivers/acpi/power.c index 7049a7d27c4f..330bb4d75852 100644 --- a/drivers/acpi/power.c +++ b/drivers/acpi/power.c @@ -631,7 +631,7 @@ int acpi_power_get_inferred_state(struct acpi_device *device, int *state) * We know a device's inferred power state when all the resources...
0d4ed4e27a4cb180af395fa3d7aa98d79f3d3015
Analyze and fix the following issue in the Linux kernel code: power_supply: Make the core a boolean instead of a tristate
Problem Details: On Mon, Apr 02, 2012 at 01:53:23PM +1000, Benjamin Herrenschmidt wrote: > > drivers/built-in.o: In function `.nouveau_pm_trigger': > > (.text+0xa56e8): undefined reference to `.power_supply_is_system_supplied' > > > > nouveau probably needs to depends on CONFIG_POWER_SUPPLY to force a module > > build ...
```diff diff --git a/drivers/power/Kconfig b/drivers/power/Kconfig index 99dc29f2f2f2..0c52a4079124 100644 --- a/drivers/power/Kconfig +++ b/drivers/power/Kconfig @@ -1,5 +1,5 @@ menuconfig POWER_SUPPLY - tristate "Power supply class support" + bool "Power supply class support" help Say Y here to enable power su...
bb28da90f4f973529f81be01547ebde7bf270042
Analyze and fix the following issue in the Linux kernel code: max17042_battery: Fix driver exit function
Problem Details: This patch fixes driver's remove function: it should free the IRQ. Signed-off-by: Ramakrishna Pallala <ramakrishna.pallala@intel.com> Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
```diff diff --git a/drivers/power/max17042_battery.c b/drivers/power/max17042_battery.c index 39dd610994ac..93fd13c9be68 100644 --- a/drivers/power/max17042_battery.c +++ b/drivers/power/max17042_battery.c @@ -715,6 +715,8 @@ static int __devexit max17042_remove(struct i2c_client *client) { struct max17042_chip *ch...
1ef3d8fb4deb77ee020b246d217dd4dfb28d88d5
Analyze and fix the following issue in the Linux kernel code: max17042_battery: Fix a couple buffer overflows
Problem Details: There are a couple issues here caused by confusion between sizeof() and ARRAY_SIZE(). "table_size" should be the number of elements, but we should allocate it with kcalloc() so that we allocate the correct number of bytes. In max17042_init_model() we don't allocate enough space so we go past the end ...
```diff diff --git a/drivers/power/max17042_battery.c b/drivers/power/max17042_battery.c index 04620c2cb388..39dd610994ac 100644 --- a/drivers/power/max17042_battery.c +++ b/drivers/power/max17042_battery.c @@ -325,11 +325,10 @@ static inline int max17042_model_data_compare(struct max17042_chip *chip, static int max17...
04db6e5fddca55186b6a74339a62c800150648bc
Analyze and fix the following issue in the Linux kernel code: dynamic_debug: remove unneeded includes
Problem Details: These arent currently needed, so drop them. Some will probably get re-added when static-branches are added, but include loops prevent that at present. Signed-off-by: Jim Cromie <jim.cromie@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c index 7ca29a0a3019..fc5d270751a7 100644 --- a/lib/dynamic_debug.c +++ b/lib/dynamic_debug.c @@ -14,24 +14,14 @@ #include <linux/kernel.h> #include <linux/module.h> -#include <linux/moduleparam.h> -#include <linux/kallsyms.h> -#include <linux/types.h> #...
1ef9eaf2bf8901e92bb931875a5621692c8a0b84
Analyze and fix the following issue in the Linux kernel code: params.c: fix Smack complaint about parse_args
Problem Details: In commit 9fb48c744: "params: add 3rd arg to option handler callback signature", the if-guard added to the pr_debug was overzealous; no callers pass NULL, and existing code above and below the guard assumes as much. Change the if-guard to match, and silence the Smack complaint. CC: Dan Carpenter <dan...
```diff diff --git a/kernel/params.c b/kernel/params.c index b60e2c74b961..be78c904b564 100644 --- a/kernel/params.c +++ b/kernel/params.c @@ -190,7 +190,7 @@ int parse_args(const char *doing, /* Chew leading spaces */ args = skip_spaces(args); - if (args && *args) + if (*args) pr_debug("doing %s, parsing ARGS...
6f24f892871acc47b40dd594c63606a17c714f77
Analyze and fix the following issue in the Linux kernel code: hfsplus: Fix potential buffer overflows
Problem Details: Commit ec81aecb2966 ("hfs: fix a potential buffer overflow") fixed a few potential buffer overflows in the hfs filesystem. But as Timo Warns pointed out, these changes also need to be made on the hfsplus filesystem as well. Reported-by: Timo Warns <warns@pre-sense.de> Acked-by: WANG Cong <amwang@redh...
```diff diff --git a/fs/hfsplus/catalog.c b/fs/hfsplus/catalog.c index 4dfbfec357e8..ec2a9c23f0c9 100644 --- a/fs/hfsplus/catalog.c +++ b/fs/hfsplus/catalog.c @@ -366,6 +366,10 @@ int hfsplus_rename_cat(u32 cnid, err = hfs_brec_find(&src_fd); if (err) goto out; + if (src_fd.entrylength > sizeof(entry) || src_fd....
3aa2ae74ba630ec9b98736d64aea8e4cb490861d
Analyze and fix the following issue in the Linux kernel code: USB: EHCI: OMAP: Finish ehci omap phy reset cycle before adding hcd.
Problem Details: 'ARM: OMAP3: USB: Fix the EHCI ULPI PHY reset issue' (1fcb57d0f) created a regression with Beagleboard xM if booting the kernel after running 'usb start' under u-boot. Finishing the reset before calling 'usb_add_hcd' fixes the regression. This is most likely due to usb_add_hcd calling the driver's res...
```diff diff --git a/drivers/usb/host/ehci-omap.c b/drivers/usb/host/ehci-omap.c index 5c78f9e71466..e669c6a7e91e 100644 --- a/drivers/usb/host/ehci-omap.c +++ b/drivers/usb/host/ehci-omap.c @@ -242,15 +242,6 @@ static int ehci_hcd_omap_probe(struct platform_device *pdev) ehci_reset(omap_ehci); - ret = usb_add_hc...
8b979f7c6bf13a57e7b6002f1175312a44773960
Analyze and fix the following issue in the Linux kernel code: Add missing call to uart_update_timeout()
Problem Details: This patch fixes a problem reported here: http://article.gmane.org/gmane.linux.ports.arm.kernel/155242/match=auart Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/tty/serial/mxs-auart.c b/drivers/tty/serial/mxs-auart.c index 55fd362b9879..039c054349e4 100644 --- a/drivers/tty/serial/mxs-auart.c +++ b/drivers/tty/serial/mxs-auart.c @@ -369,6 +369,8 @@ static void mxs_auart_settermios(struct uart_port *u, writel(ctrl, u->membase + AUART_LINECTRL); ...
94758185689ee96694558d720d44e81b4e0abc3d
Analyze and fix the following issue in the Linux kernel code: driver-core: fix DEVICE_INT_ATTR to use correct show/store functions
Problem Details: DEVICE_INT_ATTR() should use device_show_int() and device_store_int() not device_show_ulong() and device_store_ulong() Signed-off-by: Michael Davidson <md@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/include/linux/device.h b/include/linux/device.h index 5ad17cccdd71..3ab4d63609b6 100644 --- a/include/linux/device.h +++ b/include/linux/device.h @@ -502,7 +502,7 @@ ssize_t device_store_int(struct device *dev, struct device_attribute *attr, { __ATTR(_name, _mode, device_show_ulong, device_store...
4ae68e7345b0d5d49e1c2c7583d15a3c177f8a2f
Analyze and fix the following issue in the Linux kernel code: w1: w1_ds2408.c: quite sparse noise about using plaing integer as NULL pointer
Problem Details: NULL not 0 should be used with pointers. Just remove the offending lines since they will default to NULL anyway. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Acked-by: Evgeniy Polyakov <zbr@ioremap.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/w1/slaves/w1_ds2408.c b/drivers/w1/slaves/w1_ds2408.c index 7c8cdb8aed26..8e813eed0f0a 100644 --- a/drivers/w1/slaves/w1_ds2408.c +++ b/drivers/w1/slaves/w1_ds2408.c @@ -332,7 +332,6 @@ static struct bin_attribute w1_f29_sysfs_bin_files[NB_SYSFS_BIN_FILES] = { }, .size = 1, .read =...
3b923993daaa38f1ae297a79f734c308866dd026
Analyze and fix the following issue in the Linux kernel code: USB: input: appletouch: fix up compiler warning
Problem Details: My last patch fixing up the dev_* messages caused a compiler warning accidentally for an unused variable. Fix this up, as it was my fault. Cc: Alessandro Rubini <rubini@ipvvis.unipv.it> Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
```diff diff --git a/drivers/input/mouse/appletouch.c b/drivers/input/mouse/appletouch.c index 38268e8ea469..e42f1fa8cdc0 100644 --- a/drivers/input/mouse/appletouch.c +++ b/drivers/input/mouse/appletouch.c @@ -402,7 +402,6 @@ static inline void atp_report_fingers(struct input_dev *input, int fingers) static int atp_s...
0a5ebc88c74d8029e80a72e57cbebc0b3b4e5d98
Analyze and fix the following issue in the Linux kernel code: USB: input: usbtouchscreen.c: fix up dev_* messages
Problem Details: Previously I had made the struct device point to the input device, but after talking with Dmitry, he said that the USB device would make more sense for this driver to point to. So converted it to use that instead. CC: Dmitry Torokhov <dmitry.torokhov@gmail.com> CC: Henrik Rydberg <rydberg@euromail.se...
```diff diff --git a/drivers/input/touchscreen/usbtouchscreen.c b/drivers/input/touchscreen/usbtouchscreen.c index 100eded96b0e..e32709e0dd65 100644 --- a/drivers/input/touchscreen/usbtouchscreen.c +++ b/drivers/input/touchscreen/usbtouchscreen.c @@ -269,7 +269,7 @@ static int e2i_init(struct usbtouch_usb *usbtouch) ...
65e78a2062d5e56f906d52c45820d08711d2c2e2
Analyze and fix the following issue in the Linux kernel code: USB: input: wacom_sys.c: fix up dev_* messages
Problem Details: Previously I had made the struct device point to the input device, but after talking with Dmitry, he said that the USB device would make more sense for this driver to point to. So converted it to use that instead. CC: Dmitry Torokhov <dmitry.torokhov@gmail.com> CC: Ping Cheng <pingc@wacom.com> CC: Ch...
```diff diff --git a/drivers/input/tablet/wacom_sys.c b/drivers/input/tablet/wacom_sys.c index ac29a68ac53e..79a0509882d4 100644 --- a/drivers/input/tablet/wacom_sys.c +++ b/drivers/input/tablet/wacom_sys.c @@ -99,7 +99,7 @@ static int wacom_set_report(struct usb_interface *intf, u8 type, u8 id, static void wacom_sys_...
ed2b2f2db2d52098bdda3877367d59984febdd9f
Analyze and fix the following issue in the Linux kernel code: USB: input: kbtab.c: fix up dev_* messages
Problem Details: Previously I had made the struct device point to the input device, but after talking with Dmitry, he said that the USB device would make more sense for this driver to point to. So converted it to use that instead. CC: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Greg Kroah-Hartman <greg...
```diff diff --git a/drivers/input/tablet/kbtab.c b/drivers/input/tablet/kbtab.c index a39d1761a6cb..3fba74b9b602 100644 --- a/drivers/input/tablet/kbtab.c +++ b/drivers/input/tablet/kbtab.c @@ -33,6 +33,7 @@ struct kbtab { dma_addr_t data_dma; struct input_dev *dev; struct usb_device *usbdev; + struct usb_interf...
27c2597d455a24507f1d0be6991a0a84b5c1b035
Analyze and fix the following issue in the Linux kernel code: USB: input: gtco.c: fix up dev_* messages
Problem Details: Previously I had made the struct device point to the input device, but after talking with Dmitry, he said that the USB device would make more sense for this driver to point to. So converted it to use that instead. CC: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Greg Kroah-Hartman <greg...
```diff diff --git a/drivers/input/tablet/gtco.c b/drivers/input/tablet/gtco.c index 422b1a2ef309..29e01ab6859f 100644 --- a/drivers/input/tablet/gtco.c +++ b/drivers/input/tablet/gtco.c @@ -106,6 +106,7 @@ struct gtco { struct input_dev *inputdevice; /* input device struct pointer */ struct usb_device *usbdev;...
871ba51c130d4f2e7d33b8c57e834df701357102
Analyze and fix the following issue in the Linux kernel code: USB: input: aiptek.c: fix up dev_* messages
Problem Details: Previously I had made the struct device point to the input device, but after talking with Dmitry, he said that the USB device would make more sense for this driver to point to. So converted it to use that instead. CC: Dmitry Torokhov <dmitry.torokhov@gmail.com> CC: Jesper Juhl <jj@chaosbits.net> CC: ...
```diff diff --git a/drivers/input/tablet/aiptek.c b/drivers/input/tablet/aiptek.c index 37dba769bf0f..755a39e4c9e9 100644 --- a/drivers/input/tablet/aiptek.c +++ b/drivers/input/tablet/aiptek.c @@ -309,6 +309,7 @@ struct aiptek_settings { struct aiptek { struct input_dev *inputdev; /* input device struct ...
334698d435b4446d796a2059284256b9d28a0d19
Analyze and fix the following issue in the Linux kernel code: USB: input: acecad.c: fix up dev_* messages
Problem Details: Previously I had made the struct device point to the input device, but after talking with Dmitry, he said that the USB device would make more sense for this driver to point to. So converted it to use that instead. CC: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Greg Kroah-Hartman <greg...
```diff diff --git a/drivers/input/tablet/acecad.c b/drivers/input/tablet/acecad.c index baa9d4ad0d00..e062ec899ca1 100644 --- a/drivers/input/tablet/acecad.c +++ b/drivers/input/tablet/acecad.c @@ -51,6 +51,7 @@ struct usb_acecad { char name[128]; char phys[64]; struct usb_device *usbdev; + struct usb_interface ...
ab943ca8942c50b7c35c561103efb4622c5bfb85
Analyze and fix the following issue in the Linux kernel code: USB: input: bcm5974.c: fix up dev_* messages
Problem Details: Previously I had made the struct device point to the input device, but after talking with Dmitry, he said that the USB device would make more sense for this driver to point to. So converted it to use that instead. CC: Henrik Rydberg <rydberg@euromail.se> CC: Alessandro Rubini <rubini@ipvvis.unipv.it>...
```diff diff --git a/drivers/input/mouse/bcm5974.c b/drivers/input/mouse/bcm5974.c index e32928ee7cc2..2cf681d98c0d 100644 --- a/drivers/input/mouse/bcm5974.c +++ b/drivers/input/mouse/bcm5974.c @@ -584,7 +584,7 @@ static int bcm5974_wellspring_mode(struct bcm5974 *dev, bool on) int retval = 0, size; if (!data) {...
2d744b09199d2481c99563fdcf7f1c60f87fd965
Analyze and fix the following issue in the Linux kernel code: USB: input: appletouch.c: fix up dev_* messages
Problem Details: Previously I had made the struct device point to the input device, but after talking with Dmitry, he said that the USB device would make more sense for this driver to point to. So converted it to use that instead. CC: Alessandro Rubini <rubini@ipvvis.unipv.it> CC: Dmitry Torokhov <dmitry.torokhov@gma...
```diff diff --git a/drivers/input/mouse/appletouch.c b/drivers/input/mouse/appletouch.c index d0a590f87c2b..38268e8ea469 100644 --- a/drivers/input/mouse/appletouch.c +++ b/drivers/input/mouse/appletouch.c @@ -195,6 +195,7 @@ enum atp_status_bits { struct atp { char phys[64]; struct usb_device *udev; /* usb de...
73e66ceada0b51279ffd4a6f5bffe79d7168d4e8
Analyze and fix the following issue in the Linux kernel code: USB: input: yealink.c: fix up dev_* messages
Problem Details: Previously I had made the struct device point to the input device, but after talking with Dmitry, he said that the USB device would make more sense for this driver to point to. So converted it to use that instead. CC: Henk Vergonet <Henk.Vergonet@gmail.com> CC: Dmitry Torokhov <dmitry.torokhov@gmail....
```diff diff --git a/drivers/input/misc/yealink.c b/drivers/input/misc/yealink.c index 37b126c06fc1..285a5bd6cbc9 100644 --- a/drivers/input/misc/yealink.c +++ b/drivers/input/misc/yealink.c @@ -101,6 +101,7 @@ static const struct lcd_segment_map { struct yealink_dev { struct input_dev *idev; /* input device */ s...
c25e647836cd53f2da7ceff6fabf2603b4362212
Analyze and fix the following issue in the Linux kernel code: USB: input: powermate.c: fix up dev_* messages
Problem Details: Previously I had made the struct device point to the input device, but after talking with Dmitry, he said that the USB device would make more sense for this driver to point to. So converted it to use that instead. CC: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Greg Kroah-Hartman <greg...
```diff diff --git a/drivers/input/misc/powermate.c b/drivers/input/misc/powermate.c index d16717e8e9c4..49c0c3ebd321 100644 --- a/drivers/input/misc/powermate.c +++ b/drivers/input/misc/powermate.c @@ -65,6 +65,7 @@ struct powermate_device { struct urb *irq, *config; struct usb_ctrlrequest *configcr; struct usb_...
419b1a11fbe7889f8c3e62b0ef33e8b393279563
Analyze and fix the following issue in the Linux kernel code: USB: input: keyspan_remote.c: fix up dev_* messages
Problem Details: Previously I had made the struct device point to the input device, but after talking with Dmitry, he said that the USB device would make more sense for this driver to point to. So converted it to use that instead. CC: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Greg Kroah-Hartman <greg...
```diff diff --git a/drivers/input/misc/keyspan_remote.c b/drivers/input/misc/keyspan_remote.c index 7f017d497d83..290fa5f97ded 100644 --- a/drivers/input/misc/keyspan_remote.c +++ b/drivers/input/misc/keyspan_remote.c @@ -157,7 +157,7 @@ static int keyspan_load_tester(struct usb_keyspan* dev, int bits_needed) * tho...
ab242a73a109c227d6ed0fcccab5dd2d9e220b07
Analyze and fix the following issue in the Linux kernel code: USB: input: cm109.c: fix up dev_* messages
Problem Details: Previously I had made the struct device point to the input device, but after talking with Dmitry, he said that the USB device would make more sense for this driver to point to. So converted it to use that instead. CC: Dmitry Torokhov <dmitry.torokhov@gmail.com> CC: Axel Lin <axel.lin@gmail.com> Signe...
```diff diff --git a/drivers/input/misc/cm109.c b/drivers/input/misc/cm109.c index 9e76ab18e944..082684e7f390 100644 --- a/drivers/input/misc/cm109.c +++ b/drivers/input/misc/cm109.c @@ -327,7 +327,7 @@ static void cm109_submit_buzz_toggle(struct cm109_dev *dev) error = usb_submit_urb(dev->urb_ctl, GFP_ATOMIC); i...
8818e4190f0e04ad20a30e7488dcdd3029b4b96d
Analyze and fix the following issue in the Linux kernel code: USB: input: xpad.c: fix up dev_* messages
Problem Details: Previously I had made the struct device point to the input device, but after talking with Dmitry, he said that the USB device would make more sense for this driver to point to. So converted it to use that instead. CC: Dmitry Torokhov <dmitry.torokhov@gmail.com> CC: "Magnus Hörlin" <magnus@alefors.se>...
```diff diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c index 2e106b0796ce..ee16fb67b7ae 100644 --- a/drivers/input/joystick/xpad.c +++ b/drivers/input/joystick/xpad.c @@ -252,6 +252,7 @@ MODULE_DEVICE_TABLE (usb, xpad_table); struct usb_xpad { struct input_dev *dev; /* input device inter...
a852d78e4e24f2200fa1764ca3366b4fa4fd072a
Analyze and fix the following issue in the Linux kernel code: USB: input: iforce: fix up dev_* messages
Problem Details: Previously I had made the struct device point to the input device, but after talking with Dmitry, he said that the USB device would make more sense for this driver to point to. So converted it to use that instead. Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Greg Kroah-Hartman <greg...
```diff diff --git a/drivers/input/joystick/iforce/iforce-packets.c b/drivers/input/joystick/iforce/iforce-packets.c index 0d8f53b5ce53..08f98f2eaf88 100644 --- a/drivers/input/joystick/iforce/iforce-packets.c +++ b/drivers/input/joystick/iforce/iforce-packets.c @@ -257,7 +257,7 @@ int iforce_get_id_packet(struct iforc...
2f624278626677bfaf73fef97f86b37981621f5c
Analyze and fix the following issue in the Linux kernel code: Fix __read_seqcount_begin() to use ACCESS_ONCE for sequence value read
Problem Details: We really need to use a ACCESS_ONCE() on the sequence value read in __read_seqcount_begin(), because otherwise the compiler might end up reloading the value in between the test and the return of it. As a result, it might end up returning an odd value (which means that a write is in progress). If the ...
```diff diff --git a/include/linux/seqlock.h b/include/linux/seqlock.h index c6db9fb33c44..bb1fac5b8ee8 100644 --- a/include/linux/seqlock.h +++ b/include/linux/seqlock.h @@ -141,7 +141,7 @@ static inline unsigned __read_seqcount_begin(const seqcount_t *s) unsigned ret; repeat: - ret = s->sequence; + ret = ACCESS_...
08ca7444f589bedf9ad5d82883e5d0754852d73b
Analyze and fix the following issue in the Linux kernel code: ARM: OMAP: Revert "ARM: OMAP: ctrl: Fix CONTROL_DSIPHY register fields"
Problem Details: This reverts commit 46f8c3c7e95c0d30d95911e7975ddc4f93b3e237. The commit above swapped the DSI1_PPID and DSI2_PPID register fields in CONTROL_DSIPHY to be in sync with the newer public OMAP TRMs(after version V). With this commit, contention errors were reported on DSI lanes some OMAP4 SDPs. After pr...
```diff diff --git a/arch/arm/mach-omap2/include/mach/ctrl_module_pad_core_44xx.h b/arch/arm/mach-omap2/include/mach/ctrl_module_pad_core_44xx.h index 1e2d3322f33e..c88420de1151 100644 --- a/arch/arm/mach-omap2/include/mach/ctrl_module_pad_core_44xx.h +++ b/arch/arm/mach-omap2/include/mach/ctrl_module_pad_core_44xx.h @...
ea9947b4395fa34666086b2fa6f686e94903e047
Analyze and fix the following issue in the Linux kernel code: Btrfs: fix crash in scrub repair code when device is missing
Problem Details: Fix that when scrub tries to repair an I/O or checksum error and one of the devices containing the mirror is missing, it crashes in bio_add_page because the bdev is a NULL pointer for missing devices. Reported-by: Marco L. Crociani <marco.crociani@gmail.com> Signed-off-by: Stefan Behrens <sbehrens@gia...
```diff diff --git a/fs/btrfs/scrub.c b/fs/btrfs/scrub.c index b679bf68861e..7e487be0094e 100644 --- a/fs/btrfs/scrub.c +++ b/fs/btrfs/scrub.c @@ -998,6 +998,7 @@ static int scrub_setup_recheck_block(struct scrub_dev *sdev, page = sblock->pagev + page_index; page->logical = logical; page->physical = bbio->s...
d04b1debc92535453df2494d0b019edf0bb91003
Analyze and fix the following issue in the Linux kernel code: btrfs: Fix mismatching struct members in ioctl.h
Problem Details: Fix the size members of btrfs_ioctl_ino_path_args and btrfs_ioctl_logical_ino_args. The user space btrfs-progs utilities used __u64 and the kernel headers used __u32 before. Signed-off-by: Alexander Block <ablock84@googlemail.com> Signed-off-by: Chris Mason <chris.mason@oracle.com>
```diff diff --git a/fs/btrfs/ioctl.h b/fs/btrfs/ioctl.h index 4f69028a68c4..086e6bdae1c4 100644 --- a/fs/btrfs/ioctl.h +++ b/fs/btrfs/ioctl.h @@ -252,7 +252,7 @@ struct btrfs_data_container { struct btrfs_ioctl_ino_path_args { __u64 inum; /* in */ - __u32 size; /* in */ + __u64 size; /* in */ __u64 ...
17de39ac17bf99b8bf0d819d13668d5048836efc
Analyze and fix the following issue in the Linux kernel code: Btrfs: fix page leak when allocing extent buffers
Problem Details: If we happen to alloc a extent buffer and then alloc a page and notice that page is already attached to an extent buffer, we will only unlock it and free our existing eb. Any pages currently attached to that eb will be properly freed, but we don't do the page_cache_release() on the page where we notic...
```diff diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index 0c23e57077c6..2fb52c26c677 100644 --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c @@ -4120,6 +4120,7 @@ struct extent_buffer *alloc_extent_buffer(struct extent_io_tree *tree, if (atomic_inc_not_zero(&exists->refs)) { spin_unlock(&mapp...
1385b8117325e79f74c1e7d1cbf45c789deb85c5
Analyze and fix the following issue in the Linux kernel code: NFS: Fix sparse warnings
Problem Details: Fix the following sparse warnings: fs/nfs/direct.c:221:6: warning: symbol 'nfs_direct_readpage_release' was not declared. Should it be static? fs/nfs/read.c:38:43: warning: non-ANSI function declaration of function 'nfs_readhdr_alloc' fs/nfs/objlayout/objio_osd.c:214:5: warning: symbol '__alloc_objio_...
```diff diff --git a/fs/nfs/direct.c b/fs/nfs/direct.c index dca9c8143009..257d0091148b 100644 --- a/fs/nfs/direct.c +++ b/fs/nfs/direct.c @@ -218,7 +218,7 @@ static void nfs_direct_complete(struct nfs_direct_req *dreq) nfs_direct_req_release(dreq); } -void nfs_direct_readpage_release(struct nfs_page *req) +static...
f3740572512075839e1a7ebde970081106fed3f0
Analyze and fix the following issue in the Linux kernel code: ath6kl_sdio: Fix the EAPOL out of order issue
Problem Details: Send the EAPOL and management frames in the same AC_VO queue. The issue happens when the AP supports QOS, the management frames are sent to AC_VO queue and EAP frame goes to AC_BE queue. Even though the EAP frame is queued before the DEAUTH management frame, as they are queued on different h/w queues, ...
```diff diff --git a/drivers/net/wireless/ath/ath6kl/wmi.c b/drivers/net/wireless/ath/ath6kl/wmi.c index 102477d5900f..ee8ec2394c2c 100644 --- a/drivers/net/wireless/ath/ath6kl/wmi.c +++ b/drivers/net/wireless/ath/ath6kl/wmi.c @@ -290,6 +290,13 @@ int ath6kl_wmi_implicit_create_pstream(struct wmi *wmi, u8 if_idx, ...
bf5fc4028ef751904a114ffc4b5d2cd9f0233142
Analyze and fix the following issue in the Linux kernel code: NFS: Fix O_DIRECT compile warnings
Problem Details: Fix the following compile warnings: fs/nfs/direct.c: In function 'nfs_direct_read_schedule_segment': fs/nfs/direct.c:325:11: warning: comparison of distinct pointer types lacks a cast [enabled by default] fs/nfs/direct.c:325:11: warning: comparison of distinct pointer types lacks a cast [enabled by def...
```diff diff --git a/fs/nfs/direct.c b/fs/nfs/direct.c index aab3016c437c..dca9c8143009 100644 --- a/fs/nfs/direct.c +++ b/fs/nfs/direct.c @@ -322,7 +322,7 @@ static ssize_t nfs_direct_read_schedule_segment(struct nfs_pageio_descriptor *de int i; pgbase = user_addr & ~PAGE_MASK; - bytes = min(max(rsize, PAGE_S...
b6392bd5b11d694a5d563d2ad1d88137d2cde036
Analyze and fix the following issue in the Linux kernel code: ARM: OMAP1: Amstrad Delta: Fix wrong IRQ base in FIQ handler
Problem Details: Commit 384ebe1c2849160d040df3e68634ec506f13d9ff, "gpio/omap: Add DT support to GPIO driver", introduced dynamic IRQ numbering of OMAP GPIO interrupts, breaking all IH_GPIO_BASE based IRQ number calculations. This issue was corrected in the OMAP GPIO driver and the related header file with commit 25db71...
```diff diff --git a/arch/arm/mach-omap1/ams-delta-fiq.c b/arch/arm/mach-omap1/ams-delta-fiq.c index fcce7ff37630..cfd98b186fcc 100644 --- a/arch/arm/mach-omap1/ams-delta-fiq.c +++ b/arch/arm/mach-omap1/ams-delta-fiq.c @@ -48,7 +48,7 @@ static irqreturn_t deferred_fiq(int irq, void *dev_id) struct irq_chip *irq_chip ...
1ea52fbda1629216182a0b0fbee9d65e8bcedd1e
Analyze and fix the following issue in the Linux kernel code: mISDN: Layer1 statemachine fix
Problem Details: The timer3 and the activation delay timer need to be independent. If timer3 fires do not reqest power up we have to send only INFO 0. Now layer1 pass TBR3 again. Signed-off-by: Karsten Keil <kkeil@linux-pingi.de> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/isdn/mISDN/layer1.c b/drivers/isdn/mISDN/layer1.c index ff0515323c86..bebc57b72138 100644 --- a/drivers/isdn/mISDN/layer1.c +++ b/drivers/isdn/mISDN/layer1.c @@ -28,7 +28,8 @@ static u_int *debug; struct layer1 { u_long Flags; struct FsmInst l1m; - struct FsmTimer timer; + struct FsmTi...
7ed80fe45d42678fb234bf9d18de6a98cfa9830d
Analyze and fix the following issue in the Linux kernel code: mISDN: Fix refcounting bug
Problem Details: Under some configs it was still not possible to unload the driver, because the module use count was srewed up. Signed-off-by: Karsten Keil <keil@b1-systems.de> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/isdn/mISDN/tei.c b/drivers/isdn/mISDN/tei.c index 969766f5f82b..109276a0d1a0 100644 --- a/drivers/isdn/mISDN/tei.c +++ b/drivers/isdn/mISDN/tei.c @@ -790,18 +790,23 @@ tei_ph_data_ind(struct teimgr *tm, u_int mt, u_char *dp, int len) static struct layer2 * create_new_tei(struct manager *m...
d12379acaf55a395083ca81d753b1af75507556c
Analyze and fix the following issue in the Linux kernel code: ARM: 7391/1: versatile: add some auxdata for device trees
Problem Details: The MMCI and PL022 SPI drivers sure need their platform data to work on the Versatile as well. (This does not fix the auxdata for MMCI instance mmc1 on the Versatile PB though.) Cc: Niklas Hernaeus <niklas.hernaeus@linaro.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Russ...
```diff diff --git a/arch/arm/mach-versatile/core.c b/arch/arm/mach-versatile/core.c index 6f5fb466a273..cf4687ee2a7b 100644 --- a/arch/arm/mach-versatile/core.c +++ b/arch/arm/mach-versatile/core.c @@ -663,17 +663,18 @@ static struct amba_device *amba_devs[] __initdata = { * having a specific name. */ struct of_d...
3108e6ab21a9b9dbd88f0b2ff99f73e95b8b1580
Analyze and fix the following issue in the Linux kernel code: ARM: 7389/2: plat-versatile: modernize FPGA IRQ controller
Problem Details: This does two things to the FPGA IRQ controller in the versatile family: - Convert to MULTI_IRQ_HANDLER so we can drop the entry macro from the Integrator. The C IRQ handler was inspired from arch/arm/common/vic.c, recent bug discovered in this handler was accounted for. - Convert to using IRQ d...
```diff diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index cf006d40342c..2f67f6c62f56 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -280,6 +280,7 @@ config ARCH_INTEGRATOR select NEED_MACH_IO_H select NEED_MACH_MEMORY_H select SPARSE_IRQ + select MULTI_IRQ_HANDLER help Support for ARM's Integr...
f9425ad4e5c8f8f9f6297d0358dc44ca058ffe47
Analyze and fix the following issue in the Linux kernel code: GFS2: Fix sgid propagation when using ACLs
Problem Details: This cleans up the mode setting code when creating inodes. The SGID bit was being reset by setattr_copy() when the user creating a subdirectory was not in the owning group. When ACLs are in use this SGID bit should have been propagated if the ACL allows creation of a subdirectory. GFS2's behaviour now ...
```diff diff --git a/fs/gfs2/acl.c b/fs/gfs2/acl.c index 230eb0f005b6..bd4a5892c93c 100644 --- a/fs/gfs2/acl.c +++ b/fs/gfs2/acl.c @@ -73,12 +73,8 @@ static int gfs2_set_mode(struct inode *inode, umode_t mode) int error = 0; if (mode != inode->i_mode) { - struct iattr iattr; - - iattr.ia_valid = ATTR_MODE; - i...
124ef389256f71042ab5dedde98dee5e9999a635
Analyze and fix the following issue in the Linux kernel code: usb: gadget: composite: prevent a memory leak when configuration bind fails
Problem Details: In some USB composite gadget drivers, the configuration's bind function called by the usb_add_config() calls multiple bind config functions. (for example cdc2 configuration bind function in the cdc_do_config() of the cdc2.c has two functionality bind config functions. - the ecm_bind_config() & the ac...
```diff diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c index baaebf2830fc..4cb1801539a6 100644 --- a/drivers/usb/gadget/composite.c +++ b/drivers/usb/gadget/composite.c @@ -737,6 +737,19 @@ int usb_add_config(struct usb_composite_dev *cdev, status = bind(config); if (status < 0) { + ...
43a18b1e588d1b6a993eedd44dd3154590d9bebd
Analyze and fix the following issue in the Linux kernel code: smp: Fix idle_thread_init() inline stub
Problem Details: idle_thread_init() does not have arguments. Reported-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
```diff diff --git a/kernel/smpboot.h b/kernel/smpboot.h index 4cfbcb8a8362..80c0acfb8472 100644 --- a/kernel/smpboot.h +++ b/kernel/smpboot.h @@ -12,7 +12,7 @@ void idle_threads_init(void); #else static inline struct task_struct *idle_thread_get(unsigned int cpu) { return NULL; } static inline void idle_thread_set_...
b16b1b6cd052acbacc0a15f934bca9b354534d48
Analyze and fix the following issue in the Linux kernel code: md/bitmap: fix calculation of 'chunks' - missing shift.
Problem Details: commit 61a0d80c "md/bitmap: discard CHUNK_BLOCK_SHIFT macro" replaced CHUNK_BLOCK_RATIO() by the same text that was replacing CHUNK_BLOCK_SHIFT() - which is clearly wrong. The result is that 'chunks' is often too small by 1, which can sometimes result in a crash (not sure how). So use the correct rep...
```diff diff --git a/drivers/md/bitmap.c b/drivers/md/bitmap.c index 97e73e555d11..17e2b472e16d 100644 --- a/drivers/md/bitmap.c +++ b/drivers/md/bitmap.c @@ -1727,8 +1727,7 @@ int bitmap_create(struct mddev *mddev) bitmap->chunkshift = (ffz(~mddev->bitmap_info.chunksize) - BITMAP_BLOCK_SHIFT); - /* now t...
d8f2799b105a24bb0bbd3380a0d56e6348484058
Analyze and fix the following issue in the Linux kernel code: fs/cifs: fix parsing of dfs referrals
Problem Details: The problem was that the first referral was parsed more than once and so the caller tried the same referrals multiple times. The problem was introduced partly by commit 066ce6899484d9026acd6ba3a8dbbedb33d7ae1b, where 'ref += le16_to_cpu(ref->Size);' got lost, but that was also wrong... Cc: <stable@vg...
```diff diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c index f52c5ab78f9d..da2f5446fa7a 100644 --- a/fs/cifs/cifssmb.c +++ b/fs/cifs/cifssmb.c @@ -4844,8 +4844,12 @@ parse_DFS_referrals(TRANSACTION2_GET_DFS_REFER_RSP *pSMBr, max_len = data_end - temp; node->node_name = cifs_strndup_from_utf16(temp, max_len, ...
4cb6e116bb97c8b87a1f4f95e99d0c8dda2a6e9b
Analyze and fix the following issue in the Linux kernel code: openvswitch: Release rtnl_lock if ovs_vport_cmd_build_info() failed.
Problem Details: This patch fixes a possible lock-up bug where rtnl_lock might not get released. Signed-off-by: Ansis Atteka <aatteka@nicira.com> Signed-off-by: Jesse Gross <jesse@nicira.com>
```diff diff --git a/net/openvswitch/datapath.c b/net/openvswitch/datapath.c index e44e631ea952..4cb615d46363 100644 --- a/net/openvswitch/datapath.c +++ b/net/openvswitch/datapath.c @@ -1641,10 +1641,9 @@ static int ovs_vport_cmd_set(struct sk_buff *skb, struct genl_info *info) reply = ovs_vport_cmd_build_info(vport...
dce4c92d69db53ed0e09191428f17ac9a14ad248
Analyze and fix the following issue in the Linux kernel code: powerpc/40x: Use {upper,lower}_32_bits for msi_phys
Problem Details: Fix a build error when -Werror is set: arch/powerpc/sysdev/ppc4xx_msi.c: In function ‘ppc4xx_setup_pcieh_hw’: arch/powerpc/sysdev/ppc4xx_msi.c:178:2: error: right shift count >= width of type [-Werror] Signed-off-by: Josh Boyer <jwboyer@gmail.com>
```diff diff --git a/arch/powerpc/sysdev/ppc4xx_msi.c b/arch/powerpc/sysdev/ppc4xx_msi.c index cc17f591bd66..82c6702dcbab 100644 --- a/arch/powerpc/sysdev/ppc4xx_msi.c +++ b/arch/powerpc/sysdev/ppc4xx_msi.c @@ -175,8 +175,8 @@ static int ppc4xx_setup_pcieh_hw(struct platform_device *dev, msi_virt = dma_alloc_coherent...
e419b4cc585680940bc42f8ca8a071d6023fb1bb
Analyze and fix the following issue in the Linux kernel code: vfs: make word-at-a-time accesses handle a non-existing page
Problem Details: It turns out that there are more cases than CONFIG_DEBUG_PAGEALLOC that can have holes in the kernel address space: it seems to happen easily with Xen, and it looks like the AMD gart64 code will also punch holes dynamically. Actually hitting that case is still very unlikely, so just do the access, and...
```diff diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 1d14cc6b79ad..c9866b0b77d8 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -81,7 +81,7 @@ config X86 select CLKEVT_I8253 select ARCH_HAVE_NMI_SAFE_CMPXCHG select GENERIC_IOMAP - select DCACHE_WORD_ACCESS if !DEBUG_PAGEALLOC + select DCACHE_WOR...
22bd1f7ef40a1c0f2ba796ba7cd80013adcb835d
Analyze and fix the following issue in the Linux kernel code: ARM: dt: tegra seaboard: fix I2C2 SCL rate
Problem Details: This I2C bus is used for EDID/DDC reads and other "slow" I2C devices. This requires a 100KHz SCL (clock) rate. Signed-off-by: Stephen Warren <swarren@nvidia.com>
```diff diff --git a/arch/arm/boot/dts/tegra-seaboard.dts b/arch/arm/boot/dts/tegra-seaboard.dts index 0f30fc9f2005..11aea885c1bb 100644 --- a/arch/arm/boot/dts/tegra-seaboard.dts +++ b/arch/arm/boot/dts/tegra-seaboard.dts @@ -281,7 +281,7 @@ }; i2c@7000c400 { - clock-frequency = <400000>; + clock-frequency = <...
51c9e6c7732b67769c0a514d31f505e49fa82dd4
Analyze and fix the following issue in the Linux kernel code: xhci: Avoid dead ports when CONFIG_USB_XHCI_HCD=n
Problem Details: If the user chooses to say "no" to CONFIG_USB_XHCI_HCD on a system with an Intel Panther Point chipset, the PCI quirks code or the EHCI driver will switch the ports over to the xHCI host, but the xHCI driver will never load. The ports will be powered off and seem "dead" to the user. Fix this by only ...
```diff diff --git a/drivers/usb/host/pci-quirks.c b/drivers/usb/host/pci-quirks.c index 32dada8c8b4f..39b2612342fd 100644 --- a/drivers/usb/host/pci-quirks.c +++ b/drivers/usb/host/pci-quirks.c @@ -9,6 +9,7 @@ */ #include <linux/types.h> +#include <linux/kconfig.h> #include <linux/kernel.h> #include <linux/pci....
f370b9968a220a3d79d870dd7dee674cc0ff3d10
Analyze and fix the following issue in the Linux kernel code: xHCI: keep track of ports being resumed and indicate in hub_status_data
Problem Details: This commit adds a bit-array to xhci bus_state for keeping track of which ports are undergoing a resume transition. If any of the bits are set when xhci_hub_status_data() is called, the routine will return a non-zero value even if no ports have any status changes pending. This will allow usbcore to han...
```diff diff --git a/drivers/usb/host/xhci-hub.c b/drivers/usb/host/xhci-hub.c index 673ad120c43e..89850a82d51b 100644 --- a/drivers/usb/host/xhci-hub.c +++ b/drivers/usb/host/xhci-hub.c @@ -558,6 +558,7 @@ int xhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue, xhci_dbg(xhci, "Resume USB2 port %d\n", ...
a557b97616c49d81e09c8439831d4c4f13ef4050
Analyze and fix the following issue in the Linux kernel code: cifs: make sure we ignore the credentials= and cred= options
Problem Details: Older mount.cifs programs passed this on to the kernel after parsing the file. Make sure the kernel ignores that option. Should fix: https://bugzilla.kernel.org/show_bug.cgi?id=43195 Cc: Sachin Prabhu <sprabhu@redhat.com> Reported-by: Ronald <ronald645@gmail.com> Signed-off-by: Jeff Layton <jlay...
```diff diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index a75902b28bf9..5dcc55197fb3 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c @@ -215,6 +215,8 @@ static const match_table_t cifs_mount_option_tokens = { { Opt_ignore, "cred" }, { Opt_ignore, "credentials" }, + { Opt_ignore, "cred=%s" }, + { Opt...
6868225e3e92399068be9a5f1635752d91012ad5
Analyze and fix the following issue in the Linux kernel code: libata: skip old error history when counting probe trials
Problem Details: Commit d902747("[libata] Add ATA transport class") introduced ATA_EFLAG_OLD_ER to mark entries in the error ring as cleared. But ata_count_probe_trials_cb() didn't check this flag and it still counts the old error history. So wrong probe trials count is returned and it causes problem, for example, SAT...
```diff diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c index c61316e9d2f7..d1fbd59ead16 100644 --- a/drivers/ata/libata-eh.c +++ b/drivers/ata/libata-eh.c @@ -3501,7 +3501,8 @@ static int ata_count_probe_trials_cb(struct ata_ering_entry *ent, void *void_arg u64 now = get_jiffies_64(); int *trials = ...
cc6ae020d651900ef6bd872d0097118e5a605c3d
Analyze and fix the following issue in the Linux kernel code: ARM: OMAP4: cpuidle - fix static omap4_idle_data declaration
Problem Details: Add the static declaration for the omap4_idle_data variable because its scope is in the file only. Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Reviewed-by: Jean Pihet <j-pihet@ti.com> Reviewed-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Tested-by: Santosh Shilimkar <santosh.shilimka...
```diff diff --git a/arch/arm/mach-omap2/cpuidle44xx.c b/arch/arm/mach-omap2/cpuidle44xx.c index 522ec23790cd..38ecd270a4a8 100644 --- a/arch/arm/mach-omap2/cpuidle44xx.c +++ b/arch/arm/mach-omap2/cpuidle44xx.c @@ -33,7 +33,7 @@ struct omap4_idle_statedata { #define OMAP4_NUM_STATES 3 -struct omap4_idle_statedata ...
3cb81651d070edfbea83eef763c3ca3c6f3848fd
Analyze and fix the following issue in the Linux kernel code: ASoC: da7210: Minor improvements and a bugfix
Problem Details: This patch improves playback quality for few sample rates like 8000 and 11025 Hz. This also fixes an issue observed during testing of pll slave mode. Due to the issue, on some rare occasions there was no sound output for first time playback after system boot, though all subsequent playbacks were fine....
```diff diff --git a/sound/soc/codecs/da7210.c b/sound/soc/codecs/da7210.c index 10f52ff14daa..af5db7080519 100644 --- a/sound/soc/codecs/da7210.c +++ b/sound/soc/codecs/da7210.c @@ -850,8 +850,19 @@ static int da7210_hw_params(struct snd_pcm_substream *substream, if (da7210->mclk_rate && (da7210->mclk_rate != sysclk...
715dc1f342713816d1be1c37643a2c9e6ee181a7
Analyze and fix the following issue in the Linux kernel code: net: Fix truesize accounting in skb_gro_receive()
Problem Details: GRO is very optimistic in skb truesize estimates, only taking into account the used part of fragments. Be conservative, and use more precise computation, so that bloated GRO skbs can be collapsed eventually. Signed-off-by: Eric Dumazet <edumazet@google.com> Cc: Alexander Duyck <alexander.h.duyck@inte...
```diff diff --git a/net/core/skbuff.c b/net/core/skbuff.c index 9e8caa0c4f72..e1f8bbaadf52 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c @@ -2871,6 +2871,7 @@ int skb_gro_receive(struct sk_buff **head, struct sk_buff *skb) unsigned int len = skb_gro_len(skb); unsigned int offset = skb_gro_offset(skb); u...
9104183dad6314c55344d65738cd719b909a3e0a
Analyze and fix the following issue in the Linux kernel code: drm/i915: Periodically sanity check power management
Problem Details: Every time we use the device after a period of idleness, check that the power management setup is still sane. This is to workaround a bug whereby it seems that we begin suppressing power management interrupts, preventing SandyBridge+ from going into turbo mode. This patch does have a side-effect. It r...
```diff diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index 1f2510931019..00a20e985d28 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h @@ -240,6 +240,7 @@ struct drm_i915_display_funcs { void (*update_wm)(struct drm_device *dev); void (*update_spri...
ed90542b0ce5415050c6fbfca324bccaafa69f2f
Analyze and fix the following issue in the Linux kernel code: iwlwifi: fix skb truesize underestimation
Problem Details: By default, iwlwifi uses order-1 pages (8 KB) to store incoming frames, but doesnt say so in skb->truesize. This makes very possible to exhaust kernel memory since these skb evade normal socket memory accounting. As struct ieee80211_hdr is going to be pulled before calling IP stack, there is no need ...
```diff diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rx.c b/drivers/net/wireless/iwlwifi/iwl-agn-rx.c index f4b84d1596e3..22474608a70b 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-rx.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-rx.c @@ -773,8 +773,7 @@ static void iwlagn_pass_packet_to_mac80211(struct iwl_pri...
c1230df7e19e0f27655c0eb9d966c7e03be7cc50
Analyze and fix the following issue in the Linux kernel code: drm/i915: enable dip before writing data on gen4
Problem Details: While testing with the intel_infoframes tool on gen4, I see that when video DIP is disabled, what we write to the DATA memory is not exactly what we read back later. This regression has been introduce in commit 64a8fc0145a1d0fdc25fc9367c2e6c621955fb3b Author: Jesse Barnes <jbarnes@virtuousgeek.org> D...
```diff diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c index cae3e5f17a49..2d7f47b56b6a 100644 --- a/drivers/gpu/drm/i915/intel_hdmi.c +++ b/drivers/gpu/drm/i915/intel_hdmi.c @@ -136,7 +136,7 @@ static void i9xx_write_infoframe(struct drm_encoder *encoder, val &= ~VIDEO_DIP_SELEC...
247540b03bfcbbe26b86692c9424195d76eb67f0
Analyze and fix the following issue in the Linux kernel code: powerpc/44x: Fix PCI MSI support for Maui APM821xx SoC and Bluestone board
Problem Details: This patch consists of: - Enable PCI MSI as default for Bluestone board - Change definition of number of MSI interrupts as it depends on SoC - Fix returning ENODEV as finding MSI node - Fix MSI physical high and low address - Keep MSI data logically Signed-off-by: Mai La <mla@apm.com> Signed-off-by: J...
```diff diff --git a/arch/powerpc/platforms/44x/Kconfig b/arch/powerpc/platforms/44x/Kconfig index 2e4e64abfab4..8abf6fb8f410 100644 --- a/arch/powerpc/platforms/44x/Kconfig +++ b/arch/powerpc/platforms/44x/Kconfig @@ -23,6 +23,8 @@ config BLUESTONE default n select PPC44x_SIMPLE select APM821xx + select PCI_MSI ...
f13bfcc6961a5c9f511c401292db522edcd0b061
Analyze and fix the following issue in the Linux kernel code: powerpc/44x: Fix/Initialize PID to kernel PID before the TLB search
Problem Details: Initialize the PID register with kernel pid (0) before we start setting the TLB mapping for KEXEC. Also set the MMUCR[TID] to kernel PID. This was spotted while testing the kexec on ISS for 47x. ISS doesn't return a successful tlbsx for a kernel address with PID set to a user PID. Though the hardware...
```diff diff --git a/arch/powerpc/kernel/misc_32.S b/arch/powerpc/kernel/misc_32.S index 7cd07b42ca1a..d7e05d20b55c 100644 --- a/arch/powerpc/kernel/misc_32.S +++ b/arch/powerpc/kernel/misc_32.S @@ -761,8 +761,12 @@ relocate_new_kernel: mr r30, r4 mr r31, r5 - /* Load our MSR_IS and TID to MMUCR for TLB search */...
f525c6d29501eb483f2d6f742d2f1dc0452b924d
Analyze and fix the following issue in the Linux kernel code: ixgbe: dcb: BIT_APP_UPCHG not set by ixgbe_copy_dcb_cfg()
Problem Details: After this commit: commit aacc1bea190d731755a65cb8ec31dd756f4e263e Author: Multanen, Eric W <eric.w.multanen@intel.com> Date: Wed Mar 28 07:49:09 2012 +0000 ixgbe: driver fix for link flap The BIT_APP_UPCHG bit is no longer set when ixgbe_dcbnl_set_all() is called. This results in the FCoE app...
```diff diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe.h b/drivers/net/ethernet/intel/ixgbe/ixgbe.h index 74e192107f9a..81b155589532 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe.h +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe.h @@ -574,9 +574,6 @@ extern struct ixgbe_info ixgbe_82599_info; extern struct ixg...
ab6039a70bb559b2fb5f363934da67d864ccda2a
Analyze and fix the following issue in the Linux kernel code: ixgbe: fix race condition with shutdown
Problem Details: It was possible for shutdown to pull the rug out from other driver entry points. Now we just grab the rtnl lock before taking everything apart. Thanks to Hariharan for noticing this tight race condition. Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com> Cc: Hariharan Nagarajan <hanagara@cisco...
```diff diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c index 88f6b2e9b72d..d9dbf871abb8 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c @@ -4866,10 +4866,12 @@ static int __ixgbe_shutdown(struct pc...
c846b6194dbe02d9f4fc8c0471e799babc1c3f47
Analyze and fix the following issue in the Linux kernel code: drm/i915: make DBLCLK modes work
Problem Details: They require an AVI InfoFrame with a proper Pixel Repetition field. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=45729 Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
```diff diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h index 3205a774ec4b..d9ffe381c723 100644 --- a/drivers/gpu/drm/i915/intel_drv.h +++ b/drivers/gpu/drm/i915/intel_drv.h @@ -234,6 +234,8 @@ struct cxsr_latency { #define DIP_TYPE_AVI 0x82 #define DIP_VERSION_AVI 0x2 #define DIP...
e04c735029bc133466b89265a0745a226d0eac23
Analyze and fix the following issue in the Linux kernel code: drm/i915: Wait for the clocks to stabilise before updating PLLs
Problem Details: When initialising the PLL registers we may have to clear existing state from the BIOS - that is the PLL may already be enabled. So we need to disable it, wait for the clocks to settle and then rewrite it. The issue came to light when Ben tested commit 88ca4bb7974277793e602d88739d4e8f56b89e64 Author: ...
```diff diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 059e4684efd1..6ab195c0097f 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -2708,11 +2708,14 @@ found: DRM_DEBUG_DRIVER("using pll %d for pipe %d\n", i, intel_crtc->pi...
316d388450be37fedcf4b37cf211b2bdc7826bb8
Analyze and fix the following issue in the Linux kernel code: drm/i915: rework legacy GFX HWS handling
Problem Details: To get the fun stuff out of the way, the legacy hws is allocated by userspace when the gpu needs a gfx hws. And there's no reference-counting going on, so userspace can simply screw everyone over. At least it's not as horrible as i810, where the ringbuffer is allocated by userspace ... We can't fix t...
```diff diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c index 1b1f8e70df8d..f0c0a7ed90e5 100644 --- a/drivers/gpu/drm/i915/i915_dma.c +++ b/drivers/gpu/drm/i915/i915_dma.c @@ -67,7 +67,16 @@ LOCK_TEST_WITH_RETURN(dev, file); \ } while (0) -#define READ_HWSP(dev_priv, reg) intel_re...
c58cf4f1082d81c42be89e9c6eeca6466954a70c
Analyze and fix the following issue in the Linux kernel code: drm/i915: drop polled waits from i915_wait_request
Problem Details: The only time irq_get should fail is during unload or suspend. Both of these points should try to quiesce the GPU before disabling interrupts and so the atomic polling should never occur. This was recommended by Chris Wilson as a way of reducing added complexity to the polled wait which I introduced i...
```diff diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index 292b4a9e7bab..148e04baceba 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c @@ -1864,22 +1864,19 @@ i915_wait_request(struct intel_ring_buffer *ring, if (!i915_seqno_passed(ring->get_seqno(ri...
be998e2e3945d97ffad3c800ef52fd487868b3e9
Analyze and fix the following issue in the Linux kernel code: drm/i915: move vbetool invoked ier stuff
Problem Details: This extra bit of interrupt enabling code doesn't belong in the wait seqno function. If anything we should pull it out to a helper so the throttle code can also use it. The history is a bit vague, but I am going to attempt to just dump it, unless someone can argue otherwise. Removing this allows for a...
```diff diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c index 120db4687a2f..8ed034233e38 100644 --- a/drivers/gpu/drm/i915/i915_debugfs.c +++ b/drivers/gpu/drm/i915/i915_debugfs.c @@ -712,6 +712,7 @@ static int i915_error_state(struct seq_file *m, void *unused) error->time.t...
b2da9fe5d5994a104bbae154590070d698279919
Analyze and fix the following issue in the Linux kernel code: drm/i915: remove do_retire from i915_wait_request
Problem Details: This originates from a hack by me to quickly fix a bug in an earlier patch where we needed control over whether or not waiting on a seqno actually did any retire list processing. Since the two operations aren't clearly related, we should pull the parameter out of the wait function, and make the caller ...
```diff diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c index 7a55abbddc99..17081dad3faa 100644 --- a/drivers/gpu/drm/i915/i915_dma.c +++ b/drivers/gpu/drm/i915/i915_dma.c @@ -2009,9 +2009,10 @@ int i915_driver_unload(struct drm_device *dev) unregister_shrinker(&dev_priv->mm.inactive_s...
bbba0a9712be1c8e970fc66fc3becad0ce809e4f
Analyze and fix the following issue in the Linux kernel code: drm/i915: Inline I915_INTERRUPT_ENABLE_FIX
Problem Details: Since there is only one remaining user of I915_INTERRUPT_ENABLE_FIX, expand it at the callsite. Quoting Jesse Barnes: "I'd really like to get rid of these defines at the top of i915_irq.c. Some are unused and the others just make you check for the right bits everytime your read the code." Signed-off-...
```diff diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c index 51f872084efa..0d5e3f657431 100644 --- a/drivers/gpu/drm/i915/i915_irq.c +++ b/drivers/gpu/drm/i915/i915_irq.c @@ -39,24 +39,6 @@ #define MAX_NOPID ((u32)~0) -/** - * Interrupts that are always left unmasked. - * - * Since ...
38bde18045afe854f389961846d64c4b3f86105f
Analyze and fix the following issue in the Linux kernel code: drm/i915: Handle PendingFlip on gen3 robustly
Problem Details: We appear to allow too many pending pageflips as evidenced by an apparent pin-leak. So borrow the pageflip completion logic from i8xx for handling PendingFlip in a robust manner. v2: Address Jesse's reminders about the nuances of gen3 IRQ handling. References: https://bugzilla.kernel.org/show_bug.cgi...
```diff diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c index 24d23a21c538..51f872084efa 100644 --- a/drivers/gpu/drm/i915/i915_irq.c +++ b/drivers/gpu/drm/i915/i915_irq.c @@ -2350,16 +2350,31 @@ static void i915_irq_preinstall(struct drm_device * dev) static int i915_irq_postinstall(str...
c7bd4c25650704d4d065eb4ce2a122d2a80ce804
Analyze and fix the following issue in the Linux kernel code: drm/i915: Remove too early plane enable on pre-PCH hardware
Problem Details: Enabling the plane before we have assigned valid address means that it will access random PTE (often with conflicting memory types) and cause GPU lockups. However, enabling the plane too early appears to workaround a number of bugs in our modesetting code. Cc: Franz Melchior <melchior.franz@gmail.com>...
```diff diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index c5f071daa851..cf9dfcd7a94f 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -3932,7 +3932,6 @@ static int i9xx_crtc_mode_set(struct drm_crtc *crtc, I915_WRITE(DSPCNTR...
ee7b9f93fd96a72e5d09e2b44024c11880873c6b
Analyze and fix the following issue in the Linux kernel code: drm/i915: manage PCH PLLs separately from pipes
Problem Details: PCH PLLs aren't required for outputs on the CPU, so we shouldn't just treat them as part of the pipe. So split the code out and manage PCH PLLs separately, allocating them when needed or trying to re-use existing PCH PLL setups when the timings match. v2: add num_pch_pll field to dev_priv (Daniel) ...
```diff diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c index 3effcf71e1b1..95ccdffb5deb 100644 --- a/drivers/gpu/drm/i915/i915_drv.c +++ b/drivers/gpu/drm/i915/i915_drv.c @@ -377,18 +377,23 @@ void intel_detect_pch(struct drm_device *dev) if (id == INTEL_PCH_IBX_DEVICE_ID_TYPE) { ...
c2798b19bac2538393fc932bfbe59807a4734b3e
Analyze and fix the following issue in the Linux kernel code: drm/i915: i8xx interrupt handler
Problem Details: gen2 hardware has some significant differences from the other interrupt routines that were glossed over and then forgotten about in the transition to KMS. Such as - 16bit IIR - PendingFlip status bit This patch reintroduces a handler specifically for gen2 for the purpose of handling pageflips correct...
```diff diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c index ab023ca73b45..d45b43a35f15 100644 --- a/drivers/gpu/drm/i915/i915_irq.c +++ b/drivers/gpu/drm/i915/i915_irq.c @@ -2446,6 +2446,152 @@ static void i915_driver_irq_uninstall(struct drm_device * dev) I915_WRITE(IIR, I915_READ(II...
4f0c7cfbb4d25aad44137b6531365d29d3080349
Analyze and fix the following issue in the Linux kernel code: drm/i915: [sparse] __iomem fixes for gem
Problem Details: As with one of the earlier patches in the series, we're forced to cast for copy_[to|from]_user. Again because of the nature of the GEN x86 exclusivity, this should be safe. Signed-off-by: Ben Widawsky <benjamin.widawsky@intel.com> [danvet: Added some bikeshed.] Signed-off-by: Daniel Vetter <daniel.vet...
```diff diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index 7bc4a40132ad..9e9ea759e496 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c @@ -282,8 +282,8 @@ __copy_to_user_swizzled(char __user *cpu_vaddr, } static inline int -__copy_from_user_swizzle...
0d38f00904bd74d791d60105dd4323c60f1767cb
Analyze and fix the following issue in the Linux kernel code: drm/i915: [sparse] __iomem fixes for debugfs
Problem Details: These were mostly straight forward. No forced casting needed. Signed-off-by: Ben Widawsky <benjamin.widawsky@intel.com> [danvet: fix conflict with ringbuffer_data removal and drop the hunk about the status page - that needs more care to fix up.] Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
```diff diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c index 8c899a2237ff..54a10667fe82 100644 --- a/drivers/gpu/drm/i915/i915_debugfs.c +++ b/drivers/gpu/drm/i915/i915_debugfs.c @@ -1290,17 +1290,25 @@ static int i915_opregion(struct seq_file *m, void *unused) struct drm_devic...
75020bc11c2fa4c060d45b8d0e3f6a37109725bc
Analyze and fix the following issue in the Linux kernel code: drm/i915: [sparse] __iomem fixes for overlay
Problem Details: With the exception of a forced cast for phys_obj stuff (a problem in other patches as well) all of these are fairly simple __iomem compliance fixes. As with other patches, yank/paste errors may exist. Signed-off-by: Ben Widawsky <benjamin.widawsky@intel.com> [danvet: Added comment to explain the __io...
```diff diff --git a/drivers/gpu/drm/i915/intel_overlay.c b/drivers/gpu/drm/i915/intel_overlay.c index 80b331c322fb..0f0fe31fc466 100644 --- a/drivers/gpu/drm/i915/intel_overlay.c +++ b/drivers/gpu/drm/i915/intel_overlay.c @@ -187,14 +187,14 @@ struct intel_overlay { void (*flip_tail)(struct intel_overlay *); }; -...
5bc4418b557d3f56918ff21b0bd12467eb2e94aa
Analyze and fix the following issue in the Linux kernel code: drm/i915: [sparse] __iomem fixes for opregion
Problem Details: Almost all of the errors related __iomem problems. Most of the changes here are trivial, however there is plenty of chance for yank/paste errors. Signed-off-by: Ben Widawsky <benjamin.widawsky@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
```diff diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index 69e153956182..4cbc45f0424f 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h @@ -122,11 +122,11 @@ struct opregion_asle; struct drm_i915_private; struct intel_opregion { - struct opregion_he...
083f9560cdff268e2ca82dc90ba9c509742359b8
Analyze and fix the following issue in the Linux kernel code: drm/i915: print computed bpp in dp link configuration
Problem Details: Pretty useful to debug our DP bandwidth woes. v2: Also print out the required and available link bandwidth, suggested by Chris Wilson. v3: Also print out the input parameters so that diagnosing failures to find a valid dp link configuration is possible. v4: s/Display port/DP/ to shorten the output. ...
```diff diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index 44cf32c8bcbf..22c66b7c7e4a 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c @@ -688,7 +688,7 @@ intel_dp_mode_fixup(struct drm_encoder *encoder, struct drm_display_mode *mode, int lane_count,...
af94bf6db1d58d26f1cdab145b6312ad363254a6
Analyze and fix the following issue in the Linux kernel code: ixgbe: Fix use after free on module remove
Problem Details: While testing the TCP changes I had to fix an issue in order to be able to load and unload the module. The recent patch that added thermal sensor support added a use after free bug on module unload with an 82598 adapter in the system. To resolve the issue I have updated the code so that when we free ...
```diff diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_sysfs.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_sysfs.c index aa41fb705469..f81c166dc5a8 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_sysfs.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_sysfs.c @@ -185,8 +185,10 @@ static void ixgbe_sysfs_del_adapter(...
c73c3d9c49daae8acbac4cd14bcd81626887c0e6
Analyze and fix the following issue in the Linux kernel code: tcp: Fix truesize accounting in tcp_try_coalesce
Problem Details: This patch addresses several issues in the way we were tracking the truesize in tcp_try_coalesce. First it was using ksize which prevents us from having a 0 sized head frag and getting a usable result. To resolve that this patch uses the end pointer which is set based off either ksize, or the frag_si...
```diff diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index c6f78e2b590f..3cb273ac8821 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c @@ -4565,12 +4565,10 @@ merge: if (skb_headlen(from) == 0 && (skb_shinfo(to)->nr_frags + skb_shinfo(from)->nr_frags <= MAX_SKB_FRAGS)) { - WARN_O...
43caf4515c327dac6c69bfd6080b529eb6a049a6
Analyze and fix the following issue in the Linux kernel code: drm/radeon: Original Radeons had PCI GART, not PCIe GART.
Problem Details: Just a cosmetic fix to make dmesg a little less confusing. Signed-off-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
```diff diff --git a/drivers/gpu/drm/radeon/r100.c b/drivers/gpu/drm/radeon/r100.c index 42d60abf2ebe..ad6ceb731713 100644 --- a/drivers/gpu/drm/radeon/r100.c +++ b/drivers/gpu/drm/radeon/r100.c @@ -660,7 +660,7 @@ int r100_pci_gart_enable(struct radeon_device *rdev) tmp = RREG32(RADEON_AIC_CNTL) | RADEON_PCIGART_TRA...
67e3c7876878264a81afe0dceb8ac653af8387be
Analyze and fix the following issue in the Linux kernel code: drm/radeon: unlock the ring mutex while waiting for the next fence
Problem Details: Fixing just another deadlock problem with gpu reset tests. Signed-off-by: Christian König <deathsimple@vodafone.de> Reviewed-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
```diff diff --git a/drivers/gpu/drm/radeon/radeon_ring.c b/drivers/gpu/drm/radeon/radeon_ring.c index 08e1578f55f8..407d90aaa0c3 100644 --- a/drivers/gpu/drm/radeon/radeon_ring.c +++ b/drivers/gpu/drm/radeon/radeon_ring.c @@ -346,7 +346,9 @@ int radeon_ring_alloc(struct radeon_device *rdev, struct radeon_ring *ring, u...
6c6f478370eccfbfafbdc6fc55c0def03e58f124
Analyze and fix the following issue in the Linux kernel code: drm/radeon: rework recursive gpu reset handling
Problem Details: Instead of all this humpy pumpy with recursive mutex (which also fixes only halve of the problem) move the actual gpu reset out of the fence code, return -EDEADLK and then reset the gpu in the calling ioctl function. v2: Split removal of radeon_mutex into separate patch. Return -EAGAIN if reset is...
```diff diff --git a/drivers/gpu/drm/radeon/radeon_cs.c b/drivers/gpu/drm/radeon/radeon_cs.c index 24fb00108759..02eee4bb6a8c 100644 --- a/drivers/gpu/drm/radeon/radeon_cs.c +++ b/drivers/gpu/drm/radeon/radeon_cs.c @@ -496,6 +496,16 @@ out: return r; } +static int radeon_cs_handle_lockup(struct radeon_device *rdev...
8f676c4c6f0f500616560f13c0276ab6b4e39a6a
Analyze and fix the following issue in the Linux kernel code: drm/radeon: fix a bug with the ring syncing code
Problem Details: Rings need to lock in order, otherwise the ring subsystem can deadlock. v2: fix error handling and number of locked doublewords. v3: stop creating unneeded semaphores. Signed-off-by: Christian König <deathsimple@vodafone.de> Reviewed-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Dave Airlie <...
```diff diff --git a/drivers/gpu/drm/radeon/radeon.h b/drivers/gpu/drm/radeon/radeon.h index 794182a1324b..f7372c41f16b 100644 --- a/drivers/gpu/drm/radeon/radeon.h +++ b/drivers/gpu/drm/radeon/radeon.h @@ -460,6 +460,10 @@ void radeon_semaphore_emit_signal(struct radeon_device *rdev, int ring, struct radeon_sem...
96050bca22f4fe6c8db175e02c8530a9720e5e9b
Analyze and fix the following issue in the Linux kernel code: drm/radeon: fix a bug in the SA code
Problem Details: Aligning offset can make it bigger than tmp->offset leading to an overrun bug in the following subtraction. v2: Against initial suspicions this can't happen in mainline, so no need to push it into stable. Signed-off-by: Christian König <deathsimple@vodafone.de> Reviewed-by: Michel Dänzer <michel....
```diff diff --git a/drivers/gpu/drm/radeon/radeon_sa.c b/drivers/gpu/drm/radeon/radeon_sa.c index 4cce47e7dc0d..8fbfe69b7bcb 100644 --- a/drivers/gpu/drm/radeon/radeon_sa.c +++ b/drivers/gpu/drm/radeon/radeon_sa.c @@ -150,7 +150,7 @@ int radeon_sa_bo_new(struct radeon_device *rdev, offset = 0; list_for_each_entry(...