id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
773ddbd228dc16a4829836e1dc16383e44c8575e
Analyze and fix the following issue in the Linux kernel code: [media] saa7164: fix endian conversion in saa7164_bus_set()
Problem Details: The msg->command field is 32 bits, and we should fill it with a call to cpu_to_le32(). The current code is broke on big endian systems. On little endian systems it truncates the 32 bit value to 16 bits which probably still works fine. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Cc: Steven...
```diff diff --git a/drivers/media/video/saa7164/saa7164-bus.c b/drivers/media/video/saa7164/saa7164-bus.c index 466e1b02f91f..a7f58a998752 100644 --- a/drivers/media/video/saa7164/saa7164-bus.c +++ b/drivers/media/video/saa7164/saa7164-bus.c @@ -149,7 +149,7 @@ int saa7164_bus_set(struct saa7164_dev *dev, struct tmCom...
7c08be84f83b23762fb7571ac9a4aea3c34d1a66
Analyze and fix the following issue in the Linux kernel code: ASoC: Fix an obvious copy paste error in an error message
Problem Details: The message was obviously copied from soc_init_codec_debugfs() Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
```diff diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index ebb104878c48..1252ab1ebf69 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -412,7 +412,7 @@ static void soc_init_card_debugfs(struct snd_soc_card *card) snd_soc_debugfs_root); if (!card->debugfs_card_root) { dev_warn...
49df78074963c97e25debc3c67b72f059111607d
Analyze and fix the following issue in the Linux kernel code: mmc: core: Fix deadlock when the CONFIG_MMC_UNSAFE_RESUME is not defined
Problem Details: mmc_suspend_host() tries to claim host during suspend and release it only when the bus suspend operation is compeleted. If CONFIG_MMC_UNSAFE_RESUME is defined and the host is flagged as removable, mmc_suspend_host() tries to remove the card. In this process, the file system sync can get blocked trying ...
```diff diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index 271efeac860b..950b97d7412a 100644 --- a/drivers/mmc/core/core.c +++ b/drivers/mmc/core/core.c @@ -2333,6 +2333,8 @@ int mmc_suspend_host(struct mmc_host *host) mmc_poweroff_notify(host); err = host->bus_ops->suspend(host); } + ...
f6b8b52c68f6109db4be02b55660258ff503fc3b
Analyze and fix the following issue in the Linux kernel code: mmc: tmio: fix clock gating on platforms with a .set_pwr() method
Problem Details: Do not power down the card in .set_ios(), unless MMC_POWER_OFF is requested. This fixes the SDHI functionality on ecovec. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Chris Ball <cjb@laptop.org>
```diff diff --git a/drivers/mmc/host/tmio_mmc_pio.c b/drivers/mmc/host/tmio_mmc_pio.c index d85a60cda167..4208b3958069 100644 --- a/drivers/mmc/host/tmio_mmc_pio.c +++ b/drivers/mmc/host/tmio_mmc_pio.c @@ -798,7 +798,7 @@ static void tmio_mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) /* start bus clock */ ...
f6bc41fb08cbd6943df358437e0af90c91a3caa3
Analyze and fix the following issue in the Linux kernel code: mmc: sh_mmcif: fix clock gating on platforms with a .down_pwr() method
Problem Details: Do not power down the card in .set_ios(), unless MMC_POWER_OFF is requested. This fixes the MMCIF interface functionality on ecovec boards. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Chris Ball <cjb@laptop.org>
```diff diff --git a/drivers/mmc/host/sh_mmcif.c b/drivers/mmc/host/sh_mmcif.c index 369366c8e205..d5505f3fe2a1 100644 --- a/drivers/mmc/host/sh_mmcif.c +++ b/drivers/mmc/host/sh_mmcif.c @@ -908,7 +908,7 @@ static void sh_mmcif_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) if (host->power) { pm_runtime_put(...
c99872a16fa7642987f30c750dc166674b0d8060
Analyze and fix the following issue in the Linux kernel code: mmc: core: Fix typo at mmc_card_sleep
Problem Details: Fix wrong bus_ops->sleep check. (This isn't expected to have real-world consequences, because the mmc core always defines both 'awake' and 'sleep' ops.) Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Chris Ball <cjb@laptop.org>
```diff diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index 7ee2e07f36f4..271efeac860b 100644 --- a/drivers/mmc/core/core.c +++ b/drivers/mmc/core/core.c @@ -2218,7 +2218,7 @@ int mmc_card_sleep(struct mmc_host *host) mmc_bus_get(host); - if (host->bus_ops && !host->bus_dead && host->bus_ops->awa...
a80f16276388a177199204aa5b60f328d4464110
Analyze and fix the following issue in the Linux kernel code: mmc: core: Fix power_off_notify during suspend
Problem Details: The eMMC 4.5 devices respond to only RESET and AWAKE command in the sleep state. Hence the mmc switch command to notify power off state should be sent before the device enters sleep state. This patch fixes the same. Signed-off-by: Girish K S <girish.shivananjappa@linaro.org> Signed-off-by: Chris Ball...
```diff diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index 74a012ad2bab..7ee2e07f36f4 100644 --- a/drivers/mmc/core/core.c +++ b/drivers/mmc/core/core.c @@ -1225,6 +1225,46 @@ void mmc_set_driver_type(struct mmc_host *host, unsigned int drv_type) mmc_host_clk_release(host); } +static void mmc_pow...
96a85d548bf960ec8e8a0c3bca2b2e88e41549db
Analyze and fix the following issue in the Linux kernel code: mmc: core: Fix setting power notify state variable for non-eMMC
Problem Details: This patch skips the setting of the power notify state variable for non eMMC 4.5 devices. Also fixes the problem of omap_hsmmc noisy/broken for suspend resume reported by Kevin Hilman. Signed-off-by: Girish K S <girish.shivananjappa@linaro.org> Acked-by: Ulf Hansson <ulf.hansson@stericsson.com> Signed...
```diff diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c index dbf421a6279c..90de9ba36d2f 100644 --- a/drivers/mmc/core/mmc.c +++ b/drivers/mmc/core/mmc.c @@ -883,10 +883,14 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr, card->ext_csd.generic_cmd6_time); if (err && err != -EBADMSG) ...
7833c66b2d764a3c883c2f5cc60cd8a6266dae15
Analyze and fix the following issue in the Linux kernel code: mmc: Add module.h include to sdhci-cns3xxx.c
Problem Details: Fixes: drivers/mmc/host/sdhci-cns3xxx.c:110: error: 'THIS_MODULE' undeclared here (not in a function) Reported-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Chris Ball <cjb@laptop.org>
```diff diff --git a/drivers/mmc/host/sdhci-cns3xxx.c b/drivers/mmc/host/sdhci-cns3xxx.c index 4b920b7621cf..87b6f079b6e0 100644 --- a/drivers/mmc/host/sdhci-cns3xxx.c +++ b/drivers/mmc/host/sdhci-cns3xxx.c @@ -15,6 +15,7 @@ #include <linux/delay.h> #include <linux/device.h> #include <linux/mmc/host.h> +#include <li...
e58f516ff4730c4047c3f104b061f7a03e9a263c
Analyze and fix the following issue in the Linux kernel code: mmc: mxcmmc: fix falling back to PIO
Problem Details: When we can't configure the dma channel we want to fall back to PIO. We do this by setting host->do_dma to zero. This does not work as do_dma is used to see whether dma can be used for the current transfer. Instead, we have to set host->dma to NULL. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>...
```diff diff --git a/drivers/mmc/host/mxcmmc.c b/drivers/mmc/host/mxcmmc.c index 325ea61e12d3..8e0fbe994047 100644 --- a/drivers/mmc/host/mxcmmc.c +++ b/drivers/mmc/host/mxcmmc.c @@ -732,6 +732,7 @@ static void mxcmci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) "failed to config DMA channel. Falling back to...
37d5993c5cc9bc83762ae1b5bd287438022e8afe
Analyze and fix the following issue in the Linux kernel code: ASoC: Fix WM8996 24.576MHz clock operation
Problem Details: Record the clock after the divider as that is what all SYSCLK users see. Without this the other clock configuration in the device comes out at half rate. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@kernel.org
```diff diff --git a/sound/soc/codecs/wm8996.c b/sound/soc/codecs/wm8996.c index 645c980d6b80..a33b04d17195 100644 --- a/sound/soc/codecs/wm8996.c +++ b/sound/soc/codecs/wm8996.c @@ -1968,6 +1968,7 @@ static int wm8996_set_sysclk(struct snd_soc_dai *dai, break; case 24576000: ratediv = WM8996_SYSCLK_DIV; + wm8...
9d7a51d509a8b28fc1217fe11842fb8bbc184c44
Analyze and fix the following issue in the Linux kernel code: m68k: Initconst section fixes
Problem Details: Signed-off-by: Andi Kleen <ak@linux.intel.com> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
```diff diff --git a/arch/m68k/emu/nfeth.c b/arch/m68k/emu/nfeth.c index c5748bb4ea71..a985a7e87d45 100644 --- a/arch/m68k/emu/nfeth.c +++ b/arch/m68k/emu/nfeth.c @@ -39,7 +39,7 @@ enum { #define MAX_UNIT 8 /* These identify the driver base version and may not be removed. */ -static const char version[] __devinitda...
aa8a9fbe18bbbcf25bf5e3c7155e886057dcf171
Analyze and fix the following issue in the Linux kernel code: mac_scsi: fix mac_scsi on some powerbooks
Problem Details: Fix the mac_scsi interrupt edge trigger on non-RBV PowerBooks. This doesn't appear to help my PowerBook 520 but the NetBSD source reveals that the PowerBook 500 series is different than the others. Signed-off-by: Finn Thain <fthain@telegraphics.com.au> Signed-off-by: Geert Uytterhoeven <geert@linux-m6...
```diff diff --git a/arch/m68k/mac/via.c b/arch/m68k/mac/via.c index 97996a48b048..7a2993bb092d 100644 --- a/arch/m68k/mac/via.c +++ b/arch/m68k/mac/via.c @@ -253,22 +253,28 @@ void __init via_init(void) via2[vACR] &= ~0x03; /* disable port A & B latches */ } + /* Everything below this point is VIA2 only... */ +...
4107c459fe4075c5a2d552fd8d9d5fea10c1ff93
Analyze and fix the following issue in the Linux kernel code: m68k/mac: fix powerbook 150 adb_type
Problem Details: The PowerBook 150 is a actually a Duo underneath. Fix the adb_type. Signed-off-by: Finn Thain <fthain@telegraphics.com.au> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
```diff diff --git a/arch/m68k/mac/config.c b/arch/m68k/mac/config.c index 101a8b7e2d52..b20b1318462c 100644 --- a/arch/m68k/mac/config.c +++ b/arch/m68k/mac/config.c @@ -674,7 +674,7 @@ static struct mac_model mac_data_table[] = { }, { .ident = MAC_MODEL_PB150, .name = "PowerBook 150", - .adb_type = MAC_ADB...
feb11e8a5617cd337d8a83fd9cde38dba8ef050f
Analyze and fix the following issue in the Linux kernel code: m68k/mac: fix baboon irq disable and shutdown
Problem Details: The baboon_disabled hack is broken because it is missing an irq shutdown method. So releasing a Baboon irq kills the other Baboon irqs. But we don't really need this hack because we don't have media bay support and TREX uses a NuBus IRQ. Remove it. Signed-off-by: Finn Thain <fthain@telegraphics.com.au...
```diff diff --git a/arch/m68k/mac/baboon.c b/arch/m68k/mac/baboon.c index 74999685ddad..3fe0e43d44f6 100644 --- a/arch/m68k/mac/baboon.c +++ b/arch/m68k/mac/baboon.c @@ -18,7 +18,6 @@ int baboon_present; static volatile struct baboon *baboon; -static unsigned char baboon_disabled; #if 0 extern int macide_ack_i...
da3fb3c9aaa357421ade92910303af82340c2ff5
Analyze and fix the following issue in the Linux kernel code: m68k/mac: oss irq fixes
Problem Details: The IOP driver calls into the OSS driver to enable its IRQ. This undesirable coupling between drivers only exists because the OSS driver doesn't correctly handle all of its machspec IRQs. Fix OSS handling of enable/disable for VIA1 IRQs (8 thru 15) which includes MAC_IRQ_ADB. Back when I implemented ...
```diff diff --git a/arch/m68k/include/asm/mac_oss.h b/arch/m68k/include/asm/mac_oss.h index 3f04a66f0933..425fbff4f4d8 100644 --- a/arch/m68k/include/asm/mac_oss.h +++ b/arch/m68k/include/asm/mac_oss.h @@ -58,25 +58,6 @@ #define OSS_POWEROFF 0x80 -/* - * OSS Interrupt levels for various sub-systems - * - * This m...
c4af5da7f24ff1bf60db2d6ff3e9d9bd912ca47a
Analyze and fix the following issue in the Linux kernel code: m68k/mac: fix nubus slot irq disable and shutdown
Problem Details: Improve NuBus slot interrupt handling code and documentation. This patch fixes the NuBus NIC (mac8390) in my Quadra 700. Signed-off-by: Finn Thain <fthain@telegraphics.com.au> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
```diff diff --git a/arch/m68k/include/asm/mac_via.h b/arch/m68k/include/asm/mac_via.h index 53e831c4097e..aeeedf8b2d25 100644 --- a/arch/m68k/include/asm/mac_via.h +++ b/arch/m68k/include/asm/mac_via.h @@ -257,6 +257,8 @@ extern int rbv_present,via_alt_mapping; extern void via_register_interrupts(void); extern void ...
93edd023a7de1ea4fe6e5de631982b96156eef03
Analyze and fix the following issue in the Linux kernel code: m68k/mac: early console
Problem Details: Revive the old mac_serial_print() routine as mac_early_print(). mac_serial_print() did not function because it did not use the right offsets for its stack arguments. Fix this and make compilation conditional on CONFIG_EARLY_PRINTK instead of the obscure MAC_SERIAL_DEBUG macro. Give mac_early_print() a...
```diff diff --git a/arch/m68k/Kconfig.debug b/arch/m68k/Kconfig.debug index 8702dc65f7f2..a0c8863bd08b 100644 --- a/arch/m68k/Kconfig.debug +++ b/arch/m68k/Kconfig.debug @@ -4,7 +4,7 @@ source "lib/Kconfig.debug" config EARLY_PRINTK bool "Early printk" if EMBEDDED - depends on MVME16x + depends on MVME16x || MAC ...
86e62ad6b2a49064a078d7f22fa81afdaecc1187
Analyze and fix the following issue in the Linux kernel code: udp_diag: Fix the !ipv6 case
Problem Details: Wrap the udp6 lookup into the proper ifdef-s. Signed-off-by: Pavel Emelyanov <xemul@parallels.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/ipv4/udp_diag.c b/net/ipv4/udp_diag.c index 65063444a119..27910c133019 100644 --- a/net/ipv4/udp_diag.c +++ b/net/ipv4/udp_diag.c @@ -41,6 +41,7 @@ static int udp_dump_one(struct udp_table *tbl, struct sk_buff *in_skb, req->id.idiag_src[0], req->id.idiag_sport, req->id.idiag_dst[0], r...
b872a2371ffd13e6d83423ef621a707df4c158ac
Analyze and fix the following issue in the Linux kernel code: udp_diag: Make it module when ipv6 is a module
Problem Details: Eric Dumazet reported, that when inet_diag is built-in the udp_diag also goes built-in and when ipv6 is a module the udp6 lookup symbol is not found. LD .tmp_vmlinux1 net/built-in.o: In function `udp_dump_one': udp_diag.c:(.text+0xa2b40): undefined reference to `__udp6_lib_lookup' make: *** [.t...
```diff diff --git a/net/ipv4/Kconfig b/net/ipv4/Kconfig index a51e33e64552..1a8f93bd2d4f 100644 --- a/net/ipv4/Kconfig +++ b/net/ipv4/Kconfig @@ -411,7 +411,7 @@ config INET_TCP_DIAG config INET_UDP_DIAG depends on INET_DIAG - def_tristate INET_DIAG + def_tristate INET_DIAG && IPV6 menuconfig TCP_CONG_ADVANCED...
2f637ee42d4a60e1c3823beff3699354bd4400be
Analyze and fix the following issue in the Linux kernel code: staging: line6: fix playback urb transfer buffer calculation
Problem Details: The playback urb transfer buffer calculation does not factor in LINE6_ISO_PACKETS. Buffer memory is organized like this in the driver: Buffer 0 Buffer 1 ... [Packet 0, Packet 1, ...][Packet 0, Packet 1, ...][Packet 0, ...] However, we're lucky that LINE6_ISO_PACKE...
```diff diff --git a/drivers/staging/line6/playback.c b/drivers/staging/line6/playback.c index ed1b9bd93ff8..b17c0a7708dd 100644 --- a/drivers/staging/line6/playback.c +++ b/drivers/staging/line6/playback.c @@ -192,7 +192,7 @@ static int submit_audio_out_urb(struct snd_line6_pcm *line6pcm) urb_frames = urb_size / byt...
60c01a977814788178362ff0e1a22dfbf106eede
Analyze and fix the following issue in the Linux kernel code: staging: line6: fix memory leak in .hw_params()
Problem Details: The .hw_params() pcm callback can be invoked multiple times in a row. Ensure that the URB data buffer is only allocated once. Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Markus Grabner <grabner@icg.tugraz.at> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/line6/capture.c b/drivers/staging/line6/capture.c index ba441ed1a876..8f59ff3e7a17 100644 --- a/drivers/staging/line6/capture.c +++ b/drivers/staging/line6/capture.c @@ -316,8 +316,11 @@ static int snd_line6_capture_hw_params(struct snd_pcm_substream *substream, } /* -- [FD] end...
9deaa53ac7fa373623123aa4f18828dd62292b1a
Analyze and fix the following issue in the Linux kernel code: serial: add irq handler for Freescale 16550 errata.
Problem Details: Sending a break on the SOC UARTs found in some MPC83xx/85xx/86xx chips seems to cause a short lived IRQ storm (/proc/interrupts typically shows somewhere between 300 and 1500 events). Unfortunately this renders SysRQ over the serial console completely inoperable. The suggested workaround in the errat...
```diff diff --git a/arch/powerpc/kernel/legacy_serial.c b/arch/powerpc/kernel/legacy_serial.c index c7b5afeecaf2..3fea3689527e 100644 --- a/arch/powerpc/kernel/legacy_serial.c +++ b/arch/powerpc/kernel/legacy_serial.c @@ -441,6 +441,9 @@ static void __init fixup_port_irq(int index, return; port->irq = virq; + +...
3986fb2ba67bb30cac18b0cff48c88d69ad37681
Analyze and fix the following issue in the Linux kernel code: serial: export the key functions for an 8250 IRQ handler
Problem Details: For drivers that need to construct their own IRQ handler, the three components are seen in the current handle_port -- i.e. Rx, Tx and modem_status. Make these exported symbols so that "almost" 8250 UARTs can construct their own IRQ handler with these shared components, while working around their own u...
```diff diff --git a/drivers/tty/serial/8250.c b/drivers/tty/serial/8250.c index 5274228fa03c..9c0396fa3915 100644 --- a/drivers/tty/serial/8250.c +++ b/drivers/tty/serial/8250.c @@ -1300,8 +1300,6 @@ static void serial8250_stop_tx(struct uart_port *port) } } -static void transmit_chars(struct uart_8250_port *up);...
850624c15da4651f4c6b821723419d8777659577
Analyze and fix the following issue in the Linux kernel code: serial: move struct uart_8250_port from 8250.c to 8250.h
Problem Details: Since we want to promote sharing and move away from one single uart driver with a bunch of platform specific bugfixes all munged into one, relocate some header like material from the C file to the header. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Acked-by: Alan Cox <alan@linux.intel...
```diff diff --git a/drivers/tty/serial/8250.c b/drivers/tty/serial/8250.c index 580d12c898cf..c58e9e286bff 100644 --- a/drivers/tty/serial/8250.c +++ b/drivers/tty/serial/8250.c @@ -129,32 +129,6 @@ static unsigned long probe_rsa[PORT_RSA_MAX]; static unsigned int probe_rsa_count; #endif /* CONFIG_SERIAL_8250_RSA *...
bbd20759d157e6ecbe2e64e2d9d2505b504bb6b9
Analyze and fix the following issue in the Linux kernel code: drivers/tty: Remove unneeded spaces
Problem Details: coding style fixes in n_tty.c Signed-off-by: Maximilian Krger <maxfragg@gmail.com> Signed-off-by: Thorsten Wimann <re06huxa@cip.cs.fau.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/tty/n_tty.c b/drivers/tty/n_tty.c index 39d6ab6551e0..d2256d08ee7e 100644 --- a/drivers/tty/n_tty.c +++ b/drivers/tty/n_tty.c @@ -61,7 +61,7 @@ * controlling the space in the read buffer. */ #define TTY_THRESHOLD_THROTTLE 128 /* now based on remaining room */ -#define TTY_THRESHOLD_UN...
ee815f3a76a0d874bd29635366af572fb6ebe535
Analyze and fix the following issue in the Linux kernel code: msm_serial_hs: Fix spinlock recursion in handling CTS
Problem Details: msm_hs_handle_delta_cts tries to acquire port->lock already acquired by the callee function msm_hs_isr. Change function name to follow "_locked" convention. Signed-off-by: Mayank Rana <mrana@codeaurora.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/tty/serial/msm_serial_hs.c b/drivers/tty/serial/msm_serial_hs.c index 9f67b62cb77d..5e85e1e14c44 100644 --- a/drivers/tty/serial/msm_serial_hs.c +++ b/drivers/tty/serial/msm_serial_hs.c @@ -1087,12 +1087,10 @@ static void msm_hs_config_port(struct uart_port *uport, int cfg_flags) } /* ...
8431de80dad20979cc8354a90f70e2faac017932
Analyze and fix the following issue in the Linux kernel code: msm_serial_hs: Fix type inconsistency for tx and rx command_ptr_ptr
Problem Details: Both tx and rx command_ptr_ptr are of type u32*. While allocating memory for it, sizeof(u32 *) is used as part of kmalloc API instead of sizeof(u32). ADM Hardare requires size of command_ptr_ptr as 1 Word. Both sizeof(u32 *) and sizeof(u32) are same on 32-bit architecture whereas sizeof(u32 *) would be...
```diff diff --git a/drivers/tty/serial/msm_serial_hs.c b/drivers/tty/serial/msm_serial_hs.c index 60c6eb850265..9f67b62cb77d 100644 --- a/drivers/tty/serial/msm_serial_hs.c +++ b/drivers/tty/serial/msm_serial_hs.c @@ -422,9 +422,9 @@ static int __devexit msm_hs_remove(struct platform_device *pdev) msm_uport->...
7f97c000e87751fdca69d14cba2bbba795c1a972
Analyze and fix the following issue in the Linux kernel code: serial: fix serial_cs I/O windows for Argosy RS-COM 2P
Problem Details: Current serial_cs driver has a problem when trying to detect whether a card has multiple ports: serial_config() calls pcmcia_loop_config() which iterates over card CIS configurations by calling serial_check_for_multi() for each of them. This function wants to check (and select) a configuration that ha...
```diff diff --git a/drivers/tty/serial/serial_cs.c b/drivers/tty/serial/serial_cs.c index eef736ff810a..86090605a84e 100644 --- a/drivers/tty/serial/serial_cs.c +++ b/drivers/tty/serial/serial_cs.c @@ -317,7 +317,7 @@ static int serial_probe(struct pcmcia_device *link) info->p_dev = link; link->priv = info; - li...
6d3e32e63f1fb47b3ba104d13dfac116df7b2bbb
Analyze and fix the following issue in the Linux kernel code: x86, efi: Make efi_call_phys_{prelog,epilog} CONFIG_RELOCATABLE-aware
Problem Details: efi_call_phys_prelog() sets up a 1:1 mapping of the physical address range in swapper_pg_dir. Instead of replacing then restoring entries in swapper_pg_dir we should be using initial_page_table which already contains the 1:1 mapping. It's safe to blindly switch back to swapper_pg_dir in the epilog bec...
```diff diff --git a/arch/x86/platform/efi/efi_32.c b/arch/x86/platform/efi/efi_32.c index e36bf714cb77..40e446941dd7 100644 --- a/arch/x86/platform/efi/efi_32.c +++ b/arch/x86/platform/efi/efi_32.c @@ -39,43 +39,14 @@ */ static unsigned long efi_rt_eflags; -static pgd_t efi_bak_pg_dir_pointer[2]; void efi_call...
1d06825b0ede541f63b5577435abd2fc649a9b5e
Analyze and fix the following issue in the Linux kernel code: net/hyperv: Fix the stop/wake queue mechanism
Problem Details: The ring buffer is only used to pass meta data for outbound packets. The actual payload is accessed by DMA from the host. So the stop/wake queue mechanism based on counting and comparing number of pages sent v.s. number of pages in the ring buffer is wrong. Also, there is a race condition in the stop/w...
```diff diff --git a/drivers/net/hyperv/netvsc.c b/drivers/net/hyperv/netvsc.c index 4a807e44ec60..b6ac152a9bd0 100644 --- a/drivers/net/hyperv/netvsc.c +++ b/drivers/net/hyperv/netvsc.c @@ -435,6 +435,9 @@ static void netvsc_send_completion(struct hv_device *device, nvsc_packet->completion.send.send_completion_ctx...
d2554f50df9be3c53a13f7541a5f4d054bd56cc3
Analyze and fix the following issue in the Linux kernel code: firmware: google: fix gsmi.c build warning
Problem Details: Use min_t() macro instead of min() to fix a build warning: CC drivers/firmware/google/gsmi.o drivers/firmware/google/gsmi.c: In function ‘gsmi_get_variable’: drivers/firmware/google/gsmi.c:348: warning: comparison of distinct pointer types lacks a cast Signed-off-by: Maxin B. John <maxin.john@...
```diff diff --git a/drivers/firmware/google/gsmi.c b/drivers/firmware/google/gsmi.c index c4e7c59d1c63..91ddf0f7a1b9 100644 --- a/drivers/firmware/google/gsmi.c +++ b/drivers/firmware/google/gsmi.c @@ -345,7 +345,8 @@ static efi_status_t gsmi_get_variable(efi_char16_t *name, memcpy(&param, gsmi_dev.param_buf->start...
35657c4d72925936c7219cc5caac118ca632acc2
Analyze and fix the following issue in the Linux kernel code: USB: pxa168: Fix compilation error
Problem Details: After commit c430131a02d677aa708f56342c1565edfdacb3c0 (Support controllers with big endian capability regs), HC_LENGTH takes two arguments. This patch fixes following compilation error: In file included from drivers/usb/host/ehci-hcd.c:1323: drivers/usb/host/ehci-pxa168.c:302:54: error: macro "HC_LENG...
```diff diff --git a/drivers/usb/host/ehci-pxa168.c b/drivers/usb/host/ehci-pxa168.c index ac0c16e8f539..8d0e7a22e711 100644 --- a/drivers/usb/host/ehci-pxa168.c +++ b/drivers/usb/host/ehci-pxa168.c @@ -299,7 +299,7 @@ static int __devinit ehci_pxa168_drv_probe(struct platform_device *pdev) ehci = hcd_to_ehci(hcd); ...
a451eaf9c57feaacfd76226a06bd57c4b66a6ab3
Analyze and fix the following issue in the Linux kernel code: uwb: Use kcalloc instead of kzalloc to allocate array
Problem Details: The advantage of kcalloc is, that will prevent integer overflows which could result from the multiplication of number of elements and size and it is also a bit nicer to read. The semantic patch that makes this change is available in https://lkml.org/lkml/2011/11/25/107 Signed-off-by: Thomas Meyer <th...
```diff diff --git a/drivers/uwb/est.c b/drivers/uwb/est.c index de81ebf51784..86ed7e61e597 100644 --- a/drivers/uwb/est.c +++ b/drivers/uwb/est.c @@ -184,7 +184,7 @@ int uwb_est_create(void) uwb_est_size = 2; uwb_est_used = 0; - uwb_est = kzalloc(uwb_est_size * sizeof(uwb_est[0]), GFP_KERNEL); + uwb_est = kcallo...
d5ca9db8f1dff76ef0021ed8c22c1e8fb20b4e49
Analyze and fix the following issue in the Linux kernel code: USB: wusb: Use kcalloc instead of kzalloc to allocate array
Problem Details: The advantage of kcalloc is, that will prevent integer overflows which could result from the multiplication of number of elements and size and it is also a bit nicer to read. The semantic patch that makes this change is available in https://lkml.org/lkml/2011/11/25/107 Signed-off-by: Thomas Meyer <th...
```diff diff --git a/drivers/usb/wusbcore/security.c b/drivers/usb/wusbcore/security.c index 371f61733f05..fa810a83e830 100644 --- a/drivers/usb/wusbcore/security.c +++ b/drivers/usb/wusbcore/security.c @@ -354,7 +354,7 @@ int wusb_dev_4way_handshake(struct wusbhc *wusbhc, struct wusb_dev *wusb_dev, struct wusb_keydv...
87763842b7014a7c6d9e992785e4c711c0085974
Analyze and fix the following issue in the Linux kernel code: usb: gadget: renesas_usbhs: Use kcalloc instead of kzalloc to allocate array
Problem Details: The advantage of kcalloc is, that will prevent integer overflows which could result from the multiplication of number of elements and size and it is also a bit nicer to read. The semantic patch that makes this change is available in https://lkml.org/lkml/2011/11/25/107 Signed-off-by: Thomas Meyer <th...
```diff diff --git a/drivers/usb/renesas_usbhs/mod_host.c b/drivers/usb/renesas_usbhs/mod_host.c index bade761a1e52..75659e0c735d 100644 --- a/drivers/usb/renesas_usbhs/mod_host.c +++ b/drivers/usb/renesas_usbhs/mod_host.c @@ -1268,7 +1268,7 @@ int usbhs_mod_host_probe(struct usbhs_priv *priv) return -ENOMEM; } ...
59bf5cf94f0fa3b08fb1258b52649077b7d0914d
Analyze and fix the following issue in the Linux kernel code: USB: isight: fix kernel bug when loading firmware
Problem Details: We were sending data on the stack when uploading firmware, which causes some machines fits, and is not allowed. Fix this by using the buffer we already had around for this very purpose. Reported-by: Wouter M. Koolen <wmkoolen@cwi.nl> Tested-by: Wouter M. Koolen <wmkoolen@cwi.nl> Cc: stable <stable@vg...
```diff diff --git a/drivers/usb/misc/isight_firmware.c b/drivers/usb/misc/isight_firmware.c index fe1d44319d0a..8f725f651915 100644 --- a/drivers/usb/misc/isight_firmware.c +++ b/drivers/usb/misc/isight_firmware.c @@ -55,8 +55,9 @@ static int isight_firmware_load(struct usb_interface *intf, ptr = firmware->data; ...
bc677d5b64644c399cd3db6a905453e611f402ab
Analyze and fix the following issue in the Linux kernel code: usb: fix number of mapped SG DMA entries
Problem Details: Add a new field num_mapped_sgs to struct urb so that we have a place to store the number of mapped entries and can also retain the original value of entries in num_sgs. Previously, usb_hcd_map_urb_for_dma() would overwrite this with the number of mapped entries, which would break dma_unmap_sg() becaus...
```diff diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c index 43a89e4ba928..2cec49d1773d 100644 --- a/drivers/usb/core/hcd.c +++ b/drivers/usb/core/hcd.c @@ -1398,11 +1398,10 @@ int usb_hcd_map_urb_for_dma(struct usb_hcd *hcd, struct urb *urb, ret = -EAGAIN; else urb->transfer_flags |= URB...
8ad028bd973ec1ead4982e21ab0400c956aff4b5
Analyze and fix the following issue in the Linux kernel code: USB: isp1760: Fix endianness-sensitivity in of_isp1760_probe()
Problem Details: Data read direct from device tree properties will be in the device tree's native endianness (i.e., big-endian). This patch uses of_property_read_u32() to read the bus-width property in host byte order instead. Signed-off-by: Dave Martin <dave.martin@linaro.org> Acked-by: Pawel Moll <pawel.moll@arm.co...
```diff diff --git a/drivers/usb/host/isp1760-if.c b/drivers/usb/host/isp1760-if.c index a7dc1e1d45f2..b605224fb9e3 100644 --- a/drivers/usb/host/isp1760-if.c +++ b/drivers/usb/host/isp1760-if.c @@ -47,9 +47,9 @@ static int of_isp1760_probe(struct platform_device *dev) int virq; resource_size_t res_len; int ret; ...
7fb57a019f94ea0c1290c39b8da753be155af41c
Analyze and fix the following issue in the Linux kernel code: USB: cdc-acm: Fix potential deadlock (lockdep warning)
Problem Details: Rework the locking and lifecycle management in the cdc-acm driver. Instead of using a global mutex to prevent the 'acm' object from being freed, use the tty_port kref to keep the device alive when either the USB side or TTY side is still active. This allows us to use the global mutex purely for protec...
```diff diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c index e8c564a53346..3027ada1b812 100644 --- a/drivers/usb/class/cdc-acm.c +++ b/drivers/usb/class/cdc-acm.c @@ -58,12 +58,64 @@ static struct usb_driver acm_driver; static struct tty_driver *acm_tty_driver; static struct acm *acm_table[ACM...
b298d289c79211508f11cb50749b0d1d54eb244a
Analyze and fix the following issue in the Linux kernel code: PM / Sleep: Fix freezer failures due to racy usermodehelper_is_disabled()
Problem Details: Commit a144c6a (PM: Print a warning if firmware is requested when tasks are frozen) introduced usermodehelper_is_disabled() to warn and exit immediately if firmware is requested when usermodehelpers are disabled. However, it is racy. Consider the following scenario, currently used in drivers/base/firm...
```diff diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c index 06ed6b4e7df5..d5585da14c8a 100644 --- a/drivers/base/firmware_class.c +++ b/drivers/base/firmware_class.c @@ -534,6 +534,8 @@ static int _request_firmware(const struct firmware **firmware_p, return 0; } + read_lock_usermodeh...
9aa7705c966c750dda3d5c8d8a20f8e46668911c
Analyze and fix the following issue in the Linux kernel code: [media] [trivial] omap24xxcam-dma: Fix logical test
Problem Details: Likely misuse of & vs &&. Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/media/video/omap24xxcam-dma.c b/drivers/media/video/omap24xxcam-dma.c index 1d54b86c936b..3ea38a8def8e 100644 --- a/drivers/media/video/omap24xxcam-dma.c +++ b/drivers/media/video/omap24xxcam-dma.c @@ -506,7 +506,7 @@ int omap24xxcam_sgdma_queue(struct omap24xxcam_sgdma *sgdma, unsigned l...
e89715a7e48d505f42813a4e3ee0f0efb49832ba
Analyze and fix the following issue in the Linux kernel code: ARM: OMAP: hsmmc: Support for AM3517 MMC1 voltages
Problem Details: This patch fixes the following error message which appears while intializing MMC1 on the AM3517 EVM base-board: mmc0: host doesn't support card's voltages mmc0: error -22 whilst initialising SD card The ocr_mask, which enumerates the volatges supported by the MMC card was not being indicated be...
```diff diff --git a/arch/arm/mach-omap2/hsmmc.c b/arch/arm/mach-omap2/hsmmc.c index 997b33d76418..bd844af13af5 100644 --- a/arch/arm/mach-omap2/hsmmc.c +++ b/arch/arm/mach-omap2/hsmmc.c @@ -353,7 +353,15 @@ static int __init omap_hsmmc_pdata_init(struct omap2_hsmmc_info *c, * * temporary HACK: ocr_mask instead o...
47db9e7c808a45b1f86971f25eca5e38fa95ab86
Analyze and fix the following issue in the Linux kernel code: x86, um: Fix typo in 32-bit system call modifications
Problem Details: We override sys_iopl(), not stub_iopl(); the latter is a 64-bitism that doesn't apply to i386 in the first place. Reported-by: Richard Weinberger <richard@nod.at> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
```diff diff --git a/arch/x86/um/sys_call_table_32.c b/arch/x86/um/sys_call_table_32.c index 0606aa3e92ae..416bd40c0eba 100644 --- a/arch/x86/um/sys_call_table_32.c +++ b/arch/x86/um/sys_call_table_32.c @@ -16,7 +16,7 @@ */ /* Not going to be implemented by UML, since we have no hardware. */ -#define stub_iopl sys...
aaa0ef289afe9186f81e2340114ea413eef0492a
Analyze and fix the following issue in the Linux kernel code: usb: PS3 EHCI QH read work-around
Problem Details: PS3 EHCI HC errata fix 244. The SCC EHCI HC will not correctly perform QH reads that occur near or span a micro-frame boundry. This is due to a problem in the Nak Count Reload Control logic (EHCI Specification 1.0 Section 4.9.1). The work-around for this problem is for the HC driver to set I=1 (inac...
```diff diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c index e0ca9955880b..9496b7d7ab25 100644 --- a/drivers/usb/host/ehci-hcd.c +++ b/drivers/usb/host/ehci-hcd.c @@ -670,6 +670,7 @@ static int ehci_init(struct usb_hcd *hcd) hw = ehci->async->hw; hw->hw_next = QH_NEXT(ehci, ehci->async->qh_d...
0221cd51543972782af558c527e4ac58b32049fa
Analyze and fix the following issue in the Linux kernel code: Revert "net: netprio_cgroup: make net_prio_subsys static"
Problem Details: This reverts commit 865d9f9f748fdc1943679ea65d9ee1dc55e4a6ae. This commit breaks the build with CONFIG_NETPRIO_CGROUP=y so revert it. It does build as a module though. The SUBSYS macro in the cgroup core code automatically defines a subsys structure as extern. Long term we should fix the macro. And I ...
```diff diff --git a/net/core/netprio_cgroup.c b/net/core/netprio_cgroup.c index ea16c8faf20c..3a9fd4826b75 100644 --- a/net/core/netprio_cgroup.c +++ b/net/core/netprio_cgroup.c @@ -28,7 +28,7 @@ static struct cgroup_subsys_state *cgrp_create(struct cgroup_subsys *ss, static void cgrp_destroy(struct cgroup_subsys *ss...
5dbc8fca8ef5d719014f22345d990e957dcfc692
Analyze and fix the following issue in the Linux kernel code: Btrfs: fix btrfs_end_bio to deal with write errors to a single mirror
Problem Details: btrfs_end_bio checks the number of errors on a bio against the max number of errors allowed before sending any EIOs up to the higher levels. If we got enough copies of the bio done for a given raid level, it is supposed to clear the bio error flag and return success. We have pointers to the original ...
```diff diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index 0a8c8f8304b1..91ea57a1474a 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c @@ -3258,7 +3258,7 @@ static void btrfs_end_bio(struct bio *bio, int err) */ if (atomic_read(&bbio->error) > bbio->max_errors) { err = -EIO; - } else if (err...
b439e66f04bff6476c5d4bae6a52ab93fbb9a8f4
Analyze and fix the following issue in the Linux kernel code: rapidio/tsi721: fix mailbox resource reporting
Problem Details: Bug fix for Tsi721 RapidIO mport driver: Tsi721 supports four RapidIO mailboxes (MBOX0 - MBOX3) as defined by RapidIO specification. Mailbox resources has to be properly reported to allow use of all available mailboxes (initial version reports only MBOX0). This patch is applicable to kernel versions ...
```diff diff --git a/drivers/rapidio/devices/tsi721.c b/drivers/rapidio/devices/tsi721.c index 514c28c81420..83ac8728b781 100644 --- a/drivers/rapidio/devices/tsi721.c +++ b/drivers/rapidio/devices/tsi721.c @@ -2107,8 +2107,8 @@ static int __devinit tsi721_setup_mport(struct tsi721_device *priv) INIT_LIST_HEAD(&mport...
2a95ea6c0d129b4568fb64e1deda16ceb20e6636
Analyze and fix the following issue in the Linux kernel code: procfs: do not overflow get_{idle,iowait}_time for nohz
Problem Details: Since commit a25cac5198d4 ("proc: Consider NO_HZ when printing idle and iowait times") we are reporting idle/io_wait time also while a CPU is tickless. We rely on get_{idle,iowait}_time functions to retrieve proper data. These functions, however, use usecs_to_cputime to translate micro seconds time t...
```diff diff --git a/fs/proc/stat.c b/fs/proc/stat.c index 42b274da92c3..2a30d67dd6b8 100644 --- a/fs/proc/stat.c +++ b/fs/proc/stat.c @@ -32,7 +32,7 @@ static cputime64_t get_idle_time(int cpu) idle = kstat_cpu(cpu).cpustat.idle; idle = cputime64_add(idle, arch_idle_time(cpu)); } else - idle = usecs_to_cputim...
1368edf0647ac112d8cfa6ce47257dc950c50f5c
Analyze and fix the following issue in the Linux kernel code: mm: vmalloc: check for page allocation failure before vmlist insertion
Problem Details: Commit f5252e00 ("mm: avoid null pointer access in vm_struct via /proc/vmallocinfo") adds newly allocated vm_structs to the vmlist after it is fully initialised. Unfortunately, it did not check that __vmalloc_area_node() successfully populated the area. In the event of allocation failure, the vmalloc...
```diff diff --git a/mm/vmalloc.c b/mm/vmalloc.c index 3231bf332878..1d8b32f07139 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c @@ -1633,6 +1633,8 @@ void *__vmalloc_node_range(unsigned long size, unsigned long align, goto fail; addr = __vmalloc_area_node(area, gfp_mask, prot, node, caller); + if (!addr) + retur...
58a84aa92723d1ac3e1cc4e3b0ff49291663f7e1
Analyze and fix the following issue in the Linux kernel code: thp: set compound tail page _count to zero
Problem Details: Commit 70b50f94f1644 ("mm: thp: tail page refcounting fix") keeps all page_tail->_count zero at all times. But the current kernel does not set page_tail->_count to zero if a 1GB page is utilized. So when an IOMMU 1GB page is used by KVM, it wil result in a kernel oops because a tail page's _count doe...
```diff diff --git a/mm/hugetlb.c b/mm/hugetlb.c index bb28a5f9db8d..73f17c0293c0 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c @@ -576,6 +576,7 @@ static void prep_compound_gigantic_page(struct page *page, unsigned long order) __SetPageHead(page); for (i = 1; i < nr_pages; i++, p = mem_map_next(p, page, i)) { __...
b6999b19120931ede364fa3b685e698a61fed31d
Analyze and fix the following issue in the Linux kernel code: thp: add compound tail page _mapcount when mapped
Problem Details: With the 3.2-rc kernel, IOMMU 2M pages in KVM works. But when I tried to use IOMMU 1GB pages in KVM, I encountered an oops and the 1GB page failed to be used. The root cause is that 1GB page allocation calls gup_huge_pud() while 2M page calls gup_huge_pmd. If compound pages are used and the page is ...
```diff diff --git a/arch/x86/mm/gup.c b/arch/x86/mm/gup.c index ea305856151c..dd74e46828c0 100644 --- a/arch/x86/mm/gup.c +++ b/arch/x86/mm/gup.c @@ -201,6 +201,8 @@ static noinline int gup_huge_pud(pud_t pud, unsigned long addr, do { VM_BUG_ON(compound_head(page) != head); pages[*nr] = page; + if (PageTail(p...
09dc3cf93f7d16fdd37a0ad8486faebb5e2769ec
Analyze and fix the following issue in the Linux kernel code: printk: avoid double lock acquire
Problem Details: Commit 4f2a8d3cf5e ("printk: Fix console_sem vs logbuf_lock unlock race") introduced another silly bug where we would want to acquire an already held lock. Avoid this. Reported-by: Andrea Arcangeli <aarcange@redhat.com> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Ingo Molnar <mingo@elt...
```diff diff --git a/kernel/printk.c b/kernel/printk.c index 1455a0d4eedd..7982a0a841ea 100644 --- a/kernel/printk.c +++ b/kernel/printk.c @@ -1293,10 +1293,11 @@ again: raw_spin_lock(&logbuf_lock); if (con_start != log_end) retry = 1; + raw_spin_unlock_irqrestore(&logbuf_lock, flags); + if (retry && console_t...
c193c82f054195aa352ccbef91afc28446e5a30e
Analyze and fix the following issue in the Linux kernel code: memcg: update maintainers
Problem Details: More players joined to memory cgroup developments and Johannes' great work changed internal design of memory cgroup dramatically. And he will do more works. Michal Hokko did many bug fixes and know memory cgroup very well. Daisuke Nishimura helped us very much but he seems busy now. Thanks to his wo...
```diff diff --git a/MAINTAINERS b/MAINTAINERS index b4f18024f4e7..6751a36f569f 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -4302,8 +4302,9 @@ F: include/linux/mm.h F: mm/ MEMORY RESOURCE CONTROLLER +M: Johannes Weiner <hannes@cmpxchg.org> +M: Michal Hocko <mhocko@suse.cz> M: Balbir Singh <bsingharora@gmail.com>...
2dbcd05f1e9e0932833d16dab1696176fc164b07
Analyze and fix the following issue in the Linux kernel code: drivers/rtc/rtc-s3c.c: fix driver clock enable/disable balance issues
Problem Details: If an error occurs after the clock is enabled, the enable/disable state can become unbalanced. Signed-off-by: Jonghwan Choi <jhbird.choi@samsung.com> Cc: Alessandro Zummo <a.zummo@towertech.it> Acked-by: Kukjin Kim <kgene.kim@samsung.com> Cc: <stable@vger.kernel.org> Signed-off-by: Andrew Morton <akpm...
```diff diff --git a/drivers/rtc/rtc-s3c.c b/drivers/rtc/rtc-s3c.c index 7639ab906f02..5b979d9cc332 100644 --- a/drivers/rtc/rtc-s3c.c +++ b/drivers/rtc/rtc-s3c.c @@ -202,7 +202,6 @@ static int s3c_rtc_settime(struct device *dev, struct rtc_time *tm) void __iomem *base = s3c_rtc_base; int year = tm->tm_year - 100; ...
1de8ad43d0048963d0a0adf14bb046340426b1e4
Analyze and fix the following issue in the Linux kernel code: CREDITS: update Kees's expired fingerprint and fix details
Problem Details: Small clean-up for my CREDITS entry; the GPG fingerprint was not up to date, so I fixed other details at the same time too. Signed-off-by: Kees Cook <kees@outflux.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/CREDITS b/CREDITS index 07e32a87d956..44fce988eaac 100644 --- a/CREDITS +++ b/CREDITS @@ -688,10 +688,13 @@ S: Oxfordshire, UK. N: Kees Cook E: kees@outflux.net -W: http://outflux.net/ -P: 1024D/17063E6D 9FA3 C49C 23C9 D1BC 2E30 1975 1FFF 4BA9 1706 3E6D -D: Minor updates to SCSI types, added /...
b53fc7c2974a50913f49e1d800fe904a28c338e3
Analyze and fix the following issue in the Linux kernel code: fs/proc/meminfo.c: fix compilation error
Problem Details: Fix the error message "directives may not be used inside a macro argument" which appears when the kernel is compiled for the cris architecture. Signed-off-by: Claudio Scordino <claudio@evidence.eu.com> Cc: Andrea Arcangeli <aarcange@redhat.com> Cc: <stable@vger.kernel.org> Signed-off-by: Andrew Morton...
```diff diff --git a/fs/proc/meminfo.c b/fs/proc/meminfo.c index 586174168e2a..80e4645f7990 100644 --- a/fs/proc/meminfo.c +++ b/fs/proc/meminfo.c @@ -131,12 +131,13 @@ static int meminfo_proc_show(struct seq_file *m, void *v) K(i.freeswap), K(global_page_state(NR_FILE_DIRTY)), K(global_page_state(NR_WRITEBACK...
635697c663f38106063d5659f0cf2e45afcd4bb5
Analyze and fix the following issue in the Linux kernel code: vmscan: fix initial shrinker size handling
Problem Details: A shrinker function can return -1, means that it cannot do anything without a risk of deadlock. For example prune_super() does this if it cannot grab a superblock refrence, even if nr_to_scan=0. Currently we interpret this -1 as a ULONG_MAX size shrinker and evaluate `total_scan' according to this. ...
```diff diff --git a/mm/vmscan.c b/mm/vmscan.c index a1893c050795..f5255442ae2b 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -247,14 +247,18 @@ unsigned long shrink_slab(struct shrink_control *shrink, list_for_each_entry(shrinker, &shrinker_list, list) { unsigned long long delta; - unsigned long total_scan; - ...
819a693b5a503788a7af54a3d95c4857780a7230
Analyze and fix the following issue in the Linux kernel code: typo fixes: aera -> area, exntension -> extension
Problem Details: One printk and one comment typo fix. Signed-off-by: Wang YanQing <udknight@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
```diff diff --git a/arch/x86/pci/pcbios.c b/arch/x86/pci/pcbios.c index db0e9a51e611..da8fe0535ff4 100644 --- a/arch/x86/pci/pcbios.c +++ b/arch/x86/pci/pcbios.c @@ -44,7 +44,7 @@ static inline void set_bios_x(void) pcibios_enabled = 1; set_memory_x(PAGE_OFFSET + BIOS_BEGIN, (BIOS_END - BIOS_BEGIN) >> PAGE_SHIFT);...
7fcadfd17699b6b7973ce4f99eae47a11b4c44a7
Analyze and fix the following issue in the Linux kernel code: ASoC: Fix comments for disabling amplifier and PGA
Problem Details: Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
```diff diff --git a/sound/soc/codecs/wm8961.c b/sound/soc/codecs/wm8961.c index dc087c155975..58fbf0a87b6a 100644 --- a/sound/soc/codecs/wm8961.c +++ b/sound/soc/codecs/wm8961.c @@ -422,11 +422,11 @@ static int wm8961_spk_event(struct snd_soc_dapm_widget *w, } if (event & SND_SOC_DAPM_PRE_PMD) { - /* Enable the...
bc28633eb4fa78cedadf863c87fb1e47dc18414f
Analyze and fix the following issue in the Linux kernel code: devices.txt: Fix typo of 'VMware'.
Problem Details: Signed-off-by: Vinson Lee <vlee@vmware.com> Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
```diff diff --git a/Documentation/devices.txt b/Documentation/devices.txt index eccffe715229..cec8864ce4e8 100644 --- a/Documentation/devices.txt +++ b/Documentation/devices.txt @@ -379,7 +379,7 @@ Your cooperation is appreciated. 162 = /dev/smbus System Management Bus 163 = /dev/lik Logitech Internet Keyboard ...
847a2ee7392e7d3278f9b82c4b503744c72ee463
Analyze and fix the following issue in the Linux kernel code: arm/imx: fix power button on imx51 babbage board
Problem Details: Since commit 6571534 (plat-mxc: iomux-v3.h: implicitly enable pull-up/down when that's desired) was in, the power button on imx51 babbage board stopped working because it's pulled up by mistake. The patch removes the pull-up setting from the pad configuration for that gpio to make the power button back...
```diff diff --git a/arch/arm/mach-mx5/board-mx51_babbage.c b/arch/arm/mach-mx5/board-mx51_babbage.c index 5c837603ff0f..24994bb52147 100644 --- a/arch/arm/mach-mx5/board-mx51_babbage.c +++ b/arch/arm/mach-mx5/board-mx51_babbage.c @@ -362,7 +362,7 @@ static void __init mx51_babbage_init(void) { iomux_v3_cfg_t usbh1s...
300a47b4378a3b2e7c2a423b0aa4d75fc78987d3
Analyze and fix the following issue in the Linux kernel code: ARM: imx: fix cpufreq build errors
Problem Details: CC arch/arm/plat-mxc/cpufreq.o arch/arm/plat-mxc/cpufreq.c:203: error: expected declaration specifiers or '...' before string constant arch/arm/plat-mxc/cpufreq.c:203: warning: data definition has no type or storage class arch/arm/plat-mxc/cpufreq.c:203: warning: type defaults to 'int' in declarat...
```diff diff --git a/arch/arm/plat-mxc/cpufreq.c b/arch/arm/plat-mxc/cpufreq.c index 74aac96cda20..adbff706ef6f 100644 --- a/arch/arm/plat-mxc/cpufreq.c +++ b/arch/arm/plat-mxc/cpufreq.c @@ -17,6 +17,7 @@ * the CPU clock speed on the fly. */ +#include <linux/module.h> #include <linux/cpufreq.h> #include <linux/...
e8c7106280a305e1ff2a3a8a4dfce141469fb039
Analyze and fix the following issue in the Linux kernel code: x86, efi: Calling __pa() with an ioremap()ed address is invalid
Problem Details: If we encounter an efi_memory_desc_t without EFI_MEMORY_WB set in ->attribute we currently call set_memory_uc(), which in turn calls __pa() on a potentially ioremap'd address. On CONFIG_X86_32 this is invalid, resulting in the following oops on some machines: BUG: unable to handle kernel paging req...
```diff diff --git a/arch/x86/include/asm/e820.h b/arch/x86/include/asm/e820.h index 908b96957d88..c9547033e38e 100644 --- a/arch/x86/include/asm/e820.h +++ b/arch/x86/include/asm/e820.h @@ -53,6 +53,13 @@ */ #define E820_RESERVED_KERN 128 +/* + * Address ranges that need to be mapped by the kernel direct +...
905ad269c55fc62bee3da29f7b1d1efeba8aa1e1
Analyze and fix the following issue in the Linux kernel code: procfs: fix a vfsmount longterm reference leak
Problem Details: kern_mount() doesn't pair with plain mntput()... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
```diff diff --git a/fs/proc/root.c b/fs/proc/root.c index 9a8a2b77b874..03102d978180 100644 --- a/fs/proc/root.c +++ b/fs/proc/root.c @@ -91,20 +91,18 @@ static struct file_system_type proc_fs_type = { void __init proc_root_init(void) { - struct vfsmount *mnt; int err; proc_init_inodecache(); err = registe...
7023676f9ee851d94f0942e879243fc1f9081c47
Analyze and fix the following issue in the Linux kernel code: cifs: check for NULL last_entry before calling cifs_save_resume_key
Problem Details: Prior to commit eaf35b1, cifs_save_resume_key had some NULL pointer checks at the top. It turns out that at least one of those NULL pointer checks is needed after all. When the LastNameOffset in a FIND reply appears to be beyond the end of the buffer, CIFSFindFirst and CIFSFindNext will set srch_inf.l...
```diff diff --git a/fs/cifs/readdir.c b/fs/cifs/readdir.c index 5de03ec20144..a090bbe6ee29 100644 --- a/fs/cifs/readdir.c +++ b/fs/cifs/readdir.c @@ -554,7 +554,10 @@ static int find_cifs_entry(const int xid, struct cifs_tcon *pTcon, rc); return rc; } - cifs_save_resume_key(cifsFile->srch_inf.last_entry,...
59edb63ad08e4f3a9477223c9aaf3fba753085bf
Analyze and fix the following issue in the Linux kernel code: cifs: Fix sparse warning when calling cifs_strtoUCS
Problem Details: Fix sparse endian check warning while calling cifs_strtoUCS CHECK fs/cifs/smbencrypt.c fs/cifs/smbencrypt.c:216:37: warning: incorrect type in argument 1 (different base types) fs/cifs/smbencrypt.c:216:37: expected restricted __le16 [usertype] *<noident> fs/cifs/smbencrypt.c:216:37: got unsign...
```diff diff --git a/fs/cifs/smbencrypt.c b/fs/cifs/smbencrypt.c index 7cacba12b8f1..80d850881938 100644 --- a/fs/cifs/smbencrypt.c +++ b/fs/cifs/smbencrypt.c @@ -209,7 +209,7 @@ E_md4hash(const unsigned char *passwd, unsigned char *p16, { int rc; int len; - __u16 wpwd[129]; + __le16 wpwd[129]; /* Password can...
5d8c71f9e5fbdd95650be00294d238e27a363b5c
Analyze and fix the following issue in the Linux kernel code: md: raid5 crash during degradation
Problem Details: NULL pointer access causes crash in raid5 module. Signed-off-by: Adam Kwolek <adam.kwolek@intel.com> Signed-off-by: NeilBrown <neilb@suse.de>
```diff diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c index b0dec01028f4..31670f8d6b65 100644 --- a/drivers/md/raid5.c +++ b/drivers/md/raid5.c @@ -3070,7 +3070,7 @@ static void analyse_stripe(struct stripe_head *sh, struct stripe_head_state *s) if (sh->sector + STRIPE_SECTORS <= rdev->recovery_offset) ...
f9e5908fa04e15a681dc4695b53c2c0c1d9b9a03
Analyze and fix the following issue in the Linux kernel code: ARM: OMAP1: Update dpll1 default rate reprogramming method
Problem Details: According to comments in omap1_select_table_rate(), reprogramming dpll1 is tricky, and should always be done from SRAM. While being at it, move OMAP730 special case handling inside omap_sram_reprogram_clock(). Created on top of version 2 of the series "ARM: OMAP1: Fix dpll1 reprogramming related issu...
```diff diff --git a/arch/arm/mach-omap1/clock.c b/arch/arm/mach-omap1/clock.c index ff27dbdba3d6..6d8f7c640237 100644 --- a/arch/arm/mach-omap1/clock.c +++ b/arch/arm/mach-omap1/clock.c @@ -218,12 +218,8 @@ int omap1_select_table_rate(struct clk *clk, unsigned long rate) /* * In most cases we should not need to r...
e163cc97f9ac169f00e86df57bee365e82e9c365
Analyze and fix the following issue in the Linux kernel code: net/fec: fix the .remove code
Problem Details: The .remove code is broken in several ways. - mdiobus_unregister() is called twice for the same object in case of dual FEC - phy_disconnect() is being called when the PHY is already disconnected - the requested IRQ(s) are not freed - fec_stop() is being called with the inteface already stopped Al...
```diff diff --git a/drivers/net/ethernet/freescale/fec.c b/drivers/net/ethernet/freescale/fec.c index ab0afb5961f6..01ee9cc417b2 100644 --- a/drivers/net/ethernet/freescale/fec.c +++ b/drivers/net/ethernet/freescale/fec.c @@ -259,6 +259,8 @@ struct fec_enet_private { /* Transmitter timeout */ #define TX_TIMEOUT (2 *...
f58ee4e1a28b68ad94130a747d676cbc6644dbd1
Analyze and fix the following issue in the Linux kernel code: bridge: refactor fdb_notify
Problem Details: Move fdb_notify outside of fdb_create. This fixes the problem that notification of local entries are not flagged correctly. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/bridge/br_fdb.c b/net/bridge/br_fdb.c index 973813e34428..d9ca85b87971 100644 --- a/net/bridge/br_fdb.c +++ b/net/bridge/br_fdb.c @@ -347,7 +347,6 @@ static struct net_bridge_fdb_entry *fdb_create(struct hlist_head *head, fdb->is_static = 0; fdb->updated = fdb->used = jiffies; hlist_ad...
036f419529d4dd83a1d46de04551d60994d1f372
Analyze and fix the following issue in the Linux kernel code: Staging: comedi: fix initialise statics to 0 or NULL issue in cb_das16_cs.c
Problem Details: This is a patch to the cb_das16_cs.c file that fixes up a initialise statics to 0 or NULL warning found by the checkpatch.pl tool. Signed-off-by: Ravishankar Karkala Mallikarjunayya <ravishankar.km@greenturtles.in> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/comedi/drivers/cb_das16_cs.c b/drivers/staging/comedi/drivers/cb_das16_cs.c index 9beb34c45b60..49404f49f7b7 100644 --- a/drivers/staging/comedi/drivers/cb_das16_cs.c +++ b/drivers/staging/comedi/drivers/cb_das16_cs.c @@ -99,7 +99,7 @@ static struct comedi_driver driver_das16cs = { ...
6f2c5f3852caf0afb6fae36e4f16fe765545bdb0
Analyze and fix the following issue in the Linux kernel code: Staging: comedi: fix initialise statics to 0 or NULL issue in dt3000.c
Problem Details: This is a patch to the dt3000.c file that fixes up a initialise statics to 0 or NULL warning found by the checkpatch.pl tool. Signed-off-by: Ravishankar Karkala Mallikarjunayya <ravishankar.km@greenturtles.in> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/comedi/drivers/dt3000.c b/drivers/staging/comedi/drivers/dt3000.c index 6170f7bac46e..069a6916588b 100644 --- a/drivers/staging/comedi/drivers/dt3000.c +++ b/drivers/staging/comedi/drivers/dt3000.c @@ -383,7 +383,7 @@ static void dt3k_writesingle(struct comedi_device *dev, unsigned ...
41912a3f231e97efa154f4662608c024238ffe5e
Analyze and fix the following issue in the Linux kernel code: Staging: comedi: fix line over 80 character issue in cb_pcimdda.c
Problem Details: This is a patch to the cb_pcimdda.c file that fixes up a line over 80 character warning found by the checkpatch.pl tool. Signed-off-by: Ravishankar Karkala Mallikarjunayya <ravishankar.km@greenturtles.in> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/comedi/drivers/cb_pcimdda.c b/drivers/staging/comedi/drivers/cb_pcimdda.c index 6521d6196ea9..40bddfa22220 100644 --- a/drivers/staging/comedi/drivers/cb_pcimdda.c +++ b/drivers/staging/comedi/drivers/cb_pcimdda.c @@ -105,7 +105,8 @@ struct board_struct { int ao_bits; int dio_ch...
5f1d0f3f3f9ca3dbcbe1b251dccd8bfc6df18057
Analyze and fix the following issue in the Linux kernel code: Staging: comedi: fix brace coding style issue in daqboard2000.c
Problem Details: This is a patch to the daqboard2000.c file that fixes up a brace warning found by the checkpatch.pl tool. Signed-off-by: Ravishankar Karkala Mallikarjunayya <ravishankar.km@greenturtles.in> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/comedi/drivers/daqboard2000.c b/drivers/staging/comedi/drivers/daqboard2000.c index 9958bd5044c5..a16060eff915 100644 --- a/drivers/staging/comedi/drivers/daqboard2000.c +++ b/drivers/staging/comedi/drivers/daqboard2000.c @@ -429,16 +429,14 @@ static int daqboard2000_ai_insn_read(st...
c5018168a59b92ec3bd0f7b598e6d0d64d507e1e
Analyze and fix the following issue in the Linux kernel code: staging: comedi: comedi_fops: Removed int overflow check
Problem Details: This became unnecessary with the previous commit. Improved the readability of the remaining check, by using UINT_MAX. Signed-off-by: Florian Schmaus <fschmaus@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/comedi/comedi_fops.c b/drivers/staging/comedi/comedi_fops.c index 60200b46be0b..15877fb0a363 100644 --- a/drivers/staging/comedi/comedi_fops.c +++ b/drivers/staging/comedi/comedi_fops.c @@ -2430,7 +2430,7 @@ static ssize_t store_max_read_buffer_kb(struct device *dev, { struct com...
9a215e40d70ae63762963ab3ccc7f31dd966dc6a
Analyze and fix the following issue in the Linux kernel code: iwlagn: fix TID use bug
Problem Details: The driver everywhere uses max TID count as 9, which is wrong, it should be 8. I think the reason it uses 9 here is off-by-one confusion by whoever wrote this. We do use the value IWL_MAX_TID_COUNT for "not QoS/no TID" but that is completely correct even if it is 8 and not 9 since 0-7 are only valid. ...
```diff diff --git a/drivers/net/wireless/iwlwifi/iwl-commands.h b/drivers/net/wireless/iwlwifi/iwl-commands.h index 87bfdf6bdf6a..265de39d394c 100644 --- a/drivers/net/wireless/iwlwifi/iwl-commands.h +++ b/drivers/net/wireless/iwlwifi/iwl-commands.h @@ -814,7 +814,7 @@ struct iwl_qosparam_cmd { #define IWLAGN_STATION...
d332f591daca5f5301782bad69f94e160b5fa665
Analyze and fix the following issue in the Linux kernel code: iwlwifi: Display more uCode debug info
Problem Details: When uCode encounter problem, it pass a lot of debug data to help debugging the issue. We only show partial data before, why not display all of those. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
```diff diff --git a/drivers/net/wireless/iwlwifi/iwl-commands.h b/drivers/net/wireless/iwlwifi/iwl-commands.h index f4eccf583775..d98d09cc5df7 100644 --- a/drivers/net/wireless/iwlwifi/iwl-commands.h +++ b/drivers/net/wireless/iwlwifi/iwl-commands.h @@ -466,23 +466,27 @@ struct iwl_error_event_table { u32 frame_ptr;...
4ee778a44cc353ee201e933e45f493453cde3dfb
Analyze and fix the following issue in the Linux kernel code: staging: lttng: TODO update: lttng reported to work fine on -rt now
Problem Details: The patch "lttng: Fix recent modifications to string_from_user operation" has been confirmed to fix the corrupted trace problem experienced on -rt kernel by the original bug reporter. Remove the entry from the LTTng TODO list. Reported-by: Yannick Brosseau <yannick.brosseau@gmail.com> Signed-off-by: M...
```diff diff --git a/drivers/staging/lttng/TODO b/drivers/staging/lttng/TODO index 3fdc5e684ac2..5e3a581d18e8 100644 --- a/drivers/staging/lttng/TODO +++ b/drivers/staging/lttng/TODO @@ -35,12 +35,6 @@ A) Cleanup/Testing depend on the producer to push the reader position. Contact: Julien Desfossez <julien.des...
643167423858052c26b2dfaf332c1ec0b472ea7a
Analyze and fix the following issue in the Linux kernel code: staging: lttng: Fix recent modifications to string_from_user operation
Problem Details: Include: a fix for a recently introduced change: obviously max_t should be used instead of min_t here. Also, a likely should apply to the result of the comparison, not the variable per se. Signed-off-by: Yannick Brosseau <yannick.brosseau@gmail.com> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@...
```diff diff --git a/drivers/staging/lttng/probes/lttng-events.h b/drivers/staging/lttng/probes/lttng-events.h index ff6273fb3541..d486994f3a0c 100644 --- a/drivers/staging/lttng/probes/lttng-events.h +++ b/drivers/staging/lttng/probes/lttng-events.h @@ -347,7 +347,7 @@ static __used struct lttng_probe_desc TP_ID(__pro...
463ac7f7fe319a30543d9722164ab31ebffbafb3
Analyze and fix the following issue in the Linux kernel code: staging: mei: updating mei driver documentation
Problem Details: The following changes were made in the document: 1. Update URLs to working links 2. remove old information about module parameters 3. Add IOCTL information. 4. cleanups and fix spelling 5. driver changed from character device to misc character device Signed-off-by: Oren Weil <oren.jer.weil@intel.com>...
```diff diff --git a/drivers/staging/mei/mei.txt b/drivers/staging/mei/mei.txt index 17302ad2531f..516bfe7319a6 100644 --- a/drivers/staging/mei/mei.txt +++ b/drivers/staging/mei/mei.txt @@ -1,78 +1,74 @@ -Intel MEI +Intel(R) Management Engine Interface (Intel(R) MEI) ======================= Introduction =========...
e8cd29d8e26b9f7526297cdfb031ce757502a3b4
Analyze and fix the following issue in the Linux kernel code: staging/mei: fix failure for multiple mei clients connection
Problem Details: The irq handler processes queued mei clients connect requests, which were not transferred to the device in ioctl context due to unavailability of the write buffer. The handler may transfer the connection request only if there is no other ongoing requests for the same mei id. This condition was implem...
```diff diff --git a/drivers/staging/mei/interrupt.c b/drivers/staging/mei/interrupt.c index 38e0197475e2..ad944b2c1da1 100644 --- a/drivers/staging/mei/interrupt.c +++ b/drivers/staging/mei/interrupt.c @@ -1328,7 +1328,7 @@ static int mei_irq_thread_write_handler(struct mei_io_list *cmpl_list, break; case MEI_I...
91762057f439bb0adb33ca857b6022fda4b1fd69
Analyze and fix the following issue in the Linux kernel code: staging: olpc_dcon: ->read_status() API change
Problem Details: Change ->read_status() by separating the error handling and the status bits. This also fixes a signedness bug in dcon_interrupt() that would break the error handling. Signed-off-by: Xi Wang <xi.wang@gmail.com> Acked-by: Andres Salomon <dilinger@queued.net> Cc: Dan Carpenter <dan.carpenter@oracle.com>...
```diff diff --git a/drivers/staging/olpc_dcon/olpc_dcon.c b/drivers/staging/olpc_dcon/olpc_dcon.c index af24ddfb58c9..c379bba4c178 100644 --- a/drivers/staging/olpc_dcon/olpc_dcon.c +++ b/drivers/staging/olpc_dcon/olpc_dcon.c @@ -755,9 +755,9 @@ static int dcon_resume(struct i2c_client *client) irqreturn_t dcon_inter...
6e8087a4fae41ae1518babbf1ef46f105d702bfd
Analyze and fix the following issue in the Linux kernel code: Staging: hv: storvsc: Fix a bug in create_bounce_buffer()
Problem Details: Set the length field of the scatter gather elements correctly when we create the bounce buffer. When we use the bounce buffer for a "write" operation, the act of copying to the bounce buffer, correctly deals with this issue. However, on the "read" side, the current code was not correctly setting the bu...
```diff diff --git a/drivers/staging/hv/storvsc_drv.c b/drivers/staging/hv/storvsc_drv.c index 18f8771769be..eb853f71089a 100644 --- a/drivers/staging/hv/storvsc_drv.c +++ b/drivers/staging/hv/storvsc_drv.c @@ -893,12 +893,14 @@ static int do_bounce_buffer(struct scatterlist *sgl, unsigned int sg_count) static struc...
467de1fc67d1bd2954eaac7019c564f28fa2b6a5
Analyze and fix the following issue in the Linux kernel code: PM / Freezer: Remove the "userspace only" constraint from freezer[_do_not]_count()
Problem Details: At present, the functions freezer_count() and freezer_do_not_count() impose the restriction that they are effective only for userspace processes. However, now, these functions have found more utility than originally intended by the commit which introduced it: ba96a0c8 (freezer: fix vfork problem). And ...
```diff diff --git a/include/linux/freezer.h b/include/linux/freezer.h index 30f06c220467..7bcfe73d999b 100644 --- a/include/linux/freezer.h +++ b/include/linux/freezer.h @@ -67,33 +67,27 @@ static inline bool cgroup_freezing(struct task_struct *task) * appropriately in case the child has exited before the freezing o...
c9914854b4ca339e511d052ce3a1a441ef15b928
Analyze and fix the following issue in the Linux kernel code: PM / Domains: Fix default system suspend/resume operations
Problem Details: Commit d23b9b00cdde5c93b914a172cecd57d5625fcd04 (PM / Domains: Rework system suspend callback routines (v2)) broke the system suspend and resume handling by devices belonging to generic PM domains, because it used freeze/thaw callbacks instead of suspend/resume ones and didn't initialize device callbac...
```diff diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c index ad6ba2e04677..92e6a9048065 100644 --- a/drivers/base/power/domain.c +++ b/drivers/base/power/domain.c @@ -1435,7 +1435,7 @@ static int pm_genpd_default_restore_state(struct device *dev) */ static int pm_genpd_default_suspend(struct ...
1418a3e5ad4d01b1d4abf2c479c50b0cedd59e3f
Analyze and fix the following issue in the Linux kernel code: TOMOYO: Fix pathname handling of disconnected paths.
Problem Details: Current tomoyo_realpath_from_path() implementation returns strange pathname when calculating pathname of a file which belongs to lazy unmounted tree. Use local pathname rather than strange absolute pathname in that case. Also, this patch fixes a regression by commit 02125a82 "fix apparmor dereferencin...
```diff diff --git a/security/tomoyo/realpath.c b/security/tomoyo/realpath.c index 36fa7c9bedc4..d9f3ced8756e 100644 --- a/security/tomoyo/realpath.c +++ b/security/tomoyo/realpath.c @@ -293,8 +293,16 @@ char *tomoyo_realpath_from_path(struct path *path) pos = tomoyo_get_local_path(path->dentry, buf, buf...
d9ce353a5f2ab703a83c83e78b0736329b4ae8ad
Analyze and fix the following issue in the Linux kernel code: staging: bcm: led_control.c: fix parens/braces
Problem Details: Signed-off-by: Johannes Tenschert <Johannes.Tenschert@informatik.stud.uni-erlangen.de> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/bcm/led_control.c b/drivers/staging/bcm/led_control.c index 890a804e7d68..82b9110a8035 100644 --- a/drivers/staging/bcm/led_control.c +++ b/drivers/staging/bcm/led_control.c @@ -29,14 +29,11 @@ static INT LED_Blink(PMINI_ADAPTER Adapter, UINT GPIO_Num, UCHAR uiLedIndex, ULO BOOLEA...
f5d8c26a14c9bfeb52a5aee6404c8aea0b8fd18e
Analyze and fix the following issue in the Linux kernel code: staging: bcm: led_control.c: fix comments
Problem Details: Signed-off-by: Johannes Tenschert <Johannes.Tenschert@informatik.stud.uni-erlangen.de> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/bcm/led_control.c b/drivers/staging/bcm/led_control.c index d9d5fbf2c86d..890a804e7d68 100644 --- a/drivers/staging/bcm/led_control.c +++ b/drivers/staging/bcm/led_control.c @@ -28,7 +28,7 @@ static INT LED_Blink(PMINI_ADAPTER Adapter, UINT GPIO_Num, UCHAR uiLedIndex, ULO int Stat...
34e98e72f938e98fd4a939b5bdfcba87353601bd
Analyze and fix the following issue in the Linux kernel code: staging: bcm: led_control.c: fix indentation
Problem Details: Signed-off-by: Johannes Tenschert <Johannes.Tenschert@informatik.stud.uni-erlangen.de> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/bcm/led_control.c b/drivers/staging/bcm/led_control.c index 0fe2b8e63f31..d9d5fbf2c86d 100644 --- a/drivers/staging/bcm/led_control.c +++ b/drivers/staging/bcm/led_control.c @@ -250,7 +250,7 @@ static INT LED_Proportional_Blink(PMINI_ADAPTER Adapter, UCHAR GPIO_Num_tx, static INT V...
09468b0392b1d2b079b334d60a23d7da8105dc53
Analyze and fix the following issue in the Linux kernel code: Staging: bcm: Fix double free of 'pReadData' in IOCTL_BCM_NVM_WRITE.
Problem Details: This patch fixes a memory error in ioctl, IOCTL_BCM_NVM_WRITE. While copying data to user space, if an error occurs, pReadData is freed. Then, at the end of the ioctl, pReadData was being freed again. Signed-off-by: Kevin McKinney <klmckinney1@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse....
```diff diff --git a/drivers/staging/bcm/Bcmchar.c b/drivers/staging/bcm/Bcmchar.c index 72a699c12704..ad1cc5598dca 100644 --- a/drivers/staging/bcm/Bcmchar.c +++ b/drivers/staging/bcm/Bcmchar.c @@ -1336,7 +1336,7 @@ cntrlEnd: if (copy_to_user(stNVMReadWrite.pBuffer, pReadData, stNVMReadWrite.uiNumBytes)) { ...
5a2a6e1162d2c63b4bb3e6e3c867f0374e95cd1f
Analyze and fix the following issue in the Linux kernel code: staging:iio: Fix scan mask update
Problem Details: When updating the scan mask we have to check the actual scan mask for if the channel is already enabled, not the matching scan mask from the available scan masks. The bit will already be set there and as a result the actual scan mask will not get updated and the channel stays disabled. Also fix the re...
```diff diff --git a/drivers/staging/iio/industrialio-buffer.c b/drivers/staging/iio/industrialio-buffer.c index b46ae6a2424f..24c6aa4d82b9 100644 --- a/drivers/staging/iio/industrialio-buffer.c +++ b/drivers/staging/iio/industrialio-buffer.c @@ -174,7 +174,7 @@ static ssize_t iio_scan_el_store(struct device *dev, err...
a1e44d6ac5577b78ec85833b22d58345b2758ebb
Analyze and fix the following issue in the Linux kernel code: staging:iio: Fix sw_ring memory corruption
Problem Details: The sw_ring does not properly handle the case where the write pointer already has wrapped around, the read pointer has not and the remaining buffer space at the end is enough to fill the read buffer: +-----------------------------------+ | | |##data##| | +-------------------...
```diff diff --git a/drivers/staging/iio/ring_sw.c b/drivers/staging/iio/ring_sw.c index 98fe81932047..2f11531dd282 100644 --- a/drivers/staging/iio/ring_sw.c +++ b/drivers/staging/iio/ring_sw.c @@ -174,6 +174,7 @@ static int iio_read_first_n_sw_rb(struct iio_buffer *r, u8 *initial_read_p, *initial_write_p, *current_...
c6795ad4c7934a1db196697308ea0c3ac8b15f52
Analyze and fix the following issue in the Linux kernel code: staging:iio: Fix typo
Problem Details: Fix a small typo in the iio_modifer enum. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/iio/types.h b/drivers/staging/iio/types.h index f1f5ca2aa385..b7d26474ad06 100644 --- a/drivers/staging/iio/types.h +++ b/drivers/staging/iio/types.h @@ -35,7 +35,7 @@ enum iio_modifier { IIO_MOD_Y, IIO_MOD_Z, IIO_MOD_X_AND_Y, - IIO_MOD_X_ANX_Z, + IIO_MOD_X_AND_Z, IIO_MOD_Y_...
329456d1ffb416c220813725b7363cda9975c9aa
Analyze and fix the following issue in the Linux kernel code: ssb: fix init regression with SoCs
Problem Details: This fixes a Data bus error on some SoCs. The first fix for this problem did not solve it on all devices. commit 6ae8ec27868bfdbb815287bee8146acbefaee867 Author: Rafał Miłecki <zajec5@gmail.com> Date: Tue Jul 5 17:25:32 2011 +0200 ssb: fix init regression of hostmode PCI core In ...
```diff diff --git a/drivers/ssb/driver_pcicore.c b/drivers/ssb/driver_pcicore.c index e6ac3177fbbe..32c535f5ce31 100644 --- a/drivers/ssb/driver_pcicore.c +++ b/drivers/ssb/driver_pcicore.c @@ -516,10 +516,14 @@ static void ssb_pcicore_pcie_setup_workarounds(struct ssb_pcicore *pc) static void __devinit ssb_pcicore...
137d105d50f6e6c373c1aa759f59045e6239cf66
Analyze and fix the following issue in the Linux kernel code: ARM: OMAP4: Fix errata i688 with MPU interconnect barriers.
Problem Details: On OMAP4 SOC, intecronnects has many write buffers in the async bridges and they need to be drained before CPU enters into standby state. Patch 'OMAP4: PM: Add CPUX OFF mode support' added CPU PM support but OMAP errata i688 (Async Bridge Corruption) needs to be taken care to avoid issues like system ...
```diff diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig index b6625130831d..50f43942c1aa 100644 --- a/arch/arm/mach-omap2/Kconfig +++ b/arch/arm/mach-omap2/Kconfig @@ -353,6 +353,27 @@ config OMAP3_SDRC_AC_TIMING wish to say no. Selecting yes without understanding what is going on could ...
3ba2a7393e6be48ad7f545a743cd6f46325ba8fd
Analyze and fix the following issue in the Linux kernel code: ARM: OMAP4: PM: Add MPUSS power domain OSWR support
Problem Details: This patch adds the MPUSS OSWR (Open Switch Retention) support. The MPUSS OSWR configuration is as below. - CPUx L1 and logic lost, MPUSS logic lost, L2 memory is retained OMAP4460 onwards, MPUSS power domain doesn't support OFF state any more anymore just like CORE power domain. The deepest state su...
```diff diff --git a/arch/arm/mach-omap2/common.h b/arch/arm/mach-omap2/common.h index 3312174d64ba..0911e843f079 100644 --- a/arch/arm/mach-omap2/common.h +++ b/arch/arm/mach-omap2/common.h @@ -190,6 +190,7 @@ extern int omap4_enter_lowpower(unsigned int cpu, unsigned int power_state); extern int omap4_finish_suspend...
78bd3dc8dafc48f11fb761bc01b16e045638fec8
Analyze and fix the following issue in the Linux kernel code: [media] xc5000,tda18271c2dd: Fix bandwidth calculus
Problem Details: While here, add a debug message, to easy detecting bugs on it. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/media/common/tuners/xc5000.c b/drivers/media/common/tuners/xc5000.c index ecd1f95726e2..19990bcbf5b2 100644 --- a/drivers/media/common/tuners/xc5000.c +++ b/drivers/media/common/tuners/xc5000.c @@ -708,9 +708,9 @@ static int xc5000_set_params(struct dvb_frontend *fe, * is equal to 0.15...
0ee332c1451869963626bf9cac88f165a90990e1
Analyze and fix the following issue in the Linux kernel code: memblock: Kill early_node_map[]
Problem Details: Now all ARCH_POPULATES_NODE_MAP archs select HAVE_MEBLOCK_NODE_MAP - there's no user of early_node_map[] left. Kill early_node_map[] and replace ARCH_POPULATES_NODE_MAP with HAVE_MEMBLOCK_NODE_MAP. Also, relocate for_each_mem_pfn_range() and helper from mm.h to memblock.h as page_alloc.c would no lon...
```diff diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig index e2c7de0d823d..3b7a7c483785 100644 --- a/arch/ia64/Kconfig +++ b/arch/ia64/Kconfig @@ -477,9 +477,6 @@ config NODES_SHIFT MAX_NUMNODES will be 2^(This value). If in doubt, use the default. -config ARCH_POPULATES_NODE_MAP - def_bool y - # VIRTUAL...
eb18f1b5bfb99b1d7d2f5d792e6ee5c9b7d89330
Analyze and fix the following issue in the Linux kernel code: memblock: Make memblock functions handle overflowing range @size
Problem Details: Allow memblock users to specify range where @base + @size overflows and automatically cap it at maximum. This makes the interface more robust and specifying till-the-end-of-memory easier. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Yinghai Lu <yi...
```diff diff --git a/mm/memblock.c b/mm/memblock.c index fffe68b4bf14..945dc31258eb 100644 --- a/mm/memblock.c +++ b/mm/memblock.c @@ -49,6 +49,12 @@ static inline const char *memblock_type_name(struct memblock_type *type) return "unknown"; } +/* adjust *@size so that (@base + *@size) doesn't overflow, return new...