id stringlengths 40 40 | instruction stringlengths 68 308 | input stringlengths 17 33.4k | output stringlengths 100 30k |
|---|---|---|---|
3649ba001b5d037e2cead173b6cff54d32ef154a | Analyze and fix the following issue in the Linux kernel code: m68k: fix net drivers after recent get_stats updates | Problem Details:
m68k: fix net drivers after recent get_stats updates
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | ```diff
diff --git a/drivers/net/macmace.c b/drivers/net/macmace.c
index 6589239b79ee..18770527df99 100644
--- a/drivers/net/macmace.c
+++ b/drivers/net/macmace.c
@@ -538,8 +538,9 @@ static void mace_set_multicast(struct net_device *dev)
local_irq_restore(flags);
}
-static void mace_handle_misc_intrs(struct mace_d... |
88ae4d8c3829fe3d7be9b1e3ed79a37814752d61 | Analyze and fix the following issue in the Linux kernel code: sc1200: fix ->dma_base equal zero handling | Problem Details:
Set hwif->atapi_dma/{ultra,mwdma}_mask and drive->autodma after checking that
->dma_base exists. If ->dma_base is not set (== PCI BAR4 cannot be reserved)
then DMA hooks shouldn't be initialized or bad things will happen.
OTOH hwif->set_{pio,dma}_mode hooks should be set even if hwif->dma_base == 0.
... | ```diff
diff --git a/drivers/ide/pci/sc1200.c b/drivers/ide/pci/sc1200.c
index 76f0868054a1..ee0e3f554d9a 100644
--- a/drivers/ide/pci/sc1200.c
+++ b/drivers/ide/pci/sc1200.c
@@ -378,16 +378,20 @@ static void __devinit init_hwif_sc1200 (ide_hwif_t *hwif)
if (hwif->mate)
hwif->serialized = hwif->mate->serialized = ... |
dfb2311226539e0496c0a7c65ceebaaff2120a0b | Analyze and fix the following issue in the Linux kernel code: cs5520: fix ->dma_base equal zero handling | Problem Details:
Set hwif->ide_dma_{check,on} and hwif->autodma to 1 after checking that
->dma_base exists. If ->dma_base is not set (== PCI BAR4 cannot be reserved)
then DMA hooks shouldn't be initialized or bad things will happen.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | ```diff
diff --git a/drivers/ide/pci/cs5520.c b/drivers/ide/pci/cs5520.c
index cb2a10203dc4..fbce90048aec 100644
--- a/drivers/ide/pci/cs5520.c
+++ b/drivers/ide/pci/cs5520.c
@@ -142,25 +142,24 @@ static void __devinit init_hwif_cs5520(ide_hwif_t *hwif)
{
hwif->set_pio_mode = &cs5520_set_pio_mode;
hwif->set_dma_mo... |
0f458943e0247906b7a3f534f9e9e7ff3d901296 | Analyze and fix the following issue in the Linux kernel code: au1xxx: fix au1xxx_set_pio_mode() | Problem Details:
Set transfer mode on the device before programming the host controller for
the new timings (matches what auide_tune_chipset() is doing wrt DMA modes).
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | ```diff
diff --git a/drivers/ide/mips/au1xxx-ide.c b/drivers/ide/mips/au1xxx-ide.c
index 85819ae20602..c319f6163127 100644
--- a/drivers/ide/mips/au1xxx-ide.c
+++ b/drivers/ide/mips/au1xxx-ide.c
@@ -103,7 +103,9 @@ static void au1xxx_set_pio_mode(ide_drive_t *drive, const u8 pio)
{
int mem_sttime;
int mem_stcfg;
-... |
75d7d963e3dcf8a1410000ab246921709e276cd9 | Analyze and fix the following issue in the Linux kernel code: icside: use ide_tune_dma() | Problem Details:
* Add "good DMA drives" hack for icside to ide-dma.c::ide_find_dma_mode()
(in the long-term it should be either removed or generalized for all hosts).
* Use ide_tune_dma() in icside.c::icside_dma_check().
This results in the following changes in behavior:
- pre-EIDE SWDMA modes are now also res... | ```diff
diff --git a/drivers/ide/arm/icside.c b/drivers/ide/arm/icside.c
index 7912a471f10d..110e52377c71 100644
--- a/drivers/ide/arm/icside.c
+++ b/drivers/ide/arm/icside.c
@@ -313,41 +313,10 @@ static int icside_dma_on(ide_drive_t *drive)
static int icside_dma_check(ide_drive_t *drive)
{
- struct hd_driveid *id ... |
0b46ff2ea2d817dc7883b80cd4e05ce41cce9158 | Analyze and fix the following issue in the Linux kernel code: ide-pmac: fix PIO setup and enable autotune | Problem Details:
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | ```diff
diff --git a/drivers/ide/ppc/pmac.c b/drivers/ide/ppc/pmac.c
index a1d24cd1293e..313194a0f36e 100644
--- a/drivers/ide/ppc/pmac.c
+++ b/drivers/ide/ppc/pmac.c
@@ -535,7 +535,7 @@ pmac_outbsync(ide_drive_t *drive, u8 value, unsigned long port)
static void
pmac_ide_set_pio_mode(ide_drive_t *drive, const u8 pio)... |
254bb5503611da57240ed6df1cfe6d7f0f185027 | Analyze and fix the following issue in the Linux kernel code: ide-pmac: use ide_tune_dma() (take 2) | Problem Details:
* Add missing initialization of hwif->autodma and drive->autodma to
pmac_ide_setup_dma().
* Use ide_tune_dma() in pmac_ide_dma_check().
While at it:
* Fix pmac_ide_dma_check() return value if DMA mode is not programmed
(should be "-1" otherwise ide_set_dma() will try to enable DMA).
* Remove un... | ```diff
diff --git a/drivers/ide/ppc/pmac.c b/drivers/ide/ppc/pmac.c
index 24f73291c4d5..a1d24cd1293e 100644
--- a/drivers/ide/ppc/pmac.c
+++ b/drivers/ide/ppc/pmac.c
@@ -1593,24 +1593,10 @@ pmac_ide_destroy_dmatable (ide_drive_t *drive)
static int
pmac_ide_dma_check(ide_drive_t *drive)
{
- int enable = 1;
+ if (ide... |
fd553ce86893e0a54ec0d07d1f1d241f2fb2aef3 | Analyze and fix the following issue in the Linux kernel code: ide-pmac: remove pmac_ide_{m,u}dma_enable() (take 2) | Problem Details:
* Fix pmac_ide_dma_check() to use pmac_ide_tune_chipset() and remove no longer
necessary pmac_ide_{m,u}dma_enable().
* While at it remove some dead code from pmac_ide_dma_check() (leftovers from
conversion to use ide_max_dma_mode()).
There should be no functionality changes caused by this patch.
... | ```diff
diff --git a/drivers/ide/ppc/pmac.c b/drivers/ide/ppc/pmac.c
index d6a1a9be58a7..ad58c7ecf858 100644
--- a/drivers/ide/ppc/pmac.c
+++ b/drivers/ide/ppc/pmac.c
@@ -1670,94 +1670,6 @@ pmac_ide_destroy_dmatable (ide_drive_t *drive)
}
}
-/*
- * Pick up best MDMA timing for the drive and apply it
- */
-static i... |
90f72eca36e92d5756cf312535d94d7f21f34d2e | Analyze and fix the following issue in the Linux kernel code: ide-pmac: fix set_timings_mdma() | Problem Details:
* Move adjusting of cycle time for devices providing explicit DMA cycle time
from pmac_ide_mdma_enable() to set_timings_mdma().
* Remove no longer needed drive_cycle_time argument.
* BUG() if unsupported speed argument value is passed (shouldn't happen).
* Matching access/recovery timings always e... | ```diff
diff --git a/drivers/ide/ppc/pmac.c b/drivers/ide/ppc/pmac.c
index cfbe5690ca88..b24e905ddcdd 100644
--- a/drivers/ide/ppc/pmac.c
+++ b/drivers/ide/ppc/pmac.c
@@ -770,12 +770,13 @@ set_timings_udma_shasta(u32 *pio_timings, u32 *ultra_timings, u8 speed)
/*
* Calculate MDMA timings for all cells
*/
-static i... |
085798b12ffebd69c13c8ce05fabc8ed5ac43e63 | Analyze and fix the following issue in the Linux kernel code: ide-pmac: pmac_ide_tune_chipset() fixes | Problem Details:
* Don't check check for pmif == NULL (it should never be NULL if we got here).
* Make a local copy of the timings and set the pmif->timings[] only after
setting the transfer mode on the device (otherwise SELECT_DRIVE() call in
pmac_ide_do_setfeature() will program new timings before the transfer m... | ```diff
diff --git a/drivers/ide/ppc/pmac.c b/drivers/ide/ppc/pmac.c
index b43457e34311..cfbe5690ca88 100644
--- a/drivers/ide/ppc/pmac.c
+++ b/drivers/ide/ppc/pmac.c
@@ -916,14 +916,15 @@ static int pmac_ide_tune_chipset(ide_drive_t *drive, const u8 speed)
int unit = (drive->select.b.unit & 0x01);
int ret = 0;
p... |
90a87ea480ce50e7a1553568395c024294db1808 | Analyze and fix the following issue in the Linux kernel code: ide-pmac: don't check kauai_lookup_timing() return value | Problem Details:
kauai_lookup_timing() should always return non-zero return value:
* BUG() in kauai_lookup_timing() if the timing info cannot be found.
* Remove code checking for zero return value from all callers.
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Sergei Shtylyov <sshtylyov@ru.mv... | ```diff
diff --git a/drivers/ide/ppc/pmac.c b/drivers/ide/ppc/pmac.c
index f759a5397865..b43457e34311 100644
--- a/drivers/ide/ppc/pmac.c
+++ b/drivers/ide/ppc/pmac.c
@@ -392,6 +392,7 @@ kauai_lookup_timing(struct kauai_timing* table, int cycle_time)
for (i=0; table[i].cycle_time; i++)
if (cycle_time > table[i+1].... |
c4a9f88daf6c382fedde4cdddef0b30f1d0a20db | Analyze and fix the following issue in the Linux kernel code: [MTD] [NOR] fix ctrl-alt-del can't reboot for intel flash bug | Problem Details:
When we press ctrl-alt-del,kernel_restart_prepare will invoke
cfi_intelext_reboot which will set flash to read array mode, but later
when device_shutdown is invoked which may put current work queue to
sleep and other process may be scheduled to running and programming
flash in not FL_READY mode aga... | ```diff
diff --git a/drivers/mtd/chips/cfi_cmdset_0001.c b/drivers/mtd/chips/cfi_cmdset_0001.c
index c655e971c158..3aa3dca56ae6 100644
--- a/drivers/mtd/chips/cfi_cmdset_0001.c
+++ b/drivers/mtd/chips/cfi_cmdset_0001.c
@@ -653,7 +653,7 @@ static int get_chip(struct map_info *map, struct flchip *chip, unsigned long adr
... |
f96880d1e859e3937eb691da8293700b8eec17b3 | Analyze and fix the following issue in the Linux kernel code: [MTD] [NAND] Fix compiler warning in Alauda driver | Problem Details:
drivers/mtd/nand/alauda.c: In function 'alauda_bounce_read':
drivers/mtd/nand/alauda.c:412: warning: comparison of distinct pointer types lacks a cast
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David Woodhouse <dwmw2@infradead.org> | ```diff
diff --git a/drivers/mtd/nand/alauda.c b/drivers/mtd/nand/alauda.c
index 2c29854b4241..257937cd99bf 100644
--- a/drivers/mtd/nand/alauda.c
+++ b/drivers/mtd/nand/alauda.c
@@ -408,7 +408,7 @@ static int alauda_bounce_read(struct mtd_info *mtd, loff_t from, size_t len,
*retlen = len;
while (len) {
u8 oob[1... |
a8c68f32644fc8942b25af9239967dd01be621fa | Analyze and fix the following issue in the Linux kernel code: [JFFS2] Don't count all 'very dirty' blocks except in debug mode | Problem Details:
... where we'll actually print the count in a debug message.
Signed-off-by: David Woodhouse <dwmw2@infradead.org> | ```diff
diff --git a/fs/jffs2/nodemgmt.c b/fs/jffs2/nodemgmt.c
index 1b79534e9d48..a0313fa8748e 100644
--- a/fs/jffs2/nodemgmt.c
+++ b/fs/jffs2/nodemgmt.c
@@ -749,7 +749,9 @@ int jffs2_thread_should_wake(struct jffs2_sb_info *c)
nr_very_dirty++;
if (nr_very_dirty == c->vdirty_blocks_gctrigger) {
ret = 1;
- ... |
1437085c3780f064a06df662195a2695e7d75c09 | Analyze and fix the following issue in the Linux kernel code: [MTD] [OneNAND] Fix typo related with recent commit | Problem Details:
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org> | ```diff
diff --git a/drivers/mtd/onenand/onenand_base.c b/drivers/mtd/onenand/onenand_base.c
index 85a97198bee3..b2c40f67db83 100644
--- a/drivers/mtd/onenand/onenand_base.c
+++ b/drivers/mtd/onenand/onenand_base.c
@@ -2065,7 +2065,7 @@ static int do_otp_write(struct mtd_info *mtd, loff_t to, size_t len,
ops.len = ... |
0967b7bf1c22b55777aba46ff616547feed0b141 | Analyze and fix the following issue in the Linux kernel code: KVM: Skip pio instruction when it is emulated, not executed | Problem Details:
If we defer updating rip until pio instructions are executed, we have a
problem with reset: a pio reset updates rip, and when the instruction
completes we skip the emulated instruction, pointing rip somewhere completely
unrelated.
Fix by updating rip when we see decode the instruction, not after emul... | ```diff
diff --git a/drivers/kvm/kvm_main.c b/drivers/kvm/kvm_main.c
index 3b046507ebc6..353e58527d15 100644
--- a/drivers/kvm/kvm_main.c
+++ b/drivers/kvm/kvm_main.c
@@ -1815,8 +1815,6 @@ static int complete_pio(struct kvm_vcpu *vcpu)
io->count -= io->cur_count;
io->cur_count = 0;
- if (!io->count)
- kvm_x86_op... |
12fa272e315af43d549ce22f9988392d0121350e | Analyze and fix the following issue in the Linux kernel code: KVM: x86 emulator: fix src, dst value initialization | Problem Details:
Some operand fetches are less than the machine word size and can result in
stale bits if used together with operands of different sizes.
Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
Signed-off-by: Avi Kivity <avi@qumranet.com> | ```diff
diff --git a/drivers/kvm/x86_emulate.c b/drivers/kvm/x86_emulate.c
index cf8db670df7f..7360a71094f5 100644
--- a/drivers/kvm/x86_emulate.c
+++ b/drivers/kvm/x86_emulate.c
@@ -827,6 +827,7 @@ done_prefixes:
srcmem_common:
src.type = OP_MEM;
src.ptr = (unsigned long *)cr2;
+ src.val = 0;
if ((rc... |
bfdaab090386e7dda8c442721eeb91179258dad4 | Analyze and fix the following issue in the Linux kernel code: KVM: VMX: Fix exit qualification width on i386 | Problem Details:
According to Intel Software Developer's Manual, Vol. 3B, Appendix H.4.2,
exit qualification should be of natural width. However, current code
uses u64 as the data type for this register, which occasionally
introduces invalid value to VMExit handling logics. This patch fixes
this bug.
I have tested Win... | ```diff
diff --git a/drivers/kvm/vmx.c b/drivers/kvm/vmx.c
index fa4277d520ca..c44c9ac79ca5 100644
--- a/drivers/kvm/vmx.c
+++ b/drivers/kvm/vmx.c
@@ -1840,12 +1840,12 @@ static int handle_triple_fault(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run)
static int handle_io(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run... |
b85b9ee9259917f248ee1507d7d1f575f4fc27dd | Analyze and fix the following issue in the Linux kernel code: KVM: Clean up unloved invlpg emulation | Problem Details:
invlpg shouldn't fetch the "src" address, since it may not be valid,
however SVM's "solution" which neuters emulation of all group 7
instruction is horrible and breaks kvm-lite. The simplest fix is to
put a special check in for invlpg.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-b... | ```diff
diff --git a/drivers/kvm/kvm.h b/drivers/kvm/kvm.h
index 7c353524af2b..9bf9ac6389b1 100644
--- a/drivers/kvm/kvm.h
+++ b/drivers/kvm/kvm.h
@@ -539,8 +539,6 @@ static inline int is_error_hpa(hpa_t hpa) { return hpa >> HPA_MSB; }
hpa_t gva_to_hpa(struct kvm_vcpu *vcpu, gva_t gva);
struct page *gva_to_page(struc... |
380102c8e431ba8b25a5b3a29e4529ca02ede4c8 | Analyze and fix the following issue in the Linux kernel code: KVM: Set the ET flag in CR0 after initializing FX | Problem Details:
This was missed when moving stuff around in fbc4f2e
Fixes Solaris guests and bug #1773613
Signed-off-by: Amit Shah <amit.shah@qumranet.com>
Signed-off-by: Avi Kivity <avi@qumranet.com> | ```diff
diff --git a/drivers/kvm/kvm_main.c b/drivers/kvm/kvm_main.c
index d0a5a2b3d599..d3e534dcf585 100644
--- a/drivers/kvm/kvm_main.c
+++ b/drivers/kvm/kvm_main.c
@@ -655,6 +655,7 @@ void fx_init(struct kvm_vcpu *vcpu)
fx_restore(&vcpu->host_fx_image);
preempt_enable();
+ vcpu->cr0 |= X86_CR0_ET;
after_mxcs... |
40487c680d5855459dfdce340df13d40071bb774 | Analyze and fix the following issue in the Linux kernel code: KVM: deliver PIC interrupt only to vcpu0 | Problem Details:
This patch changes the PIC interrupts delivery. Now it is only delivered
to vcpu0 when either condition is met (on vcpu0):
1. local APIC is hardware disabled
2. LVT0 is unmasked and configured to delivery mode ExtInt
It fixes the 2x faster wall clock on x86_64 and SMP i386 Linux guests
Signed-off... | ```diff
diff --git a/drivers/kvm/irq.c b/drivers/kvm/irq.c
index b88e50115588..7628c7ff628f 100644
--- a/drivers/kvm/irq.c
+++ b/drivers/kvm/irq.c
@@ -33,8 +33,11 @@ int kvm_cpu_has_interrupt(struct kvm_vcpu *v)
struct kvm_pic *s;
if (kvm_apic_has_interrupt(v) == -1) { /* LAPIC */
- s = pic_irqchip(v->kvm); /* P... |
a3d7f85f471f889e4477863a7ca42828ae74e77d | Analyze and fix the following issue in the Linux kernel code: KVM: Migrate lapic hrtimer when vcpu moves to another cpu | Problem Details:
This reduces overhead by accessing cachelines from the wrong node, as well
as simplifying locking.
[Qing: fix for inactive or expired one-shot timer]
Signed-off-by: Yaozu (Eddie) Dong <Eddie.Dong@intel.com>
Signed-off-by: Qing He <qing.he@intel.com>
Signed-off-by: Avi Kivity <avi@qumranet.com> | ```diff
diff --git a/drivers/kvm/irq.h b/drivers/kvm/irq.h
index 87baf7e69ea2..f324cfb40084 100644
--- a/drivers/kvm/irq.h
+++ b/drivers/kvm/irq.h
@@ -158,5 +158,6 @@ void kvm_apic_timer_intr_post(struct kvm_vcpu *vcpu, int vec);
void kvm_timer_intr_post(struct kvm_vcpu *vcpu, int vec);
void kvm_inject_pending_timer_... |
2a8067f17b8442ecce0b14e134823020ff33b4fa | Analyze and fix the following issue in the Linux kernel code: KVM: pending irq save/restore | Problem Details:
Add in kernel irqchip save/restore support for pending vectors.
[avi: fix compile warning on i386]
[avi: remove printk]
Signed-off-by: Yaozu (Eddie) Dong <eddie.dong@intel.com>
Signed-off-by: Qing He <qing.he@intel.com>
Signed-off-by: Avi Kivity <avi@qumranet.com> | ```diff
diff --git a/drivers/kvm/kvm.h b/drivers/kvm/kvm.h
index bb506b71797d..f8fe87d3ddbd 100644
--- a/drivers/kvm/kvm.h
+++ b/drivers/kvm/kvm.h
@@ -490,6 +490,8 @@ struct kvm_arch_ops {
void (*skip_emulated_instruction)(struct kvm_vcpu *vcpu);
void (*patch_hypercall)(struct kvm_vcpu *vcpu,
unsigned char *hy... |
1fd4f2a5ed8f80cf6e23d2bdf78554f6a1ac7997 | Analyze and fix the following issue in the Linux kernel code: KVM: In-kernel I/O APIC model | Problem Details:
This allows in-kernel host-side device drivers to raise guest interrupts
without going to userspace.
[avi: fix level-triggered interrupt redelivery on eoi]
[avi: add missing #include]
[avi: avoid redelivery of edge-triggered interrupt]
[avi: implement polarity]
[avi: don't deliver edge-triggered inter... | ```diff
diff --git a/drivers/kvm/Makefile b/drivers/kvm/Makefile
index 3bf7276b032d..e5a8f4d3e973 100644
--- a/drivers/kvm/Makefile
+++ b/drivers/kvm/Makefile
@@ -2,7 +2,7 @@
# Makefile for Kernel-based Virtual Machine module
#
-kvm-objs := kvm_main.o mmu.o x86_emulate.o i8259.o irq.o lapic.o
+kvm-objs := kvm_main.... |
d39dba54ce71ab3234c387219b175dc36d37f85a | Analyze and fix the following issue in the Linux kernel code: KVM: X86 emulator: fix 'push reg' writeback | Problem Details:
Pointed out by Rusty Russell.
Signed-off-by: Avi Kivity <avi@qumranet.com> | ```diff
diff --git a/drivers/kvm/x86_emulate.c b/drivers/kvm/x86_emulate.c
index cf895aab51d6..7439b3422ecf 100644
--- a/drivers/kvm/x86_emulate.c
+++ b/drivers/kvm/x86_emulate.c
@@ -1163,7 +1163,6 @@ special_insn:
register_address_increment(_regs[VCPU_REGS_RSP], -op_bytes);
dst.ptr = (void *) register_address(
... |
e70669abd4e60dfea3ac1639848e20e2b8dd1255 | Analyze and fix the following issue in the Linux kernel code: KVM: Cleanup string I/O instruction emulation | Problem Details:
Both vmx and svm decode the I/O instructions, and both botch the job,
requiring the instruction prefixes to be fetched in order to completely
decode the instruction.
So, if we see a string I/O instruction, use the x86 emulator to decode it,
as it already has all the prefix decoding machinery.
This pa... | ```diff
diff --git a/drivers/kvm/kvm_main.c b/drivers/kvm/kvm_main.c
index 62adaeedfdb0..661d065fd866 100644
--- a/drivers/kvm/kvm_main.c
+++ b/drivers/kvm/kvm_main.c
@@ -1221,7 +1221,10 @@ int emulate_instruction(struct kvm_vcpu *vcpu,
emulate_ctxt.fs_base = get_segment_base(vcpu, VCPU_SREG_FS);
vcpu->mmio_is_wr... |
3dea7ca7160f80dd6d31c0bbeb2d871e51b567b6 | Analyze and fix the following issue in the Linux kernel code: KVM: Remove stat_set from debugfs | Problem Details:
We shouldn't define stat_set on the debug attributes, since that will
cause silent failure on writing: without a set argument, userspace
will get -EACCESS.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Avi Kivity <avi@qumranet.com> | ```diff
diff --git a/drivers/kvm/kvm_main.c b/drivers/kvm/kvm_main.c
index 55639aceca63..25d76a5a9999 100644
--- a/drivers/kvm/kvm_main.c
+++ b/drivers/kvm/kvm_main.c
@@ -3017,11 +3017,7 @@ static u64 stat_get(void *_offset)
return total;
}
-static void stat_set(void *offset, u64 val)
-{
-}
-
-DEFINE_SIMPLE_ATTRIB... |
54e11fa1f87771df0fc1bb42a75be0740c3babb9 | Analyze and fix the following issue in the Linux kernel code: KVM: Fix defined but not used warning in drivers/kvm/vmx.c | Problem Details:
move_msr_up() is used only on X86_64 and generates a warning on !X86_64
Signed-off-by: Gabriel Craciunescu <nix.or.die@googlemail.com>
Signed-off-by: Avi Kivity <avi@qumranet.com> | ```diff
diff --git a/drivers/kvm/vmx.c b/drivers/kvm/vmx.c
index a94eb205cecd..3bf36508c84b 100644
--- a/drivers/kvm/vmx.c
+++ b/drivers/kvm/vmx.c
@@ -544,6 +544,7 @@ static void vmx_inject_gp(struct kvm_vcpu *vcpu, unsigned error_code)
/*
* Swap MSR entry in host/guest MSR entry array.
*/
+#ifdef CONFIG_X86_64
s... |
bfc733a7a32612fe213a7492c385f2b03f592d7f | Analyze and fix the following issue in the Linux kernel code: KVM: SVM: Make set_msr_interception more reliable | Problem Details:
set_msr_interception() is used by svm to set up which MSRs should be
intercepted. It can only fail if someone has changed the code to try
to intercept an MSR without updating the array of ranges.
The return value is ignored anyway: it should just BUG() if it doesn't
work. (A build-time failure would... | ```diff
diff --git a/drivers/kvm/svm.c b/drivers/kvm/svm.c
index 827bc2774e73..7beaff1789b1 100644
--- a/drivers/kvm/svm.c
+++ b/drivers/kvm/svm.c
@@ -359,8 +359,8 @@ err_1:
}
-static int set_msr_interception(u32 *msrpm, unsigned msr,
- int read, int write)
+static void set_msr_interception(u32 *msrpm, unsigned... |
15ad71460d75fd7ca41bb248a2310f3f39b302ba | Analyze and fix the following issue in the Linux kernel code: KVM: Use the scheduler preemption notifiers to make kvm preemptible | Problem Details:
Current kvm disables preemption while the new virtualization registers are
in use. This of course is not very good for latency sensitive workloads (one
use of virtualization is to offload user interface and other latency
insensitive stuff to a container, so that it is easier to analyze the
remaining w... | ```diff
diff --git a/drivers/kvm/Kconfig b/drivers/kvm/Kconfig
index 0a419a0de603..8749fa4ffcee 100644
--- a/drivers/kvm/Kconfig
+++ b/drivers/kvm/Kconfig
@@ -17,6 +17,7 @@ if VIRTUALIZATION
config KVM
tristate "Kernel-based Virtual Machine (KVM) support"
depends on X86 && EXPERIMENTAL
+ select PREEMPT_NOTIFIERS
... |
1c3d14fe0ab75337a3f6c06b6bc18bcbc2b3d0bc | Analyze and fix the following issue in the Linux kernel code: KVM: VMX: Improve the method of writing vmcs control | Problem Details:
Put cpu feature detecting part in hardware_setup, and stored the vmcs
condition in global variable for further check.
[glommer: fix for some i386-only machines not supporting CR8 load/store
exiting]
Signed-off-by: Sheng Yang <sheng.yang@intel.com>
Signed-off-by: Glauber de Oliveira Costa <gcosta@red... | ```diff
diff --git a/drivers/kvm/vmx.c b/drivers/kvm/vmx.c
index df5787823309..18f9b0b3fb1f 100644
--- a/drivers/kvm/vmx.c
+++ b/drivers/kvm/vmx.c
@@ -71,18 +71,17 @@ static DEFINE_PER_CPU(struct vmcs *, current_vmcs);
static struct page *vmx_io_bitmap_a;
static struct page *vmx_io_bitmap_b;
-#ifdef CONFIG_X86_64
-... |
3ccb8827fb3bd389ed15320da83543d016a94822 | Analyze and fix the following issue in the Linux kernel code: KVM: Remove dead code in the cmpxchg instruction emulation | Problem Details:
The writeback fixes (02c03a326a5df825cc01de426f72e160db2b9538) let
some dead code in the cmpxchg instruction emulation. Remove it.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Avi Kivity <avi@qumranet.com> | ```diff
diff --git a/drivers/kvm/x86_emulate.c b/drivers/kvm/x86_emulate.c
index ef7518a2d7ac..2136da5d6976 100644
--- a/drivers/kvm/x86_emulate.c
+++ b/drivers/kvm/x86_emulate.c
@@ -1278,8 +1278,6 @@ twobyte_insn:
src.orig_val = src.val;
src.val = _regs[VCPU_REGS_RAX];
emulate_2op_SrcV("cmp", src, dst, _eflag... |
394b6e5944865a558fe25f0c5903b34c434038ee | Analyze and fix the following issue in the Linux kernel code: KVM: x86 emulator: fix faulty check for two-byte opcode | Problem Details:
Right now, the bug is harmless as we never emulate one-byte 0xb6 or 0xb7.
But things may change.
Noted by the mysterious Gabriel C.
Signed-off-by: Avi Kivity <avi@qumranet.com> | ```diff
diff --git a/drivers/kvm/x86_emulate.c b/drivers/kvm/x86_emulate.c
index 82b4ea62c982..ef7518a2d7ac 100644
--- a/drivers/kvm/x86_emulate.c
+++ b/drivers/kvm/x86_emulate.c
@@ -819,7 +819,7 @@ done_prefixes:
case DstReg:
dst.type = OP_REG;
if ((d & ByteOp)
- && !(twobyte_table && (b == 0xb6 || b == 0... |
e3243452f4f35ed5f79d575100521bf257504b81 | Analyze and fix the following issue in the Linux kernel code: KVM: x86 emulator: fix cmov for writeback changes | Problem Details:
The writeback fixes (02c03a326a5df825cc01de426f72e160db2b9538) broke
cmov emulation. Fix.
Signed-off-by: Avi Kivity <avi@qumranet.com> | ```diff
diff --git a/drivers/kvm/x86_emulate.c b/drivers/kvm/x86_emulate.c
index db9f9553487d..82b4ea62c982 100644
--- a/drivers/kvm/x86_emulate.c
+++ b/drivers/kvm/x86_emulate.c
@@ -1235,40 +1235,40 @@ twobyte_insn:
break;
case 0x40 ... 0x4f: /* cmov */
dst.val = dst.orig_val = src.val;
- d &= ~Mov; /* defaul... |
7075bc816cfad142da92207ed5a6f3da55b143ef | Analyze and fix the following issue in the Linux kernel code: KVM: Use standard CR8 flags, and fix TPR definition | Problem Details:
Intel manual (and KVM definition) say the TPR is 4 bits wide. Also fix
CR8_RESEVED_BITS typo.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Acked-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Avi Kivity <avi@qumranet.com> | ```diff
diff --git a/drivers/kvm/kvm_main.c b/drivers/kvm/kvm_main.c
index 193197fb399e..f0fc8d9e71e6 100644
--- a/drivers/kvm/kvm_main.c
+++ b/drivers/kvm/kvm_main.c
@@ -92,7 +92,7 @@ static struct dentry *debugfs_dir;
| X86_CR4_PGE | X86_CR4_PCE | X86_CR4_OSFXSR \
| X86_CR4_OSXMMEXCPT | X86_CR4_VMXE))
-... |
66aee91aaab8f998d28a61ed7733be17ad8e6d8f | Analyze and fix the following issue in the Linux kernel code: KVM: Use standard CR4 flags, tighten checking | Problem Details:
On this machine (Intel), writing to the CR4 bits 0x00000800 and
0x00001000 cause a GPF. The Intel manual is a little unclear, but
AFIACT they're reserved, too.
Also fix spelling of CR4_RESEVED_BITS.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Avi Kivity <avi@qumranet.com> | ```diff
diff --git a/drivers/kvm/kvm.h b/drivers/kvm/kvm.h
index 983c33f38377..25439a5968f9 100644
--- a/drivers/kvm/kvm.h
+++ b/drivers/kvm/kvm.h
@@ -23,12 +23,6 @@
#define CR3_NONPAE_RESERVED_BITS ((PAGE_SIZE-1) & ~(X86_CR3_PWT | X86_CR3_PCD))
#define CR3_L_MODE_RESERVED_BITS (CR3_NONPAE_RESERVED_BITS|0xFFFFFF00000... |
f802a307cb2cabdd0c6b48067dbe901d6fe27246 | Analyze and fix the following issue in the Linux kernel code: KVM: Use standard CR3 flags, tighten checking | Problem Details:
The kernel now has asm/cpu-features.h: use those macros instead of inventing
our own.
Also spell out definition of CR3_RESEVED_BITS, fix spelling and
tighten it for the non-PAE case.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Avi Kivity <avi@qumranet.com> | ```diff
diff --git a/drivers/kvm/kvm.h b/drivers/kvm/kvm.h
index 7117c3b3cca7..983c33f38377 100644
--- a/drivers/kvm/kvm.h
+++ b/drivers/kvm/kvm.h
@@ -19,12 +19,9 @@
#include <linux/kvm.h>
#include <linux/kvm_para.h>
-#define CR3_WPT_MASK (1ULL << 3)
-#define CR3_PCD_MASK (1ULL << 4)
-
-#define CR3_RESEVED_BITS 0x0... |
707d92fa72b425bc919a84670c01402e81505c58 | Analyze and fix the following issue in the Linux kernel code: KVM: Trivial: Use standard CR0 flags macros from asm/cpu-features.h | Problem Details:
The kernel now has asm/cpu-features.h: use those macros instead of
inventing our own.
Also spell out definition of CR0_RESEVED_BITS (no code change) and fix typo.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Avi Kivity <avi@qumranet.com> | ```diff
diff --git a/drivers/kvm/kvm.h b/drivers/kvm/kvm.h
index b629a83eb82d..7117c3b3cca7 100644
--- a/drivers/kvm/kvm.h
+++ b/drivers/kvm/kvm.h
@@ -19,15 +19,6 @@
#include <linux/kvm.h>
#include <linux/kvm_para.h>
-#define CR0_PE_MASK (1ULL << 0)
-#define CR0_MP_MASK (1ULL << 1)
-#define CR0_TS_MASK (1ULL << 3)
... |
1e3c5cb0d5a63b7169708614bfba0c7f25aa493e | Analyze and fix the following issue in the Linux kernel code: KVM: Trivial: Make decode_register() static | Problem Details:
I have shied away from touching x86_emulate.c (it could definitely use
some love, but it is forked from the Xen code, and it would be more
productive to cross-merge fixes).
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Avi Kivity <avi@qumranet.com> | ```diff
diff --git a/drivers/kvm/x86_emulate.c b/drivers/kvm/x86_emulate.c
index 4b8a0cc9665e..f5e4644e2437 100644
--- a/drivers/kvm/x86_emulate.c
+++ b/drivers/kvm/x86_emulate.c
@@ -443,8 +443,13 @@ struct operand {
(((reg) + _inc) & ((1UL << (ad_bytes << 3)) - 1)); \
} while (0)
-void *decode_register(u8 m... |
cd0d91379776cb6850c7b11c0a8843ca75967558 | Analyze and fix the following issue in the Linux kernel code: KVM: Fix *nopage() in kvm_main.c | Problem Details:
*nopage() in kvm_main.c should only store the type of mmap() fault if
the pointers are not NULL. This patch fixes the problem.
Signed-off-by: Nguyen Anh Quynh <aquynh@gmail.com>
Signed-off-by: Avi Kivity <avi@qumranet.com> | ```diff
diff --git a/drivers/kvm/kvm_main.c b/drivers/kvm/kvm_main.c
index cd0557954e50..36a458f13ec4 100644
--- a/drivers/kvm/kvm_main.c
+++ b/drivers/kvm/kvm_main.c
@@ -2285,7 +2285,6 @@ static struct page *kvm_vcpu_nopage(struct vm_area_struct *vma,
unsigned long pgoff;
struct page *page;
- *type = VM_FAULT_MI... |
937ad5c1e35191d29d305280525394fe87f4ac4f | Analyze and fix the following issue in the Linux kernel code: Input: appletouch - another fix for idle reset logic | Problem Details:
Make sure we reset idlecount when we get a good (non-empty) packet.
Signed-off-by: Soeren Sonnenburg <kernel@nn7.de>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru> | ```diff
diff --git a/drivers/input/mouse/appletouch.c b/drivers/input/mouse/appletouch.c
index a1804bfdbb8c..0117817bf538 100644
--- a/drivers/input/mouse/appletouch.c
+++ b/drivers/input/mouse/appletouch.c
@@ -502,18 +502,23 @@ static void atp_complete(struct urb* urb)
/* reset the accumulator on release */
me... |
752097cec53eea111d087c545179b421e2bde98a | Analyze and fix the following issue in the Linux kernel code: x86/pci/acpi: fix DMI const-ification fallout | Problem Details:
Fix DMI const-ification fallout that appeared when merging subsystem
trees.
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | ```diff
diff --git a/arch/x86/pci/acpi.c b/arch/x86/pci/acpi.c
index 27a391da9a98..2d88f7c6d6ac 100644
--- a/arch/x86/pci/acpi.c
+++ b/arch/x86/pci/acpi.c
@@ -6,7 +6,7 @@
#include <asm/numa.h>
#include "pci.h"
-static int __devinit can_skip_ioresource_align(struct dmi_system_id *d)
+static int __devinit can_skip_io... |
4071c718555d955a35e9651f77086096ad87d498 | Analyze and fix the following issue in the Linux kernel code: x86: fix IO write barrier | Problem Details:
wmb() on x86 must always include a barrier, because stores can go out of
order in many cases when dealing with devices (eg. WC memory).
Signed-off-by: Nick Piggin <npiggin@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | ```diff
diff --git a/include/asm-x86/system_32.h b/include/asm-x86/system_32.h
index d69ba937e092..8b15bd3057c9 100644
--- a/include/asm-x86/system_32.h
+++ b/include/asm-x86/system_32.h
@@ -216,6 +216,7 @@ static inline unsigned long get_limit(unsigned long segment)
#define mb() alternative("lock; addl $0,0(%%esp)"... |
aefca8ba5f1b95431e33a52736bab128fc4f80d4 | Analyze and fix the following issue in the Linux kernel code: HWMON: hdaps - switch to using input-polldev | Problem Details:
Switch to using input-polldev skeleton instead of implementing polling loop
by itself. This also fixes problem with trylock on a mutex in atomic
context.
Signed-off-by: Dmitry Torokhov <dtor@mail.ru> | ```diff
diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig
index e8f44b580f0a..dd9dc47ee84e 100644
--- a/drivers/hwmon/Kconfig
+++ b/drivers/hwmon/Kconfig
@@ -645,6 +645,7 @@ config SENSORS_W83627EHF
config SENSORS_HDAPS
tristate "IBM Hard Drive Active Protection System (hdaps)"
depends on INPUT && X86
+ s... |
ece8a9e4f011b038396c7649a8407ca9171be4a9 | Analyze and fix the following issue in the Linux kernel code: [MIPS] SMP: Fix use of cpumasks. | Problem Details:
Noticed by Nick Piggin <nickpiggin@yahoo.com.au>.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org> | ```diff
diff --git a/arch/mips/kernel/smp.c b/arch/mips/kernel/smp.c
index 432f2e376aea..63989e9df4f9 100644
--- a/arch/mips/kernel/smp.c
+++ b/arch/mips/kernel/smp.c
@@ -379,7 +379,7 @@ void flush_tlb_mm(struct mm_struct *mm)
unsigned int cpu;
cpu_clear(smp_processor_id(), mask);
- for_each_online_cpu(cpu)
+ ... |
1e621a8e3752367d4aae78a8ab00a18fb2793f34 | Analyze and fix the following issue in the Linux kernel code: [ARM] 4600/1: fix kernel build failure with build-id-supporting binutils | Problem Details:
Newer versions of binutils support --build-id, which adds an ELF
note section called ".note.gnu.build-id" to the output. On the ARM
kernel build, because there is no explicit mention of this section
in the shipped ld script, this section is placed at vaddr 0x00000000
(whereas the normal kernel text/da... | ```diff
diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index fa4ea9ff0797..6c2d539cd22b 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -12,7 +12,7 @@
LDFLAGS_vmlinux :=-p --no-undefined -X
CPPFLAGS_vmlinux.lds = -DTEXT_OFFSET=$(TEXT_OFFSET)
-OBJCOPYFLAGS :=-O binary -R .note -R .comment -S
+OBJCOPYFL... |
f3fb5a556c99118186581e6546a9c41e1f73cf6f | Analyze and fix the following issue in the Linux kernel code: [ARM] 4596/1: S3C2412: Correct IRQs for SDI+CF and add decoding support | Problem Details:
Fix the IRQ numbers of the CF and SDI interface on the S3C2412
and S3C2413. Add support to handle these IRQs properly and
ensure that the SDI controller platform device is correctly
renumbered.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> | ```diff
diff --git a/arch/arm/mach-s3c2412/irq.c b/arch/arm/mach-s3c2412/irq.c
index f0d66828f965..e9d0c769f5da 100644
--- a/arch/arm/mach-s3c2412/irq.c
+++ b/arch/arm/mach-s3c2412/irq.c
@@ -38,6 +38,9 @@
#include <asm/plat-s3c24xx/irq.h>
#include <asm/plat-s3c24xx/pm.h>
+#define INTMSK(start, end) ((1 << ((end) + ... |
c1f438f5eec867707022e5f33bec5e91ec12f6e7 | Analyze and fix the following issue in the Linux kernel code: [ARM] 4581/1: Fix the conditional execution of the NWFPE instructions | Problem Details:
Starting with ARMv7-A, conditional execution of undefined instructions
can trigger an exception even if the condition check fails. This patch
modifies the NWFPE support to check the condition before emulating the
instruction.
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Russ... | ```diff
diff --git a/arch/arm/nwfpe/entry.S b/arch/arm/nwfpe/entry.S
index 1dc13bc6d810..48bca0db4607 100644
--- a/arch/arm/nwfpe/entry.S
+++ b/arch/arm/nwfpe/entry.S
@@ -70,13 +70,24 @@ floating point instructions. GCC attempts to group floating point
instructions to allow the emulator to spread the cost of the trap... |
ec6b1482265ec8430fc38c79205567c3601d8901 | Analyze and fix the following issue in the Linux kernel code: [ARM] unbalanced parenthesis fix | Problem Details:
Fix unbalanced parenthesis.
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> | ```diff
diff --git a/include/asm-arm/arch-sa1100/SA-1101.h b/include/asm-arm/arch-sa1100/SA-1101.h
index 527d887f1ee3..65ca8c79e6d2 100644
--- a/include/asm-arm/arch-sa1100/SA-1101.h
+++ b/include/asm-arm/arch-sa1100/SA-1101.h
@@ -106,7 +106,7 @@
#define SMCR_ColAdrBits( x ) /* col. addr bits 8..11 */ \
(( (x) - ... |
5e802dfab7bbbee1e63607a3e6d1ceb78ec4ceeb | Analyze and fix the following issue in the Linux kernel code: [ARM] 4539/1: clocksource and clockevents for at91rm9200 | Problem Details:
GENERIC_TIME and GENERIC_CLOCKEVENTS support for the at91rm9200.
- Oneshot mode (used for NO_HZ and high res timers) uses the
alarm to emulate a real oneshot timer; the trickiest bit is
how to avoid some lowlevel races. Thanks to Remy Bohmer for
various fixes to this code.
- Tighten up pe... | ```diff
diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig
index fd956f1299d1..05a9f8a1b45e 100644
--- a/arch/arm/mach-at91/Kconfig
+++ b/arch/arm/mach-at91/Kconfig
@@ -7,6 +7,8 @@ choice
config ARCH_AT91RM9200
bool "AT91RM9200"
+ select GENERIC_TIME
+ select GENERIC_CLOCKEVENTS
config ARCH_AT... |
f2c10d6c669e5b792c48e86da37ec7fde0a2e302 | Analyze and fix the following issue in the Linux kernel code: [ARM] 4566/1: s3c24xx: fix dma functions section mismatch | Problem Details:
This patch removes section mismatches related to DMA functions.
Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Acked-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> | ```diff
diff --git a/arch/arm/mach-s3c2410/dma.c b/arch/arm/mach-s3c2410/dma.c
index 80d83739ab9f..8f12e855ef5f 100644
--- a/arch/arm/mach-s3c2410/dma.c
+++ b/arch/arm/mach-s3c2410/dma.c
@@ -145,7 +145,7 @@ static struct s3c24xx_dma_order __initdata s3c2410_dma_order = {
},
};
-static int s3c2410_dma_add(struct sy... |
008d931c45cd39f7b8a8b99926b557b183074858 | Analyze and fix the following issue in the Linux kernel code: [ARM] 4565/1: s3c2443: fix section mismatch in irq.c file | Problem Details:
This patch removes section mismatches related to irq functions.
Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Acked-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> | ```diff
diff --git a/arch/arm/mach-s3c2443/irq.c b/arch/arm/mach-s3c2443/irq.c
index 6cd4818f3f0d..f9ad498a6fc0 100644
--- a/arch/arm/mach-s3c2443/irq.c
+++ b/arch/arm/mach-s3c2443/irq.c
@@ -252,7 +252,7 @@ static int __init s3c2443_add_sub(unsigned int base,
return 0;
}
-static int s3c2443_irq_add(struct sys_devi... |
2010d7fe787b39afd31daba5d5284dd432de4e8f | Analyze and fix the following issue in the Linux kernel code: [IA64] Fix kernel hangup in kdump on INIT | Problem Details:
Fix the problem that kdump on INIT hung up if kdump kernel image is
not configured.
The kdump_init_notifier() on monarch CPU stops its operation at
DIE_INIT_MONARCH_LEAVE time if the kdump kernel image is not
configured. On the other hand, kdump_init_notifier() on non-monarch
CPUs get into spin becaus... | ```diff
diff --git a/arch/ia64/kernel/crash.c b/arch/ia64/kernel/crash.c
index b2367dd66766..f1cf2df97a2d 100644
--- a/arch/ia64/kernel/crash.c
+++ b/arch/ia64/kernel/crash.c
@@ -118,11 +118,6 @@ machine_crash_shutdown(struct pt_regs *pt)
static void
machine_kdump_on_init(void)
{
- if (!ia64_kimage) {
- ia64_mca_pr... |
ac542a513bd7905fa1a700881e0a40a94d3ed46a | Analyze and fix the following issue in the Linux kernel code: [IA64] Fix kernel panic in kdump on INIT | Problem Details:
Fix the problem that kdump on INIT causes a kernel panic if kdump
kernel image is not configured. The cause of this problem is
machine_kexec_on_init() is using printk in INIT context. It should
use ia64_mca_printk() instead.
Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by... | ```diff
diff --git a/arch/ia64/kernel/crash.c b/arch/ia64/kernel/crash.c
index 1d64ef478dde..b2367dd66766 100644
--- a/arch/ia64/kernel/crash.c
+++ b/arch/ia64/kernel/crash.c
@@ -119,7 +119,7 @@ static void
machine_kdump_on_init(void)
{
if (!ia64_kimage) {
- printk(KERN_NOTICE "machine_kdump_on_init(): "
+ ia64_m... |
e1b1eb011e15190eb859bad0bcae67679bda7d50 | Analyze and fix the following issue in the Linux kernel code: [IA64] Fix race when multiple cpus go through MCA | Problem Details:
Additional testing uncovered a situation where the MCA recovery code could
hang due to a race condition.
According to the SAL spec, SAL sends a rendezvous interrupt to all but the first
CPU that goes into MCA. This includes other CPUs that go into MCA at the same
time. Those other CPUs will go into ... | ```diff
diff --git a/arch/ia64/kernel/mca.c b/arch/ia64/kernel/mca.c
index 92367faecbbf..cc87025e8f54 100644
--- a/arch/ia64/kernel/mca.c
+++ b/arch/ia64/kernel/mca.c
@@ -701,8 +701,7 @@ ia64_mca_cmc_vector_enable_keventd(struct work_struct *unused)
/*
* ia64_mca_wakeup
*
- * Send an inter-cpu interrupt to wake-up... |
2bc5c282999af41042c2b703bf3a58ca1d7e3ee2 | Analyze and fix the following issue in the Linux kernel code: [IA64] Remove needless delay in MCA rendezvous | Problem Details:
While testing the MCA recovery code, noticed that some machines would have a
five second delay rendezvousing cpus. What was happening is that
ia64_wait_for_slaves() would check to see if all the slave CPUs had
rendezvoused. If any had not, it would wait 1 millisecond then check again.
If any CPUs had... | ```diff
diff --git a/arch/ia64/kernel/mca.c b/arch/ia64/kernel/mca.c
index 63b73f3d4c9f..92367faecbbf 100644
--- a/arch/ia64/kernel/mca.c
+++ b/arch/ia64/kernel/mca.c
@@ -1135,30 +1135,27 @@ no_mod:
static void
ia64_wait_for_slaves(int monarch, const char *type)
{
- int c, wait = 0, missing = 0;
- for_each_online_cp... |
a79e4198d1effbba040e9bf407a95fc9b3418789 | Analyze and fix the following issue in the Linux kernel code: PCI: X86: Introduce and enable PCI domain support | Problem Details:
* fix bug in pci_read() and pci_write() which prevented PCI domain
support from working (hardcoded domain 0).
* unconditionally enable CONFIG_PCI_DOMAINS
* implement pci_domain_nr() and pci_proc_domain(), as required of
all arches when CONFIG_PCI_DOMAINS is enabled.
* store domain in struct pci_... | ```diff
diff --git a/arch/i386/Kconfig b/arch/i386/Kconfig
index 2d85e4b87307..515abb98d41d 100644
--- a/arch/i386/Kconfig
+++ b/arch/i386/Kconfig
@@ -1137,6 +1137,11 @@ config PCI_MMCONFIG
depends on PCI && ACPI && (PCI_GOMMCONFIG || PCI_GOANY)
default y
+config PCI_DOMAINS
+ bool
+ depends on PCI
+ default y
+
... |
fd6e732186ab522c812ab19c2c5e5befb8ec8115 | Analyze and fix the following issue in the Linux kernel code: PCI: fix IDE legacy mode resources | Problem Details:
I got the following error on MIPS Cobalt.
PCI: Unable to reserve I/O region #1:8@f00001f0 for device 0000:00:09.1
pata_via 0000:00:09.1: failed to request/iomap BARs for port 0 (errno=-16)
PCI: Unable to reserve I/O region #3:8@f0000170 for device 0000:00:09.1
pata_via 0000:00:09.1: failed to request/... | ```diff
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index 171ca712e523..40e571d3c392 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -744,22 +744,46 @@ static int pci_setup_device(struct pci_dev * dev)
*/
if (class == PCI_CLASS_STORAGE_IDE) {
u8 progif;
+ struct pci_bus_region regi... |
a56bc69a182f501582557af7fad5bc882b1c856c | Analyze and fix the following issue in the Linux kernel code: PCI: Fix incorrect argument order to list_add_tail() in PCI dynamic ID code | Problem Details:
The code for dynamically assigning new ids to PCI drivers,
store_new_id(), calls list_add_tail() with the list head and new node
arguments in reversed order.
The result is that every new id written essentially overwrites the
previous list of ids.
Caught with the help of Rusty's "horribly bad" list_no... | ```diff
diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c
index 004bc2487270..c43ecedce673 100644
--- a/drivers/pci/pci-driver.c
+++ b/drivers/pci/pci-driver.c
@@ -54,7 +54,6 @@ store_new_id(struct device_driver *driver, const char *buf, size_t count)
if (!dynid)
return -ENOMEM;
- INIT_LIST_HEAD(&... |
b205f6b2679c7fcf761ed726de8093ca69b6c26e | Analyze and fix the following issue in the Linux kernel code: i386: add support for picopower irq router | Problem Details:
Add support for PicoPower PT86C523 IRQ router to be used with the in-kernel
yenta driver for CardBus. With this patch cardbus works on e.g. Dell
Latitude XPi P150CD.
Initial patch for kernel 2.4 series by Sune Mølgaard
http://molgaard.org/code/linux-2.4.31-picopower.patch
Ported to 2.6.20 by Chmoue... | ```diff
diff --git a/arch/x86/pci/irq.c b/arch/x86/pci/irq.c
index d98c6b096f8e..c52150fdf82b 100644
--- a/arch/x86/pci/irq.c
+++ b/arch/x86/pci/irq.c
@@ -492,6 +492,26 @@ static int pirq_amd756_set(struct pci_dev *router, struct pci_dev *dev, int pirq
return 1;
}
+/*
+ * PicoPower PT86C523
+ */
+static int pirq_p... |
d1aa3e6aa8edfeb864af7c930523d9e588b28bea | Analyze and fix the following issue in the Linux kernel code: USB: fix race in autosuspend reschedule | Problem Details:
This patch (as1002) fixes a small race which can occur when a driver
expects usbcore to reschedule an autosuspend request. If the request
arrives too late, it won't be rescheduled. The patch adds an extra
argument to autosuspend_check(), indicating that a reschedule is
needed no matter how much time ... | ```diff
diff --git a/drivers/usb/core/driver.c b/drivers/usb/core/driver.c
index 8c1eac27f2de..c27bc080d84e 100644
--- a/drivers/usb/core/driver.c
+++ b/drivers/usb/core/driver.c
@@ -950,11 +950,11 @@ done:
#ifdef CONFIG_USB_SUSPEND
/* Internal routine to check whether we may autosuspend a device. */
-static int au... |
58ed7b94d98245fbad54a0af7ea3317ab1dd6876 | Analyze and fix the following issue in the Linux kernel code: atmel_usba_udc: Keep track of the device status | Problem Details:
Keep track of the device status (as returned by the GET_STATUS
request) and allow it to be manipulated by set_selfpowered() as
well as SET_FEATURE/CLEAR_FEATURE (for remote wakeup)
Implement the wakeup() op, which refuses to do anything if the
DEVICE_REMOTE_WAKEUP feature wasn't set by the host. Now ... | ```diff
diff --git a/drivers/usb/gadget/atmel_usba_udc.c b/drivers/usb/gadget/atmel_usba_udc.c
index 2bb28a583937..4fb5ff469574 100644
--- a/drivers/usb/gadget/atmel_usba_udc.c
+++ b/drivers/usb/gadget/atmel_usba_udc.c
@@ -989,8 +989,44 @@ static int usba_udc_get_frame(struct usb_gadget *gadget)
return USBA_BFEXT(FRA... |
d466a9190ff1ceddfee50686e61d63590fc820d9 | Analyze and fix the following issue in the Linux kernel code: USB: Nikon D40X unusual_devs entry | Problem Details:
Not surprisingly the Nikon D40X DSC needs the same quirks as the D40,
but it has a separate ID.
See http://bugs.gentoo.org/show_bug.cgi?id=191431
From: Ortwin Glück <odi@odi.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ```diff
diff --git a/drivers/usb/storage/unusual_devs.h b/drivers/usb/storage/unusual_devs.h
index edf92914674a..9b656ec427d0 100644
--- a/drivers/usb/storage/unusual_devs.h
+++ b/drivers/usb/storage/unusual_devs.h
@@ -369,6 +369,13 @@ UNUSUAL_DEV( 0x04b0, 0x0415, 0x0100, 0x0100,
US_SC_DEVICE, US_PR_DEVICE, NULL,
... |
063a2da8f01806906f7d7b1a1424b9afddebc443 | Analyze and fix the following issue in the Linux kernel code: USB: serial core should respect driver requirements | Problem Details:
This patch (as997) fixes a bug in the USB serial core. The core needs
to pay attention to drivers' requirements regarding the number and
type of endpoints a device has.
At the same time, the patch changes the NUM_DONT_CARE constant (which
is stored in a single-byte field) from -1 to a safer, unsigned... | ```diff
diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c
index 26e015c39a31..4b1bd7def4a5 100644
--- a/drivers/usb/serial/usb-serial.c
+++ b/drivers/usb/serial/usb-serial.c
@@ -662,16 +662,14 @@ exit:
static struct usb_serial_driver *search_serial_device(struct usb_interface *iface)
{
... |
32fe01985aa2cb2562f6fc171e526e279abe10db | Analyze and fix the following issue in the Linux kernel code: USB: mutual exclusion for EHCI init and port resets | Problem Details:
This patch (as999) fixes a problem that sometimes shows up when host
controller driver modules are loaded in the wrong order. If ehci-hcd
happens to initialize an EHCI controller while the companion OHCI or
UHCI controller is in the middle of a port reset, the reset can fail
and the companion may get ... | ```diff
diff --git a/drivers/usb/core/hcd.h b/drivers/usb/core/hcd.h
index 1396141274f1..98e24194a4ab 100644
--- a/drivers/usb/core/hcd.h
+++ b/drivers/usb/core/hcd.h
@@ -19,6 +19,8 @@
#ifdef __KERNEL__
+#include <linux/rwsem.h>
+
/* This file contains declarations of usbcore internals that are mostly
* used or... |
b24896c6b7ddb37ab20ba0bbfd0ed36a38923f67 | Analyze and fix the following issue in the Linux kernel code: USB: ehci build fixes on au1xxx, ppc-soc | Problem Details:
Cleanup: references to two PM routines (and HCD entry points)
that no longer exist are swapped with their replacements.
Evidently au1xxx and ppc-soc EHCI support doesn't get compiled
with power management very much, or these build bugs would have
been patched long ago.
Signed-off-by: David Brownell <... | ```diff
diff --git a/drivers/usb/host/ehci-au1xxx.c b/drivers/usb/host/ehci-au1xxx.c
index b1d19268cb23..766ef68a0b43 100644
--- a/drivers/usb/host/ehci-au1xxx.c
+++ b/drivers/usb/host/ehci-au1xxx.c
@@ -220,10 +220,8 @@ static const struct hc_driver ehci_au1xxx_hc_driver = {
*/
.hub_status_data = ehci_hub_status_d... |
f621b8437d6ae502dde45797f56407e48c7a68b4 | Analyze and fix the following issue in the Linux kernel code: USB: funsoft: Fix termios | Problem Details:
Funsoft has a bogus ioctl handler doing bogus termios handling in a bogus
manner. Fortunately we can simply delete all the bogus bits and get the
right default behaviour !
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ```diff
diff --git a/drivers/usb/serial/funsoft.c b/drivers/usb/serial/funsoft.c
index 4092f6dc9efd..b5194dc7d3bb 100644
--- a/drivers/usb/serial/funsoft.c
+++ b/drivers/usb/serial/funsoft.c
@@ -24,26 +24,6 @@ static struct usb_device_id id_table [] = {
};
MODULE_DEVICE_TABLE(usb, id_table);
-static int funsoft_ioc... |
d9c563626d9a136636385209d59d0c4f16c4a7ab | Analyze and fix the following issue in the Linux kernel code: USB: visor: termios bits | Problem Details:
Visor has a huge complex routine which displays termios bits for debug
but doesn't do anything. Get the correct behaviour by removing it all
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ```diff
diff --git a/drivers/usb/serial/visor.c b/drivers/usb/serial/visor.c
index 30e08c0bcdc2..7ee087fed913 100644
--- a/drivers/usb/serial/visor.c
+++ b/drivers/usb/serial/visor.c
@@ -46,7 +46,6 @@ static int visor_probe (struct usb_serial *serial, const struct usb_device_id
static int visor_calc_num_ports(struc... |
5395353e0c8272fe73ac914acd7e4add0da2bef0 | Analyze and fix the following issue in the Linux kernel code: usb-gadget-ether: prevent oops caused by error interrupt race | Problem Details:
Fix a longstanding race in the Ethernet gadget driver, which can cause an
oops on device disconnect. The fix is just to make the TX path check
whether its freelist is empty. That check is otherwise not necessary,
since the queue is always stopped when that list empties (and restarted
when request com... | ```diff
diff --git a/drivers/usb/gadget/ether.c b/drivers/usb/gadget/ether.c
index ff244f42723f..9f4fd7e849a0 100644
--- a/drivers/usb/gadget/ether.c
+++ b/drivers/usb/gadget/ether.c
@@ -1957,8 +1957,20 @@ static int eth_start_xmit (struct sk_buff *skb, struct net_device *net)
}
spin_lock_irqsave(&dev->req_lock, ... |
9dcfbd97a695a3c28a867501127fa35ac49bc805 | Analyze and fix the following issue in the Linux kernel code: USB: fix gregkh-usb-usb-sisusb2vga-convert-printk-to-dev_-macros | Problem Details:
drivers/usb/misc/sisusbvga/sisusb.c: In function 'sisusb_open':
drivers/usb/misc/sisusbvga/sisusb.c:2444: warning: 'sisusb' is used uninitialized in this function
I can tell that'll oops just by looking at it.
How come this code assume a 7,000 column xterm? :(
Cc: Felipe Balbi <felipe.lima@indt.org.... | ```diff
diff --git a/drivers/usb/misc/sisusbvga/sisusb.c b/drivers/usb/misc/sisusbvga/sisusb.c
index 033bdfe9b215..0790829a5701 100644
--- a/drivers/usb/misc/sisusbvga/sisusb.c
+++ b/drivers/usb/misc/sisusbvga/sisusb.c
@@ -3323,15 +3323,7 @@ static int __init usb_sisusb_init(void)
sisusb_init_concode();
#endif
- i... |
ca0677a29bddee35918bf3c0c55cc3badd69079e | Analyze and fix the following issue in the Linux kernel code: USB: r8a66597-hcd: fix driver removing | Problem Details:
Fixed the problem that accessed register of this controller after
having called iounmap().
Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ```diff
diff --git a/drivers/usb/host/r8a66597-hcd.c b/drivers/usb/host/r8a66597-hcd.c
index 64fba53c2631..ae8ec4474eb8 100644
--- a/drivers/usb/host/r8a66597-hcd.c
+++ b/drivers/usb/host/r8a66597-hcd.c
@@ -2126,8 +2126,8 @@ static int __init_or_module r8a66597_remove(struct platform_device *pdev)
struct usb_hcd *hc... |
05eac910b69209164b1d9357bf8877a7c81b2e4e | Analyze and fix the following issue in the Linux kernel code: USB: r8a66597-hcd: fix endian problem | Problem Details:
Fixed the problem that does not work in the big endian machine.
Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ```diff
diff --git a/drivers/usb/host/r8a66597-hcd.c b/drivers/usb/host/r8a66597-hcd.c
index 0a699efe6c9c..64fba53c2631 100644
--- a/drivers/usb/host/r8a66597-hcd.c
+++ b/drivers/usb/host/r8a66597-hcd.c
@@ -834,7 +834,7 @@ static void init_pipe_info(struct r8a66597 *r8a66597, struct urb *urb,
info.pipenum = get_empty... |
e3a09051a16fcdb190ad0b7dc6064904c8118409 | Analyze and fix the following issue in the Linux kernel code: USB: r8a66597-hcd: fix Class or Vendor Request | Problem Details:
Fixed the problem that does not work in the case of bRequest = 0x05 in
Class or Vendor Request.
Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ```diff
diff --git a/drivers/usb/host/r8a66597-hcd.c b/drivers/usb/host/r8a66597-hcd.c
index fd00f1e33fb5..0a699efe6c9c 100644
--- a/drivers/usb/host/r8a66597-hcd.c
+++ b/drivers/usb/host/r8a66597-hcd.c
@@ -1034,6 +1034,15 @@ static void prepare_status_packet(struct r8a66597 *r8a66597,
pipe_start(r8a66597, td->pipe);... |
7108f28465a0a37d5afc05c5ad788938423b74a7 | Analyze and fix the following issue in the Linux kernel code: USB: don't propagate FREEZE or PRETHAW suspends | Problem Details:
This patch (as992) fixes a recently-added bug. During a FREEZE or
PRETHAW suspend notification, non-root devices don't actually get
suspended. So we shouldn't tell their parent hubs that they did.
(This code path used to be skipped over, until the FREEZE/PRETHAW test
got moved out of usb_suspend_bot... | ```diff
diff --git a/drivers/usb/core/driver.c b/drivers/usb/core/driver.c
index ba5bbc7eedcc..3f734240e0ec 100644
--- a/drivers/usb/core/driver.c
+++ b/drivers/usb/core/driver.c
@@ -1112,7 +1112,12 @@ static int usb_suspend_both(struct usb_device *udev, pm_message_t msg)
usb_hcd_flush_endpoint(udev, udev->ep_out[i... |
403fae78d7388876b96fbe30ccf2cb551c49ae5a | Analyze and fix the following issue in the Linux kernel code: USB: fix limited_power setting mistake in hub.c | Problem Details:
This patch (jx001) fixes a variable assignment mistake in hub driver.
limited_power should be set to 0 if the hub is self-powered,and 1 if
the hub is bus-powered.
However, the effect of the code was exactly opposite to the spec's
statement for the Local Power Source field. The spec says, this field
is... | ```diff
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
index 691acf2223c2..481dca641ea2 100644
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -2818,9 +2818,9 @@ static void hub_events(void)
clear_hub_feature(hdev, C_HUB_LOCAL_POWER);
if (hubstatus & HUB_STATUS_LOCAL_POWER)
/*... |
ed6590a861a16276db34ee626375fa79f3369ac3 | Analyze and fix the following issue in the Linux kernel code: USB: fix double frees in error code paths of ipaq driver | Problem Details:
the error code paths can be enter with buffers to freed buffers.
Serial core would do a kfree() on memory already freed.
Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ```diff
diff --git a/drivers/usb/serial/ipaq.c b/drivers/usb/serial/ipaq.c
index 6a3a704b5849..c1a6484f6524 100644
--- a/drivers/usb/serial/ipaq.c
+++ b/drivers/usb/serial/ipaq.c
@@ -646,11 +646,13 @@ static int ipaq_open(struct usb_serial_port *port, struct file *filp)
kfree(port->bulk_out_buffer);
port->bulk_in_b... |
f7294055a7a5bf1ea7da16dffb0cb0f7a282c04b | Analyze and fix the following issue in the Linux kernel code: USB: usb-skeleton leaking locks on open | Problem Details:
This weekend I was hacking around with a trivial USB driver for talking
to the boot load firmware of a USB Bit Whacker. It's running the
MicroChip Pic18 boot loader firmware and I'm putting together a flash
program for writing new FW to the thing.
Anyway in my use of the usb-skeleton.c as my starting... | ```diff
diff --git a/drivers/usb/usb-skeleton.c b/drivers/usb/usb-skeleton.c
index 8de11deb5d14..c815a40e167f 100644
--- a/drivers/usb/usb-skeleton.c
+++ b/drivers/usb/usb-skeleton.c
@@ -125,6 +125,7 @@ static int skel_open(struct inode *inode, struct file *file)
/* save our object in the file's private structure *... |
e6d42f0e962390e956545aa282efb05a9d6a41d1 | Analyze and fix the following issue in the Linux kernel code: USB: sisusbvga: Fix bug | Problem Details:
drivers/usb/misc/sisusbvga/sisusb.c: In function sisusb_open
drivers/usb/misc/sisusbvga/sisusb.c:2444: warning: sisusb is used uninitialized in this function
is a genuine bug (which will cause oops). We cannot use "sisusb" in
error path for (!interface), because sisusb will itself be derived
from "int... | ```diff
diff --git a/drivers/usb/misc/sisusbvga/sisusb.c b/drivers/usb/misc/sisusbvga/sisusb.c
index 4d6b89336e63..033bdfe9b215 100644
--- a/drivers/usb/misc/sisusbvga/sisusb.c
+++ b/drivers/usb/misc/sisusbvga/sisusb.c
@@ -2440,10 +2440,8 @@ sisusb_open(struct inode *inode, struct file *file)
struct usb_interface *in... |
5adceac5da3d353dd1318d0482cab94a79472adf | Analyze and fix the following issue in the Linux kernel code: USB: fix errornous assumption in the usb serial framework revealed by iuu_phoenix | Problem Details:
the iuu_phoenix driver submits another URB from a completion handler.
This dictates a certain order of calls to usb_kill_urb() in kill_traffic().
As other drivers may do it the other way round, we need to use both
orders in kill_traffic().
This patch does so and should be merged before iuu_phoenix is m... | ```diff
diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c
index 9bf01a5efc84..26e015c39a31 100644
--- a/drivers/usb/serial/usb-serial.c
+++ b/drivers/usb/serial/usb-serial.c
@@ -578,6 +578,17 @@ static void kill_traffic(struct usb_serial_port *port)
{
usb_kill_urb(port->read_urb);
usb_... |
63f991b2871bdb1431e8ff62cae2b7b94b4e5b0c | Analyze and fix the following issue in the Linux kernel code: USB: fix location of statement label in dummy-hcd | Problem Details:
This patch (as984) fixes a rather elementary mistake in dummy_hcd.
The new statement label should come before the spin_unlock_irqrestore,
not after it.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ```diff
diff --git a/drivers/usb/gadget/dummy_hcd.c b/drivers/usb/gadget/dummy_hcd.c
index 58e4d7208805..6479a36d6f0e 100644
--- a/drivers/usb/gadget/dummy_hcd.c
+++ b/drivers/usb/gadget/dummy_hcd.c
@@ -1001,8 +1001,8 @@ static int dummy_urb_enqueue (
if (!timer_pending (&dum->timer))
mod_timer (&dum->timer, jiffi... |
fdf99c9ec10cb9cd44be3ac0bd007a49ac6dc751 | Analyze and fix the following issue in the Linux kernel code: USB: fix memory leak in berry_charge driver | Problem Details:
This fixes a small memory leak that happens every time the device is
plugged in.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ```diff
diff --git a/drivers/usb/misc/berry_charge.c b/drivers/usb/misc/berry_charge.c
index 92c1d2768df9..24e2dc3148a4 100644
--- a/drivers/usb/misc/berry_charge.c
+++ b/drivers/usb/misc/berry_charge.c
@@ -71,7 +71,7 @@ static int magic_charge(struct usb_device *udev)
if (retval != 2) {
dev_err(&udev->dev, "First... |
1f5a3d0f34fd5719081c6b8f3dbbcbe328d4da31 | Analyze and fix the following issue in the Linux kernel code: USB: fix mistake in usb_hcd_giveback_urb | Problem Details:
This patch (as971) fixes a small mistake: The URB's completion status
needs to be adjusted before the URB is passed to usmon_urb_complete(),
not afterward.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ```diff
diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c
index ec17fc4d2861..8b17babf5c55 100644
--- a/drivers/usb/core/hcd.c
+++ b/drivers/usb/core/hcd.c
@@ -1266,9 +1266,6 @@ int usb_hcd_unlink_urb (struct urb *urb, int status)
*/
void usb_hcd_giveback_urb (struct usb_hcd *hcd, struct urb *urb)
{
- un... |
dfd1e53777afe1050e3a0a3f0dd063a64242b818 | Analyze and fix the following issue in the Linux kernel code: USB: minor fixes for r8a66597 driver | Problem Details:
This patch (as967) makes a few relatively minor changes to the
r8a66597 driver:
finish_request() does nothing but call done(), so merge the
two routines.
Detect and report -EOVERFLOW errors.
Fix the calculation that checks for short packets.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>... | ```diff
diff --git a/drivers/usb/host/r8a66597-hcd.c b/drivers/usb/host/r8a66597-hcd.c
index 94bb229df3bc..49cf998c172a 100644
--- a/drivers/usb/host/r8a66597-hcd.c
+++ b/drivers/usb/host/r8a66597-hcd.c
@@ -1109,8 +1109,9 @@ static void set_td_timer(struct r8a66597 *r8a66597, struct r8a66597_td *td)
}
/* this funct... |
04ea02f5746a2e01a38edae2de3eafc40eac17aa | Analyze and fix the following issue in the Linux kernel code: UEAGLE: Avoid keyboard driver blocking | Problem Details:
Ueagle-atm driver load DSP firmware in function, which is running from
common workqueue. In some (error) circumstances loading firmware may
sleep for long periods (even 60 seconds, depending on timeout). This
block keyboard driver, which also use common workqueue. To fix problem
use custom workqueue in... | ```diff
diff --git a/drivers/usb/atm/ueagle-atm.c b/drivers/usb/atm/ueagle-atm.c
index dee5f798946c..648c6b79ff41 100644
--- a/drivers/usb/atm/ueagle-atm.c
+++ b/drivers/usb/atm/ueagle-atm.c
@@ -167,6 +167,7 @@ struct uea_softc {
union cmv_dsc cmv_dsc;
struct work_struct task;
+ struct workqueue_struct *work_q;
... |
f311cf58bd04adc683067f8d66daa5925b80f082 | Analyze and fix the following issue in the Linux kernel code: USB: ark3116.c: fix check-after-use | Problem Details:
The Coverity checker spotted that we'd have already oops'ed if one of
these was NULL.
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ```diff
diff --git a/drivers/usb/serial/ark3116.c b/drivers/usb/serial/ark3116.c
index c9fd486c1c7d..2a8e537cb046 100644
--- a/drivers/usb/serial/ark3116.c
+++ b/drivers/usb/serial/ark3116.c
@@ -172,11 +172,6 @@ static void ark3116_set_termios(struct usb_serial_port *port,
dbg("%s - port %d", __FUNCTION__, port->nu... |
b3aceb2bab988e514e65dd37f385221a095ad477 | Analyze and fix the following issue in the Linux kernel code: USB: mct_u232-convert-to-proper-speed-handling-api-fix | Problem Details:
Make Pete happy
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ```diff
diff --git a/drivers/usb/serial/mct_u232.c b/drivers/usb/serial/mct_u232.c
index e08c9bb403d8..0dc99f75bb09 100644
--- a/drivers/usb/serial/mct_u232.c
+++ b/drivers/usb/serial/mct_u232.c
@@ -206,20 +206,20 @@ static int mct_u232_calculate_baud_rate(struct usb_serial *serial, speed_t value
}
} else {
swi... |
42cb967fd01b1f50374fdfa811f86db103eea532 | Analyze and fix the following issue in the Linux kernel code: usblp: Fix a double kfree | Problem Details:
If submit fails, slab hits a BUG() because of a double kfree.
The today's lesson is, you cannot just slap USB_FREE_BUFFER on code
without adjusting the error paths.
The patch is made bigger by opportunistic refactoring.
Signed-Off-By: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: Greg Kroah-Hartma... | ```diff
diff --git a/drivers/usb/class/usblp.c b/drivers/usb/class/usblp.c
index 3a0f8186d4bf..ad632f2d6f94 100644
--- a/drivers/usb/class/usblp.c
+++ b/drivers/usb/class/usblp.c
@@ -686,10 +686,30 @@ done:
return retval;
}
+static struct urb *usblp_new_writeurb(struct usblp *usblp, int transfer_length)
+{
+ struc... |
283face86b002e670053e9189604852ccb81d357 | Analyze and fix the following issue in the Linux kernel code: usblp: Cosmetics | Problem Details:
This is a small bunch of cosmetic fixes:
- Timeout is not a write timeout anymore, rename
- Condition in poll was confusingly backwards, invert and simplify
- The comment log gave a wrong impression of version 0.13, terminate it.
Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: Greg ... | ```diff
diff --git a/drivers/usb/class/usblp.c b/drivers/usb/class/usblp.c
index 2c4a359355ba..3a0f8186d4bf 100644
--- a/drivers/usb/class/usblp.c
+++ b/drivers/usb/class/usblp.c
@@ -28,6 +28,7 @@
* v0.12 - add hpoj.sourceforge.net ioctls (David Paschal)
* v0.13 - alloc space for statusbuf (<status> not on stack);
... |
fc401e697f8c00ad1178a6758e86e3881dfa3181 | Analyze and fix the following issue in the Linux kernel code: usblp: mutex in usblp_check_status | Problem Details:
Add a mutex to protect the ->statusbuf. Not really an issue, because CUPS
is single-threaded when it talks to the printer, but I feel safer this way.
This should be deadlock-free, but I kept this as a separate patch in case
someone ends running a git bisect.
Signed-off-by: Pete Zaitcev <zaitcev@redhat... | ```diff
diff --git a/drivers/usb/class/usblp.c b/drivers/usb/class/usblp.c
index 9696668e5752..2c4a359355ba 100644
--- a/drivers/usb/class/usblp.c
+++ b/drivers/usb/class/usblp.c
@@ -345,16 +345,17 @@ static int usblp_check_status(struct usblp *usblp, int err)
unsigned char status, newerr = 0;
int error;
- error ... |
2acbd647315017c07537287857ea2db36c70eacf | Analyze and fix the following issue in the Linux kernel code: USB: SisUSB2VGA: Mis-spelled word | Problem Details:
Trivial fix
Signed-off-by: Felipe Balbi <felipe.lima@indt.org.br>
Cc: Thomas Winischhofer <thomas@winischhofer.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ```diff
diff --git a/drivers/usb/misc/sisusbvga/sisusb.h b/drivers/usb/misc/sisusbvga/sisusb.h
index dc0473921e3d..7183e762fead 100644
--- a/drivers/usb/misc/sisusbvga/sisusb.h
+++ b/drivers/usb/misc/sisusbvga/sisusb.h
@@ -44,7 +44,7 @@
#include <linux/mutex.h>
/* For older kernels, support for text consoles is by ... |
79a7d9ee1a2e8b8dc44dd217f07496911850ec0e | Analyze and fix the following issue in the Linux kernel code: USB: cleanups for g_file_storage | Problem Details:
This patch (as957) makes some minor cleanups to the g_file_storage
driver:
Update the copyright date and version string;
Uniformize the logging macros for the gadget and the LUNs;
Remove "inline" markers -- nowadays we rely on the compiler
to decide which routines are best inlined;
Use the pri... | ```diff
diff --git a/drivers/usb/gadget/file_storage.c b/drivers/usb/gadget/file_storage.c
index 0019116ee411..9998cd7af418 100644
--- a/drivers/usb/gadget/file_storage.c
+++ b/drivers/usb/gadget/file_storage.c
@@ -1,7 +1,7 @@
/*
* file_storage.c -- File-backed USB Storage Gadget, for USB development
*
- * Copyrig... |
93993a0a3e528357ae4b9b0eb82fd4b428ebbf64 | Analyze and fix the following issue in the Linux kernel code: usb: introduce usb_authorize/deauthorize() | Problem Details:
These USB API functions will do the full authorization/deauthorization
to be used for a device. When authorized we effectively allow a
configuration to be set. Reverse that when deauthorized.
Effectively this means that we have to clean all the configuration
descriptors on deauthorize and reload them ... | ```diff
diff --git a/drivers/usb/core/generic.c b/drivers/usb/core/generic.c
index 20b095050a16..7b9e1ec718d2 100644
--- a/drivers/usb/core/generic.c
+++ b/drivers/usb/core/generic.c
@@ -40,7 +40,7 @@ static int is_activesync(struct usb_interface_descriptor *desc)
&& desc->bInterfaceProtocol == 1;
}
-static int c... |
ca2bdf4bcc91818f03e009b87c348609c2578d1d | Analyze and fix the following issue in the Linux kernel code: USB: gadget: gadget zero cleanups | Problem Details:
Clean up gadget zero, using newer APIs and conventions:
- gadget_is_dualspeed() and gadget_is_otg() ... #ifdef removal
- Remove many now-needless #includes
- Use the VERBOSE_DEBUG convention
- Some whitespace fixes.
- A few comment updates
- Plus a few other small cleanups: don't pass gfp... | ```diff
diff --git a/drivers/usb/gadget/zero.c b/drivers/usb/gadget/zero.c
index fcfe869acb94..ff540879ce3a 100644
--- a/drivers/usb/gadget/zero.c
+++ b/drivers/usb/gadget/zero.c
@@ -1,38 +1,22 @@
/*
* zero.c -- Gadget Zero, for USB development
*
- * Copyright (C) 2003-2004 David Brownell
+ * Copyright (C) 2003-20... |
2e806f67cc570d25395469a0ded0df8ffbd4d82f | Analyze and fix the following issue in the Linux kernel code: USB: gadget: file storage gadget cleanups | Problem Details:
Clean up the file storage gadget, using newer APIs and conventions:
- gadget_is_dualspeed() and gadget_is_otg() ... #ifdef removal
- Remove many now-needless #includes
- Use the DEBUG (from Kconfig+Makefile) and VERBOSE_DEBUG conventions.
- Remove some "sparse" warnings (it still dislikes the _... | ```diff
diff --git a/drivers/usb/gadget/file_storage.c b/drivers/usb/gadget/file_storage.c
index 965ad7bec7b7..0019116ee411 100644
--- a/drivers/usb/gadget/file_storage.c
+++ b/drivers/usb/gadget/file_storage.c
@@ -217,17 +217,11 @@
*/
-#undef DEBUG
-#undef VERBOSE
+/* #define VERBOSE_DEBUG */
#undef DUMP_MSGS
... |
51a0e85cd9b47e2e6332b40ea486cc1659d8a3ec | Analyze and fix the following issue in the Linux kernel code: USB: gadget: serial gadget cleanups | Problem Details:
Clean up the serial gadget, using newer APIs and conventions:
- gadget_is_dualspeed() and gadget_is_otg() ... #ifdef removal
- Remove many now-needless #includes
- Use the DEBUG and VERBOSE_DEBUG conventions; turned up a bug in
the original debug messaging
- Various whitespace fixes.
This g... | ```diff
diff --git a/drivers/usb/gadget/serial.c b/drivers/usb/gadget/serial.c
index ce4d2e09633d..afdf71f76f7e 100644
--- a/drivers/usb/gadget/serial.c
+++ b/drivers/usb/gadget/serial.c
@@ -17,30 +17,11 @@
*
*/
-#include <linux/module.h>
#include <linux/kernel.h>
-#include <linux/delay.h>
-#include <linux/iopor... |
8c07021635a10c9a4969cbff0f2325a94c860f77 | Analyze and fix the following issue in the Linux kernel code: USB: gadget: gmidi cleanups | Problem Details:
Clean up the midi gadget, using newer APIs and conventions:
- Remove many now-needless #includes
- Use the DEBUG (from Kconfig+Makefile) and VERBOSE_DEBUG conventions.
- Whitespace fixes
There should be no effect on object code size.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.ne... | ```diff
diff --git a/drivers/usb/gadget/gmidi.c b/drivers/usb/gadget/gmidi.c
index 1c5aa49d7432..d2475755a206 100644
--- a/drivers/usb/gadget/gmidi.c
+++ b/drivers/usb/gadget/gmidi.c
@@ -18,17 +18,11 @@
* http://www.usb.org/developers/devclass_docs/midi10.pdf
*/
-#define DEBUG 1
-// #define VERBOSE
+/* #define VE... |
0cf4f2de0a0f4100795f38ef894d4910678c74f8 | Analyze and fix the following issue in the Linux kernel code: USB: gadget: ethernet gadget cleanups, shrinkage | Problem Details:
Clean up the ethernet gadget, using newer APIs and conventions:
- gadget_is_dualspeed() and gadget_is_otg() ... #ifdef removal
- Remove many now-needless #includes
- Use the VERBOSE_DEBUG convention
- Minor whitespace fixes.
- Fix a warning from "sparse".
Surprisingly, this saved about 2K of... | ```diff
diff --git a/drivers/usb/gadget/ether.c b/drivers/usb/gadget/ether.c
index f70055473a00..ff244f42723f 100644
--- a/drivers/usb/gadget/ether.c
+++ b/drivers/usb/gadget/ether.c
@@ -19,41 +19,19 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
+/* #define VERBOSE_DEBUG */
-... |
a4e3ef5597e26dad006544d38b9ab6ff42382b76 | Analyze and fix the following issue in the Linux kernel code: USB: gadget: gadget_is_{dualspeed,otg} predicates and cleanup | Problem Details:
This adds two small inlines to the gadget stack, which will
often evaluate to compile-time constants. That can help
shrink object code and remove #ifdeffery.
- gadget_is_dualspeed(), currently always a compile-time
constant (depending on which controller is selected).
- gadget_is_otg(), usually... | ```diff
diff --git a/drivers/usb/gadget/fsl_usb2_udc.c b/drivers/usb/gadget/fsl_usb2_udc.c
index d57bcfbc08a5..89c768e2aed7 100644
--- a/drivers/usb/gadget/fsl_usb2_udc.c
+++ b/drivers/usb/gadget/fsl_usb2_udc.c
@@ -1090,14 +1090,11 @@ static int fsl_vbus_session(struct usb_gadget *gadget, int is_active)
*/
static in... |
93cf9b909efb773f74b5d87659d41f957ccbce7e | Analyze and fix the following issue in the Linux kernel code: USB: avoid urb->pipe in usbfs | Problem Details:
This patch (as948) removes most of the references to urb->pipe from
the usbfs routines in devio.c. The one tricky aspect is in
snoop_urb(), which can be called before the URB is submitted and which
uses usb_urb_dir_in(). For this to work properly, the URB's direction
flag must be set manually in proc... | ```diff
diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c
index 927a181120a9..b9f1edd6af53 100644
--- a/drivers/usb/core/devio.c
+++ b/drivers/usb/core/devio.c
@@ -289,10 +289,8 @@ static void snoop_urb(struct urb *urb, void __user *userurb)
if (!usbfs_snoop)
return;
- if (urb->pipe & USB_DIR_IN)
... |
a96173af521a173f45d3a27fa24265081f12e978 | Analyze and fix the following issue in the Linux kernel code: USB: Storage: usbat_check_status(): fix check-after-use | Problem Details:
The Coverity checker spotted that we have already oops'ed if "us"
was NULL.
Since "us" can't be NULL in the only caller this patch removes the
NULL check.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Matthew Dharm <mdharm-usb@one-eyed-alien.net>
Signed-off-by: Greg Kroah-Hartman <gregkh... | ```diff
diff --git a/drivers/usb/storage/shuttle_usbat.c b/drivers/usb/storage/shuttle_usbat.c
index 5e27297c0175..17ca4d73577b 100644
--- a/drivers/usb/storage/shuttle_usbat.c
+++ b/drivers/usb/storage/shuttle_usbat.c
@@ -190,9 +190,6 @@ static int usbat_check_status(struct us_data *us)
unsigned char *reply = us->io... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.