id stringlengths 40 40 | instruction stringlengths 68 308 | input stringlengths 17 33.4k | output stringlengths 100 30k |
|---|---|---|---|
7b4b6658e152ed4568cfff48175d93645df081d1 | Analyze and fix the following issue in the Linux kernel code: perf_counter: Fix software counters for fast moving event sources | Problem Details:
Reimplement the software counters to deal with fast moving
event sources (such as tracepoints). This means being able
to generate multiple overflows from a single 'event' as well
as support throttling.
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
Signed-... | ```diff
diff --git a/kernel/perf_counter.c b/kernel/perf_counter.c
index 868102172aa4..615440ab9295 100644
--- a/kernel/perf_counter.c
+++ b/kernel/perf_counter.c
@@ -3344,87 +3344,81 @@ int perf_counter_overflow(struct perf_counter *counter, int nmi,
* Generic software counter infrastructure
*/
-static void perf... |
923c42c19944da214d697e312a040384a0e33e78 | Analyze and fix the following issue in the Linux kernel code: perf_counter tools: Fix/resurrect perf top annotation in a simple interactive form | Problem Details:
perf top used to have annotation support, but it has bitrotted and
removed.
This patch restores that: it allows the user to select any symbol
in kernel space for source level annotation on the fly, switch
between event counters and alter display variables. When symbol
details are being displayed, stop... | ```diff
diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c
index f139f1ab9333..d58701346b1e 100644
--- a/tools/perf/builtin-top.c
+++ b/tools/perf/builtin-top.c
@@ -31,6 +31,8 @@
#include <fcntl.h>
#include <stdio.h>
+#include <termios.h>
+#include <unistd.h>
#include <errno.h>
#include <time.h>
@... |
f413cdb80ce00ec1a4d0ab949b5d96c81cae7f75 | Analyze and fix the following issue in the Linux kernel code: perf_counter: Fix/complete ftrace event records sampling | Problem Details:
This patch implements the kernel side support for ftrace event
record sampling.
A new counter sampling attribute is added:
PERF_SAMPLE_TP_RECORD
which requests ftrace events record sampling. In this case
if a PERF_TYPE_TRACEPOINT counter is active and a tracepoint
fires, we emit the tracepoint bi... | ```diff
diff --git a/include/linux/ftrace_event.h b/include/linux/ftrace_event.h
index d7cd193c2277..a81170de7f6b 100644
--- a/include/linux/ftrace_event.h
+++ b/include/linux/ftrace_event.h
@@ -89,7 +89,9 @@ enum print_line_t {
TRACE_TYPE_NO_CONSUME = 3 /* Handled but ask to not consume */
};
-
+void tracing_gene... |
3a6593050fbd8bbcaed3a44d01c31d907315c86c | Analyze and fix the following issue in the Linux kernel code: perf_counter, ftrace: Fix perf_counter integration | Problem Details:
Adds possible second part to the assign argument of TP_EVENT().
TP_perf_assign(
__perf_count(foo);
__perf_addr(bar);
)
Which, when specified make the swcounter increment with @foo instead
of the usual 1, and report @bar for PERF_SAMPLE_ADDR (data address
associated with the event) when this tri... | ```diff
diff --git a/include/trace/ftrace.h b/include/trace/ftrace.h
index 1867553c61e5..fec71f8dbc48 100644
--- a/include/trace/ftrace.h
+++ b/include/trace/ftrace.h
@@ -144,6 +144,9 @@
#undef TP_fast_assign
#define TP_fast_assign(args...) args
+#undef TP_perf_assign
+#define TP_perf_assign(args...)
+
#undef TRAC... |
c36ba80ea01d0aecb652c26799a912e760ce8981 | Analyze and fix the following issue in the Linux kernel code: irq: Remove superfluous NULL pointer check in check_irq_resend() | Problem Details:
This takes care of the following entry from Dan's list:
kernel/irq/resend.c +73 check_irq_resend(17) warning: variable derefenced before check 'desc->chip'
Reported-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Cc: Jonathan Corbet <corbet@lwn.net>... | ```diff
diff --git a/kernel/irq/resend.c b/kernel/irq/resend.c
index 89c7117acf2b..090c3763f3a2 100644
--- a/kernel/irq/resend.c
+++ b/kernel/irq/resend.c
@@ -70,8 +70,7 @@ void check_irq_resend(struct irq_desc *desc, unsigned int irq)
if ((status & (IRQ_LEVEL | IRQ_PENDING | IRQ_REPLAY)) == IRQ_PENDING) {
desc->s... |
b4a2f5e723e4f7df46731106faf9e2405673c073 | Analyze and fix the following issue in the Linux kernel code: KVM: Avoid redelivery of edge interrupt before next edge | Problem Details:
The check for an edge is broken in current ioapic code. ioapic->irr is
cleared on each edge interrupt by ioapic_service() and this makes
old_irr != ioapic->irr condition in kvm_ioapic_set_irq() to be always
true. The patch fixes the code to properly recognise edge.
Some HW emulation calls set_irq() wi... | ```diff
diff --git a/virt/kvm/ioapic.c b/virt/kvm/ioapic.c
index 1eddae94bab3..1150c6d5c7b8 100644
--- a/virt/kvm/ioapic.c
+++ b/virt/kvm/ioapic.c
@@ -95,8 +95,6 @@ static int ioapic_service(struct kvm_ioapic *ioapic, unsigned int idx)
if (injected && pent->fields.trig_mode == IOAPIC_LEVEL_TRIG)
pent->fields.rem... |
fdb8a42742ac95606668f73481dfb2f760658fdd | Analyze and fix the following issue in the Linux kernel code: x86: fix buffer overflow in efi_init() | Problem Details:
If the vendor name (from c16) can be longer than 100 bytes (or missing a
terminating null), then the null is written past the end of vendor[].
Found with Parfait, http://research.sun.com/projects/parfait/
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: ... | ```diff
diff --git a/arch/x86/kernel/efi.c b/arch/x86/kernel/efi.c
index 19ccf6d0dccf..fe26ba3e3451 100644
--- a/arch/x86/kernel/efi.c
+++ b/arch/x86/kernel/efi.c
@@ -354,7 +354,7 @@ void __init efi_init(void)
*/
c16 = tmp = early_ioremap(efi.systab->fw_vendor, 2);
if (c16) {
- for (i = 0; i < sizeof(vendor) &&... |
42c2c8c854a716b05882a122632ddcd6dbe108f1 | Analyze and fix the following issue in the Linux kernel code: printk: Fix "printk: Enable the use of more than one CON_BOOT (early console)" | Problem Details:
Don't return when we find the first bootconsole - it can leave
other bootconsoles still installed, and they can be used and
cause problems later (if they are in the init section, and
eventually released), and cause problems. Make sure we remove
all of them.
Signed-off-by: Sonic Zhang <Sonic.Zhang@ana... | ```diff
diff --git a/kernel/printk.c b/kernel/printk.c
index e0daaf57985a..e10d193a833a 100644
--- a/kernel/printk.c
+++ b/kernel/printk.c
@@ -1352,7 +1352,7 @@ static int __init disable_boot_consoles(void)
if (con->flags & CON_BOOT) {
printk(KERN_INFO "turn off boot console %s%d\n",
con->name, con->index);... |
fb82ad719831db58e9baa4c67015aae3fe27e7e3 | Analyze and fix the following issue in the Linux kernel code: tracing/filters: Don't use pred on alloc failure | Problem Details:
Dan Carpenter sent me a fix to prevent pred from being used if
it couldn't be allocated. This updates his patch for the same
problem in the tracing tree (which has changed this code quite
substantially).
Reported-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Tom Zanussi <tzanussi@gmail.com>
Cc... | ```diff
diff --git a/kernel/trace/trace_events_filter.c b/kernel/trace/trace_events_filter.c
index 27c2dbea3710..490337abed75 100644
--- a/kernel/trace/trace_events_filter.c
+++ b/kernel/trace/trace_events_filter.c
@@ -1050,6 +1050,8 @@ static int replace_preds(struct event_subsystem *system,
pred = create_pred(el... |
96b2de313b1e0e02aea80ee47df6a2b5cbdf8e13 | Analyze and fix the following issue in the Linux kernel code: tracing/filters: Don't use pred on alloc failure | Problem Details:
Dan Carpenter sent me a fix to prevent pred from being used if
it couldn't be allocated. I noticed the same problem also
existed for the create_pred() case and added a fix for that.
Reported-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Tom Zanussi <tzanussi@gmail.com>
Cc: Steven Rostedt <rost... | ```diff
diff --git a/kernel/trace/trace_events_filter.c b/kernel/trace/trace_events_filter.c
index 936c621bbf46..1557148be34b 100644
--- a/kernel/trace/trace_events_filter.c
+++ b/kernel/trace/trace_events_filter.c
@@ -1029,6 +1029,8 @@ static int replace_preds(struct event_subsystem *system,
if (elt->op == OP_AND... |
72c4d8530244264317a662de9a55cc47e6c8e9df | Analyze and fix the following issue in the Linux kernel code: x86: Introduce GDT_ENTRY_INIT(), fix APM | Problem Details:
This crash:
[ 0.891983] calling cache_sysfs_init+0x0/0x1ee @ 1
[ 0.897251] initcall cache_sysfs_init+0x0/0x1ee returned 0 after 405 usecs
[ 0.904019] calling mce_init_device+0x0/0x242 @ 1
[ 0.909124] initcall mce_init_device+0x0/0x242 returned 0 after 347 usecs
[ 0.915815] calling ap... | ```diff
diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c
index 8c9bc287f8fb..b5764a269645 100644
--- a/arch/x86/kernel/cpu/common.c
+++ b/arch/x86/kernel/cpu/common.c
@@ -106,7 +106,7 @@ DEFINE_PER_CPU_PAGE_ALIGNED(struct gdt_page, gdt_page) = { .gdt = {
/* 16-bit code */
[GDT_ENTRY_APMBIOS_... |
ad7d6c7a0654a4bbda3e109f56af713267e96274 | Analyze and fix the following issue in the Linux kernel code: x86/irq: Fix move_irq_desc() for nodes without ram | Problem Details:
Don't move it if target node is -1.
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
LKML-Reference: <4A785B5D.4070702@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu> | ```diff
diff --git a/kernel/irq/numa_migrate.c b/kernel/irq/numa_migrate.c
index 2f69bee57bf2..3fd30197da2e 100644
--- a/kernel/irq/numa_migrate.c
+++ b/kernel/irq/numa_migrate.c
@@ -107,8 +107,8 @@ out_unlock:
struct irq_desc *move_irq_desc(struct irq_desc *desc, int node)
{
- /* those all static, do move them */
... |
087d7e56deffb611a098e7e257388a41edbeef1f | Analyze and fix the following issue in the Linux kernel code: x86: Fix MSI-X initialization by using online_mask for x2apic target_cpus | Problem Details:
found a system where x2apic reports an MSI-X irq initialization
failure:
[ 302.859446] igbvf 0000:81:10.4: enabling device (0000 -> 0002)
[ 302.874369] igbvf 0000:81:10.4: using 64bit DMA mask
[ 302.879023] igbvf 0000:81:10.4: using 64bit consistent DMA mask
[ 302.894386] igbvf 0000:81:10.4: enabl... | ```diff
diff --git a/arch/x86/kernel/apic/x2apic_cluster.c b/arch/x86/kernel/apic/x2apic_cluster.c
index 2ed4e2bb3b32..a5371ec36776 100644
--- a/arch/x86/kernel/apic/x2apic_cluster.c
+++ b/arch/x86/kernel/apic/x2apic_cluster.c
@@ -17,11 +17,13 @@ static int x2apic_acpi_madt_oem_check(char *oem_id, char *oem_table_id)
... |
dbe9ea6e79d38cd5f2069405864ff06606cf9ff1 | Analyze and fix the following issue in the Linux kernel code: ASoC: s3c2443-ac97: convert semaphore to mutex | Problem Details:
This fixes a build failure for 2.6.31-rc4-rt1 (ARCH=arm, s3c2410_defconfig):
CC [M] sound/soc/s3c24xx/s3c2443-ac97.o
sound/soc/s3c24xx/s3c2443-ac97.c:50: warning: type defaults to 'int' in declaration of 'DECLARE_MUTEX'
sound/soc/s3c24xx/s3c2443-ac97.c:50: warning: parameter names (without types... | ```diff
diff --git a/sound/soc/s3c24xx/s3c2443-ac97.c b/sound/soc/s3c24xx/s3c2443-ac97.c
index 3f03d5ddfacd..bf16f20fcbb3 100644
--- a/sound/soc/s3c24xx/s3c2443-ac97.c
+++ b/sound/soc/s3c24xx/s3c2443-ac97.c
@@ -47,7 +47,7 @@ static struct s3c24xx_ac97_info s3c24xx_ac97;
static DECLARE_COMPLETION(ac97_completion);
s... |
a809dda0369ae6157f7bcd3e704b857d43704cbd | Analyze and fix the following issue in the Linux kernel code: HID: fix memory leak on error patch in debug code | Problem Details:
Error handling code following a kzalloc should free the allocated data.
The semantic match that finds the problem is as follows:
(http://www.emn.fr/x-info/coccinelle/)
// <smpl>
@r exists@
local idexpression x;
statement S;
expression E;
identifier f,f1,l;
position p1,p2;
expression *ptr != NULL;
@@
... | ```diff
diff --git a/drivers/hid/hid-debug.c b/drivers/hid/hid-debug.c
index a331a1821e85..06e87dc77796 100644
--- a/drivers/hid/hid-debug.c
+++ b/drivers/hid/hid-debug.c
@@ -909,6 +909,7 @@ static int hid_debug_events_open(struct inode *inode, struct file *file)
if (!(list->hid_debug_buf = kzalloc(sizeof(char) * H... |
44cb2db10d05fc263c9fa44347d350d4f7f5890c | Analyze and fix the following issue in the Linux kernel code: HID: fix overrun in quirks initialization | Problem Details:
Check whether index is within bounds before testing the element.
declared in drivers/hid/usbhid/hid-core.c:62:
static char *quirks_param[MAX_USBHID_BOOT_QUIRKS] = ...
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Cc: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation... | ```diff
diff --git a/drivers/hid/usbhid/hid-quirks.c b/drivers/hid/usbhid/hid-quirks.c
index d8f7423f363e..0d9045aa2c4b 100644
--- a/drivers/hid/usbhid/hid-quirks.c
+++ b/drivers/hid/usbhid/hid-quirks.c
@@ -201,7 +201,7 @@ int usbhid_quirks_init(char **quirks_param)
u32 quirks;
int n = 0, m;
- for (; quirks_param... |
749d00dbf154fc2f9ac59df669205039de0d5b45 | Analyze and fix the following issue in the Linux kernel code: Staging: rspiusb: Fix buffer overflow | Problem Details:
usb_buffer_map_sg() may return -1. This will result in a read from
pdx->PixelUrb[frameInfo][-1]
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ```diff
diff --git a/drivers/staging/rspiusb/rspiusb.c b/drivers/staging/rspiusb/rspiusb.c
index 2f8155c1968b..04e2f92c0f62 100644
--- a/drivers/staging/rspiusb/rspiusb.c
+++ b/drivers/staging/rspiusb/rspiusb.c
@@ -716,6 +716,8 @@ static int MapUserBuffer(struct ioctl_struct *io, struct device_extension *pdx)
pdx->P... |
ce9c010c5c39df05ed81a06aba492c45ee0c6f19 | Analyze and fix the following issue in the Linux kernel code: Staging: rtl8192su: fix build error | Problem Details:
This fixes a build error when selecting the rtl8192su driver as a
module. This has been reported by me, and the opensuse kernel developer
team, and I finally tracked it down.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ```diff
diff --git a/drivers/staging/rtl8192su/ieee80211.h b/drivers/staging/rtl8192su/ieee80211.h
index 0edb09a536f9..ea9739318037 100644
--- a/drivers/staging/rtl8192su/ieee80211.h
+++ b/drivers/staging/rtl8192su/ieee80211.h
@@ -2645,7 +2645,7 @@ extern int ieee80211_encrypt_fragment(
struct sk_buff *frag,
int hd... |
cf7fdd57f978d40ceb9a0f58a25f5cf9c84d6f33 | Analyze and fix the following issue in the Linux kernel code: USB: fix oops on disconnect in cdc-acm | Problem Details:
This patch fixes an oops caused when during an unplug a device's table
of endpoints is zeroed before the driver is notified. A pointer to
the endpoint must be cached.
this fixes a regression caused by commit
5186ffee2320942c3dc9745f7930e0eb15329ca6
Therefore it should go into 2.6.31
Signed-off-by: Ol... | ```diff
diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c
index e1f89416ef8c..2bfc41ece0e1 100644
--- a/drivers/usb/class/cdc-acm.c
+++ b/drivers/usb/class/cdc-acm.c
@@ -387,7 +387,6 @@ static void acm_rx_tasklet(unsigned long _acm)
struct acm_ru *rcv;
unsigned long flags;
unsigned char throt... |
ef4638f955f2c4a667c8af20769d03f5ed3781ca | Analyze and fix the following issue in the Linux kernel code: USB: EHCI: fix counting of transaction error retries | Problem Details:
This patch (as1274) simplifies the counting of transaction-error
retries. Now we will count up from 0 to QH_XACTERR_MAX instead of
down from QH_XACTERR_MAX to 0.
The patch also fixes a small bug: qh->xacterr was not getting
initialized for interrupt endpoints.
Signed-off-by: Alan Stern <stern@rowlan... | ```diff
diff --git a/drivers/usb/host/ehci-q.c b/drivers/usb/host/ehci-q.c
index b27380505576..7673554fa64d 100644
--- a/drivers/usb/host/ehci-q.c
+++ b/drivers/usb/host/ehci-q.c
@@ -375,12 +375,11 @@ qh_completions (struct ehci_hcd *ehci, struct ehci_qh *qh)
*/
if ((token & QTD_STS_XACT) &&
QTD_CERR(... |
7a0f0d951273eee889c2441846842348ebc00a2a | Analyze and fix the following issue in the Linux kernel code: USB: EHCI: fix two new bugs related to Clear-TT-Buffer | Problem Details:
This patch (as1273) fixes two(!) bugs introduced by the new
Clear-TT-Buffer implementation in ehci-hcd.
It is now possible for an idle QH to have some URBs on its
queue -- this will happen if a Clear-TT-Buffer is pending for
the QH's endpoint. Consequently we should not issue a warning
when someo... | ```diff
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index 7d03549c3339..11c627ce6022 100644
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -903,7 +903,8 @@ static int ehci_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status)
/* already started */
break... |
01105a246345f011fde64d24a601090b646e9e4c | Analyze and fix the following issue in the Linux kernel code: USB: usbfs: fix -ENOENT error code to be -ENODEV | Problem Details:
This patch (as1272) changes the error code returned when an open call
for a USB device node fails to locate the corresponding device. The
appropriate error code is -ENODEV, not -ENOENT.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
CC: Kay Sievers <kay.sievers@vrfy.org>
Cc: stable <stable@ker... | ```diff
diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c
index e192fa05f8a1..4247eccf858c 100644
--- a/drivers/usb/core/devio.c
+++ b/drivers/usb/core/devio.c
@@ -595,7 +595,7 @@ static int usbdev_open(struct inode *inode, struct file *file)
if (!ps)
goto out;
- ret = -ENOENT;
+ ret = -ENODEV;
... |
e8e2ff462dd92693f29eb848f42d3eb720390d59 | Analyze and fix the following issue in the Linux kernel code: USB: musb: fix the nop registration for OMAP3EVM | Problem Details:
OMAP3EVM uses ISP1504 phy which doesn't require any programming and
thus has to use NOP otg transceiver.
Cleanups being done:
- Remove unwanted code in usb-musb.c file
- Register NOP in OMAP3EVM board file using
usb_nop_xceiv_register().
- Select NOP_USB_XCEIV for OMAP3EVM boards.
- Don't enabl... | ```diff
diff --git a/arch/arm/configs/omap3_evm_defconfig b/arch/arm/configs/omap3_evm_defconfig
index 28be17fbc157..d5ff4776cd0a 100644
--- a/arch/arm/configs/omap3_evm_defconfig
+++ b/arch/arm/configs/omap3_evm_defconfig
@@ -1107,7 +1107,7 @@ CONFIG_USB_ZERO=m
CONFIG_USB_OTG_UTILS=y
# CONFIG_USB_GPIO_VBUS is not se... |
ceab36edd3d3ad3ffd01d41d6d1e05ac1ff8357e | Analyze and fix the following issue in the Linux kernel code: Btrfs: fix balancing oops when invalidate_inode_pages2 returns EBUSY | Problem Details:
invalidate_inode_pages2_range may return -EBUSY occasionally
which results Oops. This patch fixes the issue by moving
invalidate_inode_pages2_range into a loop and keeping calling
it until the return value is not -EBUSY.
The EBUSY return is temporary, and can happen when the btrfs release page
functio... | ```diff
diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c
index e71264d1c2c9..c04f7f212602 100644
--- a/fs/btrfs/relocation.c
+++ b/fs/btrfs/relocation.c
@@ -2553,8 +2553,13 @@ int relocate_inode_pages(struct inode *inode, u64 start, u64 len)
last_index = (start + len - 1) >> PAGE_CACHE_SHIFT;
/* make su... |
4baf8c9201e88546918cbfa61ea8062c38bc1644 | Analyze and fix the following issue in the Linux kernel code: Btrfs: remove superfluous NULL pointer check in btrfs_rename() | Problem Details:
This takes care of the following entry from Dan's list:
fs/btrfs/inode.c +4788 btrfs_rename(36) warning: variable derefenced before check 'old_inode'
Reported-by: Dan Carpenter <error27@gmail.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Eugene Teo <eteo@redhat.com>
Cc: Julia Lawall <julia@diku.dk>
S... | ```diff
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 3ea827ddf0fe..04b53b5ebe59 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -4806,8 +4806,7 @@ static int btrfs_rename(struct inode *old_dir, struct dentry *old_dentry,
* and the replacement file is large. Start IO on it now so
* we don't add ... |
665d66e8fad60a5a162c4615f27f916ad1a6d567 | Analyze and fix the following issue in the Linux kernel code: ide: fix races in handling of user-space SET XFER commands | Problem Details:
* Make cmd->tf_flags field 'u16' and add IDE_TFLAG_SET_XFER taskfile flag.
* Update ide_finish_cmd() to set xfer / re-read id if the new flag is set.
* Convert set_xfer_rate() (write handler for /proc/ide/hd?/current_speed)
and ide_cmd_ioctl() (HDIO_DRIVE_CMD ioctl handler) to use the new flag.
* ... | ```diff
diff --git a/drivers/ide/ide-ioctls.c b/drivers/ide/ide-ioctls.c
index e246d3d3fbcc..d3440b5010a5 100644
--- a/drivers/ide/ide-ioctls.c
+++ b/drivers/ide/ide-ioctls.c
@@ -167,6 +167,8 @@ static int ide_cmd_ioctl(ide_drive_t *drive, unsigned long arg)
err = -EINVAL;
goto abort;
}
+
+ cmd.tf_flags |= ... |
fa56d4cb4022c8b313c3b99236e1b87effc3655b | Analyze and fix the following issue in the Linux kernel code: ide: allow ide_dev_read_id() to be called from the IRQ context | Problem Details:
* Un-static __ide_wait_stat().
* Allow ide_dev_read_id() helper to be called from the IRQ context by
adding irq_ctx flag and using mdelay()/__ide_wait_stat() when needed.
* Switch ide_driveid_update() to set irq_ctx flag.
This change is needed for the consecutive patch which fixes races in
handlin... | ```diff
diff --git a/drivers/ide/ide-iops.c b/drivers/ide/ide-iops.c
index 2892b242bbe1..b99873845d21 100644
--- a/drivers/ide/ide-iops.c
+++ b/drivers/ide/ide-iops.c
@@ -102,8 +102,8 @@ EXPORT_SYMBOL(ide_fixstring);
* setting a timer to wake up at half second intervals thereafter,
* until timeout is achieved, befo... |
2d5abcedeb41f4af9582c60cef70749c3ab90a3b | Analyze and fix the following issue in the Linux kernel code: ide: ide-taskfile.c fix style problems | Problem Details:
Fix trivial style problems:
WARNING: Use #include <linux/uaccess.h> instead of <asm/uaccess.h>
WARNING: space prohibited between function name and open parenthesis '('
WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable
ERROR: do not use C99 // comments X 2
ERROR: trailing sta... | ```diff
diff --git a/drivers/ide/ide-taskfile.c b/drivers/ide/ide-taskfile.c
index 3a5224cbd0f2..50336d51eebc 100644
--- a/drivers/ide/ide-taskfile.c
+++ b/drivers/ide/ide-taskfile.c
@@ -19,8 +19,8 @@
#include <linux/hdreg.h>
#include <linux/ide.h>
#include <linux/scatterlist.h>
+#include <linux/uaccess.h>
-#inclu... |
6f3848ac2399faac0be3f26648bf1d7a644a8242 | Analyze and fix the following issue in the Linux kernel code: ide-tape: fix handling of postponed rqs | Problem Details:
ide-tape used to hit
[ 58.614854] ide-tape: ht0: BUG: Two DSC requests queued!
due to the fact that another rq was being issued while the driver was
waiting for DSC to get set for the device executing ATAPI commands which
set the DSC to 1 to indicate completion.
Here's a sample output of that case... | ```diff
diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c
index 3468ece98496..7b2032bc357b 100644
--- a/drivers/ide/ide-tape.c
+++ b/drivers/ide/ide-tape.c
@@ -155,7 +155,8 @@ typedef struct ide_tape_obj {
* other device. Note that at most we will have only one DSC (usually
* data transfer) request in ... |
37bbe084d1152cb580d2cc88b4eda2004506a141 | Analyze and fix the following issue in the Linux kernel code: ide-tape: fix debug call | Problem Details:
This error only occurs when IDETAPE_DEBUG_LOG is enabled.
Signed-off-by: Mark de Wever <koraq@xs4all.nl>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c
index bc5fb12b913c..1d74f159bcc4 100644
--- a/drivers/ide/ide-tape.c
+++ b/drivers/ide/ide-tape.c
@@ -583,7 +583,7 @@ static ide_startstop_t idetape_do_request(ide_drive_t *drive,
struct ide_cmd cmd;
u8 stat;
- debug_log(DBG_SENSE, "sector: %llu... |
7fa350b4754cd69c8352ef3f5d23082fbdcab0bd | Analyze and fix the following issue in the Linux kernel code: ide: Fix annoying warning in ide_pio_bytes(). | Problem Details:
GCC can't see that flags is only set and used when PageHighmem() is
true.
Inspired by a patch from Jean Delvare.
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/drivers/ide/ide-taskfile.c b/drivers/ide/ide-taskfile.c
index 90e5c0deb0e0..3a5224cbd0f2 100644
--- a/drivers/ide/ide-taskfile.c
+++ b/drivers/ide/ide-taskfile.c
@@ -225,8 +225,8 @@ void ide_pio_bytes(ide_drive_t *drive, struct ide_cmd *cmd,
ide_hwif_t *hwif = drive->hwif;
struct scatterlist *s... |
3440625d78711bee41a84cf29c3d8c579b522666 | Analyze and fix the following issue in the Linux kernel code: flat: fix uninitialized ptr with shared libs | Problem Details:
The new credentials code broke load_flat_shared_library() as it now uses
an uninitialized cred pointer.
Reported-by: Bernd Schmidt <bernds_cb1@t-online.de>
Tested-by: Bernd Schmidt <bernds_cb1@t-online.de>
Cc: Mike Frysinger <vapier@gentoo.org>
Cc: David Howells <dhowells@redhat.com>
Cc: <stable@kerne... | ```diff
diff --git a/fs/binfmt_flat.c b/fs/binfmt_flat.c
index 697f6b5f1313..e92f229e3c6e 100644
--- a/fs/binfmt_flat.c
+++ b/fs/binfmt_flat.c
@@ -828,15 +828,22 @@ static int load_flat_shared_library(int id, struct lib_info *libs)
if (IS_ERR(bprm.file))
return res;
+ bprm.cred = prepare_exec_creds();
+ res = -E... |
9e5cf0ca2e9b65110ae5f094d7f0f7165cd1bbbb | Analyze and fix the following issue in the Linux kernel code: lib/decompress_*: only include <linux/slab.h> if STATIC is not defined | Problem Details:
These includes were added by 079effb6933f34b9b1b67b08bd4fd7fb672d16ef
("kmemtrace, kbuild: fix slab.h dependency problem in
lib/decompress_inflate.c") to fix the build when using kmemtrace. However
this is not necessary when used to create a compressed kernel, and
actually creates issues (brings a lot... | ```diff
diff --git a/lib/decompress_bunzip2.c b/lib/decompress_bunzip2.c
index d3dc9f2beb27..600f473a5610 100644
--- a/lib/decompress_bunzip2.c
+++ b/lib/decompress_bunzip2.c
@@ -49,10 +49,10 @@
#define PREBOOT
#else
#include <linux/decompress/bunzip2.h>
+#include <linux/slab.h>
#endif /* STATIC */
#include <lin... |
daeb6b6fbe27049f465c48a7d0ee5555c3b84064 | Analyze and fix the following issue in the Linux kernel code: bzip2/lzma/gzip: fix comments describing decompressor API | Problem Details:
Fix and improve comments in decompress/generic.h that describe the
decompressor API. Also remove an unused definition, and rename INBUF_LEN
in lib/decompress_inflate.c to conform to bzip2/lzma naming.
Signed-off-by: Phillip Lougher <phillip@lougher.demon.co.uk>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Si... | ```diff
diff --git a/include/linux/decompress/generic.h b/include/linux/decompress/generic.h
index 6dfb856327bb..0c7111a55a1a 100644
--- a/include/linux/decompress/generic.h
+++ b/include/linux/decompress/generic.h
@@ -1,31 +1,37 @@
#ifndef DECOMPRESS_GENERIC_H
#define DECOMPRESS_GENERIC_H
-/* Minimal chunksize to ... |
9c8a8228d0827e0d91d28527209988f672f97d28 | Analyze and fix the following issue in the Linux kernel code: execve: must clear current->clear_child_tid | Problem Details:
While looking at Jens Rosenboom bug report
(http://lkml.org/lkml/2009/7/27/35) about strange sys_futex call done from
a dying "ps" program, we found following problem.
clone() syscall has special support for TID of created threads. This
support includes two features.
One (CLONE_CHILD_SETTID) is to s... | ```diff
diff --git a/kernel/fork.c b/kernel/fork.c
index 466531eb92cc..021e1138556e 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -568,18 +568,18 @@ void mm_release(struct task_struct *tsk, struct mm_struct *mm)
* the value intact in a core dump, and to save the unnecessary
* trouble otherwise. Userland only... |
20de03dae54e10271ffd308654dfb4a117f4789d | Analyze and fix the following issue in the Linux kernel code: i.MX31: fix framebuffer locking regressions | Problem Details:
Recent framebuffer locking patches first made affected systems unbootable,
then the dead-lock has been fixed but as of 2.6.31-rc4 the framebuffer on
mx3 machines doesn't work. Fix this.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Krzysztof... | ```diff
diff --git a/drivers/video/mx3fb.c b/drivers/video/mx3fb.c
index f8778cde2183..054ef29be479 100644
--- a/drivers/video/mx3fb.c
+++ b/drivers/video/mx3fb.c
@@ -669,7 +669,8 @@ static uint32_t bpp_to_pixfmt(int bpp)
}
static int mx3fb_blank(int blank, struct fb_info *fbi);
-static int mx3fb_map_video_memory(s... |
2d8dd38a5aa0cc2490bbad9b75e77fa154e1d145 | Analyze and fix the following issue in the Linux kernel code: vfs: mnt_want_write_file(): fix special file handling | Problem Details:
I suspect that mnt_want_write_file() may have wrong assumption. I think
mnt_want_write_file() is assuming it increments ->mnt_writers if
(file->f_mode & FMODE_WRITE). But, if it's special_file(), it is false?
Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Acked-by: Dave Hansen <dave@lin... | ```diff
diff --git a/fs/namespace.c b/fs/namespace.c
index 277c28a63ead..7230787d18b0 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -316,7 +316,8 @@ EXPORT_SYMBOL_GPL(mnt_clone_write);
*/
int mnt_want_write_file(struct file *file)
{
- if (!(file->f_mode & FMODE_WRITE))
+ struct inode *inode = file->f_dentry->... |
521594442cc62d1c2af8436a05ab5918b7730b19 | Analyze and fix the following issue in the Linux kernel code: viafb: fix rmmod bug | Problem Details:
This fixes a bug caused by changing pointers (viafb_mode, viafb_mode1)
assigned by module_param. It reduces driver complexity by not needlessly
changing these vars as they are only read once and removing now
superfluous code.
On unpatched kernels loading viafb with viafb_mode or viafb_mode1 option
us... | ```diff
diff --git a/drivers/video/via/hw.c b/drivers/video/via/hw.c
index fcd53ceb88fa..c8960003f47d 100644
--- a/drivers/video/via/hw.c
+++ b/drivers/video/via/hw.c
@@ -2407,14 +2407,14 @@ int viafb_setmode(int vmode_index, int hor_res, int ver_res, int video_bpp,
viafb_dvi_set_mode(viafb_get_mode_index
... |
4bfc44958e499af9a73f62201543b3a1f617cfeb | Analyze and fix the following issue in the Linux kernel code: mm: make set_mempolicy(MPOL_INTERLEAV) N_HIGH_MEMORY aware | Problem Details:
At first, init_task's mems_allowed is initialized as this.
init_task->mems_allowed == node_state[N_POSSIBLE]
And cpuset's top_cpuset mask is initialized as this
top_cpuset->mems_allowed = node_state[N_HIGH_MEMORY]
Before 2.6.29:
policy's mems_allowed is initialized as this.
1. update tasks->mems... | ```diff
diff --git a/include/linux/nodemask.h b/include/linux/nodemask.h
index 829b94b156f2..b359c4a9ec9e 100644
--- a/include/linux/nodemask.h
+++ b/include/linux/nodemask.h
@@ -82,6 +82,12 @@
* to generate slightly worse code. So use a simple one-line #define
* for node_isset(), instead of wrapping an inli... |
93274e4d4e9416ad1fa47e2f26011e2c483fe5fe | Analyze and fix the following issue in the Linux kernel code: fbcon: fix rotate upside down crash | Problem Details:
Fix the rotate_ud() function not to crash in case of a font which has not
a width of multiple by 8: The inner loop of the font pixel copy should not
access a bit outside the font memory area. Subtract the shift offset from
the font width will prevent this.
Signed-off-by: Stefani Seibold <stefani@seib... | ```diff
diff --git a/drivers/video/console/fbcon_rotate.h b/drivers/video/console/fbcon_rotate.h
index 75be5ce53dc5..e233444cda66 100644
--- a/drivers/video/console/fbcon_rotate.h
+++ b/drivers/video/console/fbcon_rotate.h
@@ -45,7 +45,7 @@ static inline void rotate_ud(const char *in, char *out, u32 width, u32 height)
... |
69dd647f969c28d18de77e2153f30d05a1874571 | Analyze and fix the following issue in the Linux kernel code: generic-ipi: fix hotplug_cfd() | Problem Details:
Use CONFIG_HOTPLUG_CPU, not CONFIG_CPU_HOTPLUG
When hot-unpluging a cpu, it will leak memory allocated at cpu hotplug,
but only if CPUMASK_OFFSTACK=y, which is default to n.
The bug was introduced by 8969a5ede0f9e17da4b943712429aef2c9bcd82b
("generic-ipi: remove kmalloc()").
Signed-off-by: Xiao Guan... | ```diff
diff --git a/kernel/smp.c b/kernel/smp.c
index ad63d8501207..94188b8ecc33 100644
--- a/kernel/smp.c
+++ b/kernel/smp.c
@@ -57,7 +57,7 @@ hotplug_cfd(struct notifier_block *nfb, unsigned long action, void *hcpu)
return NOTIFY_BAD;
break;
-#ifdef CONFIG_CPU_HOTPLUG
+#ifdef CONFIG_HOTPLUG_CPU
case CPU_U... |
2020002a878403a6858868d85a43623f74859dba | Analyze and fix the following issue in the Linux kernel code: drivers/w1/masters/omap_hdq.c: fix missing mutex unlock | Problem Details:
This was found using a semantic patch, more info can be found at:
http://www.emn.fr/x-info/coccinelle/
Signed-off-by: Stoyan Gaydarov <sgayda2@uiuc.edu>
Acked-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@lin... | ```diff
diff --git a/drivers/w1/masters/omap_hdq.c b/drivers/w1/masters/omap_hdq.c
index a7e3b706b9d3..0d92969404c3 100644
--- a/drivers/w1/masters/omap_hdq.c
+++ b/drivers/w1/masters/omap_hdq.c
@@ -687,6 +687,7 @@ static int omap_hdq_remove(struct platform_device *pdev)
if (hdq_data->hdq_usecount) {
dev_dbg(&pd... |
b36ec0428a06fcbdb67d61e9e664154e5dd9a8c7 | Analyze and fix the following issue in the Linux kernel code: xfs: fix freeing of inodes not yet added to the inode cache | Problem Details:
When freeing an inode that lost race getting added to the inode cache we
must not call into ->destroy_inode, because that would delete the inode
that won the race from the inode cache radix tree.
This patch uses splits a new xfs_inode_free helper out of xfs_ireclaim
and uses that plus __destroy_inode ... | ```diff
diff --git a/fs/xfs/xfs_iget.c b/fs/xfs/xfs_iget.c
index 719c85b155f4..34ec86923f7e 100644
--- a/fs/xfs/xfs_iget.c
+++ b/fs/xfs/xfs_iget.c
@@ -116,6 +116,71 @@ xfs_inode_alloc(
return ip;
}
+STATIC void
+xfs_inode_free(
+ struct xfs_inode *ip)
+{
+ switch (ip->i_d.di_mode & S_IFMT) {
+ case S_IFREG:
+ case... |
2e00c97e2c1d2ffc9e26252ca26b237678b0b772 | Analyze and fix the following issue in the Linux kernel code: vfs: add __destroy_inode | Problem Details:
When we want to tear down an inode that lost the add to the cache race
in XFS we must not call into ->destroy_inode because that would delete
the inode that won the race from the inode cache radix tree.
This patch provides the __destroy_inode helper needed to fix this,
the actual fix will be in th nex... | ```diff
diff --git a/fs/inode.c b/fs/inode.c
index af2c05235cc8..ae7b67e48661 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -229,7 +229,7 @@ static struct inode *alloc_inode(struct super_block *sb)
return inode;
}
-void destroy_inode(struct inode *inode)
+void __destroy_inode(struct inode *inode)
{
BUG_ON(inode_h... |
54e346215e4fe2ca8c94c54e546cc61902060510 | Analyze and fix the following issue in the Linux kernel code: vfs: fix inode_init_always calling convention | Problem Details:
Currently inode_init_always calls into ->destroy_inode if the additional
initialization fails. That's not only counter-intuitive because
inode_init_always did not allocate the inode structure, but in case of
XFS it's actively harmful as ->destroy_inode might delete the inode from
a radix-tree that has... | ```diff
diff --git a/fs/inode.c b/fs/inode.c
index 901bad1e5f12..af2c05235cc8 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -120,12 +120,11 @@ static void wake_up_inode(struct inode *inode)
* These are initializations that need to be done on every inode
* allocation as the fields are not initialised by slab allocatio... |
d25f14389a65c7f95512b01415d8d4a8d62855ab | Analyze and fix the following issue in the Linux kernel code: PCI hotplug: SGI hotplug: fix build failure | Problem Details:
The commit bd3d99c17039fd05a29587db3f4a180c48da115a ("PCI: Remove
untested Electromechanical Interlock (EMI) support in pciehp."), which
removes the definition of "struct hotplug_slot_attr", broke SGI
hotplug driver. By this commit, we get the following compile error.
drivers/pci/hotplug/sgi_hotplug.c... | ```diff
diff --git a/drivers/pci/hotplug/sgi_hotplug.c b/drivers/pci/hotplug/sgi_hotplug.c
index a4494d78e7c2..0a724bb6ba10 100644
--- a/drivers/pci/hotplug/sgi_hotplug.c
+++ b/drivers/pci/hotplug/sgi_hotplug.c
@@ -103,6 +103,12 @@ static ssize_t path_show (struct hotplug_slot *bss_hotplug_slot,
return retval;
}
+... |
d25f9f1357139bbdc79bc960ea84909a7c22ec2b | Analyze and fix the following issue in the Linux kernel code: mwl8k: fix NULL pointer dereference on receive out-of-memory | Problem Details:
When we go into out-of-memory and fail to allocate skbuffs to
refill the receive ring with, rxq_process can end up running into
a receive ring entry that is marked as host-owned but doesn't have
an associated skbuff. If this happens, we must break out of the
rx processing loop instead of trying to pro... | ```diff
diff --git a/drivers/net/wireless/mwl8k.c b/drivers/net/wireless/mwl8k.c
index a263d5c84c08..71f3eb67981e 100644
--- a/drivers/net/wireless/mwl8k.c
+++ b/drivers/net/wireless/mwl8k.c
@@ -1012,6 +1012,8 @@ static int rxq_process(struct ieee80211_hw *hw, int index, int limit)
rmb();
skb = rxq->rx_skb[rxq-... |
bd3f02212d6a457267e0c9c02c426151c436d9d4 | Analyze and fix the following issue in the Linux kernel code: ring-buffer: Fix memleak in ring_buffer_free() | Problem Details:
I noticed oprofile memleaked in linux-2.6 current tree,
and tracked this ring-buffer leak.
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
LKML-Reference: <4A7C06B9.2090302@gmail.com>
Cc: stable@kernel.org
Signed-off-by: Steven Rostedt <rostedt@goodmis.org> | ```diff
diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c
index d4d3580a894a..a330513d96ce 100644
--- a/kernel/trace/ring_buffer.c
+++ b/kernel/trace/ring_buffer.c
@@ -735,6 +735,7 @@ ring_buffer_free(struct ring_buffer *buffer)
put_online_cpus();
+ kfree(buffer->buffers);
free_cpumask_var(bu... |
6558f985a1ff7ab2b413f49ee8766c919495e0ac | Analyze and fix the following issue in the Linux kernel code: ehci mxc: Fix clocks | Problem Details:
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> | ```diff
diff --git a/arch/arm/mach-mx3/clock.c b/arch/arm/mach-mx3/clock.c
index 25b6f55bfb03..2b29491c22bc 100644
--- a/arch/arm/mach-mx3/clock.c
+++ b/arch/arm/mach-mx3/clock.c
@@ -532,6 +532,12 @@ static struct clk_lookup lookups[] = {
_REGISTER_CLOCK("ipu-core", NULL, ipu_clk)
_REGISTER_CLOCK("mx3_sdc_fb", NULL... |
5ef881bbecc72862fa379cb286a50f2781db4cec | Analyze and fix the following issue in the Linux kernel code: MXC: pwm driver fixes | Problem Details:
- fix off-by-one error in divider calculation
- disable pwm in pwm_disable
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> | ```diff
diff --git a/arch/arm/plat-mxc/pwm.c b/arch/arm/plat-mxc/pwm.c
index ae34198a79dd..42dd17b89ff3 100644
--- a/arch/arm/plat-mxc/pwm.c
+++ b/arch/arm/plat-mxc/pwm.c
@@ -72,7 +72,7 @@ int pwm_config(struct pwm_device *pwm, int duty_ns, int period_ns)
writel(duty_cycles, pwm->mmio_base + MX3_PWMSAR);
writel... |
d6b515028863a912d051d371b6d71e09f2a9ff19 | Analyze and fix the following issue in the Linux kernel code: imxfb: use resource_size() macro | Problem Details:
This fixes an off-by-one error. Also, use dev_err instead of printk
in probe() function.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> | ```diff
diff --git a/drivers/video/imxfb.c b/drivers/video/imxfb.c
index a8c41cb60fff..330857a8b318 100644
--- a/drivers/video/imxfb.c
+++ b/drivers/video/imxfb.c
@@ -661,7 +661,7 @@ static int __init imxfb_probe(struct platform_device *pdev)
struct resource *res;
int ret;
- printk("i.MX Framebuffer driver\n");
+... |
997d74b18ae1d0d8f4c4469a5d1ce8d73ca8402c | Analyze and fix the following issue in the Linux kernel code: MXC iomux-v3: Fix defines for PAD_CTL registers | Problem Details:
The old defines leaked in from an old version of the patch.
Change the defines to match the register layout of the iomuxer.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> | ```diff
diff --git a/arch/arm/plat-mxc/include/mach/iomux-v3.h b/arch/arm/plat-mxc/include/mach/iomux-v3.h
index 7cd84547658f..cd06df9370cb 100644
--- a/arch/arm/plat-mxc/include/mach/iomux-v3.h
+++ b/arch/arm/plat-mxc/include/mach/iomux-v3.h
@@ -68,28 +68,24 @@ struct pad_desc {
/*
* Use to set PAD control
*/
-#d... |
0e692a94e378628b7d527260ad939894454bcca8 | Analyze and fix the following issue in the Linux kernel code: lockdep: Fix typos in documentation | Problem Details:
s/head/held
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Cc: Peter Zijlstra <peterz@infradead.org>
LKML-Reference: <4A7BD37E.9060806@cn.fujitsu.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu> | ```diff
diff --git a/Documentation/lockdep-design.txt b/Documentation/lockdep-design.txt
index e20d913d5914..abf768c681e2 100644
--- a/Documentation/lockdep-design.txt
+++ b/Documentation/lockdep-design.txt
@@ -30,9 +30,9 @@ State
The validator tracks lock-class usage history into 4n + 1 separate state bits:
- 'eve... |
9795447f71324d8f14c19ed68b43c883135c3f59 | Analyze and fix the following issue in the Linux kernel code: lockdep: Fix file mode of lock_stat | Problem Details:
/proc/lock_stat is writable.
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Cc: Peter Zijlstra <peterz@infradead.org>
LKML-Reference: <4A7BE7B6.10904@cn.fujitsu.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu> | ```diff
diff --git a/kernel/lockdep_proc.c b/kernel/lockdep_proc.c
index d7135aa2d2c4..e94caa666dba 100644
--- a/kernel/lockdep_proc.c
+++ b/kernel/lockdep_proc.c
@@ -758,7 +758,8 @@ static int __init lockdep_proc_init(void)
&proc_lockdep_stats_operations);
#ifdef CONFIG_LOCK_STAT
- proc_create("lock_stat", S... |
c12abc012e18b362204345c323536f228d65c4db | Analyze and fix the following issue in the Linux kernel code: ARM: OMAP: McBSP: Fix ASoC on OMAP1510 by fixing API of omap_mcbsp_start/stop | Problem Details:
Simultaneous audio playback and capture on OMAP1510 can cause that second
stream is stalled if there is enough delay between startup of the audio
streams.
Current implementation of the omap_mcbsp_start is starting both transmitter
and receiver at the same time and it is called only for firstly started... | ```diff
diff --git a/arch/arm/plat-omap/include/mach/mcbsp.h b/arch/arm/plat-omap/include/mach/mcbsp.h
index bb154ea76769..57249bb1e9bc 100644
--- a/arch/arm/plat-omap/include/mach/mcbsp.h
+++ b/arch/arm/plat-omap/include/mach/mcbsp.h
@@ -387,8 +387,8 @@ void omap_mcbsp_register_board_cfg(struct omap_mcbsp_platform_dat... |
53cb780adbe69df90c8dc23e992ce40455e687c3 | Analyze and fix the following issue in the Linux kernel code: [S390] KVM: Read buffer overflow | Problem Details:
Check whether index is within bounds before testing the element.
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> | ```diff
diff --git a/arch/s390/kvm/sigp.c b/arch/s390/kvm/sigp.c
index 36678835034d..0ef81d6776e9 100644
--- a/arch/s390/kvm/sigp.c
+++ b/arch/s390/kvm/sigp.c
@@ -169,7 +169,7 @@ static int __sigp_set_prefix(struct kvm_vcpu *vcpu, u16 cpu_addr, u32 address,
unsigned long *reg)
{
struct kvm_s390_float_interr... |
7dbdee2e9a2ac42ea5135801bcc9d1a8e3f672aa | Analyze and fix the following issue in the Linux kernel code: tracing: Fix recordmcount.pl to handle sections with only weak functions | Problem Details:
Roland Dreier found that a section that contained only a weak
function in one of the staging drivers and this caused
recordmcount.pl to spit out a warning and fail.
Although it is strange that a driver would have a weak function, and
this function only be used in one place, it should not be something
... | ```diff
diff --git a/scripts/recordmcount.pl b/scripts/recordmcount.pl
index 4889c44d71b5..911ba7ffab84 100755
--- a/scripts/recordmcount.pl
+++ b/scripts/recordmcount.pl
@@ -393,7 +393,7 @@ while (<IN>) {
$read_function = 0;
}
# print out any recorded offsets
- update_funcs() if ($text_found);
+ update_funcs... |
a48ec346fcb095f6a0e74a57165f9a9a3b23b95a | Analyze and fix the following issue in the Linux kernel code: tc35815: Use 0 RxFragSize.MinFrag value for non-packing mode | Problem Details:
The datasheet say "When not enabling packing, the MinFrag value must
remain at 0". Do not set value to RxFragSize register if
TC35815_USE_PACKEDBUFFER disabled.
This is not a bugfix. No real problem reported on this.
Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: David S. Miller... | ```diff
diff --git a/drivers/net/tc35815.c b/drivers/net/tc35815.c
index 411cc0e5f7a4..d1298e5b72c5 100644
--- a/drivers/net/tc35815.c
+++ b/drivers/net/tc35815.c
@@ -2394,8 +2394,6 @@ static void tc35815_chip_init(struct net_device *dev)
tc_writel(DMA_BURST_SIZE, &tr->DMA_Ctl);
#ifdef TC35815_USE_PACKEDBUFFER
tc... |
7bb82e834cc9cc95512287a9bf637719557674a0 | Analyze and fix the following issue in the Linux kernel code: tc35815: Fix rx_missed_errors count | Problem Details:
The Miss_Cnt register is cleared by reading. Accumulate its value to
rx_missed_errors count.
Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/drivers/net/tc35815.c b/drivers/net/tc35815.c
index f42aaf72cc95..411cc0e5f7a4 100644
--- a/drivers/net/tc35815.c
+++ b/drivers/net/tc35815.c
@@ -2139,7 +2139,7 @@ static struct net_device_stats *tc35815_get_stats(struct net_device *dev)
(struct tc35815_regs __iomem *)dev->base_addr;
if (netif... |
09384dfc76e526c3993c09c42e016372dc9dd22c | Analyze and fix the following issue in the Linux kernel code: irda: Fix irda_getname() leak | Problem Details:
irda_getname() can leak kernel memory to user.
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/net/irda/af_irda.c b/net/irda/af_irda.c
index cb762c8723ea..3ec2b434ea75 100644
--- a/net/irda/af_irda.c
+++ b/net/irda/af_irda.c
@@ -714,6 +714,7 @@ static int irda_getname(struct socket *sock, struct sockaddr *uaddr,
struct sock *sk = sock->sk;
struct irda_sock *self = irda_sk(sk);
+ memset... |
3d392475c873c10c10d6d96b94d092a34ebd4791 | Analyze and fix the following issue in the Linux kernel code: appletalk: fix atalk_getname() leak | Problem Details:
atalk_getname() can leak 8 bytes of kernel memory to user
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/net/appletalk/ddp.c b/net/appletalk/ddp.c
index 590b83963622..9ef6ff26eb0c 100644
--- a/net/appletalk/ddp.c
+++ b/net/appletalk/ddp.c
@@ -1237,6 +1237,7 @@ static int atalk_getname(struct socket *sock, struct sockaddr *uaddr,
return -ENOBUFS;
*uaddr_len = sizeof(struct sockaddr_at);
+ memse... |
f6b97b29513950bfbf621a83d85b6f86b39ec8db | Analyze and fix the following issue in the Linux kernel code: netrom: Fix nr_getname() leak | Problem Details:
nr_getname() can leak kernel memory to user.
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/net/netrom/af_netrom.c b/net/netrom/af_netrom.c
index ce51ce012cda..ce1a34b99c23 100644
--- a/net/netrom/af_netrom.c
+++ b/net/netrom/af_netrom.c
@@ -847,6 +847,7 @@ static int nr_getname(struct socket *sock, struct sockaddr *uaddr,
sax->fsa_ax25.sax25_family = AF_NETROM;
sax->fsa_ax25.sax25_... |
80922bbb12a105f858a8f0abb879cb4302d0ecaa | Analyze and fix the following issue in the Linux kernel code: econet: Fix econet_getname() leak | Problem Details:
econet_getname() can leak kernel memory to user.
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/net/econet/af_econet.c b/net/econet/af_econet.c
index 2e1f836d4240..f0bbc57926cd 100644
--- a/net/econet/af_econet.c
+++ b/net/econet/af_econet.c
@@ -520,6 +520,7 @@ static int econet_getname(struct socket *sock, struct sockaddr *uaddr,
if (peer)
return -EOPNOTSUPP;
+ memset(sec, 0, sizeof(*... |
17ac2e9c58b69a1e25460a568eae1b0dc0188c25 | Analyze and fix the following issue in the Linux kernel code: rose: Fix rose_getname() leak | Problem Details:
rose_getname() can leak kernel memory to user.
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/net/rose/af_rose.c b/net/rose/af_rose.c
index f0a76f6bca71..e5f478ca3d61 100644
--- a/net/rose/af_rose.c
+++ b/net/rose/af_rose.c
@@ -954,6 +954,7 @@ static int rose_getname(struct socket *sock, struct sockaddr *uaddr,
struct rose_sock *rose = rose_sk(sk);
int n;
+ memset(srose, 0, sizeof(*sr... |
2d2bcd319a3d1412999cdfc72ad64eec992dc37e | Analyze and fix the following issue in the Linux kernel code: sh: fix romImage mach dir usage | Problem Details:
This patch moves all the romImage related header files into
the mach/ directory.
Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org> | ```diff
diff --git a/arch/sh/boot/romimage/head.S b/arch/sh/boot/romimage/head.S
index 97a087bc9c4a..219bc626dd71 100644
--- a/arch/sh/boot/romimage/head.S
+++ b/arch/sh/boot/romimage/head.S
@@ -7,4 +7,4 @@
.text
.global romstart
romstart:
-#include <romimage.h>
+#include <mach/romimage.h>
diff --git a/arch/sh/incl... |
7766e16beec3363516306754c9c51a85747d734d | Analyze and fix the following issue in the Linux kernel code: sh: LED9, LED10 and LED11 support for Solution Engine 7724 | Problem Details:
This patch adds support for LED9, LED10 and LED11 on
the Solution Engine 7724 board. If CONFIG_PM is enabled
then these LEDs are used to show the hardware sleep
mode used by the processor. Useful to debug cpuidle.
Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.... | ```diff
diff --git a/arch/sh/boards/mach-se/7724/setup.c b/arch/sh/boards/mach-se/7724/setup.c
index 957ed176ea2c..36a4ca3a9000 100644
--- a/arch/sh/boards/mach-se/7724/setup.c
+++ b/arch/sh/boards/mach-se/7724/setup.c
@@ -429,6 +429,32 @@ static int __init devices_setup(void)
/* turn on USB clocks, use external cloc... |
ec56b66fed526e3b7dd58dba8945c405448f48d1 | Analyze and fix the following issue in the Linux kernel code: sh: 18-bit SYS panel fix for SuperH Mobile LCDC | Problem Details:
Fix the SuperH Mobile LCDC driver to make use of the full
18-bit DRD field in the LDDRDR register. Without this patch
only 16-bit register access is possible. Needed by 18-bit
SYS panels such as the one used on kfr2r09.
Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@lin... | ```diff
diff --git a/drivers/video/sh_mobile_lcdcfb.c b/drivers/video/sh_mobile_lcdcfb.c
index d1eb9656ca55..cff406de3d15 100644
--- a/drivers/video/sh_mobile_lcdcfb.c
+++ b/drivers/video/sh_mobile_lcdcfb.c
@@ -177,7 +177,7 @@ static unsigned long lcdc_sys_read_data(void *handle)
udelay(1);
lcdc_wait_bit(ch->lcdc, ... |
909f10de5de81668e4d0a401f3cb5ca6b8a3d20d | Analyze and fix the following issue in the Linux kernel code: sh: LCDC SYS bus access wait fix | Problem Details:
Update the SuperH Mobile LCDC driver to wait for SYS bus to
become idle after reading or writing. This is needed by the
kfr2r09 board, but also fixes potential problems on other
boards making use of the LCDC in a SYS configuration.
Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt... | ```diff
diff --git a/drivers/video/sh_mobile_lcdcfb.c b/drivers/video/sh_mobile_lcdcfb.c
index 98fb82f11611..d1eb9656ca55 100644
--- a/drivers/video/sh_mobile_lcdcfb.c
+++ b/drivers/video/sh_mobile_lcdcfb.c
@@ -154,6 +154,7 @@ static void lcdc_sys_write_index(void *handle, unsigned long data)
lcdc_write(ch->lcdc, _LD... |
1054598cab8674438675085fae459e960eb10799 | Analyze and fix the following issue in the Linux kernel code: perf_counter: Fix double list iteration in per task precise stats | Problem Details:
Brice Goglin reported this crash with per task precise stats:
> I finally managed to test the threaded perfcounter statistics (thanks a
> lot for implementing it). I am running 2.6.31-rc5 (with the AMD
> magny-cours patches but I don't think they matter here). I am trying to
> measure local/remote mem... | ```diff
diff --git a/kernel/perf_counter.c b/kernel/perf_counter.c
index 199ed4771315..673c1aaf7332 100644
--- a/kernel/perf_counter.c
+++ b/kernel/perf_counter.c
@@ -1104,7 +1104,7 @@ static void perf_counter_sync_stat(struct perf_counter_context *ctx,
__perf_counter_sync_stat(counter, next_counter);
counter =... |
4d1e00a8af426500edfb8643fa6c375b89f1f804 | Analyze and fix the following issue in the Linux kernel code: perf symbol: Fix symbol parsing in certain cases: use the build-id as a symlink | Problem Details:
In some cases distros have binaries and debuginfo in weird places:
[root@doppio tuna]# ls -la /usr/lib64/{xulrunner-1.9.1/xulrunner-stub,firefox-3.5.2/firefox}
-rwxr-xr-x 1 root root 90024 2009-08-03 19:45 /usr/lib64/firefox-3.5.2/firefox
-rwxr-xr-x 1 root root 90024 2009-08-03 18:23 /usr/lib64/xulrun... | ```diff
diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c
index 0580b94785e7..16ddca202948 100644
--- a/tools/perf/util/symbol.c
+++ b/tools/perf/util/symbol.c
@@ -661,10 +661,69 @@ out_close:
return err;
}
+#define BUILD_ID_SIZE 128
+
+static char *dso__read_build_id(struct dso *self, int verbose)
... |
469535a598f28c13a2a42037e1b778f671af1d16 | Analyze and fix the following issue in the Linux kernel code: ring-buffer: Fix advance of reader in rb_buffer_peek() | Problem Details:
When calling rb_buffer_peek() from ring_buffer_consume() and a
padding event is returned, the function rb_advance_reader() is
called twice. This may lead to missing samples or under high
workloads to the warning below. This patch fixes this. If a padding
event is returned by rb_buffer_peek() it will be... | ```diff
diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c
index 2606cee433da..d4d3580a894a 100644
--- a/kernel/trace/ring_buffer.c
+++ b/kernel/trace/ring_buffer.c
@@ -2383,7 +2383,6 @@ rb_buffer_peek(struct ring_buffer *buffer, int cpu, u64 *ts)
* the box. Return the padding, and we will release... |
e0d82a0a4e9841b787e6431ccfbb515546c55dc2 | Analyze and fix the following issue in the Linux kernel code: perf_counter/powerpc: Check oprofile_cpu_type for NULL before using it | Problem Details:
If the current CPU doesn't support performance counters,
cur_cpu_spec->oprofile_cpu_type can be NULL. The current
perf_counter modules don't test for that case and would thus
crash at boot time.
Bug reported by David Woodhouse.
Reported-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Benjami... | ```diff
diff --git a/arch/powerpc/kernel/mpc7450-pmu.c b/arch/powerpc/kernel/mpc7450-pmu.c
index c244133c67a6..cc466d039af6 100644
--- a/arch/powerpc/kernel/mpc7450-pmu.c
+++ b/arch/powerpc/kernel/mpc7450-pmu.c
@@ -407,7 +407,8 @@ struct power_pmu mpc7450_pmu = {
static int init_mpc7450_pmu(void)
{
- if (strcmp(cur... |
c5b1525533c484238015c48c78f86d49a1bfb86b | Analyze and fix the following issue in the Linux kernel code: intel-iommu: Fix enabling snooping feature by mistake | Problem Details:
Two defects work together result in KVM device passthrough randomly can't
work:
1. iommu_snooping is not initialized to zero when vm_iommu_init() called.
So it is possible to get a random value.
2. One line added by commit 2c2e2c38("IOMMU Identity Mapping Support")
change the code path, let it bypass d... | ```diff
diff --git a/drivers/pci/intel-iommu.c b/drivers/pci/intel-iommu.c
index af7ff9b5aed8..2314ad7ee5fe 100644
--- a/drivers/pci/intel-iommu.c
+++ b/drivers/pci/intel-iommu.c
@@ -1505,7 +1505,6 @@ static int domain_context_mapping_one(struct dmar_domain *domain, int segment,
}
set_bit(num, iommu->domain_i... |
5e8d6b8bf94f1ffcb7e3c31b73284c20f297f191 | Analyze and fix the following issue in the Linux kernel code: agp: fix uninorth build | Problem Details:
Signed-off-by: Dave Airlie <airlied@redhat.com> | ```diff
diff --git a/drivers/char/agp/uninorth-agp.c b/drivers/char/agp/uninorth-agp.c
index 2e993112ab88..4317a5588daf 100644
--- a/drivers/char/agp/uninorth-agp.c
+++ b/drivers/char/agp/uninorth-agp.c
@@ -135,7 +135,7 @@ static int uninorth_configure(void)
if (is_u3) {
pci_write_config_dword(agp_bridge->dev,
... |
45a41d147a3a31bb218201b0dd70cfe4e9ed5105 | Analyze and fix the following issue in the Linux kernel code: af_ieee802154: fix ioctl processing | Problem Details:
fix two errors in ioctl processing:
1) if the ioctl isn't supported one should return -ENOIOCTLCMD
2) don't call ndo_do_ioctl if the device doesn't provide it
Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> | ```diff
diff --git a/net/ieee802154/af_ieee802154.c b/net/ieee802154/af_ieee802154.c
index 3bb6bdb1dac1..af661805b9fa 100644
--- a/net/ieee802154/af_ieee802154.c
+++ b/net/ieee802154/af_ieee802154.c
@@ -136,7 +136,7 @@ static int ieee802154_dev_ioctl(struct sock *sk, struct ifreq __user *arg,
unsigned int cmd)
{
... |
985fe845aea9cd56fd351800302270444556e45a | Analyze and fix the following issue in the Linux kernel code: drm/radeon/kms: Fix caching mode selection for GTT object | Problem Details:
GTT object can either be cached,uncached or wc just let core ttm
pick the best mode according to how the bo driver and GTT memory
type was initialized.
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com> | ```diff
diff --git a/drivers/gpu/drm/radeon/radeon_object.c b/drivers/gpu/drm/radeon/radeon_object.c
index dd9ac2fed6d6..e98cae3bf4a6 100644
--- a/drivers/gpu/drm/radeon/radeon_object.c
+++ b/drivers/gpu/drm/radeon/radeon_object.c
@@ -106,7 +106,7 @@ static inline uint32_t radeon_object_flags_from_domain(uint32_t domai... |
af6af30c0fcd77e621638e53ef8b176bca8bd3b4 | Analyze and fix the following issue in the Linux kernel code: ftrace: Fix perf-tracepoint OOPS | Problem Details:
Not all tracepoints are created equal, in specific the ftrace
tracepoints are created with TRACE_EVENT_FORMAT() which does
not generate the needed bits to tie them into perf counters.
For those events, don't create the 'id' file and fail
->profile_enable when their ID is specified through other
means.... | ```diff
diff --git a/include/linux/ftrace_event.h b/include/linux/ftrace_event.h
index 5c093ffc655b..d7cd193c2277 100644
--- a/include/linux/ftrace_event.h
+++ b/include/linux/ftrace_event.h
@@ -119,11 +119,9 @@ struct ftrace_event_call {
void *filter;
void *mod;
-#ifdef CONFIG_EVENT_PROFILE
- atomic_t profil... |
1bbf20835c4e088667a090ce6523a0f70b62dc76 | Analyze and fix the following issue in the Linux kernel code: rtmutex: Avoid deadlock in rt_mutex_start_proxy_lock() | Problem Details:
In the event of a lock steal or owner died,
rt_mutex_start_proxy_lock() will give the rt_mutex to the
waiting task, but it fails to release the wait_lock. This leads
to subsequent deadlocks when other tasks try to acquire the
rt_mutex.
I also removed a few extra blank lines that really spaced this
rou... | ```diff
diff --git a/kernel/rtmutex.c b/kernel/rtmutex.c
index fcd107a78c5a..29bd4baf9e75 100644
--- a/kernel/rtmutex.c
+++ b/kernel/rtmutex.c
@@ -1039,16 +1039,14 @@ int rt_mutex_start_proxy_lock(struct rt_mutex *lock,
if (!rt_mutex_owner(lock) || try_to_steal_lock(lock, task)) {
/* We got the lock for task. */
... |
9073e3a32bb249293edc01ecff575bb87380c068 | Analyze and fix the following issue in the Linux kernel code: cxgb3: fix 2 ports 1G regression | Problem Details:
commit 88045b3cf0f8981129cb489c7b6bc36c21dd33a7
cxgb3: fix mac index mapping
Override the mac index computation for the gen2 adapter,
as each port is expected to use index 0.
introduces a regression on 2 port 1G adapter
as its xauicfg vpd value is null.
Add a check on the device id.
Signed-off-by... | ```diff
diff --git a/drivers/net/cxgb3/t3_hw.c b/drivers/net/cxgb3/t3_hw.c
index 526e144b8b74..032cfe065570 100644
--- a/drivers/net/cxgb3/t3_hw.c
+++ b/drivers/net/cxgb3/t3_hw.c
@@ -3692,8 +3692,12 @@ static void mc7_prep(struct adapter *adapter, struct mc7 *mc7,
void mac_prep(struct cmac *mac, struct adapter *adap... |
3f6e968ef4e1d8d93d8a8505461b0e50a9e97ad8 | Analyze and fix the following issue in the Linux kernel code: tracing: do not use functions starting with .L in recordmcount.pl | Problem Details:
On Wed, 5 Aug 2009, Ingo Molnar wrote:
> * Dave Airlie <airlied@gmail.com> wrote:
>
> > Hey,
> >
> > So I spent 3-4 hrs today (I'm stupid yes) tracking down a .o
> > breakage by blaming rawhide gcc/binutils as I was using make
> > V=1and seeing only the compiler chain running,
>
> Hm, is this that powe... | ```diff
diff --git a/scripts/recordmcount.pl b/scripts/recordmcount.pl
index d29baa2e063a..4889c44d71b5 100755
--- a/scripts/recordmcount.pl
+++ b/scripts/recordmcount.pl
@@ -414,7 +414,10 @@ while (<IN>) {
$offset = hex $1;
} else {
# if we already have a function, and this is weak, skip it
- if (!de... |
464e85eb0e63096bd52e4c3e2a6fb8357fb95828 | Analyze and fix the following issue in the Linux kernel code: ring-buffer: do not disable ring buffer on oops_in_progress | Problem Details:
The commit:
commit e0fdace10e75dac67d906213b780ff1b1a4cc360
Author: David Miller <davem@davemloft.net>
Date: Fri Aug 1 01:11:22 2008 -0700
debug_locks: set oops_in_progress if we will log messages.
Otherwise lock debugging messages on runqueue locks can deadlock the
system due to... | ```diff
diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c
index 2fd1752f0c85..2606cee433da 100644
--- a/kernel/trace/ring_buffer.c
+++ b/kernel/trace/ring_buffer.c
@@ -2486,7 +2486,7 @@ static inline int rb_ok_to_lock(void)
* buffer too. A one time deal is all you get from reading
* the ring bu... |
0f2541d299d233eddddee4345795e0c46264fd56 | Analyze and fix the following issue in the Linux kernel code: ring-buffer: fix check of try_to_discard result | Problem Details:
The function ring_buffer_discard_commit inversed the code path
of the result of try_to_discard. It should skip incrementing the
entry counter if try_to_discard succeeded. But instead, it increments
the entry conder if it succeeded to discard, and does not increment
it if it fails.
The result of this b... | ```diff
diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c
index bf27bb7a63e2..2fd1752f0c85 100644
--- a/kernel/trace/ring_buffer.c
+++ b/kernel/trace/ring_buffer.c
@@ -1785,7 +1785,7 @@ void ring_buffer_discard_commit(struct ring_buffer *buffer,
*/
RB_WARN_ON(buffer, !local_read(&cpu_buffer->com... |
fbb474dedab871c7382858c374acd287dad4ab38 | Analyze and fix the following issue in the Linux kernel code: ASoC: Fix review issues in i.MX2x PCM driver | Problem Details:
Signed-off-by: javier Martin <javier.martin@vista-silicon.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> | ```diff
diff --git a/sound/soc/imx/mx1_mx2-pcm.c b/sound/soc/imx/mx1_mx2-pcm.c
index 94807f844131..16efd8a7a16d 100644
--- a/sound/soc/imx/mx1_mx2-pcm.c
+++ b/sound/soc/imx/mx1_mx2-pcm.c
@@ -126,7 +126,7 @@ static int dma_new_period(struct snd_pcm_substream *substream)
dma_size, dev_addr,
prtd->dma_params->... |
15b5bdaeeb15e0c18cca3ce7449188ca46516721 | Analyze and fix the following issue in the Linux kernel code: ALSA: ASoC: cs4270: move power management hooks to snd_soc_codec_device | Problem Details:
Power management for the cs4270 codec is currently implemented as part
of the i2c_driver struct. The disadvantage of doing it this way is that
the callbacks registered in the snd_soc_card struct are called _before_
the codec's callbacks.
That doesn't work, because the snd_soc_card callbacks will most ... | ```diff
diff --git a/sound/soc/codecs/cs4270.c b/sound/soc/codecs/cs4270.c
index a32b8226c8a4..ca1e24a8f12a 100644
--- a/sound/soc/codecs/cs4270.c
+++ b/sound/soc/codecs/cs4270.c
@@ -806,15 +806,30 @@ static int cs4270_i2c_suspend(struct i2c_client *client, pm_message_t mesg)
{
struct cs4270_private *cs4270 = i2c_ge... |
b0a2712ffdde139f95d3e78c359877b23709509a | Analyze and fix the following issue in the Linux kernel code: ASoC: MPC5200: Support for buffer wrap around | Problem Details:
The code in psc_dma_bcom_enqueue_tx() didn't account for the fact that
s->runtime->control->appl_ptr can wrap around to the beginning of the
buffer. This change fixes this problem.
Signed-off-by: John Bonesio <bones@secretlab.ca>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Mark B... | ```diff
diff --git a/sound/soc/fsl/mpc5200_dma.c b/sound/soc/fsl/mpc5200_dma.c
index f0a2d4071998..9ff62e3a9b1d 100644
--- a/sound/soc/fsl/mpc5200_dma.c
+++ b/sound/soc/fsl/mpc5200_dma.c
@@ -69,6 +69,23 @@ static void psc_dma_bcom_enqueue_next_buffer(struct psc_dma_stream *s)
static void psc_dma_bcom_enqueue_tx(stru... |
c0c60c4b9ab45bb02b20796401dd6a90770fd0ee | Analyze and fix the following issue in the Linux kernel code: ARM: 5639/1: arm: clkdev.c should include <linux/clk.h> | Problem Details:
<linux/clk.h> should be included to get the base API prototypes.
This fixes the following sparse warnings:
arch/arm/common/clkdev.c:65:12:
warning: symbol 'clk_get_sys' was not declared. Should it be static?
arch/arm/common/clkdev.c:79:12:
warning: symbol 'clk_get' was not declared. Shou... | ```diff
diff --git a/arch/arm/common/clkdev.c b/arch/arm/common/clkdev.c
index f37afd9422f3..aae5bc01acc8 100644
--- a/arch/arm/common/clkdev.c
+++ b/arch/arm/common/clkdev.c
@@ -17,6 +17,7 @@
#include <linux/err.h>
#include <linux/string.h>
#include <linux/mutex.h>
+#include <linux/clk.h>
#include <asm/clkdev.h>... |
65a5053b764a42d33b334ba55810bb5b56eb92df | Analyze and fix the following issue in the Linux kernel code: ARM: 5638/1: arch/arm/kernel/signal.c: use correct address space for CRUNCH | Problem Details:
preserve_crunch_context() calls __copy_to_user() which expects the
destination address to be in __user space. setup_sigframe() properly
passes the destination address.
restore_crunch_context() calls __copy_from_user() which expects the
source address to be in __user space. restore_sigframe() properl... | ```diff
diff --git a/arch/arm/kernel/signal.c b/arch/arm/kernel/signal.c
index 93bb4247b7ed..f6bc5d442782 100644
--- a/arch/arm/kernel/signal.c
+++ b/arch/arm/kernel/signal.c
@@ -133,7 +133,7 @@ sys_sigaction(int sig, const struct old_sigaction __user *act,
}
#ifdef CONFIG_CRUNCH
-static int preserve_crunch_context... |
cc104e52b4f61dbfe1a815f775ffb2fbbb4b785d | Analyze and fix the following issue in the Linux kernel code: vxge: Version update | Problem Details:
Update the driver version number for any bug reports from end users.
Signed-off-by: Benjamin LaHaise <ben.lahaise@neterion.com>
Signed-off-by: Ramkrishna Vepa <ram.vepa@neterion.com>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/drivers/net/vxge/vxge-version.h b/drivers/net/vxge/vxge-version.h
index 580c6eb077b9..8fbce7552035 100644
--- a/drivers/net/vxge/vxge-version.h
+++ b/drivers/net/vxge/vxge-version.h
@@ -17,7 +17,7 @@
#define VXGE_VERSION_MAJOR "2"
#define VXGE_VERSION_MINOR "0"
-#define VXGE_VERSION_FIX "4"
-#d... |
ff67df55f6bde9de5e508bf1f09509c843accd54 | Analyze and fix the following issue in the Linux kernel code: vxge: fix pktgen hangs (don't abuse skb->cb[]) | Problem Details:
This patch fixes a case in the transmit completion code which was resulting
in pktgen hanging at the end of a run. The cause is due to the fact that
the ->cb[] area of an skb cannot be used in a network driver's transmit
path, as that area belongs to the network protocol. Pktgen hangs, as it
sends ou... | ```diff
diff --git a/drivers/net/vxge/vxge-config.h b/drivers/net/vxge/vxge-config.h
index 224acea771ed..62779a520ca1 100644
--- a/drivers/net/vxge/vxge-config.h
+++ b/drivers/net/vxge/vxge-config.h
@@ -978,7 +978,9 @@ struct __vxge_hw_fifo {
void *txdlh,
enum vxge_hw_fifo_tcode t_code,
void *userdata,
- ... |
14074eab8dcaa7f66d8f52612b2dcec51222bb5f | Analyze and fix the following issue in the Linux kernel code: be2net: Patch to perform function reset at initialization | Problem Details:
This patch is a bug fix to avoid system going into a bad state when
driver is loaded in context of kdump kernel. The patch fixes the issue
by performing a soft reset of pci function at probe time.
Signed-off-by: sarveshwarb <sarveshwarb@serverengines.com>
Signed-off-by: David S. Miller <davem@davemlof... | ```diff
diff --git a/drivers/net/benet/be_cmds.c b/drivers/net/benet/be_cmds.c
index de107732dcdc..2547ee296a7d 100644
--- a/drivers/net/benet/be_cmds.c
+++ b/drivers/net/benet/be_cmds.c
@@ -1019,3 +1019,24 @@ int be_cmd_query_fw_cfg(struct be_adapter *adapter, u32 *port_num)
spin_unlock(&adapter->mbox_lock);
retur... |
545eb370087494dcf267e6285fe3aa20e5617c33 | Analyze and fix the following issue in the Linux kernel code: netxen: fix vlan tso case | Problem Details:
Fix the calculation of remaining header length in TSO
over vlan device case. This was inadvertently missed
out in patch 028afe719855a157e32450c ("netxen: add vlan
tx acceleration support").
Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/drivers/net/netxen/netxen_nic_main.c b/drivers/net/netxen/netxen_nic_main.c
index 40549a0e9ff0..c91e02245815 100644
--- a/drivers/net/netxen/netxen_nic_main.c
+++ b/drivers/net/netxen/netxen_nic_main.c
@@ -1450,7 +1450,7 @@ netxen_tso_check(struct net_device *netdev,
skb_copy_from_linear_data_of... |
d76c626b922e279c7764ec46fb1b9bbd41538f35 | Analyze and fix the following issue in the Linux kernel code: cpmac: fix wrong MDIO bus identifier | Problem Details:
This patch fixes the wrong MDIO bus identifier which was
set to 0 unconditionaly, suitable for external switches while
it is actually 1 for PHYs different than external switches
which are autodetected.
Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: David S. Miller <davem@davemlof... | ```diff
diff --git a/drivers/net/cpmac.c b/drivers/net/cpmac.c
index fd5e32cbcb87..c951dd43f29b 100644
--- a/drivers/net/cpmac.c
+++ b/drivers/net/cpmac.c
@@ -1109,7 +1109,7 @@ static int external_switch;
static int __devinit cpmac_probe(struct platform_device *pdev)
{
int rc, phy_id;
- char *mdio_bus_id = "0";
+ c... |
cf39c4c572dc54adbdf8933d1e6cd87ee94d8fc0 | Analyze and fix the following issue in the Linux kernel code: phonet: phonet_device_get() fix | Problem Details:
net/phonet/pn_dev.c: In function `phonet_device_get':
net/phonet/pn_dev.c:99: warning: 'dev' might be used uninitialized in this function
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Acked-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
Signed-off-by: David S. Miller <davem@davemloft.n... | ```diff
diff --git a/net/phonet/pn_dev.c b/net/phonet/pn_dev.c
index b0d6ddd82a9d..c2b77a698695 100644
--- a/net/phonet/pn_dev.c
+++ b/net/phonet/pn_dev.c
@@ -96,7 +96,7 @@ struct net_device *phonet_device_get(struct net *net)
{
struct phonet_device_list *pndevs = phonet_device_list(net);
struct phonet_device *pnd... |
819e0064634f580ab618189e657ea58341d214b7 | Analyze and fix the following issue in the Linux kernel code: drm/i915: Fix read outside array bounds in restoring the SWF10 range. | Problem Details:
dev_priv->saveSWF1 is a 16 element array, but this reads up to index 22,
and restored values from the wrong registers.
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Eric Anholt <eric@anholt.net> | ```diff
diff --git a/drivers/gpu/drm/i915/i915_suspend.c b/drivers/gpu/drm/i915/i915_suspend.c
index 9e1d16e5c3ea..1d04e1904ac6 100644
--- a/drivers/gpu/drm/i915/i915_suspend.c
+++ b/drivers/gpu/drm/i915/i915_suspend.c
@@ -598,7 +598,7 @@ int i915_restore_state(struct drm_device *dev)
for (i = 0; i < 16; i++) {
... |
476181cb05c6a3aea3ef42309388e255c934a06f | Analyze and fix the following issue in the Linux kernel code: dccp: missing destroy of percpu counter variable while unload module | Problem Details:
percpu counter dccp_orphan_count is init in dccp_init() by
percpu_counter_init() while dccp module is loaded, but the
destroy of it is missing while dccp module is unloaded. We
can get the kernel WARNING about this. Reproduct by the
following commands:
$ modprobe dccp
$ rmmod dccp
$ modprobe dcc... | ```diff
diff --git a/net/dccp/proto.c b/net/dccp/proto.c
index 94ca8eaace7d..6294f57162bb 100644
--- a/net/dccp/proto.c
+++ b/net/dccp/proto.c
@@ -1159,6 +1159,7 @@ static void __exit dccp_fini(void)
kmem_cache_destroy(dccp_hashinfo.bind_bucket_cachep);
dccp_ackvec_exit();
dccp_sysctl_exit();
+ percpu_counter_des... |
f60f785679b507cbeeb03d2db080ab649ac86027 | Analyze and fix the following issue in the Linux kernel code: netxen: fix dma mask update calculation | Problem Details:
Fix dma mask calculation that caps at 63-bit addressing even
when firmware advertises full 64-bit support.
Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/drivers/net/netxen/netxen_nic_main.c b/drivers/net/netxen/netxen_nic_main.c
index 3cd8cfcf627b..70c05c4c0cab 100644
--- a/drivers/net/netxen/netxen_nic_main.c
+++ b/drivers/net/netxen/netxen_nic_main.c
@@ -260,7 +260,7 @@ nx_update_dma_mask(struct netxen_adapter *adapter)
change = 0;
shift = ... |
6c5f80393b107b0c9e2a54b03b65d1880e706655 | Analyze and fix the following issue in the Linux kernel code: OMAP3: PM: Fix wrong sequence in suspend. | Problem Details:
Powerdomain previous state is checked after restoring new states in
suspend. This patch fixes this problem.
Signed-off-by: Jouni Hogander <jouni.hogander@nokia.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com> | ```diff
diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c
index b07efb26de18..488d595d8e4b 100644
--- a/arch/arm/mach-omap2/pm34xx.c
+++ b/arch/arm/mach-omap2/pm34xx.c
@@ -326,7 +326,6 @@ static int omap3_pm_suspend(void)
restore:
/* Restore next_pwrsts */
list_for_each_entry(pwrst, &pwrst_l... |
2466211e5debd205fc550d871fe0ab9b9a6d02ed | Analyze and fix the following issue in the Linux kernel code: OMAP3: Fixed crash bug with serial + suspend | Problem Details:
It was possible for an unhandled interrupt to occur if there was incoming
serial traffic during wakeup from suspend. This was caused by the code
in arch-arm/mach-omap2/serial.c keeping interrupt enabled all the time,
but not acking its interrupts. Applies on top of PM branch.
Use the PM begin/end hook... | ```diff
diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c
index 528f725722a2..b07efb26de18 100644
--- a/arch/arm/mach-omap2/pm34xx.c
+++ b/arch/arm/mach-omap2/pm34xx.c
@@ -296,6 +296,8 @@ out:
}
#ifdef CONFIG_SUSPEND
+static suspend_state_t suspend_state;
+
static int omap3_pm_prepare(void)
... |
0bf52b981770cbf006323bab5177f2858a196766 | Analyze and fix the following issue in the Linux kernel code: net: Fix spinlock use in alloc_netdev_mq() | Problem Details:
-tip testing found this lockdep warning:
[ 2.272010] calling net_dev_init+0x0/0x164 @ 1
[ 2.276033] device class 'net': registering
[ 2.280191] INFO: trying to register non-static key.
[ 2.284005] the code is fine but needs lockdep annotation.
[ 2.284005] turning off the locking correc... | ```diff
diff --git a/net/core/dev.c b/net/core/dev.c
index 43e61ba7bd95..6a94475aee85 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -4007,9 +4007,7 @@ static void dev_unicast_flush(struct net_device *dev)
static void dev_unicast_init(struct net_device *dev)
{
- netif_addr_lock_bh(dev);
__hw_addr_init(&dev->... |
b37c45b8c27c049dc44673e40fd63820fd9a9d91 | Analyze and fix the following issue in the Linux kernel code: OMAP: GPIO: Fix incorrect gpio_get logic for output GPIOs | Problem Details:
gpio_get() should return DATAIN register value when the GPIO
is configured as input whereas it should return DATAOUT register
value when the GPIO is configured as output.
Now /sys/kernel/debug/gpio shows proper values for output GPIOs
Signed-off-by: Roger Quadros <ext-roger.quadros@nokia.com>
Signed-o... | ```diff
diff --git a/arch/arm/plat-omap/gpio.c b/arch/arm/plat-omap/gpio.c
index 26b387c12423..9c16ca8d293c 100644
--- a/arch/arm/plat-omap/gpio.c
+++ b/arch/arm/plat-omap/gpio.c
@@ -476,14 +476,12 @@ static void _set_gpio_dataout(struct gpio_bank *bank, int gpio, int enable)
__raw_writel(l, reg);
}
-static int __... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.