id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
f57a8a1911342265e7acdc190333c4e9235a6632
Analyze and fix the following issue in the Linux kernel code: ring-buffer: fix ret in rb_add_time_stamp
Problem Details: The update of ret got mistakenly added to the if statement of rb_try_to_discard. The variable ret should be 1 on commit and zero otherwise. [ Impact: fix compiler warning and real bug ] Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
```diff diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c index 22878b0d370c..2e642b2b7253 100644 --- a/kernel/trace/ring_buffer.c +++ b/kernel/trace/ring_buffer.c @@ -1433,8 +1433,8 @@ rb_add_time_stamp(struct ring_buffer_per_cpu *cpu_buffer, /* Darn, this is just wasted space */ event->time...
238ddbb98c327a7392ced5ae65216c55969749ea
Analyze and fix the following issue in the Linux kernel code: [SCSI] gdth: fix overlapping snprintf users
Problem Details: Closes-bug: http://bugzilla.kernel.org/show_bug.cgi?id=13438 Closes-bug: http://bugzilla.kernel.org/show_bug.cgi?id=13437 Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
```diff diff --git a/drivers/scsi/gdth_proc.c b/drivers/scsi/gdth_proc.c index 59349a316e13..1258da34fbc2 100644 --- a/drivers/scsi/gdth_proc.c +++ b/drivers/scsi/gdth_proc.c @@ -152,6 +152,7 @@ static int gdth_get_info(char *buffer,char **start,off_t offset,int length, struct Scsi_Host *host,...
0b8c3d5ab000c22889af7f9409799a6cdc31a2b2
Analyze and fix the following issue in the Linux kernel code: x86: Clear TS in irq_ts_save() when in an atomic section
Problem Details: The dynamic FPU context allocation changes caused the padlock driver to generate the below warning. Fix it by masking TS when doing padlock encryption operations in an atomic section. This solves: BUG: sleeping function called from invalid context at mm/slub.c:1602 in_atomic(): 1, irqs_disabled(): 0,...
```diff diff --git a/arch/x86/include/asm/i387.h b/arch/x86/include/asm/i387.h index 71c9e5183982..4aab52f8e41a 100644 --- a/arch/x86/include/asm/i387.h +++ b/arch/x86/include/asm/i387.h @@ -305,18 +305,18 @@ static inline void kernel_fpu_end(void) /* * Some instructions like VIA's padlock instructions generate a sp...
272023df26da2668ecc3937f8eeb48c8683b64fa
Analyze and fix the following issue in the Linux kernel code: mtd: nand: Fix memory leak on txx9ndfmc probe failure.
Problem Details: Commit 81933046ef2a615031c46171013bde2c5225ee69 ('mtd: Fix handling of mtdname in txx9ndfmc.c') introduced a potential memory leak. The 'mtdname' member of the private data structure is now allocated separately, but was not freed on certain error paths. Fix that, and make things simpler by _always_ al...
```diff diff --git a/drivers/mtd/nand/txx9ndfmc.c b/drivers/mtd/nand/txx9ndfmc.c index 5f919e63b29b..488088eff2ca 100644 --- a/drivers/mtd/nand/txx9ndfmc.c +++ b/drivers/mtd/nand/txx9ndfmc.c @@ -336,20 +336,21 @@ static int __init txx9ndfmc_probe(struct platform_device *dev) txx9_priv->cs = i; txx9_priv->mtdnam...
8437a617708d014d6f220df201a24960e00d57b1
Analyze and fix the following issue in the Linux kernel code: kvm: fix kvm reboot crash when MAXSMP is used
Problem Details: one system was found there is crash during reboot then kvm/MAXSMP Sending all processes the KILL signal... done Please stand by while rebooting the system... [ 1721.856538] md: stopping all md devices. [ 1722.852139] kvm: exiting hardware virtualization [ 1722.854601] BUG: ...
```diff diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index 4293528200b3..4d0dd390aa50 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c @@ -2301,7 +2301,7 @@ int kvm_init(void *opaque, unsigned int vcpu_size, bad_pfn = page_to_pfn(bad_page); - if (!alloc_cpumask_var(&cpus_hardware_enabled, GFP_...
23a2d1b233f535fc74f8dca66e488980b4db041b
Analyze and fix the following issue in the Linux kernel code: e1000e: Fixes possible phy corrupton on 82571 designs.
Problem Details: Phy corruption has been observed on 2-port 82571 adapters, and is root-caused to lack of synchronization between the 2 driver instances, which conflict when attempting to access the phy via the single MDIC register. A semaphore exists for this purpose, and is now used on these designs. Because PXE &/or...
```diff diff --git a/drivers/net/e1000e/82571.c b/drivers/net/e1000e/82571.c index c4b3f4fe91ae..b53b40ba88a8 100644 --- a/drivers/net/e1000e/82571.c +++ b/drivers/net/e1000e/82571.c @@ -71,6 +71,7 @@ static s32 e1000_setup_link_82571(struct e1000_hw *hw); static void e1000_clear_hw_cntrs_82571(struct e1000_hw *hw); ...
a4a710c4a7490587406462bf1d54504b7783d7d7
Analyze and fix the following issue in the Linux kernel code: pkt_sched: Change PSCHED_SHIFT from 10 to 6
Problem Details: Change PSCHED_SHIFT from 10 to 6 to increase schedulers time resolution. This will increase 16x a number of (internal) ticks per nanosecond, and is needed to improve accuracy of schedulers based on rate tables, like HTB, TBF or CBQ, with rates above 100Mbit. It is assumed this change is safe for 32bit ...
```diff diff --git a/include/net/pkt_sched.h b/include/net/pkt_sched.h index cd0e026d4f6a..120935b2abd8 100644 --- a/include/net/pkt_sched.h +++ b/include/net/pkt_sched.h @@ -41,8 +41,8 @@ static inline void *qdisc_priv(struct Qdisc *q) typedef u64 psched_time_t; typedef long psched_tdiff_t; -/* Avoid doing 64 bit ...
0c27922e4933ceb86644f4a9b1af212ffe5aad75
Analyze and fix the following issue in the Linux kernel code: net: dev_addr_init() fix
Problem Details: commit f001fde5eadd915f4858d22ed70d7040f48767cf (net: introduce a list of device addresses dev_addr_list (v6)) added one regression Vegard Nossum found in its testings. With kmemcheck help, Vegard found some uninitialized memory was read and reported to user, potentialy leaking kernel data. ( thread c...
```diff diff --git a/net/core/dev.c b/net/core/dev.c index 4913089c91dc..81b392ef5114 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -3655,8 +3655,8 @@ static int dev_addr_init(struct net_device *dev) /* rtnl_mutex must be held here */ INIT_LIST_HEAD(&dev->dev_addr_list); - memset(addr, 0, sizeof(*addr)); - ...
52ea3a56a3268bc2a5a7c75e98c81463004e38ef
Analyze and fix the following issue in the Linux kernel code: cls_cgroup: Fix oops when user send improperly 'tc filter add' request
Problem Details: I found a bug in cls_cgroup_change() in cls_cgroup.c. cls_cgroup_change() expected tca[TCA_OPTIONS] was set from user space properly, but tc in iproute2-2.6.29-1 (which I used) didn't set it. In the current source code of tc in git, it set tca[TCA_OPTIONS]. git://git.kernel.org/pub/scm/linux/kernel...
```diff diff --git a/net/sched/cls_cgroup.c b/net/sched/cls_cgroup.c index cc29b44b1500..e5becb92b3e7 100644 --- a/net/sched/cls_cgroup.c +++ b/net/sched/cls_cgroup.c @@ -167,6 +167,9 @@ static int cls_cgroup_change(struct tcf_proto *tp, unsigned long base, struct tcf_exts e; int err; + if (!tca[TCA_OPTIONS]) + ...
fdd7b4c3302c93f6833e338903ea77245eb510b4
Analyze and fix the following issue in the Linux kernel code: r8169: fix crash when large packets are received
Problem Details: Michael Tokarev reported receiving a large packet could crash a machine with RTL8169 NIC. ( original thread at http://lkml.org/lkml/2009/6/8/192 ) Problem is this driver tells that NIC frames up to 16383 bytes can be received but provides skb to rx ring allocated with smaller sizes (1536 bytes in case...
```diff diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c index 8247a945a1d9..3b19e0ce290f 100644 --- a/drivers/net/r8169.c +++ b/drivers/net/r8169.c @@ -66,7 +66,6 @@ static const int multicast_filter_limit = 32; #define RX_DMA_BURST 6 /* Maximum PCI burst, '6' is 1024 */ #define TX_DMA_BURST 6 /* Maximum PCI b...
e9a22a13c71986851e931bdfa054f68839ff8576
Analyze and fix the following issue in the Linux kernel code: amd-iommu: remove unnecessary "AMD IOMMU: " prefix
Problem Details: That prefix is already included in the DUMP_printk macro. So there is no need to repeat it in the format string. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
```diff diff --git a/arch/x86/kernel/amd_iommu.c b/arch/x86/kernel/amd_iommu.c index 772e91088e40..1c60554537c3 100644 --- a/arch/x86/kernel/amd_iommu.c +++ b/arch/x86/kernel/amd_iommu.c @@ -1266,9 +1266,8 @@ static int get_device_resources(struct device *dev, dma_dom = (*iommu)->default_dom; *domain = &dma_dom-...
71ff3bca2f70264effe8cbbdd5bc10cf6be5f2f0
Analyze and fix the following issue in the Linux kernel code: amd-iommu: detach device explicitly before attaching it to a new domain
Problem Details: This fixes a bug with a device that could not be assigned to a KVM guest because it is still assigned to a dma_ops protection domain. [chrisw: simply remove WARN_ON(), will always fire since dev->driver will be pci-sub] Signed-off-by: Chris Wright <chrisw@sous-sol.org> Signed-off-by: Joerg Roedel <jo...
```diff diff --git a/arch/x86/kernel/amd_iommu.c b/arch/x86/kernel/amd_iommu.c index 81872604eb76..772e91088e40 100644 --- a/arch/x86/kernel/amd_iommu.c +++ b/arch/x86/kernel/amd_iommu.c @@ -2073,7 +2073,7 @@ static int amd_iommu_attach_device(struct iommu_domain *dom, old_domain = domain_for_device(devid); if (o...
bcba0778ee9c5e6b76420c427e5c2cf3a21dbeba
Analyze and fix the following issue in the Linux kernel code: powerpc: Fix warning when printing a resource_size_t
Problem Details: resource_size_t is 64 bits on PowerPC 64. Gets rid of this warning: arch/powerpc/kernel/pci_64.c: In function 'pcibios_map_io_space': arch/powerpc/kernel/pci_64.c:504: warning: format '%016lx' expects type 'long unsigned int', but argument 2 has type 'resource_size_t' Signed-off-by: Stephen Rothwell...
```diff diff --git a/arch/powerpc/kernel/pci_64.c b/arch/powerpc/kernel/pci_64.c index 461c91625a80..9e8902fa14c7 100644 --- a/arch/powerpc/kernel/pci_64.c +++ b/arch/powerpc/kernel/pci_64.c @@ -506,7 +506,7 @@ int __devinit pcibios_map_io_space(struct pci_bus *bus) pr_debug("IO mapping for PHB %s\n", hose->dn->full_...
41febbc829cd3ed9af8a7dc37bc805ec027a0727
Analyze and fix the following issue in the Linux kernel code: powerpc/pseries: Fix warnings when printing resource_size_t
Problem Details: resource_size_t is 64 bits on pseries Gets rid of these warnings: arch/powerpc/platforms/pseries/iommu.c: In function 'pci_dma_bus_setup_pSeries': arch/powerpc/platforms/pseries/iommu.c:391: warning: format '%lx' expects type 'long unsigned int', but argument 2 has type 'resource_size_t' arch/powerpc...
```diff diff --git a/arch/powerpc/platforms/pseries/iommu.c b/arch/powerpc/platforms/pseries/iommu.c index 3ee01b4f4257..661c8e02bcba 100644 --- a/arch/powerpc/platforms/pseries/iommu.c +++ b/arch/powerpc/platforms/pseries/iommu.c @@ -388,7 +388,7 @@ static void pci_dma_bus_setup_pSeries(struct pci_bus *bus) while...
d3f6204a7d65030ba92bf43a278b3f3054353e0b
Analyze and fix the following issue in the Linux kernel code: powerpc: Set init_bootmem_done on NUMA platforms as well
Problem Details: For some obscure reason, we only set init_bootmem_done after initializing bootmem when NUMA isn't enabled. We even document this next to the declaration of that global in system.h which of course I didn't read before I had to debug why some WIP code wasn't working properly... This patch changes it so ...
```diff diff --git a/arch/powerpc/include/asm/system.h b/arch/powerpc/include/asm/system.h index 2b2420a49884..bb8e006a47c6 100644 --- a/arch/powerpc/include/asm/system.h +++ b/arch/powerpc/include/asm/system.h @@ -211,7 +211,7 @@ extern struct task_struct *_switch(struct thread_struct *prev, extern unsigned int rta...
b46b6942b39e577fe3ef1af928cd927864011247
Analyze and fix the following issue in the Linux kernel code: powerpc/mm: Fix a AB->BA deadlock scenario with nohash MMU context lock
Problem Details: The MMU context_lock can be taken from switch_mm() while the rq->lock is held. The rq->lock can also be taken from interrupts, thus if we get interrupted in destroy_context() with the context lock held and that interrupt tries to take the rq->lock, there's a possible deadlock scenario with another CPU ...
```diff diff --git a/arch/powerpc/mm/mmu_context_nohash.c b/arch/powerpc/mm/mmu_context_nohash.c index c42858780cbd..8343986809c0 100644 --- a/arch/powerpc/mm/mmu_context_nohash.c +++ b/arch/powerpc/mm/mmu_context_nohash.c @@ -46,7 +46,7 @@ static unsigned int next_context, nr_free_contexts; static unsigned long *cont...
3035c8634f0538a0c6946e3191bb6c9284b63798
Analyze and fix the following issue in the Linux kernel code: powerpc/mm: Fix some SMP issues with MMU context handling
Problem Details: This patch fixes a couple of issues that can happen as a result of steal_context() dropping the context_lock when all possible PIDs are ineligible for stealing (hopefully an extremely hard to hit occurence). This case exposes the possibility of a stale context_mm[] entry to be seen since destroy_conte...
```diff diff --git a/arch/powerpc/mm/mmu_context_nohash.c b/arch/powerpc/mm/mmu_context_nohash.c index 030d0005b4d2..c42858780cbd 100644 --- a/arch/powerpc/mm/mmu_context_nohash.c +++ b/arch/powerpc/mm/mmu_context_nohash.c @@ -73,7 +73,6 @@ static unsigned int steal_context_smp(unsigned int id) struct mm_struct *mm; ...
0e6e0271a210817e202c8a4bfffbde3e3c0616d1
Analyze and fix the following issue in the Linux kernel code: md/raid5: fix bug in reshape code when chunk_size decreases.
Problem Details: Now that we support changing the chunksize, we calculate "reshape_sectors" to be the max of number of sectors in old and new chunk size. However there is one please where we still use 'chunksize' rather than 'reshape_sectors'. This causes a reshape that reduces the size of chunks to freeze. Signed-off...
```diff diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c index 59f2ec0759b4..bb37fb1b2d82 100644 --- a/drivers/md/raid5.c +++ b/drivers/md/raid5.c @@ -3916,7 +3916,7 @@ static sector_t reshape_request(mddev_t *mddev, sector_t sector_nr, int *skipped raid5_compute_sector(conf, stripe_addr*(new_data_disks), ...
a8c906ca3f63d05f0d25490cf82276f73c6fe095
Analyze and fix the following issue in the Linux kernel code: md/raid5 - avoid deadlocks in get_active_stripe during reshape
Problem Details: md has functionality to 'quiesce' and array so that all pending IO completed and no new IO starts. This is used to achieve a stable state before making internal changes. Currently this quiescing applies equally to normal IO, resync IO, and reshape IO. However there is a problem with applying it to re...
```diff diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c index 75469e63ff10..59f2ec0759b4 100644 --- a/drivers/md/raid5.c +++ b/drivers/md/raid5.c @@ -362,7 +362,7 @@ static void raid5_unplug_device(struct request_queue *q); static struct stripe_head * get_active_stripe(raid5_conf_t *conf, sector_t sector, - ...
77634f33d4078542cf1087995cced0ffdae25aa2
Analyze and fix the following issue in the Linux kernel code: block: Add missing bounce_pfn stacking and fix comments
Problem Details: DM no longer needs to set limits explicitly when calling blk_stack_limits. Let the latter automatically deal with bounce_pfn scaling. Fix kerneldoc variable names. Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
```diff diff --git a/block/blk-settings.c b/block/blk-settings.c index 8d3393492891..1c4df9bf6813 100644 --- a/block/blk-settings.c +++ b/block/blk-settings.c @@ -445,7 +445,7 @@ EXPORT_SYMBOL(blk_queue_stack_limits); /** * blk_stack_limits - adjust queue_limits for stacked devices * @t: the stacking driver limits...
9df1bb9b516daeece159ab7fb262d01a0359247c
Analyze and fix the following issue in the Linux kernel code: Revert "block: Fix bounce limit setting in DM"
Problem Details: This reverts commit a05c0205ba031c01bba33a21bf0a35920eb64833. DM doesn't need to access the bounce_pfn directly. Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
```diff diff --git a/block/blk-settings.c b/block/blk-settings.c index 9acd0b7e802a..8d3393492891 100644 --- a/block/blk-settings.c +++ b/block/blk-settings.c @@ -193,23 +193,6 @@ void blk_queue_bounce_limit(struct request_queue *q, u64 dma_mask) } EXPORT_SYMBOL(blk_queue_bounce_limit); -/** - * blk_queue_bounce_pf...
3c2ab40296894d1f7ad9714550fdf9b96d4e9ee6
Analyze and fix the following issue in the Linux kernel code: cciss: factor out fix target status processing code from sendcmd functions
Problem Details: Factor out code to process target status of completed commands in sendcmd() and sendcmd_withirq_core(), and fix problem that bad target status was ignored in sendcmd_withirq_core. Signed-off-by: Stephen M. Cameron <scameron@beardog.cca.cpqcorp.net> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
```diff diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c index 885ea1e38e42..2d128831d3ca 100644 --- a/drivers/block/cciss.c +++ b/drivers/block/cciss.c @@ -2267,6 +2267,31 @@ static int fill_cmd(CommandList_struct *c, __u8 cmd, int ctlr, void *buff, return status; } +static int check_target_status(ctlr_...
1f8a6a10fb9437eac3f516ea4324a19087872f30
Analyze and fix the following issue in the Linux kernel code: ring-buffer: pass in lockdep class key for reader_lock
Problem Details: On Sun, 7 Jun 2009, Ingo Molnar wrote: > Testing tracer sched_switch: <6>Starting ring buffer hammer > PASSED > Testing tracer sysprof: PASSED > Testing tracer function: PASSED > Testing tracer irqsoff: > ============================================= > PASSED > Testing tracer preemptoff: PASSED > Testi...
```diff diff --git a/include/linux/ring_buffer.h b/include/linux/ring_buffer.h index f1345828c7c5..8670f1575fe1 100644 --- a/include/linux/ring_buffer.h +++ b/include/linux/ring_buffer.h @@ -105,7 +105,19 @@ void ring_buffer_discard_commit(struct ring_buffer *buffer, * size is in bytes for each per CPU buffer. */ ...
a35d01a5d2ac533edab94a8e3b6749ab213c91c5
Analyze and fix the following issue in the Linux kernel code: da9030_battery: Fix race between event handler and monitor
Problem Details: There are cases when charging monitor and the event handler try to change the charger state simultaneously. For instance, a charger is connected to the system, there's the detection event and the event handler tries to enable charging. It is possible that the periodic charging monitor runs at the same ...
```diff diff --git a/drivers/power/da9030_battery.c b/drivers/power/da9030_battery.c index 1662bb0f23a5..3364198134a1 100644 --- a/drivers/power/da9030_battery.c +++ b/drivers/power/da9030_battery.c @@ -22,8 +22,6 @@ #include <linux/debugfs.h> #include <linux/seq_file.h> -#define DA9030_STATUS_CHDET (1 << 3) - #de...
a20b2a44eca52818ef52a94959480b7e6ea2f528
Analyze and fix the following issue in the Linux kernel code: ide: skip probe if there are no devices on the port (v2)
Problem Details: In ide_probe_port() skip probe if ide_port_wait_ready() returns -ENODEV and print error message instead of debug one if it returns -EBUSY. v2: Fix the default 'rc' value. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
```diff diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c index 28f95cb41c29..f9c2fb7d0005 100644 --- a/drivers/ide/ide-probe.c +++ b/drivers/ide/ide-probe.c @@ -702,8 +702,14 @@ static int ide_probe_port(ide_hwif_t *hwif) if (irqd) disable_irq(hwif->irq); - if (ide_port_wait_ready(hwif) == -EBUSY) ...
9d01e4cd7eb4a70b04cf5a5b4f79c99e8e3e3edc
Analyze and fix the following issue in the Linux kernel code: ide-tape: fix proc warning
Problem Details: ide_tape_chrdev_get() was missing an ide_device_get() refcount increment which lead to the following warning: [ 278.147906] ------------[ cut here ]------------ [ 278.152685] WARNING: at fs/proc/generic.c:847 remove_proc_entry+0x199/0x1b8() [ 278.160070] Hardware name: P4I45PE 1.00 [ 278.160076...
```diff diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c index 055f52e1ea0e..51ea59e3f6ad 100644 --- a/drivers/ide/ide-tape.c +++ b/drivers/ide/ide-tape.c @@ -240,18 +240,27 @@ static struct class *idetape_sysfs_class; static void ide_tape_release(struct device *); -static struct ide_tape_obj *ide_tape...
59e0b8b088031b3b751f0608f797f2581f49a827
Analyze and fix the following issue in the Linux kernel code: [SCSI] qla2xxx: Correct NULL pointer bug in cpu affinity mode.
Problem Details: This patch fixes a NULL pointer bug that occurs when IO is being carried out on a vport for which the cpu affinity mode is turned on. Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
```diff diff --git a/drivers/scsi/qla2xxx/qla_attr.c b/drivers/scsi/qla2xxx/qla_attr.c index 2bd017ffb084..74e69703ef98 100644 --- a/drivers/scsi/qla2xxx/qla_attr.c +++ b/drivers/scsi/qla2xxx/qla_attr.c @@ -1595,6 +1595,7 @@ qla24xx_vport_create(struct fc_vport *fc_vport, bool disable) struct qla_hw_data *ha = base_v...
40859ae5f13534624cc35a05179b4f93ecbf531a
Analyze and fix the following issue in the Linux kernel code: [SCSI] qla2xxx: Correct queue-creation bug when driver loaded in QoS mode.
Problem Details: Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com> Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
```diff diff --git a/drivers/scsi/qla2xxx/qla_attr.c b/drivers/scsi/qla2xxx/qla_attr.c index 9aa00f25aa6a..2bd017ffb084 100644 --- a/drivers/scsi/qla2xxx/qla_attr.c +++ b/drivers/scsi/qla2xxx/qla_attr.c @@ -1651,13 +1651,13 @@ qla24xx_vport_create(struct fc_vport *fc_vport, bool disable) qla24xx_vport_disable(fc_vpor...
1b91a2e6712393cffc33eeff5cf857f7d5b62fed
Analyze and fix the following issue in the Linux kernel code: [SCSI] qla2xxx: Correct logic-bug in set-model-info().
Problem Details: Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
```diff diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c index 33e924810666..a7abc1035481 100644 --- a/drivers/scsi/qla2xxx/qla_init.c +++ b/drivers/scsi/qla2xxx/qla_init.c @@ -1538,7 +1538,7 @@ qla2x00_set_model_info(scsi_qla_host_t *vha, uint8_t *model, size_t len, char *st, *en; uin...
3af968e066d593bc4dacc021715f3e95ddf0996f
Analyze and fix the following issue in the Linux kernel code: async: Fix lack of boot-time console due to insufficient synchronization
Problem Details: Our async work synchronization was broken by "async: make sure independent async domains can't accidentally entangle" (commit d5a877e8dd409d8c702986d06485c374b705d340), because it would report the wrong lowest active async ID when there was both running and pending async work. This caused things like ...
```diff diff --git a/kernel/async.c b/kernel/async.c index 50540301ed0f..27235f5de198 100644 --- a/kernel/async.c +++ b/kernel/async.c @@ -92,23 +92,18 @@ extern int initcall_debug; static async_cookie_t __lowest_in_progress(struct list_head *running) { struct async_entry *entry; - async_cookie_t ret = next_cookie...
5f48f70ecef25df93e122985272ff647f5653836
Analyze and fix the following issue in the Linux kernel code: [SCSI] libfcoe: fip: fix non-FIP-mode FLOGI state after reset.
Problem Details: When a reset is sent using fcoeadm on a non-FIP mode NIC, there's no link flap, so the fcoe_ctlr stays in non-FIP mode. In that case, FIP wasn't setting the flogi_oxid or map_dest flag, causing the FLOGI to be sent with the both wrong source MAC and the wrong destination MAC address, causing it to fai...
```diff diff --git a/drivers/scsi/fcoe/libfcoe.c b/drivers/scsi/fcoe/libfcoe.c index 62ba0f39c6bd..a7ecafb9a507 100644 --- a/drivers/scsi/fcoe/libfcoe.c +++ b/drivers/scsi/fcoe/libfcoe.c @@ -447,14 +447,10 @@ int fcoe_ctlr_els_send(struct fcoe_ctlr *fip, struct sk_buff *skb) u16 old_xid; u8 op; - if (fip->state =...
6d29cc56bead73b6f386cf43333708579deb5eed
Analyze and fix the following issue in the Linux kernel code: [SCSI] ibmvfc: Improve LOGO/PRLO ELS handling
Problem Details: There are several scenarios where the ibmvfc driver needs to try to log back into a target on the fabric. Today when these events occur, we simply go through re-discovery for all attached targets, assuming that either the query of the name server or an ADISC will indicate we might need to log back into...
```diff diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers/scsi/ibmvscsi/ibmvfc.c index da233256e9aa..b4b805e8d7db 100644 --- a/drivers/scsi/ibmvscsi/ibmvfc.c +++ b/drivers/scsi/ibmvscsi/ibmvfc.c @@ -1484,6 +1484,27 @@ static void ibmvfc_log_error(struct ibmvfc_event *evt) rsp->flags, rsp_code, scsi_get_resid...
43c8da907ccc656935d1085701f4db83385d8a59
Analyze and fix the following issue in the Linux kernel code: [SCSI] ibmvfc: Fix deadlock in EH
Problem Details: Fixes the following deadlock scenario shown below. We currently allow queuecommand to send commands when the ibmvfc workqueue is scanning for new rports, so we should also allow EH to function at this time as well. scsi_eh_3 D 0000000000000000 12304 1279 2 Call Trace: [c0000002f7257730] [c00...
```diff diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers/scsi/ibmvscsi/ibmvfc.c index 182c8e75aaf0..76ae266b07c4 100644 --- a/drivers/scsi/ibmvscsi/ibmvfc.c +++ b/drivers/scsi/ibmvscsi/ibmvfc.c @@ -431,6 +431,8 @@ static void ibmvfc_set_tgt_action(struct ibmvfc_target *tgt, case IBMVFC_TGT_ACTION_DEL_RPORT: b...
4a2837d4fcaf8a2c2ad61523287073d0c14b9ed0
Analyze and fix the following issue in the Linux kernel code: [SCSI] ibmvfc: Fix invalid error response handling
Problem Details: Fix an obvious bug in processing error responses for SCSI commands which can result in successful responses being incorrectly returned with DID_ERROR. Signed-off-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
```diff diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers/scsi/ibmvscsi/ibmvfc.c index ea4abee7a2a9..879c51133c95 100644 --- a/drivers/scsi/ibmvscsi/ibmvfc.c +++ b/drivers/scsi/ibmvscsi/ibmvfc.c @@ -275,7 +275,7 @@ static int ibmvfc_get_err_result(struct ibmvfc_cmd *vfc_cmd) int fc_rsp_len = rsp->fcp_rsp_len; ...
601e7638254c118fca135af9b1a9f35061420f62
Analyze and fix the following issue in the Linux kernel code: [SCSI] sd: fix bug in SCSI async probing
Problem Details: The async split up of probing in sd.c created a potential failure case where something goes wrong with device_add(), but which we don't recover properly. Since, in general, asynchronous error handling is hard, move the device_add() into the asynchronous path (it should be fast) and make sure all the de...
```diff diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index 84044233b637..d8e1d15101b7 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c @@ -1902,24 +1902,6 @@ static void sd_probe_async(void *data, async_cookie_t cookie) index = sdkp->index; dev = &sdp->sdev_gendev; - if (!sdp->request_queue->rq_timeou...
91bc31fb3bae4e55832c7c39d4f9c193285e6ab2
Analyze and fix the following issue in the Linux kernel code: [SCSI] fix up scsi_eh_lock_door()
Problem Details: The Documentation is incorrect (we removed some functions referred to), and none of the bug warnings now apply. Additionally remove the spurious check on the return from blk_get_request() which can't fail if __GFP_WAIT is passed in. Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.co...
```diff diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c index a95d2bac0780..a1689353d7fd 100644 --- a/drivers/scsi/scsi_error.c +++ b/drivers/scsi/scsi_error.c @@ -1451,28 +1451,21 @@ static void eh_lock_door_done(struct request *req, int uptodate) * @sdev: SCSI device to prevent medium removal *...
477e608c03eb2f561a23994bee38a32a9fd3357d
Analyze and fix the following issue in the Linux kernel code: [SCSI] fix documentation for two functions
Problem Details: Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
```diff diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c index 166417a6afba..2de5f3ad640b 100644 --- a/drivers/scsi/scsi.c +++ b/drivers/scsi/scsi.c @@ -1225,8 +1225,8 @@ EXPORT_SYMBOL(__scsi_device_lookup_by_target); * @starget: SCSI target pointer * @lun: SCSI Logical Unit Number * - * Description: Looks ...
c9690998ef48ffefeccb91c70a7739eebdea57f9
Analyze and fix the following issue in the Linux kernel code: x86: memtest: remove 64-bit division
Problem Details: Using gcc 3.3.5 a "make allmodconfig" + "CONFIG_KVM=n" triggers a build error: arch/x86/mm/built-in.o(.init.text+0x43f7): In function `__change_page_attr': arch/x86/mm/pageattr.c:114: undefined reference to `__udivdi3' make: *** [.tmp_vmlinux1] Error 1 The culprit turned out to be a division in ar...
```diff diff --git a/arch/x86/mm/memtest.c b/arch/x86/mm/memtest.c index 605c8be06217..c0bedcd10f97 100644 --- a/arch/x86/mm/memtest.c +++ b/arch/x86/mm/memtest.c @@ -40,23 +40,23 @@ static void __init reserve_bad_mem(u64 pattern, u64 start_bad, u64 end_bad) static void __init memtest(u64 pattern, u64 start_phys, u6...
92a43793a908f395dc687e6c5fc90d63f999d6d5
Analyze and fix the following issue in the Linux kernel code: ALSA: usb - Add boot quirk for C-Media 6206 USB Audio
Problem Details: Added boot quirk for C-Media CM6206 device in snd_usb_audio_probe. The function snd_usb_cm6206_boot_quirk sets up six internal 16-bit registers in order to initialize the device. Values for the registers came from sniffing USB traffic under Windows since only four of the six are documented in the datas...
```diff diff --git a/sound/usb/usbaudio.c b/sound/usb/usbaudio.c index a6b88482637b..e87121751dd0 100644 --- a/sound/usb/usbaudio.c +++ b/sound/usb/usbaudio.c @@ -3279,6 +3279,25 @@ static int snd_usb_cm106_boot_quirk(struct usb_device *dev) return snd_usb_cm106_write_int_reg(dev, 2, 0x8004); } +/* + * C-Media CM6...
a88656553d18c324554855fccc730c9644048111
Analyze and fix the following issue in the Linux kernel code: [ARM] orion: convert gpio to use gpiolib
Problem Details: Signed-off-by: Erik Benada <erikbenada@yahoo.ca> [ nico: fix locking, additional cleanups ] Signed-off-by: Nicolas Pitre <nico@marvell.com>
```diff diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 9d02cdb15b23..c6225ead7bff 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -398,6 +398,7 @@ config ARCH_KIRKWOOD select CPU_FEROCEON select PCI select GENERIC_GPIO + select ARCH_REQUIRE_GPIOLIB select GENERIC_TIME select GENERIC_CLOCKEVENT...
f14081e109e7074be3052f5410641161b6479abb
Analyze and fix the following issue in the Linux kernel code: [ARM] Kirkwood: comment type fix
Problem Details: Signed-off-by: Nicolas Pitre <nico@marvell.com>
```diff diff --git a/arch/arm/mach-kirkwood/sheevaplug-setup.c b/arch/arm/mach-kirkwood/sheevaplug-setup.c index 831e4a56cae1..dcc448c98389 100644 --- a/arch/arm/mach-kirkwood/sheevaplug-setup.c +++ b/arch/arm/mach-kirkwood/sheevaplug-setup.c @@ -71,7 +71,7 @@ static struct mv643xx_eth_platform_data sheevaplug_ge00_dat...
c4ed3f04ba9defe22aa729d1646f970f791c03d7
Analyze and fix the following issue in the Linux kernel code: x86, UV: Fix macros for multiple coherency domains
Problem Details: Fix bug in the SGI UV macros that support systems with multiple coherency domains. The macros used for referencing global MMR (chipset registers) are failing to correctly "or" the NASID (node identifier) bits that reside above M+N. These high bits are supplied automatically by the chipset for memory a...
```diff diff --git a/arch/x86/include/asm/uv/uv_hub.h b/arch/x86/include/asm/uv/uv_hub.h index d3a98ea1062e..341070f7ad5c 100644 --- a/arch/x86/include/asm/uv/uv_hub.h +++ b/arch/x86/include/asm/uv/uv_hub.h @@ -133,6 +133,7 @@ struct uv_scir_s { struct uv_hub_info_s { unsigned long global_mmr_base; unsigned long ...
9aee2286071c23c535fe9928eec1a26e0bcf256d
Analyze and fix the following issue in the Linux kernel code: ext4: fix dx_map_entry to support 256k directory blocks
Problem Details: The dx_map_entry structure doesn't support over 64KB block size by current usage of its member("offs"). Because "offs" treats an offset of copies of the ext4_dir_entry_2 structure as is. This member size is 16 bits. But real offset for over 64KB(256KB) block size needs 18 bits. However, real offset kee...
```diff diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c index f2bc160463b7..07eb6649e4fa 100644 --- a/fs/ext4/namei.c +++ b/fs/ext4/namei.c @@ -749,7 +749,7 @@ static int dx_make_map(struct ext4_dir_entry_2 *de, unsigned blocksize, ext4fs_dirhash(de->name, de->name_len, &h); map_tail--; map_tail->hash = h.ha...
09521d2e3edd0bf02b66e5b8c13f1559f2d6958a
Analyze and fix the following issue in the Linux kernel code: ALSA: ctxfi - Fix wrong model id for UAA
Problem Details: CTUAA should be checked instead of CTHENDRIX. The latter is for 20k2 chip. Also, fixed the detection of UAA/HENDRIX models by fixing the mask bits. Signed-off-by: Takashi Iwai <tiwai@suse.de>
```diff diff --git a/sound/pci/ctxfi/ctatc.c b/sound/pci/ctxfi/ctatc.c index 002a70e0b13a..4e25b24848bd 100644 --- a/sound/pci/ctxfi/ctatc.c +++ b/sound/pci/ctxfi/ctatc.c @@ -44,8 +44,8 @@ static struct snd_pci_quirk __devinitdata subsys_20k1_list[] = { SND_PCI_QUIRK(PCI_VENDOR_ID_CREATIVE, 0x002f, "SB055x", CTSB055X...
21e9a0a5fbd2b7cb3ae29f6d491a30bc0e688422
Analyze and fix the following issue in the Linux kernel code: [SCSI] lpfc 8.3.2 : Persistent Vport Support
Problem Details: Add support for persistent vport definitions at creation at boot time Also includes a few misc fixes for: - conversion to vpi name from vport slang name - couple of small mailbox references - some additional discovery mods Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Botto...
```diff diff --git a/drivers/scsi/lpfc/lpfc_attr.c b/drivers/scsi/lpfc/lpfc_attr.c index 46e032aa0bea..d73e677201f8 100644 --- a/drivers/scsi/lpfc/lpfc_attr.c +++ b/drivers/scsi/lpfc/lpfc_attr.c @@ -2277,6 +2277,36 @@ lpfc_param_init(topology, 0, 0, 6) static DEVICE_ATTR(lpfc_topology, S_IRUGO | S_IWUSR, lpfc_topol...
f4b4c68f74dcd5da03df851090cad28ad4e8d7cc
Analyze and fix the following issue in the Linux kernel code: [SCSI] lpfc 8.3.2 : Miscellaneous Changes
Problem Details: Miscellaneous Changes: - Convert from SLI2_ACTIVE flag to more correct SLI_ACTIVE (generic) flag - Reposition log verbose messaging definitions - Update naming for vpi object name from vport slang name - Handle deferred error attention condition - Add 10G link support - Small bug fixup Signed-off-by: ...
```diff diff --git a/drivers/scsi/lpfc/lpfc_attr.c b/drivers/scsi/lpfc/lpfc_attr.c index f032d8b7bb4b..46e032aa0bea 100644 --- a/drivers/scsi/lpfc/lpfc_attr.c +++ b/drivers/scsi/lpfc/lpfc_attr.c @@ -805,7 +805,7 @@ lpfc_get_hba_info(struct lpfc_hba *phba, */ if (phba->link_state < LPFC_LINK_DOWN || !phba->mb...
5284c6b99ea017f73c09b50f34a637ff9d5d26a0
Analyze and fix the following issue in the Linux kernel code: pata_netcell: Fix typo
Problem Details: The previous patch submission had a I typo I didn't catch but Bartlomiej noted. Guess this proves the point about any patch being risky late in an rc Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/drivers/ata/pata_netcell.c b/drivers/ata/pata_netcell.c index 9a698097134b..f0d52f72f5bb 100644 --- a/drivers/ata/pata_netcell.c +++ b/drivers/ata/pata_netcell.c @@ -26,7 +26,7 @@ static unsigned int netcell_read_id(struct ata_device *adev, unsigned int err_mask = ata_do_dev_read_id(adev, tf, id)...
5636919b5c909fee54a6ef5226475ecae012ad02
Analyze and fix the following issue in the Linux kernel code: MIPS: Outline udelay and fix a few issues.
Problem Details: Outlining fixes the issue were on certain CPUs such as the R10000 family the delay loop would need an extra cycle if it overlaps a cacheline boundary. The rewrite also fixes build errors with GCC 4.4 which was changed in way incompatible with the kernel's inline assembly. Relying on pure C for comput...
```diff diff --git a/arch/mips/include/asm/cpu-info.h b/arch/mips/include/asm/cpu-info.h index 744cd8fb107f..126044308dec 100644 --- a/arch/mips/include/asm/cpu-info.h +++ b/arch/mips/include/asm/cpu-info.h @@ -39,8 +39,8 @@ struct cache_desc { #define MIPS_CACHE_PINDEX 0x00000020 /* Physically indexed cache */ str...
3a553147eaad5d4de90ab1f695aa13ddbea684ec
Analyze and fix the following issue in the Linux kernel code: MIPS: ioctl.h: Fix headers_check warnings
Problem Details: Make ioctl.h compatible with asm-generic/ioctl.h and userspace fix the following 'make headers_check' warning: usr/include/asm-mips/ioctl.h:64: extern's make no sense in userspace Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
```diff diff --git a/arch/mips/include/asm/ioctl.h b/arch/mips/include/asm/ioctl.h index 85067e248a83..916163401b2c 100644 --- a/arch/mips/include/asm/ioctl.h +++ b/arch/mips/include/asm/ioctl.h @@ -60,12 +60,16 @@ ((nr) << _IOC_NRSHIFT) | \ ((size) << _IOC_SIZESHIFT)) +#ifdef __KERNEL__ /* provoke compile e...
11eeef41d5f63c7d2f7fdfcc733eb7fb137cc384
Analyze and fix the following issue in the Linux kernel code: netfilter: passive OS fingerprint xtables match
Problem Details: Passive OS fingerprinting netfilter module allows to passively detect remote OS and perform various netfilter actions based on that knowledge. This module compares some data (WS, MSS, options and it's order, ttl, df and others) from packets with SYN bit set with dynamically loaded OS fingerprints. Fin...
```diff diff --git a/include/linux/netfilter/Kbuild b/include/linux/netfilter/Kbuild index af9d2fb97212..2aea50399c0b 100644 --- a/include/linux/netfilter/Kbuild +++ b/include/linux/netfilter/Kbuild @@ -33,6 +33,7 @@ header-y += xt_limit.h header-y += xt_mac.h header-y += xt_mark.h header-y += xt_multiport.h +header...
f03ecf50534a81b06544c58a713076d59d54baf9
Analyze and fix the following issue in the Linux kernel code: ALSA: hda - Fix the previous tagra-8ch patch
Problem Details: - Fix a typo in the patch - Adapted to follow the recent change for unsol event handling Signed-off-by: Takashi Iwai <tiwai@suse.de>
```diff diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index cfe4808c3a4c..337d2a59c67e 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -7726,7 +7726,7 @@ static struct hda_channel_mode alc883_3ST_6ch_modes[3] = { * 2ch mode */ static struct hda_verb al...
64a8be74357477558183b43156c5536b642de134
Analyze and fix the following issue in the Linux kernel code: ALSA: hda - Add 7.1 support for MSI GX620
Problem Details: Added 7.1 support for MSI GX620 and jack quirk. Reference: kernel bug#13430 http://bugzilla.kernel.org/show_bug.cgi?id=13430 Signed-off-by: David Heidelberger <d.okias@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
```diff diff --git a/Documentation/sound/alsa/HD-Audio-Models.txt b/Documentation/sound/alsa/HD-Audio-Models.txt index 54b08053d029..de8e10a94103 100644 --- a/Documentation/sound/alsa/HD-Audio-Models.txt +++ b/Documentation/sound/alsa/HD-Audio-Models.txt @@ -143,7 +143,8 @@ ALC883/888 medion Medion Laptops medion...
c00701101b82f2bc61dfc259748ec6e5288af6a9
Analyze and fix the following issue in the Linux kernel code: ALSA: pcm - A helper function to compose PCM stream name for debug prints
Problem Details: Use a common helper function for the PCM stream name displayed in XRUN and buffer-pointer debug prints. Signed-off-by: Takashi Iwai <tiwai@suse.de>
```diff diff --git a/sound/core/pcm_lib.c b/sound/core/pcm_lib.c index adb306fd5525..2288fa07bf59 100644 --- a/sound/core/pcm_lib.c +++ b/sound/core/pcm_lib.c @@ -136,6 +136,16 @@ void snd_pcm_playback_silence(struct snd_pcm_substream *substream, snd_pcm_ufram dump_stack(); \ } while (0) +static void pcm_debu...
efd13be09e2db4ac4efa2c6101c4f50ee1ead4b0
Analyze and fix the following issue in the Linux kernel code: ASoC: Minor fixes to DaVinci I2S probe function
Problem Details: Assign proper errors when platform resource claims fail. Signed-off-by: Chaithrika U S <chaithrika@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
```diff diff --git a/sound/soc/davinci/davinci-i2s.c b/sound/soc/davinci/davinci-i2s.c index 500d2f574186..2f11970e6406 100644 --- a/sound/soc/davinci/davinci-i2s.c +++ b/sound/soc/davinci/davinci-i2s.c @@ -469,7 +469,7 @@ static int davinci_i2s_probe(struct platform_device *pdev) struct snd_platform_data *pdata = pd...
0bf841281e58d0b3cc9fe9dc4383df7694bde6bd
Analyze and fix the following issue in the Linux kernel code: dma-debug: simplify logic in driver_filter()
Problem Details: This patch makes the driver_filter function more readable by reorganizing the code. The removal of a code code block to an upper indentation level makes hard-to-read line-wraps unnecessary. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
```diff diff --git a/lib/dma-debug.c b/lib/dma-debug.c index 27b369da52c0..ad65fc0317d9 100644 --- a/lib/dma-debug.c +++ b/lib/dma-debug.c @@ -147,6 +147,10 @@ static inline void dump_entry_trace(struct dma_debug_entry *entry) static bool driver_filter(struct device *dev) { + struct device_driver *drv; + unsigned l...
806d31d73843a018cb239fc16ba53d82f4d8dc33
Analyze and fix the following issue in the Linux kernel code: ALSA: emu10k1 - Fix minimum periods for efx playback
Problem Details: EFX playback stream should have periods_min = 2 to avoid the buffer position overflow (due to restrictions of the pcm-indirect helper). Signed-off-by: Takashi Iwai <tiwai@suse.de>
```diff diff --git a/sound/pci/emu10k1/emupcm.c b/sound/pci/emu10k1/emupcm.c index 78f62fd404c2..55b83ef73c63 100644 --- a/sound/pci/emu10k1/emupcm.c +++ b/sound/pci/emu10k1/emupcm.c @@ -1736,7 +1736,7 @@ static struct snd_pcm_hardware snd_emu10k1_fx8010_playback = .buffer_bytes_max = (128*1024), .period_bytes_min ...
be81c6ea23b8b471141734ef4bc005f5127aaf43
Analyze and fix the following issue in the Linux kernel code: dma-debug: disable/enable irqs only once in device_dma_allocations
Problem Details: There is no need to disable/enable irqs on each loop iteration. Just disable irqs for the whole time the loop runs. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
```diff diff --git a/lib/dma-debug.c b/lib/dma-debug.c index 24c4a2c5d61c..27b369da52c0 100644 --- a/lib/dma-debug.c +++ b/lib/dma-debug.c @@ -649,15 +649,19 @@ static int device_dma_allocations(struct device *dev) unsigned long flags; int count = 0, i; + local_irq_save(flags); + for (i = 0; i < HASH_SIZE; ++i)...
e7ed70eedccc78e79ce6da2155e9caf90aff4003
Analyze and fix the following issue in the Linux kernel code: dma-debug: use pr_* instead of printk(KERN_* ...)
Problem Details: The pr_* macros are shorter than the old printk(KERN_ ...) variant. Change the dma-debug code to use the new macros and save a few unnecessary line breaks. If lines don't break the source code can also be grepped more easily. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
```diff diff --git a/lib/dma-debug.c b/lib/dma-debug.c index 9561825c14a4..24c4a2c5d61c 100644 --- a/lib/dma-debug.c +++ b/lib/dma-debug.c @@ -139,7 +139,7 @@ static inline void dump_entry_trace(struct dma_debug_entry *entry) { #ifdef CONFIG_STACKTRACE if (entry) { - printk(KERN_WARNING "Mapped at:\n"); + pr_warn...
075fe1028699f6a280545dfc2cfc5ac82d555c8c
Analyze and fix the following issue in the Linux kernel code: xfs: split xfs_sync_inodes
Problem Details: xfs_sync_inodes is used to write back either file data or inode metadata. In general we always do these separately, except for one fishy case in xfs_fs_put_super that does both. So separate xfs_sync_inodes into separate xfs_sync_data and xfs_sync_attr functions. In xfs_fs_put_super we first call the ...
```diff diff --git a/fs/xfs/linux-2.6/xfs_quotaops.c b/fs/xfs/linux-2.6/xfs_quotaops.c index 94d9a633d3d9..cb6e2cca214f 100644 --- a/fs/xfs/linux-2.6/xfs_quotaops.c +++ b/fs/xfs/linux-2.6/xfs_quotaops.c @@ -50,9 +50,11 @@ xfs_fs_quota_sync( { struct xfs_mount *mp = XFS_M(sb); + if (sb->s_flags & MS_RDONLY) + retu...
d362af62ed98f58c64a2b3dd58c79d25ad181b0b
Analyze and fix the following issue in the Linux kernel code: ALSA: ctxfi - Fix / clean up hw20k2 chip code
Problem Details: - Clean up Hungarian coding style - Don't use static variables for I2C information; this unables to use multiple instances. Now they are stored in struct hw20k2 fields. Signed-off-by: Takashi Iwai <tiwai@suse.de>
```diff diff --git a/sound/pci/ctxfi/cthw20k2.c b/sound/pci/ctxfi/cthw20k2.c index 7d6dcbaf5244..4493a51c6b01 100644 --- a/sound/pci/ctxfi/cthw20k2.c +++ b/sound/pci/ctxfi/cthw20k2.c @@ -15,8 +15,6 @@ * */ -#include "cthw20k2.h" -#include "ct20k2reg.h" #include <linux/types.h> #include <linux/slab.h> #include ...
c17e2cf7376a2010b8b114fdeebd4e340a5e9cb2
Analyze and fix the following issue in the Linux kernel code: dma-debug: code style fixes
Problem Details: This patch changes the recent updates to dma-debug to conform with coding style guidelines of Linux and the -tip tree. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
```diff diff --git a/lib/dma-debug.c b/lib/dma-debug.c index b8a61ff08544..9561825c14a4 100644 --- a/lib/dma-debug.c +++ b/lib/dma-debug.c @@ -501,8 +501,8 @@ out_err: static ssize_t filter_read(struct file *file, char __user *user_buf, size_t count, loff_t *ppos) { - unsigned long flags; char buf[NAME_MAX_L...
af8500bbbd18438495d2f91ad07bda49fff3b770
Analyze and fix the following issue in the Linux kernel code: ALSA: ctxfi - Fix possible buffer pointer overrun
Problem Details: Fix possible buffer pointer overruns. Back to zero when it's equal or over the buffer size. Signed-off-by: Takashi Iwai <tiwai@suse.de>
```diff diff --git a/sound/pci/ctxfi/ctpcm.c b/sound/pci/ctxfi/ctpcm.c index a0bd31c6090d..870fa170f046 100644 --- a/sound/pci/ctxfi/ctpcm.c +++ b/sound/pci/ctxfi/ctpcm.c @@ -243,6 +243,8 @@ ct_pcm_playback_pointer(struct snd_pcm_substream *substream) /* Read out playback position */ position = atc->pcm_playback_po...
312325094785566a0e42a88c1bf6e7eb54c5d70e
Analyze and fix the following issue in the Linux kernel code: dma-debug: comment style fixes
Problem Details: Last patch series introduced some new comment which does not fit the Kernel comment style guidelines. Fix it with this patch. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
```diff diff --git a/lib/dma-debug.c b/lib/dma-debug.c index 77053d9ef513..b8a61ff08544 100644 --- a/lib/dma-debug.c +++ b/lib/dma-debug.c @@ -542,7 +542,8 @@ static ssize_t filter_write(struct file *file, const char __user *userbuf, write_lock_irqsave(&driver_name_lock, flags); - /* Now handle the string we got ...
4836ac655410e7f126d316b0be062b38746f7529
Analyze and fix the following issue in the Linux kernel code: ALSA: ctxfi - Fix DMA mask for emu20k2 chip
Problem Details: Allow 64bit DMA mask for emu20k2 chip, too. Signed-off-by: Takashi Iwai <tiwai@suse.de>
```diff diff --git a/sound/pci/ctxfi/cthw20k2.c b/sound/pci/ctxfi/cthw20k2.c index 041199fbae16..edbfb4827469 100644 --- a/sound/pci/ctxfi/cthw20k2.c +++ b/sound/pci/ctxfi/cthw20k2.c @@ -26,7 +26,11 @@ #include <linux/interrupt.h> #include <linux/delay.h> -#define CT_XFI_DMA_MASK DMA_BIT_MASK(32) /* 32 bits */ +#i...
af05b30bcb65da3ed488af54ee92e96bebe0be5e
Analyze and fix the following issue in the Linux kernel code: Bluetooth: Fix errors and warnings in L2CAP reported by checkpatch.pl
Problem Details: This patch fixes the errors without changing the l2cap.o binary: text data bss dec hex filename 18059 568 0 18627 48c3 l2cap.o.after 18059 568 0 18627 48c3 l2cap.o.before Signed-off-by: Gustavo F. Padovan <gustavo@las.ic.unicamp.br> Signed-off-by: Marcel ...
```diff diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c index 77e6715d7898..f6a82f203fd2 100644 --- a/net/bluetooth/l2cap.c +++ b/net/bluetooth/l2cap.c @@ -40,10 +40,10 @@ #include <linux/skbuff.h> #include <linux/list.h> #include <linux/device.h> +#include <linux/uaccess.h> #include <net/sock.h> #inc...
a4536b19df92adda215f6fc225b52dc4cee4cf83
Analyze and fix the following issue in the Linux kernel code: [MTD] [NAND] S3C2410: Added a kerneldoc for s3c2410_nand_set
Problem Details: Converted the old comnent to kerneldoc. Signed-off-by: Michel Pollet <buserror@gmail.com> [ben-linux@fluff.org: updated subject, spello fix] Signed-off-by: Ben Dooks <ben-linux@fluff.org>
```diff diff --git a/arch/arm/plat-s3c/include/plat/nand.h b/arch/arm/plat-s3c/include/plat/nand.h index 985546750c6d..935651664969 100644 --- a/arch/arm/plat-s3c/include/plat/nand.h +++ b/arch/arm/plat-s3c/include/plat/nand.h @@ -10,17 +10,19 @@ * published by the Free Software Foundation. */ -/* struct s3c2410_n...
c4865679df5453d1bc94c534f4d94a364c0546df
Analyze and fix the following issue in the Linux kernel code: ALSA: ca0106 - Fix master volume scale
Problem Details: The master volume dB scale was wrongly defined as 0.50dB setp while it must be 0.25dB step. Signed-off-by: Takashi Iwai <tiwai@suse.de>
```diff diff --git a/sound/pci/ca0106/ca0106_mixer.c b/sound/pci/ca0106/ca0106_mixer.c index 7724252c1ec5..c8c6f437f5b3 100644 --- a/sound/pci/ca0106/ca0106_mixer.c +++ b/sound/pci/ca0106/ca0106_mixer.c @@ -739,7 +739,7 @@ static int __devinit rename_ctl(struct snd_card *card, const char *src, const ch } while (0) ...
9c259a52fa6ab46841a6094434cd0d752e854180
Analyze and fix the following issue in the Linux kernel code: UBI: improve messages in the WL worker
Problem Details: Print not only the PEB number, but also the LEB number and volume id, which is very useful for bug hunting. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
```diff diff --git a/drivers/mtd/ubi/wl.c b/drivers/mtd/ubi/wl.c index 9d1d3595a240..784681e42360 100644 --- a/drivers/mtd/ubi/wl.c +++ b/drivers/mtd/ubi/wl.c @@ -656,6 +656,7 @@ static int wear_leveling_worker(struct ubi_device *ubi, struct ubi_work *wrk, int cancel) { int err, scrubbing = 0, torture = 0, prot...
963267bc5d4de4a0da104a64300375d186575332
Analyze and fix the following issue in the Linux kernel code: declance: Restore tx descriptor ring locking
Problem Details: A driver overhaul on 29 Feb 2000 (!) broke locking around fiddling with the tx descriptor ring in start_xmit(); a follow-on "fix" removed the broken remnants altogether. Here's a patch to restore proper locking in the function -- the complement in the interrupt handler has been correct all the tim...
```diff diff --git a/drivers/net/declance.c b/drivers/net/declance.c index b62405a69180..2b22e580c4de 100644 --- a/drivers/net/declance.c +++ b/drivers/net/declance.c @@ -895,6 +895,7 @@ static int lance_start_xmit(struct sk_buff *skb, struct net_device *dev) struct lance_private *lp = netdev_priv(dev); volatile st...
a4c0364be3f43d3e17fe19270f8b3d64881606e6
Analyze and fix the following issue in the Linux kernel code: KVM: Explicity initialize cpus_hardware_enabled
Problem Details: Under CONFIG_MAXSMP, cpus_hardware_enabled is allocated from the heap and not statically initialized. This causes a crash on reboot when kvm thinks vmx is enabled on random nonexistent cpus and accesses nonexistent percpu lists. Fix by explicitly clearing the variable. Cc: stable@kernel.org Reported...
```diff diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index 1ecbe2391c8b..4293528200b3 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c @@ -2305,6 +2305,7 @@ int kvm_init(void *opaque, unsigned int vcpu_size, r = -ENOMEM; goto out_free_0; } + cpumask_clear(cpus_hardware_enabled); r = kvm_...
7d31acda9f8eaa27e2fd232712f7e1f3e9a79bdb
Analyze and fix the following issue in the Linux kernel code: isdn: prevent NULL ptr Oops in capi_cmsg2str()
Problem Details: The dereferencing of the private pointer cmsg->m in capi_cmsg2str() may cause an Oops in case of an error, which is particularly inconvenient as that function is typically used to format an error message. Add a NULL pointer check to avoid this. Impact: error handling improvement Signed-off-by: Tilman ...
```diff diff --git a/drivers/isdn/capi/capiutil.c b/drivers/isdn/capi/capiutil.c index c7c29022a23a..16f2e465e5f9 100644 --- a/drivers/isdn/capi/capiutil.c +++ b/drivers/isdn/capi/capiutil.c @@ -989,6 +989,8 @@ _cdebbuf *capi_cmsg2str(_cmsg * cmsg) { _cdebbuf *cdb; + if (!cmsg->m) + return NULL; /* no message */ ...
f0a4d0e5b5bfd271e6737f7c095994835b70d450
Analyze and fix the following issue in the Linux kernel code: tun: Fix unregister race
Problem Details: It is possible for tun_chr_close to race with dellink on the a tun device. In which case if __tun_get runs before dellink but dellink runs before tun_chr_close calls unregister_netdevice we will attempt to unregister the netdevice after it is already gone. The two cases are already serialized on th...
```diff diff --git a/drivers/net/tun.c b/drivers/net/tun.c index d83ccb8c982b..811d3517fce0 100644 --- a/drivers/net/tun.c +++ b/drivers/net/tun.c @@ -1322,21 +1322,22 @@ static int tun_chr_open(struct inode *inode, struct file * file) static int tun_chr_close(struct inode *inode, struct file *file) { struct tun_fi...
ef681ce1e8b3e63317cd724c200b2fd39286c005
Analyze and fix the following issue in the Linux kernel code: e100: Fix napi_enable BUG_ON when recovering from EEH error
Problem Details: BUG_ON(!test_bit(NAPI_STATE_SCHED, &n->state)) was being hit during e100 EEH recovery. The problem source was a napi_enable call being made during e100_io_error_detected. Napi should remain disabled after e100_down, and only be reenabled when the interface is recovered. This patch also updates e100_io...
```diff diff --git a/drivers/net/e100.c b/drivers/net/e100.c index 0f9ee1348552..0c37dd97fa09 100644 --- a/drivers/net/e100.c +++ b/drivers/net/e100.c @@ -2822,12 +2822,13 @@ static pci_ers_result_t e100_io_error_detected(struct pci_dev *pdev, pci_channel struct net_device *netdev = pci_get_drvdata(pdev); struct ni...
1d0ebfe7c9621d43804e9ce9f2b898541a7d9652
Analyze and fix the following issue in the Linux kernel code: net pkgen.c:fix no need for check
Problem Details: vfree() does its own 'NULL' check, so no need for check before calling it. Signed-off-by: Figo.zhang <figo1802@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/core/pktgen.c b/net/core/pktgen.c index b8ccd3c88d63..19b8c20e98a4 100644 --- a/net/core/pktgen.c +++ b/net/core/pktgen.c @@ -3691,8 +3691,7 @@ out1: #ifdef CONFIG_XFRM free_SAs(pkt_dev); #endif - if (pkt_dev->flows) - vfree(pkt_dev->flows); + vfree(pkt_dev->flows); kfree(pkt_dev); ret...
a5b19b635c39fdb819500b0a746b44fe40c9a303
Analyze and fix the following issue in the Linux kernel code: mlx4: FIX error flow when initializing EQ table
Problem Details: If mlx4_create_eq() would fail for one of EQ's assigned for completion handling, the code would try to free the same EQ we failed to create. The crash was found by Christoph Lameter Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/mlx4/eq.c b/drivers/net/mlx4/eq.c index 8830dcb92ec8..dee188761a3c 100644 --- a/drivers/net/mlx4/eq.c +++ b/drivers/net/mlx4/eq.c @@ -623,8 +623,10 @@ int mlx4_init_eq_table(struct mlx4_dev *dev) err = mlx4_create_eq(dev, dev->caps.num_cqs + MLX4_NUM_SPARE_EQE, (dev->flags ...
6f536f403979d37021508c5804509a379d853788
Analyze and fix the following issue in the Linux kernel code: tun: Fix copy/paste error in tun_get_user
Problem Details: Use the right structure while incrementing the offset in tun_get_user. Signed-off-by: Sridhar Samudrala <sri@us.ibm.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/tun.c b/drivers/net/tun.c index 8d82511aa1bc..d83ccb8c982b 100644 --- a/drivers/net/tun.c +++ b/drivers/net/tun.c @@ -571,7 +571,7 @@ static __inline__ ssize_t tun_get_user(struct tun_struct *tun, if (gso.hdr_len > len) return -EINVAL; - offset += sizeof(pi); + offset += size...
2faef52b72958b8b1c08e927b9b0691c314cf6f4
Analyze and fix the following issue in the Linux kernel code: net: Fix memcpy_toiovecend() to use the right offset
Problem Details: Increment the iovec base by the offset passed in for the initial copy_to_user() in memcpy_to_iovecend(). Signed-off-by: Sridhar Samudrala <sri@us.ibm.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/core/iovec.c b/net/core/iovec.c index 40a76ce19d9f..16ad45d4882b 100644 --- a/net/core/iovec.c +++ b/net/core/iovec.c @@ -112,9 +112,9 @@ int memcpy_toiovecend(const struct iovec *iov, unsigned char *kdata, continue; } copy = min_t(unsigned int, iov->iov_len - offset, len); - offset ...
d2d27bfd11659675fdd1c20b1c7f8f59873cad60
Analyze and fix the following issue in the Linux kernel code: net: Fix skb_copy_datagram_from_iovec() to pass the right offset
Problem Details: I am working on enabling UFO between KVM guests using virtio-net and i have some patches that i got working with 2.6.30-rc8. When i wanted to try them with net-next-2.6, i noticed that virtio-net is not working with that tree. After some debugging, it turned out to be several bugs in the recent patche...
```diff diff --git a/net/core/datagram.c b/net/core/datagram.c index e2a36f05cdf7..774bcd9119d9 100644 --- a/net/core/datagram.c +++ b/net/core/datagram.c @@ -466,7 +466,8 @@ int skb_copy_datagram_from_iovec(struct sk_buff *skb, int offset, if (copy > 0) { if (copy > len) copy = len; - if (memcpy_fromiovecend...
b82f08ea162edeee6c2c70c6c4321bea4763fa35
Analyze and fix the following issue in the Linux kernel code: virtio_net: Set correct gso->hdr_len
Problem Details: Through a bug in the tun driver, I noticed that virtio_net is producing bogus hdr_len values. In particular, it only includes the IP header in the linear area, and excludes the entire TCP header. This causes the TCP header to be copied twice for each packet. (The bug omitted the second copy :) This...
```diff diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 0c9ca67f66e6..09bd4410fa65 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -470,7 +470,7 @@ static int xmit_skb(struct virtnet_info *vi, struct sk_buff *skb) } if (skb_is_gso(skb)) { - hdr->hdr_len = skb_transp...
1feede014bf3c58f60b35f91dcd8a2f89b3908ad
Analyze and fix the following issue in the Linux kernel code: sis190: fix gigabit negotiation
Problem Details: Fixes an initialization error; the chip negotiates gigabit, but the driver mistakenly handled it as 100Mb. Changes based on both SiS own GPL driver and forcedeth. Hopefully should fix http://bugzilla.kernel.org/show_bug.cgi?id=9735 http://bugzilla.kernel.org/show_bug.cgi?id=11149 Signed-off-by: Ricc...
```diff diff --git a/drivers/net/sis190.c b/drivers/net/sis190.c index 75bd947d40bf..e2247669a495 100644 --- a/drivers/net/sis190.c +++ b/drivers/net/sis190.c @@ -47,7 +47,7 @@ #define PHY_ID_ANY 0x1f #define MII_REG_ANY 0x1f -#define DRV_VERSION "1.2" +#define DRV_VERSION "1.3" #define DRV_NAME "sis190" #de...
744c6b2976778ac6944e580fc413842df85be84e
Analyze and fix the following issue in the Linux kernel code: sis190: fix for x86_64 (bug 11509)
Problem Details: Corrected dma sync handling on small packets. Should fix http://bugzilla.kernel.org/show_bug.cgi?id=11509 Note: While this bug was reported only on x86_64, it could have affected any architecture. Signed-off-by: Riccardo Ghetta <birrachiara@tin.it> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/sis190.c b/drivers/net/sis190.c index 13b8ca41d571..9ea13c09f009 100644 --- a/drivers/net/sis190.c +++ b/drivers/net/sis190.c @@ -539,8 +539,8 @@ static bool sis190_try_rx_copy(struct sis190_private *tp, if (!skb) goto out; - pci_dma_sync_single_for_device(tp->pci_dev, addr, pkt_...
365da8722d9df54efb8212bf82a87d816c522845
Analyze and fix the following issue in the Linux kernel code: qlge: Fix timeout on firmware mailbox commands.
Problem Details: Some firmware mailbox commands require the firmware to communicate with the FCoE driver running on another PCI function. This can potentially take several seconds. This wait is done in process context only. Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: David S. Miller <davem@daveml...
```diff diff --git a/drivers/net/qlge/qlge_mpi.c b/drivers/net/qlge/qlge_mpi.c index de96b8a7c373..3bd60a4f5d71 100644 --- a/drivers/net/qlge/qlge_mpi.c +++ b/drivers/net/qlge/qlge_mpi.c @@ -90,14 +90,14 @@ static int ql_get_mb_sts(struct ql_adapter *qdev, struct mbox_params *mbcp) */ static int ql_wait_mbx_cmd_cmpl...
d2ba498668cb9f18677dd150b23f754953dc1fda
Analyze and fix the following issue in the Linux kernel code: qlge: Fix timeout on indexed register wait.
Problem Details: There are 8 banks of 'sub-registers' each of which are accessed through address/data register pair. An example would be reading flash or the xgmac. Accessing these require the driver to wait for a ready bit before writing the address and then accessing the data. This patch increases the timeout to 10...
```diff diff --git a/drivers/net/qlge/qlge.h b/drivers/net/qlge/qlge.h index fcb159e4df54..e18607124f41 100644 --- a/drivers/net/qlge/qlge.h +++ b/drivers/net/qlge/qlge.h @@ -50,7 +50,7 @@ #define MAX_INTER_FRAME_WAIT 10 /* 10 usec max interframe-wait for coalescing */ #define DFLT_INTER_FRAME_WAIT (MAX_INTER_FRAME_W...
c8269b21ddfd0181881aca959cff64ff15a0b7d3
Analyze and fix the following issue in the Linux kernel code: qlge: Fix bug in MTU setting process.
Problem Details: Since an FCoE function shares a port with this NIC function, the jumbo settings must always be in place. This patch causes the hardware to be set up for jumbo if it is not already done. Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/qlge/qlge_mpi.c b/drivers/net/qlge/qlge_mpi.c index ff8424330a9c..de96b8a7c373 100644 --- a/drivers/net/qlge/qlge_mpi.c +++ b/drivers/net/qlge/qlge_mpi.c @@ -761,7 +761,6 @@ void ql_mpi_port_cfg_work(struct work_struct *work) { struct ql_adapter *qdev = container_of(work, struc...
709ac4f43d76135daa9c2e33ab90eadd16bfce15
Analyze and fix the following issue in the Linux kernel code: qlge: Fix bug in firmware event handler.
Problem Details: Each firmware mailbox command can have a different number of valid data elements. When waiting for a mailbox command to complete it the process passes it's element count and waits for the completion. It is possible that while waiting an unrelated firmware async event (AE) can arrive. When this happen...
```diff diff --git a/drivers/net/qlge/qlge_mpi.c b/drivers/net/qlge/qlge_mpi.c index 7cb30fdc9bac..ff8424330a9c 100644 --- a/drivers/net/qlge/qlge_mpi.c +++ b/drivers/net/qlge/qlge_mpi.c @@ -453,6 +453,13 @@ static int ql_mpi_handler(struct ql_adapter *qdev, struct mbox_params *mbcp) } end: ql_write32(qdev, CSR, C...
d6f58c2e63b4197cba99edd3a4c5c7f4935708fb
Analyze and fix the following issue in the Linux kernel code: qlge: Fix firmware event handler loop.
Problem Details: Check status on every iteration of event handler loop and exit if an error occurred. If an error occurred then recover process will be queued so this loop should no continue. Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/qlge/qlge_mpi.c b/drivers/net/qlge/qlge_mpi.c index 9f81b797f10b..7cb30fdc9bac 100644 --- a/drivers/net/qlge/qlge_mpi.c +++ b/drivers/net/qlge/qlge_mpi.c @@ -831,13 +831,19 @@ void ql_mpi_work(struct work_struct *work) container_of(work, struct ql_adapter, mpi_work.work); struct...
3aa6b186f86c5d06d6d92d14311ffed51f091f40
Analyze and fix the following issue in the Linux kernel code: x86: Fix non-lazy GS handling in sys_vm86()
Problem Details: This fixes a stack corruption panic or null dereference oops due to a bad GS in resume_userspace() when returning from sys_vm86() and calling lockdep_sys_exit(). Only a problem when CONFIG_LOCKDEP and CONFIG_CC_STACKPROTECTOR enabled. Signed-off-by: Lubomir Rintel <lkundrak@v3.sk> Cc: H. Peter Anvin ...
```diff diff --git a/arch/x86/kernel/vm86_32.c b/arch/x86/kernel/vm86_32.c index d7ac84e7fc1c..6a177694058f 100644 --- a/arch/x86/kernel/vm86_32.c +++ b/arch/x86/kernel/vm86_32.c @@ -287,10 +287,9 @@ static void do_sys_vm86(struct kernel_vm86_struct *info, struct task_struct *tsk info->regs.pt.ds = 0; info->regs.pt...
103428e57be323c3c5545db8ad12667099bc6005
Analyze and fix the following issue in the Linux kernel code: x86, apic: Fix dummy apic read operation together with broken MP handling
Problem Details: Ingo Molnar reported that read_apic is buggy novadays: [ 0.000000] Using APIC driver default [ 0.000000] SMP: Allowing 1 CPUs, 0 hotplug CPUs [ 0.000000] Local APIC disabled by BIOS -- you can enable it with "lapic" [ 0.000000] APIC: disable apic facility [ 0.000000] ------------[ cut h...
```diff diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c index e82488d3f0ba..a4c9cf0bf70b 100644 --- a/arch/x86/kernel/apic/apic.c +++ b/arch/x86/kernel/apic/apic.c @@ -249,7 +249,7 @@ static void native_apic_write_dummy(u32 reg, u32 v) static u32 native_apic_read_dummy(u32 reg) { - WARN_ON_ON...
49d8078ad1c3dca5b11ce18391bf6bd9af9acdf5
Analyze and fix the following issue in the Linux kernel code: ide-tape: fix IDE_AFLAG_* atomic accesses
Problem Details: These flags used to be bit numbers and now are single bits in the ->atapi_flags vector. Use them properly. Spotted-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
```diff diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c index f1d3c7b2a2b5..055f52e1ea0e 100644 --- a/drivers/ide/ide-tape.c +++ b/drivers/ide/ide-tape.c @@ -397,7 +397,8 @@ static int ide_tape_callback(ide_drive_t *drive, int dsc) if (readpos[0] & 0x4) { printk(KERN_INFO "ide-tape: Block location i...
620fa036b2459ca9acf7484c8074147f0dda68da
Analyze and fix the following issue in the Linux kernel code: ixgbe: Fix 82599 adapter link flickering issues
Problem Details: Fix autoneg restart issues in flow control path which might create endless link flickering due to known timing issues with 82599 adapters. Signed-off-by: Mallikarjuna R Chilakala <mallikarjuna.chilakakla@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Mille...
```diff diff --git a/drivers/net/ixgbe/ixgbe_82598.c b/drivers/net/ixgbe/ixgbe_82598.c index 88e8350aa786..b9923047ce11 100644 --- a/drivers/net/ixgbe/ixgbe_82598.c +++ b/drivers/net/ixgbe/ixgbe_82598.c @@ -293,6 +293,17 @@ static s32 ixgbe_fc_enable_82598(struct ixgbe_hw *hw, s32 packetbuf_num) u32 rmcs_reg; u32 r...
1479ad4fbfbc801898dce1ac2d4d44f0c774ecc5
Analyze and fix the following issue in the Linux kernel code: ixgbe: Change the 82599 PHY DSP restart logic
Problem Details: When reprogramming the 82599 analog PHY to either SFI optical or Direct Attach Twinax, we need to restart the DSP in the PHY. The current method can cause contention with our FW which is managing PHY state, and will cause unexpected link flaps. This patch fixes the DSP restart by issuing an AN_RESTAR...
```diff diff --git a/drivers/net/ixgbe/ixgbe_82599.c b/drivers/net/ixgbe/ixgbe_82599.c index 5d2783081a94..a7611bbf3873 100644 --- a/drivers/net/ixgbe/ixgbe_82599.c +++ b/drivers/net/ixgbe/ixgbe_82599.c @@ -122,10 +122,9 @@ s32 ixgbe_setup_sfp_modules_82599(struct ixgbe_hw *hw) IXGBE_WRITE_FLUSH(hw); hw->eeprom...
075affcbe01d4d7cefcd0e30a98df1253bcf8d92
Analyze and fix the following issue in the Linux kernel code: ide: preserve Host Protected Area by default (v2)
Problem Details: From the perspective of most users of recent systems, disabling Host Protected Area (HPA) can break vendor RAID formats, GPT partitions and risks corrupting firmware or overwriting vendor system recovery tools. Unfortunately the original (kernels < 2.6.30) behavior (unconditionally disabling HPA and u...
```diff diff --git a/Documentation/ide/ide.txt b/Documentation/ide/ide.txt index 0c78f4b1d9d9..e77bebfa7b0d 100644 --- a/Documentation/ide/ide.txt +++ b/Documentation/ide/ide.txt @@ -216,6 +216,8 @@ Other kernel parameters for ide_core are: * "noflush=[interface_number.device_number]" to disable flush requests +* ...
669165daad2ec839df85b8c5f7bc155e76a2f404
Analyze and fix the following issue in the Linux kernel code: pdc202xx_old: fix resetproc() method
Problem Details: pdc202xx_reset() calls pdc202xx_reset_host() twice, for both channels, while that function actually twiddles the single, shared software reset bit -- the net effect is a duplicated reset and horrendous 4 second delay happening not only on a channel reset but also when dma_lost_irq() and dma_clear() met...
```diff diff --git a/drivers/ide/pdc202xx_old.c b/drivers/ide/pdc202xx_old.c index 8df26302a0b5..b3bc96f930a6 100644 --- a/drivers/ide/pdc202xx_old.c +++ b/drivers/ide/pdc202xx_old.c @@ -1,6 +1,6 @@ /* * Copyright (C) 1998-2002 Andre Hedrick <andre@linux-ide.org> - * Copyright (C) 2006-2007 MontaVista Software, ...
521a415c9f6d4e5463807ce6d36598acabcd204f
Analyze and fix the following issue in the Linux kernel code: pdc202xx_old: fix 'pdc20246_dma_ops'
Problem Details: Commit ac95beedf8bc97b24f9540d4da9952f07221c023 (ide: add struct ide_port_ops (take 2)) erroneously converted the driver's dma_timeout() and dma_lost_irq() methods to call the driver's resetproc() method regardless of whether it was defined for this specific controller while it hadn't been defined and ...
```diff diff --git a/drivers/ide/pdc202xx_old.c b/drivers/ide/pdc202xx_old.c index 248a54bd2386..8df26302a0b5 100644 --- a/drivers/ide/pdc202xx_old.c +++ b/drivers/ide/pdc202xx_old.c @@ -328,9 +328,8 @@ static const struct ide_dma_ops pdc20246_dma_ops = { .dma_start = ide_dma_start, .dma_end = ide_dma_end, .dma...
5095f59bda6793a7b8f0856096d6893fe98e0e51
Analyze and fix the following issue in the Linux kernel code: x86: cpu_debug: Remove model information to reduce encoding-decoding
Problem Details: Remove model information, encoding/decoding and reduce bookkeeping. This, besides removing a lot of code and cleaning up the code, also enables these features on many more CPUs that were enumerated before. Reported-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput...
```diff diff --git a/arch/x86/include/asm/cpu_debug.h b/arch/x86/include/asm/cpu_debug.h index 222802029fa6..d96c1ee3a95c 100644 --- a/arch/x86/include/asm/cpu_debug.h +++ b/arch/x86/include/asm/cpu_debug.h @@ -86,105 +86,7 @@ enum cpu_file_bit { CPU_VALUE_BIT, /* value */ }; -#define CPU_FILE_VALUE (1 << CP...
ab1863fc9bc18c806338564124b1e5e7e3ef53d1
Analyze and fix the following issue in the Linux kernel code: ALSA: pcm - Fix update of runtime->hw_ptr_interrupt
Problem Details: The commit 13f040f9e55d41e92e485389123654971e03b819 made another regression, the missing update of runtime->hw_ptr_interrupt. Since this field is only checked in snd_pcmupdate__hw_ptr_interrupt(), not in snd_pcm_update_hw_ptr(), it must be updated before the hw_ptr change check. Signed-off-by: Takashi...
```diff diff --git a/sound/core/pcm_lib.c b/sound/core/pcm_lib.c index bf34603a7a38..adb306fd5525 100644 --- a/sound/core/pcm_lib.c +++ b/sound/core/pcm_lib.c @@ -299,6 +299,8 @@ static int snd_pcm_update_hw_ptr_interrupt(struct snd_pcm_substream *substream) hw_ptr_interrupt = new_hw_ptr - new_hw_ptr % runtime->...
7caf6a49bb17d0377210693af5737563b31aa5ee
Analyze and fix the following issue in the Linux kernel code: dma-debug: change hash_bucket_find from first-fit to best-fit
Problem Details: Some device drivers map the same physical address multiple times to a dma address. Without an IOMMU this results in the same dma address being put into the dma-debug hash multiple times. With a first-fit match in hash_bucket_find() this function may return the wrong dma_debug_entry. This can result in...
```diff diff --git a/lib/dma-debug.c b/lib/dma-debug.c index cdd205d6bf7c..8fcc09c91e1b 100644 --- a/lib/dma-debug.c +++ b/lib/dma-debug.c @@ -186,15 +186,50 @@ static void put_hash_bucket(struct hash_bucket *bucket, static struct dma_debug_entry *hash_bucket_find(struct hash_bucket *bucket, struct dma_debug_en...
2f01190aa62fe9dd0a98205927b9f09fd191c017
Analyze and fix the following issue in the Linux kernel code: perf top: Wait for a minimal set of events before reading first snapshot
Problem Details: The first snapshot reading often occur before any events have been read in the mapped perfcounter files. Just wait until we have at least one event before starting the snapshot, or the delay before the first set of entries to be displayed may be long in case of low refresh rate. Note: we could also u...
```diff diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c index f2e7312f85c9..fdc1d5863b01 100644 --- a/tools/perf/builtin-top.c +++ b/tools/perf/builtin-top.c @@ -420,7 +420,7 @@ static unsigned int mmap_read_head(struct mmap_data *md) struct timeval last_read, this_read; -static void mmap_read(str...
f07502dae230a2c3b65381fd1b06e8a18b2c7525
Analyze and fix the following issue in the Linux kernel code: integrity: fix IMA inode leak
Problem Details: CONFIG_IMA=y inode activity leaks iint_cache and radix_tree_node objects until the system runs out of memory. Nowhere is calling ima_inode_free() a.k.a. ima_iint_delete(). Fix that by calling it from destroy_inode(). Signed-off-by: Hugh Dickins <hugh.dickins@tiscali.co.uk> Signed-off-by: Linus Torva...
```diff diff --git a/fs/inode.c b/fs/inode.c index a4876e561953..bca0c618fdb3 100644 --- a/fs/inode.c +++ b/fs/inode.c @@ -219,6 +219,7 @@ static struct inode *alloc_inode(struct super_block *sb) void destroy_inode(struct inode *inode) { BUG_ON(inode_has_buffers(inode)); + ima_inode_free(inode); security_inode_fr...
23b87116c7c4f73597965218b66041acbdb4e79f
Analyze and fix the following issue in the Linux kernel code: perf annotate: Fix command line help text
Problem Details: Arjan noticed this bug in the perf annotate help output: -s, --symbol <file> symbol to annotate that should be <symbol> instead. Reported-by: Arjan van de Ven <arjan@linux.intel.com> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Mike Galbraith <efault@gmx.de> Cc: Paul Mackerras <paulus@samba...
```diff diff --git a/tools/perf/builtin-annotate.c b/tools/perf/builtin-annotate.c index 80c5aa0bb42e..0e23fe98ec4e 100644 --- a/tools/perf/builtin-annotate.c +++ b/tools/perf/builtin-annotate.c @@ -1300,7 +1300,7 @@ static const char * const annotate_usage[] = { static const struct option options[] = { OPT_STRING('...