id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
2ed1f58900280f79485bbc15f781687bd9584675
Analyze and fix the following issue in the Linux kernel code: ARM: at91/clock: fix PLLA overclock warning
Problem Details: Fix PLLA overclock warning in relation with datasheet numbers. Add new > 240 MHz and > 210 MHz SoC categories. Reported-by: Jiri Prchal <jiri.prchal@aksignal.cz> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
```diff diff --git a/arch/arm/mach-at91/clock.c b/arch/arm/mach-at91/clock.c index de2ec6b8fea7..188c82971ebd 100644 --- a/arch/arm/mach-at91/clock.c +++ b/arch/arm/mach-at91/clock.c @@ -63,6 +63,12 @@ EXPORT_SYMBOL_GPL(at91_pmc_base); #define cpu_has_300M_plla() (cpu_is_at91sam9g10()) +#define cpu_has_240M_plla()...
e402af6caa02f12ad213af2e22aa8a32970f99b0
Analyze and fix the following issue in the Linux kernel code: ARM: at91: fix rtc-at91sam9 irq issue due to sparse irq support
Problem Details: AT91_ID_SYS as virq is incorrect because of spare irq support which introduces NR_IRQS_LEGACY offset. It modifies rtc-at91sam9 driver in order to get irq from resources. Signed-off-by: Ludovic Desroches <ludovic.desroches@atmel.com> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
```diff diff --git a/arch/arm/mach-at91/at91sam9260_devices.c b/arch/arm/mach-at91/at91sam9260_devices.c index 7b9c2ba396ed..bce572a530ef 100644 --- a/arch/arm/mach-at91/at91sam9260_devices.c +++ b/arch/arm/mach-at91/at91sam9260_devices.c @@ -726,6 +726,8 @@ static struct resource rtt_resources[] = { .flags = IORESO...
85ebea12f59e3341049a9c17edcb73fcf21043db
Analyze and fix the following issue in the Linux kernel code: ARM: at91: fix system timer irq issue due to sparse irq support
Problem Details: AT91_ID_SYS as virq is incorrect because of spare irq support which introduces NR_IRQS_LEGACY offset. Signed-off-by: Ludovic Desroches <ludovic.desroches@atmel.com> Tested-by: Joachim Eastwood <joachim.eastwood@jotron.com> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
```diff diff --git a/arch/arm/mach-at91/at91rm9200_time.c b/arch/arm/mach-at91/at91rm9200_time.c index 104ca40d8d18..aaa443b48c91 100644 --- a/arch/arm/mach-at91/at91rm9200_time.c +++ b/arch/arm/mach-at91/at91rm9200_time.c @@ -197,7 +197,7 @@ void __init at91rm9200_timer_init(void) at91_st_read(AT91_ST_SR); /* Ma...
c1c52848cef52e157468b8879fc3cae23b6f3a99
Analyze and fix the following issue in the Linux kernel code: OMAPFB: fix framebuffer console colors
Problem Details: omapfb does not currently set pseudo palette correctly for color depths above 16bpp, making red text invisible, command like echo -e '\e[0;31mRED' > /dev/tty1 will display nothing on framebuffer console in 24bpp mode. This is because temporary variable is declared incorrectly, fix it. Signed-off-by:...
```diff diff --git a/drivers/video/omap2/omapfb/omapfb-main.c b/drivers/video/omap2/omapfb/omapfb-main.c index 08ec1a7103f2..fc671d3d8004 100644 --- a/drivers/video/omap2/omapfb/omapfb-main.c +++ b/drivers/video/omap2/omapfb/omapfb-main.c @@ -1192,7 +1192,7 @@ static int _setcolreg(struct fb_info *fbi, u_int regno, u_i...
35d678664873041026171b4b5e1cec49299e33a0
Analyze and fix the following issue in the Linux kernel code: OMAPDSS: Fix SDI PLL locking
Problem Details: Commit f476ae9dab3234532d41d36beb4ba7be838fa786 (OMAPDSS: APPLY: Remove DISPC writes to manager's lcd parameters in interface) broke the SDI output, as it causes the SDI PLL locking to fail. LCLK and PCLK divisors are located in shadow registers, and we normally write them to DISPC registers when enab...
```diff diff --git a/drivers/video/omap2/dss/sdi.c b/drivers/video/omap2/dss/sdi.c index 5d31699fbd3c..f43bfe17b3b6 100644 --- a/drivers/video/omap2/dss/sdi.c +++ b/drivers/video/omap2/dss/sdi.c @@ -105,6 +105,20 @@ int omapdss_sdi_display_enable(struct omap_dss_device *dssdev) sdi_config_lcd_manager(dssdev); + /...
25682362564fa0c950d9afe798def2ec9c3676a2
Analyze and fix the following issue in the Linux kernel code: video: mb862xxfb: prevent divide by zero bug
Problem Details: Do a sanity check on these before using them as divisors. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Anatolij Gustschin <agust@denx.de> Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
```diff diff --git a/drivers/video/mb862xx/mb862xxfbdrv.c b/drivers/video/mb862xx/mb862xxfbdrv.c index 00ce1f34b496..57d940be5f3d 100644 --- a/drivers/video/mb862xx/mb862xxfbdrv.c +++ b/drivers/video/mb862xx/mb862xxfbdrv.c @@ -328,6 +328,8 @@ static int mb862xxfb_ioctl(struct fb_info *fbi, unsigned int cmd, case MB86...
01817d194a5c078696ac4a31b5d8b99a6a9e40c7
Analyze and fix the following issue in the Linux kernel code: drivers/video/auo_k190x.c: drop kfree of devm_kzalloc's data
Problem Details: Using kfree to free data allocated with devm_kzalloc causes double frees. The semantic patch that fixes this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression x; @@ x = devm_kzalloc(...) ... ?-kfree(x); // </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-o...
```diff diff --git a/drivers/video/auo_k190x.c b/drivers/video/auo_k190x.c index 77da6a2f43dc..c03ecdd31e4c 100644 --- a/drivers/video/auo_k190x.c +++ b/drivers/video/auo_k190x.c @@ -987,7 +987,6 @@ err_regfb: fb_dealloc_cmap(&info->cmap); err_cmap: fb_deferred_io_cleanup(info); - kfree(info->fbdefio); err_defio:...
72caa5fb948ef818fe1332848e9c61b10687ce7a
Analyze and fix the following issue in the Linux kernel code: fbcon: Fix bit_putcs() call to kmalloc(s, GFP_KERNEL)
Problem Details: Switch to kmalloc(,GFP_ATOMIC) in bit_putcs to fix below trace: [ 9.771812] BUG: sleeping function called from invalid context at /usr/src/linux-git/mm/slub.c:943 [ 9.771814] in_atomic(): 1, irqs_disabled(): 1, pid: 1063, name: mount [ 9.771818] Pid: 1063, comm: mount Not tainted 3.5.0-jupite...
```diff diff --git a/drivers/video/console/bitblit.c b/drivers/video/console/bitblit.c index 28b1a834906b..61b182bf32a2 100644 --- a/drivers/video/console/bitblit.c +++ b/drivers/video/console/bitblit.c @@ -162,7 +162,7 @@ static void bit_putcs(struct vc_data *vc, struct fb_info *info, image.depth = 1; if (attrib...
e432964a3c5ce517fd93101ae3875172ee958b65
Analyze and fix the following issue in the Linux kernel code: fbcon: prevent possible buffer overflow.
Problem Details: Signed-off-by: Paul Cercueil <paul@crapouillou.net> Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
```diff diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c index 88e92041d8f0..fdefa8fd72c4 100644 --- a/drivers/video/console/fbcon.c +++ b/drivers/video/console/fbcon.c @@ -449,7 +449,7 @@ static int __init fb_console_setup(char *this_opt) while ((options = strsep(&this_opt, ",")) != NULL)...
a51fb9b2ac4eac86ff13c30620758b87f4f3f5ce
Analyze and fix the following issue in the Linux kernel code: batman-adv: fix typos in comments
Problem Details: the word millisecond is misspelled in several comments. This patch fixes it. Signed-off-by: Antonio Quartulli <ordex@autistici.org>
```diff diff --git a/net/batman-adv/main.h b/net/batman-adv/main.h index 5d8fa0757947..4dfeae5e344a 100644 --- a/net/batman-adv/main.h +++ b/net/batman-adv/main.h @@ -41,13 +41,13 @@ * -> TODO: check influence on BATADV_TQ_LOCAL_WINDOW_SIZE */ #define BATADV_PURGE_TIMEOUT 200000 /* 200 seconds */ -#define BATADV_T...
676ce6d5ca3098339c028d44fe0427d1566a4d2d
Analyze and fix the following issue in the Linux kernel code: block: replace __getblk_slow misfix by grow_dev_page fix
Problem Details: Commit 91f68c89d8f3 ("block: fix infinite loop in __getblk_slow") is not good: a successful call to grow_buffers() cannot guarantee that the page won't be reclaimed before the immediate next call to __find_get_block(), which is why there was always a loop there. Yesterday I got "EXT4-fs error (device ...
```diff diff --git a/fs/buffer.c b/fs/buffer.c index 9f6d2e41281d..58e2e7b77372 100644 --- a/fs/buffer.c +++ b/fs/buffer.c @@ -914,7 +914,7 @@ link_dev_buffers(struct page *page, struct buffer_head *head) /* * Initialise the state of a blockdev page's buffers. */ -static void +static sector_t init_page_buffers(s...
5ee369138d28c17305e1cdc662a62a2fc83d80d7
Analyze and fix the following issue in the Linux kernel code: drm/i915: fix color order for BGR formats on IVB
Problem Details: This is already fixed for ILK and SNB in the below commit but somehow IVB is missed. commit ab2f9df10dd955f1fc0a8650e377588c98f1c029 Author: Jesse Barnes <jbarnes@virtuousgeek.org> Date: Mon Feb 27 12:40:10 2012 -0800 drm/i915: fix color order for BGR formats on SNB Had the wrong bits and field...
```diff diff --git a/drivers/gpu/drm/i915/intel_sprite.c b/drivers/gpu/drm/i915/intel_sprite.c index cc8df4de2d92..7644f31a3778 100644 --- a/drivers/gpu/drm/i915/intel_sprite.c +++ b/drivers/gpu/drm/i915/intel_sprite.c @@ -60,11 +60,11 @@ ivb_update_plane(struct drm_plane *plane, struct drm_framebuffer *fb, switch ...
b70ad586162609141f0aa9eb34790f31a8954f89
Analyze and fix the following issue in the Linux kernel code: drm/i915: fix wrong order of parameters in port checking functions
Problem Details: Wrong order of parameters passed-in when calling hdmi/adpa /lvds_pipe_enabled(), 2nd and 3rd parameters are reversed. This bug was indroduced by commit 1519b9956eb4b4180fa3f47c73341463cdcfaa37 Author: Keith Packard <keithp@keithp.com> Date: Sat Aug 6 10:35:34 2011 -0700 drm/i915: Fix PCH port ...
```diff diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index a69a3d0d3acf..2dfa6cf4886b 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -1384,7 +1384,7 @@ static void assert_pch_hdmi_disabled(struct drm_i915_private *dev_priv, ...
4e177260e547e438c78c60b6db6f755bb89e0596
Analyze and fix the following issue in the Linux kernel code: usb: renesas_usbhs: modify the irq handler for sharing irq
Problem Details: When IORESOURCE_IRQ_SHAREABLE is set, the irq handler may be called even if the interupt of the USB module doesn't happen. So, it may clear the interrupt flags by mistake. This patch fixes it. Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com...
```diff diff --git a/drivers/usb/renesas_usbhs/mod.c b/drivers/usb/renesas_usbhs/mod.c index 82a628f96c03..35c5208f3249 100644 --- a/drivers/usb/renesas_usbhs/mod.c +++ b/drivers/usb/renesas_usbhs/mod.c @@ -209,14 +209,18 @@ int usbhs_status_get_ctrl_stage(struct usbhs_irq_state *irq_state) return (int)irq_state->int...
974e9323deefbab923d7aa8f0e4bcf9066c2ec97
Analyze and fix the following issue in the Linux kernel code: usb: gadget: udc-core: Race between disconnect/unbind and setup
Problem Details: usb_gadget_remove_driver() runs through a four-step sequence to shut down the gadget driver. For the case of a composite gadget + at91 UDC, this would look like: udc->driver->disconnect(udc->gadget); // composite_disconnect() usb_gadget_disconnect(udc->gadget); // at91_pul...
```diff diff --git a/drivers/usb/gadget/udc-core.c b/drivers/usb/gadget/udc-core.c index e5e44f8cde9a..bae243c23141 100644 --- a/drivers/usb/gadget/udc-core.c +++ b/drivers/usb/gadget/udc-core.c @@ -262,8 +262,8 @@ static void usb_gadget_remove_driver(struct usb_udc *udc) kobject_uevent(&udc->dev.kobj, KOBJ_CHANGE); ...
2868fea2d615d9f445a0ccaf988e1418a9787ebe
Analyze and fix the following issue in the Linux kernel code: usb: gadget: s3c-hsotg: fix core reset timeout failure
Problem Details: The timeout values were 1000 and timeout issue occured many times on my s3c6410 Soc based board (mostly when booting whith USB cable not connected). This patch increase the values to 10000 to guarantee the success of reset. Having set timeout to 10000, I printed the remained timeout values which could...
```diff diff --git a/drivers/usb/gadget/s3c-hsotg.c b/drivers/usb/gadget/s3c-hsotg.c index b13e0bb5f5b8..a826cb98d306 100644 --- a/drivers/usb/gadget/s3c-hsotg.c +++ b/drivers/usb/gadget/s3c-hsotg.c @@ -2197,7 +2197,7 @@ static int s3c_hsotg_corereset(struct s3c_hsotg *hsotg) /* issue soft reset */ writel(GRSTCTL_C...
4fefe9f6de3d6e0b5e58b17cbab9c47c74f88cb6
Analyze and fix the following issue in the Linux kernel code: usb composite: fix locking in usb_function_activate
Problem Details: The lockdep hunter mentions a non consistent usage of spin_lock and spin_lock_irqsafe in the composite_disconnect and usb_function_activate function: [ 15.700897] ================================= [ 15.705255] [ INFO: inconsistent lock state ] [ 15.709617] 3.5.0-rc5+ #413 Not tainted [ 15.7134...
```diff diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c index 3f72110da1b0..2cb1030203b5 100644 --- a/drivers/usb/gadget/composite.c +++ b/drivers/usb/gadget/composite.c @@ -300,9 +300,10 @@ int usb_function_deactivate(struct usb_function *function) int usb_function_activate(struct usb_fun...
11c37c8b64b9d9d4ab19d387e6028eee3ec188d3
Analyze and fix the following issue in the Linux kernel code: usb: gadget: mv_udc: fix boot up hang
Problem Details: Fix boot up hang when enable udc without otg enabled. The root cause is that the clock will be shut down when probe routine is finished because of clock gating. When a gadget driver is registered at this time, it will call mv_udc_start which in turn will call mv_udc_vbus_session. If there is no cable a...
```diff diff --git a/drivers/usb/gadget/mv_udc_core.c b/drivers/usb/gadget/mv_udc_core.c index 58edff9abcef..ad91de4d60d8 100644 --- a/drivers/usb/gadget/mv_udc_core.c +++ b/drivers/usb/gadget/mv_udc_core.c @@ -1221,12 +1221,16 @@ static int mv_udc_vbus_session(struct usb_gadget *gadget, int is_active) udc_start(ud...
1dcaa252fdf01e4ba49ece156812043baf01c7cc
Analyze and fix the following issue in the Linux kernel code: usb: gadget: mv_udc: fix hang when shutdown
Problem Details: Fix system hang in udc shutdown routine which caused by accessing usb register when clock is disabled. So enable usb clock before access register. Signed-off-by: Yunfan Zhang <yfzhang@marvell.com> Signed-off-by: Neil Zhang <zhangwm@marvell.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
```diff diff --git a/drivers/usb/gadget/mv_udc_core.c b/drivers/usb/gadget/mv_udc_core.c index ff6154d1816e..58edff9abcef 100644 --- a/drivers/usb/gadget/mv_udc_core.c +++ b/drivers/usb/gadget/mv_udc_core.c @@ -2501,9 +2501,11 @@ static void mv_udc_shutdown(struct platform_device *dev) u32 mode; /* reset controll...
60326ce377090541db9ba1a05a041316ab5b46ec
Analyze and fix the following issue in the Linux kernel code: usb: gadget: mv_udc: add iso support
Problem Details: In order to support iso, we need do the following things: 1. fix length for one dtd 2. allow req contains multiple packets for a ISO transfer Signed-off-by: Chao Xie <chao.xie@marvell.com> Signed-off-by: Yu Xu <yuxu@marvell.com> Signed-off-by: Neil Zhang <zhangwm@marvell.com> Signed-off-by: Felipe Bal...
```diff diff --git a/drivers/usb/gadget/mv_udc_core.c b/drivers/usb/gadget/mv_udc_core.c index 4d3a4136b376..ff6154d1816e 100644 --- a/drivers/usb/gadget/mv_udc_core.c +++ b/drivers/usb/gadget/mv_udc_core.c @@ -355,17 +355,24 @@ done: return retval; } - static struct mv_dtd *build_dtd(struct mv_req *req, unsigned...
0fa7fa98dbcc2789409ed24e885485e645803d7f
Analyze and fix the following issue in the Linux kernel code: packet: Protect packet sk list with mutex (v2)
Problem Details: Change since v1: * Fixed inuse counters access spotted by Eric In patch eea68e2f (packet: Report socket mclist info via diag module) I've introduced a "scheduling in atomic" problem in packet diag module -- the socket list is traversed under rcu_read_lock() while performed under it sk mclist access r...
```diff diff --git a/include/net/netns/packet.h b/include/net/netns/packet.h index cb4e894c0f8d..4780b080a436 100644 --- a/include/net/netns/packet.h +++ b/include/net/netns/packet.h @@ -8,7 +8,7 @@ #include <linux/spinlock.h> struct netns_packet { - spinlock_t sklist_lock; + struct mutex sklist_lock; struct hl...
b87fb39e399137257a6db3224ea854117e9486e9
Analyze and fix the following issue in the Linux kernel code: ipv6: gre: fix ip6gre_err()
Problem Details: ip6gre_err() miscomputes grehlen (sizeof(ipv6h) is 4 or 8, not 40 as expected), and should take into account 'offset' parameter. Also uses pskb_may_pull() to cope with some fragged skbs Signed-off-by: Eric Dumazet <edumazet@google.com> Cc: Dmitry Kozlov <xeb@mail.ru> Signed-off-by: David S. Miller <d...
```diff diff --git a/net/ipv6/ip6_gre.c b/net/ipv6/ip6_gre.c index a84ad5dc4fcf..424d11a4e7ff 100644 --- a/net/ipv6/ip6_gre.c +++ b/net/ipv6/ip6_gre.c @@ -415,8 +415,8 @@ static void ip6gre_err(struct sk_buff *skb, struct inet6_skb_parm *opt, u8 type, u8 code, int offset, __be32 info) { const struct ipv6hdr *ipv6...
ef8531b64c3e2443da52e9f05d74a988230eedc5
Analyze and fix the following issue in the Linux kernel code: xfrm: fix RCU bugs
Problem Details: This patch reverts commit 56892261ed1a (xfrm: Use rcu_dereference_bh to deference pointer protected by rcu_read_lock_bh), and fixes bugs introduced in commit 418a99ac6ad ( Replace rwlock on xfrm_policy_afinfo with rcu ) 1) We properly use RCU variant in this file, not a mix of RCU/RCU_BH 2) We must d...
```diff diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c index 2ed698c190b5..741a32aa512e 100644 --- a/net/xfrm/xfrm_policy.c +++ b/net/xfrm/xfrm_policy.c @@ -48,8 +48,6 @@ static struct xfrm_policy_afinfo __rcu *xfrm_policy_afinfo[NPROTO] static struct kmem_cache *xfrm_dst_cache __read_mostly; -static...
c6b2744c5dd098e8bca2515e91219cf0206290c5
Analyze and fix the following issue in the Linux kernel code: charger-manager: Fix struct charger_desc's misleading comment
Problem Details: The comment says that charger_regulators is an array of regulator_bulk_data, which is not true, since it's actually a pointer to 'struct charger_regulator'. Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
```diff diff --git a/include/linux/power/charger-manager.h b/include/linux/power/charger-manager.h index 7d7b90fb7b4b..b542270affc1 100644 --- a/include/linux/power/charger-manager.h +++ b/include/linux/power/charger-manager.h @@ -148,7 +148,7 @@ struct charger_regulator { * Specify where information for existance of...
c084e092e47ca2435673702c6cf6e87a731ecc6f
Analyze and fix the following issue in the Linux kernel code: da9030_battery: Don't use 0 as NULL
Problem Details: Noticed the new warning: CHECK drivers/power/da9030_battery.c drivers/power/da9030_battery.c:190:68: warning: Using plain integer as NULL pointer This commit fixes the issue. Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
```diff diff --git a/drivers/power/da9030_battery.c b/drivers/power/da9030_battery.c index 3fd3e95d2b85..94762e67e22b 100644 --- a/drivers/power/da9030_battery.c +++ b/drivers/power/da9030_battery.c @@ -187,8 +187,8 @@ static const struct file_operations bat_debug_fops = { static struct dentry *da9030_bat_create_deb...
94b05cabc07d7ebb4f9d2f2dce6ab7db20f7fbac
Analyze and fix the following issue in the Linux kernel code: twl4030_charger: It would be better not to use the 0b-prefix
Problem Details: It would be better not to use the 0b-prefix for earlier versions of gcc-4.3. Signed-off-by: Il Han <corone.il.han@gmail.com> Acked-by: NeilBrown <neilb@suse.de> Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
```diff diff --git a/drivers/power/twl4030_charger.c b/drivers/power/twl4030_charger.c index 15f4d5d8611b..8d6bc6859a92 100644 --- a/drivers/power/twl4030_charger.c +++ b/drivers/power/twl4030_charger.c @@ -41,16 +41,16 @@ #define TWL4030_STS_VBUS BIT(7) #define TWL4030_STS_USB_ID BIT(2) #define TWL4030_BBCHEN BIT(...
4ac64d51265957f78770c112727e5cfbe615d279
Analyze and fix the following issue in the Linux kernel code: power_supply: Remove broken mark for da9052-battery
Problem Details: The fix for MFD part is already merged so we can remove the broken mark for da9052-battery. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
```diff diff --git a/drivers/power/Kconfig b/drivers/power/Kconfig index c1892f321c46..fcc1bb076217 100644 --- a/drivers/power/Kconfig +++ b/drivers/power/Kconfig @@ -167,7 +167,6 @@ config BATTERY_DA9030 config BATTERY_DA9052 tristate "Dialog DA9052 Battery" depends on PMIC_DA9052 - depends on BROKEN help S...
bc909f27f55ceb8f950ced5cf3a26d6b26e86ca6
Analyze and fix the following issue in the Linux kernel code: da9052-battery: Fix da9052_determine_vc_tbl_index's return value
Problem Details: The patch fixes the following warnings: CHECK drivers/power/da9052-battery.c drivers/power/da9052-battery.c:330:15: warning: symbol 'da9052_determine_vc_tbl_index' was not declared. Should it be static? CC drivers/power/da9052-battery.o drivers/power/da9052-battery.c: In function 'da9052_de...
```diff diff --git a/drivers/power/da9052-battery.c b/drivers/power/da9052-battery.c index a5f6a0ec1572..20b86ed946e3 100644 --- a/drivers/power/da9052-battery.c +++ b/drivers/power/da9052-battery.c @@ -327,7 +327,7 @@ static int da9052_bat_interpolate(int vbat_lower, int vbat_upper, return tmp; } -unsigned char ...
a6b9650108003e994770209fb8efedf6e214dcf7
Analyze and fix the following issue in the Linux kernel code: stmmac: fix a typo in the macro used to mask the mmc irq
Problem Details: This patch fixes the name of the macro used to mask the mmc interrupt: erroneously it was used: MMC_DEFAUL_MASK. Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/ethernet/stmicro/stmmac/mmc_core.c b/drivers/net/ethernet/stmicro/stmmac/mmc_core.c index c07cfe989f6e..0c74a702d461 100644 --- a/drivers/net/ethernet/stmicro/stmmac/mmc_core.c +++ b/drivers/net/ethernet/stmicro/stmmac/mmc_core.c @@ -33,7 +33,7 @@ #define MMC_TX_INTR 0x00000108 /* MMC...
5f42f7bc9638a0bc69dcb8b8b6da542b72113fc2
Analyze and fix the following issue in the Linux kernel code: stmmac: fix GMAC syn ID
Problem Details: Erroneously the DWMAC_CORE_3_40 was set to 34 instead of 0x34. This can generate problems when run on old chips because the driver assumes that there are the extra 16 regs available for perfect filtering. Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> Cc: Gianni Antoniazzi <gianni.antoniaz...
```diff diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac1000.h b/drivers/net/ethernet/stmicro/stmmac/dwmac1000.h index f90fcb5f9573..b4c44a587f02 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac1000.h +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac1000.h @@ -229,6 +229,6 @@ enum rtc_control { #define GMAC_...
f77609959ade7378eed8b03df4c248f6d44c7e15
Analyze and fix the following issue in the Linux kernel code: bq27x00_battery: Fix error return code
Problem Details: Initialize return variable before exiting on an error path. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> ( if@p1 (\(ret < 0\|ret != 0\)) { ... return ret; } | ret@p1 = 0 ) ... when != ret = e1 when != &ret *if(...) { ....
```diff diff --git a/drivers/power/bq27x00_battery.c b/drivers/power/bq27x00_battery.c index 181ddece5181..5860d4dfbe9c 100644 --- a/drivers/power/bq27x00_battery.c +++ b/drivers/power/bq27x00_battery.c @@ -814,7 +814,8 @@ static int bq27x00_battery_probe(struct i2c_client *client, di->bat.name = name; di->bus.read...
d2941651d754fa04eebd0bba70d558424d838565
Analyze and fix the following issue in the Linux kernel code: ab8500_fg: Fix error return code
Problem Details: Initialize return variable before exiting on an error path. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> ( if@p1 (\(ret < 0\|ret != 0\)) { ... return ret; } | ret@p1 = 0 ) ... when != ret = e1 when != &ret *if(...) { ....
```diff diff --git a/drivers/power/ab8500_fg.c b/drivers/power/ab8500_fg.c index bf022255994c..11633e327d38 100644 --- a/drivers/power/ab8500_fg.c +++ b/drivers/power/ab8500_fg.c @@ -2506,6 +2506,7 @@ static int __devinit ab8500_fg_probe(struct platform_device *pdev) di->fg_wq = create_singlethread_workqueue("ab8500_...
05cdbdb95f98fcd080e7494f7d0ca4886aed3c64
Analyze and fix the following issue in the Linux kernel code: ab8500_btemp: Fix error return code
Problem Details: Initialize return variable before exiting on an error path. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> ( if@p1 (\(ret < 0\|ret != 0\)) { ... return ret; } | ret@p1 = 0 ) ... when != ret = e1 when != &ret *if(...) { ....
```diff diff --git a/drivers/power/ab8500_btemp.c b/drivers/power/ab8500_btemp.c index bba3ccac72fe..2b76943ff9cf 100644 --- a/drivers/power/ab8500_btemp.c +++ b/drivers/power/ab8500_btemp.c @@ -1014,6 +1014,7 @@ static int __devinit ab8500_btemp_probe(struct platform_device *pdev) create_singlethread_workqueue("ab8...
588d4f0b05c9bb09c2474460be78f41813b2d861
Analyze and fix the following issue in the Linux kernel code: wm97xx_battery: Fix error return code
Problem Details: Initialize return variable before exiting on an error path. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> ( if@p1 (\(ret < 0\|ret != 0\)) { ... return ret; } | ret@p1 = 0 ) ... when != ret = e1 when != &ret *if(...) { ....
```diff diff --git a/drivers/power/wm97xx_battery.c b/drivers/power/wm97xx_battery.c index d2d4c08c681c..0ba331a06dcc 100644 --- a/drivers/power/wm97xx_battery.c +++ b/drivers/power/wm97xx_battery.c @@ -212,8 +212,10 @@ static int __devinit wm97xx_bat_probe(struct platform_device *dev) props++; /* POWER_SUPPLY_PROP_...
fc2bc0c29a4e32da13ab75101edde030a6362d10
Analyze and fix the following issue in the Linux kernel code: ab8500_charger: Fix error return code
Problem Details: Initialize return variable before exiting on an error path. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> ( if@p1 (\(ret < 0\|ret != 0\)) { ... return ret; } | ret@p1 = 0 ) ... when != ret = e1 when != &ret *if(...) { ....
```diff diff --git a/drivers/power/ab8500_charger.c b/drivers/power/ab8500_charger.c index d4f0c98428cb..c2ef94702e49 100644 --- a/drivers/power/ab8500_charger.c +++ b/drivers/power/ab8500_charger.c @@ -2614,6 +2614,7 @@ static int __devinit ab8500_charger_probe(struct platform_device *pdev) create_singlethread_work...
5834ec3aea8a84b70efeb52ee91a8f8b1042cd2a
Analyze and fix the following issue in the Linux kernel code: PM / Freezer: Fix small typo "regrigerator"
Problem Details: Noticed when digging into a suspend issue in linux-next (next-20120821). For more details see <http://marc.info/?t=134554708000002&r=1&w=2>. Signed-off-by: Sedat Dilek <sedat.dilek@gmail.com> Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
```diff diff --git a/kernel/power/process.c b/kernel/power/process.c index 19db29f67558..87da817f9e13 100644 --- a/kernel/power/process.c +++ b/kernel/power/process.c @@ -79,7 +79,7 @@ static int try_to_freeze_tasks(bool user_only) /* * We need to retry, but first give the freezing tasks some - * time to ent...
09c3f0d883300c8fc2bb62e9a70cf89a2ada9a80
Analyze and fix the following issue in the Linux kernel code: x86, microcode: Cleanup cpu hotplug notifier callback
Problem Details: Mask out CPU_TASKS_FROZEN bit so that all _FROZEN cases can be dropped. Also, add some more comments as to why CPU_ONLINE falls through to CPU_DOWN_FAILED (no break), and for the CPU_DEAD case. Realign debug printks better. Idea blatantly stolen from a tglx patch: http://marc.info/?l=linux-kernel&m=13...
```diff diff --git a/arch/x86/kernel/microcode_core.c b/arch/x86/kernel/microcode_core.c index 706a5c9b8eb2..dcde544e012c 100644 --- a/arch/x86/kernel/microcode_core.c +++ b/arch/x86/kernel/microcode_core.c @@ -470,34 +470,41 @@ mc_cpu_callback(struct notifier_block *nb, unsigned long action, void *hcpu) struct devic...
bb9d3e473d5b324907e15dff4e54410b28ea50e2
Analyze and fix the following issue in the Linux kernel code: x86, microcode: Drop uci->mc check on resume path
Problem Details: Remove the uci->mc check on the cpu resume path because the low-level drivers do that anyway. More importantly, though, this fixes a contrived and obscure but still important case. Imagine the following: * boot machine, no new microcode in /lib/firmware * a subset of the CPUs is offlined * in the m...
```diff diff --git a/arch/x86/kernel/microcode_core.c b/arch/x86/kernel/microcode_core.c index 63a956865022..706a5c9b8eb2 100644 --- a/arch/x86/kernel/microcode_core.c +++ b/arch/x86/kernel/microcode_core.c @@ -369,13 +369,10 @@ static void microcode_fini_cpu(int cpu) static enum ucode_state microcode_resume_cpu(int...
36bf50d7697be18c6bfd0401e037df10bff1e573
Analyze and fix the following issue in the Linux kernel code: x86, microcode, AMD: Fix broken ucode patch size check
Problem Details: This issue was recently observed on an AMD C-50 CPU where a patch of maximum size was applied. Commit be62adb49294 ("x86, microcode, AMD: Simplify ucode verification") added current_size in get_matching_microcode(). This is calculated as size of the ucode patch + 8 (ie. size of the header). Later this...
```diff diff --git a/arch/x86/kernel/microcode_amd.c b/arch/x86/kernel/microcode_amd.c index 8a2ce8fd41c0..82746f942cd8 100644 --- a/arch/x86/kernel/microcode_amd.c +++ b/arch/x86/kernel/microcode_amd.c @@ -143,11 +143,12 @@ static int get_matching_microcode(int cpu, const u8 *ucode_ptr, unsigned int *current_si...
c2c9c788b91218bccbb9ac31539ffa577fe502bf
Analyze and fix the following issue in the Linux kernel code: MIPS: lantiq: timer irq can be different to 7
Problem Details: The SVIP SoC has its timer IRQ on a different IRQ than 7. Fix up the irq code to be able to handle this. Signed-off-by: John Crispin <blogic@openwrt.org> Patchwork: http://patchwork.linux-mips.org/patch/4229/
```diff diff --git a/arch/mips/lantiq/irq.c b/arch/mips/lantiq/irq.c index a2699a70322b..0cec43dc3f60 100644 --- a/arch/mips/lantiq/irq.c +++ b/arch/mips/lantiq/irq.c @@ -84,6 +84,7 @@ static unsigned short ltq_eiu_irq[MAX_EIU] = { static int exin_avail; static void __iomem *ltq_icu_membase[MAX_IM]; static void __io...
5ad105e569c45dcfad50d724c61d5061248be755
Analyze and fix the following issue in the Linux kernel code: KVM: x86 emulator: use stack size attribute to mask rsp in stack ops
Problem Details: The sub-register used to access the stack (sp, esp, or rsp) is not determined by the address size attribute like other memory references, but by the stack segment's B bit (if not in x86_64 mode). Fix by using the existing stack_mask() to figure out the correct mask. This long-existing bug was exposed...
```diff diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index 97d9a9914ba8..a3b57a27be88 100644 --- a/arch/x86/kvm/emulate.c +++ b/arch/x86/kvm/emulate.c @@ -475,13 +475,26 @@ register_address(struct x86_emulate_ctxt *ctxt, unsigned long reg) return address_mask(ctxt, reg); } +static void masked_incre...
1c5992427b8c7d61052a3eaac05e98791c6163b7
Analyze and fix the following issue in the Linux kernel code: MIPS: Fix build error for non-malta VSMP kernel
Problem Details: VSMP kernel build for non-malta platforms fails with following error LD init/built-in.o LD .tmp_vmlinux1 arch/mips/built-in.o: In function `vsmp_init_secondary': smp-mt.c:(.cpuinit.text+0x23cc): undefined reference to `gic_present' smp-mt.c:(.cpuinit.text+0x23d0): undefined reference to ...
```diff diff --git a/arch/mips/kernel/smp-mt.c b/arch/mips/kernel/smp-mt.c index ff17868734cf..2defa2bbdaa7 100644 --- a/arch/mips/kernel/smp-mt.c +++ b/arch/mips/kernel/smp-mt.c @@ -150,6 +150,7 @@ static void vsmp_send_ipi_mask(const struct cpumask *mask, unsigned int action) static void __cpuinit vsmp_init_second...
f334ac8da82478b3f8c52e3c01849ad7fe509d5b
Analyze and fix the following issue in the Linux kernel code: tpm: Do not dereference NULL pointer if acpi_os_map_memory() fails.
Problem Details: In drivers/char/tpm/tpm_acpi.c::read_log() we call acpi_os_map_memory(). That call may fail for a number of reasons (invalid address, out of memory etc). If the call fails it returns NULL and we just pass that to memcpy() unconditionally, which will go bad when it tries to dereference the pointer. Unf...
```diff diff --git a/drivers/char/tpm/tpm_acpi.c b/drivers/char/tpm/tpm_acpi.c index a1bb5a182df9..fe3fa9431dc9 100644 --- a/drivers/char/tpm/tpm_acpi.c +++ b/drivers/char/tpm/tpm_acpi.c @@ -96,6 +96,11 @@ int read_log(struct tpm_bios_log *log) log->bios_event_log_end = log->bios_event_log + len; virt = acpi_os_m...
e1aa7c30c599e99b4544f9e5b4c275c8a5325bdc
Analyze and fix the following issue in the Linux kernel code: tools lib traceevent: Fix strerror_r() use in pevent_strerror
Problem Details: glibc-2.16 starts to mark the function with attribute warn_unused_result so that it can cause a build warning. Since GNU version of strerror_r() can return a pointer to a string without setting @buf, check the return value and copy/truncate it to our buffer if needed. Signed-off-by: Namhyung Kim <nam...
```diff diff --git a/tools/lib/traceevent/event-parse.c b/tools/lib/traceevent/event-parse.c index 1373e4cf109e..f978c59f67bf 100644 --- a/tools/lib/traceevent/event-parse.c +++ b/tools/lib/traceevent/event-parse.c @@ -4809,7 +4809,12 @@ int pevent_strerror(struct pevent *pevent, enum pevent_errno errnum, const char ...
f95e1028e3317a084af955aa0b1c25a6c9213869
Analyze and fix the following issue in the Linux kernel code: spi/mpc52xx: Fix device remove function
Problem Details: The call sequence spi_alloc_master/spi_register_master/spi_unregister_master is complete; it reduces the device reference count to zero, which results in device memory being freed. An extra call to spi_master_put is unnecessary and results in an access to free memory. At the same time, since the call ...
```diff diff --git a/drivers/spi/spi-mpc52xx.c b/drivers/spi/spi-mpc52xx.c index a749589677be..045410650212 100644 --- a/drivers/spi/spi-mpc52xx.c +++ b/drivers/spi/spi-mpc52xx.c @@ -529,7 +529,7 @@ static int __devinit mpc52xx_spi_probe(struct platform_device *op) static int __devexit mpc52xx_spi_remove(struct plat...
866c0f25d2dc896e647970cf5e371b5083a6e5d5
Analyze and fix the following issue in the Linux kernel code: spi/mpc52xx: Fix error handling in probe function
Problem Details: The call to spi_master_put() is needed to free device memory. It must be called after spi_alloc_master, and must only be called after the device memory is no longer used. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
```diff diff --git a/drivers/spi/spi-mpc52xx.c b/drivers/spi/spi-mpc52xx.c index cb3a3830b0a5..a749589677be 100644 --- a/drivers/spi/spi-mpc52xx.c +++ b/drivers/spi/spi-mpc52xx.c @@ -454,7 +454,7 @@ static int __devinit mpc52xx_spi_probe(struct platform_device *op) GFP_KERNEL); if (!ms->gpio_cs) { rc = -ENO...
495e3ff365425f9b69884ddde36047184f37c2bd
Analyze and fix the following issue in the Linux kernel code: spi/pl022: Fix device remove function
Problem Details: The call sequence spi_alloc_master/spi_register_master/spi_unregister_master is complete; it reduces the device reference count to zero, which results in device memory being freed. An extra call to spi_master_put is unnecessary and results in an access to free memory. Drop it. Signed-off-by: Guenter R...
```diff diff --git a/drivers/spi/spi-pl022.c b/drivers/spi/spi-pl022.c index aab518ec2bbc..47c6753fb31b 100644 --- a/drivers/spi/spi-pl022.c +++ b/drivers/spi/spi-pl022.c @@ -2171,7 +2171,6 @@ pl022_remove(struct amba_device *adev) amba_release_regions(adev); tasklet_disable(&pl022->pump_transfers); spi_unregiste...
ceaf5b5f03c8474064852dfa1a402905cf536fcf
Analyze and fix the following issue in the Linux kernel code: PCI: Fix drivers/pci/pci.c kernel-doc warnings
Problem Details: Fix kernel-doc warnings in drivers/pci/pci.c: Warning(drivers/pci/pci.c:1550): No description found for parameter 'pci_dev' Warning(drivers/pci/pci.c:1550): Excess function parameter 'dev' description in 'pci_wakeup' Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Bjorn Helgaas <bhe...
```diff diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index f3ea977a5b1b..7adc6608b291 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -1543,7 +1543,7 @@ void pci_pme_wakeup_bus(struct pci_bus *bus) /** * pci_wakeup - Wake up a PCI device - * @dev: Device to handle. + * @pci_dev: Device to handle. ...
b2af045c70aa60f7231b22a363d74a1ab5a6297b
Analyze and fix the following issue in the Linux kernel code: drivers/spi/spi-s3c24xx.c: fix error return code
Problem Details: Initialize return variable before exiting on an error path. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> ( if@p1 (\(ret < 0\|ret != 0\)) { ... return ret; } | ret@p1 = 0 ) ... when != ret = e1 when != &ret *if(...) { ....
```diff diff --git a/drivers/spi/spi-s3c24xx.c b/drivers/spi/spi-s3c24xx.c index 8ee7d790ce49..a2a080b7f42b 100644 --- a/drivers/spi/spi-s3c24xx.c +++ b/drivers/spi/spi-s3c24xx.c @@ -611,6 +611,7 @@ static int __devinit s3c24xx_spi_probe(struct platform_device *pdev) if (!pdata->set_cs) { if (pdata->pin_cs < 0) { ...
d45a3e00687bb52a20d9256d3d1068eea271013f
Analyze and fix the following issue in the Linux kernel code: perf tools: Fix 'No libunwind found' make warning message
Problem Details: Changing error message when libunwind support is not found to inform properly to install libunwind-dev[el] package. Reported-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Jiri Olsa <jolsa@redhat.com> Cc: Andi Kleen <andi@firstfloor.org> Cc: Ben Hutchings <ben@decadent.org.uk> Cc: Borislav Petkov <bor...
```diff diff --git a/tools/perf/Makefile b/tools/perf/Makefile index 6bd888d04b6e..722ddee61f9f 100644 --- a/tools/perf/Makefile +++ b/tools/perf/Makefile @@ -493,7 +493,7 @@ endif FLAGS_UNWIND=$(LIBUNWIND_CFLAGS) $(ALL_CFLAGS) $(LIBUNWIND_LDFLAGS) $(ALL_LDFLAGS) $(EXTLIBS) $(LIBUNWIND_LIBS) ifneq ($(call try-cc,$(...
dd7da132f7f04f34074efd134847a818ea29ddd7
Analyze and fix the following issue in the Linux kernel code: tpm: fix double write race and tpm_release free issue
Problem Details: Moved the atomic_set of the data_pending variable until after the tpm_read has completed processing. The existing code had a window of time where a second write to the driver could clobber the tpm command buffer. Also fixed an issue where if close was called on the tpm device before a read completed, ...
```diff diff --git a/drivers/char/tpm/tpm.c b/drivers/char/tpm/tpm.c index 36e43e50dcef..0a75638e3e56 100644 --- a/drivers/char/tpm/tpm.c +++ b/drivers/char/tpm/tpm.c @@ -1171,7 +1171,7 @@ int tpm_release(struct inode *inode, struct file *file) flush_work_sync(&chip->work); file->private_data = NULL; atomic_set(&...
aad628c1d91a6db57e572e4c1f35e863d81061d7
Analyze and fix the following issue in the Linux kernel code: char/tpm: Add new driver for Infineon I2C TIS TPM
Problem Details: This patch adds a driver to support Infineon's SLB 9635 TT 1.2 Soft I2C TPMs which follow the TGC TIS 1.2 TPM specification[1] and Infineon's I2C Protocol Stack Specification 0.20. The I2C Protocol Stack Specification is a simple adaption of the LPC TIS Protocol to the I2C Bus. The I2C TPMs can be used...
```diff diff --git a/drivers/char/tpm/Kconfig b/drivers/char/tpm/Kconfig index a048199ce866..c4aac486ade5 100644 --- a/drivers/char/tpm/Kconfig +++ b/drivers/char/tpm/Kconfig @@ -33,6 +33,17 @@ config TCG_TIS from within Linux. To compile this driver as a module, choose M here; the module will be called tpm_ti...
b4c145c1d245c2cc19754dbe4b718f5a48755993
Analyze and fix the following issue in the Linux kernel code: drm/i915: Find unclaimed MMIO writes.
Problem Details: ERR_INT on HSW will display unclaimed MMIO accesses. This can be either the result of a driver bug writing to an invalid addresses, or the result of RC6. Signed-off-by: Ben Widawsky <ben@bwidawsk.net> Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com> Tested-by: Paulo Zanoni <paulo.r.zanoni@intel.co...
```diff diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c index 7ebb13b65133..7f3863fb138c 100644 --- a/drivers/gpu/drm/i915/i915_drv.c +++ b/drivers/gpu/drm/i915/i915_drv.c @@ -1174,6 +1174,10 @@ void i915_write##x(struct drm_i915_private *dev_priv, u32 reg, u##x val) { \ if (unlikely(__...
44f46b4222a9ba5b21dcdf13f93dc53f48768d2b
Analyze and fix the following issue in the Linux kernel code: drm/i915: Cantiga+ cannot handle a hsync front porch of 0
Problem Details: This addresses WaPruneModeWithIncorrectHsyncOffset. Bugzilla: http://bugs.freedesktop.org/show_bug.cgi?id=50236 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
```diff diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 42c57581c53f..778cbb88bddc 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -3602,6 +3602,13 @@ static bool intel_crtc_mode_fixup(struct drm_crtc *crtc, if (!(adjusted_...
c45640d87b8272e85d19147dad914a6b82e51370
Analyze and fix the following issue in the Linux kernel code: UBIFS: print PID in debug messages
Problem Details: Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
```diff diff --git a/fs/ubifs/debug.h b/fs/ubifs/debug.h index 760de723dadb..46b8dd123585 100644 --- a/fs/ubifs/debug.h +++ b/fs/ubifs/debug.h @@ -165,12 +165,14 @@ struct ubifs_global_debug_info { } while (0) #define ubifs_dbg_msg(type, fmt, ...) \ - pr_debug("UBIFS DBG " type ": " fmt "\n", ##__VA_ARGS__) + pr_de...
69f9025894c391fec2f7c7ea9150203418454915
Analyze and fix the following issue in the Linux kernel code: UBIFS: fix error messages spelling
Problem Details: Corruptio -> corruption. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
```diff diff --git a/fs/ubifs/recovery.c b/fs/ubifs/recovery.c index c30d976b4be8..edeec499c048 100644 --- a/fs/ubifs/recovery.c +++ b/fs/ubifs/recovery.c @@ -788,7 +788,7 @@ struct ubifs_scan_leb *ubifs_recover_leb(struct ubifs_info *c, int lnum, corrupted_rescan: /* Re-scan the corrupted data with verbose messag...
55852635a8e2803cbc22d0e143d727813f0fcdb5
Analyze and fix the following issue in the Linux kernel code: fs: fix fs/namei.c kernel-doc warnings
Problem Details: Fix kernel-doc warnings in fs/namei.c: Warning(fs/namei.c:360): No description found for parameter 'inode' Warning(fs/namei.c:672): No description found for parameter 'nd' Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> Cc: Alexander Viro <viro@zeniv.linux.org.uk> Cc: linux-fsdevel@vger.kernel.org...
```diff diff --git a/fs/namei.c b/fs/namei.c index db76b866a097..dd1ed1b8e98e 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -352,6 +352,7 @@ int __inode_permission(struct inode *inode, int mask) /** * sb_permission - Check superblock-level permissions * @sb: Superblock of inode to check permission on + * @inode: Ino...
042b92c185cbd7b4291710255510ae76b2d7797b
Analyze and fix the following issue in the Linux kernel code: ALSA: hda - Do not set GPIOs for speakers on IDT if there are no speakers
Problem Details: This fixes an issue with a machine where there were no speakers, but GPIO0 had to be data=1 for the headphone to be functioning. I'm not sure if we need a more advanced patch to solve all possible cases, but if so, this patch would still provide a minor optimisation. BugLink: https://bugs.launchpad.n...
```diff diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index ea5775a1a7db..3edd73c3d361 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c @@ -4543,6 +4543,9 @@ static void stac92xx_line_out_detect(struct hda_codec *codec, struct auto_pin_cfg *cfg = &spec->a...
35f2d16bb9ace0fb2671b8232839944ad9057c6f
Analyze and fix the following issue in the Linux kernel code: KVM: MMU: Fix mmu_shrink() so that it can free mmu pages as intended
Problem Details: Although the possible race described in commit 85b7059169e128c57a3a8a3e588fb89cb2031da1 KVM: MMU: fix shrinking page from the empty mmu was correct, the real cause of that issue was a more trivial bug of mmu_shrink() introduced by commit 1952639665e92481c34c34c3e2a71bf3e66ba362 KVM: MMU: do ...
```diff diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index 01ca00423938..7fbd0d273ea8 100644 --- a/arch/x86/kvm/mmu.c +++ b/arch/x86/kvm/mmu.c @@ -4112,17 +4112,22 @@ static int mmu_shrink(struct shrinker *shrink, struct shrink_control *sc) int idx; LIST_HEAD(invalid_list); + /* + * Never scan more t...
a50d64d6590f470b712758598a077ef4fd0fc40a
Analyze and fix the following issue in the Linux kernel code: KVM: fix missing check for memslot flags
Problem Details: Check flags when memslot is registered from userspace as Avi's suggestion Signed-off-by: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com> Signed-off-by: Avi Kivity <avi@redhat.com>
```diff diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index a2e85af847c1..7b94d70a323f 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c @@ -678,6 +678,14 @@ void update_memslots(struct kvm_memslots *slots, struct kvm_memory_slot *new) slots->generation++; } +static int check_memory_region_flags(...
8e3d9d061b5d132217629e7b5635ff0c02488e65
Analyze and fix the following issue in the Linux kernel code: KVM: x86: fix possible infinite loop caused by reexecute_instruction
Problem Details: Currently, we reexecute all unhandleable instructions if they do not access on the mmio, however, it can not work if host map the readonly memory to guest. If the instruction try to write this kind of memory, it will fault again when guest retry it, then we will goto a infinite loop: retry instruction ...
```diff diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index fb0d93788bfb..704680d0fa3e 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -4473,6 +4473,7 @@ static int handle_emulation_failure(struct kvm_vcpu *vcpu) static bool reexecute_instruction(struct kvm_vcpu *vcpu, gva_t gva) { gpa_t gpa; + p...
cb09cad44f07044d9810f18f6f9a6a6f3771f979
Analyze and fix the following issue in the Linux kernel code: x86/alternatives: Fix p6 nops on non-modular kernels
Problem Details: Probably a leftover from the early days of self-patching, p6nops are marked __initconst_or_module, which causes them to be discarded in a non-modular kernel. If something later triggers patching, it will overwrite kernel code with garbage. Reported-by: Tomas Racek <tracek@redhat.com> Signed-off-by: A...
```diff diff --git a/arch/x86/kernel/alternative.c b/arch/x86/kernel/alternative.c index afb7ff79a29f..ced4534baed5 100644 --- a/arch/x86/kernel/alternative.c +++ b/arch/x86/kernel/alternative.c @@ -165,7 +165,7 @@ static const unsigned char * const k7_nops[ASM_NOP_MAX+2] = #endif #ifdef P6_NOP1 -static const unsig...
1922b0f2758badc0b971d1ebbd300bc6635a6aef
Analyze and fix the following issue in the Linux kernel code: mfd: Move tps65217 regulator plat data handling to regulator
Problem Details: Regulator platform data handling was mistakenly added to MFD driver. So we will see build errors if we compile MFD drivers without CONFIG_REGULATOR. This patch moves regulator platform data handling from TPS65217 MFD driver to regulator driver. This makes MFD driver independent of REGULATOR framework ...
```diff diff --git a/drivers/mfd/tps65217.c b/drivers/mfd/tps65217.c index 61c097a98f5d..3bc274409b58 100644 --- a/drivers/mfd/tps65217.c +++ b/drivers/mfd/tps65217.c @@ -24,11 +24,18 @@ #include <linux/slab.h> #include <linux/regmap.h> #include <linux/err.h> -#include <linux/regulator/of_regulator.h> +#include <lin...
aba4e6fff8de0c92e53f0e7ef077231e75f7d760
Analyze and fix the following issue in the Linux kernel code: mac80211: Fix AP mode regression
Problem Details: Commit mac80211: avoid using synchronize_rcu in ieee80211_set_probe_resp changed the return value when the probe response template is not present. Revert to the earlier value of 1 - this fixes AP mode for drivers like ath9k. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: Jo...
```diff diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index 69b322f6ca2e..929f897a8ded 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c @@ -740,7 +740,7 @@ static int ieee80211_set_probe_resp(struct ieee80211_sub_if_data *sdata, struct probe_resp *new, *old; if (!resp || !resp_len) - return -EINVA...
65b455b123c7e2b835a0b7148f9bae584f95000e
Analyze and fix the following issue in the Linux kernel code: UBIFS: fix complaints about too small debug buffer size
Problem Details: When debugging is enabled, we use a temporary on-stack buffer for formatting the key strings like "(11368871, direntry, 0xcd0750)". The buffer size is 32 bytes and sometimes it is not enough to fit the key string - e.g., when inode numbers are high. This is not fatal, but the key strings are incomplete...
```diff diff --git a/fs/ubifs/debug.h b/fs/ubifs/debug.h index 8b8cc4e945f4..760de723dadb 100644 --- a/fs/ubifs/debug.h +++ b/fs/ubifs/debug.h @@ -167,7 +167,7 @@ struct ubifs_global_debug_info { #define ubifs_dbg_msg(type, fmt, ...) \ pr_debug("UBIFS DBG " type ": " fmt "\n", ##__VA_ARGS__) -#define DBG_KEY_BUF_L...
817bb7fbfb0a1ad5f9d475cef0752d4ec5fdeac2
Analyze and fix the following issue in the Linux kernel code: mfd: Move tps65217 regulator plat data handling to regulator
Problem Details: Regulator platform data handling was mistakenly added to MFD driver. So we will see build errors if we compile MFD drivers without CONFIG_REGULATOR. This patch moves regulator platform data handling from TPS65217 MFD driver to regulator driver. This makes MFD driver independent of REGULATOR framework ...
```diff diff --git a/drivers/mfd/tps65217.c b/drivers/mfd/tps65217.c index 61c097a98f5d..3bc274409b58 100644 --- a/drivers/mfd/tps65217.c +++ b/drivers/mfd/tps65217.c @@ -24,11 +24,18 @@ #include <linux/slab.h> #include <linux/regmap.h> #include <linux/err.h> -#include <linux/regulator/of_regulator.h> +#include <lin...
195e672a76056478cc79f5c48343164c9237852e
Analyze and fix the following issue in the Linux kernel code: OMAPDSS: DPI: Remove cpu_is_xxxx checks
Problem Details: The OMAP3 checks have been removed and replaced by a dss feature FEAT_DPI_USES_VDDS_DSI for cleaner implementation. The patches "OMAP: DSS2: enable VDDS_DSI when using DPI" (8a2cfea8cc) by Tomi Valkeinen <tomi.valkeinen@nokia.com> and "ARM: omap: fix oops in drivers/video/omap2/dss/dpi.c" (4041071571) ...
```diff diff --git a/drivers/video/omap2/dss/dpi.c b/drivers/video/omap2/dss/dpi.c index f260343e2451..25fb8953b80a 100644 --- a/drivers/video/omap2/dss/dpi.c +++ b/drivers/video/omap2/dss/dpi.c @@ -34,6 +34,7 @@ #include <plat/cpu.h> #include "dss.h" +#include "dss_features.h" static struct { struct regulator...
ee223b703033ccfc2a47c3bb3e7352b4f5828fd2
Analyze and fix the following issue in the Linux kernel code: OMAPDSS: VENC: Remove cpu_is_xxxx checks
Problem Details: OMAP4 checks are removed from VENC to provide it a cleaner interface. These checks were introduced by patches "HACK: OMAP: DSS2: VENC: disable VENC on OMAP4 to prevent crash" (ba02fa37de) by Tomi Valkeinen <tomi.valkeinen@ti.com> and "OMAPDSS: VENC: fix NULL pointer dereference in DSS2 VENC sysfs debug...
```diff diff --git a/drivers/video/omap2/dss/venc.c b/drivers/video/omap2/dss/venc.c index 7d3eef8a010f..4a6caf9c6da3 100644 --- a/drivers/video/omap2/dss/venc.c +++ b/drivers/video/omap2/dss/venc.c @@ -674,11 +674,6 @@ static void venc_dump_regs(struct seq_file *s) { #define DUMPREG(r) seq_printf(s, "%-35s %08x\n", ...
6ea565a9be32a3c8d1092017686f183b6d8c4514
Analyze and fix the following issue in the Linux kernel code: time: Avoid potential shift overflow with large shift values
Problem Details: Andreas Schwab noticed that the 1 << tk->shift could overflow if the shift value was greater than 30, since 1 would be a 32bit long on 32bit architectures. This issue was introduced by 1e75fa8be (time: Condense timekeeper.xtime into xtime_sec) Use 1ULL instead to ensure we don't overflow on the shift....
```diff diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c index 1dbf80ec7696..a5a9389c4c30 100644 --- a/kernel/time/timekeeping.c +++ b/kernel/time/timekeeping.c @@ -1184,9 +1184,9 @@ static void update_wall_time(void) * the vsyscall implementations are converted to use xtime_nsec * (shifted nanose...
85dc8f05c93c8105987de9d7e7cebf15a72ff4ec
Analyze and fix the following issue in the Linux kernel code: time: Fix casting issue in timekeeping_forward_now
Problem Details: arch_gettimeoffset returns a u32 value which when shifted by tk->shift can overflow. This issue was introduced with 1e75fa8be (time: Condense timekeeper.xtime into xtime_sec) Cast it to u64 first. Signed-off-by: Andreas Schwab <schwab@linux-m68k.org> Signed-off-by: John Stultz <john.stultz@linaro.org...
```diff diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c index 258164ae45cc..1dbf80ec7696 100644 --- a/kernel/time/timekeeping.c +++ b/kernel/time/timekeeping.c @@ -277,7 +277,7 @@ static void timekeeping_forward_now(struct timekeeper *tk) tk->xtime_nsec += cycle_delta * tk->mult; /* If arch req...
784ffcbb96c3a97b4c64fd48b1dfe12ef3fcbcda
Analyze and fix the following issue in the Linux kernel code: time: Ensure we normalize the timekeeper in tk_xtime_add
Problem Details: Andreas noticed problems with resume on specific hardware after commit 1e75fa8b (time: Condense timekeeper.xtime into xtime_sec) combined with commit b44d50dca (time: Fix casting issue in tk_set_xtime and tk_xtime_add) After some digging I realized we aren't normalizing the timekeeper after the add. A...
```diff diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c index 898bef066a44..258164ae45cc 100644 --- a/kernel/time/timekeeping.c +++ b/kernel/time/timekeeping.c @@ -115,6 +115,7 @@ static void tk_xtime_add(struct timekeeper *tk, const struct timespec *ts) { tk->xtime_sec += ts->tv_sec; tk->xtime_...
0b3d9cfe7d6ac9cedd2ddbb6f3415980b3cfc36e
Analyze and fix the following issue in the Linux kernel code: OMAPDSS: HDMI: fix initial HDMI enable
Problem Details: Commit 7849398fa28c21dad24292b838b059a862f99f16 introduced a bug, causing the following error to be reported: [ 370.827819] cannot lock PLL [ 370.830749] CFG1 0x1e [ 370.833160] CFG2 0x602004 [ 370.835876] CFG4 0x40000 [ 370.838562] omapdss HDMI: Failed to lock PLL However, HDMI output is still ...
```diff diff --git a/drivers/video/omap2/dss/hdmi_panel.c b/drivers/video/omap2/dss/hdmi_panel.c index 2feb2cdfb60f..69fb115bab32 100644 --- a/drivers/video/omap2/dss/hdmi_panel.c +++ b/drivers/video/omap2/dss/hdmi_panel.c @@ -67,6 +67,8 @@ static int hdmi_panel_probe(struct omap_dss_device *dssdev) dssdev->panel.ti...
83be4ffa1acbcd529b771f4d2e639b15e2b7957e
Analyze and fix the following issue in the Linux kernel code: x86/spinlocks: Fix comment in spinlock.h
Problem Details: This comment is no longer true. We support up to 2^16 CPUs because __ticket_t is an u16 if NR_CPUS is larger than 256. Signed-off-by: Richard Weinberger <richard@nod.at> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Ingo Molnar <mingo@kernel.org>
```diff diff --git a/arch/x86/include/asm/spinlock.h b/arch/x86/include/asm/spinlock.h index b315a33867f2..33692eaabab5 100644 --- a/arch/x86/include/asm/spinlock.h +++ b/arch/x86/include/asm/spinlock.h @@ -12,8 +12,7 @@ * Simple spin lock operations. There are two variants, one clears IRQ's * on the local process...
27f011243a6e4e8b81078df1d83608dae31e3d38
Analyze and fix the following issue in the Linux kernel code: mac80211: fix DS to MBSS address translation
Problem Details: The destination address of unicast frames forwarded through a mesh gate was being replaced with the broadcast address. Instead leave the original destination address as the mesh DA. If the nexthop address is not in the mpath table it will be resolved. If that fails, the frame will be forwarded to known...
```diff diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index acf712ffb5e6..c5e8c9c31f76 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c @@ -1811,37 +1811,31 @@ netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb, meshhdrlen = ieee80211_new_mesh_header(&mesh_hdr, sdata, NULL, NULL); } else...
d3a8009b1731abb7026a840d1c2701f877f9429f
Analyze and fix the following issue in the Linux kernel code: x86/irq/i8259: Fix incorrect comment
Problem Details: Signed-off-by: Yuanhan Liu <yliu.null@gmail.com> Signed-off-by: Ingo Molnar <mingo@kernel.org>
```diff diff --git a/arch/x86/kernel/i8259.c b/arch/x86/kernel/i8259.c index 36d1853e91af..9a5c460404dc 100644 --- a/arch/x86/kernel/i8259.c +++ b/arch/x86/kernel/i8259.c @@ -263,7 +263,7 @@ static void i8259A_shutdown(void) * out of. */ outb(0xff, PIC_MASTER_IMR); /* mask all of 8259A-1 */ - outb(0xff, PIC_SLA...
14216561e164671ce147458653b1fea06a4ada1e
Analyze and fix the following issue in the Linux kernel code: [SCSI] Fix 'Device not ready' issue on mpt2sas
Problem Details: This is a particularly nasty SCSI ATA Translation Layer (SATL) problem. SAT-2 says (section 8.12.2) if the device is in the stopped state as the result of processing a START STOP UNIT command (see 9.11), then the SATL shall terminate the TEST UNIT READY command with CHECK COND...
```diff diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c index 4a6381c87253..de2337f255a7 100644 --- a/drivers/scsi/scsi_error.c +++ b/drivers/scsi/scsi_error.c @@ -42,6 +42,8 @@ #include <trace/events/scsi.h> +static void scsi_eh_done(struct scsi_cmnd *scmd); + #define SENSE_TIMEOUT (10*HZ) ...
27c419739b67decced4650440829b8d51bef954b
Analyze and fix the following issue in the Linux kernel code: [SCSI] scsi_lib: fix scsi_io_completion's SG_IO error propagation
Problem Details: The following v3.4-rc1 commit unmasked an existing bug in scsi_io_completion's SG_IO error handling: 47ac56d [SCSI] scsi_error: classify some ILLEGAL_REQUEST sense as a permanent TARGET_ERROR Given that certain ILLEGAL_REQUEST are now properly categorized as TARGET_ERROR the host_byte is being set (be...
```diff diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index ffd77739ae3e..faa790fba134 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c @@ -776,7 +776,6 @@ void scsi_io_completion(struct scsi_cmnd *cmd, unsigned int good_bytes) } if (req->cmd_type == REQ_TYPE_BLOCK_PC) { /* SG_I...
338b131a3269881c7431234855c93c219b0979b6
Analyze and fix the following issue in the Linux kernel code: [SCSI] mpt2sas: Fix for Driver oops, when loading driver with max_queue_depth command line option to a very small value
Problem Details: If the specified max_queue_depth setting is less than the expected number of internal commands, then driver will calculate the queue depth size to a negitive number. This negitive number is actually a very large number because variable is unsigned 16bit integer. So, the driver will ask for a very large...
```diff diff --git a/drivers/scsi/mpt2sas/mpt2sas_base.c b/drivers/scsi/mpt2sas/mpt2sas_base.c index 9d46fcbe7755..b25757d1e91b 100644 --- a/drivers/scsi/mpt2sas/mpt2sas_base.c +++ b/drivers/scsi/mpt2sas/mpt2sas_base.c @@ -2424,10 +2424,13 @@ _base_allocate_memory_pools(struct MPT2SAS_ADAPTER *ioc, int sleep_flag) }...
54ce165ebd9d9494b64149e0d1ab4ddbf5ea908b
Analyze and fix the following issue in the Linux kernel code: Input: uinput - fix formatting
Problem Details: Reformat the code to keep it within 80 columns. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
```diff diff --git a/drivers/input/misc/uinput.c b/drivers/input/misc/uinput.c index b247e1c8e8f6..86328e9c9848 100644 --- a/drivers/input/misc/uinput.c +++ b/drivers/input/misc/uinput.c @@ -40,7 +40,8 @@ #include <linux/input/mt.h> #include "../input-compat.h" -static int uinput_dev_event(struct input_dev *dev, un...
22ae19c6e3c22b390952e90f452f26adad9b8687
Analyze and fix the following issue in the Linux kernel code: Input: uinput - fix race that can block nonblocking read
Problem Details: Consider two threads calling read() on the same uinput-fd, both non-blocking. Assume there is data-available so both will simultaneously pass: udev->head == udev->tail Then the first thread goes to sleep and the second one pops the message from the queue. Now assume udev->head == udev->tail. If the f...
```diff diff --git a/drivers/input/misc/uinput.c b/drivers/input/misc/uinput.c index e74ed9cc6371..1719554fe194 100644 --- a/drivers/input/misc/uinput.c +++ b/drivers/input/misc/uinput.c @@ -439,6 +439,9 @@ static ssize_t uinput_write(struct file *file, const char __user *buffer, size_t struct uinput_device *udev = f...
41091ad0b8f843d36390058362c8f3c52a26a333
Analyze and fix the following issue in the Linux kernel code: Input: random formatting fixes
Problem Details: Fixes for some coding style issues reported by scripts/checkpatch.pl utility. Signed-off-by: Baodong Chen <chenbdchenbd@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
```diff diff --git a/drivers/input/apm-power.c b/drivers/input/apm-power.c index e90ee3d30613..650177a3c858 100644 --- a/drivers/input/apm-power.c +++ b/drivers/input/apm-power.c @@ -33,7 +33,7 @@ static void system_power_event(unsigned int keycode) } static void apmpower_event(struct input_handle *handle, unsigned...
219edc71784ff8a3537ffbe64baded61ce4048b9
Analyze and fix the following issue in the Linux kernel code: Input: gpio_keys - clean up device tree parser
Problem Details: - fix sizeof in memset; - clean up dt properties extraction; - use for_each_chil_of_node macro; - use of_get_child_count(); - use of_match_ptr macro. Signed-off-by: Alexandre Pereira da Silva <aletes.xgr@gmail.com> Acked-by: Rob Herring <rob.herring@calxeda.com> [Fabio Estevam <fabio.estevam@freescale...
```diff diff --git a/drivers/input/keyboard/gpio_keys.c b/drivers/input/keyboard/gpio_keys.c index cbb1add43d5e..b890231debd8 100644 --- a/drivers/input/keyboard/gpio_keys.c +++ b/drivers/input/keyboard/gpio_keys.c @@ -43,11 +43,9 @@ struct gpio_button_data { }; struct gpio_keys_drvdata { + const struct gpio_keys_p...
7b125b94ca16b7e618c6241cb02c4c8060cea5e3
Analyze and fix the following issue in the Linux kernel code: Input: i8042 - add Gigabyte T1005 series netbooks to noloop table
Problem Details: They all define their chassis type as "Other" and therefore are not categorized as "laptops" by the driver, which tries to perform AUX IRQ delivery test which fails and causes touchpad not working. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=42620 Cc: stable@kernel.org Signed-off-by: Dmitry ...
```diff diff --git a/drivers/input/serio/i8042-x86ia64io.h b/drivers/input/serio/i8042-x86ia64io.h index 5ec774d6c82b..6918773ce024 100644 --- a/drivers/input/serio/i8042-x86ia64io.h +++ b/drivers/input/serio/i8042-x86ia64io.h @@ -176,6 +176,20 @@ static const struct dmi_system_id __initconst i8042_dmi_noloop_table[] =...
f35dd69ba341bda3790713b9e964483934b995e1
Analyze and fix the following issue in the Linux kernel code: Input: imx_keypad - reset the hardware before enabling
Problem Details: Ensure the hardware is correctly initialized before requesting the interrupt, otherwise if a key was already touched since power-on the kernel enters an interrupt loop. To fix this issue we clear pending interrupt sources. We also have to make sure clk is enabled while changing the keypad registers. S...
```diff diff --git a/drivers/input/keyboard/imx_keypad.c b/drivers/input/keyboard/imx_keypad.c index ff4c0a87a25f..ce68e361558c 100644 --- a/drivers/input/keyboard/imx_keypad.c +++ b/drivers/input/keyboard/imx_keypad.c @@ -358,6 +358,7 @@ static void imx_keypad_inhibit(struct imx_keypad *keypad) /* Inhibit KDI and KR...
a1d0fa776870aeda5eb91b131d0f1aede6d94ef1
Analyze and fix the following issue in the Linux kernel code: Input: edt-ft5x06 - fix build error when compiling wthout CONFIG_DEBUG_FS
Problem Details: This fixes the following breakage: edt-ft5x06.c: In function edt_ft5x06_ts_remove: edt-ft5x06.c:846:14: error: struct edt_ft5x06_ts_data has no member named raw_buffer Signed-off-by: Guenter Roeck <linux@roeck-us.net> Acked-by: Simon Budig <simon.budig@kernelconcepts.de> Signed-off-by: Dmitry Torokho...
```diff diff --git a/drivers/input/touchscreen/edt-ft5x06.c b/drivers/input/touchscreen/edt-ft5x06.c index 9afc777a40a7..b06a5e3a665e 100644 --- a/drivers/input/touchscreen/edt-ft5x06.c +++ b/drivers/input/touchscreen/edt-ft5x06.c @@ -602,6 +602,7 @@ edt_ft5x06_ts_teardown_debugfs(struct edt_ft5x06_ts_data *tsdata) { ...
983d7beb7de4ba7c715ea62e982c9fe54fa554a1
Analyze and fix the following issue in the Linux kernel code: drivers/dma/amba-pl08x.c: fix error return code
Problem Details: Convert a 0 error return code to a negative one, as returned elsewhere in the function. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ identifier ret; expression e,e1,e2,e3,e4,x; @@ ( if (\(ret != 0\|ret < 0\) || ...) { ......
```diff diff --git a/drivers/dma/amba-pl08x.c b/drivers/dma/amba-pl08x.c index 6fbeebb9486f..d1cc5791476b 100644 --- a/drivers/dma/amba-pl08x.c +++ b/drivers/dma/amba-pl08x.c @@ -1892,6 +1892,7 @@ static int pl08x_probe(struct amba_device *adev, const struct amba_id *id) pl08x->pd = dev_get_platdata(&adev->dev); if...
d8636a2717bb3da2a7ce2154bf08de90bb8c87b0
Analyze and fix the following issue in the Linux kernel code: fbcon: fix race condition between console lock and cursor timer (v1.1)
Problem Details: So we've had a fair few reports of fbcon handover breakage between efi/vesafb and i915 surface recently, so I dedicated a couple of days to finding the problem. Essentially the last thing we saw was the conflicting framebuffer message and that was all. So after much tracing with direct netconsole wri...
```diff diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c index 2e471c22abf5..88e92041d8f0 100644 --- a/drivers/video/console/fbcon.c +++ b/drivers/video/console/fbcon.c @@ -372,8 +372,15 @@ static void fb_flashcursor(struct work_struct *work) struct vc_data *vc = NULL; int c; int mode; +...
94d3901c11ab4115740ec3891d07f086f18c8cd6
Analyze and fix the following issue in the Linux kernel code: drivers/dma/sirf-dma.c: fix usage of devm functions
Problem Details: Fix some problems with the use of devm_ functions. devm_kzalloc: devm_kfree is not needed devm_ioremap: iounmap should not be used, no free is needed devm_request_irq: the devm_free_irq is followed by irq_dispose_mapping. I don't know if it is safe to move the freeing of the irq in this case, so I ...
```diff diff --git a/drivers/dma/sirf-dma.c b/drivers/dma/sirf-dma.c index 434ad31174f2..1af9e4804a2c 100644 --- a/drivers/dma/sirf-dma.c +++ b/drivers/dma/sirf-dma.c @@ -570,21 +570,19 @@ static int __devinit sirfsoc_dma_probe(struct platform_device *op) if (of_property_read_u32(dn, "cell-index", &id)) { dev_er...
9a9a9a7adafe62a34de8b4fb48936c1c5f9bafa5
Analyze and fix the following issue in the Linux kernel code: rapidio/tsi721: fix unused variable compiler warning
Problem Details: Fix unused variable compiler warning when built with CONFIG_RAPIDIO_DEBUG option off. This patch is applicable to kernel versions starting from v3.2 Signed-off-by: Alexandre Bounine <alexandre.bounine@idt.com> Cc: Matt Porter <mporter@kernel.crashing.org> Cc: <stable@vger.kernel.org> Signed-off-by: A...
```diff diff --git a/drivers/rapidio/devices/tsi721.c b/drivers/rapidio/devices/tsi721.c index c0d6a049cbd6..5d44252b7342 100644 --- a/drivers/rapidio/devices/tsi721.c +++ b/drivers/rapidio/devices/tsi721.c @@ -2219,7 +2219,7 @@ static int __devinit tsi721_probe(struct pci_dev *pdev, const struct pci_device_id *...
3670e7e12e582c6d67761275d148171feb7a9004
Analyze and fix the following issue in the Linux kernel code: rapidio/tsi721: fix inbound doorbell interrupt handling
Problem Details: Make sure that there is no doorbell messages left behind due to disabled interrupts during inbound doorbell processing. The most common case for this bug is loss of rionet JOIN messages in systems with three or more rionet participants and MSI or MSI-X enabled. As result, requests for packet transfers...
```diff diff --git a/drivers/rapidio/devices/tsi721.c b/drivers/rapidio/devices/tsi721.c index 722246cf20ab..c0d6a049cbd6 100644 --- a/drivers/rapidio/devices/tsi721.c +++ b/drivers/rapidio/devices/tsi721.c @@ -435,6 +435,9 @@ static void tsi721_db_dpc(struct work_struct *work) " info %4.4x\n", DBELL_SID(idb.bytes...
7dbfb315b2aaef0a115765946bf3026d074c33a7
Analyze and fix the following issue in the Linux kernel code: drivers/rtc/rtc-rs5c348.c: fix hour decoding in 12-hour mode
Problem Details: Correct the offset by subtracting 20 from tm_hour before taking the modulo 12. [ "Why 20?" I hear you ask. Or at least I did. Here's the reason why: RS5C348_BIT_PM is 32, and is - stupidly - included in the RS5C348_HOURS_MASK define. So it's really subtracting out that bit to get "hour+12". B...
```diff diff --git a/drivers/rtc/rtc-rs5c348.c b/drivers/rtc/rtc-rs5c348.c index 77074ccd2850..fd5c7af04ae5 100644 --- a/drivers/rtc/rtc-rs5c348.c +++ b/drivers/rtc/rtc-rs5c348.c @@ -122,9 +122,12 @@ rs5c348_rtc_read_time(struct device *dev, struct rtc_time *tm) tm->tm_min = bcd2bin(rxbuf[RS5C348_REG_MINS] & RS5C348_...
b121186ab1b12e2a96a945d88eae0735b4542158
Analyze and fix the following issue in the Linux kernel code: mm: correct page->pfmemalloc to fix deactivate_slab regression
Problem Details: Commit cfd19c5a9ecf ("mm: only set page->pfmemalloc when ALLOC_NO_WATERMARKS was used") tried to narrow down page->pfmemalloc setting, but it missed some places the pfmemalloc should be set. So, in __slab_alloc, the unalignment pfmemalloc and ALLOC_NO_WATERMARKS cause incorrect deactivate_slab() on ou...
```diff diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 009ac285fea7..07f19248acb5 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -1928,6 +1928,17 @@ this_zone_full: zlc_active = 0; goto zonelist_scan; } + + if (page) + /* + * page->pfmemalloc is set when ALLOC_NO_WATERMARKS was + * necessary t...
5ed12f12825c6c0451d703bfe918a7fc190e2738
Analyze and fix the following issue in the Linux kernel code: drivers/rtc/rtc-pcf2123.c: initialize dynamic sysfs attributes
Problem Details: Dynamically allocated sysfs attributes must be initialized using sysfs_attr_init(), otherwise lockdep complains: BUG: key <address> not in .data! Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Ilya Shchepetkov <shchepetkov@ispras.ru> Cc: Chris Verges <chrisv@cyberswitch...
```diff diff --git a/drivers/rtc/rtc-pcf2123.c b/drivers/rtc/rtc-pcf2123.c index 836118795c0b..13e4df63974f 100644 --- a/drivers/rtc/rtc-pcf2123.c +++ b/drivers/rtc/rtc-pcf2123.c @@ -43,6 +43,7 @@ #include <linux/rtc.h> #include <linux/spi/spi.h> #include <linux/module.h> +#include <linux/sysfs.h> #define DRV_VER...
c81758fbe0fdbbc0c74b37798f55bd9c91d5c068
Analyze and fix the following issue in the Linux kernel code: mm/compaction.c: fix deferring compaction mistake
Problem Details: Commit aff622495c9a ("vmscan: only defer compaction for failed order and higher") fixed bad deferring policy but made mistake about checking compact_order_failed in __compact_pgdat(). So it can't update compact_order_failed with the new order. This ends up preventing correct operation of policy defer...
```diff diff --git a/mm/compaction.c b/mm/compaction.c index e78cb9688421..b6984e234fdf 100644 --- a/mm/compaction.c +++ b/mm/compaction.c @@ -861,7 +861,7 @@ static int __compact_pgdat(pg_data_t *pgdat, struct compact_control *cc) if (cc->order > 0) { int ok = zone_watermark_ok(zone, cc->order, low_wmark...
7838f994b4fceff24c343f4e26a6cf4393869579
Analyze and fix the following issue in the Linux kernel code: drivers/misc/sgi-xp/xpc_uv.c: SGI XPC fails to load when cpu 0 is out of IRQ resources
Problem Details: On many of our larger systems, CPU 0 has had all of its IRQ resources consumed before XPC loads. Worst cases on machines with multiple 10 GigE cards and multiple IB cards have depleted the entire first socket of IRQs. This patch makes selecting the node upon which IRQs are allocated (as well as all t...
```diff diff --git a/drivers/misc/sgi-xp/xpc_uv.c b/drivers/misc/sgi-xp/xpc_uv.c index 87b251ab6ec5..b9e2000969f0 100644 --- a/drivers/misc/sgi-xp/xpc_uv.c +++ b/drivers/misc/sgi-xp/xpc_uv.c @@ -18,6 +18,8 @@ #include <linux/interrupt.h> #include <linux/delay.h> #include <linux/device.h> +#include <linux/cpu.h> +#in...
c3a5ce0416b6c172a23bc8a3760d8704d3d1535b
Analyze and fix the following issue in the Linux kernel code: string: do not export memweight() to userspace
Problem Details: Fix the following warning: usr/include/linux/string.h:8: userspace cannot reference function or variable defined in the kernel Signed-off-by: WANG Cong <xiyou.wangcong@gmail.com> Acked-by: Akinobu Mita <akinobu.mita@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: ...
```diff diff --git a/include/linux/string.h b/include/linux/string.h index ffe0442e18d2..b9178812d9df 100644 --- a/include/linux/string.h +++ b/include/linux/string.h @@ -144,8 +144,8 @@ static inline bool strstarts(const char *str, const char *prefix) { return strncmp(str, prefix, strlen(prefix)) == 0; } -#endif ...
eb48c071464757414538c68a6033c8f8c15196f8
Analyze and fix the following issue in the Linux kernel code: mm: hugetlbfs: correctly populate shared pmd
Problem Details: Each page mapped in a process's address space must be correctly accounted for in _mapcount. Normally the rules for this are straightforward but hugetlbfs page table sharing is different. The page table pages at the PMD level are reference counted while the mapcount remains the same. If this accounti...
```diff diff --git a/arch/x86/mm/hugetlbpage.c b/arch/x86/mm/hugetlbpage.c index f6679a7fb8ca..b91e48512425 100644 --- a/arch/x86/mm/hugetlbpage.c +++ b/arch/x86/mm/hugetlbpage.c @@ -56,9 +56,16 @@ static int vma_shareable(struct vm_area_struct *vma, unsigned long addr) } /* - * search for a shareable pmd page for ...
b0cf0b118c90477d1a6811f2cd2307f6a5578362
Analyze and fix the following issue in the Linux kernel code: cciss: fix incorrect scsi status reporting
Problem Details: Delete code which sets SCSI status incorrectly as it's already been set correctly above this incorrect code. The bug was introduced in 2009 by commit b0e15f6db111 ("cciss: fix typo that causes scsi status to be lost.") Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Reported-by: Roel ...
```diff diff --git a/drivers/block/cciss_scsi.c b/drivers/block/cciss_scsi.c index acda773b3720..38aa6dda6b81 100644 --- a/drivers/block/cciss_scsi.c +++ b/drivers/block/cciss_scsi.c @@ -763,16 +763,7 @@ static void complete_scsi_command(CommandList_struct *c, int timeout, { case CMD_TARGET_STATUS: /* Pass ...
f9aed62a2b12a8e04077737c9942111e14ed738e
Analyze and fix the following issue in the Linux kernel code: mm: change nr_ptes BUG_ON to WARN_ON
Problem Details: Occasionally an isolated BUG_ON(mm->nr_ptes) gets reported, indicating that not all the page tables allocated could be found and freed when exit_mmap() tore down the user address space. There's usually nothing we can say about it, beyond that it's probably a sign of some bad memory or memory corruptio...
```diff diff --git a/mm/mmap.c b/mm/mmap.c index e3e86914f11a..9adee9fc0d8a 100644 --- a/mm/mmap.c +++ b/mm/mmap.c @@ -2309,7 +2309,7 @@ void exit_mmap(struct mm_struct *mm) } vm_unacct_memory(nr_accounted); - BUG_ON(mm->nr_ptes > (FIRST_USER_ADDRESS+PMD_SIZE-1)>>PMD_SHIFT); + WARN_ON(mm->nr_ptes > (FIRST_USER_AD...
3d8387efe1ad9eb5bfe8a2e58cdbd1b88b247eef
Analyze and fix the following issue in the Linux kernel code: PCI/PM: Fix config reg access for D3cold and bridge suspending
Problem Details: This patch fixes the following bug: http://marc.info/?l=linux-pci&m=134338059022620&w=2 Where lspci does not work properly if a device and the corresponding parent bridge (such as PCIe port) is suspended. This is because the device configuration space registers will be not accessible if the correspo...
```diff diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c index 6869009c7393..02d107b15281 100644 --- a/drivers/pci/pci-sysfs.c +++ b/drivers/pci/pci-sysfs.c @@ -458,6 +458,40 @@ boot_vga_show(struct device *dev, struct device_attribute *attr, char *buf) } struct device_attribute vga_attr = __ATTR_RO(boo...