id stringlengths 40 40 | instruction stringlengths 68 308 | input stringlengths 17 33.4k | output stringlengths 100 30k |
|---|---|---|---|
867556fe740d0d29a05fce99d2d960625077ed45 | Analyze and fix the following issue in the Linux kernel code: PCI Hotplug: cpqphp: refactor cpqhp_probe | Problem Details:
Apply DeMorgan's theorem:
if ((pdev->revision > 2) || (vendor_id == PCI_VENDOR_ID_INTEL))
turns into
if ((pdev->revision <= 2) && (vendor_id != PCI_VENDOR_ID_INTEL))
Now we can bail out early from the function if the controller is not
supported.
This allows us to un-indent the remainder of the f... | ```diff
diff --git a/drivers/pci/hotplug/cpqphp_core.c b/drivers/pci/hotplug/cpqphp_core.c
index 195c8c9b33e0..857e466df71d 100644
--- a/drivers/pci/hotplug/cpqphp_core.c
+++ b/drivers/pci/hotplug/cpqphp_core.c
@@ -887,214 +887,202 @@ static int cpqhpc_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
* F... |
64f039d3d7f574943165b1afb72ee25caa1a9a91 | Analyze and fix the following issue in the Linux kernel code: PCI: ibmphp_core.c: fix warning due to missing module_exit() | Problem Details:
drivers/pci/hotplug/ibmphp_core.c:1414: warning: `ibmphp_exit' defined but not used
Signed-off-by: Zhenwen Xu <helight.xu@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> | ```diff
diff --git a/drivers/pci/hotplug/ibmphp_core.c b/drivers/pci/hotplug/ibmphp_core.c
index dd18f857dfb0..29ccb8a6da8a 100644
--- a/drivers/pci/hotplug/ibmphp_core.c
+++ b/drivers/pci/hotplug/ibmphp_core.c
@@ -1419,3 +1419,4 @@ static void __exit ibmphp_exit(void)
}
module_init(ibmphp_init);
+module_exit(ibmph... |
3aef392822e1a42e80077a332ea2efdfd8a4248a | Analyze and fix the following issue in the Linux kernel code: asm-generic: make get_rtc_time overridable | Problem Details:
Evidently, set_rtc_time is supposed to be overridable
by architectures that define their own version, but
unfortunately, get_rtc_ss would in that case still
use the generic version.
This makes get_rtc_ss call the real set_rtc_time
to let architectures define their own version.
The change should fix th... | ```diff
diff --git a/include/asm-generic/rtc.h b/include/asm-generic/rtc.h
index 763e3b060f43..fa86f240c874 100644
--- a/include/asm-generic/rtc.h
+++ b/include/asm-generic/rtc.h
@@ -202,7 +202,7 @@ static inline unsigned int get_rtc_ss(void)
{
struct rtc_time h;
- __get_rtc_time(&h);
+ get_rtc_time(&h);
return ... |
e42e27736de80045f925564ea27a1d32957219e7 | Analyze and fix the following issue in the Linux kernel code: inotify/dnotify: should_send_event shouldn't match on FS_EVENT_ON_CHILD | Problem Details:
inotify and dnotify will both indicate that they want any event which came
from a child inode. The fix is to mask off FS_EVENT_ON_CHILD when deciding
if inotify or dnotify is interested in a given event.
Signed-off-by: Eric Paris <eparis@redhat.com> | ```diff
diff --git a/fs/notify/dnotify/dnotify.c b/fs/notify/dnotify/dnotify.c
index ec459b6e8c64..98a751614c74 100644
--- a/fs/notify/dnotify/dnotify.c
+++ b/fs/notify/dnotify/dnotify.c
@@ -153,6 +153,7 @@ static bool dnotify_should_send_event(struct fsnotify_group *group,
if (!entry)
return false;
+ mask = (ma... |
98eb0f53e2fc66482e2ea8033c58b20a079e5260 | Analyze and fix the following issue in the Linux kernel code: wimax: fix gcc warnings in sh4 when calling BUG() | Problem Details:
SH4's BUG() seems to confuse the compiler as it is considered to
return; thus, some functions would trigger usage of uninitialized
variables or non-void functions returning void.
Work around by initializing/returning.
Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com> | ```diff
diff --git a/drivers/net/wimax/i2400m/op-rfkill.c b/drivers/net/wimax/i2400m/op-rfkill.c
index 487ec58cea46..43927b5d7ad6 100644
--- a/drivers/net/wimax/i2400m/op-rfkill.c
+++ b/drivers/net/wimax/i2400m/op-rfkill.c
@@ -54,8 +54,10 @@ int i2400m_radio_is(struct i2400m *i2400m, enum wimax_rf_state state)
/* st... |
d2f4c10544231c3681f937a1e511f4780b4b39af | Analyze and fix the following issue in the Linux kernel code: wimax: fix warning caused by not checking retval of rfkill_set_hw_state() | Problem Details:
Caused by an API update. The return value can be safely ignored, as
there is notthing we can do with it.
Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com> | ```diff
diff --git a/net/wimax/op-rfkill.c b/net/wimax/op-rfkill.c
index bb102e4aa3e9..70ef4df863b9 100644
--- a/net/wimax/op-rfkill.c
+++ b/net/wimax/op-rfkill.c
@@ -113,7 +113,8 @@ void wimax_report_rfkill_hw(struct wimax_dev *wimax_dev,
else
wimax_state = WIMAX_ST_RADIO_OFF;
- rfkill_set_hw_state(wimax_dev... |
9e28c46b7dd116a607ffb054c5545c468c77d779 | Analyze and fix the following issue in the Linux kernel code: sh: Fix dynamic ftrace's NOP action. | Problem Details:
Ftrace on sh handles nop'ing out trace function calls differently than
other architectures. Instead of inserting NOP instructions in place of
the call to the function tracer we branch over the call instructions
and continue executing the main body of the function.
This patch fixes a bug in the impleme... | ```diff
diff --git a/arch/sh/kernel/ftrace.c b/arch/sh/kernel/ftrace.c
index 040cdc6a67ed..066f37dc32a9 100644
--- a/arch/sh/kernel/ftrace.c
+++ b/arch/sh/kernel/ftrace.c
@@ -19,30 +19,37 @@
#include <asm/ftrace.h>
#include <asm/cacheflush.h>
-static unsigned char ftrace_nop[] = {
- 0x09, 0x00, /* nop */
- 0x09, 0... |
42399adb239d4f1413899cc618ecf640779e79df | Analyze and fix the following issue in the Linux kernel code: x86/oprofile: replace CTR_OVERFLOWED macros | Problem Details:
The patch replaces all CTR_OVERFLOWED macros. 64 bit MSR functions and
64 bit counter values are used now. Thus, it will be easier to later
extend the models to use more than 32 bit width counters.
Signed-off-by: Robert Richter <robert.richter@amd.com> | ```diff
diff --git a/arch/x86/oprofile/op_model_amd.c b/arch/x86/oprofile/op_model_amd.c
index 2406ab863605..b5d678fbf038 100644
--- a/arch/x86/oprofile/op_model_amd.c
+++ b/arch/x86/oprofile/op_model_amd.c
@@ -26,11 +26,10 @@
#define NUM_COUNTERS 4
#define NUM_CONTROLS 4
#define OP_EVENT_MASK 0x0FFF
+#define OP_C... |
ec064c093e254f4433afb17dcef7f964c76436af | Analyze and fix the following issue in the Linux kernel code: x86/oprofile: fix and cleanup CTRL_SET_* macros | Problem Details:
This patch fixes missing braces around macro parameters. Macro
definitions from intel_arch_perfmon.h are used where possible.
Signed-off-by: Robert Richter <robert.richter@amd.com> | ```diff
diff --git a/arch/x86/oprofile/op_model_ppro.c b/arch/x86/oprofile/op_model_ppro.c
index 6c5d288c566e..61ee8f640535 100644
--- a/arch/x86/oprofile/op_model_ppro.c
+++ b/arch/x86/oprofile/op_model_ppro.c
@@ -18,7 +18,6 @@
#include <asm/msr.h>
#include <asm/apic.h>
#include <asm/nmi.h>
-#include <asm/intel_arc... |
768c31495abe49227a96261b5aa19f34b30882b1 | Analyze and fix the following issue in the Linux kernel code: CRISv32: irq.c - Move end brace outside #endif | Problem Details:
The end brace for a larger for statement was placed inside the #else
part of #ifdef TIMER_VECT1. However, for all current chips, the
define TIMER_VECT1 is always unset, and the error was never triggered.
Move the brace down below the #endif.
Fixes:
http://bugzilla.kernel.org/show_bug.cgi?id=13476
Re... | ```diff
diff --git a/arch/cris/arch-v32/kernel/irq.c b/arch/cris/arch-v32/kernel/irq.c
index df3925cb1c7f..9c9eb5b708fc 100644
--- a/arch/cris/arch-v32/kernel/irq.c
+++ b/arch/cris/arch-v32/kernel/irq.c
@@ -428,8 +428,8 @@ crisv32_do_multiple(struct pt_regs* regs)
masked[i] &= ~TIMER_MASK;
do_IRQ(TIMER0_INTR_... |
91a120d03fd901fc8b95e85af7903358c5862d65 | Analyze and fix the following issue in the Linux kernel code: CRISv32: Fix potential null reference in cryptocop driver. | Problem Details:
The code didn't test the pointer to the newly allocated
memory, but a parameter sent in as value.
Since the input parameter was most often set, the code
would have used a null pointer if the kmalloc failed.
If the input parameter was not set, the code would
leak the allocated buffer.
http://bugzilla.k... | ```diff
diff --git a/arch/cris/arch-v32/drivers/cryptocop.c b/arch/cris/arch-v32/drivers/cryptocop.c
index 67c61ea86813..fd529a0ec758 100644
--- a/arch/cris/arch-v32/drivers/cryptocop.c
+++ b/arch/cris/arch-v32/drivers/cryptocop.c
@@ -1395,7 +1395,7 @@ static int create_md5_pad(int alloc_flag, unsigned long long hashed... |
8164491dd628ffcac5d61267f747997689ee256c | Analyze and fix the following issue in the Linux kernel code: mISDN: Do not disable IRQ in ph_data_ind() | Problem Details:
This fix triggering the WARN_ON_ONCE(in_irq() || irqs_disabled()); in
local_bh_enable().
Here is no need to grab this lock, this was wrong at all and may
cause a deadlock and access to freed memory, since on a TEI remove
the current listelement can be deleted under us. So this is clearly
a case for li... | ```diff
diff --git a/drivers/isdn/mISDN/tei.c b/drivers/isdn/mISDN/tei.c
index bfcdd97df95d..e04bad6c5baf 100644
--- a/drivers/isdn/mISDN/tei.c
+++ b/drivers/isdn/mISDN/tei.c
@@ -862,8 +862,7 @@ static int
ph_data_ind(struct manager *mgr, struct sk_buff *skb)
{
int ret = -EINVAL;
- struct layer2 *l2;
- u_long fla... |
395df11f5fa7fe852be28ccec8aaa15634386ad1 | Analyze and fix the following issue in the Linux kernel code: drivers/isdn/i4l/isdn_tty.c: fix check for array overindexing | Problem Details:
The check for overindexing of dev->mdm.info[] has an off-by-one.
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Acked-by: Karsten Keil <keil@b1-systems.de> | ```diff
diff --git a/drivers/isdn/i4l/isdn_tty.c b/drivers/isdn/i4l/isdn_tty.c
index 1a2222cbb805..b4d4522e5071 100644
--- a/drivers/isdn/i4l/isdn_tty.c
+++ b/drivers/isdn/i4l/isdn_tty.c
@@ -1592,7 +1592,7 @@ isdn_tty_open(struct tty_struct *tty, struct file *filp)
int retval, line;
line = tty->index;
- if (line ... |
1ce1513f48e3bc4d55ee672f0e39f5063a02ab7a | Analyze and fix the following issue in the Linux kernel code: mISDN: Fix overlapping data access | Problem Details:
Remove code rewriting a buffer by itself.
This fix bug 12970 on bugzilla.kernel.org.
Signed-off-by: Karsten Keil <keil@b1-systems.de> | ```diff
diff --git a/drivers/isdn/mISDN/dsp_pipeline.c b/drivers/isdn/mISDN/dsp_pipeline.c
index ac61f198eb32..e9941678edfa 100644
--- a/drivers/isdn/mISDN/dsp_pipeline.c
+++ b/drivers/isdn/mISDN/dsp_pipeline.c
@@ -55,20 +55,19 @@ static ssize_t
attr_show_args(struct device *dev, struct device_attribute *attr, char *b... |
8a745b9d91962991ce87a649a4dc3af3206c2c8b | Analyze and fix the following issue in the Linux kernel code: ISDN:Fix DMA alloc for hfcpci | Problem Details:
Replace wrong code with correct DMA API functions.
Signed-off-by: Karsten Keil <keil@b1-systems.de> | ```diff
diff --git a/drivers/isdn/hisax/hfc_pci.c b/drivers/isdn/hisax/hfc_pci.c
index f1265667b062..3d337d924c23 100644
--- a/drivers/isdn/hisax/hfc_pci.c
+++ b/drivers/isdn/hisax/hfc_pci.c
@@ -82,8 +82,9 @@ release_io_hfcpci(struct IsdnCardState *cs)
Write_hfc(cs, HFCPCI_INT_M2, cs->hw.hfcpci.int_m2);
pci_write_c... |
22fb4e71e646695c7e0f379ada66b372c2d1aa1a | Analyze and fix the following issue in the Linux kernel code: irq: use kcalloc() instead of the bootmem allocator | Problem Details:
Fixes the following problem:
[ 0.000000] Experimental hierarchical RCU init done.
[ 0.000000] NR_IRQS:4352 nr_irqs:256
[ 0.000000] ------------[ cut here ]------------
[ 0.000000] WARNING: at mm/bootmem.c:537 alloc_arch_preferred_bootmem+0x40/0x7e()
[ 0.000000] Hardware name: To Be Fill... | ```diff
diff --git a/kernel/irq/handle.c b/kernel/irq/handle.c
index e161999b6683..104578541230 100644
--- a/kernel/irq/handle.c
+++ b/kernel/irq/handle.c
@@ -164,7 +164,7 @@ int __init early_irq_init(void)
node = first_online_node;
/* allocate irq_desc_ptrs array based on nr_irqs */
- irq_desc_ptrs = alloc_boot... |
83b519e8b9572c319c8e0c615ee5dd7272856090 | Analyze and fix the following issue in the Linux kernel code: slab: setup allocators earlier in the boot sequence | Problem Details:
This patch makes kmalloc() available earlier in the boot sequence so we can get
rid of some bootmem allocations. The bulk of the changes are due to
kmem_cache_init() being called with interrupts disabled which requires some
changes to allocator boostrap code.
Note: 32-bit x86 does WP protect test in m... | ```diff
diff --git a/init/main.c b/init/main.c
index bb7dc57eee36..0ab82a453de5 100644
--- a/init/main.c
+++ b/init/main.c
@@ -574,6 +574,28 @@ asmlinkage void __init start_kernel(void)
setup_nr_cpu_ids();
smp_prepare_boot_cpu(); /* arch-specific boot-cpu hooks */
+ build_all_zonelists();
+ page_alloc_init();
+
+... |
c91c4773b334d4d3a6d44626dc2a558ad97b86f3 | Analyze and fix the following issue in the Linux kernel code: bootmem: fix slab fallback on numa | Problem Details:
If the user requested bootmem allocation on a specific node, we should use
kzalloc_node() for the fallback allocation.
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Pekka En... | ```diff
diff --git a/mm/bootmem.c b/mm/bootmem.c
index 457269c73e81..282df0a09e6f 100644
--- a/mm/bootmem.c
+++ b/mm/bootmem.c
@@ -665,6 +665,9 @@ static void * __init ___alloc_bootmem_node(bootmem_data_t *bdata,
void * __init __alloc_bootmem_node(pg_data_t *pgdat, unsigned long size,
unsigned long align, unsi... |
0822ee4ac1ae6af5a953f97f75553738834b10b9 | Analyze and fix the following issue in the Linux kernel code: kmemleak: Simple testing module for kmemleak | Problem Details:
This patch adds a loadable module that deliberately leaks memory. It
is used for testing various memory leaking scenarios.
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> | ```diff
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index 5cc3506574e9..116a35051be6 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -358,6 +358,16 @@ config DEBUG_KMEMLEAK
In order to access the kmemleak file, debugfs needs to be
mounted (usually at /sys/kernel/debug).
+config DEBUG_KMEMLEAK... |
3bba00d7bdd57cb7aa739b751fa0a1fbbb04dc18 | Analyze and fix the following issue in the Linux kernel code: kmemleak: Enable the building of the memory leak detector | Problem Details:
This patch adds the Kconfig.debug and Makefile entries needed for
building kmemleak into the kernel.
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> | ```diff
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index 6cdcf38f2da9..5cc3506574e9 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -336,6 +336,28 @@ config SLUB_STATS
out which slabs are relevant to a particular load.
Try running: slabinfo -DA
+config DEBUG_KMEMLEAK
+ bool "Kernel memory le... |
2e1483c995bbd0fa6cbd055ad76088a520799ba4 | Analyze and fix the following issue in the Linux kernel code: kmemleak: Remove some of the kmemleak false positives | Problem Details:
There are allocations for which the main pointer cannot be found but
they are not memory leaks. This patch fixes some of them. For more
information on false positives, see Documentation/kmemleak.txt.
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> | ```diff
diff --git a/drivers/char/vt.c b/drivers/char/vt.c
index 08151d4de489..961c1a788c61 100644
--- a/drivers/char/vt.c
+++ b/drivers/char/vt.c
@@ -104,6 +104,7 @@
#include <linux/io.h>
#include <asm/system.h>
#include <linux/uaccess.h>
+#include <linux/kmemleak.h>
#define MAX_NR_CON_DRIVER 16
@@ -2880,6 +28... |
04f70336c80c43a15e617b36c2043dfa0ad6ed0f | Analyze and fix the following issue in the Linux kernel code: kmemleak: Add documentation on the memory leak detector | Problem Details:
This patch adds the Documentation/kmemleak.txt file with some
information about how kmemleak works.
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> | ```diff
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index 4a3c2209a124..04a44cc5048a 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -1077,6 +1077,10 @@ and is between 256 and 4096 characters. It is defined in the file
Configur... |
db5c444eeb781788a0db36a2682b2417cf71f764 | Analyze and fix the following issue in the Linux kernel code: FRV: BUG to BUG_ON changes | Problem Details:
Change some BUG()'s to BUG_ON()'s.
Signed-off-by: Stoyan Gaydarov <stoyboyker@gmail.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | ```diff
diff --git a/arch/frv/include/asm/pci.h b/arch/frv/include/asm/pci.h
index 585d9b49949a..cc685e60b0f9 100644
--- a/arch/frv/include/asm/pci.h
+++ b/arch/frv/include/asm/pci.h
@@ -87,8 +87,7 @@ static inline void pci_dma_sync_single(struct pci_dev *hwdev,
dma_addr_t dma_handle,
size_t siz... |
26bbb3ff1ff6163d6a233055766e26af8054a212 | Analyze and fix the following issue in the Linux kernel code: imx: serial: fix one bit field type | Problem Details:
"have_rtscts" is assigned 1, while it is declared
int:1, two's complement, which can hold 0 and -1
only. The code works, as the upper bits are cut
off, and tests are done against 0 only.
Nonetheless, correctly declaring the bit field
as unsigned int:1 renders the code more robust.
Signed-off-by: Dani... | ```diff
diff --git a/drivers/serial/imx.c b/drivers/serial/imx.c
index 76c8fa1884ec..6b8f12f4a705 100644
--- a/drivers/serial/imx.c
+++ b/drivers/serial/imx.c
@@ -211,7 +211,7 @@ struct imx_port {
struct timer_list timer;
unsigned int old_status;
int txirq,rxirq,rtsirq;
- int have_rtscts:1;
+ unsigned int h... |
d3810cd4d7064b109574374f73c41b11b481dbf2 | Analyze and fix the following issue in the Linux kernel code: imx: serial: fix whitespaces (no changes in functionality) | Problem Details:
Signed-off-by: Oskar Schirmer <os@emlix.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | ```diff
diff --git a/drivers/serial/imx.c b/drivers/serial/imx.c
index 5f0be40dfdab..76c8fa1884ec 100644
--- a/drivers/serial/imx.c
+++ b/drivers/serial/imx.c
@@ -302,8 +302,7 @@ static inline void imx_transmit_buffer(struct imx_port *sport)
/* send xmit->buf[xmit->tail]
* out the port here */
writel(xmit->bu... |
b9a44bc19f48fd82b8f411500a9bb0ea4153d23c | Analyze and fix the following issue in the Linux kernel code: sierra: driver urb handling improvements | Problem Details:
[Folded from eight patches into one as the original set according to the
author "All of the patches need to be applied to obtain a working product"
so keeping them split seems unhelpful
Merge fixes done versus other conflicting changes and moved the
spin_lock_init from open to setup time -- Alan]
... | ```diff
diff --git a/drivers/usb/serial/sierra.c b/drivers/usb/serial/sierra.c
index 222a6230276b..88ec7bfd9d35 100644
--- a/drivers/usb/serial/sierra.c
+++ b/drivers/usb/serial/sierra.c
@@ -26,12 +26,10 @@
#include <linux/module.h>
#include <linux/usb.h>
#include <linux/usb/serial.h>
-#include <linux/usb/ch9.h>
... |
7d55deaf50182c47c1e805dc8cc85f2769f0673e | Analyze and fix the following issue in the Linux kernel code: timbuart: Fix the termios logic | Problem Details:
The driver only handles speeds but it fails to return the current values
for the hardware features it does not support.
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | ```diff
diff --git a/drivers/serial/timbuart.c b/drivers/serial/timbuart.c
index 30ba3c4cc180..ac9e5d5f742e 100644
--- a/drivers/serial/timbuart.c
+++ b/drivers/serial/timbuart.c
@@ -278,7 +278,7 @@ static int get_bindex(int baud)
int i;
for (i = 0; i < ARRAY_SIZE(baudrates); i++)
- if (baud == baudrates[i])
+ ... |
93d5581e20600593ec3236921b6620225fb76034 | Analyze and fix the following issue in the Linux kernel code: devpts: unregister the file system on error | Problem Details:
Closes-bug: http://bugzilla.kernel.org/show_bug.cgi?id=13429
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | ```diff
diff --git a/fs/devpts/inode.c b/fs/devpts/inode.c
index c68edb969441..9b1d285f9fe6 100644
--- a/fs/devpts/inode.c
+++ b/fs/devpts/inode.c
@@ -557,8 +557,10 @@ static int __init init_devpts_fs(void)
int err = register_filesystem(&devpts_fs_type);
if (!err) {
devpts_mnt = kern_mount(&devpts_fs_type);
- i... |
7f8d09eae26a8108406583192996561665b36371 | Analyze and fix the following issue in the Linux kernel code: tty: fix bluetooth scribbling on low latency flags | Problem Details:
Bluetooth shouldn't be doing this as most drivers don't support the flag,
furthermore it shouldn't be needed with newer buffering. This becomes rather
more visible as the locking fixes make the abuse of low_latency visible as
spew on the users console/dmesg.
Signed-off-by: Alan Cox <alan@linux.intel.c... | ```diff
diff --git a/drivers/bluetooth/hci_ldisc.c b/drivers/bluetooth/hci_ldisc.c
index 688015128594..4895f0e05322 100644
--- a/drivers/bluetooth/hci_ldisc.c
+++ b/drivers/bluetooth/hci_ldisc.c
@@ -463,7 +463,6 @@ static int hci_uart_tty_ioctl(struct tty_struct *tty, struct file * file,
clear_bit(HCI_UART_PROTO_S... |
557aaa7ffab639d0190b935a041b16ae44606342 | Analyze and fix the following issue in the Linux kernel code: ft232: support the ASYNC_LOW_LATENCY flag | Problem Details:
This allows users to use the standard setserial command with this FT232
feature as well as obscure chip specific interfaces we have now. We keep
track of and respect the sysfs value for non-low-latency cases. In theory we
could do smart stuff with VTIME and the like but this seems of questionable
worth... | ```diff
diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c
index d9d87111f9a9..21c053c31b9e 100644
--- a/drivers/usb/serial/ftdi_sio.c
+++ b/drivers/usb/serial/ftdi_sio.c
@@ -89,6 +89,7 @@ struct ftdi_private {
int force_rtscts; /* if non-zero, force RTS-CTS to always
be enabled */
+... |
35ff69357949cfff5c3d8e3038b77146872e3bd3 | Analyze and fix the following issue in the Linux kernel code: Blackfin Serial Driver: handle irregular DMA register status in auto start mode | Problem Details:
This bug is caused by irregular behavior of DMA register CURR_X_COUNT
and CURR_Y_COUNT when an auto restart uart rx DMA run to last byte in
DMA buffer, trigger the interrupt and stay at this possiton. The status
of current x and y is 0:7 instead of 512:8 or 0:8. The driver doesn't
take care of this cas... | ```diff
diff --git a/drivers/serial/bfin_5xx.c b/drivers/serial/bfin_5xx.c
index 676efdad3712..854e96dfb070 100644
--- a/drivers/serial/bfin_5xx.c
+++ b/drivers/serial/bfin_5xx.c
@@ -490,7 +490,7 @@ void bfin_serial_rx_dma_timeout(struct bfin_serial_port *uart)
uart->rx_dma_nrows = get_dma_curr_ycount(uart->rx_dma_ch... |
f9d36da9cdc2504cd9bb6034cfaba0673ce2d6df | Analyze and fix the following issue in the Linux kernel code: Blackfin Serial Driver: fix missing new lines when under load | Problem Details:
Add a SSYNC() into bfin_serial_dma_tx_chars() to ensure DMA registers are
written with new data otherwise we might miss a byte or two when the
system is under load. PIO mode is OK though.
Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: ... | ```diff
diff --git a/drivers/serial/bfin_5xx.c b/drivers/serial/bfin_5xx.c
index dfae22d47bf7..676efdad3712 100644
--- a/drivers/serial/bfin_5xx.c
+++ b/drivers/serial/bfin_5xx.c
@@ -415,6 +415,7 @@ static void bfin_serial_dma_tx_chars(struct bfin_serial_port *uart)
set_dma_start_addr(uart->tx_dma_channel, (unsigned ... |
7de7c55bf54dede2bd2262349fc7b558bcc8e413 | Analyze and fix the following issue in the Linux kernel code: Blackfin Serial Driver: fix baudrate for early_printk | Problem Details:
Since we already setup the early console UART in
arch/blackfin/kernel/early_printk.c, and common functions which are
enabled from the .setup will override the proper settings later, don't
fill in these structures. Otherwise we get mangled baudrate settings when
using early_printk.
Signed-off-by: Robi... | ```diff
diff --git a/drivers/serial/bfin_5xx.c b/drivers/serial/bfin_5xx.c
index 65a4c07f6199..dfae22d47bf7 100644
--- a/drivers/serial/bfin_5xx.c
+++ b/drivers/serial/bfin_5xx.c
@@ -1272,12 +1272,17 @@ static __init void early_serial_write(struct console *con, const char *s,
}
}
+/*
+ * This should have a .setup ... |
8516c568f25666a012ec4c859e640a76fc9b6ec0 | Analyze and fix the following issue in the Linux kernel code: Blackfin Serial Driver: fix error while transferring large files | Problem Details:
Ignore receiving data if new position is in the same line of current
buffer tail and is small. This should decrease overruns.
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Signed-off-by: Alan Cox <al... | ```diff
diff --git a/drivers/serial/bfin_5xx.c b/drivers/serial/bfin_5xx.c
index d86123e03391..65a4c07f6199 100644
--- a/drivers/serial/bfin_5xx.c
+++ b/drivers/serial/bfin_5xx.c
@@ -477,6 +477,15 @@ void bfin_serial_rx_dma_timeout(struct bfin_serial_port *uart)
spin_lock_irqsave(&uart->port.lock, flags);
+ /* 2D... |
a19e8b205915b2925aca75b2d2bf0c3104c8be14 | Analyze and fix the following issue in the Linux kernel code: Blackfin SPORT UART: fix data misses while using transmit frame sync | Problem Details:
SPORT transmit frame sync (TFS) isn't used as an electrical signal during
normal SPORT UART emulation. However, it is useful in EIA RS-485
emulation as RS-485 Transceiver Driver Enable DE strobe.
This patch configures:
TFS to be active high in order to drive an DE strobe of
an eventually connected RS... | ```diff
diff --git a/drivers/serial/bfin_sport_uart.c b/drivers/serial/bfin_sport_uart.c
index fd5cb9576a06..6687ccd422b7 100644
--- a/drivers/serial/bfin_sport_uart.c
+++ b/drivers/serial/bfin_sport_uart.c
@@ -149,7 +149,7 @@ static int sport_uart_setup(struct sport_uart_port *up, int sclk, int baud_rate)
int tclkdi... |
b5c6794fe4256fd63664aa185c468647c28bfd4a | Analyze and fix the following issue in the Linux kernel code: Blackfin SPORT UART: fix typo in sport_set_termios prototype | Problem Details:
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | ```diff
diff --git a/drivers/serial/bfin_sport_uart.c b/drivers/serial/bfin_sport_uart.c
index 529c0ff7952c..fd5cb9576a06 100644
--- a/drivers/serial/bfin_sport_uart.c
+++ b/drivers/serial/bfin_sport_uart.c
@@ -419,7 +419,7 @@ static void sport_shutdown(struct uart_port *port)
}
static void sport_set_termios(struct... |
257a6e8cc7f9274f0af090494a3f1ee06548b5bd | Analyze and fix the following issue in the Linux kernel code: icom: fix compile errors when defining ICOM_TRACE | Problem Details:
As it is, defining ICOM_TRACE produces some compile errors, as
"parameter name omitted" and "redefinition of ‘trace’"
This patch removes the wrong trace definition.
Signed-off-by: Breno Leitao <leitao@linux.vnet.ibm.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Linus Torvalds <to... | ```diff
diff --git a/drivers/serial/icom.c b/drivers/serial/icom.c
index fd5fd23804bc..9f2891c2c4a2 100644
--- a/drivers/serial/icom.c
+++ b/drivers/serial/icom.c
@@ -137,7 +137,12 @@ static LIST_HEAD(icom_adapter_head);
static spinlock_t icom_lock;
#ifdef ICOM_TRACE
-static inline void trace(struct icom_port *, ch... |
73e0d48b8c28fb39a0bb6713c875e9919a9af546 | Analyze and fix the following issue in the Linux kernel code: parport_pc: Fix subscription bugs | Problem Details:
This patch fixes array subscription bugs in the parport_pc driver.
drivers/parport/parport_pc.c: In function ‘parport_irq_probe’:
drivers/parport/parport_pc.c:1589: warning: array subscript is above array bounds
drivers/parport/parport_pc.c: In function ‘parport_pc_probe_port’:
drivers/parport/parport... | ```diff
diff --git a/drivers/parport/parport_pc.c b/drivers/parport/parport_pc.c
index 4e63cc9e2778..24984c4a1ba4 100644
--- a/drivers/parport/parport_pc.c
+++ b/drivers/parport/parport_pc.c
@@ -1246,17 +1246,17 @@ static void __devinit show_parconfig_smsc37c669(int io, int key)
(cr1 & 0x08 ) ? "Standard mode... |
cc3447d179d8a5e16807e52b77d7f4c095ffedb7 | Analyze and fix the following issue in the Linux kernel code: tty: iuu_phoenix: Fix stopbit when uart goes on. | Problem Details:
Signed-off-by: Olivier Bornet <Olivier.Bornet@puck.ch>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | ```diff
diff --git a/drivers/usb/serial/iuu_phoenix.c b/drivers/usb/serial/iuu_phoenix.c
index 637d0ddbfb42..ef6d12fd579c 100644
--- a/drivers/usb/serial/iuu_phoenix.c
+++ b/drivers/usb/serial/iuu_phoenix.c
@@ -815,7 +815,7 @@ static int iuu_uart_on(struct usb_serial_port *port)
buf[0] = IUU_UART_ENABLE;
buf[1] = (... |
5fcf62b0f1f24ee25931636216f28bc87448a60f | Analyze and fix the following issue in the Linux kernel code: tty: iuu_phoenix: fix locking. | Problem Details:
Bring in the relevant bits of the 0.9 vendor driver.
Signed-off-by: Olivier Bornet <Olivier.Bornet@puck.ch>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | ```diff
diff --git a/drivers/usb/serial/iuu_phoenix.c b/drivers/usb/serial/iuu_phoenix.c
index bb572cee6ecd..637d0ddbfb42 100644
--- a/drivers/usb/serial/iuu_phoenix.c
+++ b/drivers/usb/serial/iuu_phoenix.c
@@ -650,32 +650,33 @@ static int iuu_bulk_write(struct usb_serial_port *port)
unsigned long flags;
int result... |
5f0878acba7db24323f5ba4055ec9a96895bb150 | Analyze and fix the following issue in the Linux kernel code: tty: Fix oops when scanning the polling list for kgdb | Problem Details:
Costantino Leandro found a bug in tty_find_polling_driver and provided a
patch that fixed the crash but not the underlying bug. This fixes the
underlying bug where the list walk corrupts the values it is using on a
match but then reuses them if the open fails.
Signed-off-by: Alan Cox <alan@lxorguk.uku... | ```diff
diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c
index 66b99a2049e3..6c817398232e 100644
--- a/drivers/char/tty_io.c
+++ b/drivers/char/tty_io.c
@@ -295,7 +295,7 @@ struct tty_driver *tty_find_polling_driver(char *name, int *line)
struct tty_driver *p, *res = NULL;
int tty_line = 0;
int len;
- c... |
620df3c0a5b70656c4de6049825de214f108218e | Analyze and fix the following issue in the Linux kernel code: pty: Fix a comment | Problem Details:
We fixed the globals, so now fix the comment
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | ```diff
diff --git a/drivers/char/pty.c b/drivers/char/pty.c
index 31038a0052a2..da2cb8c70c11 100644
--- a/drivers/char/pty.c
+++ b/drivers/char/pty.c
@@ -30,7 +30,6 @@
#include <asm/system.h>
-/* These are global because they are accessed in tty_io.c */
#ifdef CONFIG_UNIX98_PTYS
static struct tty_driver *ptm_dr... |
38db89799bdf11625a831c5af33938dcb11908b6 | Analyze and fix the following issue in the Linux kernel code: tty: throttling race fix | Problem Details:
The tty throttling code can race due to the lock drops. It takes very high
loads but this has been observed and verified by Rob Duncan.
The basic problem is that on an SMP box we can go
CPU #1 CPU #2
need to throttle ?
suppose we should buffer space cleared
are we throttled
yes ? - u... | ```diff
diff --git a/drivers/char/tty_ioctl.c b/drivers/char/tty_ioctl.c
index 6f4c7d0a53bf..2401dbcbee9c 100644
--- a/drivers/char/tty_ioctl.c
+++ b/drivers/char/tty_ioctl.c
@@ -97,14 +97,19 @@ EXPORT_SYMBOL(tty_driver_flush_buffer);
* @tty: terminal
*
* Indicate that a tty should stop transmitting data down the... |
5b0ed5263cb089500052f8c1ab6e0706bebf0d83 | Analyze and fix the following issue in the Linux kernel code: x86: fix ktermios-termio conversion | Problem Details:
The legacy TCSETA{,W,F} ioctls failed to set the termio->c_line field
on x86. This adds a missing get_user.
The same ioctls also fail to report faulting user pointers, which
we keep ignoring.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Li... | ```diff
diff --git a/arch/x86/include/asm/termios.h b/arch/x86/include/asm/termios.h
index f72956331c49..c4ee8056baca 100644
--- a/arch/x86/include/asm/termios.h
+++ b/arch/x86/include/asm/termios.h
@@ -67,6 +67,7 @@ static inline int user_termio_to_kernel_termios(struct ktermios *termios,
SET_LOW_TERMIOS_BITS(termio... |
c3301a5c04800bcf8afc8a815bf9e570a4e25a08 | Analyze and fix the following issue in the Linux kernel code: epca: fix test_bit parameters | Problem Details:
Switch from ASYNC_* to ASYNCB_*, because test_bit expects
bit number, not mask.
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | ```diff
diff --git a/drivers/char/epca.c b/drivers/char/epca.c
index 8797b7742350..710ee9333057 100644
--- a/drivers/char/epca.c
+++ b/drivers/char/epca.c
@@ -1518,7 +1518,7 @@ static void doevent(int crd)
if (event & MODEMCHG_IND) {
/* A modem signal change has been indicated */
ch->imodem = mstat;
- if (... |
a391ad0f09014856bbc4eeea309593eba977b3b0 | Analyze and fix the following issue in the Linux kernel code: rocket: fix test_bit parameters | Problem Details:
Switch from ASYNC_* to ASYNCB_*, because {test,set}_bit expect
bit number, not mask.
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | ```diff
diff --git a/drivers/char/rocket.c b/drivers/char/rocket.c
index 7399188049d8..63d5b628477a 100644
--- a/drivers/char/rocket.c
+++ b/drivers/char/rocket.c
@@ -939,7 +939,7 @@ static int rp_open(struct tty_struct *tty, struct file *filp)
/*
* Info->count is now 1; so it's safe to sleep now.
*/
- if (!tes... |
6e47e069eb4dffa88ad91ddfc3fd85f32c35654b | Analyze and fix the following issue in the Linux kernel code: tty: Clean up the ACM driver to CodingStyle | Problem Details:
Or at least most of it. There are further clean ups possible and there are
are also thing checkpatch moans about that would be silly to "fix".
Also note some FIXME points found as the cleanup was done.
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-founda... | ```diff
diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c
index b4e73aa759d6..ddeb69192537 100644
--- a/drivers/usb/class/cdc-acm.c
+++ b/drivers/usb/class/cdc-acm.c
@@ -16,7 +16,8 @@
* v0.9 - thorough cleaning, URBification, almost a rewrite
* v0.10 - some more cleanups
* v0.11 - fixed flow... |
963118eef9e6706e2b5356309fb0cdd9c9eba81d | Analyze and fix the following issue in the Linux kernel code: tty: cyclades, fix nports handling | Problem Details:
Set up ports right after FW load so that we won't allocate maximal
(64) ports when we use few.
Also remove reading of nports in irq context, since we know it from
initialisation now.
This also fixes a tty ports unregistration on some fail paths and for
Ze which registered 64 and unregistered real por... | ```diff
diff --git a/drivers/char/cyclades.c b/drivers/char/cyclades.c
index c9a503f4724a..6adbc9759661 100644
--- a/drivers/char/cyclades.c
+++ b/drivers/char/cyclades.c
@@ -604,7 +604,6 @@
#define NR_PORTS 256
-#define ZE_V1_NPORTS 64
#define ZO_V1 0
#define ZO_V2 1
#define ZE_V1 2
@@ -1777,7 +1776,6 @@ stati... |
b263c2c8bf13c273485bd99dbbeba79c844409dd | Analyze and fix the following issue in the Linux kernel code: Btrfs: fix extent_buffer leak during tree log replay | Problem Details:
During tree log replay, we read in the tree log roots,
process them and then free them. A recent change
takes an extra reference on the root node of the tree
when the root is read in, and stores that reference
in root->commit_root.
This reference was not being freed, leaving us with
one buffer pinned... | ```diff
diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c
index 2b41fc08c34a..c13922206d1b 100644
--- a/fs/btrfs/tree-log.c
+++ b/fs/btrfs/tree-log.c
@@ -3019,6 +3019,7 @@ again:
key.offset = found_key.offset - 1;
wc.replay_dest->log_root = NULL;
free_extent_buffer(log->node);
+ free_extent_buffer(log->c... |
0b4dcea579a1b6f4d249d61f5bc8adeaa7c895d8 | Analyze and fix the following issue in the Linux kernel code: Btrfs: fix oops when btrfs_inherit_iflags called with a NULL dir | Problem Details:
This happens during subvol creation.
Signed-off-by: Chris Mason <chris.mason@oracle.com> | ```diff
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index 926332a73cde..eff18f5b5362 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -112,7 +112,12 @@ void btrfs_update_iflags(struct inode *inode)
*/
void btrfs_inherit_iflags(struct inode *inode, struct inode *dir)
{
- unsigned int flags = BTRFS_I(dir)... |
334a47f6345560af047f164c356d71c3226965d5 | Analyze and fix the following issue in the Linux kernel code: netfilter: nf_ct_tcp: fix up build after merge | Problem Details:
Replace the last occurence of tcp_lock by the per-conntrack lock.
Signed-off-by: Patrick McHardy <kaber@trash.net> | ```diff
diff --git a/net/netfilter/nf_conntrack_proto_tcp.c b/net/netfilter/nf_conntrack_proto_tcp.c
index 5142e60af540..33fc0a443f3d 100644
--- a/net/netfilter/nf_conntrack_proto_tcp.c
+++ b/net/netfilter/nf_conntrack_proto_tcp.c
@@ -944,7 +944,7 @@ static int tcp_packet(struct nf_conn *ct,
&& (ct->proto.tcp.se... |
4f64e150191bfddc7f5c0768f325f747dbca1913 | Analyze and fix the following issue in the Linux kernel code: ALSA: pcm - Update document about xrun_debug proc file | Problem Details:
Signed-off-by: Takashi Iwai <tiwai@suse.de> | ```diff
diff --git a/Documentation/sound/alsa/Procfile.txt b/Documentation/sound/alsa/Procfile.txt
index cfac20cf9e33..381908d8ca42 100644
--- a/Documentation/sound/alsa/Procfile.txt
+++ b/Documentation/sound/alsa/Procfile.txt
@@ -88,26 +88,34 @@ card*/pcm*/info
substreams, etc.
card*/pcm*/xrun_debug
- This file a... |
18473473880622b671a73dfdcaf03e9b526e0fb2 | Analyze and fix the following issue in the Linux kernel code: [ARM] pxa: fix the conflicting non-static declarations of global_gpios[] | Problem Details:
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
Cc: Philipp Zabel <philipp.zabel@gmail.com>
Acked-by: Robert Jarzmik <robert.jarzmik@free.fr> | ```diff
diff --git a/arch/arm/mach-pxa/hx4700.c b/arch/arm/mach-pxa/hx4700.c
index 0f6568005e16..7fff467e84fc 100644
--- a/arch/arm/mach-pxa/hx4700.c
+++ b/arch/arm/mach-pxa/hx4700.c
@@ -802,7 +802,7 @@ static struct platform_device *devices[] __initdata = {
&pcmcia,
};
-struct gpio_ress global_gpios[] = {
+static... |
0dc8335aa3e59f1adbb0fce7c9c0b342146cd036 | Analyze and fix the following issue in the Linux kernel code: oprofile: remove irq_flags in struct op_entry | Problem Details:
This became obsolete with this commit:
304cc6a ring_buffer: remove unused flags parameter, fix
Signed-off-by: Robert Richter <robert.richter@amd.com> | ```diff
diff --git a/include/linux/oprofile.h b/include/linux/oprofile.h
index 1d9518bc4c58..dbbe2dbc4418 100644
--- a/include/linux/oprofile.h
+++ b/include/linux/oprofile.h
@@ -171,7 +171,6 @@ struct op_sample;
struct op_entry {
struct ring_buffer_event *event;
struct op_sample *sample;
- unsigned long irq_flags... |
067c28adc53807514ac0c6ebb6af3243cbd071fa | Analyze and fix the following issue in the Linux kernel code: Btrfs: fix -o nodatasum printk spelling | Problem Details:
It was printing nodatacsum, which was not the correct option name.
Signed-off-by: Chris Mason <chris.mason@oracle.com> | ```diff
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
index 3427db28f6fe..708ac06b953b 100644
--- a/fs/btrfs/super.c
+++ b/fs/btrfs/super.c
@@ -159,7 +159,7 @@ int btrfs_parse_options(struct btrfs_root *root, char *options)
*/
break;
case Opt_nodatasum:
- printk(KERN_INFO "btrfs: setting nodatacsum\n")... |
85d4198e40c289dd623cecd16601fa613559bed7 | Analyze and fix the following issue in the Linux kernel code: Btrfs: check duplicate backrefs for both data and metadata | Problem Details:
lookup_inline_extent_backref only checks for duplicate backref for data
extents. It assumes backrefs for tree block never conflict.
This patch makes lookup_inline_extent_backref check for duplicate backrefs
for both data and tree block, so that we can detect potential bug earlier.
This is a safety che... | ```diff
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index 33a65f2c8a37..edc7d208c5ce 100644
--- a/fs/btrfs/extent-tree.c
+++ b/fs/btrfs/extent-tree.c
@@ -1056,8 +1056,7 @@ int lookup_inline_extent_backref(struct btrfs_trans_handle *trans,
want = extent_ref_type(parent, owner);
if (insert) {
extr... |
130aa61a77b8518f1ea618e1b7d214d60b405f10 | Analyze and fix the following issue in the Linux kernel code: bonding: fix multiple module load problem | Problem Details:
Some users still load bond module multiple times to create bonding
devices. This accidentally was broken by a later patch about
the time sysfs was fixed. According to Jay, it was broken
by:
commit b8a9787eddb0e4665f31dd1d64584732b2b5d051
Author: Jay Vosburgh <fubar@us.ibm.com>
Date: Fri Ju... | ```diff
diff --git a/drivers/net/bonding/bond_sysfs.c b/drivers/net/bonding/bond_sysfs.c
index 3a1b7b04eb79..5fb861a08664 100644
--- a/drivers/net/bonding/bond_sysfs.c
+++ b/drivers/net/bonding/bond_sysfs.c
@@ -1541,6 +1541,7 @@ int bond_create_sysfs(void)
printk(KERN_ERR
"network device named %s already... |
5ef12d98a19254ee5dc851bd83e214b43ec1f725 | Analyze and fix the following issue in the Linux kernel code: neigh: fix state transition INCOMPLETE->FAILED via Netlink request | Problem Details:
The current code errors out the INCOMPLETE neigh entry skb queue only from
the timer if maximum probes have been attempted and there has been no reply.
This also causes the transtion to FAILED state.
However, the neigh entry can be also updated via Netlink to inform that the
address is unavailable. C... | ```diff
diff --git a/net/core/neighbour.c b/net/core/neighbour.c
index c54229befcfe..163b4f5b0365 100644
--- a/net/core/neighbour.c
+++ b/net/core/neighbour.c
@@ -771,6 +771,28 @@ static __inline__ int neigh_max_probes(struct neighbour *n)
p->ucast_probes + p->app_probes + p->mcast_probes);
}
+static void neigh_i... |
6e053d6c79b3c1c9f6efc6563a811023c41be86a | Analyze and fix the following issue in the Linux kernel code: wimax/i2400m: don't reset device when bootrom init retries are exceeded | Problem Details:
When i2400m_bootrom_init() fails to put the device into a state of
being ready to accept firmware, the driver was currently trying to
reset it if it failed to do so. This is not too useful; as part of
trying to put the device in the right state a few resets have already
been tried.
At this point, thin... | ```diff
diff --git a/drivers/net/wimax/i2400m/fw.c b/drivers/net/wimax/i2400m/fw.c
index 349344ad9b61..e81750e54452 100644
--- a/drivers/net/wimax/i2400m/fw.c
+++ b/drivers/net/wimax/i2400m/fw.c
@@ -696,8 +696,7 @@ error_dev_gone:
return result;
error_timeout:
- dev_err(dev, "Timed out waiting for reboot ack, rese... |
59063afa0afabc68d2b6ca0d106da9165e1c7d39 | Analyze and fix the following issue in the Linux kernel code: wimax/i2400m: fix oops when the TX FIFO fills up due to a missing check | Problem Details:
When the TX FIFO filled up and i2400m_tx_new() failed to allocate a
new TX message header, a missing check for said condition was causing a
kernel oops when trying to dereference a NULL i2400m->tx_msg pointer.
Found and diagnosed by Cindy H. Kao.
Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel... | ```diff
diff --git a/drivers/net/wimax/i2400m/tx.c b/drivers/net/wimax/i2400m/tx.c
index 4295dcf96ee2..fa16ccf8e26a 100644
--- a/drivers/net/wimax/i2400m/tx.c
+++ b/drivers/net/wimax/i2400m/tx.c
@@ -653,6 +653,8 @@ try_new:
i2400m_tx_close(i2400m);
i2400m_tx_new(i2400m);
}
+ if (i2400m->tx_msg == NULL)
+ goto ... |
2971a5bac8cab3cb56f19e9c494ecb3b120c5199 | Analyze and fix the following issue in the Linux kernel code: wimax/i2400m: fix panic due to missed corner cases on tail_room calculation | Problem Details:
i2400m_tx_skip_tail() needs to handle the special case of being called
when the tail room that is left over in the FIFO is zero.
This happens when a TX message header was opened at the very end of
the FIFO (without payloads). The i2400m_tx_close() code already marked
said TX message (header) to be ski... | ```diff
diff --git a/drivers/net/wimax/i2400m/tx.c b/drivers/net/wimax/i2400m/tx.c
index 7c46c05a5866..4295dcf96ee2 100644
--- a/drivers/net/wimax/i2400m/tx.c
+++ b/drivers/net/wimax/i2400m/tx.c
@@ -277,6 +277,48 @@ enum {
#define TAIL_FULL ((void *)~(unsigned long)NULL)
+/*
+ * Calculate how much tail room is ava... |
c56affafdd29eb9764b0e35e3434cc06f6bc3781 | Analyze and fix the following issue in the Linux kernel code: wimax/i2400m: fix panic/warnings caused by missed check on empty TX message | Problem Details:
In some situations, when a new TX message header is started, there
might be no space for data payloads. In this case the message is left
with zero payloads and the i2400m_tx_close() function has just to mark
it as "to skip". If it tries to go ahead it will overwrite things
because there is no space to ... | ```diff
diff --git a/drivers/net/wimax/i2400m/tx.c b/drivers/net/wimax/i2400m/tx.c
index a635fd720f3e..7c46c05a5866 100644
--- a/drivers/net/wimax/i2400m/tx.c
+++ b/drivers/net/wimax/i2400m/tx.c
@@ -474,10 +474,18 @@ void i2400m_tx_close(struct i2400m *i2400m)
struct i2400m_msg_hdr *tx_msg_moved;
size_t aligned_siz... |
ead68239913cb9c19150facf1656517f81d66fcb | Analyze and fix the following issue in the Linux kernel code: wimax/i2400m: Change d_printf() level for secure boot messages | Problem Details:
Changing debug level of print out to support validation engineers
getting the messages they need.
Signed-off-by: <dirk.j.brandewie@intel.com> | ```diff
diff --git a/drivers/net/wimax/i2400m/fw.c b/drivers/net/wimax/i2400m/fw.c
index 675c6ce810c0..7ee1b99b3843 100644
--- a/drivers/net/wimax/i2400m/fw.c
+++ b/drivers/net/wimax/i2400m/fw.c
@@ -532,14 +532,14 @@ int i2400m_dnload_finalize(struct i2400m *i2400m,
cmd = (void *) bcf + offset;
if (i2400m->sboot ==... |
934037bc2ed29a94bbde72aa6a2e66bdc5861b98 | Analyze and fix the following issue in the Linux kernel code: be2net: Fix be_tx_q_clean() being called on freed queues | Problem Details:
In the tx queue destroy path, be_tx_q_clean() is currently called after the tx queues are freed; it must be called before.
Signed-off-by: Sathya Perla <sathyap@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/drivers/net/benet/be_main.c b/drivers/net/benet/be_main.c
index 86f70af93d60..66bb56874d9b 100644
--- a/drivers/net/benet/be_main.c
+++ b/drivers/net/benet/be_main.c
@@ -1056,8 +1056,13 @@ static void be_tx_queues_destroy(struct be_adapter *adapter)
struct be_queue_info *q;
q = &adapter->tx_o... |
a7a0ef31def6b6badd94fc96c8f17c2e18d91513 | Analyze and fix the following issue in the Linux kernel code: be2net: Fix early reset of rx-completion | Problem Details:
be_rx_compl_get() must not reset(via the valid word) the rx_compl as the rx_compl is not processed yet; it must be reset after it is processed.
Signed-off-by: Sathya Perla <sathyap@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/drivers/net/benet/be_main.c b/drivers/net/benet/be_main.c
index 5aadd71d4613..86f70af93d60 100644
--- a/drivers/net/benet/be_main.c
+++ b/drivers/net/benet/be_main.c
@@ -876,12 +876,19 @@ static struct be_eth_rx_compl *be_rx_compl_get(struct be_adapter *adapter)
be_dws_le_to_cpu(rxcp, sizeof(*r... |
76fbb42919396b9bf68c9a03ceb037c971a02e2f | Analyze and fix the following issue in the Linux kernel code: be2net: Fix rx stats updation in non-lro path | Problem Details:
rx stats are not getting updated when an rx_compl with only one frag is rcvd in non-lro path.
Signed-off-by: Sathya Perla <sathyap@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/drivers/net/benet/be_main.c b/drivers/net/benet/be_main.c
index 6487eb4bad10..5aadd71d4613 100644
--- a/drivers/net/benet/be_main.c
+++ b/drivers/net/benet/be_main.c
@@ -743,7 +743,7 @@ static void skb_fill_rx_data(struct be_adapter *adapter,
if (pktsize <= rx_frag_size) {
BUG_ON(num_rcvd !=... |
6811086899f2740c08d0ade26f8b9d705708e0cc | Analyze and fix the following issue in the Linux kernel code: be2net: fix netdev stats rx_errors and rx_dropped | Problem Details:
Fix netdev stat rx_errors to cover length related errors and checksum errors and rx_dropped to the pkts dropped due to lack of buffers
Signed-off-by: Sathya Perla <sathyap@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/drivers/net/benet/be_main.c b/drivers/net/benet/be_main.c
index 69046a109ac3..6487eb4bad10 100644
--- a/drivers/net/benet/be_main.c
+++ b/drivers/net/benet/be_main.c
@@ -168,6 +168,7 @@ static void netdev_stats_update(struct be_adapter *adapter)
struct be_port_rxf_stats *port_stats =
&rxf_sta... |
77e26cca20013e9352a8df86a54640543304a23a | Analyze and fix the following issue in the Linux kernel code: x86, mce: Fix mce printing | Problem Details:
This patch:
- Adds print_mce_head() instead of first flag
- Makes the header to be printed always
- Stops double printing of corrected errors
[ This portion originates from Huang Ying's patch ]
Originally-From: Huang Ying <ying.huang@intel.com>
Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fuj... | ```diff
diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c
index d4e7b5947a0e..6a3127ecb5cc 100644
--- a/arch/x86/kernel/cpu/mcheck/mce.c
+++ b/arch/x86/kernel/cpu/mcheck/mce.c
@@ -180,12 +180,8 @@ void mce_log(struct mce *mce)
set_bit(0, ¬ify_user);
}
-static void print_mce(struct... |
ef5c89967d50042b29937fb724e057c1aa3c5207 | Analyze and fix the following issue in the Linux kernel code: drivers/net/macvlan.c: fix cloning of tagged VLAN interfaces | Problem Details:
Addresses http://bugzilla.kernel.org/show_bug.cgi?id=13348
akpm: the reporter disappeared, so I typed it in again.
It is not possible to make clone of tagged VLAN interface to be used as
mac-based vlan interfave.
How reproducible:
Use any 802.1q tagged vlan interface, e.g. eth2.700 and clone it:
... | ```diff
diff --git a/drivers/net/macvlan.c b/drivers/net/macvlan.c
index 021d9941c292..99eed9f37c84 100644
--- a/drivers/net/macvlan.c
+++ b/drivers/net/macvlan.c
@@ -359,6 +359,7 @@ static int macvlan_init(struct net_device *dev)
(lowerdev->state & MACVLAN_STATE_MASK);
dev->features = lowerdev->features & M... |
d7ed5d883c09c5474f842dcb148515dfaef2a567 | Analyze and fix the following issue in the Linux kernel code: Input: ALPS - handle touchpoints buttons correctly | Problem Details:
When pressing any button belonging to the touchpoint, the generated
click events don't belong to the touchpoint but to the touchpad.
This patch fixes this behaviour, the events will be sent via the
correct device, so scrolling with touchpoint is possible.
Signed-off-by: Ulrich Dangel <uli@spamt.net>
S... | ```diff
diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c
index cd4203c4deb9..5547e2429fbe 100644
--- a/drivers/input/mouse/alps.c
+++ b/drivers/input/mouse/alps.c
@@ -132,18 +132,23 @@ static void alps_process_packet(struct psmouse *psmouse)
ges = packet[2] & 1;
fin = packet[2] & 2;
- input_re... |
342dc382c451f75ea202a65e6f529bdff6d184cd | Analyze and fix the following issue in the Linux kernel code: drm/i915: Replace DRM_DEBUG with DRM_DEBUG_KMS in intel_sdvo | Problem Details:
Use the DRM_DEBUG_KMS/DEBUG_LOG_KMS to print the debug info for
SDVO device.
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com> | ```diff
diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers/gpu/drm/i915/intel_sdvo.c
index d8fb88d335cd..7cb9ddf1161e 100644
--- a/drivers/gpu/drm/i915/intel_sdvo.c
+++ b/drivers/gpu/drm/i915/intel_sdvo.c
@@ -36,7 +36,7 @@
#include "intel_sdvo_regs.h"
#undef SDVO_DEBUG
-
+#define I915_SDVO "i915_sdvo"
struct... |
7fb85bfb54a64e9dd82ee4a79022c38ab58f21a0 | Analyze and fix the following issue in the Linux kernel code: drm/i915: replace DRM_DEBUG with DRM_DEBUG_KMS in intel_lvds | Problem Details:
Use the DRM_DEBUG_KMS macro definition to print the debug info for
the LVDS.
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com> | ```diff
diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds.c
index a7ae9f46aa9a..f22e6efbe6a3 100644
--- a/drivers/gpu/drm/i915/intel_lvds.c
+++ b/drivers/gpu/drm/i915/intel_lvds.c
@@ -37,6 +37,8 @@
#include "i915_drm.h"
#include "i915_drv.h"
+#define I915_LVDS "i915_lvds"
+
/**
* S... |
4fefcb27050b98c97b1c32bc710fc2f874449dee | Analyze and fix the following issue in the Linux kernel code: drm: add separate drm debugging levels | Problem Details:
Now all the DRM debug info will be reported if the boot option of
"drm.debug=1" is added. Sometimes it is inconvenient to get the debug
info in KMS mode. We will get too much unrelated info.
This will separate several DRM debug levels and the debug level can be used
to print the different debug info. ... | ```diff
diff --git a/drivers/gpu/drm/drm_stub.c b/drivers/gpu/drm/drm_stub.c
index b9631e3a1ea6..89050684fe0d 100644
--- a/drivers/gpu/drm/drm_stub.c
+++ b/drivers/gpu/drm/drm_stub.c
@@ -51,7 +51,22 @@ struct idr drm_minors_idr;
struct class *drm_class;
struct proc_dir_entry *drm_proc_root;
struct dentry *drm_debugf... |
75c936aec050113c12f74581f51779ffc5502a51 | Analyze and fix the following issue in the Linux kernel code: sh: Fix sys_pwritev() syscall table entry for sh32. | Problem Details:
There was a typo here that had this as sys_writev() instead of
sys_pwritev(), fix this up. sh64 got this right, as did the preadv()
case.
Signed-off-by: Paul Mundt <lethal@linux-sh.org> | ```diff
diff --git a/arch/sh/kernel/syscalls_32.S b/arch/sh/kernel/syscalls_32.S
index 05202edd8e21..6118f358f950 100644
--- a/arch/sh/kernel/syscalls_32.S
+++ b/arch/sh/kernel/syscalls_32.S
@@ -350,4 +350,4 @@ ENTRY(sys_call_table)
.long sys_pipe2
.long sys_inotify_init1
.long sys_preadv
- .long sys_writev
+ .lo... |
4c7c99788631bab177bd51e15e893be4689bb085 | Analyze and fix the following issue in the Linux kernel code: sh: Fix sh4a llsc-based cmpxchg() | Problem Details:
This fixes up a typo in the ll/sc based cmpxchg code which apparently
wasn't getting a lot of testing due to the swapped old/new pair. With
that fixed up, the ll/sc code also starts using it and provides its own
atomic_add_unless().
Signed-off-by: Aoi Shinkai <shinkoi2005@gmail.com>
Signed-off-by: Pau... | ```diff
diff --git a/arch/sh/include/asm/atomic-llsc.h b/arch/sh/include/asm/atomic-llsc.h
index 4b00b78e3f4f..b040e1e08610 100644
--- a/arch/sh/include/asm/atomic-llsc.h
+++ b/arch/sh/include/asm/atomic-llsc.h
@@ -104,4 +104,31 @@ static inline void atomic_set_mask(unsigned int mask, atomic_t *v)
: "t");
}
+#defi... |
46e9371c0eaade8391b3969431a72272b9007158 | Analyze and fix the following issue in the Linux kernel code: sh: sh7722 clock framework rewrite | Problem Details:
This patch rewrites the sh7722 clock framework code.
The new code makes use of the recently merged div4,
div6 and mstp32 helper code. Both extal and dll are
supported as input clocks to the pll.
While at it, now when all SuperH Mobile processors
are converted, fix CONFIG_SH_CLK_CPG_LEGACY to depend
on... | ```diff
diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig
index dbc10ff495a9..b5629cdc37a0 100644
--- a/arch/sh/Kconfig
+++ b/arch/sh/Kconfig
@@ -516,7 +516,7 @@ config SH_CLK_CPG
config SH_CLK_CPG_LEGACY
depends on SH_CLK_CPG
- def_bool y if !CPU_SUBTYPE_SH7785 && !CPU_SUBTYPE_SH7723 && !CPU_SUBTYPE_SH7724 && !CPU_S... |
1bcbf3948876e31a8ece28597dec447611ad9c8b | Analyze and fix the following issue in the Linux kernel code: intelfb: fix spelling of "CLOCK" | Problem Details:
Signed-off-by: Pavel Roskin <proski@gnu.org>
Cc: Eric Anholt <eric@anholt.net>
Cc: Dave Airlie <airlied@linux.ie>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Dave Airlie <airlied@redhat.com> | ```diff
diff --git a/drivers/gpu/drm/i915/intel_fb.c b/drivers/gpu/drm/i915/intel_fb.c
index 7a66b91ccf42..cbd2ba828c72 100644
--- a/drivers/gpu/drm/i915/intel_fb.c
+++ b/drivers/gpu/drm/i915/intel_fb.c
@@ -207,7 +207,7 @@ static int intelfb_set_par(struct fb_info *info)
if (var->pixclock != -1) {
- DRM_ERROR("P... |
dcae3626d031fe6296b1e96a16f986193a41f840 | Analyze and fix the following issue in the Linux kernel code: drm: fix LOCK_TEST_WITH_RETURN macro | Problem Details:
When this macro isn't called with 'file_priv' this will result in a build
failure.
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Dave Airlie <airlied@redhat.com> | ```diff
diff --git a/include/drm/drmP.h b/include/drm/drmP.h
index b84d8ae35e6f..efa5f79a35c7 100644
--- a/include/drm/drmP.h
+++ b/include/drm/drmP.h
@@ -237,15 +237,15 @@ struct drm_device;
* \param dev DRM device.
* \param filp file pointer of the caller.
*/
-#define LOCK_TEST_WITH_RETURN( dev, file_priv ) ... |
a50de78dc6d21ee074e9561c800d194bec12128b | Analyze and fix the following issue in the Linux kernel code: sh: clock div4 frequency table offset fix | Problem Details:
This patch fixes the per clock offset calculation in
sh_clk_div4_register(). Without this patch the offset
to the frequency table for each clock is incorrect.
Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org> | ```diff
diff --git a/arch/sh/kernel/cpu/clock-cpg.c b/arch/sh/kernel/cpu/clock-cpg.c
index 88fc30d2f5fd..e604a6f80194 100644
--- a/arch/sh/kernel/cpu/clock-cpg.c
+++ b/arch/sh/kernel/cpu/clock-cpg.c
@@ -71,8 +71,9 @@ int __init sh_clk_div4_register(struct clk *clks, int nr,
int ret = 0;
int k;
- k = nr_divs + 1;
... |
9d4f94135385b565e2ce4a37f71b53d0fd3664e8 | Analyze and fix the following issue in the Linux kernel code: m68knommu: enumerate INIT_THREAD fields properly | Problem Details:
Use proper field value setting init INIT_THREAD macro.
Fixes this:
arch/m68knommu/kernel/init_task.c:27: warning: excess elements in array initializer
arch/m68knommu/kernel/init_task.c:27: warning: (near initialization for ‘init_task.thread.fpstate’)
Signed-off-by: Greg Ungerer <gerg@uclinux.org> | ```diff
diff --git a/arch/m68k/include/asm/processor_no.h b/arch/m68k/include/asm/processor_no.h
index 91cba18acdd3..7a1e0ba35f5a 100644
--- a/arch/m68k/include/asm/processor_no.h
+++ b/arch/m68k/include/asm/processor_no.h
@@ -72,10 +72,10 @@ struct thread_struct {
unsigned char fpstate[FPSTATESIZE]; /* floating po... |
4f308e35a9bde9d6b671e8409157edb9065f117c | Analyze and fix the following issue in the Linux kernel code: headers_check fix: m68k, swab.h | Problem Details:
fix the following 'make headers_check' warnings:
usr/include/asm-m68k/swab.h:4: include of <linux/types.h> is preferred over <asm/types.h>
usr/include/asm-m68k/swab.h:10: found __[us]{8,16,32,64} type without #include <linux/types.h>
Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.co... | ```diff
diff --git a/arch/m68k/include/asm/swab.h b/arch/m68k/include/asm/swab.h
index 9e3054ea59e9..5b754aace744 100644
--- a/arch/m68k/include/asm/swab.h
+++ b/arch/m68k/include/asm/swab.h
@@ -1,7 +1,7 @@
#ifndef _M68K_SWAB_H
#define _M68K_SWAB_H
-#include <asm/types.h>
+#include <linux/types.h>
#include <linux/... |
308e610e8c435d7875842b427dbc99de43a4aec9 | Analyze and fix the following issue in the Linux kernel code: arch/m68knommu: Convert #ifdef DEBUG printk(KERN_DEBUG to pr_debug( | Problem Details:
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Ungerer <gerg@uclinux.org> | ```diff
diff --git a/arch/m68knommu/kernel/setup.c b/arch/m68knommu/kernel/setup.c
index 5985f1989021..5c2bb3eeaaa2 100644
--- a/arch/m68knommu/kernel/setup.c
+++ b/arch/m68knommu/kernel/setup.c
@@ -166,15 +166,13 @@ void __init setup_arch(char **cmdline_p)
printk(KERN_INFO "Motorola M5235EVB support (C)2005 Syn-tech... |
7f72b47cedd1efc301576ff1050ec0a26c57eb48 | Analyze and fix the following issue in the Linux kernel code: m68knommu: fix system reset for ColdFire 527x family | Problem Details:
The sofwtare reset control for the 527x ColdFire family is based on
the same Reset Control Unit as the 528x ColdFire family. So use the
same reset code for both.
Signed-off-by: Greg Ungerer <gerg@uclinux.org> | ```diff
diff --git a/arch/m68k/include/asm/system_no.h b/arch/m68k/include/asm/system_no.h
index 4496c0aa8379..5fbc96d933ce 100644
--- a/arch/m68k/include/asm/system_no.h
+++ b/arch/m68k/include/asm/system_no.h
@@ -264,18 +264,18 @@ static inline unsigned long __xchg(unsigned long x, volatile void * ptr, int siz
: /*... |
fd0fb038d5a308c7faddd1701be5e70aaffec98b | Analyze and fix the following issue in the Linux kernel code: Btrfs: init worker struct fields before kthread-run | Problem Details:
This patch fixes a bug which may result race condition
between btrfs_start_workers() and worker_loop().
btrfs_start_workers() executed in a parent thread writes
on workers->worker and worker_loop() in a child thread
reads workers->worker. However, there is no synchronization
enforcing the order of two... | ```diff
diff --git a/fs/btrfs/async-thread.c b/fs/btrfs/async-thread.c
index 502c3d61de62..7f88628a1a72 100644
--- a/fs/btrfs/async-thread.c
+++ b/fs/btrfs/async-thread.c
@@ -294,10 +294,10 @@ int btrfs_start_workers(struct btrfs_workers *workers, int num_workers)
INIT_LIST_HEAD(&worker->worker_list);
spin_lock_i... |
5e50b9ef975219304cc91d601530994861585bfe | Analyze and fix the following issue in the Linux kernel code: floppy: fix hibernation | Problem Details:
Based on Ingo Molnar's patch from 2006, this makes the floppy work after
resume from hibernation, at least on my machine.
This fix resets the floppy controller on resume. It was experimentally
determined to bring the controller back to life - we don't really know why
it works.
floppy_init() does the... | ```diff
diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c
index 90877fee0ee0..862b40c90181 100644
--- a/drivers/block/floppy.c
+++ b/drivers/block/floppy.c
@@ -4148,6 +4148,24 @@ static void floppy_device_release(struct device *dev)
{
}
+static int floppy_resume(struct platform_device *dev)
+{
+ int fdc;... |
d9c7d394a8ebacb60097b192939ae9f15235225e | Analyze and fix the following issue in the Linux kernel code: block: prevent possible io_context->refcount overflow | Problem Details:
Currently io_context has an atomic_t(32-bit) as refcount. In the case of
cfq, for each device against whcih a task does I/O, a reference to the
io_context would be taken. And when there are multiple process sharing
io_contexts(CLONE_IO) would also have a reference to the same io_context.
Theoretical... | ```diff
diff --git a/block/blk-ioc.c b/block/blk-ioc.c
index 012f065ac8e2..d4ed6000147d 100644
--- a/block/blk-ioc.c
+++ b/block/blk-ioc.c
@@ -35,9 +35,9 @@ int put_io_context(struct io_context *ioc)
if (ioc == NULL)
return 1;
- BUG_ON(atomic_read(&ioc->refcount) == 0);
+ BUG_ON(atomic_long_read(&ioc->refcount) ... |
4eedeb75e7f15ffdb12d1ad559b565e7505bdbaf | Analyze and fix the following issue in the Linux kernel code: Btrfs: pin buffers during write_dev_supers | Problem Details:
write_dev_supers is called in sequence. First is it called with wait == 0,
which starts IO on all of the super blocks for a given device. Then it is
called with wait == 1 to make sure they all reach the disk.
It doesn't currently pin the buffers between the two calls, and it also
assumes the buffers... | ```diff
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index b7ddc77fa568..0d50d49d990a 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -2020,6 +2020,17 @@ struct buffer_head *btrfs_read_dev_super(struct block_device *bdev)
return latest;
}
+/*
+ * this should be called twice, once with wait == 0... |
a5c0f88678cd2fb1f649f7d366d756f2b2f97f0c | Analyze and fix the following issue in the Linux kernel code: ALSA: hda - add quirk for STAC92xx (SigmaTel STAC9205) | Problem Details:
A quirk is required for 8086:284b (rev 03) [Subsystem: 161f:2073].
The following has been tested with Alsa 1.0.20 (git master).
Background details can be found at
https://bugtrack.alsa-project.org/alsa-bug/view.php?id=4561
http://forum.ubuntu-gr.org/viewtopic.php?f=38&t=5290
Tested-by: Theodora Iliop... | ```diff
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
index 42f944bb641d..93e47c96a38b 100644
--- a/sound/pci/hda/patch_sigmatel.c
+++ b/sound/pci/hda/patch_sigmatel.c
@@ -1590,6 +1590,8 @@ static struct snd_pci_quirk stac9200_cfg_tbl[] = {
/* SigmaTel reference board */
SND_PCI_QUIRK... |
2f0accc13520b2644b85f80aedce10d10d88b0ca | Analyze and fix the following issue in the Linux kernel code: cfg80211: fix rfkill locking problem | Problem Details:
rfkill currently requires a global lock within the
rfkill_register() function, and holds that lock over
calls to the set_block() methods. This means that we
cannot hold a lock around rfkill_register() that we
also require in set_block(), directly or indirectly.
Fix cfg80211 to register rfkill outside t... | ```diff
diff --git a/net/wireless/core.c b/net/wireless/core.c
index 3b74b88e10a3..d5850292b3df 100644
--- a/net/wireless/core.c
+++ b/net/wireless/core.c
@@ -395,21 +395,23 @@ int wiphy_register(struct wiphy *wiphy)
/* check and set up bitrates */
ieee80211_set_bitrate_flags(wiphy);
- mutex_lock(&cfg80211_mutex)... |
43f7853180ed522944b3b1d4979cdb9f2b103ca3 | Analyze and fix the following issue in the Linux kernel code: mac80211: disable moving between PS modes during scan | Problem Details:
We don't want to trigger moving between PS mode during scan,
because then we will sometimes end up sending nullfunc frames
during scan. We're supposed to only send one prior to scan
and after scan.
This fixes an oops which occured due to an assert in ath9k:
http://marc.info/?l=linux-wireless&m=124277... | ```diff
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index e8a3d3cb80df..898e9b02aaac 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -621,9 +621,6 @@ static void ieee80211_change_ps(struct ieee80211_local *local)
struct ieee80211_conf *conf = &local->hw.conf;
if (local->ps_sdata) {
- if ... |
a6ae0716e5c3b5f9dbe5ed8f473a6c7b89692365 | Analyze and fix the following issue in the Linux kernel code: ath5k: minor rfkill cleanup | Problem Details:
Always enable rfkill since the ifdefs in the code is not really worth
the Kconfig option. Also fix a few code style things, and remove the
usage of the ah_gpio[] array so we can remove it later.
Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com> | ```diff
diff --git a/drivers/net/wireless/ath/ath5k/Kconfig b/drivers/net/wireless/ath/ath5k/Kconfig
index 4863f4bbf768..509b6f94f73b 100644
--- a/drivers/net/wireless/ath/ath5k/Kconfig
+++ b/drivers/net/wireless/ath/ath5k/Kconfig
@@ -39,11 +39,3 @@ config ATH5K_DEBUG
modprobe ath5k debug=0x00000400
-config ATH... |
5eae6592e9bdc989151171828ee97e0ad9e1b1ac | Analyze and fix the following issue in the Linux kernel code: ath9k: Fix tx stuck when connected to aggr disabled HT AP | Problem Details:
This patch along with my previous patch in mac80211 "Fix the
way ADDBA count..", fixes hang in tx when connected to an HT
AP which rejects/times out on addba req.
AGGR_ADDBA_PROGRESS should be cleared in aggr state when addba
negotiation is terminated due to either addba response is timed out
or addba... | ```diff
diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c
index a8def4fa449c..b61a071788a5 100644
--- a/drivers/net/wireless/ath/ath9k/xmit.c
+++ b/drivers/net/wireless/ath/ath9k/xmit.c
@@ -711,6 +711,7 @@ int ath_tx_aggr_stop(struct ath_softc *sc, struct ieee80211_sta *sta, u16... |
736708bd04b7a8941fddda32211982cab5d14431 | Analyze and fix the following issue in the Linux kernel code: mac80211: Fix the way ADDBA request count being modified | Problem Details:
addba_req_num[tid] is supposed to have the count of consecutive
addba request attempts on 'tid' which failed. This count is checked
against a retry threshold (3 times) before starting the addba negotiation.
This patch fixes the way this addba count is incremented/reset and thereby
avoids indefinite add... | ```diff
diff --git a/net/mac80211/agg-tx.c b/net/mac80211/agg-tx.c
index 43d00ffd3988..9e5762ad307d 100644
--- a/net/mac80211/agg-tx.c
+++ b/net/mac80211/agg-tx.c
@@ -132,6 +132,9 @@ static int ___ieee80211_stop_tx_ba_session(struct sta_info *sta, u16 tid,
state = &sta->ampdu_mlme.tid_state_tx[tid];
+ if (*state ... |
558f6d3229ddb9f11ca4ffee0439046c283882ff | Analyze and fix the following issue in the Linux kernel code: cfg80211: fix for duplicate response for driver reg request | Problem Details:
As Pavel puts userspace can be stupid and should not
cause kernel crashes. In this case Pavel was able to
find a crash here but unable to reproduce. Either way
lets deal with this.
This should fix:
------------[ cut here ]------------
kernel BUG at /home/proski/src/linux-2.6/net/wireless/reg.c:2132!
... | ```diff
diff --git a/net/wireless/reg.c b/net/wireless/reg.c
index ea4c299fbe3b..5e14371cda70 100644
--- a/net/wireless/reg.c
+++ b/net/wireless/reg.c
@@ -2129,7 +2129,12 @@ static int __set_regdom(const struct ieee80211_regdomain *rd)
* driver wanted to the wiphy to deal with conflicts
*/
- BUG_ON(request_w... |
8f77f3849cc3ae2d6df9301785a3d316ea7d7ee1 | Analyze and fix the following issue in the Linux kernel code: mac80211: do not pass PS frames out of mac80211 again | Problem Details:
In order to handle powersave frames properly we had needed
to pass these out to the device queues again, and introduce
the skb->requeue bit. This, however, also has unnecessary
overhead by needing to 'clean up' already tried frames, and
this clean-up code is also buggy when software encryption
is used.... | ```diff
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index f1c93b878b3b..fa51293f2708 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -304,9 +304,6 @@ typedef unsigned char *sk_buff_data_t;
* @tc_verd: traffic control verdict
* @ndisc_nodetype: router type (from link layer)
* @... |
fc240e3fc5791c572402b0857948da7b1e68d77f | Analyze and fix the following issue in the Linux kernel code: sony: fix rfkill code | Problem Details:
During the rfkill conversion I added code to call
sony_nc_rfkill_set with the wrong argument, causing
a segfault Reinette reported. The compiler could not
catch that because the argument is, and needs to be,
void *.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Reported-by: Reinette Chatre ... | ```diff
diff --git a/drivers/platform/x86/sony-laptop.c b/drivers/platform/x86/sony-laptop.c
index aec0b27fd774..f2893443b318 100644
--- a/drivers/platform/x86/sony-laptop.c
+++ b/drivers/platform/x86/sony-laptop.c
@@ -1135,8 +1135,7 @@ static void sony_nc_rfkill_update()
if (hwblock) {
if (rfkill_set_hw_state... |
2543a0c4c0fde46f9f206cec1e1cf951a2a63a66 | Analyze and fix the following issue in the Linux kernel code: ar9170: interpret firmware debug commands | Problem Details:
This adds new commands that the original firmware will not send
but we can use them to debug firmware.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com> | ```diff
diff --git a/drivers/net/wireless/ath/ar9170/main.c b/drivers/net/wireless/ath/ar9170/main.c
index b104d7efd676..de57aa92a284 100644
--- a/drivers/net/wireless/ath/ar9170/main.c
+++ b/drivers/net/wireless/ath/ar9170/main.c
@@ -442,6 +442,38 @@ void ar9170_handle_command_response(struct ar9170 *ar, void *buf, u3... |
dacb6f1d8fa5200efc4e609fe63a750b960993b6 | Analyze and fix the following issue in the Linux kernel code: mac80211 : fix unaligned rx skb | Problem Details:
mac80211 is checking is the skb is aligned on 32 bit boundary.
But it is checking against ethernet header, whereas Linux expect IP
header aligned. And ethernet ether size is 6*2+2=14, so aligning
ethernet header make IP header unaligned.
Signed-off-by: Matthieu CASTET <castet.matthieu@free.fr>
Signed... | ```diff
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index 6a9b8e63a6bf..754125185109 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -1335,7 +1335,7 @@ ieee80211_deliver_skb(struct ieee80211_rx_data *rx)
* mac80211. That also explains the __skb_push()
* below.
*/
- align = (unsigned long)s... |
b52a033c2c501a8015df3727a4bd73389ccb1641 | Analyze and fix the following issue in the Linux kernel code: b43: Fix possible unaligned u32 access | Problem Details:
Fix possible unaligned u32 access in b43_generate_plcp_hdr().
Unaligned data is read/write with a u32 pointer instead of using the
packed structure. Some versions of gcc ignore the "packed" attribute, if the
structure element is accessed through a local pointer.
Signed-off-by: Matthieu CASTET <castet.... | ```diff
diff --git a/drivers/net/wireless/b43/xmit.c b/drivers/net/wireless/b43/xmit.c
index a63d88841df8..55f36a7254d9 100644
--- a/drivers/net/wireless/b43/xmit.c
+++ b/drivers/net/wireless/b43/xmit.c
@@ -118,7 +118,6 @@ u8 b43_plcp_get_ratecode_ofdm(const u8 bitrate)
void b43_generate_plcp_hdr(struct b43_plcp_hdr4 ... |
5ee58d7e6ad019675b4090582aec4fa1180d8703 | Analyze and fix the following issue in the Linux kernel code: mac80211: fix minstrel single-rate memory corruption | Problem Details:
The minstrel rate controller periodically looks up rate indexes in
a sampling table. When accessing a specific row and column, minstrel
correctly does a bounds check which, on the surface, appears to handle
the case where mi->n_rates < 2. However, mi->sample_idx is actually
defined as an unsigned, so... | ```diff
diff --git a/net/mac80211/rc80211_minstrel.c b/net/mac80211/rc80211_minstrel.c
index 0a11515341ba..b218b98fba7f 100644
--- a/net/mac80211/rc80211_minstrel.c
+++ b/net/mac80211/rc80211_minstrel.c
@@ -215,7 +215,7 @@ minstrel_get_next_sample(struct minstrel_sta_info *mi)
unsigned int sample_ndx;
sample_ndx = ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.