id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
5ffad5acebec735b7a368851bf22394b734cae8a
Analyze and fix the following issue in the Linux kernel code: sctp: fix to indicate ASCONF support in INIT-ACK only if peer has such capable
Problem Details: This patch fix to indicate ASCONF support in INIT-ACK only if peer has such capable. This patch also fix to calc the chunk size if peer has no FWD-TSN capable. Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com> Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com> Signed-off-by: David S. Miller <da...
```diff diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c index b40e95f9851b..9484f33730f6 100644 --- a/net/sctp/sm_make_chunk.c +++ b/net/sctp/sm_make_chunk.c @@ -372,10 +372,10 @@ struct sctp_chunk *sctp_make_init_ack(const struct sctp_association *asoc, if (asoc->peer.ecn_capable) chunksize += si...
5e8f3f703ae4e4af65e2695e486b3cd198328863
Analyze and fix the following issue in the Linux kernel code: sctp: simplify sctp listening code
Problem Details: sctp_inet_listen() call is split between UDP and TCP style. Looking at the code, the two functions are almost the same and can be merged into a single helper. This also fixes a bug that was fixed in the UDP function, but missed in the TCP function. Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp...
```diff diff --git a/net/sctp/socket.c b/net/sctp/socket.c index bbd3cd238d7f..5fb3a8c9792e 100644 --- a/net/sctp/socket.c +++ b/net/sctp/socket.c @@ -5843,37 +5843,28 @@ static int sctp_get_port(struct sock *sk, unsigned short snum) } /* - * 3.1.3 listen() - UDP Style Syntax - * - * By default, new associations ...
bf792094ef830117312b3990b63474320ec864c0
Analyze and fix the following issue in the Linux kernel code: cxgb3: detect mac link faults.
Problem Details: The driver currently ignores the local or remote link faults raised at the mac layer. This patch fixes it. Our mac however only advertizes link events, so wait for the phy to stabilize the link, then enable mac link events interrupts. Signed-off-by: Divy Le Ray <divy@chelsio.com> Signed-off-by: David ...
```diff diff --git a/drivers/net/cxgb3/adapter.h b/drivers/net/cxgb3/adapter.h index 66ce456614a8..71eaa431371d 100644 --- a/drivers/net/cxgb3/adapter.h +++ b/drivers/net/cxgb3/adapter.h @@ -68,6 +68,8 @@ struct port_info { struct net_device_stats netstats; int activity; __be32 iscsi_ipv4addr; + + int link_fault;...
fc88219601aa3f94def89433a6afde154e8faa8c
Analyze and fix the following issue in the Linux kernel code: cxgb3: disable high freq non-data interrupts
Problem Details: Under RX pressure, The HW might generate a high load of interrupts to signal mac fifo or free lists overflow. Disable the interrupts, and poll the relevant status bits to maintain stats. Signed-off-by: Divy Le Ray <divy@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/cxgb3/cxgb3_main.c b/drivers/net/cxgb3/cxgb3_main.c index c32f514c41a7..9ff0452fcddd 100644 --- a/drivers/net/cxgb3/cxgb3_main.c +++ b/drivers/net/cxgb3/cxgb3_main.c @@ -2471,6 +2471,8 @@ static void t3_adap_check_task(struct work_struct *work) struct adapter *adapter = container_of(w...
8f4358044d7d694f2e0c18a6ce5db6ec0790451a
Analyze and fix the following issue in the Linux kernel code: cxgb3: fix skb truesize in jumbo mode
Problem Details: Update skb truesize correctly for the 2nd buffer from a Jumbo frame Signed-off-by: Divy Le Ray <divy@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/cxgb3/sge.c b/drivers/net/cxgb3/sge.c index 808b8af0c740..90f6f82d3bf2 100644 --- a/drivers/net/cxgb3/sge.c +++ b/drivers/net/cxgb3/sge.c @@ -830,14 +830,15 @@ recycle: len - SGE_RX_PULL_LEN); newskb->len = len; newskb->data_len = len - SGE_RX_PULL_LEN; + newskb->truesize...
855b0993f216a9b0f9cb33573bd05e314105d86c
Analyze and fix the following issue in the Linux kernel code: qlge: bugfix: Pad outbound frames smaller than 60 bytes.
Problem Details: With some asic configurations xmit of frames smaller than 60 bytes may fail. Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/qlge/qlge_main.c b/drivers/net/qlge/qlge_main.c index 00c37c0f8a90..91191f761fba 100644 --- a/drivers/net/qlge/qlge_main.c +++ b/drivers/net/qlge/qlge_main.c @@ -1941,6 +1941,9 @@ static int qlge_send(struct sk_buff *skb, struct net_device *ndev) tx_ring = &qdev->tx_ring[tx_ring_idx...
6612a6344aba8ba7b5af67cd006453bfedbb2967
Analyze and fix the following issue in the Linux kernel code: qlge: bugfix: Move netif_napi_del() to common call point.
Problem Details: Moving netif_napi_del() up the call chain so it will get called from all exit points. Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/qlge/qlge_main.c b/drivers/net/qlge/qlge_main.c index 54d54ea03d49..00c37c0f8a90 100644 --- a/drivers/net/qlge/qlge_main.c +++ b/drivers/net/qlge/qlge_main.c @@ -3163,6 +3163,11 @@ static int ql_adapter_down(struct ql_adapter *qdev) ql_tx_ring_clean(qdev); + /* Call netif_napi_del...
a7a655f22c75f48e0afe8b86be03ecd70bd68b07
Analyze and fix the following issue in the Linux kernel code: qlge: bugfix: Tell hw to strip vlan header.
Problem Details: Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/qlge/qlge_main.c b/drivers/net/qlge/qlge_main.c index 87787b1ecab2..54d54ea03d49 100644 --- a/drivers/net/qlge/qlge_main.c +++ b/drivers/net/qlge/qlge_main.c @@ -2984,9 +2984,9 @@ static int ql_adapter_initialize(struct ql_adapter *qdev) mask = value << 16; ql_write32(qdev, SYS, mas...
c3c6496dc3d94d87bb0da86cf0bf48764577bf77
Analyze and fix the following issue in the Linux kernel code: qlge: bugfix: Increase filter on inbound csum.
Problem Details: Chip does not do UDP checksum when fragmentation occurs. Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/qlge/qlge.h b/drivers/net/qlge/qlge.h index e6fdce9206cc..aff9c5fec738 100644 --- a/drivers/net/qlge/qlge.h +++ b/drivers/net/qlge/qlge.h @@ -927,6 +927,7 @@ struct ib_mac_iocb_rsp { u8 flags1; #define IB_MAC_IOCB_RSP_OI 0x01 /* Overide intr delay */ #define IB_MAC_IOCB_RSP_I 0x02 /...
26f26fa8e3a0822aa43ee0a80bd0196fa2554c42
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (10977): STB6100 init fix, the call to stb6100_set_bandwidth needs an argument
Problem Details: in Hz not kHz, and a comment incorrectly says MHz instead of Hz. I don't know if this caused real problems anywhere Signed-off-by: Manu Abraham <manu@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/media/dvb/frontends/stb6100.c b/drivers/media/dvb/frontends/stb6100.c index ff39275ab49c..1ed5a7db4c5e 100644 --- a/drivers/media/dvb/frontends/stb6100.c +++ b/drivers/media/dvb/frontends/stb6100.c @@ -427,11 +427,11 @@ static int stb6100_init(struct dvb_frontend *fe) status->refclock = 2...
1d06059c13fc64b67027334507f734ec0f2f4b6c
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (10976): Bug fix: For legacy applications stv0899 performs search only first time after insmod.
Problem Details: For legacy applications stv0899 performs search only first time after insmod due to not set DVBFE_ALGO_SEARCH_AGAIN bit Signed-off-by: Igor M. Liplianin <liplianin@me.by> Signed-off-by: Manu Abraham <manu@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/media/dvb/dvb-core/dvb_frontend.c b/drivers/media/dvb/dvb-core/dvb_frontend.c index 843407785083..8dcb3fbf7acd 100644 --- a/drivers/media/dvb/dvb-core/dvb_frontend.c +++ b/drivers/media/dvb/dvb-core/dvb_frontend.c @@ -1290,9 +1290,6 @@ static int dtv_property_process_set(struct dvb_frontend...
b5d067b8e331ce78f4a81eb220965ffa36069d3f
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (10975): Bug: Use signed types, Offsets and range can be negative
Problem Details: Code simplification: use in kernel macros Signed-off-by: Manu Abraham <manu@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/media/dvb/frontends/stb0899_algo.c b/drivers/media/dvb/frontends/stb0899_algo.c index a67d1775a43c..2da55ec20392 100644 --- a/drivers/media/dvb/frontends/stb0899_algo.c +++ b/drivers/media/dvb/frontends/stb0899_algo.c @@ -156,7 +156,7 @@ static void stb0899_first_subrange(struct stb0899_sta...
ccd50dfd92ea2c4ba9e39531ac55db53393e783e
Analyze and fix the following issue in the Linux kernel code: tracing/syscalls: support for syscalls tracing on x86, fix
Problem Details: Impact: build fix kernel/built-in.o: In function `ftrace_syscall_exit': (.text+0x76667): undefined reference to `syscall_nr_to_meta' ftrace.o is built: obj-$(CONFIG_DYNAMIC_FTRACE) += ftrace.o obj-$(CONFIG_FUNCTION_GRAPH_TRACER) += ftrace.o But now a CONFIG_FTRACE_SYSCALLS dependency is needed...
```diff diff --git a/arch/x86/kernel/Makefile b/arch/x86/kernel/Makefile index 339ce35648e6..84000eb931ff 100644 --- a/arch/x86/kernel/Makefile +++ b/arch/x86/kernel/Makefile @@ -66,7 +66,8 @@ obj-$(CONFIG_X86_MPPARSE) += mpparse.o obj-y += apic/ obj-$(CONFIG_X86_REBOOTFIXUPS) += reboot_fixups_32.o obj-$(CONFIG_D...
082edb7bf443eb8eda15b482d16ad9dd8137ad24
Analyze and fix the following issue in the Linux kernel code: numa, cpumask: move numa_node_id default implementation to topology.h
Problem Details: Impact: cleanup, potential bugfix Not sure what changed to expose this, but clearly that numa_node_id() doesn't belong in mmzone.h (the inline in gfp.h is probably overkill, too). In file included from include/linux/topology.h:34, from arch/x86/mm/numa.c:2: /home/rusty/patches-cpumas...
```diff diff --git a/include/linux/gfp.h b/include/linux/gfp.h index dd20cd78faa8..0bbc15f54536 100644 --- a/include/linux/gfp.h +++ b/include/linux/gfp.h @@ -4,6 +4,7 @@ #include <linux/mmzone.h> #include <linux/stddef.h> #include <linux/linkage.h> +#include <linux/topology.h> struct vm_area_struct; diff --git...
0b966252d9e5d95ec2d11e63d7e55b42913aa5b7
Analyze and fix the following issue in the Linux kernel code: cpumask: convert node_to_cpumask_map[] to cpumask_var_t
Problem Details: Impact: fix (CONFIG_MAXSMP=y only) boot crash c032ef60d1aa9af33730b7a35bbea751b131adc1 "cpumask: convert node_to_cpumask_map[] to cpumask_var_t" didn't get this one conversion. There was a compile warning, but I missed it. Reported-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Rusty Russell <rusty@...
```diff diff --git a/arch/x86/mm/numa.c b/arch/x86/mm/numa.c index ce255e32a593..550df481accd 100644 --- a/arch/x86/mm/numa.c +++ b/arch/x86/mm/numa.c @@ -61,7 +61,7 @@ const struct cpumask *cpumask_of_node(int node) dump_stack(); return cpu_online_mask; } - return &node_to_cpumask_map[node]; + return node_to_c...
79258a354e0c69be94ae2871809a195bf4a647b1
Analyze and fix the following issue in the Linux kernel code: x86, bts: detect size of DS fields, fix
Problem Details: Impact: build fix One usage site was missed in the sizeof_field -> sizeof_ptr_field rename. Cc: Markus Metzger <markus.t.metzger@intel.com> LKML-Reference: <20090313104218.A30096@sedona.ch.intel.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
```diff diff --git a/arch/x86/kernel/ds.c b/arch/x86/kernel/ds.c index 7363e01ba082..5fd53333c1df 100644 --- a/arch/x86/kernel/ds.c +++ b/arch/x86/kernel/ds.c @@ -983,7 +983,7 @@ ds_configure(const struct ds_configuration *cfg, printk("bts/pebs record: %u/%u bytes\n", ds_cfg.sizeof_rec[ds_bts], ds_cfg.sizeof...
ffd71da4e3f323b7673b061e6f7e0d0c12dc2b49
Analyze and fix the following issue in the Linux kernel code: panic: decrease oops_in_progress only after having done the panic
Problem Details: Impact: eliminate secondary warnings during panic() We can panic() in a number of difficult, atomic contexts, hence we use bust_spinlocks(1) in panic() to increase oops_in_progress, which prevents various debug checks we have in place. But in practice this protection only covers the first few printk'...
```diff diff --git a/kernel/panic.c b/kernel/panic.c index 32fe4eff1b89..57fb005de546 100644 --- a/kernel/panic.c +++ b/kernel/panic.c @@ -77,7 +77,6 @@ NORET_TYPE void panic(const char * fmt, ...) #ifdef CONFIG_DEBUG_BUGVERBOSE dump_stack(); #endif - bust_spinlocks(0); /* * If we have crashed and we have a ...
9a51157bab06ab54d6ee442e34fe9574ff14c8c3
Analyze and fix the following issue in the Linux kernel code: [ARM] pcm038: Fix pins for UART3
Problem Details: The UART3 had a copy-paste bug. instead of claiming rxd, txd, rts and cts pins, cts and rts were claimed twice Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
```diff diff --git a/arch/arm/mach-mx2/pcm038.c b/arch/arm/mach-mx2/pcm038.c index 7d935e17aa1c..aa4eaa61d1b5 100644 --- a/arch/arm/mach-mx2/pcm038.c +++ b/arch/arm/mach-mx2/pcm038.c @@ -128,10 +128,10 @@ static int uart_mxc_port1_exit(struct platform_device *pdev) return 0; } -static int mxc_uart2_pins[] = { PE10...
7e8549bcee00d92040904361cb1840c7a5eda615
Analyze and fix the following issue in the Linux kernel code: imxfb: Fix margin settings
Problem Details: The var->hsync_len, var->right_margin and var->left_margin fields should contain the real values, not the hardware dependent values. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
```diff diff --git a/drivers/video/imxfb.c b/drivers/video/imxfb.c index 9dd27576db71..bd1cb75cd14b 100644 --- a/drivers/video/imxfb.c +++ b/drivers/video/imxfb.c @@ -495,9 +495,9 @@ static int imxfb_activate_var(struct fb_var_screeninfo *var, struct fb_info *inf info->fix.id, var->lower_margin); #endif - writel...
87bbb19721fbd6b5e556105c188da80d06f738b1
Analyze and fix the following issue in the Linux kernel code: [ARM] mxc: add missing include
Problem Details: include devices.h from devices.c to avoid inconsistencies and to fix sparse warnings Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
```diff diff --git a/arch/arm/mach-mx1/devices.c b/arch/arm/mach-mx1/devices.c index cea8f2c71192..97f42d96d7a1 100644 --- a/arch/arm/mach-mx1/devices.c +++ b/arch/arm/mach-mx1/devices.c @@ -26,6 +26,8 @@ #include <mach/irqs.h> #include <mach/hardware.h> +#include "devices.h" + static struct resource imx_csi_resou...
e600eb6b0d41c3e69297137388733bd0a50aa5e9
Analyze and fix the following issue in the Linux kernel code: fix warning "control reaches end of non-void function"
Problem Details: Add a return 0 analogous to uart_mxc_port[0-2]_exit. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Cc: Holger Schurig <hs4233@mail.mn-solutions.de> Cc: Russell King <rmk+kernel@arm.linux.org.uk> Cc: Sascha Hauer <s.hauer@pengutron...
```diff diff --git a/arch/arm/mach-mx2/mx27ads.c b/arch/arm/mach-mx2/mx27ads.c index 4548631eb3ae..a078aa52a6a6 100644 --- a/arch/arm/mach-mx2/mx27ads.c +++ b/arch/arm/mach-mx2/mx27ads.c @@ -135,6 +135,7 @@ static int uart_mxc_port3_exit(struct platform_device *pdev) { mxc_gpio_release_multiple_pins(mxc_uart3_pins, ...
4d5f9cdacb74d35b4e435cb66443da203d8be6f0
Analyze and fix the following issue in the Linux kernel code: mx31ads: Fix build for missing mx31.h
Problem Details: Several of the macros in mx31ads.h depend on mx31.h which is no longer included in quite so many standard headers as it once was. Include it directly so we can build. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
```diff diff --git a/arch/arm/plat-mxc/include/mach/board-mx31ads.h b/arch/arm/plat-mxc/include/mach/board-mx31ads.h index 451d510d08c3..318c72ada13d 100644 --- a/arch/arm/plat-mxc/include/mach/board-mx31ads.h +++ b/arch/arm/plat-mxc/include/mach/board-mx31ads.h @@ -11,6 +11,8 @@ #ifndef __ASM_ARCH_MXC_BOARD_MX31ADS_H...
e65fb0099fe4fe82d59ffe84f1e88a489218d7f9
Analyze and fix the following issue in the Linux kernel code: [ARM] MXC: remove _clk suffix from clock names
Problem Details: The context makes it clear already that these are clocks, so there's no need for such a suffix. This patch only changes the clocks actually used in the tree. The remaining clocks are renamed in the subsequent architecture specific patches. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
```diff diff --git a/arch/arm/mach-mx1/clock.c b/arch/arm/mach-mx1/clock.c index 40a2274380a3..0d0f306851d0 100644 --- a/arch/arm/mach-mx1/clock.c +++ b/arch/arm/mach-mx1/clock.c @@ -462,7 +462,7 @@ static struct clk clko_clk = { }; static struct clk dma_clk = { - .name = "dma_clk", + .name = "dma", .parent = &hc...
88f502fedba82eff252b6420e8b8328e4ae25c67
Analyze and fix the following issue in the Linux kernel code: futex: remove the pointer math from double_unlock_hb, fix
Problem Details: Impact: fix double unlock crash Thomas Gleixner noticed that the simplified double_unlock_hb() became ... too unsophisticated: in the hb1 == hb2 case it will do a double unlock. Reported-by: Thomas Gleixner <tglx@linutronix.de> Cc: Darren Hart <dvhltc@us.ibm.com> LKML-Reference: <20090312221118.11146...
```diff diff --git a/kernel/futex.c b/kernel/futex.c index 2331b73f6932..6b50a024bca2 100644 --- a/kernel/futex.c +++ b/kernel/futex.c @@ -659,7 +659,8 @@ static inline void double_unlock_hb(struct futex_hash_bucket *hb1, struct futex_hash_bucket *hb2) { spin_unlock(&hb1->lock); - spin_unlock(&hb2->lock); + if (hb1...
5a8ac9d28dae5330c70562c7d7785f5104059c17
Analyze and fix the following issue in the Linux kernel code: x86: ptrace, bts: fix an unreachable statement
Problem Details: Commit c2724775ce57c98b8af9694857b941dc61056516 put a statement after return, which makes that statement unreachable. Move that statement before return. Signed-off-by: WANG Cong <xiyou.wangcong@gmail.com> Cc: Roland McGrath <roland@redhat.com> Cc: Markus Metzger <markus.t.metzger@intel.com> LKML-Refe...
```diff diff --git a/arch/x86/kernel/ptrace.c b/arch/x86/kernel/ptrace.c index 3d9672e59c16..19378715f415 100644 --- a/arch/x86/kernel/ptrace.c +++ b/arch/x86/kernel/ptrace.c @@ -685,9 +685,8 @@ static int ptrace_bts_config(struct task_struct *child, if (!cfg.signal) return -EINVAL; - return -EOPNOTSUPP; - ...
3ff42da5048649503e343a32be37b14a6a4e8aaf
Analyze and fix the following issue in the Linux kernel code: x86: mtrr: don't modify RdDram/WrDram bits of fixed MTRRs
Problem Details: Impact: bug fix + BIOS workaround BIOS is expected to clear the SYSCFG[MtrrFixDramModEn] on AMD CPUs after fixed MTRRs are configured. Some BIOSes do not clear SYSCFG[MtrrFixDramModEn] on BP (and on APs). This can lead to obfuscation in Linux when this bit is not cleared on BP but cleared on APs. A ...
```diff diff --git a/arch/x86/kernel/cpu/mtrr/generic.c b/arch/x86/kernel/cpu/mtrr/generic.c index 964403520100..950c434f793d 100644 --- a/arch/x86/kernel/cpu/mtrr/generic.c +++ b/arch/x86/kernel/cpu/mtrr/generic.c @@ -33,6 +33,32 @@ u64 mtrr_tom2; struct mtrr_state_type mtrr_state = {}; EXPORT_SYMBOL_GPL(mtrr_state)...
7c4be70e6d07582a111a1b66942c8a1d45528dfb
Analyze and fix the following issue in the Linux kernel code: parisc: fix use of new cpumask api in irq.c
Problem Details: cpumask api needs to take a pointer to irq_desc[cpu].affinity Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
```diff diff --git a/arch/parisc/kernel/irq.c b/arch/parisc/kernel/irq.c index 49482806863f..a572112f5aba 100644 --- a/arch/parisc/kernel/irq.c +++ b/arch/parisc/kernel/irq.c @@ -120,7 +120,7 @@ int cpu_check_affinity(unsigned int irq, cpumask_t *dest) if (CHECK_IRQ_PER_CPU(irq)) { /* Bad linux design decision. T...
9785d646c10b0707412516ffe56b71b9eb18861f
Analyze and fix the following issue in the Linux kernel code: parisc: fix wrong assumption about bus->self
Problem Details: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com> posted a patch series to linux-pci to fix a wrong assumption about pci_bus->self==NULL for all PCI host bus controllers. While PARISC platforms to not behave this way, I prefer to have the code consistent across architectures. The following patch replace...
```diff diff --git a/drivers/parisc/dino.c b/drivers/parisc/dino.c index d539d9df88e7..f79266cd00e5 100644 --- a/drivers/parisc/dino.c +++ b/drivers/parisc/dino.c @@ -587,7 +587,7 @@ dino_fixup_bus(struct pci_bus *bus) bus->resource[i+1] = &res[i]; } - } else if(bus->self) { + } else if (bus->parent) { int ...
c1da90fd099531e9449019dc53a5a02a5eaef2b4
Analyze and fix the following issue in the Linux kernel code: parisc: fix 64bit build
Problem Details: Signed-off-by: Helge Deller <deller@gmx.de> Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
```diff diff --git a/arch/parisc/include/asm/assembly.h b/arch/parisc/include/asm/assembly.h index ab7cc373ee56..89fb40005e3f 100644 --- a/arch/parisc/include/asm/assembly.h +++ b/arch/parisc/include/asm/assembly.h @@ -79,6 +79,7 @@ #include <asm/asm-offsets.h> #include <asm/page.h> +#include <asm/types.h> #incl...
7f384ce780c6091968fc848b14f17b45cb849e14
Analyze and fix the following issue in the Linux kernel code: parisc: fix dev_printk() compile warnings for accessing a device struct
Problem Details: Fix compile warnings: drivers/scsi/zalon.c: In function `zalon_probe': drivers/scsi/zalon.c:140: warning: passing arg 1 of `dev_driver_string' from incompatible pointer type drivers/scsi/zalon.c:140: warning: passing arg 1 of `dev_name' from incompatible pointer type Signed-off-by: Helge Deller <delle...
```diff diff --git a/drivers/scsi/lasi700.c b/drivers/scsi/lasi700.c index 4a4e6954ec79..f23c4ca9a2ee 100644 --- a/drivers/scsi/lasi700.c +++ b/drivers/scsi/lasi700.c @@ -103,7 +103,7 @@ lasi700_probe(struct parisc_device *dev) hostdata = kzalloc(sizeof(*hostdata), GFP_KERNEL); if (!hostdata) { - dev_printk(KERN...
e448372c79c49ef80df23496339ce0915abef76e
Analyze and fix the following issue in the Linux kernel code: parisc: fix `struct pt_regs' declared inside parameter list warning
Problem Details: Fix those compile warnings: uaccess.h:244: warning: `struct pt_regs' declared inside parameter list uaccess.h:244: warning: its scope is only this definition or declaration, which is probably not what you want Signed-off-by: Helge Deller <deller@gmx.de> Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
```diff diff --git a/arch/parisc/include/asm/uaccess.h b/arch/parisc/include/asm/uaccess.h index 1c6dbb6f6e56..cd4c0b2a8e70 100644 --- a/arch/parisc/include/asm/uaccess.h +++ b/arch/parisc/include/asm/uaccess.h @@ -241,6 +241,7 @@ unsigned long copy_in_user(void __user *dst, const void __user *src, unsigned lo #define...
24dc029f71c1411c5974a79848d68bb3e34263b9
Analyze and fix the following issue in the Linux kernel code: parisc: fix section mismatch warnings
Problem Details: Signed-off-by: Helge Deller <deller@gmx.de> Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
```diff diff --git a/arch/parisc/kernel/firmware.c b/arch/parisc/kernel/firmware.c index 03f26bd75bd8..f6d241238a78 100644 --- a/arch/parisc/kernel/firmware.c +++ b/arch/parisc/kernel/firmware.c @@ -151,7 +151,7 @@ static void convert_to_wide(unsigned long *addr) } #ifdef CONFIG_64BIT -void __init set_firmware_widt...
8980a7baf93e478205e32ec7d6ef3bfb6c0bdfa7
Analyze and fix the following issue in the Linux kernel code: parisc: BUG_ON() cleanup
Problem Details: - convert a few "if (xx) BUG();" to BUG_ON(xx) - remove a few printk()s, as we get a backtrace with BUG_ON() anyway Signed-off-by: Helge Deller <deller@gmx.de> Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
```diff diff --git a/arch/parisc/kernel/cache.c b/arch/parisc/kernel/cache.c index 5259d8c20676..837530ea32e7 100644 --- a/arch/parisc/kernel/cache.c +++ b/arch/parisc/kernel/cache.c @@ -551,10 +551,7 @@ void flush_cache_range(struct vm_area_struct *vma, { int sr3; - if (!vma->vm_mm->context) { - BUG(); - return...
773e673de27297d07d852e7e9bfd1a695cae1da2
Analyze and fix the following issue in the Linux kernel code: x86: fix e820_update_range()
Problem Details: Impact: fix left range size on head | commit 5c0e6f035df983210e4d22213aed624ced502d3d | x86: fix code paths used by update_mptable | Impact: fix crashes under Xen due to unrobust e820 code fixes one e820 bug, but introduces another bug. Need to update size for left range at first in case it is...
```diff diff --git a/arch/x86/kernel/e820.c b/arch/x86/kernel/e820.c index 3cf6681ac80d..95b81c18b6bc 100644 --- a/arch/x86/kernel/e820.c +++ b/arch/x86/kernel/e820.c @@ -110,19 +110,25 @@ int __init e820_all_mapped(u64 start, u64 end, unsigned type) /* * Add a memory region to the kernel e820 map. */ -void __init...
7f96f93f02b7637491a1637dee12dcdcd40b9802
Analyze and fix the following issue in the Linux kernel code: tracing: move binary buffers into per cpu directory
Problem Details: The binary_buffers directory in /debugfs/tracing held the files to read the trace buffers in a binary format. This held one file per CPU buffer. But we also have a per_cpu directory that holds a way to read the pretty-print formats. This patch moves the binary buffers into the per_cpu_directory: # l...
```diff diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index dbb077d8a172..efe3202c0209 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c @@ -3543,6 +3543,11 @@ static void tracing_init_debugfs_percpu(long cpu) (void *) cpu, &tracing_fops); if (!entry) pr_warning("Could not create debugfs...
d02f7fa77d97a28a4276939f35e44ae995ad13d7
Analyze and fix the following issue in the Linux kernel code: drm/radeon: fix r600 writeback across suspend/resume
Problem Details: This update was done in mainline radeon, but not in the r600. Signed-off-by: Dave Airlie <airlied@redhat.com>
```diff diff --git a/drivers/gpu/drm/radeon/r600_cp.c b/drivers/gpu/drm/radeon/r600_cp.c index 04fde35dc21d..490f35396cbb 100644 --- a/drivers/gpu/drm/radeon/r600_cp.c +++ b/drivers/gpu/drm/radeon/r600_cp.c @@ -1737,9 +1737,6 @@ static void r600_cp_init_ring_buffer(struct drm_device *dev, RADEON_WRITE(R600_CP_DEBUG...
6546bf6d6cbf1f9ac350fd278a1d937d4bb9ad06
Analyze and fix the following issue in the Linux kernel code: drm/radeon: fix r600 writeback setup.
Problem Details: This fixes 2 bugs: 1. the AGP calculation wasn't consistent with the PCI(E) calc for the RPTR_ADDR registers. This consolidates the writes and fixes it up. 2. The scratch address was being incorrectly calculated, this breaks it out into a lot more linear steps. Signed-off-by: Dave Airlie <airlied@red...
```diff diff --git a/drivers/gpu/drm/radeon/r600_cp.c b/drivers/gpu/drm/radeon/r600_cp.c index 6f2cc74350c5..04fde35dc21d 100644 --- a/drivers/gpu/drm/radeon/r600_cp.c +++ b/drivers/gpu/drm/radeon/r600_cp.c @@ -1630,6 +1630,7 @@ static void r600_cp_init_ring_buffer(struct drm_device *dev, { struct drm_radeon_master_...
1847a549ac4db1272dea13d86331c492a2640b3b
Analyze and fix the following issue in the Linux kernel code: drm: fix warnings about new mappings in info code.
Problem Details: This fixes up the warnings in the debugfs code that conflicted with the mapping fixups. Signed-off-by: Dave Airlie <airlied@redhat.com>
```diff diff --git a/drivers/gpu/drm/drm_info.c b/drivers/gpu/drm/drm_info.c index fc98952b9033..60a1b6cb376a 100644 --- a/drivers/gpu/drm/drm_info.c +++ b/drivers/gpu/drm/drm_info.c @@ -72,7 +72,7 @@ int drm_vm_info(struct seq_file *m, void *data) { struct drm_info_node *node = (struct drm_info_node *) m->private; ...
8f497aade8df2a619eacda927a43ebe82167a84c
Analyze and fix the following issue in the Linux kernel code: drm/radeon: NULL noise: drivers/gpu/drm/radeon/radeon_*.c
Problem Details: Fix this sparse warning: drivers/gpu/drm/radeon/r600_cp.c:1811:52: warning: Using plain integer as NULL pointer drivers/gpu/drm/radeon/radeon_cp.c:1363:52: warning: Using plain integer as NULL pointer drivers/gpu/drm/radeon/radeon_state.c:1983:61: warning: Using plain integer as NULL pointer Sig...
```diff diff --git a/drivers/gpu/drm/radeon/r600_cp.c b/drivers/gpu/drm/radeon/r600_cp.c index be2bba66d5d9..6f2cc74350c5 100644 --- a/drivers/gpu/drm/radeon/r600_cp.c +++ b/drivers/gpu/drm/radeon/r600_cp.c @@ -1811,7 +1811,7 @@ int r600_do_cleanup_cp(struct drm_device *dev) if (dev_priv->gart_info.gart_table_loca...
a763d7dc0adb1159c1a52d43e566409da9fa59f0
Analyze and fix the following issue in the Linux kernel code: drm/radeon: fix r600 pci mapping calls.
Problem Details: This realigns the r600 pci mapping calls with the ati pcigart ones, fixing the direction and using the correct interface. Suggested by Jerome Glisse. Signed-off-by: Dave Airlie <airlied@redhat.com>
```diff diff --git a/drivers/gpu/drm/radeon/r600_cp.c b/drivers/gpu/drm/radeon/r600_cp.c index f915f1153b41..be2bba66d5d9 100644 --- a/drivers/gpu/drm/radeon/r600_cp.c +++ b/drivers/gpu/drm/radeon/r600_cp.c @@ -132,8 +132,8 @@ void r600_page_table_cleanup(struct drm_device *dev, struct drm_ati_pcigart_info for (i = ...
08932156cc2d4f8807dc5ca5c3d6ccd85080610a
Analyze and fix the following issue in the Linux kernel code: drm/radeon: r6xx/r7xx: fix possible oops in r600_page_table_cleanup()
Problem Details: Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
```diff diff --git a/drivers/gpu/drm/radeon/r600_cp.c b/drivers/gpu/drm/radeon/r600_cp.c index 37249b26f836..f915f1153b41 100644 --- a/drivers/gpu/drm/radeon/r600_cp.c +++ b/drivers/gpu/drm/radeon/r600_cp.c @@ -121,6 +121,9 @@ void r600_page_table_cleanup(struct drm_device *dev, struct drm_ati_pcigart_info int pages;...
800b69951174f7de294da575d7e7921041a7e783
Analyze and fix the following issue in the Linux kernel code: drm/radeon: RS600: fix interrupt handling
Problem Details: the checks weren't updated when RS600 support was added. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@linux.ie>
```diff diff --git a/drivers/gpu/drm/radeon/radeon_drv.c b/drivers/gpu/drm/radeon/radeon_drv.c index 1e3b2557a51a..2cb4f32b81d4 100644 --- a/drivers/gpu/drm/radeon/radeon_drv.c +++ b/drivers/gpu/drm/radeon/radeon_drv.c @@ -46,7 +46,7 @@ static int radeon_suspend(struct drm_device *dev, pm_message_t state) drm_radeon_...
a7d13ad0e2c1b0572492fd53ca1a090794e2f8e2
Analyze and fix the following issue in the Linux kernel code: drm/r600: fix rptr address along lines of previous fixes to radeon.
Problem Details: Signed-off-by: Dave Airlie <airlied@redhat.com>
```diff diff --git a/drivers/gpu/drm/radeon/r600_cp.c b/drivers/gpu/drm/radeon/r600_cp.c index 54ea867c4c66..37249b26f836 100644 --- a/drivers/gpu/drm/radeon/r600_cp.c +++ b/drivers/gpu/drm/radeon/r600_cp.c @@ -1689,18 +1689,12 @@ static void r600_cp_init_ring_buffer(struct drm_device *dev, } else #endif { - stru...
7659e9804b7a66047433182d86393d38ba4eff79
Analyze and fix the following issue in the Linux kernel code: radeon: fix r600 AGP support
Problem Details: This fixes the ioremap issues with r600 AGP. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
```diff diff --git a/drivers/gpu/drm/radeon/r600_cp.c b/drivers/gpu/drm/radeon/r600_cp.c index fcb0fc164c39..3f40558beece 100644 --- a/drivers/gpu/drm/radeon/r600_cp.c +++ b/drivers/gpu/drm/radeon/r600_cp.c @@ -1932,9 +1932,9 @@ int r600_do_init_cp(struct drm_device *dev, drm_radeon_init_t *init, #if __OS_HAS_AGP /*...
97d479e77b8621cc6e1cb06eabe5a73390c8149c
Analyze and fix the following issue in the Linux kernel code: drm/i915: Add information on pinning and fencing to the i915 list debug.
Problem Details: This was inspired by a patch by Chris Wilson, though none of it applied in any way due to the debugfs work and I decided to change the formatting of the new information anyway. Signed-off-by: Eric Anholt <eric@anholt.net> Signed-off-by: Dave Airlie <airlied@redhat.com>
```diff diff --git a/drivers/gpu/drm/i915/i915_gem_debugfs.c b/drivers/gpu/drm/i915/i915_gem_debugfs.c index 4fc845cee804..f7e7d3750f8f 100644 --- a/drivers/gpu/drm/i915/i915_gem_debugfs.c +++ b/drivers/gpu/drm/i915/i915_gem_debugfs.c @@ -70,18 +70,27 @@ static int i915_gem_object_list_info(struct seq_file *m, void *da...
958a6f8ccb1964adc3eec84cf401c5baeb4fbca0
Analyze and fix the following issue in the Linux kernel code: drm: radeon: Fix unaligned access in r300_scratch().
Problem Details: In compat mode, the cmdbuf->buf 64-bit address cookie can potentially be only 32-bit aligned. Dereferencing this as 64-bit causes expensive unaligned traps on platforms like sparc64. Use get_unaligned() to fix. Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Dave Airlie <airlied@...
```diff diff --git a/drivers/gpu/drm/radeon/r300_cmdbuf.c b/drivers/gpu/drm/radeon/r300_cmdbuf.c index cace3964feeb..3efa633966e8 100644 --- a/drivers/gpu/drm/radeon/r300_cmdbuf.c +++ b/drivers/gpu/drm/radeon/r300_cmdbuf.c @@ -37,6 +37,8 @@ #include "radeon_drv.h" #include "r300_reg.h" +#include <asm/unaligned.h> +...
f1a2a9b6189f9f5c27672d4d32fec9492c6486b2
Analyze and fix the following issue in the Linux kernel code: drm: Preserve SHMLBA bits in hash key for _DRM_SHM mappings.
Problem Details: Platforms such as sparc64 have D-cache aliasing issues. We cannot allow virtual mappings in different contexts to be such that two cache lines can be loaded for the same backing data. Updates to one cache line won't be seen by accesses to the other cache line. Code in sparc64 and other architectures ...
```diff diff --git a/drivers/gpu/drm/drm_bufs.c b/drivers/gpu/drm/drm_bufs.c index cddea1a2472c..6d80d17f1e96 100644 --- a/drivers/gpu/drm/drm_bufs.c +++ b/drivers/gpu/drm/drm_bufs.c @@ -34,6 +34,8 @@ */ #include <linux/vmalloc.h> +#include <linux/log2.h> +#include <asm/shmparam.h> #include "drmP.h" resource_s...
d30333bbabb4a2cfad1f1a45c48a4e4d0065c1f6
Analyze and fix the following issue in the Linux kernel code: drm: ati_pcigart: Fix limit check in drm_ati_pcigart_init().
Problem Details: The variable 'max_pages' is ambiguous. There are two concepts of "pages" being used in this function. First, we have ATI GART pages which are always 4096 bytes. Then, we have system pages which are of size PAGE_SIZE. Eliminate the confusion by creating max_ati_pages and max_real_pages. Calculate an...
```diff diff --git a/drivers/gpu/drm/ati_pcigart.c b/drivers/gpu/drm/ati_pcigart.c index 7972ec8762c7..4d86a629a517 100644 --- a/drivers/gpu/drm/ati_pcigart.c +++ b/drivers/gpu/drm/ati_pcigart.c @@ -102,7 +102,7 @@ int drm_ati_pcigart_init(struct drm_device *dev, struct drm_ati_pcigart_info *ga u32 *pci_gart, page_ba...
e8a894372b4ea05dc266ba7d7a7634315b6230e8
Analyze and fix the following issue in the Linux kernel code: drm: radeon: Fix calculation of RB_RPTR_ADDR in non-AGP case.
Problem Details: The address needs to be a GART relative address, rather than a PCI DMA address. Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Dave Airlie <airlied@linux.ie>
```diff diff --git a/drivers/gpu/drm/radeon/radeon_cp.c b/drivers/gpu/drm/radeon/radeon_cp.c index 8a8a82a2c170..4a56e7d626a6 100644 --- a/drivers/gpu/drm/radeon/radeon_cp.c +++ b/drivers/gpu/drm/radeon/radeon_cp.c @@ -657,17 +657,10 @@ static void radeon_cp_init_ring_buffer(struct drm_device * dev, } else #endif ...
b266503072f824a82d585a6d41ebd591a2d7daa4
Analyze and fix the following issue in the Linux kernel code: drm: radeon: Fix RADEON_*_EMITED defines.
Problem Details: These are not supposed to be booleans, they are supposed to be bit masks. Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Dave Airlie <airlied@linux.ie>
```diff diff --git a/drivers/gpu/drm/radeon/radeon_drv.h b/drivers/gpu/drm/radeon/radeon_drv.h index a253cf071ec4..9b60a268dc7a 100644 --- a/drivers/gpu/drm/radeon/radeon_drv.h +++ b/drivers/gpu/drm/radeon/radeon_drv.h @@ -219,8 +219,8 @@ struct radeon_virt_surface { struct drm_file *file_priv; }; -#define RADEON_...
b07fa022ecf1e04fd0623877affe9e10bf45ac86
Analyze and fix the following issue in the Linux kernel code: drm: radeon: Fix ring_rptr accesses.
Problem Details: The memory behind ring_rptr can either be in ioremapped memory or a vmalloc() normal kernel memory buffer. However, the code unconditionally uses DRM_{READ,WRITE}32() (and thus readl() and writel()) to access it. Basically, if RADEON_IS_AGP then it's ioremap()'d memory else it's vmalloc'd memory. Ad...
```diff diff --git a/drivers/gpu/drm/radeon/radeon_cp.c b/drivers/gpu/drm/radeon/radeon_cp.c index 34c0b3f0c29e..8a8a82a2c170 100644 --- a/drivers/gpu/drm/radeon/radeon_cp.c +++ b/drivers/gpu/drm/radeon/radeon_cp.c @@ -43,6 +43,52 @@ static int radeon_do_cleanup_cp(struct drm_device * dev); static void radeon_do_cp_s...
8e1004580e0c862cb6bbe2ff8e496f846c54052f
Analyze and fix the following issue in the Linux kernel code: drm: Drop unused and broken dri_library_name sysfs attribute.
Problem Details: The kernel shouldn't be in the business of telling user space which driver to load. The kernel defers mapping PCI IDs to module names to user space and we should do the same for DRI drivers. And in fact, that's how it does work today. Nothing uses the dri_library_name attribute, and the attribute is...
```diff diff --git a/drivers/gpu/drm/drm_sysfs.c b/drivers/gpu/drm/drm_sysfs.c index 480546b542fe..f7510a8f0eb9 100644 --- a/drivers/gpu/drm/drm_sysfs.c +++ b/drivers/gpu/drm/drm_sysfs.c @@ -122,20 +122,6 @@ void drm_sysfs_destroy(void) class_destroy(drm_class); } -static ssize_t show_dri(struct device *device, st...
f77d390c9779c496aa5b99ec832996fb76bb1d13
Analyze and fix the following issue in the Linux kernel code: drm: Split drm_map and drm_local_map
Problem Details: Once upon a time, the DRM made the distinction between the drm_map data structure exchanged with user space and the drm_local_map used in the kernel. For some reasons, while the BSD port still has that "feature", the linux part abused drm_map for kernel internal usage as the local map only existed as ...
```diff diff --git a/drivers/gpu/drm/drm_bufs.c b/drivers/gpu/drm/drm_bufs.c index fab899eec051..1b8dbd5961bc 100644 --- a/drivers/gpu/drm/drm_bufs.c +++ b/drivers/gpu/drm/drm_bufs.c @@ -50,7 +50,7 @@ resource_size_t drm_get_resource_len(struct drm_device *dev, unsigned int resour EXPORT_SYMBOL(drm_get_resource_len); ...
d883f7f1b75c8dcafa891f7b9e69c5a2f0ff6d66
Analyze and fix the following issue in the Linux kernel code: drm: Use resource_size_t for drm_get_resource_{start, len}
Problem Details: The DRM uses its own wrappers to obtain resources from PCI devices, which currently convert the resource_size_t into an unsigned long. This is broken on 32-bit platforms with >32-bit physical address space. This fixes them, along with a few occurences of unsigned long used to store such a resource in...
```diff diff --git a/drivers/gpu/drm/drm_bufs.c b/drivers/gpu/drm/drm_bufs.c index 12715d3c078d..fab899eec051 100644 --- a/drivers/gpu/drm/drm_bufs.c +++ b/drivers/gpu/drm/drm_bufs.c @@ -36,13 +36,13 @@ #include <linux/vmalloc.h> #include "drmP.h" -unsigned long drm_get_resource_start(struct drm_device *dev, unsign...
fcef8576d8a64fc603e719c97d423f9f6d4e0e8b
Analyze and fix the following issue in the Linux kernel code: cpumask: convert arch/x86/kernel/nmi.c's backtrace_mask to a cpumask_var_t
Problem Details: Impact: cleanup, reduce memory usage for CONFIG_CPUMASK_OFFSTACK=y I *think* every path calls check_nmi_watchdog before using the watchdog, so that's the right place for the initialization. If that's wrong, we'll get a nice NULL-deref with CONFIG_CPUMASK_OFFSTACK=y, and have uncovered another bug. S...
```diff diff --git a/arch/x86/kernel/apic/nmi.c b/arch/x86/kernel/apic/nmi.c index bdfad80c3cf1..d6bd62407152 100644 --- a/arch/x86/kernel/apic/nmi.c +++ b/arch/x86/kernel/apic/nmi.c @@ -39,7 +39,7 @@ int unknown_nmi_panic; int nmi_watchdog_enabled; -static cpumask_t backtrace_mask = CPU_MASK_NONE; +static cpumask_...
5f77af93266e107bd46c010c51d772c0fb003232
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (10972): zl10353: i2c_gate_ctrl bug fix
Problem Details: zl10353 i2c-gate was always closed and due to that devices having tuner behind i2c-gate were broken. Add module configuration which allows disabling i2c-gate only when really needed. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/media/dvb/frontends/zl10353.c b/drivers/media/dvb/frontends/zl10353.c index 170720b02815..b150ed306696 100644 --- a/drivers/media/dvb/frontends/zl10353.c +++ b/drivers/media/dvb/frontends/zl10353.c @@ -590,7 +590,7 @@ static int zl10353_i2c_gate_ctrl(struct dvb_frontend* fe, int enable) s...
4bb9c5c02153dfc89a6c73a6f32091413805ad7d
Analyze and fix the following issue in the Linux kernel code: VM, x86, PAT: Change is_linear_pfn_mapping to not use vm_pgoff
Problem Details: Impact: fix false positive PAT warnings - also fix VirtalBox hang Use of vma->vm_pgoff to identify the pfnmaps that are fully mapped at mmap time is broken. vm_pgoff is set by generic mmap code even for cases where drivers are setting up the mappings at the fault time. The problem was originally repo...
```diff diff --git a/arch/x86/mm/pat.c b/arch/x86/mm/pat.c index e0ab173b6974..21bc1f787ae2 100644 --- a/arch/x86/mm/pat.c +++ b/arch/x86/mm/pat.c @@ -641,10 +641,11 @@ static int reserve_pfn_range(u64 paddr, unsigned long size, pgprot_t *vma_prot, is_ram = pat_pagerange_is_ram(paddr, paddr + size); /* - * reser...
53f5649b21a7c7b894d68ac4848eb01136fa64aa
Analyze and fix the following issue in the Linux kernel code: [ARM] pxa: fix typo in BANK_OFF() macro in gpio.h
Problem Details: The typo was originally fixed by Mike Rapoport and missed. And is later reported by Matthias Meier. Signed-off-by: Matthias Meier <matthias.j.meier@gmx.net> Signed-off-by: Mike Rapoport <mike@compulab.co.il> Signed-off-by: Eric Miao <eric.miao@marvell.com>
```diff diff --git a/arch/arm/mach-pxa/include/mach/gpio.h b/arch/arm/mach-pxa/include/mach/gpio.h index 406fa102cb40..c72c89a2285e 100644 --- a/arch/arm/mach-pxa/include/mach/gpio.h +++ b/arch/arm/mach-pxa/include/mach/gpio.h @@ -30,7 +30,7 @@ #define GPIO_REGS_VIRT io_p2v(0x40E00000) -#define BANK_OFF(n) (((n) >...
aa8e4fc68d8024cd3132035d13c3cefa7baeac8f
Analyze and fix the following issue in the Linux kernel code: bitmap: fix end condition in bitmap_find_free_region
Problem Details: Guennadi Liakhovetski noticed that the end condition for the loop in bitmap_find_free_region() is wrong, and the "return if error" was also using the wrong conditional that would only trigger if the bitmap was an exact multiple of the allocation size, which is not necessarily the case with dma_alloc_fr...
```diff diff --git a/lib/bitmap.c b/lib/bitmap.c index 1338469ac849..35a1f7ff4149 100644 --- a/lib/bitmap.c +++ b/lib/bitmap.c @@ -948,15 +948,15 @@ done: */ int bitmap_find_free_region(unsigned long *bitmap, int bits, int order) { - int pos; /* scans bitmap by regions of size order */ + int pos, end; /* scans bi...
91219bcbdcccc1686b0ecce09e28825c93619c07
Analyze and fix the following issue in the Linux kernel code: x86: cpu_debug add write support for MSRs
Problem Details: Supported write flag for registers. currently write is enabled only for PMC MSR. [root@ht]# cat /sys/kernel/debug/x86/cpu/cpu1/pmc/0x300/value 0x0 [root@ht]# echo 1234 > /sys/kernel/debug/x86/cpu/cpu1/pmc/0x300/value [root@ht]# cat /sys/kernel/debug/x86/cpu/cpu1/pmc/0x300/value 0x4d2 [root@ht]# echo...
```diff diff --git a/arch/x86/include/asm/cpu_debug.h b/arch/x86/include/asm/cpu_debug.h index d24d64fcee04..56f1635e4617 100755 --- a/arch/x86/include/asm/cpu_debug.h +++ b/arch/x86/include/asm/cpu_debug.h @@ -171,16 +171,22 @@ struct cpu_private { struct cpu_debug_base { char *name; /* Register name */ unsign...
c1ab7e93c6ddf8a068719b97b7e26c3d8eba7c32
Analyze and fix the following issue in the Linux kernel code: x86: print out mtrr_range_state when user specify size
Problem Details: Impact: print more debug info Keep it consistent with autodetect version. Signed-off-by: Yinghai Lu <yinghai@kernel.org> LKML-Reference: <49B87C0A.4010105@kernel.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
```diff diff --git a/arch/x86/kernel/cpu/mtrr/main.c b/arch/x86/kernel/cpu/mtrr/main.c index 236a401b8259..311a4734609b 100644 --- a/arch/x86/kernel/cpu/mtrr/main.c +++ b/arch/x86/kernel/cpu/mtrr/main.c @@ -1424,6 +1424,8 @@ static int __init mtrr_cleanup(unsigned address_bits) if (!result[i].bad) { set_var_mt...
8ad9790588ee2e69118b2b294ddab6f3f0379ad9
Analyze and fix the following issue in the Linux kernel code: x86: more MTRR debug printouts
Problem Details: Impact: improve MTRR debugging messages There's still inefficiencies suspected with the MTRR sanitizing code, so make sure we get all the info we need from a dmesg. - Remove unneeded mtrr_show (It will only printout one time by first cpu, so it is no big deal.) - Also print out directly from get_m...
```diff diff --git a/arch/x86/kernel/cpu/mtrr/generic.c b/arch/x86/kernel/cpu/mtrr/generic.c index 0c0a455fe95c..964403520100 100644 --- a/arch/x86/kernel/cpu/mtrr/generic.c +++ b/arch/x86/kernel/cpu/mtrr/generic.c @@ -33,14 +33,6 @@ u64 mtrr_tom2; struct mtrr_state_type mtrr_state = {}; EXPORT_SYMBOL_GPL(mtrr_state)...
5c0e6f035df983210e4d22213aed624ced502d3d
Analyze and fix the following issue in the Linux kernel code: x86: fix code paths used by update_mptable
Problem Details: Impact: fix crashes under Xen due to unrobust e820 code find_e820_area_size() must return a properly distinguishable and out-of-bounds value when it fails, and -1UL does not meet that criteria on i386/PAE. Additionally, callers of the function must check against that value. early_reserve_e820() shoul...
```diff diff --git a/arch/x86/kernel/check.c b/arch/x86/kernel/check.c index 2ac0ab71412a..b617b1164f1e 100644 --- a/arch/x86/kernel/check.c +++ b/arch/x86/kernel/check.c @@ -83,7 +83,7 @@ void __init setup_bios_corruption_check(void) u64 size; addr = find_e820_area_size(addr, &size, PAGE_SIZE); - if (addr == ...
46d50c98d90cd7feaa5977a09c574063e5c99b3d
Analyze and fix the following issue in the Linux kernel code: x86, 32-bit: also limit NODES_HIGH_SHIFT here
Problem Details: Impact: configuration bug fix Just like for x86-64, the range of widths valid for NODE_SHIFT is not unbounded. The upper bound 64-bit uses is definitely also an upper bound for 32-bit. Signed-off-by: Jan Beulich <jbeulich@novell.com> LKML-Reference: <49B90F12.76E4.0078.0@novell.com> Signed-off-by: In...
```diff diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 87717f3687d2..076f4f85f6ea 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -1123,7 +1123,7 @@ config NUMA_EMU config NODES_SHIFT int "Maximum NUMA Nodes (as a power of 2)" if !MAXSMP - range 1 9 if X86_64 + range 1 9 default "9" if MAXSMP ...
dd63fdcc63f0f853b116b52e56200a0e0227cf5f
Analyze and fix the following issue in the Linux kernel code: x86: unify kmap_atomic_pfn() and iomap_atomic_prot_pfn(), fix
Problem Details: Impact: build fix Move kmap_atomic_prot_pfn() to iomap_32.c. It is used on all 32-bit kernels, while highmem_32.c is only built on highmem kernels. ( Note: the debug_kmap_atomic_prot() check is removed for now, that problem is handled via another patch. ) Reported-by: Thomas Gleixner <tglx@linutro...
```diff diff --git a/arch/x86/mm/highmem_32.c b/arch/x86/mm/highmem_32.c index f256e73542d7..522db5e3d0bf 100644 --- a/arch/x86/mm/highmem_32.c +++ b/arch/x86/mm/highmem_32.c @@ -121,24 +121,8 @@ void kunmap_atomic(void *kvaddr, enum km_type type) pagefault_enable(); } -void *kmap_atomic_prot_pfn(unsigned long pfn...
889a6c367283709a80dad9413488472596a1a1d2
Analyze and fix the following issue in the Linux kernel code: tracing: Don't use tracing_record_cmdline() in workqueue tracer fix
Problem Details: commit c3ffc7a40b7e94b094efe1c8ab4e24370a782b65 "Don't use tracing_record_cmdline() in workqueue tracer" has a race window. find_task_by_vpid() requires task_list_lock(). LKML-Reference: <20090313090042.43CD.A69D9226@jp.fujitsu.com> Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Sign...
```diff diff --git a/kernel/trace/trace_workqueue.c b/kernel/trace/trace_workqueue.c index fb5ccac8bbc0..9ab035b58cf1 100644 --- a/kernel/trace/trace_workqueue.c +++ b/kernel/trace/trace_workqueue.c @@ -193,12 +193,20 @@ static int workqueue_stat_show(struct seq_file *s, void *p) struct cpu_workqueue_stats *cws = p; ...
e447e1df2e568cd43d1918963c9f09fae85aea57
Analyze and fix the following issue in the Linux kernel code: tracing: explain why stack tracer is empty
Problem Details: If the stack tracing is disabled (by default) the stack_trace file will only contain the header: # cat /debug/tracing/stack_trace Depth Size Location (0 entries) ----- ---- -------- This can be frustrating to a developer that does not realize that the stack tracer ...
```diff diff --git a/kernel/trace/trace_stack.c b/kernel/trace/trace_stack.c index 4564fd94b0cd..91ccbf396c9a 100644 --- a/kernel/trace/trace_stack.c +++ b/kernel/trace/trace_stack.c @@ -245,6 +245,17 @@ static int trace_lookup_stack(struct seq_file *m, long i) #endif } +static void print_disabled(struct seq_file *...
2da03ecee6308ea174e8a02b92a3c4ec92e886c8
Analyze and fix the following issue in the Linux kernel code: tracing: fix stack tracer header
Problem Details: The stack tracer use to look like this: # cat /debug/tracing/stack_trace Depth Size Location (57 entries) ----- ---- -------- 0) 5088 16 mempool_alloc_slab+0x16/0x18 1) 5072 144 mempool_alloc+0x4d/0xfe 2) 4928 16 scsi_sg_alloc+0x4...
```diff diff --git a/kernel/trace/trace_stack.c b/kernel/trace/trace_stack.c index d0871bc0aca5..4564fd94b0cd 100644 --- a/kernel/trace/trace_stack.c +++ b/kernel/trace/trace_stack.c @@ -251,9 +251,9 @@ static int t_show(struct seq_file *m, void *v) int size; if (v == SEQ_START_TOKEN) { - seq_printf(m, " ...
7975a2be16dd42df2cab80c80cb6ece382edb6ec
Analyze and fix the following issue in the Linux kernel code: tracing: export trace formats to user space
Problem Details: The binary printk saves a pointer to the format string in the ring buffer. On output, the format is processed. But if the user is reading the ring buffer through a binary interface, the pointer is meaningless. This patch creates a file called printk_formats that maps the pointers to the formats. # c...
```diff diff --git a/kernel/trace/trace_printk.c b/kernel/trace/trace_printk.c index f307a11e2332..486785214e3e 100644 --- a/kernel/trace/trace_printk.c +++ b/kernel/trace/trace_printk.c @@ -4,18 +4,19 @@ * Copyright (C) 2008 Lai Jiangshan <laijs@cn.fujitsu.com> * */ +#include <linux/seq_file.h> +#include <linux/...
48ead02030f849d011259244bb4ea9b985479006
Analyze and fix the following issue in the Linux kernel code: tracing/core: bring back raw trace_printk for dynamic formats strings
Problem Details: Impact: fix callsites with dynamic format strings Since its new binary implementation, trace_printk() internally uses static containers for the format strings on each callsites. But the value is assigned once at build time, which means that it can't take dynamic formats. So this patch unearthes the r...
```diff diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 7742798c9208..1daca3b062bb 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h @@ -452,31 +452,45 @@ do { \ #define trace_printk(fmt, args...) \ do { \ - static const char *trace_printk_fmt \ - __attribute...
db526ca329f855510e8ce672332eba3304aed590
Analyze and fix the following issue in the Linux kernel code: tracing: show that buffer size is not expanded
Problem Details: Impact: do not confuse user on small trace buffer sizes When the system boots up, the trace buffer is small to conserve memory. It is only two pages per online CPU. When the tracer is used, it expands to the default value. This can confuse the user if they look at the buffer size and see only 7, but ...
```diff diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index 04ab8243a13d..62a63b2b33dd 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c @@ -2948,10 +2948,18 @@ tracing_entries_read(struct file *filp, char __user *ubuf, size_t cnt, loff_t *ppos) { struct trace_array *tr = filp->private_...
a123c52b46a1f84bcec3dc963351896c6d6afaf7
Analyze and fix the following issue in the Linux kernel code: tracing: fix comments about trace buffer resizing
Problem Details: Impact: cleanup Some of the comments about the trace buffer resizing is gobbledygook. And I wonder why people question if I'm a native English speaker. This patch makes the comments make a bit more sense. Reported-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Steven Rostedt <srostedt@...
```diff diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index c3946a6df34e..c61ee85c50bb 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c @@ -2336,7 +2336,8 @@ static int tracing_resize_ring_buffer(unsigned long size) /* * If kernel or user changes the size of the ring buffer - * it get com...
712e53e46a1da35fcd88c05aa0c675b10f7c0e9d
Analyze and fix the following issue in the Linux kernel code: ocfs2: Use xs->bucket to set xattr value outside
Problem Details: A long time ago, xs->base is allocated a 4K size and all the contents in the bucket are copied to the it. Now we use ocfs2_xattr_bucket to abstract xattr bucket and xs->base is initialized to the start of the bu_bhs[0]. So xs->base + offset will overflow when the value root is stored outside the first ...
```diff diff --git a/fs/ocfs2/xattr.c b/fs/ocfs2/xattr.c index c63efb5ef136..2563df89fc2a 100644 --- a/fs/ocfs2/xattr.c +++ b/fs/ocfs2/xattr.c @@ -4795,19 +4795,33 @@ static int ocfs2_xattr_bucket_set_value_outside(struct inode *inode, char *val, int value_len) { - int offset; + int ret, offset, block_of...
74e77eb30d0ecbb12964d005b439c8b84a505b84
Analyze and fix the following issue in the Linux kernel code: ocfs2: Fix a bug found by sparse check.
Problem Details: We need to use le32_to_cpu to test rec->e_cpos in ocfs2_dinode_insert_check. Signed-off-by: Tao Ma <tao.ma@oracle.com> Acked-by: Joel Becker <joel.becker@oracle.com> Signed-off-by: Mark Fasheh <mfasheh@suse.com>
```diff diff --git a/fs/ocfs2/alloc.c b/fs/ocfs2/alloc.c index 3a9e5deed74d..19e3a96aa02c 100644 --- a/fs/ocfs2/alloc.c +++ b/fs/ocfs2/alloc.c @@ -176,7 +176,8 @@ static int ocfs2_dinode_insert_check(struct inode *inode, BUG_ON(OCFS2_I(inode)->ip_dyn_features & OCFS2_INLINE_DATA_FL); mlog_bug_on_msg(!ocfs2_sparse...
ab03eca8d4754ef2ba9821d581975b10b8f317e7
Analyze and fix the following issue in the Linux kernel code: trivial: fix bad links in the ext2 and ext3 documentation
Problem Details: Trivial patch to fix bad links in the ext2 and ext3 documentation. Signed-off-by: Jody McIntyre <scjody@sun.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/Documentation/filesystems/ext2.txt b/Documentation/filesystems/ext2.txt index 4333e836c495..23448551cabe 100644 --- a/Documentation/filesystems/ext2.txt +++ b/Documentation/filesystems/ext2.txt @@ -373,10 +373,10 @@ Filesystem Resizing http://ext2resize.sourceforge.net/ Compression (*) http://e2c...
c12e56ef6951f4fce1afe9ef6aab9243ea9a9b04
Analyze and fix the following issue in the Linux kernel code: RDMA/nes: Don't allow userspace QPs to use STag zero
Problem Details: STag zero is a special STag that allows consumers to access any bus address without registering memory. The nes driver unfortunately allows STag zero to be used even with QPs created by unprivileged userspace consumers, which means that any process with direct verbs access to the nes device can read a...
```diff diff --git a/drivers/infiniband/hw/nes/nes_cm.c b/drivers/infiniband/hw/nes/nes_cm.c index a01b4488208b..4a65b96db2c8 100644 --- a/drivers/infiniband/hw/nes/nes_cm.c +++ b/drivers/infiniband/hw/nes/nes_cm.c @@ -2490,12 +2490,14 @@ static int nes_disconnect(struct nes_qp *nesqp, int abrupt) int ret = 0; stru...
7ef0d7377cb287e08f3ae94cebc919448e1f5dff
Analyze and fix the following issue in the Linux kernel code: fs: new inode i_state corruption fix
Problem Details: There was a report of a data corruption http://lkml.org/lkml/2008/11/14/121. There is a script included to reproduce the problem. During testing, I encountered a number of strange things with ext3, so I tried ext2 to attempt to reduce complexity of the problem. I found that fsstress would quickly ha...
```diff diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c index e5eaa62fd17f..e3fe9918faaf 100644 --- a/fs/fs-writeback.c +++ b/fs/fs-writeback.c @@ -274,6 +274,7 @@ __sync_single_inode(struct inode *inode, struct writeback_control *wbc) int ret; BUG_ON(inode->i_state & I_SYNC); + WARN_ON(inode->i_state & I_NEW)...
f272b7bc447553410dde691aa31fc531adf9c175
Analyze and fix the following issue in the Linux kernel code: memcg: use correct scan number at reclaim
Problem Details: Even when page reclaim is under mem_cgroup, # of scan page is determined by status of global LRU. Fix that. Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Cc: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp> Cc: Balbir S...
```diff diff --git a/mm/vmscan.c b/mm/vmscan.c index 6177e3bcd66b..e89517141657 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -1469,7 +1469,7 @@ static void shrink_zone(int priority, struct zone *zone, int file = is_file_lru(l); int scan; - scan = zone_page_state(zone, NR_LRU_BASE + l); + scan = zone_nr_pages...
1ba869ec581fd9078b684c56c399ffe3d2345e27
Analyze and fix the following issue in the Linux kernel code: acer-wmi: fix regression in backlight detection
Problem Details: Currently we disable the Acer WMI backlight device if there is no ACPI backlight device. As a result, we end up with no backlight device at all. We should instead disable it if there is an ACPI device, as the other laptop drivers do. This regression was introduced in febf2d9 ("Acer-WMI: fingers off ...
```diff diff --git a/drivers/platform/x86/acer-wmi.c b/drivers/platform/x86/acer-wmi.c index 94c9f911824e..6bcca616a704 100644 --- a/drivers/platform/x86/acer-wmi.c +++ b/drivers/platform/x86/acer-wmi.c @@ -1297,7 +1297,7 @@ static int __init acer_wmi_init(void) set_quirks(); - if (!acpi_video_backlight_support()...
7c48ed3383bfb2106694807361ec187fe8a4333d
Analyze and fix the following issue in the Linux kernel code: mmc: s3cmci: fix s3c2410_dma_config() arguments.
Problem Details: The s3cmci driver is calling s3c2410_dma_config with incorrect data for the DCON register. The S3C2410_DCON_HWTRIG is implicit in the channel configuration and the device selection of S3C2410_DCON_CH0_SDI is incorrect as the DMA system may not select channel 0. Signed-off-by: Ben Dooks <ben@simtec.co...
```diff diff --git a/drivers/mmc/host/s3cmci.c b/drivers/mmc/host/s3cmci.c index f4a67c65d301..2db166b7096f 100644 --- a/drivers/mmc/host/s3cmci.c +++ b/drivers/mmc/host/s3cmci.c @@ -793,8 +793,7 @@ static void s3cmci_dma_setup(struct s3cmci_host *host, host->mem->start + host->sdidata); if (!setup_ok) { ...
1b53dc74ef957f134d93e989150f983e92fb88e3
Analyze and fix the following issue in the Linux kernel code: MAINTAINERS: downgrade support for man-pages
Problem Details: Unfortunately, Linux Foundation funding for my work on man-pages/testing/doc under the auspices of the LF documentation fellowship unfortunately ran out a short while ago (after earlier attempts to seek funding, only Google stepped forward with a bit of further funding for the position), so the patch b...
```diff diff --git a/MAINTAINERS b/MAINTAINERS index 1c2ca1dc66f2..61aeb5aae244 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1469,8 +1469,6 @@ L: linux-acpi@vger.kernel.org S: Supported DOCUMENTATION (/Documentation directory) -P: Michael Kerrisk -M: mtk.manpages@gmail.com P: Randy Dunlap M: rdunlap@xenotime.ne...
a4e3f91b98d86ae0b5c816fe45190bb29ac32f71
Analyze and fix the following issue in the Linux kernel code: ds2760_battery.c: fix division by zero
Problem Details: The 'battery remaining capacity' calculation in drivers/power/ds2760_battery.c lacks a parameter check to a division operation which causes the kernel to oops on my board. [ 21.233750] Division by zero in kernel. [ 21.237646] [<c002955c>] (__div0+0x0/0x20) from [<c012561c>] (Ldiv0+0x8/0x10) [ 21...
```diff diff --git a/drivers/power/ds2760_battery.c b/drivers/power/ds2760_battery.c index 1d768928e0bb..a52d4a11652d 100644 --- a/drivers/power/ds2760_battery.c +++ b/drivers/power/ds2760_battery.c @@ -180,10 +180,13 @@ static int ds2760_battery_read_status(struct ds2760_device_info *di) di->empty_uAh = battery_inte...
e5bc49ba7439b9726006d031d440cba96819f0f8
Analyze and fix the following issue in the Linux kernel code: pipe_rdwr_fasync: fix the error handling to prevent the leak/crash
Problem Details: If the second fasync_helper() fails, pipe_rdwr_fasync() returns the error but leaves the file on ->fasync_readers. This was always wrong, but since 233e70f4228e78eb2f80dc6650f65d3ae3dbf17c "saner FASYNC handling on file close" we have the new problem. Because in this case setfl() doesn't set FASYNC b...
```diff diff --git a/fs/pipe.c b/fs/pipe.c index 3a48ba5179d5..14f502b89cf5 100644 --- a/fs/pipe.c +++ b/fs/pipe.c @@ -699,12 +699,12 @@ pipe_rdwr_fasync(int fd, struct file *filp, int on) int retval; mutex_lock(&inode->i_mutex); - retval = fasync_helper(fd, filp, on, &pipe->fasync_readers); - - if (retval >= 0...
8d0df7a3d1ecbaf5d5602a59055c8ca993855bed
Analyze and fix the following issue in the Linux kernel code: drivers/w1/masters/w1-gpio.c: fix read_bit()
Problem Details: W1 master implementations are expected to return 0 or 1 from their read_bit() function. However, not all platforms do return these values from gpio_get_value() - namely PXAs won't. Hence the w1 gpio-master needs to break the result down to 0 or 1 itself. Signed-off-by: Daniel Mack <daniel@caiaq.de> ...
```diff diff --git a/drivers/w1/masters/w1-gpio.c b/drivers/w1/masters/w1-gpio.c index 9e1138a75e8b..a411702413d6 100644 --- a/drivers/w1/masters/w1-gpio.c +++ b/drivers/w1/masters/w1-gpio.c @@ -39,7 +39,7 @@ static u8 w1_gpio_read_bit(void *data) { struct w1_gpio_platform_data *pdata = data; - return gpio_get_val...
00699e8472cc0209d57b5c5614bc2ec98e665004
Analyze and fix the following issue in the Linux kernel code: uml: fix WARNING: vmlinux: 'memcpy' exported twice
Problem Details: Fix the following warning on x86_64: LD vmlinux.o MODPOST vmlinux.o WARNING: vmlinux: 'memcpy' exported twice. Previous export was in vmlinux For x86_64, this symbol is already exported from arch/um/sys-x86_64/ksyms.c. Reported-by: Boaz Harrosh <bharrosh@panasas.com> Signed-off-by: WANG Cong <xiyou....
```diff diff --git a/arch/um/os-Linux/user_syms.c b/arch/um/os-Linux/user_syms.c index 74f49bb9b125..89b48a116a89 100644 --- a/arch/um/os-Linux/user_syms.c +++ b/arch/um/os-Linux/user_syms.c @@ -14,7 +14,6 @@ #undef memset extern size_t strlen(const char *); -extern void *memcpy(void *, const void *, size_t); exte...
86d6f2bf61eb2a28fa63c0a19330d36226426477
Analyze and fix the following issue in the Linux kernel code: UML on UML fixed: it did not start
Problem Details: It is currently impossible to run a user-mode linux machine inside another user-mode linux (UML on UML). It breaks after a few instructions. When it tries to check whether SYSEMU is installed (the inner) UML receives an inconsistent result (from the outer UML). This is the output of a broken attempt...
```diff diff --git a/arch/um/kernel/ptrace.c b/arch/um/kernel/ptrace.c index 15e8b7c4de13..8e3d69e4fcb5 100644 --- a/arch/um/kernel/ptrace.c +++ b/arch/um/kernel/ptrace.c @@ -64,6 +64,11 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) ret = poke_user(child, addr, data); break; ...
1522ac3ec95ff0230e7aa516f86b674fdf72866c
Analyze and fix the following issue in the Linux kernel code: [ARM] Fix virtual to physical translation macro corner cases
Problem Details: The current use of these macros works well when the conversion is entirely linear. In this case, we can be assured that the following holds true: __va(p + s) - s = __va(p) However, this is not always the case, especially when there is a non-linear conversion (eg, when there is a 3.5GB hole in memor...
```diff diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c index 310e479309ef..f1ef5613ccd4 100644 --- a/arch/arm/mm/dma-mapping.c +++ b/arch/arm/mm/dma-mapping.c @@ -490,26 +490,30 @@ core_initcall(consistent_init); */ void dma_cache_maint(const void *start, size_t size, int direction) { - const vo...
446c92b2901bedb3725d29b4e73def8aba623ffc
Analyze and fix the following issue in the Linux kernel code: [ARM] 5421/1: ftrace: fix crash due to tracing of __naked functions
Problem Details: This is a fix for the following crash observed in 2.6.29-rc3: http://lkml.org/lkml/2009/1/29/150 On ARM it doesn't make sense to trace a naked function because then mcount is called without stack and frame pointer being set up and there is no chance to restore the lr register to the value before mcoun...
```diff diff --git a/arch/arm/kernel/fiq.c b/arch/arm/kernel/fiq.c index 36f81d967979..6ff7919613d7 100644 --- a/arch/arm/kernel/fiq.c +++ b/arch/arm/kernel/fiq.c @@ -88,7 +88,7 @@ void set_fiq_handler(void *start, unsigned int length) * disable irqs for the duration. Note - these functions are almost * entirely c...
6a958d5b28e4a180458e0d319d2e4bb5c4b7da3e
Analyze and fix the following issue in the Linux kernel code: pci: Fix typo in message while disabling HT MSI mapping
Problem Details: "Enabling" should read "Disabling" Signed-off-by: Prakash Punnoor <prakash@punnoor.de> Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
```diff diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index 9104671e4b72..92b9efe9bcaf 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c @@ -2122,7 +2122,7 @@ static void __devinit ht_disable_msi_mapping(struct pci_dev *dev) if (pci_read_config_byte(dev, pos + HT_MSI_FLAGS, &flags) == ...
7726c3308a92b4a4c3bd059059498fca0e6f8e48
Analyze and fix the following issue in the Linux kernel code: pci: don't disable too many HT MSI mapping
Problem Details: Prakash's system needs MSI disabled on some bridges, but not all. This seems to be the minimal fix for 2.6.29, but should be replaced during 2.6.30. Signed-off-by: Prakash Punnoor <prakash@punnoor.de> Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
```diff diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index 1a7c48d71dc7..9104671e4b72 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c @@ -2166,6 +2166,10 @@ static void __devinit nv_msi_ht_cap_quirk(struct pci_dev *dev) int pos; int found; + /* Enabling HT MSI mapping on this device break...
649426efcfbc67a8b033497151816cbac9fd0cfa
Analyze and fix the following issue in the Linux kernel code: PCI: Add PCI quirk to disable L0s ASPM state for 82575 and 82598
Problem Details: This patch is intended to disable L0s ASPM link state for 82598 (ixgbe) parts due to the fact that it is possible to corrupt TX data when coming back out of L0s on some systems. The workaround had been added for 82575 (igb) previously, but did not use the ASPM api. This quirk uses the ASPM api to pre...
```diff diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index f20d55368edb..1a7c48d71dc7 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c @@ -23,6 +23,7 @@ #include <linux/acpi.h> #include <linux/kallsyms.h> #include <linux/dmi.h> +#include <linux/pci-aspm.h> #include "pci.h" int isa_dma_bri...
9f4c899c0d90e1b51b6864834f3877b47c161a0e
Analyze and fix the following issue in the Linux kernel code: NFS: Fix the fix to Bugzilla #11061, when IPv6 isn't defined...
Problem Details: Stephen Rothwell reports: Today's linux-next build (powerpc ppc64_defconfig) failed like this: fs/built-in.o: In function `.nfs_get_client': client.c:(.text+0x115010): undefined reference to `.__ipv6_addr_type' Fix by moving the IPV6 specific parts of commit d7371c41b0cda782256b1df759df4e8d4724584c ...
```diff diff --git a/fs/nfs/client.c b/fs/nfs/client.c index 06654b831d19..574158ae2398 100644 --- a/fs/nfs/client.c +++ b/fs/nfs/client.c @@ -255,6 +255,32 @@ static int nfs_sockaddr_match_ipaddr(const struct sockaddr *sa1, } return 0; } + +/* + * Test if two ip6 socket addresses refer to the same socket by + * c...
947a9aca86eb2a921ed7aa92397cf7f38b896f90
Analyze and fix the following issue in the Linux kernel code: [SCSI] zfcp: fix queue, scheduled work processing.
Problem Details: Ensure the refcounting is correct even if we were not able to schedule a work. In addition we have to make sure no scheduled work is pending while we're dequeing the adapter from the systems environment. Signed-off-by: Swen Schillig <swen@vnet.ibm.com> Signed-off-by: Christof Schmitt <christof.schmitt...
```diff diff --git a/drivers/s390/scsi/zfcp_aux.c b/drivers/s390/scsi/zfcp_aux.c index b2be6593b563..c4d07be6279a 100644 --- a/drivers/s390/scsi/zfcp_aux.c +++ b/drivers/s390/scsi/zfcp_aux.c @@ -554,6 +554,7 @@ void zfcp_adapter_dequeue(struct zfcp_adapter *adapter) cancel_work_sync(&adapter->scan_work); cancel_w...
77c019768f0607c36e25bec11ce3e1eabef09277
Analyze and fix the following issue in the Linux kernel code: [SCSI] fix /proc memory leak in the SCSI core
Problem Details: The SCSI core calls scsi_proc_hostdir_add() from within scsi_host_alloc(), but the corresponding scsi_proc_hostdir_rm() routine is called from within scsi_remove_host(). As a result, if a host is allocated and then deallocated without ever being registered, the host's directory in /proc is leaked. Th...
```diff diff --git a/drivers/scsi/hosts.c b/drivers/scsi/hosts.c index aa670a1d1513..89d41a424b33 100644 --- a/drivers/scsi/hosts.c +++ b/drivers/scsi/hosts.c @@ -176,7 +176,6 @@ void scsi_remove_host(struct Scsi_Host *shost) transport_unregister_device(&shost->shost_gendev); device_unregister(&shost->shost_dev); ...
b409063a9b7a56c0d658feaffedeb74ad71edce7
Analyze and fix the following issue in the Linux kernel code: [SCSI] sym53c8xx: fix bogus free_irq() on error path
Problem Details: If sym_attach() gets an error at or before request_irq(), then sym_free_resources() will call free_irq() for an unregistered interrupt handler. Signed-off-by: Tony Battersby <tonyb@cybernetics.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
```diff diff --git a/drivers/scsi/sym53c8xx_2/sym_glue.c b/drivers/scsi/sym53c8xx_2/sym_glue.c index cef03e768367..a8ac60caadc0 100644 --- a/drivers/scsi/sym53c8xx_2/sym_glue.c +++ b/drivers/scsi/sym53c8xx_2/sym_glue.c @@ -1238,12 +1238,13 @@ static int sym53c8xx_proc_info(struct Scsi_Host *shost, char *buffer, /* *...
07b9d81e849f64b990e943de6ad75b63dafe5a4b
Analyze and fix the following issue in the Linux kernel code: [SCSI] sym53c8xx: fix NULL deref on error path
Problem Details: If sym_attach() fails to allocate np, the error path will dereference a NULL pointer for printk. Signed-off-by: Tony Battersby <tonyb@cybernetics.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
```diff diff --git a/drivers/scsi/sym53c8xx_2/sym_glue.c b/drivers/scsi/sym53c8xx_2/sym_glue.c index ff5be958d3d3..cef03e768367 100644 --- a/drivers/scsi/sym53c8xx_2/sym_glue.c +++ b/drivers/scsi/sym53c8xx_2/sym_glue.c @@ -1418,7 +1418,7 @@ static struct Scsi_Host * __devinit sym_attach(struct scsi_host_template *tpnt,...
d3ce65d12668ef1e3a164d48e04c59228d5ecf7b
Analyze and fix the following issue in the Linux kernel code: [SCSI] sym53c8xx: fix shost use-after-free and memory leak
Problem Details: This patch fixes two bugs: 1) rmmod sym53c8xx uses shost after freeing it with scsi_put_host(shost). 2) insmod sym53c8xx doesn't call scsi_put_host(shost) if scsi_add_host() fails, causing a memory leak on the error path. Signed-off-by: Tony Battersby <tonyb@cybernetics.com> Signed-off-by: Jam...
```diff diff --git a/drivers/scsi/sym53c8xx_2/sym_glue.c b/drivers/scsi/sym53c8xx_2/sym_glue.c index f4e6cde1fd0d..ff5be958d3d3 100644 --- a/drivers/scsi/sym53c8xx_2/sym_glue.c +++ b/drivers/scsi/sym53c8xx_2/sym_glue.c @@ -1660,6 +1660,7 @@ static int sym_detach(struct Scsi_Host *shost, struct pci_dev *pdev) OUTB(np,...
2cf22be045ee1b29f9ce5cf4f4552811bb24916a
Analyze and fix the following issue in the Linux kernel code: [SCSI] ipr: Expose debug and fastfail parameters
Problem Details: Expose the debug and fastfail parameters to /sys/module/ipr/parameters such that they can be enabled/disabled at run time. Signed-off-by: Wayne Boyer <wayneb@linux.vnet.ibm.com> Acked-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
```diff diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c index 9d54c2006855..def473f0a98f 100644 --- a/drivers/scsi/ipr.c +++ b/drivers/scsi/ipr.c @@ -152,13 +152,13 @@ module_param_named(log_level, ipr_log_level, uint, 0); MODULE_PARM_DESC(log_level, "Set to 0 - 4 for increasing verbosity of device driver"); mod...
97218a1499391b174ea95e05b7a40fbb73e79813
Analyze and fix the following issue in the Linux kernel code: [SCSI] libosd: Fix NULL dereference BUG when target is not OSD conformant
Problem Details: Very old OSC's Target had a BUG in the Get/Set attributes where it was looking in the wrong places for attribute lists length. If used with the open-osd initiator, the initiator would dereference a NULL pointer when retrieving system_information attributes. Checks are added that retrieval of each attr...
```diff diff --git a/drivers/scsi/osd/osd_initiator.c b/drivers/scsi/osd/osd_initiator.c index 0bbbf271fbb0..552f58b655d1 100644 --- a/drivers/scsi/osd/osd_initiator.c +++ b/drivers/scsi/osd/osd_initiator.c @@ -131,7 +131,7 @@ static int _osd_print_system_info(struct osd_dev *od, void *caps) pFirst = get_attrs[a++]...
c96952ed7031e7c576ecf90cf95b8ec099d5295a
Analyze and fix the following issue in the Linux kernel code: [SCSI] sg: avoid blk_put_request/blk_rq_unmap_user in interrupt
Problem Details: This fixes the following oops: http://marc.info/?l=linux-kernel&m=123316111415677&w=2 You can reproduce this bug by interrupting a program before a sg response completes. This leads to the special sg state (the orphan state), then sg calls blk_put_request in interrupt (rq->end_io). The above bug rep...
```diff diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c index 18d079e3990e..cdd83cf97100 100644 --- a/drivers/scsi/sg.c +++ b/drivers/scsi/sg.c @@ -138,6 +138,7 @@ typedef struct sg_request { /* SG_MAX_QUEUE requests outstanding per file */ volatile char done; /* 0->before bh, 1->before read, 2->read */ struct r...