id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
4cfe6c3c1c301d3d7a36c9d579597b75ebb8ea13
Analyze and fix the following issue in the Linux kernel code: lguest: build fix
Problem Details: Fix this error (i386 !SMP build) arch/x86/lguest/boot.c: In function ‘lguest_init’: arch/x86/lguest/boot.c:1059: error: ‘pm_power_off’ undeclared (first use in this function) by including linux/pm.h. Signed-off-by: Jeff Garzik <jgarzik@redhat.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
```diff diff --git a/arch/x86/lguest/boot.c b/arch/x86/lguest/boot.c index 136d9df0295e..a0179fc6b791 100644 --- a/arch/x86/lguest/boot.c +++ b/arch/x86/lguest/boot.c @@ -56,6 +56,7 @@ #include <linux/lguest.h> #include <linux/lguest_launcher.h> #include <linux/virtio_console.h> +#include <linux/pm.h> #include <asm...
7334492b53706964eb055ed8e25e2e3315d7222a
Analyze and fix the following issue in the Linux kernel code: lguest: clean up lguest_launcher.h
Problem Details: Remove now-unused defines. Fix old idempotent #ifndef _ASM_LGUEST_USER name. Fix comment on use of lguest_req. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
```diff diff --git a/include/linux/lguest_launcher.h b/include/linux/lguest_launcher.h index 61e1e3e6b1cc..c41fd483af34 100644 --- a/include/linux/lguest_launcher.h +++ b/include/linux/lguest_launcher.h @@ -1,17 +1,7 @@ -#ifndef _ASM_LGUEST_USER -#define _ASM_LGUEST_USER +#ifndef _LINUX_LGUEST_LAUNCHER +#define _LINUX_...
838225b48edc971620cbeb292034dabd2b0d7d1d
Analyze and fix the following issue in the Linux kernel code: sched: use show_regs() to improve __schedule_bug() output
Problem Details: A full register dump along with stack backtrace would make the "scheduling while atomic" message more helpful. Use show_regs() instead of dump_stack() for this. We already know we're atomic in here (that is why this function was called) so show_regs()'s atomicity expectations are guaranteed. Also, mod...
```diff diff --git a/kernel/sched.c b/kernel/sched.c index af02a4de069b..d1e6663d3ab0 100644 --- a/kernel/sched.c +++ b/kernel/sched.c @@ -66,6 +66,7 @@ #include <linux/pagemap.h> #include <asm/tlb.h> +#include <asm/irq_regs.h> /* * Scheduler clock - returns current time in nanosec units. @@ -3507,12 +3508,19 ...
4dcf6aff023d9934630fb3649284951831c51f8f
Analyze and fix the following issue in the Linux kernel code: sched: clean up sched_domain_debug()
Problem Details: clean up sched_domain_debug(). this also shrinks the code a bit: text data bss dec hex filename 50474 4306 480 55260 d7dc sched.o.before 50404 4306 480 55190 d796 sched.o.after Signed-off-by: Ingo Molnar <mingo@elte.hu>
```diff diff --git a/kernel/sched.c b/kernel/sched.c index 80edf29fa27c..af02a4de069b 100644 --- a/kernel/sched.c +++ b/kernel/sched.c @@ -5617,101 +5617,101 @@ int nr_cpu_ids __read_mostly = NR_CPUS; EXPORT_SYMBOL(nr_cpu_ids); #ifdef CONFIG_SCHED_DEBUG -static void sched_domain_debug(struct sched_domain *sd, int c...
b15136e9497ef5d6e08cf665e0d0acf7a229f6dc
Analyze and fix the following issue in the Linux kernel code: sched: fix fastcall mismatch in completion APIs
Problem Details: Jeff Dike noticed that wait_for_completion_interruptible()'s prototype had a mismatched fastcall. Fix this by removing the fastcall attributes from all the completion APIs. Found-by: Jeff Dike <jdike@linux.intel.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
```diff diff --git a/include/linux/completion.h b/include/linux/completion.h index 268c5a4a2bd4..33d6aaf94447 100644 --- a/include/linux/completion.h +++ b/include/linux/completion.h @@ -42,15 +42,15 @@ static inline void init_completion(struct completion *x) init_waitqueue_head(&x->wait); } -extern void FASTCALL(...
7378547f2c83ca16a30d0a7c488a43a688ea0888
Analyze and fix the following issue in the Linux kernel code: sched: fix sched_domain sysctl registration again
Problem Details: commit 029190c515f15f512ac85de8fc686d4dbd0ae731 (cpuset sched_load_balance flag) was not tested SCHED_DEBUG enabled as committed as it dereferences NULL when used and it reordered the sysctl registration to cause it to never show any domains or their tunables. Fixes: 1) restore arch_init_sched_domai...
```diff diff --git a/kernel/sched.c b/kernel/sched.c index 2810e562a991..e51f0eabfef2 100644 --- a/kernel/sched.c +++ b/kernel/sched.c @@ -5461,11 +5461,12 @@ static void register_sched_domain_sysctl(void) struct ctl_table *entry = sd_alloc_ctl_entry(cpu_num + 1); char buf[32]; + WARN_ON(sd_ctl_dir[0].child); + s...
76fd1e87d9456c8185b8df76ac5e533e0c8b39bb
Analyze and fix the following issue in the Linux kernel code: [DCCP]: Unaligned pointer access
Problem Details: This fixes `unaligned (read) access' errors of the type Kernel unaligned access at TPC[100f970c] dccp_parse_options+0x4f4/0x7e0 [dccp] Kernel unaligned access at TPC[1011f2e4] ccid3_hc_tx_parse_options+0x1ac/0x380 [dccp_ccid3] Kernel unaligned access at TPC[100f9898] dccp_parse_options+0x680/0x880 [dc...
```diff diff --git a/net/dccp/ccids/ccid3.c b/net/dccp/ccids/ccid3.c index 25772c326172..05f263e9160d 100644 --- a/net/dccp/ccids/ccid3.c +++ b/net/dccp/ccids/ccid3.c @@ -40,6 +40,8 @@ #include "lib/tfrc.h" #include "ccid3.h" +#include <asm/unaligned.h> + #ifdef CONFIG_IP_DCCP_CCID3_DEBUG static int ccid3_debug; ...
1238d0873b29f7a2de75d576b4cc706c1c75ffbf
Analyze and fix the following issue in the Linux kernel code: [DCCP]: One more exemption from full sequence number checks
Problem Details: This fixes the following problem: client connects to peer which has no DCCP enabled or loaded; ICMP error messages ("Protocol Unavailable") can be seen on the wire, but the application hangs. Reason: ICMP packets don't get through to dccp_v4_err. When reporting errors, a sequence number check is made ...
```diff diff --git a/net/dccp/ipv4.c b/net/dccp/ipv4.c index 3f1578db93e8..01a6a808bdb7 100644 --- a/net/dccp/ipv4.c +++ b/net/dccp/ipv4.c @@ -242,7 +242,7 @@ static void dccp_v4_err(struct sk_buff *skb, u32 info) dp = dccp_sk(sk); seq = dccp_hdr_seq(dh); - if (sk->sk_state != DCCP_LISTEN && + if ((1 << sk->sk_st...
fde20105f332614b23a3131d706cd90bdd7db72d
Analyze and fix the following issue in the Linux kernel code: [DCCP]: Retrieve packet sequence number for error reporting
Problem Details: This fixes a problem when analysing erroneous packets in dccp_v{4,6}_err: * dccp_hdr_seq currently takes an skb * however, the transport headers in the skb are shifted, due to the preceding IPv4/v6 header. Fixed for v4 and v6 by changing dccp_hdr_seq to take a struct dccp_hdr as argument. Verified th...
```diff diff --git a/include/linux/dccp.h b/include/linux/dccp.h index f3fc4392e93d..55d28cb97596 100644 --- a/include/linux/dccp.h +++ b/include/linux/dccp.h @@ -270,10 +270,9 @@ static inline struct dccp_hdr *dccp_zeroed_hdr(struct sk_buff *skb, int headlen) return memset(skb_transport_header(skb), 0, headlen); } ...
82861924a5f26208c8421a799a4e8724d48eb560
Analyze and fix the following issue in the Linux kernel code: blackfin: fix sg fallout
Problem Details: Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Jens Axboe <axboe@carl.home.kernel.dk>
```diff diff --git a/arch/blackfin/kernel/dma-mapping.c b/arch/blackfin/kernel/dma-mapping.c index a16cb03c5291..d6b61d56b656 100644 --- a/arch/blackfin/kernel/dma-mapping.c +++ b/arch/blackfin/kernel/dma-mapping.c @@ -35,6 +35,7 @@ #include <linux/device.h> #include <linux/dma-mapping.h> #include <linux/io.h> +#inc...
23464ffa47689e46985fb10ae9e34bbc9e83f387
Analyze and fix the following issue in the Linux kernel code: arch/um/drivers/ubd_kern.c: fix a building error
Problem Details: Fix this uml building error: arch/um/drivers/ubd_kern.c: In function 'do_ubd_request': arch/um/drivers/ubd_kern.c:1118: error: implicit declaration of function 'sg_page' arch/um/drivers/ubd_kern.c:1118: warning: passing argument 6 of 'prepare_request' makes pointer from integer without a cast make[1]: ...
```diff diff --git a/arch/um/drivers/ubd_kern.c b/arch/um/drivers/ubd_kern.c index 3a8cd3dfb51c..e184b44b1011 100644 --- a/arch/um/drivers/ubd_kern.c +++ b/arch/um/drivers/ubd_kern.c @@ -35,6 +35,7 @@ #include "linux/genhd.h" #include "linux/spinlock.h" #include "linux/platform_device.h" +#include "linux/scatterlist...
eec407c9ac5ee819bfcadb4e39ce892576d570d1
Analyze and fix the following issue in the Linux kernel code: x86: fix bogus KERN_ALERT on oops
Problem Details: fix this: printing eip: f881b9f3 *pdpt = 0000000000003001 <1>*pde = 000000000480a067 *pte = 0000000000000000 ^^^ [ mingo: added KERN_CONT as suggested by Pekka Enberg ] Signed-off-by: Alexey Dobriyan <adobriyan@sw.ru> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <t...
```diff diff --git a/arch/x86/mm/fault_32.c b/arch/x86/mm/fault_32.c index 503dfc05111b..33563ee8eb0f 100644 --- a/arch/x86/mm/fault_32.c +++ b/arch/x86/mm/fault_32.c @@ -550,7 +550,7 @@ no_context: page &= PAGE_MASK; page = ((__typeof__(page) *) __va(page))[(address >> PMD_SHIFT) ...
230e55adf6f74309683a068dec23e664a64fb08a
Analyze and fix the following issue in the Linux kernel code: x86: lguest build fix
Problem Details: Fix this error (i386 !SMP build): arch/x86/lguest/boot.c: In function lguest_init: arch/x86/lguest/boot.c:1059: error: pm_power_off undeclared (first use in this function) by including linux/pm.h. Signed-off-by: Jeff Garzik <jgarzik@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-b...
```diff diff --git a/arch/x86/lguest/boot.c b/arch/x86/lguest/boot.c index d2235db4085f..8f1356258aa4 100644 --- a/arch/x86/lguest/boot.c +++ b/arch/x86/lguest/boot.c @@ -56,6 +56,7 @@ #include <linux/lguest.h> #include <linux/lguest_launcher.h> #include <linux/virtio_console.h> +#include <linux/pm.h> #include <asm...
1fb473d8f45658532555b956ee24e25a0ba493cd
Analyze and fix the following issue in the Linux kernel code: x86: fix CONFIG_KEXEC build breakage
Problem Details: X86_32 build fix to commit 62a31a03b3d2a9d20e7a073e2cd9b27bfb7d6a3f Signed-off-by: Mike Galbraith <efault@gmx.de> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
```diff diff --git a/arch/x86/kernel/crash.c b/arch/x86/kernel/crash.c index af0253f94a9a..8bb482ff091b 100644 --- a/arch/x86/kernel/crash.c +++ b/arch/x86/kernel/crash.c @@ -25,7 +25,7 @@ #include <linux/kdebug.h> #include <asm/smp.h> -#ifdef X86_32 +#ifdef CONFIG_X86_32 #include <mach_ipi.h> #else #include <as...
9317d4313e0cd51b2256ea9a9316f2d8561e37a8
Analyze and fix the following issue in the Linux kernel code: ISDN/sc: fix longstanding warning
Problem Details: drivers/isdn/sc/shmem.c: In function 'memcpy_toshmem': drivers/isdn/sc/shmem.c:54: warning: passing argument 1 of 'memcpy_toio' makes pointer from integer without a cast Also, remove some unneeded braces, and add some useful whitespace. Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
```diff diff --git a/drivers/isdn/sc/shmem.c b/drivers/isdn/sc/shmem.c index 034d41a61ae1..e0331e0094f1 100644 --- a/drivers/isdn/sc/shmem.c +++ b/drivers/isdn/sc/shmem.c @@ -28,15 +28,15 @@ void memcpy_toshmem(int card, void *dest, const void *src, size_t n) { unsigned long flags; unsigned char ch; + unsigned lon...
18ccc4194389c6edc78ede76ada3bf753525b11c
Analyze and fix the following issue in the Linux kernel code: AVR32: Fix sg_page breakage
Problem Details: The latest sg changes introduce the following build errors on AVR32: include/asm/dma-mapping.h: In function ‘dma_map_sg’: include/asm/dma-mapping.h:220: error: implicit declaration of function ‘sg_page’ include/asm/dma-mapping.h:220: error: invalid operands to binary - include/asm/dma-mapping.h:221: e...
```diff diff --git a/include/asm-avr32/dma-mapping.h b/include/asm-avr32/dma-mapping.h index a7131630c057..57dc672bab8e 100644 --- a/include/asm-avr32/dma-mapping.h +++ b/include/asm-avr32/dma-mapping.h @@ -3,7 +3,7 @@ #include <linux/mm.h> #include <linux/device.h> -#include <asm/scatterlist.h> +#include <linux/sc...
d91c5e8839791b27672277e81451873499bc517e
Analyze and fix the following issue in the Linux kernel code: More SG build fixes
Problem Details: Signed-off-by: Jens Axboe <axboe@carl.home.kernel.dk>
```diff diff --git a/arch/sparc64/kernel/ldc.c b/arch/sparc64/kernel/ldc.c index c8313cb60f0a..217478a94128 100644 --- a/arch/sparc64/kernel/ldc.c +++ b/arch/sparc64/kernel/ldc.c @@ -2121,7 +2121,7 @@ int ldc_map_sg(struct ldc_channel *lp, state.nc = 0; for (i = 0; i < num_sg; i++) - fill_cookies(&state, page_to...
de58d942924d431c1c2144ece35b0b9aceadaf2c
Analyze and fix the following issue in the Linux kernel code: sg: add missing sg_init_table calls to zfcp
Problem Details: kernel BUG at include/linux/scatterlist.h:50! illegal operation: 0001 [#1] [...] Call Trace: ([<000000000026f184>] zfcp_ns_gid_pn_request+0x4c/0x2a0) [<0000000000276dd4>] zfcp_erp_strategy_do_action+0x1410/0x1938 [<0000000000278412>] zfcp_erp_thread+0x4fa/0x1430 [<000000000001990a>] kernel_thread_st...
```diff diff --git a/drivers/s390/scsi/zfcp_aux.c b/drivers/s390/scsi/zfcp_aux.c index fd5d0c1570df..d9e7be979760 100644 --- a/drivers/s390/scsi/zfcp_aux.c +++ b/drivers/s390/scsi/zfcp_aux.c @@ -1518,6 +1518,8 @@ zfcp_gid_pn_buffers_alloc(struct zfcp_gid_pn_data **gid_pn, mempool_t *pool) return -ENOME...
5e2a06489e4d4d85ca4ca20af23f213e95c2fbeb
Analyze and fix the following issue in the Linux kernel code: SG build fix
Problem Details: Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Jens Axboe <axboe@carl.home.kernel.dk>
```diff diff --git a/arch/sparc64/kernel/iommu_common.c b/arch/sparc64/kernel/iommu_common.c index b70324e0d83d..efd5dff85f60 100644 --- a/arch/sparc64/kernel/iommu_common.c +++ b/arch/sparc64/kernel/iommu_common.c @@ -234,7 +234,7 @@ unsigned long prepare_sg(struct scatterlist *sg, int nents) dma_sg->dma_length = de...
03cf786c4e83dba404ad23ca58f49147ae52dffd
Analyze and fix the following issue in the Linux kernel code: [IPV4]: Explicitly call fib_get_table() in fib_frontend.c
Problem Details: In case the "multiple tables" config option is y, the ip_fib_local_table is not a variable, but a macro, that calls fib_get_table(RT_TABLE_LOCAL). Some code uses this "variable" *3* times in one place, thus implicitly making 3 calls. Fix it. Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-of...
```diff diff --git a/net/ipv4/fib_frontend.c b/net/ipv4/fib_frontend.c index 78b514ba1414..60123905dbbf 100644 --- a/net/ipv4/fib_frontend.c +++ b/net/ipv4/fib_frontend.c @@ -128,13 +128,14 @@ struct net_device * ip_dev_find(__be32 addr) struct flowi fl = { .nl_u = { .ip4_u = { .daddr = addr } } }; struct fib_resul...
0ffdd581497286e8af529b0b39770c01eab15b30
Analyze and fix the following issue in the Linux kernel code: [9P]: Fix missing unlock before return in p9_mux_poll_start
Problem Details: Signed-off-by: Roel Kluin <12o3l@tiscali.nl> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/9p/mux.c b/net/9p/mux.c index f14014793bed..c9f0805048e4 100644 --- a/net/9p/mux.c +++ b/net/9p/mux.c @@ -222,8 +222,10 @@ static int p9_mux_poll_start(struct p9_conn *m) } if (i >= ARRAY_SIZE(p9_mux_poll_tasks)) { - if (vptlast == NULL) + if (vptlast == NULL) { + mutex_unlock(&p9_mux...
0034622693ad21d6b341a1b51e766f72d1ef512e
Analyze and fix the following issue in the Linux kernel code: [PKT_SCHED]: Fix sch_prio.c build with CONFIG_NETDEVICES_MULTIQUEUE
Problem Details: Fix one more user of netiff_subqueue_stopped. To check for the queue id one must use the __netiff_subqueue_stoped call. This run out of my sight when I made the: 668f895a85b0c3a62a690425145f13dabebebd7a [NET]: Hide the queue_mapping field inside netif_subqueue_stopped commit :( Signed-off-by: Pavel...
```diff diff --git a/net/sched/sch_prio.c b/net/sched/sch_prio.c index abd82fc3ec60..de894096e442 100644 --- a/net/sched/sch_prio.c +++ b/net/sched/sch_prio.c @@ -136,7 +136,7 @@ prio_dequeue(struct Qdisc* sch) * pulling an skb. This way we avoid excessive requeues * for slower queues. */ - if (!netif_sub...
5c58298c2536252ab95aa2b1497ab47eb878ca5d
Analyze and fix the following issue in the Linux kernel code: [NETLINK]: Fix ACK processing after netlink_dump_start
Problem Details: Revert to original netlink behavior. Do not reply with ACK if the netlink dump has bees successfully started. libnl has been broken by the cd40b7d3983c708aabe3d3008ec64ffce56d33b0 The following command reproduce the problem: /nl-route-get 192.168.1.1 Signed-off-by: Denis V. Lunev <den@openvz.org> ...
```diff diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c index 98e313e5e594..325272925d0f 100644 --- a/net/netlink/af_netlink.c +++ b/net/netlink/af_netlink.c @@ -1565,7 +1565,11 @@ int netlink_dump_start(struct sock *ssk, struct sk_buff *skb, netlink_dump(sk); sock_put(sk); - return 0; + + /* We ...
0e6f7329d594174f177e5990d24e141954101a1c
Analyze and fix the following issue in the Linux kernel code: eexpress: fix !SMP unused-var warning
Problem Details: Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
```diff diff --git a/drivers/net/eexpress.c b/drivers/net/eexpress.c index 9c85e50014b4..70509ed6c11d 100644 --- a/drivers/net/eexpress.c +++ b/drivers/net/eexpress.c @@ -651,9 +651,9 @@ static void eexp_timeout(struct net_device *dev) */ static int eexp_xmit(struct sk_buff *buf, struct net_device *dev) { - struct ...
150981b0306fc5773b929e31ab5b0590c87cc77c
Analyze and fix the following issue in the Linux kernel code: libata-core: auditting chk_status v check_status
Problem Details: Did a complete audit of these and found we have another error case. ata_bus_softreset calls ata_check_status which means that it tries to do an ioread8 on the port blindly and check versus 0xFF for an error. It should of course be using the ap->ops method for this via chk_status, and this bug causes ...
```diff diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index b458639b4735..0978b2feef99 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c @@ -3267,7 +3267,7 @@ static int ata_bus_softreset(struct ata_port *ap, unsigned int devmask, * the bus shows 0xFF because the odd clown f...
6603a6f25e4bca922a7dfbf0bf03072d98850176
Analyze and fix the following issue in the Linux kernel code: bonding: Convert more locks to _bh, acquire rtnl, for new locking
Problem Details: Convert more lock acquisitions to _bh flavor to avoid deadlock with workqueue activity and add acquisition of RTNL in appropriate places. Affects ALB mode, as well as core bonding functions and sysfs. Signed-off-by: Andy Gospodarek <andy@greyhouse.net> Signed-off-by: Jay Vosburgh <fubar@us.ibm.com> Si...
```diff diff --git a/drivers/net/bonding/bond_alb.c b/drivers/net/bonding/bond_alb.c index f2e2872c9b17..6db5d763f6b6 100644 --- a/drivers/net/bonding/bond_alb.c +++ b/drivers/net/bonding/bond_alb.c @@ -128,12 +128,12 @@ static inline u8 _simple_hash(const u8 *hash_start, int hash_size) static inline void _lock_tx_h...
059fe7a578fba5bbb0fdc0365bfcf6218fa25eb0
Analyze and fix the following issue in the Linux kernel code: bonding: Convert locks to _bh, rework alb locking for new locking
Problem Details: Convert locking-related activity to new & improved system. Convert some lock acquisitions to _bh and rework parts of ALB mode, both to avoid deadlocks with workqueue activity. Signed-off-by: Andy Gospodarek <andy@greyhouse.net> Signed-off-by: Jay Vosburgh <fubar@us.ibm.com> Signed-off-by: Jeff Garzik ...
```diff diff --git a/drivers/net/bonding/bond_alb.c b/drivers/net/bonding/bond_alb.c index eb320c3cbdde..f2e2872c9b17 100644 --- a/drivers/net/bonding/bond_alb.c +++ b/drivers/net/bonding/bond_alb.c @@ -959,19 +959,34 @@ static int alb_set_slave_mac_addr(struct slave *slave, u8 addr[], int hw) return 0; } -/* Call...
cf5f9044934658dd3ffc628a60cd37c70f8168b1
Analyze and fix the following issue in the Linux kernel code: bonding: Convert balance-rr transmit to new locking
Problem Details: Change locking in balance-rr transmit processing to use a free running counter to determine which slave to transmit on. Instead, a free-running counter is maintained, and modulo arithmetic used to select a slave for transmit. This removes lock operations from the TX path, and eliminates a deadlock i...
```diff diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index ed361d62d702..862ed8ece14e 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c @@ -4057,8 +4057,7 @@ static int bond_xmit_roundrobin(struct sk_buff *skb, struct net_device *bond_dev { struct bo...
de0523863e167ec29cbd247bd004cdcb607e330e
Analyze and fix the following issue in the Linux kernel code: pasemi_mac: fix typo
Problem Details: Add missing &: drivers/net/pasemi_mac.c: In function 'pasemi_mac_clean_rx': drivers/net/pasemi_mac.c:553: warning: passing argument 1 of 'prefetch' makes pointer from integer without a cast Signed-off-by: Olof Johansson <olof@lixom.net> Signed-off-by: Jeff Garzik <jeff@garzik.org>
```diff diff --git a/drivers/net/pasemi_mac.c b/drivers/net/pasemi_mac.c index 9f9a421c99b3..ab4d309a858f 100644 --- a/drivers/net/pasemi_mac.c +++ b/drivers/net/pasemi_mac.c @@ -550,7 +550,7 @@ static int pasemi_mac_clean_rx(struct pasemi_mac *mac, int limit) n = mac->rx->next_to_clean; - prefetch(RX_RING(mac, n...
f1ecfd5d3b69d98b814435758c485e6fd0e112de
Analyze and fix the following issue in the Linux kernel code: remove header_ops bug in qeth driver
Problem Details: Remove qeth bug caused by commit: [NET]: Move hardware header operations out of netdevice. This is the second part of the qeth header_ops patch, since first patch sent 10/19 has been insufficient. Nevertheless first patch is still valid and should be kept. Signed-off-by: Ursula Braun <braunu@de.ibm.c...
```diff diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 4a3f54e358e5..c4de536cefa3 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -834,7 +834,7 @@ static inline int dev_hard_header(struct sk_buff *skb, struct net_device *dev, const void *daddr, const void *sadd...
b877fe288a325b9711d83628eb54e1deb63f962e
Analyze and fix the following issue in the Linux kernel code: sky2: crash on remove
Problem Details: Fix off-by one in remove logic that just got introduced. Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
```diff diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c index 24cfb6275d9b..c27c7d63b6a5 100644 --- a/drivers/net/sky2.c +++ b/drivers/net/sky2.c @@ -4271,7 +4271,7 @@ static void __devexit sky2_remove(struct pci_dev *pdev) del_timer_sync(&hw->watchdog_timer); cancel_work_sync(&hw->restart_work); - for (i = ...
f5e42fbab6c6ca39a33410a0ed0037589908c264
Analyze and fix the following issue in the Linux kernel code: MIPSnet: Delete all the useless debugging printks.
Problem Details: Plus minor formatting fixes. Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
```diff diff --git a/drivers/net/mipsnet.c b/drivers/net/mipsnet.c index 37707a0c0498..aafc3ce59cbb 100644 --- a/drivers/net/mipsnet.c +++ b/drivers/net/mipsnet.c @@ -30,6 +30,7 @@ static int ioiocpy_frommipsnet(struct net_device *dev, unsigned char *kdata, int len) { uint32_t available_len = inl(mipsnet_reg_add...
6cd043d99dcf5d252fcc682958541f449113f7b3
Analyze and fix the following issue in the Linux kernel code: AR7 ethernet: small post-merge cleanups and fixes
Problem Details: Signed-off-by: Matteo Croce <technoboy85@gmail.com> Signed-off-by: Eugene Konev <ejka@imfi.kspu.ru> Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
```diff diff --git a/drivers/net/cpmac.c b/drivers/net/cpmac.c index ae419736158e..57541d2d9e1e 100644 --- a/drivers/net/cpmac.c +++ b/drivers/net/cpmac.c @@ -460,18 +460,11 @@ static int cpmac_start_xmit(struct sk_buff *skb, struct net_device *dev) struct cpmac_desc *desc; struct cpmac_priv *priv = netdev_priv(dev...
246f93f5cc0d4116cadf33ad1c8ae7ac08e9b1c7
Analyze and fix the following issue in the Linux kernel code: isdn/act2000: fix major bug. clean irq handler.
Problem Details: * invert sense of request_irq() test. otherwise we will always fail, when IRQ is available. * no need to use 'irq' function arg, its stored in a data struct already Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
```diff diff --git a/drivers/isdn/act2000/act2000_isa.c b/drivers/isdn/act2000/act2000_isa.c index 819ea85576a3..1bd8960ead33 100644 --- a/drivers/isdn/act2000/act2000_isa.c +++ b/drivers/isdn/act2000/act2000_isa.c @@ -61,7 +61,7 @@ act2000_isa_detect(unsigned short portbase) } static irqreturn_t -act2000_isa_inter...
432409eebcdec38ff6fa949f097b5438d588faa5
Analyze and fix the following issue in the Linux kernel code: NFS: Fix for bug in handling of errors for O_DIRECT writes
Problem Details: Commit eda3cef8dd2b83875affe82595db9d0c278879b2 ("NFS: Fix error handling in nfs_direct_write_result()") ensured that if a WRITE returns an error, then data->res.verf->committed is not tested (as it is not initialised). Then commit 60fa3f769f7651a60125a0f44e3ffe3246d7cf39 ("NFS: Fix two bugs in the O_...
```diff diff --git a/fs/nfs/direct.c b/fs/nfs/direct.c index 32fe97211eea..afcab007a22b 100644 --- a/fs/nfs/direct.c +++ b/fs/nfs/direct.c @@ -549,13 +549,13 @@ static void nfs_direct_write_result(struct rpc_task *task, void *calldata) spin_lock(&dreq->lock); - if (unlikely(dreq->error != 0)) - goto out_unlock; ...
8c660065383976f09fbdae86c33448c8da643d4e
Analyze and fix the following issue in the Linux kernel code: x86: fix more TSC clock source calibration errors
Problem Details: The previous patch wasn't correctly handling the 'count' variable. If a CPU gave bad results on the 1st or 2nd run but good results on the 3rd, it wouldn't do the correct thing. No idea if any such CPU exists, but the patch below handles that case by discarding the bad runs. If a bad result (too qui...
```diff diff --git a/arch/x86/kernel/tsc_32.c b/arch/x86/kernel/tsc_32.c index f04d08a7d022..9ebc0dab66b4 100644 --- a/arch/x86/kernel/tsc_32.c +++ b/arch/x86/kernel/tsc_32.c @@ -137,31 +137,37 @@ unsigned long native_calculate_cpu_khz(void) local_irq_save(flags); - /* run 3 times to ensure the cache is warm */ +...
edaf420fdc122e7a42326fe39274c8b8c9b19d41
Analyze and fix the following issue in the Linux kernel code: x86: fix TSC clock source calibration error
Problem Details: I ran into this problem on a system that was unable to obtain NTP sync because the clock was running very slow (over 10000ppm slow). ntpd had declared all of its peers 'reject' with 'peer_dist' reason. On investigation, the tsc_khz variable was significantly incorrect causing xtime to run slow. After...
```diff diff --git a/arch/x86/kernel/tsc_32.c b/arch/x86/kernel/tsc_32.c index d78444c788a3..f04d08a7d022 100644 --- a/arch/x86/kernel/tsc_32.c +++ b/arch/x86/kernel/tsc_32.c @@ -131,7 +131,7 @@ unsigned long native_calculate_cpu_khz(void) { unsigned long long start, end; unsigned long count; - u64 delta64; + u64 ...
94d6a2b32864421467d48f9a3a1c7b1da1e1dadf
Analyze and fix the following issue in the Linux kernel code: [SCSI] qla2xxx: Fix issue where final flash-segment updates were falling into the slow-path write handler.
Problem Details: Original implementation would not use the burst-write mechanisms for requests equal to OPTROM_BURST_DWORDS transfer dwords. Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
```diff diff --git a/drivers/scsi/qla2xxx/qla_sup.c b/drivers/scsi/qla2xxx/qla_sup.c index c24f3d9dea76..ad2fa01bd233 100644 --- a/drivers/scsi/qla2xxx/qla_sup.c +++ b/drivers/scsi/qla2xxx/qla_sup.c @@ -643,7 +643,7 @@ qla24xx_write_flash_data(scsi_qla_host_t *ha, uint32_t *dwptr, uint32_t faddr, } /* Go with b...
117636092a87a28a013a4acb5de5492645ed620f
Analyze and fix the following issue in the Linux kernel code: [PATCH] Fix breakage after SG cleanups
Problem Details: Commits 58b053e4ce9d2fc3023645c1b96e537c72aa8d9a ("Update arch/ to use sg helpers") 45711f1af6eff1a6d010703b4862e0d2b9afd056 ("[SG] Update drivers to use sg helpers") fa05f1286be25a8ce915c5dd492aea61126b3f33 ("Update net/ to use sg helpers") converted many files to use the scatter gather helper...
```diff diff --git a/drivers/block/DAC960.c b/drivers/block/DAC960.c index 53505422867c..9030c373ce67 100644 --- a/drivers/block/DAC960.c +++ b/drivers/block/DAC960.c @@ -44,6 +44,7 @@ #include <linux/init.h> #include <linux/jiffies.h> #include <linux/random.h> +#include <linux/scatterlist.h> #include <asm/io.h> #...
0a976297e1f57a6d156d3f8ed7f10c64beb031a4
Analyze and fix the following issue in the Linux kernel code: 9p: fix memleak in fs/9p/v9fs.c
Problem Details: This patch fixes a memory leak introduced by commit ba17674fe02909fef049fd4b620a2805bdb8c693. Spotted by the Coverity checker. Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
```diff diff --git a/fs/9p/v9fs.c b/fs/9p/v9fs.c index 873802de21cd..756f7e9beb2e 100644 --- a/fs/9p/v9fs.c +++ b/fs/9p/v9fs.c @@ -162,6 +162,7 @@ static void v9fs_parse_options(struct v9fs_session_info *v9ses) if (*e != '\0') v9ses->uid = ~0; } + kfree(s); break; default: ```
891039a9c2ddf73754ad84cdc9d030f1c6431858
Analyze and fix the following issue in the Linux kernel code: xtensa: fix sg->page fallout
Problem Details: Signed-off-by: Emil Medve <Emilian.Medve@Freescale.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
```diff diff --git a/include/asm-xtensa/dma-mapping.h b/include/asm-xtensa/dma-mapping.h index 82b03b3a2ee6..8bd9d2c02a24 100644 --- a/include/asm-xtensa/dma-mapping.h +++ b/include/asm-xtensa/dma-mapping.h @@ -58,11 +58,10 @@ dma_map_sg(struct device *dev, struct scatterlist *sg, int nents, BUG_ON(direction == DMA_N...
4e0177647a3686f3658c26d52a60d0f1231c2127
Analyze and fix the following issue in the Linux kernel code: mmc: fix sg->page fallout
Problem Details: Signed-off-by: Emil Medve <Emilian.Medve@Freescale.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
```diff diff --git a/drivers/mmc/host/mmci.h b/drivers/mmc/host/mmci.h index 000e6a919782..0f39c490f022 100644 --- a/drivers/mmc/host/mmci.h +++ b/drivers/mmc/host/mmci.h @@ -169,7 +169,7 @@ static inline char *mmci_kmap_atomic(struct mmci_host *host, unsigned long *flag struct scatterlist *sg = host->sg_ptr; loc...
de26103de56a0c482ad21296eae9b06deefc8e62
Analyze and fix the following issue in the Linux kernel code: [SG] Add debug check for page alignment
Problem Details: Suggested by Boaz Harrosh <bharrosh@panasas.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
```diff diff --git a/include/linux/scatterlist.h b/include/linux/scatterlist.h index 42daf5e15265..df7ddcee7c4b 100644 --- a/include/linux/scatterlist.h +++ b/include/linux/scatterlist.h @@ -41,6 +41,11 @@ static inline void sg_set_page(struct scatterlist *sg, struct page *page) { unsigned long page_link = sg->page_...
a98ce5c6feead6bfedefabd46cb3d7f5be148d9a
Analyze and fix the following issue in the Linux kernel code: Fix synchronize_irq races with IRQ handler
Problem Details: As it is some callers of synchronize_irq rely on memory barriers to provide synchronisation against the IRQ handlers. For example, the tg3 driver does tp->irq_sync = 1; smp_mb(); synchronize_irq(); and then in the IRQ handler: if (!tp->irq_sync) netif_rx_schedule(dev, &tp->napi); Unfortunate...
```diff diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c index 80eab7a04205..1f314221d534 100644 --- a/kernel/irq/manage.c +++ b/kernel/irq/manage.c @@ -29,12 +29,28 @@ void synchronize_irq(unsigned int irq) { struct irq_desc *desc = irq_desc + irq; + unsigned int status; if (irq >= NR_IRQS) return; ...
c48f484b9b7c8444247706b3ad9050245b8062f9
Analyze and fix the following issue in the Linux kernel code: m68knommu: fix make archclean
Problem Details: Remove build reference to arch/m68knommu/boot directory, it doesn't exist. Signed-off-by: Greg Ungerer <gerg@uclinux.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/arch/m68knommu/Makefile b/arch/m68knommu/Makefile index 1235f8061d55..30aa2553693d 100644 --- a/arch/m68knommu/Makefile +++ b/arch/m68knommu/Makefile @@ -118,4 +118,4 @@ core-y += arch/m68knommu/kernel/ \ libs-y += arch/m68knommu/lib/ archclean: - $(Q)$(MAKE) $(clean)=arch/m68knommu/boot + ```
dbf18c8f62cd87473d6db8c16afe4207bc370d3e
Analyze and fix the following issue in the Linux kernel code: m68knommu: fix syscall restart handling
Problem Details: Fix system call restart handling. We can call directly to the restart handler, no need to back track through trap that isn't even implemented on m68knommu. Signed-off-by: Greg Ungerer <gerg@uclinux.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/arch/m68knommu/kernel/signal.c b/arch/m68knommu/kernel/signal.c index 437f8c6c14a0..70371378db86 100644 --- a/arch/m68knommu/kernel/signal.c +++ b/arch/m68knommu/kernel/signal.c @@ -781,15 +781,7 @@ asmlinkage int do_signal(sigset_t *oldset, struct pt_regs *regs) /* Did we come from a system call...
775ecf871413e72a07c26af7154ca67728e17798
Analyze and fix the following issue in the Linux kernel code: m68knommu: no separate stack region to report at startup
Problem Details: There is no separate stack region addresses to print at startup time, so remove it from the debug listing Signed-off-by: Greg Ungerer <gerg@uclinux.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/arch/m68knommu/kernel/setup.c b/arch/m68knommu/kernel/setup.c index 3f86ade3a22a..b2355eb0a412 100644 --- a/arch/m68knommu/kernel/setup.c +++ b/arch/m68knommu/kernel/setup.c @@ -188,11 +188,9 @@ void setup_arch(char **cmdline_p) "BSS=0x%06x-0x%06x\n", (int) &_stext, (int) &_etext, (int) &_sda...
151941a800fd9598d38f8b5a73de0471afe66507
Analyze and fix the following issue in the Linux kernel code: m68knommu: fix syscall tracing
Problem Details: Fix the system call code for handling syscall tracing, so strace and gdbserver work properly. This fix originally developed by Philippe De Muyter and Stuart Hughes. Signed-off-by: Greg Ungerer <gerg@uclinux.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/arch/m68knommu/platform/5307/entry.S b/arch/m68knommu/platform/5307/entry.S index a8cd867805ca..b333731b875a 100644 --- a/arch/m68knommu/platform/5307/entry.S +++ b/arch/m68knommu/platform/5307/entry.S @@ -74,7 +74,8 @@ ENTRY(system_call) movel %sp,%d2 /* get thread_info pointer */ andl #-THR...
7fa57a0cd98bdd163eeb5f15cbe234c3a0cf68a1
Analyze and fix the following issue in the Linux kernel code: Char: cyclades, fix potential NULL dereference
Problem Details: ztxdone is jumped to even if tty is NULL and tty_wakeup placed after this label doesn't expect NULLed parameter, so this will cause an oops in some situations (why they scheduled a wakeup there before remove bottom half processing patch?). wakeup only in the case when we have non-null tty struct. Spo...
```diff diff --git a/drivers/char/cyclades.c b/drivers/char/cyclades.c index d1bd0f08a331..e4f579c3e245 100644 --- a/drivers/char/cyclades.c +++ b/drivers/char/cyclades.c @@ -1602,8 +1602,8 @@ static void cyz_handle_tx(struct cyclades_port *info, info->icount.tx++; } #endif -ztxdone: tty_wakeup(tty); +ztxdon...
1ddd439ef987c9f0209e6ce824b67518f2afe67b
Analyze and fix the following issue in the Linux kernel code: fix mprotect vma_wants_writenotify prot
Problem Details: Fix mprotect bug in recent commit 3ed75eb8f1cd89565966599c4f77d2edb086d5b0 (setup vma->vm_page_prot by vm_get_page_prot()): the vma_wants_writenotify case was setting the same prot as when not. Nothing wrong with the use of protection_map[] in mmap_region(), but use vm_get_page_prot() there too in the...
```diff diff --git a/mm/mmap.c b/mm/mmap.c index 7a30c4988231..facc1a75bd4f 100644 --- a/mm/mmap.c +++ b/mm/mmap.c @@ -1171,8 +1171,7 @@ munmap_back: vm_flags = vma->vm_flags; if (vma_wants_writenotify(vma)) - vma->vm_page_prot = - protection_map[vm_flags & (VM_READ|VM_WRITE|VM_EXEC)]; + vma->vm_page_prot = v...
4ae3f847e49e3787eca91bced31f8fd328d50496
Analyze and fix the following issue in the Linux kernel code: md: raid5: fix clearing of biofill operations
Problem Details: ops_complete_biofill() runs outside of spin_lock(&sh->lock) and clears the 'pending' and 'ack' bits. Since the test_and_ack_op() macro only checks against 'complete' it can get an inconsistent snapshot of pending work. Move the clearing of these bits to handle_stripe5(), under the lock. Signed-off-b...
```diff diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c index 8ee181a01f52..80a67d789b72 100644 --- a/drivers/md/raid5.c +++ b/drivers/md/raid5.c @@ -376,7 +376,12 @@ static unsigned long get_stripe_work(struct stripe_head *sh) ack++; sh->ops.count -= ack; - BUG_ON(sh->ops.count < 0); + if (unlikely(sh->ops...
85bfb4da8cad483a4e550ec89060d05a4daf895b
Analyze and fix the following issue in the Linux kernel code: md: fix an unsigned compare to allow creation of bitmaps with v1.0 metadata
Problem Details: As page->index is unsigned, this all becomes an unsigned comparison, which almost always returns an error. Signed-off-by: Neil Brown <neilb@suse.de> Cc: Stable <stable@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/drivers/md/bitmap.c b/drivers/md/bitmap.c index 927cb34c4805..7c426d07a555 100644 --- a/drivers/md/bitmap.c +++ b/drivers/md/bitmap.c @@ -274,7 +274,7 @@ static int write_sb_page(struct bitmap *bitmap, struct page *page, int wait) if (bitmap->offset < 0) { /* DATA BITMAP METADATA */ ...
5688fe87a458a73d5066eee3d5c9891459ba70bf
Analyze and fix the following issue in the Linux kernel code: mv643xx_eth: Clean up mv643xx_eth.h
Problem Details: Apply the following cleanups to drivers/net/mv643xx_eth.h: * Change "#define<tab>" to "#define<space>". * Fix comment block style. * Wrap lines to fit in 80 columns. * Change "foo<<1" to "foo << 1". * Align addresses in the same column. * Parenthesize macro arguments. * Replace "(1<<24) | (1<<23) | (1<...
```diff diff --git a/drivers/net/mv643xx_eth.h b/drivers/net/mv643xx_eth.h index 90362714be39..ed8539762a64 100644 --- a/drivers/net/mv643xx_eth.h +++ b/drivers/net/mv643xx_eth.h @@ -14,9 +14,9 @@ /* Checksum offload for Tx works for most packets, but * fails if previous packet sent did not use hw csum */ -#define...
5a37cf19efcceae14c2078449e35b9f4eb3e63e4
Analyze and fix the following issue in the Linux kernel code: [MTD] [NOR] Fix deadlock in Intel chip driver caused by get_chip recursion
Problem Details: This patch solves kernel deadlock issue seen on JFFF2 simultaneous operations. Detailed investigation of the issue showed that the kernel deadlock is caused by tons of recursive get_chip calls. Signed-off-by: Alexey Korolev <akorolev@infradead.org> Acked-by: Nicolas Pitre <nico@cam.org> Signed-off-b...
```diff diff --git a/drivers/mtd/chips/cfi_cmdset_0001.c b/drivers/mtd/chips/cfi_cmdset_0001.c index 3aa3dca56ae6..a9eb1c516247 100644 --- a/drivers/mtd/chips/cfi_cmdset_0001.c +++ b/drivers/mtd/chips/cfi_cmdset_0001.c @@ -85,6 +85,7 @@ static int cfi_intelext_point (struct mtd_info *mtd, loff_t from, size_t len, stat...
ebc3bbcfcf0a7fed2ac82f1a849a5f92cf4c217f
Analyze and fix the following issue in the Linux kernel code: Fix sctp compile
Problem Details: sctp fails to compile with net/sctp/sm_make_chunk.c: In function 'sctp_pack_cookie': net/sctp/sm_make_chunk.c:1516: error: implicit declaration of function 'sg_init_table' net/sctp/sm_make_chunk.c:1517: error: implicit declaration of function 'sg_set_page' use the proper include file. SCTP maintainer...
```diff diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c index d5a9785a158b..658476c4d587 100644 --- a/net/sctp/sm_make_chunk.c +++ b/net/sctp/sm_make_chunk.c @@ -56,7 +56,7 @@ #include <linux/ipv6.h> #include <linux/net.h> #include <linux/inet.h> -#include <asm/scatterlist.h> +#include <linux/scatte...
86298962c06c2584a8c4df5fb92a70179ca7e4f5
Analyze and fix the following issue in the Linux kernel code: [AVR32] Fix a couple of sparse warnings
Problem Details: Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
```diff diff --git a/arch/avr32/mach-at32ap/extint.c b/arch/avr32/mach-at32ap/extint.c index 8acd01090031..f5bfd4c81fe7 100644 --- a/arch/avr32/mach-at32ap/extint.c +++ b/arch/avr32/mach-at32ap/extint.c @@ -142,7 +142,7 @@ static int eic_set_irq_type(unsigned int irq, unsigned int flow_type) return ret; } -struct ...
12d4d40e6fd583d32daeac0bc42123b23b7c40b7
Analyze and fix the following issue in the Linux kernel code: intel-iommu: fix sg_page()
Problem Details: Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
```diff diff --git a/drivers/pci/intel-iommu.c b/drivers/pci/intel-iommu.c index b3d70310af49..0c4ab3b07274 100644 --- a/drivers/pci/intel-iommu.c +++ b/drivers/pci/intel-iommu.c @@ -1962,7 +1962,7 @@ static void intel_free_coherent(struct device *hwdev, size_t size, free_pages((unsigned long)vaddr, order); } -#de...
b61e8f4844fd0767b656bd1f983933cc3d0102f3
Analyze and fix the following issue in the Linux kernel code: parisc: fix sg_page() fallout
Problem Details: arch/parisc/kernel/pci-dma.c: In function 'pa11_dma_map_sg': arch/parisc/kernel/pci-dma.c:487: error: 'struct scatterlist' has no member named 'page' arch/parisc/kernel/pci-dma.c: In function 'pa11_dma_unmap_sg': arch/parisc/kernel/pci-dma.c:508: error: 'struct scatterlist' has no member named 'page' a...
```diff diff --git a/arch/parisc/kernel/pci-dma.c b/arch/parisc/kernel/pci-dma.c index 41f8e321e34c..9448d4e91142 100644 --- a/arch/parisc/kernel/pci-dma.c +++ b/arch/parisc/kernel/pci-dma.c @@ -25,6 +25,7 @@ #include <linux/slab.h> #include <linux/string.h> #include <linux/types.h> +#include <linux/scatterlist.h> ...
dc81785dd620c770cf929ff25bb4720e91c23f7a
Analyze and fix the following issue in the Linux kernel code: ide: build fix
Problem Details: git-drivers/ide/ide-probe.c: In function 'hwif_init': drivers/ide/ide-probe.c:1327: error: implicit declaration of function 'sg_init_table' Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
```diff diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c index ec55a173c08a..6a6f2e066b46 100644 --- a/drivers/ide/ide-probe.c +++ b/drivers/ide/ide-probe.c @@ -47,6 +47,7 @@ #include <linux/spinlock.h> #include <linux/kmod.h> #include <linux/pci.h> +#include <linux/scatterlist.h> #include <asm/byte...
b3b724f48c0c0ade1d5120744cc5c9a3e5193d08
Analyze and fix the following issue in the Linux kernel code: net: fix xfrm build - missing scatterlist.h include
Problem Details: net/xfrm/xfrm_algo.c: In function 'skb_icv_walk': net/xfrm/xfrm_algo.c:555: error: implicit declaration of function 'sg_set_page' make[2]: *** [net/xfrm/xfrm_algo.o] Error 1 Cc: David Miller <davem@davemloft.net> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Jens Axboe <jens...
```diff diff --git a/net/xfrm/xfrm_algo.c b/net/xfrm/xfrm_algo.c index fb2220a719bd..313d4bed3aa9 100644 --- a/net/xfrm/xfrm_algo.c +++ b/net/xfrm/xfrm_algo.c @@ -13,6 +13,7 @@ #include <linux/kernel.h> #include <linux/pfkeyv2.h> #include <linux/crypto.h> +#include <linux/scatterlist.h> #include <net/xfrm.h> #if d...
5edadbd0ae35d2daabaf6b44f2c58d67d4021ed2
Analyze and fix the following issue in the Linux kernel code: powerpc: Fix fallout from sg_page() changes
Problem Details: Fix fallout from 18dabf473e15850c0dbc8ff13ac1e2806d542c15: In file included from include/linux/dma-mapping.h:52, from drivers/base/dma-mapping.c:10: include/asm/dma-mapping.h: In function 'dma_map_sg': include/asm/dma-mapping.h:288: error: 'struct scatterlist' has no member named 'pag...
```diff diff --git a/drivers/scsi/ps3rom.c b/drivers/scsi/ps3rom.c index 03f19b8d19c9..17b4a7c4618c 100644 --- a/drivers/scsi/ps3rom.c +++ b/drivers/scsi/ps3rom.c @@ -147,7 +147,7 @@ static int fetch_to_dev_buffer(struct scsi_cmnd *cmd, void *buf) req_len = fin = 0; scsi_for_each_sg(cmd, sgpnt, scsi_sg_count(cmd)...
c8ac5a7309c5060e27caf69403072f54e008ee54
Analyze and fix the following issue in the Linux kernel code: IB/ehca: Fix sg_page() fallout
Problem Details: More fallout from sg_page changes: drivers/infiniband/hw/ehca/ehca_mrmw.c: In function 'ehca_set_pagebuf_user1': drivers/infiniband/hw/ehca/ehca_mrmw.c:1779: error: 'struct scatterlist' has no member named 'page' drivers/infiniband/hw/ehca/ehca_mrmw.c: In function 'ehca_check_kpages_per_ate': drivers/...
```diff diff --git a/drivers/infiniband/hw/ehca/ehca_mrmw.c b/drivers/infiniband/hw/ehca/ehca_mrmw.c index da88738265ed..ead7230d7738 100644 --- a/drivers/infiniband/hw/ehca/ehca_mrmw.c +++ b/drivers/infiniband/hw/ehca/ehca_mrmw.c @@ -1776,7 +1776,7 @@ static int ehca_set_pagebuf_user1(struct ehca_mr_pginfo *pginfo, ...
9f2326be52f4fa83d20a75998cd3c87b300588c4
Analyze and fix the following issue in the Linux kernel code: arm: build fix
Problem Details: arch/arm/common/dmabounce.c: In function 'dma_map_sg': arch/arm/common/dmabounce.c:445: error: implicit declaration of function 'sg_page' Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
```diff diff --git a/arch/arm/common/dmabounce.c b/arch/arm/common/dmabounce.c index 9d371e476552..52fc6a883281 100644 --- a/arch/arm/common/dmabounce.c +++ b/arch/arm/common/dmabounce.c @@ -29,6 +29,7 @@ #include <linux/dma-mapping.h> #include <linux/dmapool.h> #include <linux/list.h> +#include <linux/scatterlist.h...
41923e441305728ba3640e773e55d16e4769145c
Analyze and fix the following issue in the Linux kernel code: [ALSA] hda-codec - Fix possible array overflow
Problem Details: dac_nids arrays in each codec support code may have up to 5 items when assigned from the auto-configurator. Some codec codes have less numbers than the possible max. This patch defines the constant and fixes the array definitions. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav K...
```diff diff --git a/sound/pci/hda/hda_local.h b/sound/pci/hda/hda_local.h index a708effdcdad..20c5e6250374 100644 --- a/sound/pci/hda/hda_local.h +++ b/sound/pci/hda/hda_local.h @@ -310,16 +310,17 @@ enum { extern const char *auto_pin_cfg_labels[AUTO_PIN_LAST]; +#define AUTO_CFG_MAX_OUTS 5 + struct auto_pin_cfg ...
35a1e0cce647737b88dac7ca526fc525d92b3fff
Analyze and fix the following issue in the Linux kernel code: [ALSA] hda-codec - Fix build without CONFIG_SND_HDA_GENERIC
Problem Details: Fixed the build error from patch_sigmatel.c when built without CONFIG_SND_HDA_GENERIC by defining a dummy function to return error. Also, clean up hda_codec.c by removing unneeded ifdefs (the compiler will optimize out). Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex...
```diff diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index 187533e477c6..ad4cb38109fc 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c @@ -626,24 +626,19 @@ int __devinit snd_hda_codec_new(struct hda_bus *bus, unsigned int codec_addr, snd_hda_get_codec_name(codec, bus->car...
c8229c38c61b1acab1f3fc28275690da71907248
Analyze and fix the following issue in the Linux kernel code: [ALSA] hda-codec - Fix Conexant 5045 volumes
Problem Details: Fixed the init verbs and added the missing volume controls so that the driver works again with Conexant 5045 codec chip. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
```diff diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c index 080e3001d9c5..7df9058b234c 100644 --- a/sound/pci/hda/patch_conexant.c +++ b/sound/pci/hda/patch_conexant.c @@ -554,10 +554,16 @@ static struct snd_kcontrol_new cxt5045_mixers[] = { .get = conexant_mux_enum_get, .put = cone...
9a2a763e08889318d7ace9f59d7963661a46d393
Analyze and fix the following issue in the Linux kernel code: [ALSA] hda-codec - Fix conflict of Master volume in STAC92xx codec
Problem Details: The addition of volume knob as Master volume resulted in conflict with the existing one by stac92xx_auto_create_hp_ctls(). This patch fixes the conflict, and still keeps the Master control for codecs without volume knob as much as possible. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Ja...
```diff diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index bf950195107c..f9b2c435a130 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c @@ -111,6 +111,7 @@ struct sigmatel_spec { unsigned int alt_switch: 1; unsigned int hp_detect: 1; unsigned int gpio...
44e0b6821d7eacb4f93d2c131d436f96e500aa08
Analyze and fix the following issue in the Linux kernel code: [ALSA] protect Dreamcast PCM driver (AICA) from G2 bus effects
Problem Details: The G2 bus on the SEGA Dreamcast connects both the maple peripheral bus and the AICA sound memory. DMA requests on one can cause the other to timeout on memory operations. This patch prevents maple interrupts from causing hiccoughs in the AICA sound (maple bus code will land in 2.6.24). There are other...
```diff diff --git a/sound/sh/aica.c b/sound/sh/aica.c index 131ec4812288..88dc840152ce 100644 --- a/sound/sh/aica.c +++ b/sound/sh/aica.c @@ -106,11 +106,14 @@ static void spu_write_wait(void) static void spu_memset(u32 toi, u32 what, int length) { int i; + unsigned long flags; snd_assert(length % 4 == 0, return...
e5ab3a7c00e682e0e24677203856769df1b9b0cb
Analyze and fix the following issue in the Linux kernel code: [ALSA] bt87x - Fix section mismatch
Problem Details: const and __devinit aren't a good pair, resulting in a section mismatch error. Let's remove const as a temporary solution. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
```diff diff --git a/sound/pci/bt87x.c b/sound/pci/bt87x.c index 91f9e6a112ff..f960b8209d1b 100644 --- a/sound/pci/bt87x.c +++ b/sound/pci/bt87x.c @@ -165,7 +165,7 @@ struct snd_bt87x_board { unsigned no_digital:1; /* No digital input */ }; -static const __devinitdata struct snd_bt87x_board snd_bt87x_boards[] = { ...
53eb1b85402f108d5151338cff4430f30fd9727f
Analyze and fix the following issue in the Linux kernel code: [ALSA] hda-codec - Fix AD1986A Lenovo auto-mute
Problem Details: The jack detection bit on AD1986A Lenovo N100 seems inverse from the standard definition. Now fixed the detection properly. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
```diff diff --git a/sound/pci/hda/patch_analog.c b/sound/pci/hda/patch_analog.c index 54cfd4526d20..9bf38f92ba74 100644 --- a/sound/pci/hda/patch_analog.c +++ b/sound/pci/hda/patch_analog.c @@ -612,7 +612,8 @@ static void ad1986a_hp_automute(struct hda_codec *codec) unsigned int present; present = snd_hda_codec_...
9823adf632c57e9728d651707abd324eb4454eb9
Analyze and fix the following issue in the Linux kernel code: [ALSA] This simplifies and fixes waiting loops of the mce_down()
Problem Details: function after Trent Piepho's patch for AD1848. It also makes busy_wait() function call not atomic. Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
```diff diff --git a/sound/sparc/cs4231.c b/sound/sparc/cs4231.c index 9785382a5f39..f8c7a120ccbb 100644 --- a/sound/sparc/cs4231.c +++ b/sound/sparc/cs4231.c @@ -400,65 +400,44 @@ static void snd_cs4231_mce_up(struct snd_cs4231 *chip) static void snd_cs4231_mce_down(struct snd_cs4231 *chip) { - unsigned long flags...
cc6d4fbcef328acdc9fa7023e69f39f753f72fe1
Analyze and fix the following issue in the Linux kernel code: Introduce "hcall" pointer to indicate pending hypercall.
Problem Details: Currently we look at the "trapnum" to see if the Guest wants a hypercall. But once the hypercall is done we have to reset trapnum to a bogus value, otherwise if we exit to userspace and return, we'd run the same hypercall twice (that was a nasty bug to find!). This has two main effects: 1) When Jes'...
```diff diff --git a/drivers/lguest/core.c b/drivers/lguest/core.c index 06869a2d3b40..02556bae9e9f 100644 --- a/drivers/lguest/core.c +++ b/drivers/lguest/core.c @@ -198,10 +198,10 @@ int run_guest(struct lguest *lg, unsigned long __user *user) { /* We stop running once the Guest is dead. */ while (!lg->dead) { -...
b45d8cb054d7677d75176ae22a584fd84e4650e9
Analyze and fix the following issue in the Linux kernel code: Make lguest_launcher.h types userspace-friendly
Problem Details: lguest_launcher.h uses "u32" not "__u32", which sets a bad example. Fix that, and include <linux/types.h>. This means we need to use -I on the Launcher build line so types.h is found. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
```diff diff --git a/Documentation/lguest/Makefile b/Documentation/lguest/Makefile index c0b7a4556390..526c15fd83af 100644 --- a/Documentation/lguest/Makefile +++ b/Documentation/lguest/Makefile @@ -11,7 +11,7 @@ endif include $(KBUILD_OUTPUT)/.config LGUEST_GUEST_TOP := ($(CONFIG_PAGE_OFFSET) - 0x08000000) -CFLAGS...
0895e91d60ef9bdef426d1ce14bb94bd5875870d
Analyze and fix the following issue in the Linux kernel code: procfs: fix kernel-doc param warnings
Problem Details: Fix mnt_flush_task() misplaced kernel-doc. Fix typos in some of the doc text. Warning(linux-2.6.23-git17//fs/proc/base.c:2280): No description found for parameter 'mnt' Warning(linux-2.6.23-git17//fs/proc/base.c:2280): No description found for parameter 'pid' Warning(linux-2.6.23-git17//fs/proc/base.c...
```diff diff --git a/fs/proc/base.c b/fs/proc/base.c index 39a3d7c969c5..aeaf0d0f2f51 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c @@ -2255,27 +2255,6 @@ static const struct inode_operations proc_tgid_base_inode_operations = { .setattr = proc_setattr, }; -/** - * proc_flush_task - Remove dcache entries for @t...
481968f44e81aac3b1b4863baf2c497ec46388f6
Analyze and fix the following issue in the Linux kernel code: auditsc: fix kernel-doc param warnings
Problem Details: Fix kernel-doc for auditsc parameter changes. Warning(linux-2.6.23-git17//kernel/auditsc.c:1623): No description found for parameter 'dentry' Warning(linux-2.6.23-git17//kernel/auditsc.c:1666): No description found for parameter 'dentry' Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-of...
```diff diff --git a/kernel/auditsc.c b/kernel/auditsc.c index 80ecab0942ef..bce9ecdb7712 100644 --- a/kernel/auditsc.c +++ b/kernel/auditsc.c @@ -1615,7 +1615,7 @@ static void audit_copy_inode(struct audit_names *name, const struct inode *inode /** * audit_inode - store the inode and device from a lookup * @name:...
3650b0a304663d98a63c68f9020eb1ded477989e
Analyze and fix the following issue in the Linux kernel code: ppc: fix AT_VECTOR_SIZE on arch/ppc
Problem Details: Commit 4f9a58d75bfe82ab2b8ba5b8506dfb190a267834 ("increase AT_VECTOR_SIZE to terminate saved_auxv properly") changes the size of AT_VECTOR_SIZE from hard coded '44' to a calculation based on the value of AT_VECTOR_SIZE_ARCH and AT_VECTOR_SIZE_BASE. The change works for arch/powerpc, but it breaks arch...
```diff diff --git a/include/asm-ppc/system.h b/include/asm-ppc/system.h index cc45780421ca..51df94c73846 100644 --- a/include/asm-ppc/system.h +++ b/include/asm-ppc/system.h @@ -33,6 +33,7 @@ #define set_mb(var, value) do { var = value; mb(); } while (0) +#define AT_VECTOR_SIZE_ARCH 6 /* entries in ARCH_DLINFO */...
5081dba6588a0c228821ede4635441f7758eb757
Analyze and fix the following issue in the Linux kernel code: Fix appletalk sysctl entry name
Problem Details: Gabriel C reported that modprobing appletalk on current git gives a warning in dmesg : "sysctl table check failed: /net/appletalk .3.7 procname does not match binary path procname" Oops. My apologies it appears I made a mistake when creating my table to check up on sysctl values. Signed-off-by: ...
```diff diff --git a/kernel/sysctl_check.c b/kernel/sysctl_check.c index 3c9ef5a7d575..ed6fe51df77a 100644 --- a/kernel/sysctl_check.c +++ b/kernel/sysctl_check.c @@ -731,7 +731,7 @@ static struct trans_ctl_table trans_net_table[] = { { NET_UNIX, "unix", trans_net_unix_table }, { NET_IPV4, "ipv4", trans_net_ipv...
17f690be454de447d8ddc586fa418ebfdb200966
Analyze and fix the following issue in the Linux kernel code: [MIPS] Kbuild: Use the new cc-cross-prefix feature.
Problem Details: Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
```diff diff --git a/arch/mips/Kconfig.debug b/arch/mips/Kconfig.debug index 3efe117721aa..fd7124c1b75a 100644 --- a/arch/mips/Kconfig.debug +++ b/arch/mips/Kconfig.debug @@ -6,18 +6,6 @@ config TRACE_IRQFLAGS_SUPPORT source "lib/Kconfig.debug" -config CROSSCOMPILE - bool "Are you using a crosscompiler" - help - ...
9490094b141003d692320113a662224a9fa2ef42
Analyze and fix the following issue in the Linux kernel code: [MIPS] Fix include wrapper symbol to something sane.
Problem Details: And why are there i8253.h and 8253pit.h ... Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
```diff diff --git a/include/asm-mips/i8253.h b/include/asm-mips/i8253.h index 8f689d7df6b1..affb32ce4af9 100644 --- a/include/asm-mips/i8253.h +++ b/include/asm-mips/i8253.h @@ -2,8 +2,8 @@ * Machine specific IO port address definition for generic. * Written by Osamu Tomita <tomita@cinet.co.jp> */ -#ifndef _MA...
508a775a3c9c6c3f952338f6722ea8bc92899962
Analyze and fix the following issue in the Linux kernel code: [MIPS] time: Fix calculation in clockevent_set_clock()
Problem Details: Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
```diff diff --git a/arch/mips/kernel/time.c b/arch/mips/kernel/time.c index c4e6866d5cbc..6c6849a8f136 100644 --- a/arch/mips/kernel/time.c +++ b/arch/mips/kernel/time.c @@ -195,8 +195,8 @@ void __cpuinit clockevent_set_clock(struct clock_event_device *cd, /* Find a shift value */ for (shift = 32; shift > 0; shi...
18a7247d1bb2e2dcbab628d7e786d03df5bf1eed
Analyze and fix the following issue in the Linux kernel code: [CPUFREQ] Fix up whitespace in conservative governor.
Problem Details: Signed-off-by: Dave Jones <davej@redhat.com>
```diff diff --git a/drivers/cpufreq/cpufreq_conservative.c b/drivers/cpufreq/cpufreq_conservative.c index 57d02e990af3..1bba99747f5b 100644 --- a/drivers/cpufreq/cpufreq_conservative.c +++ b/drivers/cpufreq/cpufreq_conservative.c @@ -37,17 +37,17 @@ #define DEF_FREQUENCY_UP_THRESHOLD (80) #define DEF_FREQUENCY_DOWN...
631bcfbbc5be0d778a2513988a56e5bd53bfb495
Analyze and fix the following issue in the Linux kernel code: kbuild: cc-cross-prefix spelling
Problem Details: Spelling fixes for cc-cross-prefix documentation Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
```diff diff --git a/Documentation/kbuild/makefiles.txt b/Documentation/kbuild/makefiles.txt index 6166e2d7da76..7a7753321a26 100644 --- a/Documentation/kbuild/makefiles.txt +++ b/Documentation/kbuild/makefiles.txt @@ -519,17 +519,17 @@ more details, with real examples. to the user why it stops. cc-cross-prefi...
d8d2e78a061e1ace98544b100b7837c620fbb950
Analyze and fix the following issue in the Linux kernel code: kbuild: allow depmod in cross builds again
Problem Details: depmod from module-init-tools 3.3-pre2 are reported to work fine in cross build. depmod from module-init-tools 3.1-pre5 are known to SEGV Do not workaround older module-init-tools bugs here. The right fix is for users to upgrade module-init-tools. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: Ge...
```diff diff --git a/Makefile b/Makefile index f4238b2739e8..264f37b8b263 100644 --- a/Makefile +++ b/Makefile @@ -1505,7 +1505,7 @@ quiet_cmd_rmfiles = $(if $(wildcard $(rm-files)),CLEAN $(wildcard $(rm-files)) # and we build for the host arch quiet_cmd_depmod = DEPMOD $(KERNELRELEASE) cmd_depmod = \ - if ...
ab19f8794a66910ef9b33041ccfa05b6b12ab6c9
Analyze and fix the following issue in the Linux kernel code: kbuild: fix modules_install after a 'make vmlinux'
Problem Details: make vmlinux would delete the content of $(MODVERDIR) equals .tmp_versions. This caused a subsequent make modules_install to fail. Fix it so we clean the directory only for the modules build - but we still unconditionally create it so we can do: make dir/file.ko without a preceeding make modules. Rep...
```diff diff --git a/Makefile b/Makefile index 50bb50defe18..f4238b2739e8 100644 --- a/Makefile +++ b/Makefile @@ -1512,8 +1512,9 @@ quiet_cmd_depmod = DEPMOD $(KERNELRELEASE) fi # Create temporary dir for module support files -cmd_crmodverdir = $(Q)mkdir -p $(MODVERDIR); rm -f $(MODVERDIR)/* - +# clean it up onl...
00bf4098beb15ca174b54f3af1f1e1908d7d18a3
Analyze and fix the following issue in the Linux kernel code: kexec: add BSS to resource tree
Problem Details: Add the BSS to the resource tree just as kernel text and kernel data are in the resource tree. The main reason behind this is to avoid crashkernel reservation in that area. While it's not strictly necessary to have the BSS in the resource tree (the actual collision detection is done in the reserve_bo...
```diff diff --git a/arch/ia64/kernel/efi.c b/arch/ia64/kernel/efi.c index 8e4894b205e2..3f7ea13358e9 100644 --- a/arch/ia64/kernel/efi.c +++ b/arch/ia64/kernel/efi.c @@ -1090,7 +1090,8 @@ efi_memmap_init(unsigned long *s, unsigned long *e) void efi_initialize_iomem_resources(struct resource *code_resource, - ...
358dd8ac53a3bdafe62e3319e30627f3fef3a7b0
Analyze and fix the following issue in the Linux kernel code: intel-iommu: fix for IOMMU early crash
Problem Details: pci_dev's->sysdata is highly overloaded and currently IOMMU is broken due to IOMMU code depending on this field. This patch introduces new field in pci_dev's dev.archdata struct to hold IOMMU specific per device IOMMU private data. Signed-off-by: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com> ...
```diff diff --git a/drivers/pci/intel-iommu.c b/drivers/pci/intel-iommu.c index dab329f01584..8f372c8f3d87 100644 --- a/drivers/pci/intel-iommu.c +++ b/drivers/pci/intel-iommu.c @@ -1348,7 +1348,7 @@ static void domain_remove_dev_info(struct dmar_domain *domain) list_del(&info->link); list_del(&info->global); ...
49a0429e53f29109cbf1eadd89497286ba81f1ae
Analyze and fix the following issue in the Linux kernel code: Intel IOMMU: Iommu floppy workaround
Problem Details: This config option (DMAR_FLPY_WA) sets up 1:1 mapping for the floppy device so that the floppy device which does not use DMA api's will continue to work. Once the floppy driver starts using DMA api's this config option can be turn off or this patch can be yanked out of kernel at that time. [akpm@linu...
```diff diff --git a/arch/x86_64/Kconfig b/arch/x86_64/Kconfig index 5cf941774347..c2d24991bb2b 100644 --- a/arch/x86_64/Kconfig +++ b/arch/x86_64/Kconfig @@ -772,6 +772,16 @@ config DMAR_GFX_WA all the OS-visible memory. Hence the driver can continue to use physical addresses for DMA. +config DMAR_FLOPPY_WA + ...
e820482cd2621dba60e403af1c54502daa54b220
Analyze and fix the following issue in the Linux kernel code: Intel IOMMU: Iommu Gfx workaround
Problem Details: When we fix all the opensource gfx drivers to use the DMA api's, at that time we can yank this config options out. [jengelh@computergmbh.de: Kconfig fixes] Signed-off-by: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com> Cc: Andi Kleen <ak@suse.de> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: M...
```diff diff --git a/Documentation/Intel-IOMMU.txt b/Documentation/Intel-IOMMU.txt index aba7722c2935..c2321903aa09 100644 --- a/Documentation/Intel-IOMMU.txt +++ b/Documentation/Intel-IOMMU.txt @@ -57,6 +57,11 @@ Graphics Problems? If you encounter issues with graphics devices, you can try adding option intel_iommu=...
f8de50eb6b085572ea773f26e066835ea3d3028b
Analyze and fix the following issue in the Linux kernel code: Intel IOMMU: IOVA allocation and management routines
Problem Details: This code implements a generic IOVA allocation and management. As per Dave's suggestion we are now allocating IO virtual address from Higher DMA limit address rather than lower end address and this eliminated the need to preserve the IO virtual address for multiple devices sharing the same domain virt...
```diff diff --git a/drivers/pci/iova.c b/drivers/pci/iova.c new file mode 100644 index 000000000000..717fafaa7e02 --- /dev/null +++ b/drivers/pci/iova.c @@ -0,0 +1,357 @@ +/* + * Copyright (c) 2006, Intel Corporation. + * + * This file is released under the GPLv2. + * + * Copyright (C) 2006 Anil S Keshavamurthy <anil....
89910cccb8fec0c1140d33a743e72a712efd4f05
Analyze and fix the following issue in the Linux kernel code: ext2: avoid rec_len overflow with 64KB block size
Problem Details: With 64KB blocksize, a directory entry can have size 64KB which does not fit into 16 bits we have for entry length. So we store 0xffff instead and convert the value when read from / written to disk. [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Jan Kara <jack@suse.cz> Cc: <linux-ext4...
```diff diff --git a/fs/ext2/dir.c b/fs/ext2/dir.c index 05d9342bb64e..d868e26c15eb 100644 --- a/fs/ext2/dir.c +++ b/fs/ext2/dir.c @@ -28,6 +28,24 @@ typedef struct ext2_dir_entry_2 ext2_dirent; +static inline unsigned ext2_rec_len_from_disk(__le16 dlen) +{ + unsigned len = le16_to_cpu(dlen); + + if (len == EXT2_M...
b68680e4731abbd78863063aaa0dca2a6d8cc723
Analyze and fix the following issue in the Linux kernel code: capabilities: clean up file capability reading
Problem Details: Simplify the vfs_cap_data structure. Also fix get_file_caps which was declaring __le32 v1caps[XATTR_CAPS_SZ] on the stack, but XATTR_CAPS_SZ is already * sizeof(__le32). [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Serge E. Hallyn <serue@us.ibm.com> Cc: Andrew Morgan <morgan@kernel....
```diff diff --git a/include/linux/capability.h b/include/linux/capability.h index 7a8d7ade28a0..bb017edffd56 100644 --- a/include/linux/capability.h +++ b/include/linux/capability.h @@ -56,10 +56,8 @@ typedef struct __user_cap_data_struct { struct vfs_cap_data { __u32 magic_etc; /* Little endian */ - struct { - ...
b9049e234401e1fad8459d69a952b174d76c399d
Analyze and fix the following issue in the Linux kernel code: memory hotplug: make kmem_cache_node for SLUB on memory online avoid panic
Problem Details: Fix a panic due to access NULL pointer of kmem_cache_node at discard_slab() after memory online. When memory online is called, kmem_cache_nodes are created for all SLUBs for new node whose memory are available. slab_mem_going_online_callback() is called to make kmem_cache_node() in callback of memory...
```diff diff --git a/include/linux/memory.h b/include/linux/memory.h index ec376e482abb..33f0ff0cf634 100644 --- a/include/linux/memory.h +++ b/include/linux/memory.h @@ -83,10 +83,14 @@ extern int memory_notify(unsigned long val, void *v); #endif /* CONFIG_MEMORY_HOTPLUG_SPARSE */ +#ifdef CONFIG_MEMORY_HOTPLUG #...
7b78d335ac15b10bbcb0397c635d7f0d569b0270
Analyze and fix the following issue in the Linux kernel code: memory hotplug: rearrange memory hotplug notifier
Problem Details: Current memory notifier has some defects yet. (Fortunately, nothing uses it.) This patch is to fix and rearrange for them. - Add information of start_pfn, nr_pages, and node id if node status is changes from/to memoryless node for callback functions. Callbacks can't do anything without thos...
```diff diff --git a/drivers/base/memory.c b/drivers/base/memory.c index c41d0728efe2..7868707c7eda 100644 --- a/drivers/base/memory.c +++ b/drivers/base/memory.c @@ -137,7 +137,7 @@ static ssize_t show_mem_state(struct sys_device *dev, char *buf) return len; } -static inline int memory_notify(unsigned long val, v...
f40aa808bad19a079a0e122e326d6970df141afb
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (6382): saa7134: fix NULL dereference at suspend time for cards without IR receiver
Problem Details: Calling saa7134_ir_stop at suspend is no good idea for saa7134 cards without remote control. Signed-off-by: Matthias Schwarzott <zzam@gentoo.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
```diff diff --git a/drivers/media/video/saa7134/saa7134-core.c b/drivers/media/video/saa7134/saa7134-core.c index 410242a91f43..a499eea379e6 100644 --- a/drivers/media/video/saa7134/saa7134-core.c +++ b/drivers/media/video/saa7134/saa7134-core.c @@ -1189,7 +1189,9 @@ static int saa7134_suspend(struct pci_dev *pci_dev ...
e7222ca9b4e6c6cdabedd8d33da59263ace85a02
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (6350): V4L: possible leak in em28xx_init_isoc
Problem Details: Coverity (CID 1929) spotted the following: if a transfer buffer allocation fails, the last allocated urb is leaked (it hasn't been stored in dev->urb[] yet so em28xx_uninit_isoc misses it). The patch also includes a small typo fix. Signed-off-by: Florin Malita <fmalita@gmail.com> Signed-off-by: Mauro ...
```diff diff --git a/drivers/media/video/em28xx/em28xx-core.c b/drivers/media/video/em28xx/em28xx-core.c index d3282ec62c5b..d56484f20467 100644 --- a/drivers/media/video/em28xx/em28xx-core.c +++ b/drivers/media/video/em28xx/em28xx-core.c @@ -648,7 +648,7 @@ void em28xx_uninit_isoc(struct em28xx *dev) */ int em28xx_...
254d6eb1159f7398273fe35e7499f905a903f38d
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (6347): ivtv: fix video mute when radio is used
Problem Details: When the radio is active the video should be muted when a capture starts. However, this was done at the wrong time and the mute settings were overwritten when cx2341x_update was called. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
```diff diff --git a/drivers/media/video/ivtv/ivtv-streams.c b/drivers/media/video/ivtv/ivtv-streams.c index 6c954b36ee88..aa03e61ef310 100644 --- a/drivers/media/video/ivtv/ivtv-streams.c +++ b/drivers/media/video/ivtv/ivtv-streams.c @@ -441,6 +441,7 @@ int ivtv_start_v4l2_encode_stream(struct ivtv_stream *s) { u32...
195b1252517d504391d29f71b789d4c1c9f605e0
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (6346): ivtvfb: YUV output size fix when ivtvfb is not loaded
Problem Details: If the ivtvfb module isn't loaded, the valid YUV output area should be set to full-screen. This patch fixes the case where the valid output area was not reset when the output broadcast format was changed from NTSC to PAL. This resulted in output being limited to the top 480 lines of the display. Signe...
```diff diff --git a/drivers/media/video/ivtv/ivtv-yuv.c b/drivers/media/video/ivtv/ivtv-yuv.c index 13c358242bbc..9091c4837bbc 100644 --- a/drivers/media/video/ivtv/ivtv-yuv.c +++ b/drivers/media/video/ivtv/ivtv-yuv.c @@ -857,95 +857,101 @@ void ivtv_yuv_work_handler (struct ivtv *itv) static void ivtv_yuv_init (st...
18e16f9c954c6a931ee97584014c826255e0bdaa
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (6342): ivtv: fix circular locking (bug 9037)
Problem Details: If you try to access the video device from within an udev rule, then you get into a circular locking situation. Changed the driver to postpone the registration of the devices until everything else has been fully initialized, so that the newly created device can be used immediately. Signed-off-by: Han...
```diff diff --git a/drivers/media/video/ivtv/ivtv-driver.c b/drivers/media/video/ivtv/ivtv-driver.c index fd7a932e1d33..6d2dd8764f81 100644 --- a/drivers/media/video/ivtv/ivtv-driver.c +++ b/drivers/media/video/ivtv/ivtv-driver.c @@ -1003,8 +1003,6 @@ static int __devinit ivtv_probe(struct pci_dev *dev, IVTV_DEBUG...
34ca7d3791c6a467ff6810a149bdf78be086c23a
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (6341): ivtv: fix resizing MPEG1 streams
Problem Details: Resizing an MPEG 1 stream would cut off the right half of the image due to a missing divide by 2 in VIDIOC_S_FMT. Also did some minor cleanup in this part of the code. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
```diff diff --git a/drivers/media/video/ivtv/ivtv-ioctl.c b/drivers/media/video/ivtv/ivtv-ioctl.c index 206eee7542db..fd6826f472e3 100644 --- a/drivers/media/video/ivtv/ivtv-ioctl.c +++ b/drivers/media/video/ivtv/ivtv-ioctl.c @@ -555,6 +555,7 @@ static int ivtv_try_or_set_fmt(struct ivtv *itv, int streamtype, /* s...
af3420b4495914a1a889ae7de0220c793461ba1f
Analyze and fix the following issue in the Linux kernel code: V4L/DVB (6338): ivtv: fix incorrect EBUSY return
Problem Details: Trying to open the radio when a capture is in progress will make it impossible to open the radio again since the radio stream wasn't released. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
```diff diff --git a/drivers/media/video/ivtv/ivtv-fileops.c b/drivers/media/video/ivtv/ivtv-fileops.c index 0e0605cc0bd3..24fcbb88e529 100644 --- a/drivers/media/video/ivtv/ivtv-fileops.c +++ b/drivers/media/video/ivtv/ivtv-fileops.c @@ -892,6 +892,7 @@ static int ivtv_serialized_open(struct ivtv_stream *s, struct fil...