id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
56825c88ff438f4dbb51a44591cc29e707fe783a
Analyze and fix the following issue in the Linux kernel code: powerpc/cpm: Reintroduce global spi_pram struct (fixes build issue)
Problem Details: spi_t was removed in commit 644b2a680ccc51a9ec4d6beb12e9d47d2dee98e2 ("powerpc/cpm: Remove SPI defines and spi structs"), the commit assumed that spi_t isn't used anywhere outside of the spi_mpc8xxx driver. But it appears that the struct is needed for micropatch code. So, let's reintroduce the struct. ...
```diff diff --git a/arch/powerpc/include/asm/cpm.h b/arch/powerpc/include/asm/cpm.h index 0835eb977ba9..e50323fe941f 100644 --- a/arch/powerpc/include/asm/cpm.h +++ b/arch/powerpc/include/asm/cpm.h @@ -6,6 +6,30 @@ #include <linux/errno.h> #include <linux/of.h> +/* + * SPI Parameter RAM common to QE and CPM. + */ ...
9442e54f433eff9b6fbd0836611df4c1919df370
Analyze and fix the following issue in the Linux kernel code: omfs: refuse to mount if bitmap pointer is obviously wrong
Problem Details: If the free space bitmap pointer is corrupted such that it lies outside of the number of blocks in the filesystem, print a message and fail the mount so the user can fix it offline. Signed-off-by: Bob Copeland <me@bobcopeland.com>
```diff diff --git a/fs/omfs/inode.c b/fs/omfs/inode.c index bd4bf753a63b..0af5d0af9f32 100644 --- a/fs/omfs/inode.c +++ b/fs/omfs/inode.c @@ -509,6 +509,15 @@ static int omfs_fill_super(struct super_block *sb, void *data, int silent) goto out_brelse_bh2; } + if (sbi->s_bitmap_ino != ~0ULL && + sbi->s_bitmap...
ac78884e6d89714d18b32b5b7d574116ecfb7c88
Analyze and fix the following issue in the Linux kernel code: ARM: lockdep: fix unannotated irqs-on
Problem Details: CPU: Testing write buffer coherency: ok ------------[ cut here ]------------ WARNING: at kernel/lockdep.c:3145 check_flags+0xcc/0x1dc() Modules linked in: [<c0035120>] (unwind_backtrace+0x0/0xf8) from [<c0355374>] (dump_stack+0x20/0x24) [<c0355374>] (dump_stack+0x20/0x24) from [<c0060c04>] (warn_slowpa...
```diff diff --git a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S index 7ee48e7f8f31..3fd7861de4d1 100644 --- a/arch/arm/kernel/entry-armv.S +++ b/arch/arm/kernel/entry-armv.S @@ -162,8 +162,6 @@ ENDPROC(__und_invalid) @ r4 - orig_r0 (see pt_regs definition in ptrace.h) @ stmia r5, {r0 - r4} - - a...
102b59c6d6d30fb6560177fd1ae8a34c4c163897
Analyze and fix the following issue in the Linux kernel code: i2c/mips: Fix error return codes from Sibyte i2c bus driver
Problem Details: Sibyte i2c bus driver returns non-descriptive error values. Update to return error values as defined in Documentation/i2c/fault-codes. Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
```diff diff --git a/drivers/i2c/busses/i2c-sibyte.c b/drivers/i2c/busses/i2c-sibyte.c index 3d76a188e42f..0fe505d7abe9 100644 --- a/drivers/i2c/busses/i2c-sibyte.c +++ b/drivers/i2c/busses/i2c-sibyte.c @@ -94,7 +94,7 @@ static int smbus_xfer(struct i2c_adapter *i2c_adap, u16 addr, } break; default: - return -...
827900c55665dc8e20b05bb18d3f6e078eaa6183
Analyze and fix the following issue in the Linux kernel code: i2c: Fix probability check
Problem Details: The new unified probing function differs from the original code, and the preliminary test whether probing is possible must be updated accordingly. Signed-off-by: Jean Delvare <khali@linux-fr.org>
```diff diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c index 1cca2631e5b3..0815e10da7c6 100644 --- a/drivers/i2c/i2c-core.c +++ b/drivers/i2c/i2c-core.c @@ -1428,13 +1428,12 @@ static int i2c_detect(struct i2c_adapter *adapter, struct i2c_driver *driver) if (!(adapter->class & driver->class)) goto ex...
3cfde79c6c7c8002375c4a8e5be7f602fbb9675d
Analyze and fix the following issue in the Linux kernel code: net: Get rid of rtnl_link_stats64 / net_device_stats union
Problem Details: In commit be1f3c2c027cc5ad735df6a45a542ed1db7ec48b "net: Enable 64-bit net device statistics on 32-bit architectures" I redefined struct net_device_stats so that it could be used in a union with struct rtnl_link_stats64, avoiding the need for explicit copying or conversion between the two. However, th...
```diff diff --git a/drivers/net/macvlan.c b/drivers/net/macvlan.c index 6112f1498940..1b28aaec0a5a 100644 --- a/drivers/net/macvlan.c +++ b/drivers/net/macvlan.c @@ -436,7 +436,7 @@ static struct rtnl_link_stats64 *macvlan_dev_get_stats64(struct net_device *dev, { struct macvlan_dev *vlan = netdev_priv(dev); - de...
f91d3471ccf1ca9a795f46c94b1ded8dd219940c
Analyze and fix the following issue in the Linux kernel code: ceph: fix creation of ipv6 sockets
Problem Details: Use the address family from the peer address instead of assuming IPv4. Signed-off-by: Sage Weil <sage@newdream.net>
```diff diff --git a/fs/ceph/messenger.c b/fs/ceph/messenger.c index 3ddef1556457..15167b2daa55 100644 --- a/fs/ceph/messenger.c +++ b/fs/ceph/messenger.c @@ -203,12 +203,13 @@ static void set_sock_callbacks(struct socket *sock, */ static struct socket *ceph_tcp_connect(struct ceph_connection *con) { - struct socka...
39139f64e14684cf2370770deb79d929d27cfd9b
Analyze and fix the following issue in the Linux kernel code: ceph: fix parsing of ipv6 addresses
Problem Details: Check for brackets around the ipv6 address to avoid ambiguity with the port number. Signed-off-by: Sage Weil <sage@newdream.net>
```diff diff --git a/fs/ceph/messenger.c b/fs/ceph/messenger.c index e8c5a2d0e88f..3ddef1556457 100644 --- a/fs/ceph/messenger.c +++ b/fs/ceph/messenger.c @@ -997,19 +997,32 @@ int ceph_parse_ips(const char *c, const char *end, struct sockaddr_in *in4 = (void *)ss; struct sockaddr_in6 *in6 = (void *)ss; int po...
44a54f787c0abcf75a2ed49b8ec8b2b512468f73
Analyze and fix the following issue in the Linux kernel code: tracing: Add alignment to syscall metadata declarations
Problem Details: For some reason if we declare a static variable and then assign it later, and the assignment contains a __attribute__((__aligned__(#))), some versions of gcc will ignore it. This caused the syscall meta data to not be compact in its section and caused a kernel oops when the section was being read. Th...
```diff diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index 7f614ce274a9..13ebb5413a79 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h @@ -124,7 +124,8 @@ extern struct trace_event_functions enter_syscall_print_funcs; extern struct trace_event_functions exit_syscall_print_funcs;...
35be1b716a475717611b2dc04185e9d80b9cb693
Analyze and fix the following issue in the Linux kernel code: x86, ioremap: Fix normal ram range check
Problem Details: Check for normal RAM in x86 ioremap() code seems to not work for the last page frame in the specified physical address range. Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com> LKML-Reference: <4C1AE6CD.1080704@jp.fujitsu.com> Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
```diff diff --git a/arch/x86/mm/ioremap.c b/arch/x86/mm/ioremap.c index 754cb4cbce66..d41d3a9036ca 100644 --- a/arch/x86/mm/ioremap.c +++ b/arch/x86/mm/ioremap.c @@ -101,7 +101,7 @@ static void __iomem *__ioremap_caller(resource_size_t phys_addr, * Don't allow anybody to remap normal RAM that we're using.. */ ...
ffa71f33a820d1ab3f2fc5723819ac60fb76080b
Analyze and fix the following issue in the Linux kernel code: x86, ioremap: Fix incorrect physical address handling in PAE mode
Problem Details: Current x86 ioremap() doesn't handle physical address higher than 32-bit properly in X86_32 PAE mode. When physical address higher than 32-bit is passed to ioremap(), higher 32-bits in physical address is cleared wrongly. Due to this bug, ioremap() can map wrong address to linear address space. In my ...
```diff diff --git a/arch/x86/mm/ioremap.c b/arch/x86/mm/ioremap.c index 12e4d2d3c110..754cb4cbce66 100644 --- a/arch/x86/mm/ioremap.c +++ b/arch/x86/mm/ioremap.c @@ -62,8 +62,8 @@ int ioremap_change_attr(unsigned long vaddr, unsigned long size, static void __iomem *__ioremap_caller(resource_size_t phys_addr, unsig...
9726f347f82b0ce802530deb00ee2dde369e1d2f
Analyze and fix the following issue in the Linux kernel code: iwlagn: fix the bit mask of a FH register in stop Tx DMA flow
Problem Details: When we stop the Tx DMA channels, we poll bits 16:31 in FH_TSSR_RX_STATUS_REG. From 4965 and up, only the bits 16:26 are legal. Bits 27:31 are not used and are always unset. Polling them will lead to fail on timeout but since the timeout is quite small, the stall was not felt. Signed-off-by: Emmanuel ...
```diff diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-tx.c b/drivers/net/wireless/iwlwifi/iwl-agn-tx.c index 2573234e4db1..55a1b31fd09a 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-tx.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-tx.c @@ -950,9 +950,12 @@ void iwlagn_txq_ctx_stop(struct iwl_priv *priv) /* Sto...
faabd47f7e3a36574abcdff0b3506abb092bbe24
Analyze and fix the following issue in the Linux kernel code: hwmon: Fix autoloading of fschmd on recent Fujitsu machines
Problem Details: Fujitsu slightly changed the DMI strings in their recent machines, (for example the D2778) and this breaks the automatic loading of the needed fschmd driver. Being more tolerant on string comparison fixes the issue. This closes bug #15634: https://bugzilla.kernel.org/show_bug.cgi?id=15634 Signed-off-...
```diff diff --git a/drivers/i2c/busses/i2c-i801.c b/drivers/i2c/busses/i2c-i801.c index f4b21f2bb8ed..c60081169cc3 100644 --- a/drivers/i2c/busses/i2c-i801.c +++ b/drivers/i2c/busses/i2c-i801.c @@ -655,7 +655,7 @@ static void __devinit dmi_check_onboard_device(u8 type, const char *name, /* & ~0x80, ignore enabled/d...
436cad2a41a40c6c32bd9152b63d17eeb1f7c99b
Analyze and fix the following issue in the Linux kernel code: hwmon: (it87) Fix in7 on IT8720F
Problem Details: The IT8720F has no VIN7 pin, so VCCH should always be routed internally to VIN7 with an internal divider. Curiously, there still is a configuration bit to control this, which means it can be set incorrectly. And even more curiously, many boards out there are improperly configured, even though the IT872...
```diff diff --git a/drivers/hwmon/it87.c b/drivers/hwmon/it87.c index 5be09c048c5f..25763d2223b6 100644 --- a/drivers/hwmon/it87.c +++ b/drivers/hwmon/it87.c @@ -80,6 +80,13 @@ superio_inb(int reg) return inb(VAL); } +static inline void +superio_outb(int reg, int val) +{ + outb(reg, REG); + outb(val, VAL); +} + ...
d535bad90dad4eb42ec6528043fcfb53627d4f89
Analyze and fix the following issue in the Linux kernel code: hwmon: (k8temp) Fix temperature reporting for ASB1 processor revisions
Problem Details: Reported temperature for ASB1 CPUs is too high. Add ASB1 CPU revisions (these are also non-desktop variants) to the list of CPUs for which the temperature fixup is not required. Example: (from LENOVO ThinkPad Edge 13, 01972NG, system was idle) Current kernel reports $ sensors k8temp-pci-00c3 ...
```diff diff --git a/drivers/hwmon/k8temp.c b/drivers/hwmon/k8temp.c index f26acdb11681..8bdf80d91598 100644 --- a/drivers/hwmon/k8temp.c +++ b/drivers/hwmon/k8temp.c @@ -180,11 +180,13 @@ static int __devinit k8temp_probe(struct pci_dev *pdev, } if ((model >= 0x69) && - !(model == 0xc1 || model == 0x6c ||...
d9e38040ccf9eb06b9b41c393c512ceb23f51a7f
Analyze and fix the following issue in the Linux kernel code: ARM: 6184/2: ux500: use neutral PRCMU base
Problem Details: The MTU wallclock timing fix-up patch was hardwired to the DB8500 causing a regression. This makes it work on the DB5500 as well. Signed-off-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
```diff diff --git a/arch/arm/mach-ux500/clock.c b/arch/arm/mach-ux500/clock.c index fe84b9021c7a..0a1318fc8e2b 100644 --- a/arch/arm/mach-ux500/clock.c +++ b/arch/arm/mach-ux500/clock.c @@ -131,7 +131,7 @@ EXPORT_SYMBOL(clk_disable); */ static unsigned long clk_mtu_get_rate(struct clk *clk) { - void __iomem *addr ...
48f1d5a3cef5782cbc7a32c29f1eda2342877c13
Analyze and fix the following issue in the Linux kernel code: ARM: 6204/1: Fixups for the RealView PB1176
Problem Details: This is a number of basic fixes to the PB1176 that makes it tick properly: - Detect MMC insertion/removal even when PL061 GPIO is not compiled in. The register to read this status directly is removed on the PB1176. - Define the UART3 on the DevChip (where is actually is) and define the new UART4...
```diff diff --git a/arch/arm/mach-realview/core.c b/arch/arm/mach-realview/core.c index 595be19f8ad5..9e17b4afc47e 100644 --- a/arch/arm/mach-realview/core.c +++ b/arch/arm/mach-realview/core.c @@ -232,6 +232,21 @@ static unsigned int realview_mmc_status(struct device *dev) struct amba_device *adev = container_of(de...
398aa66827155ef52bab58bebd24597d90968929
Analyze and fix the following issue in the Linux kernel code: ARM: 6212/1: atomic ops: add memory constraints to inline asm
Problem Details: Currently, the 32-bit and 64-bit atomic operations on ARM do not include memory constraints in the inline assembly blocks. In the case of barrier-less operations [for example, atomic_add], this means that the compiler may constant fold values which have actually been modified by a call to an atomic ope...
```diff diff --git a/arch/arm/include/asm/atomic.h b/arch/arm/include/asm/atomic.h index e9e56c00b858..7e79503ab89b 100644 --- a/arch/arm/include/asm/atomic.h +++ b/arch/arm/include/asm/atomic.h @@ -40,12 +40,12 @@ static inline void atomic_add(int i, atomic_t *v) int result; __asm__ __volatile__("@ atomic_add\n"...
068de8d1be48a04b92fd97f76bb7e113b7be82a8
Analyze and fix the following issue in the Linux kernel code: ARM: 6211/1: atomic ops: fix register constraints for atomic64_add_unless
Problem Details: The atomic64_add_unless function compares an atomic variable with a given value and, if they are not equal, adds another given value to the atomic variable. The function returns zero if the addition did not occur and non-zero otherwise. On ARM, the return value is initialised to 1 in C code. Inline as...
```diff diff --git a/arch/arm/include/asm/atomic.h b/arch/arm/include/asm/atomic.h index a0162fa94564..e9e56c00b858 100644 --- a/arch/arm/include/asm/atomic.h +++ b/arch/arm/include/asm/atomic.h @@ -440,7 +440,7 @@ static inline int atomic64_add_unless(atomic64_t *v, u64 a, u64 u) " teq %2, #0\n" " bne 1b\n" "2:" - ...
fabc51a640b35a771b6c75d2186193fdaf25cf56
Analyze and fix the following issue in the Linux kernel code: fec_mpc52xx: fix error path
Problem Details: Error path in mpc52xx_fec_probe() is broken. We must free everything that we've allocated. Signed-off-by: Kulikov Vasiliy <segooon@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/fec_mpc52xx.c b/drivers/net/fec_mpc52xx.c index 25e6cc6840b1..5f8346369b80 100644 --- a/drivers/net/fec_mpc52xx.c +++ b/drivers/net/fec_mpc52xx.c @@ -875,17 +875,21 @@ mpc52xx_fec_probe(struct of_device *op, const struct of_device_id *match) if (rv) { printk(KERN_ERR DRIVER_NAME ":...
7cc36f6f7116918c8a8990a0f23f62d2288a81bf
Analyze and fix the following issue in the Linux kernel code: ll_temac: fix memory leak
Problem Details: If of_iomap() or irq_of_parse_and_map() fail then np must be freed. Signed-off-by: Kulikov Vasiliy <segooon@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/ll_temac_main.c b/drivers/net/ll_temac_main.c index b57d0ff52519..6ebf808bf440 100644 --- a/drivers/net/ll_temac_main.c +++ b/drivers/net/ll_temac_main.c @@ -1031,19 +1031,22 @@ temac_of_probe(struct of_device *op, const struct of_device_id *match) dev_dbg(&op->dev, "MEM base: %p\n"...
ac0547dc62e67a3e0b0c1628b6e49efba8f517db
Analyze and fix the following issue in the Linux kernel code: ALSA: hda - Restore cleared pin controls on resume
Problem Details: Many codecs now clear the pin controls at suspend via snd_hda_shutup_pins() for reducing the click noise at power-off. But this leaves some pins uninitialized, and they'll be never recovered after resume. This patch adds the proper recovery of cleared pin controls on resume. Also it adds a check of b...
```diff diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index a3d638c8c1fd..ba2098d20ccc 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c @@ -784,6 +784,9 @@ static int read_pin_defaults(struct hda_codec *codec) pin->nid = nid; pin->cfg = snd_hda_codec_read(codec, nid, 0, ...
301e9d96bf65292f916a3936d63c504ac7792ee6
Analyze and fix the following issue in the Linux kernel code: ll_temac: fix DMA resources leak
Problem Details: V2: Check pointers before releasing resources. Fix DMA resources leak. Signed-off-by: Denis Kirjanov <dkirjanov@kernel.org> Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
```diff diff --git a/drivers/net/ll_temac_main.c b/drivers/net/ll_temac_main.c index fa303c881a48..b57d0ff52519 100644 --- a/drivers/net/ll_temac_main.c +++ b/drivers/net/ll_temac_main.c @@ -192,6 +192,35 @@ static int temac_dcr_setup(struct temac_local *lp, struct of_device *op, #endif +/** + * * temac_dma_bd_re...
0e37d25950f4fd5a7d74723e6ce608aaa972d24c
Analyze and fix the following issue in the Linux kernel code: powerpc/book3e: Use set_irq_regs() in the msgsnd/msgrcv IPI path
Problem Details: include/asm-generic/irq_regs.h declares per-cpu irq_regs variables and get_irq_regs() and set_irq_regs() helper functions to maintain them. These can be used to access the proper pt_regs structure related to the current interrupt entry (if any). In the powerpc arch code, this is used to maintain irq r...
```diff diff --git a/arch/powerpc/kernel/dbell.c b/arch/powerpc/kernel/dbell.c index 1c7a94580c3f..f7b518894c80 100644 --- a/arch/powerpc/kernel/dbell.c +++ b/arch/powerpc/kernel/dbell.c @@ -16,6 +16,7 @@ #include <linux/percpu.h> #include <asm/dbell.h> +#include <asm/irq_regs.h> #ifdef CONFIG_SMP struct doorbe...
a2e198116f97bb1cd5b37ff33a8cfdfb4010cf5b
Analyze and fix the following issue in the Linux kernel code: powerpc/book3e: Hack to get gdb moving along on Book3E 64-bit
Problem Details: Our handling of debug interrupts on Book3E 64-bit is not quite the way it should be just yet. This is a workaround to let gdb work at least for now. We ensure that when context switching, we set the appropriate DBCR0 value for the new task. We also make sure that we turn off MSR[DE] within the kernel, ...
```diff diff --git a/arch/powerpc/include/asm/reg_booke.h b/arch/powerpc/include/asm/reg_booke.h index 2360317179a9..66dc6f0d3ad8 100644 --- a/arch/powerpc/include/asm/reg_booke.h +++ b/arch/powerpc/include/asm/reg_booke.h @@ -29,8 +29,8 @@ #if defined(CONFIG_PPC_BOOK3E_64) #define MSR_ MSR_ME | MSR_CE #define MSR_...
635f081541edef7644073f9be50ee5bf7c57ce63
Analyze and fix the following issue in the Linux kernel code: Phonet: fix skb leak in pipe endpoint accept()
Problem Details: Signed-off-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/net/phonet/pep.c b/net/phonet/pep.c index 94d72e85a475..b2a3ae6cad78 100644 --- a/net/phonet/pep.c +++ b/net/phonet/pep.c @@ -698,6 +698,7 @@ static struct sock *pep_sock_accept(struct sock *sk, int flags, int *errp) newsk = NULL; goto out; } + kfree_skb(oskb); sock_hold(sk); pep_sk(n...
51c7fdba40e741dfe18455b5e4240b70c422bf2e
Analyze and fix the following issue in the Linux kernel code: powerpc/iseries: Fix constant warning
Problem Details: Fix smatch warning: constant 0x8000000000000000 is so big it is unsigned long Signed-off-by: Denis Kirjanov <dkirjanov@kernel.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
```diff diff --git a/arch/powerpc/include/asm/abs_addr.h b/arch/powerpc/include/asm/abs_addr.h index 98324c5a8286..c3bffc3fa1de 100644 --- a/arch/powerpc/include/asm/abs_addr.h +++ b/arch/powerpc/include/asm/abs_addr.h @@ -69,7 +69,7 @@ static inline unsigned long phys_to_abs(unsigned long pa) * Legacy iSeries Hyperv...
d10ac3734d07bee675384d22d06883b3c57b1524
Analyze and fix the following issue in the Linux kernel code: powerpc/fsl-booke: Fix comments in mmu code that mention BATS
Problem Details: There are no BATS on BookE - we have the TLBCAM instead. Also correct the page size information to included extended sizes. We don't actually allow a 4G page size to be used, so comment on that as well. Signed-off-by: Becky Bruce <beckyb@kernel.crashing.org> Signed-off-by: Benjamin Herrenschmidt <be...
```diff diff --git a/arch/powerpc/mm/fsl_booke_mmu.c b/arch/powerpc/mm/fsl_booke_mmu.c index cdc7526e9c93..4b66a1ece6d8 100644 --- a/arch/powerpc/mm/fsl_booke_mmu.c +++ b/arch/powerpc/mm/fsl_booke_mmu.c @@ -104,9 +104,10 @@ unsigned long p_mapped_by_tlbcam(phys_addr_t pa) } /* - * Set up one of the I/D BAT (block a...
8fd63a9ea7528463211a6c88d500c51851d960c8
Analyze and fix the following issue in the Linux kernel code: powerpc: Rework VDSO gettimeofday to prevent time going backwards
Problem Details: Currently it is possible for userspace to see the result of gettimeofday() going backwards by 1 microsecond, assuming that userspace is using the gettimeofday() in the VDSO. The VDSO gettimeofday() algorithm computes the time in "xsecs", which are units of 2^-20 seconds, or approximately 0.954 microse...
```diff diff --git a/arch/powerpc/include/asm/vdso_datapage.h b/arch/powerpc/include/asm/vdso_datapage.h index 13c2c283e178..08679c5319b8 100644 --- a/arch/powerpc/include/asm/vdso_datapage.h +++ b/arch/powerpc/include/asm/vdso_datapage.h @@ -85,6 +85,7 @@ struct vdso_data { __s32 wtom_clock_sec; /* Wall to monoton...
d06dbaf6c2c7187938f3f6745d9e4938a2d0ec47
Analyze and fix the following issue in the Linux kernel code: ceph: fix printing of ipv6 addrs
Problem Details: The buffer was too small. Make it bigger, use snprintf(), put brackets around the ipv6 address to avoid mixing it up with the :port, and use the ever-so-handy %pI[46] formats. Signed-off-by: Sage Weil <sage@newdream.net>
```diff diff --git a/fs/ceph/messenger.c b/fs/ceph/messenger.c index 9692d08e2f88..e8c5a2d0e88f 100644 --- a/fs/ceph/messenger.c +++ b/fs/ceph/messenger.c @@ -43,7 +43,8 @@ static void ceph_fault(struct ceph_connection *con); * nicely render a sockaddr as a string. */ #define MAX_ADDR_STR 20 -static char addr_str[...
e501d0553a7580fcc6654d7f58a5f061d31d00af
Analyze and fix the following issue in the Linux kernel code: Bluetooth: Check L2CAP pending status before sending connect request
Problem Details: Due to race condition in L2CAP state machine L2CAP Connection Request may be sent twice for SDP with the same source channel id. Problems reported connecting to Apple products, some carkit, Blackberry phones. ... 2010-06-07 21:18:03.651031 < ACL data: handle 1 flags 0x02 dlen 12 L2CAP(s): Connect ...
```diff diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c index 1b682a5aa061..cf3c4073a8a6 100644 --- a/net/bluetooth/l2cap.c +++ b/net/bluetooth/l2cap.c @@ -401,6 +401,11 @@ static inline void l2cap_send_rr_or_rnr(struct l2cap_pinfo *pi, u16 control) l2cap_send_sframe(pi, control); } +static inline int _...
dc899971a1b7754f6171e6f1232365b864f96eef
Analyze and fix the following issue in the Linux kernel code: Staging: hyperv: add clocksource driver
Problem Details: This patch is a clocksource implementation suitable for guests hosted on HyperV. Time keeping in Linux guests hosted on HyperV is unstable. This clocksource driver fixes the problem. This driver uses the hyperv detection code integrated into the kernel. Signed-off-by: K. Y. Srinivasan <ksrinivasan@no...
```diff diff --git a/drivers/staging/hv/Makefile b/drivers/staging/hv/Makefile index 1866f80a45d3..b63515c20f5f 100644 --- a/drivers/staging/hv/Makefile +++ b/drivers/staging/hv/Makefile @@ -1,4 +1,4 @@ -obj-$(CONFIG_HYPERV) += hv_vmbus.o +obj-$(CONFIG_HYPERV) += hv_vmbus.o hv_timesource.o obj-$(CONFIG_HYPERV_STORAG...
65cfe8420c2b1718ccff3b6dac65656464c0e4f6
Analyze and fix the following issue in the Linux kernel code: Staging: usbip: fix typos concerning "sequential"
Problem Details: Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
```diff diff --git a/drivers/staging/usbip/usbip_common.h b/drivers/staging/usbip/usbip_common.h index e1bbd1287e28..d280e234e067 100644 --- a/drivers/staging/usbip/usbip_common.h +++ b/drivers/staging/usbip/usbip_common.h @@ -172,7 +172,7 @@ struct usbip_header_basic { #define USBIP_RET_UNLINK 0x0004 __u32 command;...
060132ae42cce3f9d2fd34d9a17b98362b44b9f9
Analyze and fix the following issue in the Linux kernel code: Staging: panel: Prevent double-calling of parport_release - fix oops.
Problem Details: This patch prevents the code from calling parport_release and parport_unregister_device twice with the same arguments - and thus fixes an oops. Rationale: After the first call the parport is already released and the handle isn't valid anymore and calling parport_release and parport_unregister_device t...
```diff diff --git a/drivers/staging/panel/panel.c b/drivers/staging/panel/panel.c index 3154ffe59277..6fa57beeccb5 100644 --- a/drivers/staging/panel/panel.c +++ b/drivers/staging/panel/panel.c @@ -2277,6 +2277,7 @@ int panel_init(void) if (pprt) { parport_release(pprt); parport_unregister_device(pprt); + ...
9a547bf9a83ce7211d4290956d9fca8044a409de
Analyze and fix the following issue in the Linux kernel code: wl1271: Fix warning when disconnecting and ad-hoc network
Problem Details: Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com> Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com> Reviewed-by: Teemu Paasikivi <ext-teemu.3.paasikivi@nokia.com> Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
```diff diff --git a/drivers/net/wireless/wl12xx/wl1271_main.c b/drivers/net/wireless/wl12xx/wl1271_main.c index 366e41518feb..d50c0a9835a0 100644 --- a/drivers/net/wireless/wl12xx/wl1271_main.c +++ b/drivers/net/wireless/wl12xx/wl1271_main.c @@ -938,7 +938,8 @@ static void wl1271_op_remove_interface(struct ieee80211_h...
1ceea25372dd6e37c9804f713b6e2c6bdd008d03
Analyze and fix the following issue in the Linux kernel code: staging: ti dspbridge: use _DEBUG for debug trace
Problem Details: Obviously nobody was using DSP_TRACEBUF_DISABLED, since it wasn't even standarized between TRACEBUF and TRACE_BUF. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/tidspbridge/core/io_sm.c b/drivers/staging/tidspbridge/core/io_sm.c index ee33abb42fc2..8909c416b7ee 100644 --- a/drivers/staging/tidspbridge/core/io_sm.c +++ b/drivers/staging/tidspbridge/core/io_sm.c @@ -114,7 +114,7 @@ struct io_mgr { struct mgr_processorextinfo ext_proc_info; ...
b3d23688a15c4c332942f9428e0d708e7362e29e
Analyze and fix the following issue in the Linux kernel code: staging: ti dspbridge: prefix configs with TIDSPBRIDGE
Problem Details: Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/tidspbridge/Kconfig b/drivers/staging/tidspbridge/Kconfig index 45372cd6b0e6..6ce443a54eea 100644 --- a/drivers/staging/tidspbridge/Kconfig +++ b/drivers/staging/tidspbridge/Kconfig @@ -14,7 +14,7 @@ menuconfig TIDSPBRIDGE This driver depends on OMAP Mailbox (OMAP_MBOX_FWK). ...
5693486bad2bc2ac585a2c24f7e2f3964b478df9
Analyze and fix the following issue in the Linux kernel code: ocfs2: Zero the tail cluster when extending past i_size.
Problem Details: ocfs2's allocation unit is the cluster. This can be larger than a block or even a memory page. This means that a file may have many blocks in its last extent that are beyond the block containing i_size. There also may be more unwritten extents after that. When ocfs2 grows a file, it zeros the entir...
```diff diff --git a/fs/ocfs2/aops.c b/fs/ocfs2/aops.c index 9a5c931439bd..742893ea7390 100644 --- a/fs/ocfs2/aops.c +++ b/fs/ocfs2/aops.c @@ -196,15 +196,14 @@ int ocfs2_get_block(struct inode *inode, sector_t iblock, dump_stack(); goto bail; } - - past_eof = ocfs2_blocks_for_bytes(inode->i_sb, i_size_read...
2312202c4ac3590da9dcf33337e6f0a14f78d124
Analyze and fix the following issue in the Linux kernel code: Staging: comedi: kcomedilib: fix coding style issues in kcomedilib_main.c
Problem Details: This is a patch to the kcomedilib_main.c file that fixes up some printk() warning issues. Signed-off-by: Gustavo Silva <silvagustavo@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/comedi/kcomedilib/kcomedilib_main.c b/drivers/staging/comedi/kcomedilib/kcomedilib_main.c index 863aae40edeb..0252b4408851 100644 --- a/drivers/staging/comedi/kcomedilib/kcomedilib_main.c +++ b/drivers/staging/comedi/kcomedilib/kcomedilib_main.c @@ -93,7 +93,7 @@ static int comedi_d...
1309e617bc56f2f8af9a9c5aab1224a45539002a
Analyze and fix the following issue in the Linux kernel code: Staging: comedi: fix over 80 character coding style issue in ni_labpc.c
Problem Details: This is a patch to the ni_labpc.c file that fixes up 80 character warnings found by the checkpatch.pl tool Signed-off-by: Maurice Dawson <mauricedawson2699@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/comedi/drivers/ni_labpc.c b/drivers/staging/comedi/drivers/ni_labpc.c index 170bab60555a..3acf7e62bec4 100644 --- a/drivers/staging/comedi/drivers/ni_labpc.c +++ b/drivers/staging/comedi/drivers/ni_labpc.c @@ -1098,7 +1098,10 @@ static int labpc_ai_cmdtest(struct comedi_device *dev,...
b6ae906b04113cb73c1ffe9c42fbcdcb074d9f07
Analyze and fix the following issue in the Linux kernel code: V4L/DVB: v4l: mem2mem_testdev: fix g_fmt NULL pointer dereference
Problem Details: Calling g_fmt before s_fmt resulted in a NULL pointer dereference as no default formats were being selected on probe. Reported-by: Németh Márton <nm127@freemail.hu> Signed-off-by: Pawel Osciak <p.osciak@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Mauro Carvalho...
```diff diff --git a/drivers/media/video/mem2mem_testdev.c b/drivers/media/video/mem2mem_testdev.c index 554eaf140128..10ddeccc70eb 100644 --- a/drivers/media/video/mem2mem_testdev.c +++ b/drivers/media/video/mem2mem_testdev.c @@ -988,6 +988,9 @@ static int m2mtest_probe(struct platform_device *pdev) goto err_m2m; ...
691d38451c466e931a629c17836b19dd615c8a75
Analyze and fix the following issue in the Linux kernel code: V4L/DVB: OMAP_VOUT: fix: Module params were not working through bootargs
Problem Details: Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com> Signed-off-by: Muralidharan Karicheri <mkaricheri@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/media/video/omap/Makefile b/drivers/media/video/omap/Makefile index b8bab00ad010..b28788070ae1 100644 --- a/drivers/media/video/omap/Makefile +++ b/drivers/media/video/omap/Makefile @@ -3,5 +3,5 @@ # # OMAP2/3 Display driver -omap-vout-mod-objs := omap_vout.o omap_voutlib.o -obj-$(CONFI...
dd880dd477f11aceffb2866f702c718fec2862f4
Analyze and fix the following issue in the Linux kernel code: V4L/DVB: OMAP_VOUT: fix: Replaced dma-sg with dma-contig
Problem Details: Actually OMAP doesn't support scatter-gather DMA for Display subsystem but due to legacy coding it has been overlooked till now. Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com> Signed-off-by: Muralidharan Karicheri <mkaricheri@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
```diff diff --git a/drivers/media/video/omap/Kconfig b/drivers/media/video/omap/Kconfig index c1d19335891a..e63233fd2aaa 100644 --- a/drivers/media/video/omap/Kconfig +++ b/drivers/media/video/omap/Kconfig @@ -2,7 +2,7 @@ config VIDEO_OMAP2_VOUT tristate "OMAP2/OMAP3 V4L2-Display driver" depends on ARCH_OMAP2 || A...
5ba9bb0ef658a7f4c082cdfc4f779729506042f5
Analyze and fix the following issue in the Linux kernel code: V4L/DVB: OMAP_VOUT:Build FIX: Rebased against latest DSS2 changes
Problem Details: Changes - - Kconfig option dependancy changed to ARCH_OMAP2/3 from ARCH_OMAP24XX/34XX - There are some moments of function from omap_dss_device to omap_dss_driver. Incorporated changes for the same. Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com> Signed-off-by: Muralidharan Karicheri <mkaricheri...
```diff diff --git a/drivers/media/video/omap/Kconfig b/drivers/media/video/omap/Kconfig index 97c53949ca89..c1d19335891a 100644 --- a/drivers/media/video/omap/Kconfig +++ b/drivers/media/video/omap/Kconfig @@ -1,6 +1,6 @@ config VIDEO_OMAP2_VOUT tristate "OMAP2/OMAP3 V4L2-Display driver" - depends on ARCH_OMAP24XX ...
f0aa2a1739e03757b07fbf62680d84de54f8e59a
Analyze and fix the following issue in the Linux kernel code: Staging: dt3155_isr: cleanup fbuffer usage
Problem Details: Now that dt3155_drv.c is not dependent on the global symbol dt3155_fbuffer[], declared in dt3155_isr.c, remove it. This also fixes many of the coding style problems in dt3155_isr.c. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Scott Smedley <ss@aao.gov.au> Signed-off-by: Greg K...
```diff diff --git a/drivers/staging/dt3155/dt3155_isr.c b/drivers/staging/dt3155/dt3155_isr.c index 59b7bfd535d6..01ab88850445 100644 --- a/drivers/staging/dt3155/dt3155_isr.c +++ b/drivers/staging/dt3155/dt3155_isr.c @@ -59,158 +59,133 @@ Purpose: Buffer management routines, and other routines for the ISR #define UP...
25b37ecab96cde0e15c494a89cd2ab8e4337906e
Analyze and fix the following issue in the Linux kernel code: Staging: otus: fix coding style issues in ioctl.c
Problem Details: This is a patch to the ioctl.c file that fixes up the following issues: ERROR: that open brace { should be on the previous line x 3 WARNING: please, no space before tabs x 1 ERROR: space required before the open parenthesis '(' x 5 WARNING: braces {} are not necessary for single statem...
```diff diff --git a/drivers/staging/otus/ioctl.c b/drivers/staging/otus/ioctl.c index b85f1b29e3bc..dc3066d28845 100644 --- a/drivers/staging/otus/ioctl.c +++ b/drivers/staging/otus/ioctl.c @@ -63,8 +63,7 @@ extern u16_t zfLnxGetVapId(zdev_t *dev); -static const u32_t channel_frequency_11A[] = -{ +static const u3...
388be4883952872b48c8e4789ff77d5b3b9cadb7
Analyze and fix the following issue in the Linux kernel code: staging:iio: tsl2563 abi fixes and interrupt handling
Problem Details: Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/iio/light/light.h b/drivers/staging/iio/light/light.h index f00f827689c2..e4e1e2c4139c 100644 --- a/drivers/staging/iio/light/light.h +++ b/drivers/staging/iio/light/light.h @@ -2,11 +2,6 @@ /* Light to digital sensor attributes */ -#define IIO_DEV_ATTR_LIGHT_INFRARED(_num, _sh...
3bbb49aa3f667e6b871886bd75b3bb311d656eea
Analyze and fix the following issue in the Linux kernel code: staging:iio: Fix IIO_EVENT_ATTR initialization of list head
Problem Details: Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
```diff diff --git a/drivers/staging/iio/sysfs.h b/drivers/staging/iio/sysfs.h index afcf5ab85f48..79926efec6d4 100644 --- a/drivers/staging/iio/sysfs.h +++ b/drivers/staging/iio/sysfs.h @@ -293,10 +293,7 @@ struct iio_const_attr { * @_handler: handler function to be called **/ #define IIO_EVENT_ATTR(_name, _show,...
80f6c34b9a4302edf3f675c25973c51e03b570da
Analyze and fix the following issue in the Linux kernel code: Staging: batman-adv: Add last-seen in originator table
Problem Details: Right now, there is no easy/intuitive way to find out whether a node might have vanished. This commit adds the time when a node was last seen to the originator table output, so that a common user is able to tell whether a node might have gone without having to wait PURGE_TIMEOUT seconds until that node...
```diff diff --git a/drivers/staging/batman-adv/originator.c b/drivers/staging/batman-adv/originator.c index d2a5f20f94a9..28bb627ffa13 100644 --- a/drivers/staging/batman-adv/originator.c +++ b/drivers/staging/batman-adv/originator.c @@ -289,6 +289,8 @@ int orig_seq_print_text(struct seq_file *seq, void *offset) str...
c1641862f88367602f8f34a17b21bdf1eee912ee
Analyze and fix the following issue in the Linux kernel code: Staging: batman-adv: Move printk to simplified macros
Problem Details: Each general printk which is not informative by itself for a specific batX device were moved to pr_(info|warning|err) as it provides an easy interface which for example resolves the problem to add the prefix "batman-adv: " before each line. All information which is specific to a batX device will be pr...
```diff diff --git a/drivers/staging/batman-adv/bat_debugfs.c b/drivers/staging/batman-adv/bat_debugfs.c index f818d5eec4ac..8e8eef0e588e 100644 --- a/drivers/staging/batman-adv/bat_debugfs.c +++ b/drivers/staging/batman-adv/bat_debugfs.c @@ -19,9 +19,10 @@ * */ +#include "main.h" + #include <linux/debugfs.h> ...
08f20b5e07d17c36a6790fa8b0f2554b6735cf59
Analyze and fix the following issue in the Linux kernel code: Staging: batman-adv: fix early debugfs deinitialization
Problem Details: The debugfs files are initialized at load time only but would get deinitialized when the module changed in it deactivate (sleeping) state. As a consequence the debugfs files are not accessible anymore. Signed-off-by: Marek Lindner <lindner_marek@yahoo.de> Signed-off-by: Sven Eckelmann <sven.eckelmann@...
```diff diff --git a/drivers/staging/batman-adv/main.c b/drivers/staging/batman-adv/main.c index ae8880620bfb..d7e2960bbe81 100644 --- a/drivers/staging/batman-adv/main.c +++ b/drivers/staging/batman-adv/main.c @@ -148,6 +148,7 @@ void cleanup_module(void) { deactivate_module(); + debugfs_destroy(); unregister_n...
b6be4535e3e971181e19791e12c62f4938e6d2e9
Analyze and fix the following issue in the Linux kernel code: Staging: batman-adv: Lower resolution for timeouts
Problem Details: It is enough for our timeouts to keep them in seconds instead of miliseconds. With a too high resolution, we might even risk an integer overflow, so this patch should make things more safe. Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de> Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de> ...
```diff diff --git a/drivers/staging/batman-adv/main.h b/drivers/staging/batman-adv/main.h index ab4c9e73abe9..49aaec56b769 100644 --- a/drivers/staging/batman-adv/main.h +++ b/drivers/staging/batman-adv/main.h @@ -36,10 +36,10 @@ #define JITTER 20 #define TTL 50 /* Time To Live of broadcast messages */ -#defin...
e88ff1e6db0ae6462e881d9f10776f7bdfd32e64
Analyze and fix the following issue in the Linux kernel code: ASoC: Include WM8994 GPIO and interrupt registers in codec_reg
Problem Details: Very handy for debug. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
```diff diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c index e84a1177f350..ed8be9db2b02 100644 --- a/sound/soc/codecs/wm8994.c +++ b/sound/soc/codecs/wm8994.c @@ -1677,6 +1677,26 @@ static struct { static int wm8994_readable(unsigned int reg) { + switch (reg) { + case WM8994_GPIO_1: + case WM899...
250b2b6dd421c9f8844a867d2ac06e0661e0ad93
Analyze and fix the following issue in the Linux kernel code: firewire: cdev: fix fw_cdev_event_bus_reset.bm_node_id
Problem Details: Fix an obscure ABI feature that is a bit of a hassle to implement. However, somebody put it into the ABI, so let's fill in a sensible value there. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
```diff diff --git a/drivers/firewire/core-card.c b/drivers/firewire/core-card.c index 11fc81500f82..6c316cfe70c4 100644 --- a/drivers/firewire/core-card.c +++ b/drivers/firewire/core-card.c @@ -239,7 +239,7 @@ static void fw_card_bm_work(struct work_struct *work) struct fw_card *card = container_of(work, struct fw_c...
bf23690b89b731468478c21eb07bbb645cc66ead
Analyze and fix the following issue in the Linux kernel code: powerpc: Fix userspace build of ptrace.h
Problem Details: Build of ptrace.h failed for assembly because it pulls in stdint.h. Use exportable types (__u32, __u64) to avoid the dependency on stdint.h. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: Andrey Volkov <avolkov@varma-el.com> Cc: Dave Kleikamp <shaggy@linux.vnet.ibm.com> Cc: Benjamin Herrenschmidt ...
```diff diff --git a/arch/powerpc/include/asm/ptrace.h b/arch/powerpc/include/asm/ptrace.h index 5d8be0416227..0175a676b34b 100644 --- a/arch/powerpc/include/asm/ptrace.h +++ b/arch/powerpc/include/asm/ptrace.h @@ -24,11 +24,7 @@ * 2 of the License, or (at your option) any later version. */ -#ifdef __KERNEL__ #i...
c2be05481f6125254c45b78f334d4dd09c701c82
Analyze and fix the following issue in the Linux kernel code: powerpc: Fix default_machine_crash_shutdown #ifdef botch
Problem Details: crash_kexec_wait_realmode() is defined only if CONFIG_PPC_STD_MMU_64 and CONFIG_SMP, but is called if CONFIG_PPC_STD_MMU_64 even if !CONFIG_SMP. Fix the conditional compilation around the invocation. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Acked-by: Michael Neuling <mikey@neuling....
```diff diff --git a/arch/powerpc/kernel/crash.c b/arch/powerpc/kernel/crash.c index b46f2e09bd81..29df48f2b61a 100644 --- a/arch/powerpc/kernel/crash.c +++ b/arch/powerpc/kernel/crash.c @@ -447,7 +447,7 @@ void default_machine_crash_shutdown(struct pt_regs *regs) crash_kexec_prepare_cpus(crashing_cpu); cpu_set(cra...
3cd8519248e9e17d982c6fab0f1a89bca6feb49a
Analyze and fix the following issue in the Linux kernel code: powerpc: Fix logic error in fixup_irqs
Problem Details: When SPARSE_IRQ is set, irq_to_desc() can return NULL. While the code here has a check for NULL, it's not really correct. Fix it by separating the check for it. This fixes CPU hot unplug for me. Reported-by: Alastair Bridgewater <alastair.bridgewater@gmail.com> Cc: stable@kernel.org [2.6.32+] Signed-...
```diff diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c index 3333bbdd23ef..77be3d058a65 100644 --- a/arch/powerpc/kernel/irq.c +++ b/arch/powerpc/kernel/irq.c @@ -295,7 +295,10 @@ void fixup_irqs(const struct cpumask *map) for_each_irq(irq) { desc = irq_to_desc(irq); - if (desc && desc->stat...
d3005fbc696781d2fd7bd5b5389a94fae5332b58
Analyze and fix the following issue in the Linux kernel code: powerpc/iseries: Fix possible null pointer dereference in iSeries_pcibios_fixup_resources
Problem Details: I don't know if this is a right fix for the problem since of_get_property can return NULL. Since iseries_device_information is used only for informational purpose, we can skip this function without valid HvSubBusNumber number. Signed-off-by: Denis Kirjanov <dkirjanov@kernel.org> Signed-off-by: Benjami...
```diff diff --git a/arch/powerpc/platforms/iseries/pci.c b/arch/powerpc/platforms/iseries/pci.c index 3fc2e6494b8b..ab3962b0d246 100644 --- a/arch/powerpc/platforms/iseries/pci.c +++ b/arch/powerpc/platforms/iseries/pci.c @@ -445,7 +445,11 @@ void __init iSeries_pcibios_fixup_resources(struct pci_dev *pdev) } al...
3880ecb05bc5ece4c6e392a21ea77518e55b4935
Analyze and fix the following issue in the Linux kernel code: powerpc: Fix feature-fixup tests for gcc 4.5
Problem Details: The feature-fixup test declare some extern void variables and then take their addresses. Fix this by declaring them as extern u8 instead. Fixes these warnings (treated as errors): CC arch/powerpc/lib/feature-fixups.o cc1: warnings being treated as errors arch/powerpc/lib/feature-fixups.c: In ...
```diff diff --git a/arch/powerpc/lib/feature-fixups.c b/arch/powerpc/lib/feature-fixups.c index e640175b65ae..0d08d0171392 100644 --- a/arch/powerpc/lib/feature-fixups.c +++ b/arch/powerpc/lib/feature-fixups.c @@ -12,6 +12,7 @@ * 2 of the License, or (at your option) any later version. */ +#include <linux/types...
5afd878a958191a3f32911f1f5f03beee5368e68
Analyze and fix the following issue in the Linux kernel code: powerpc: Fix compile errors in prom_init_check for gcc 4.5
Problem Details: Just whitelist these extra compiler generated symbols. Fixes these errors: Error: External symbol '_restgpr0_14' referenced from prom_init.c Error: External symbol '_restgpr0_20' referenced from prom_init.c Error: External symbol '_restgpr0_22' referenced from prom_init.c Error: External symbol '_rest...
```diff diff --git a/arch/powerpc/kernel/prom_init_check.sh b/arch/powerpc/kernel/prom_init_check.sh index 1ac136b128f0..9f82f4937892 100644 --- a/arch/powerpc/kernel/prom_init_check.sh +++ b/arch/powerpc/kernel/prom_init_check.sh @@ -52,12 +52,18 @@ do if [ "${UNDEF:0:9}" = "_restgpr_" ]; then OK=1 fi + if [ "$...
7fca5dc8aa7aaa6a1023bd3587901b88ebfe8154
Analyze and fix the following issue in the Linux kernel code: powerpc: Fix module building for gcc 4.5 and 64 bit
Problem Details: Gcc 4.5 is now generating out of line register save and restore in the function prefix and postfix when we use -Os. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
```diff diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile index 42dcd3f4ad7b..77cfe7a29e25 100644 --- a/arch/powerpc/Makefile +++ b/arch/powerpc/Makefile @@ -92,10 +92,10 @@ endif else KBUILD_CFLAGS += $(call cc-option,-mtune=power4) endif -else -LDFLAGS_MODULE += arch/powerpc/lib/crtsavres.o endif +LDF...
219a92a4c40db2fac604f63bce9a5a3fe1967879
Analyze and fix the following issue in the Linux kernel code: powerpc/perf_event: Fix for power_pmu_disable()
Problem Details: When power_pmu_disable() removes the given event from a particular index into cpuhw->event[], it shuffles down higher event[] entries. But, this array is paired with cpuhw->events[] and cpuhw->flags[] so should shuffle them similarly. If these arrays get out of sync, code such as power_check_constrai...
```diff diff --git a/arch/powerpc/kernel/perf_event.c b/arch/powerpc/kernel/perf_event.c index 43b83c35cf54..5c14ffe51258 100644 --- a/arch/powerpc/kernel/perf_event.c +++ b/arch/powerpc/kernel/perf_event.c @@ -791,8 +791,11 @@ static void power_pmu_disable(struct perf_event *event) cpuhw = &__get_cpu_var(cpu_hw_even...
54a3b8dc38d47834336400cbe376a3aca0437cae
Analyze and fix the following issue in the Linux kernel code: ALSA: Update documents about new bits of xrun_debug proc file
Problem Details: Signed-off-by: Takashi Iwai <tiwai@suse.de>
```diff diff --git a/Documentation/sound/alsa/Procfile.txt b/Documentation/sound/alsa/Procfile.txt index 07301de12cc4..7fcd1ad96fcc 100644 --- a/Documentation/sound/alsa/Procfile.txt +++ b/Documentation/sound/alsa/Procfile.txt @@ -103,6 +103,8 @@ card*/pcm*/xrun_debug bit 2 = Enable additional jiffies check bit...
f5152c908a5b0be48ec9a58d0de8bdadd9385854
Analyze and fix the following issue in the Linux kernel code: cxgb4: fix for new ndo_get_stats64 signature
Problem Details: The change to ndo_get_stats64 in "net: fix 64 bit counters on 32 bit arches" missed cxgb4. Fix it. Signed-off-by: Dimitris Michailidis <dm@chelsio.com> Acked-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/cxgb4/cxgb4_main.c b/drivers/net/cxgb4/cxgb4_main.c index 55a720e4abdc..26199979290d 100644 --- a/drivers/net/cxgb4/cxgb4_main.c +++ b/drivers/net/cxgb4/cxgb4_main.c @@ -2601,12 +2601,12 @@ static int cxgb_close(struct net_device *dev) return t4_enable_vi(adapter, 0, pi->viid, false, ...
108553e1f3c45a92d23681a378ad9e4c3230eebc
Analyze and fix the following issue in the Linux kernel code: perf: Sync callchains with period based hits
Problem Details: Hists have their hits increased by the event period. And this period based counting is the foundation of all the stats in perf report. But callchains still use the raw number of hits, without taking the period into account. So when we compute the percentage, absolute based percentages are totally brok...
```diff diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c index 359205782964..fd7407c7205c 100644 --- a/tools/perf/builtin-report.c +++ b/tools/perf/builtin-report.c @@ -107,7 +107,7 @@ static int perf_session__add_hist_entry(struct perf_session *self, goto out_free_syms; err = 0; if (symbol...
97aa1052739c6a06cb6b0467dbf410613d20bc97
Analyze and fix the following issue in the Linux kernel code: perf: Resurrect flat callchains
Problem Details: Initialize the callchain radix tree root correctly. When we walk through the parents, we must stop after the root, but since it wasn't well initialized, its parent pointer was random. Also the number of hits was random because uninitialized, hence it was part of the callchain while the root doesn't c...
```diff diff --git a/tools/perf/util/callchain.h b/tools/perf/util/callchain.h index 1ca73e4a2723..22dbaec003d5 100644 --- a/tools/perf/util/callchain.h +++ b/tools/perf/util/callchain.h @@ -49,6 +49,9 @@ static inline void callchain_init(struct callchain_node *node) INIT_LIST_HEAD(&node->brothers); INIT_LIST_HEAD(...
5cf3e03457aa905f17f9765702850316b69aad1e
Analyze and fix the following issue in the Linux kernel code: ethoc: Fix warning in ethoc_init_ring().
Problem Details: Get rid of the pointless back-and-forth casting of dev->mem_start from long to pointer back to long again. Also fixes a warning reported by Stephen Rothwell: drivers/net/ethoc.c: In function 'ethoc_init_ring': drivers/net/ethoc.c:302: warning: assignment makes integer from pointer without a cast Sig...
```diff diff --git a/drivers/net/ethoc.c b/drivers/net/ethoc.c index db519a81e53a..5bb6bb74c40e 100644 --- a/drivers/net/ethoc.c +++ b/drivers/net/ethoc.c @@ -286,7 +286,7 @@ static inline void ethoc_disable_rx_and_tx(struct ethoc *dev) ethoc_write(dev, MODER, mode); } -static int ethoc_init_ring(struct ethoc *dev...
a038716957d3888a595014a660b1db1f28946f62
Analyze and fix the following issue in the Linux kernel code: niu: BUG on inability to find page in rx page hashes.
Problem Details: Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/niu.c b/drivers/net/niu.c index 3d523cb7975a..b9b950845b0e 100644 --- a/drivers/net/niu.c +++ b/drivers/net/niu.c @@ -3330,10 +3330,12 @@ static struct page *niu_find_rxpage(struct rx_ring_info *rp, u64 addr, for (; (p = *pp) != NULL; pp = (struct page **) &p->mapping) { if (p->ind...
c516ac583973196162b1ba7e4d597d6f6892dac0
Analyze and fix the following issue in the Linux kernel code: x86: Add i8042 pre-detection hook to x86_platform_ops
Problem Details: Some x86 platforms like Intel MID platforms don't have i8042 controllers, and i8042 driver's probe to some legacy IO ports may hang the MID processor. With this hook, i8042 driver can runtime check and skip the probe when the pretection fail which also saves some probe time [ hpa note: this is current...
```diff diff --git a/arch/x86/include/asm/x86_init.h b/arch/x86/include/asm/x86_init.h index 519b54327d75..baa579c8e038 100644 --- a/arch/x86/include/asm/x86_init.h +++ b/arch/x86/include/asm/x86_init.h @@ -142,6 +142,7 @@ struct x86_cpuinit_ops { * @set_wallclock: set time back to HW clock * @is_untracked_pat_ran...
54438f9dfcc3902a8ee74ceb8ef71316d9ef98a3
Analyze and fix the following issue in the Linux kernel code: isdn/gigaset: fix leaks in error path
Problem Details: Take care to free all previously allocated ressources in the "out of memory" error path of the ISDN_CMD_DIAL branch. Based on an original patch by Dan Carpenter. Impact: bugfix Reported-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Tilman Schmidt <tilman@imap.cc> Acked-by: Dan Carpenter <error2...
```diff diff --git a/drivers/isdn/gigaset/i4l.c b/drivers/isdn/gigaset/i4l.c index 1d084bbb7239..34bca37d65b9 100644 --- a/drivers/isdn/gigaset/i4l.c +++ b/drivers/isdn/gigaset/i4l.c @@ -419,6 +419,8 @@ oom: dev_err(bcs->cs->dev, "out of memory\n"); for (i = 0; i < AT_NUM; ++i) kfree(commands[i]); + kfree(comman...
7d060ed2877ff6d00e7238226edbaf91493d6d0b
Analyze and fix the following issue in the Linux kernel code: isdn/gigaset: reduce syslog spam
Problem Details: Downgrade some error messages which occur frequently during normal operation to debug messages. Impact: logging Signed-off-by: Tilman Schmidt <tilman@imap.cc> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/isdn/gigaset/capi.c b/drivers/isdn/gigaset/capi.c index 3ef149fe48c8..e5ea344a551a 100644 --- a/drivers/isdn/gigaset/capi.c +++ b/drivers/isdn/gigaset/capi.c @@ -383,13 +383,13 @@ void gigaset_skb_sent(struct bc_state *bcs, struct sk_buff *dskb) ++bcs->trans_up; if (!ap) { - dev_err(...
18c2259c14d8595e64a802940422335d172a53db
Analyze and fix the following issue in the Linux kernel code: isdn/gigaset: handle Supplementary Service Listen
Problem Details: Add minimal handling for the non-optional CAPI FACILITY_REQ Supplementary Service function Listen. Impact: bugfix Signed-off-by: Tilman Schmidt <tilman@imap.cc> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/isdn/gigaset/capi.c b/drivers/isdn/gigaset/capi.c index 68194b502731..3ef149fe48c8 100644 --- a/drivers/isdn/gigaset/capi.c +++ b/drivers/isdn/gigaset/capi.c @@ -45,6 +45,7 @@ #define CAPI_FACILITY_LI 0x0005 #define CAPI_SUPPSVC_GETSUPPORTED 0x0000 +#define CAPI_SUPPSVC_LISTEN 0x0001 ...
24c176258d9b2aa58d86584338fcd2d1a1521dbf
Analyze and fix the following issue in the Linux kernel code: isdn/gigaset: drop debug check on isochronous write
Problem Details: With CONFIG_GIGASET_DEBUG set, every isochronous USB frame after an erroneous one was checked for more errors. This produced only noise messages in practice, so drop it. Impact: cleanup Signed-off-by: Tilman Schmidt <tilman@imap.cc> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/isdn/gigaset/bas-gigaset.c b/drivers/isdn/gigaset/bas-gigaset.c index 2dab5313913b..0ded3640b926 100644 --- a/drivers/isdn/gigaset/bas-gigaset.c +++ b/drivers/isdn/gigaset/bas-gigaset.c @@ -1188,24 +1188,6 @@ static void write_iso_tasklet(unsigned long data) break; } } -#ifde...
2ed5e4ff272c0cb10a602ccb02f97c3b10801739
Analyze and fix the following issue in the Linux kernel code: isdn/gigaset: ignore irrelevant device responses
Problem Details: Downgrade the Gigaset driver's reaction to unknown AT responses from the device from warning to debug level, and remove the handling of some device responses which aren't relevant for the driver's operation. Impact: cleanup Signed-off-by: Tilman Schmidt <tilman@imap.cc> Signed-off-by: David S. Miller ...
```diff diff --git a/drivers/isdn/gigaset/ev-layer.c b/drivers/isdn/gigaset/ev-layer.c index 0d5984a86795..657757b72618 100644 --- a/drivers/isdn/gigaset/ev-layer.c +++ b/drivers/isdn/gigaset/ev-layer.c @@ -35,53 +35,40 @@ #define RT_RING 2 #define RT_NUMBER 3 #define RT_STRING 4 -#define RT_HEX 5 #define RT_ZCAU...
acbc0f039ff4b93da737c91937b7c70018ded39f
Analyze and fix the following issue in the Linux kernel code: gianfar: code cleanup
Problem Details: This patch relates to "[PATCH] gainfar.c : skb_over_panic (kernel-2.6.32.15)" While in 2.6.32.15 it actually fixed a bug here it merely cleans up the previous attempts to fix the bug with a more coherent code. Currently before queuing skb into the rx_recycle it is "un-skb_reserve"-ed so when taken ou...
```diff diff --git a/drivers/net/gianfar.c b/drivers/net/gianfar.c index fccb7a371cc8..746a776a1653 100644 --- a/drivers/net/gianfar.c +++ b/drivers/net/gianfar.c @@ -2420,6 +2420,15 @@ static void gfar_timeout(struct net_device *dev) schedule_work(&priv->reset_task); } +static void gfar_align_skb(struct sk_buff *...
28172739f0a276eb8d6ca917b3974c2edb036da3
Analyze and fix the following issue in the Linux kernel code: net: fix 64 bit counters on 32 bit arches
Problem Details: There is a small possibility that a reader gets incorrect values on 32 bit arches. SNMP applications could catch incorrect counters when a 32bit high part is changed by another stats consumer/provider. One way to solve this is to add a rtnl_link_stats64 param to all ndo_get_stats64() methods, and also...
```diff diff --git a/arch/s390/appldata/appldata_net_sum.c b/arch/s390/appldata/appldata_net_sum.c index 9a9586f4103f..f02e89ce4df1 100644 --- a/arch/s390/appldata/appldata_net_sum.c +++ b/arch/s390/appldata/appldata_net_sum.c @@ -85,7 +85,8 @@ static void appldata_get_net_sum_data(void *data) rcu_read_lock(); fo...
dfe1e8eddcd73fc58124933c14c2efe93fab0b8f
Analyze and fix the following issue in the Linux kernel code: ll_temac: Fix missing iounmaps
Problem Details: Fix missing iounmaps. Signed-off-by: Denis Kirjanov <dkirjanov@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/ll_temac_main.c b/drivers/net/ll_temac_main.c index 52dcc8495647..6474c4973d3a 100644 --- a/drivers/net/ll_temac_main.c +++ b/drivers/net/ll_temac_main.c @@ -964,7 +964,7 @@ temac_of_probe(struct of_device *op, const struct of_device_id *match) np = of_parse_phandle(op->dev.of_node, "...
17762060c25590bfddd68cc1131f28ec720f405f
Analyze and fix the following issue in the Linux kernel code: bridge: Clear IPCB before possible entry into IP stack
Problem Details: The bridge protocol lives dangerously by having incestuous relations with the IP stack. In this instance an abomination has been created where a bogus IPCB area from a bridged packet leads to a crash in the IP stack because it's interpreted as IP options. This patch papers over the problem by clearin...
```diff diff --git a/net/bridge/br_netfilter.c b/net/bridge/br_netfilter.c index 44420992f72f..8fb75f89c4aa 100644 --- a/net/bridge/br_netfilter.c +++ b/net/bridge/br_netfilter.c @@ -591,6 +591,9 @@ static unsigned int br_nf_pre_routing(unsigned int hook, struct sk_buff *skb, pskb_trim_rcsum(skb, len); + /* BUG: ...
73e194639d90594d06d0c10019c0ab4638869135
Analyze and fix the following issue in the Linux kernel code: ath9k: fix a buffer leak in A-MPDU completion
Problem Details: When ath_tx_complete_aggr() is called, it's responsible for returning all buffers in the linked list. This was not done when the STA lookup failed, leading to a race condition that could leak a few buffers when a STA just disconnected. Fix this by immediately returning all buffers to the free list in t...
```diff diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c index 408d1c596a03..05ec36ac55f5 100644 --- a/drivers/net/wireless/ath/ath9k/xmit.c +++ b/drivers/net/wireless/ath/ath9k/xmit.c @@ -329,6 +329,7 @@ static void ath_tx_complete_aggr(struct ath_softc *sc, struct ath_txq *tx...
2b40994cabd2f545d5c11d3a65dcee6f6f9155f8
Analyze and fix the following issue in the Linux kernel code: ath9k: fix a potential buffer leak in the STA teardown path
Problem Details: It looks like it might be possible for a TID to be paused, while still holding some queued buffers, however ath_tx_node_cleanup currently only iterates over active TIDs. Fix this by always checking every allocated TID for the STA that is being cleaned up. Signed-off-by: Felix Fietkau <nbd@openwrt.org>...
```diff diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c index c3681a1dc941..408d1c596a03 100644 --- a/drivers/net/wireless/ath/ath9k/xmit.c +++ b/drivers/net/wireless/ath/ath9k/xmit.c @@ -2430,37 +2430,37 @@ void ath_tx_node_init(struct ath_softc *sc, struct ath_node *an) v...
60ea385ff279a18790a432d57a8302562aaa0f8d
Analyze and fix the following issue in the Linux kernel code: NET: nl80211, fix lock imbalance and netdev referencing
Problem Details: Stanse found that nl80211_set_wiphy imporperly handles a lock and netdev reference and contains unreachable code. It is because there return statement isntead of assignment to result variable. Fix that. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Cc: Johannes Berg <johannes@sipsolutions.net> Cc: "...
```diff diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index a999fc154623..cea595e2ed4d 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c @@ -877,7 +877,7 @@ static int nl80211_set_wiphy(struct sk_buff *skb, struct genl_info *info) int idx, mbm = 0; if (!rdev->ops->set_tx_power) { -...
f8036965ccec4d786d8bf09bf57b793542cb3dce
Analyze and fix the following issue in the Linux kernel code: ath9k_htc: fix memory leak in ath9k_hif_usb_alloc_urbs
Problem Details: Failure cases within ath9k_hif_usb_alloc_urbs are failed to release allocated memory. Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
```diff diff --git a/drivers/net/wireless/ath/ath9k/hif_usb.c b/drivers/net/wireless/ath/ath9k/hif_usb.c index 77b359162d6c..23c15aa9fbd5 100644 --- a/drivers/net/wireless/ath/ath9k/hif_usb.c +++ b/drivers/net/wireless/ath/ath9k/hif_usb.c @@ -730,13 +730,17 @@ static int ath9k_hif_usb_alloc_urbs(struct hif_device_usb *...
83a7a2ad2a9173dcabc05df0f01d1d85b7ba1c2c
Analyze and fix the following issue in the Linux kernel code: x86, alternatives: Use 16-bit numbers for cpufeature index
Problem Details: We already have cpufeature indicies above 255, so use a 16-bit number for the alternatives index. This consumes a padding field and so doesn't add any size, but it means that abusing the padding field to create assembly errors on overflow no longer works. We can retain the test simply by redirecting ...
```diff diff --git a/arch/x86/include/asm/alternative.h b/arch/x86/include/asm/alternative.h index 03b6bb5394a0..bc6abb7bc7ee 100644 --- a/arch/x86/include/asm/alternative.h +++ b/arch/x86/include/asm/alternative.h @@ -45,10 +45,9 @@ struct alt_instr { u8 *instr; /* original instruction */ u8 *replacement; - u8 ...
7179304bfcffbbc66ca8a8498d92e023833b017d
Analyze and fix the following issue in the Linux kernel code: ARM: remove bit-rotten STANDALONE_DEBUG for decompressor
Problem Details: I tried to get this running to debug the regression introduced by e7db7b4 without success. But this has several problems that make it hard to fix: - lib/decompress_inflate.c includes in-kernel headers that make it difficult to compile for user space. - the binary formats changed both in kerne...
```diff diff --git a/arch/arm/boot/compressed/Makefile.debug b/arch/arm/boot/compressed/Makefile.debug deleted file mode 100644 index 491a037b2973..000000000000 --- a/arch/arm/boot/compressed/Makefile.debug +++ /dev/null @@ -1,23 +0,0 @@ -# -# linux/arch/arm/boot/compressed/Makefile -# -# create a compressed vmlinux im...
eb703f98191a505f78d0066712ad67d5dedc4c90
Analyze and fix the following issue in the Linux kernel code: kernel/watchdog: Initialize 'result'
Problem Details: Variable on the stack is not initialized to zero, do it explicitly. This bug was found by a compiler warning: kernel/watchdog.c:463: warning: 'result' may be used uninitialized in this function Signed-off-by: Kulikov Vasiliy <segooon@gmail.com> Acked-by: Don Zickus <dzickus@redhat.com> Cc: Frederic...
```diff diff --git a/kernel/watchdog.c b/kernel/watchdog.c index 91b0b26adc67..613bc1f04610 100644 --- a/kernel/watchdog.c +++ b/kernel/watchdog.c @@ -460,7 +460,7 @@ static void watchdog_disable(int cpu) static void watchdog_enable_all_cpus(void) { int cpu; - int result; + int result = 0; for_each_online_cpu(c...
023eb571a1d0eae738326042dcffa974257eb8c8
Analyze and fix the following issue in the Linux kernel code: drm: correctly update connector DPMS status in drm_fb_helper
Problem Details: We don't currently update the DPMS status of the connector (both in the connector itself and the connector's DPMS property) in the fb helper code. This means that if the kernel FB core has blanked the screen, sysfs will still show a DPMS status of "on". It also means that when X starts, it will try t...
```diff diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c index 1f2cc6b09623..719662034bbf 100644 --- a/drivers/gpu/drm/drm_fb_helper.c +++ b/drivers/gpu/drm/drm_fb_helper.c @@ -315,8 +315,9 @@ static void drm_fb_helper_on(struct fb_info *info) struct drm_device *dev = fb_helper->dev; s...
b2ea4aa67bfd084834edd070e0a4a47857d6db59
Analyze and fix the following issue in the Linux kernel code: drm/radeon/kms: fix shared ddc handling
Problem Details: Connectors with a shared ddc line can be connected to different encoders. Reported by Pasi Kärkkäinen <pasik@iki.fi> on dri-devel Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Cc: stable@kernel.org Signed-off-by: Dave Airlie <airlied@redhat.com>
```diff diff --git a/drivers/gpu/drm/radeon/radeon_connectors.c b/drivers/gpu/drm/radeon/radeon_connectors.c index 0c7ccc6961a3..f58f8bd8f77b 100644 --- a/drivers/gpu/drm/radeon/radeon_connectors.c +++ b/drivers/gpu/drm/radeon/radeon_connectors.c @@ -785,7 +785,9 @@ static enum drm_connector_status radeon_dvi_detect(st...
096486eece7ef38cf1ee46b704482c75c4010fb1
Analyze and fix the following issue in the Linux kernel code: ACPI video: fix string mismatch for Sony SR290 laptop
Problem Details: Fix string mismatch for Sony SR290 laptop. https://bugzilla.kernel.org/show_bug.cgi?id=12904#c45 Signed-off-by: Nik A. Melchior <melchior+kernel@cmu.edu> Signed-off-by: Len Brown <len.brown@intel.com>
```diff diff --git a/drivers/acpi/blacklist.c b/drivers/acpi/blacklist.c index 01381be05e96..2bb28b9d91c4 100644 --- a/drivers/acpi/blacklist.c +++ b/drivers/acpi/blacklist.c @@ -214,7 +214,7 @@ static struct dmi_system_id acpi_osi_dmi_table[] __initdata = { .ident = "Sony VGN-SR290J", .matches = { DMI_MATC...
09079250db4d470f75eddcce31e0229c92d6c3bf
Analyze and fix the following issue in the Linux kernel code: ACPICA: Fix for Alias references within Package objects
Problem Details: This fixes a problem where a reference to an Alias within the definition of a Package was not always resolved properly. Aliases to objects like Processors, ThermalZones, etc. were resolved to the actual object instead of a reference to the object as it should be. Package objects are only allowed to con...
```diff diff --git a/drivers/acpi/acpica/dsobject.c b/drivers/acpi/acpica/dsobject.c index 3607adcaf085..8e85f54a8e0e 100644 --- a/drivers/acpi/acpica/dsobject.c +++ b/drivers/acpi/acpica/dsobject.c @@ -81,6 +81,7 @@ acpi_ds_build_internal_object(struct acpi_walk_state *walk_state, { union acpi_operand_object *obj_d...
150dba38f0c3d2d5f5edc58145d202de08ed623c
Analyze and fix the following issue in the Linux kernel code: ACPICA: Fix lint warning for 64-bit constant
Problem Details: cast to u64. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
```diff diff --git a/drivers/acpi/acpica/nsrepair.c b/drivers/acpi/acpica/nsrepair.c index d4be37751be4..d1c136692667 100644 --- a/drivers/acpi/acpica/nsrepair.c +++ b/drivers/acpi/acpica/nsrepair.c @@ -556,7 +556,7 @@ acpi_ns_repair_null_element(struct acpi_predefined_data *data, /* Need an Integer - create a zer...
ddcc6a037c0f9378f29658636a2c2b54c4238ec4
Analyze and fix the following issue in the Linux kernel code: ACPICA: Update debug output components
Problem Details: Add data table compiler output component Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
```diff diff --git a/include/acpi/acoutput.h b/include/acpi/acoutput.h index 5e952262d6ee..bc4a6deb73b0 100644 --- a/include/acpi/acoutput.h +++ b/include/acpi/acoutput.h @@ -71,8 +71,9 @@ #define ACPI_TOOLS 0x00002000 #define ACPI_EXAMPLE 0x00004000 #define ACPI_DRIVER ...
507f7d5e27015be1e5dda5c56bb5e10315b76f71
Analyze and fix the following issue in the Linux kernel code: ACPICA: iASL/Core: Add support for _WDG/_WED MS methods
Problem Details: These objects are defined by "Windows Instrumentation", and are not part of the ACPI spec. Adds compiler support and runtime typechecking support in the ACPICA core. ACPICA BZ 860. http://www.acpica.org/bugzilla/show_bug.cgi?id=860 Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin ...
```diff diff --git a/drivers/acpi/acpica/acpredef.h b/drivers/acpi/acpica/acpredef.h index 97116082cb6c..10998d369ad0 100644 --- a/drivers/acpi/acpica/acpredef.h +++ b/drivers/acpi/acpica/acpredef.h @@ -503,15 +503,16 @@ static const union acpi_predefined_info predefined_names[] = {{"_WAK", 1, ACPI_RTYPE_NONE | ACPI_...
153e500f516329f439856f52ccbf61d1fd1a946a
Analyze and fix the following issue in the Linux kernel code: ACPI battery: don't invoke power_supply_changed twice when battery is hot-added
Problem Details: When battery is hot-added, we should not invoke power_supply_changed in acpi_battery_notify, because it has been invoked in acpi_battery_update, and battery->bat.changed_work is queued in keventd already. https://bugzilla.kernel.org/show_bug.cgi?id=16244 Signed-off-by: Zhang Rui <rui.zhang@intel.com> ...
```diff diff --git a/drivers/acpi/battery.c b/drivers/acpi/battery.c index 3026e3fa83ef..dc58402b0a17 100644 --- a/drivers/acpi/battery.c +++ b/drivers/acpi/battery.c @@ -868,9 +868,15 @@ static void acpi_battery_remove_fs(struct acpi_device *device) static void acpi_battery_notify(struct acpi_device *device, u32 even...
5870a4d97da136908ca477e3a21bc9f4c2705161
Analyze and fix the following issue in the Linux kernel code: drm/ttm: Allocate the page pool manager in the heap.
Problem Details: Repeated ttm_page_alloc_init/fini fails noisily because the pool manager kobj isn't zeroed out between uses (we could do just that but statically allocated kobjects are generally considered a bad thing). Move it to kzalloc'ed memory. Note that this patch drops the refcounting behavior of the pool allo...
```diff diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc.c b/drivers/gpu/drm/ttm/ttm_page_alloc.c index 2f047577b1e3..b1d67dc973dc 100644 --- a/drivers/gpu/drm/ttm/ttm_page_alloc.c +++ b/drivers/gpu/drm/ttm/ttm_page_alloc.c @@ -104,7 +104,6 @@ struct ttm_pool_opts { struct ttm_pool_manager { struct kobject kobj; s...
7263e715c91f3de554ab7d4f20f56e080783d0f5
Analyze and fix the following issue in the Linux kernel code: kbuild: Fix path to scripts/setlocalversion
Problem Details: Commit 0a564b2 broke LOCALVERSION for O=... builds. Ouch. Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Reported-and-tested-by: Rafael J. Wysocki <rjw@sisk.pl> Reported-by: Peter Anvin <hpa@zytor.com> Signed-off-by: Michal Marek <mmarek@suse.cz> Signed-off-by: Linus Torvalds <torvalds@linux-fou...
```diff diff --git a/Makefile b/Makefile index 914e5f514888..f9835c80a274 100644 --- a/Makefile +++ b/Makefile @@ -886,7 +886,7 @@ $(vmlinux-dirs): prepare scripts # Store (new) KERNELRELASE string in include/config/kernel.release include/config/kernel.release: include/config/auto.conf FORCE $(Q)rm -f $@ - $(Q)echo...
e96c4b081df0991a57b244f68c3955a9ea00bd0a
Analyze and fix the following issue in the Linux kernel code: ACPI / Sleep: Free NVS copy if suspending of devices fails
Problem Details: If suspending of devices fails or system suspend is tested in the "devices" mode, the memory allocated for storing a copy of the ACPI NVS area will not be freed, because acpi_pm_finish() is not called in that case. Fix this by moving the suspend_nvs_free() call to acpi_pm_end(). Signed-off-by: Rafael...
```diff diff --git a/drivers/acpi/sleep.c b/drivers/acpi/sleep.c index 5b7c52e4a00f..da68ed24f4c5 100644 --- a/drivers/acpi/sleep.c +++ b/drivers/acpi/sleep.c @@ -145,7 +145,6 @@ static void acpi_pm_finish(void) { u32 acpi_state = acpi_target_sleep_state; - suspend_nvs_free(); acpi_ec_unblock_transactions(); ...
7a52b34b07122ff5f45258d47f260f8a525518f0
Analyze and fix the following issue in the Linux kernel code: IPoIB: Fix world-writable child interface control sysfs attributes
Problem Details: Sumeet Lahorani <sumeet.lahorani@oracle.com> reported that the IPoIB child entries are world-writable; however we don't want ordinary users to be able to create and destroy child interfaces, so fix them to be writable only by root. Signed-off-by: Or Gerlitz <ogerlitz@voltaire.com> Cc: <stable@kernel.o...
```diff diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c index df3eb8c9fd96..b4b22576f12a 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_main.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c @@ -1163,7 +1163,7 @@ static ssize_t create_child(struct device *dev, ret...
950aff53949268eec4b0f2bd49f700f9585698f7
Analyze and fix the following issue in the Linux kernel code: IB/qib: Completion queue callback needs to be single threaded
Problem Details: Workqueues aren't exactly equivalent to tasklets since the callback function may be called from multiple CPUs before the callback returns. This causes completion notification callbacks to have MT bugs since they weren't expecting this behavior. The fix is to use a single threaded work queue. Signed-of...
```diff diff --git a/drivers/infiniband/hw/qib/qib_init.c b/drivers/infiniband/hw/qib/qib_init.c index 1d4db4b19d76..7831ff835d15 100644 --- a/drivers/infiniband/hw/qib/qib_init.c +++ b/drivers/infiniband/hw/qib/qib_init.c @@ -1059,7 +1059,7 @@ static int __init qlogic_ib_init(void) goto bail_dev; } - qib_cq_wq ...
2d757a7ce06abb4afe5b3002d4cdc40e47d7facc
Analyze and fix the following issue in the Linux kernel code: IB/qib: Clear 6120 hardware error register
Problem Details: The hardware error register needs to be cleared or another interrupt will be generated, thus causing an infinite loop. This is a regression introduced when removing debug output. Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
```diff diff --git a/drivers/infiniband/hw/qib/qib_iba6120.c b/drivers/infiniband/hw/qib/qib_iba6120.c index 1eadadc13da8..a5e29dbb9537 100644 --- a/drivers/infiniband/hw/qib/qib_iba6120.c +++ b/drivers/infiniband/hw/qib/qib_iba6120.c @@ -1355,8 +1355,7 @@ static int qib_6120_bringup_serdes(struct qib_pportdata *ppd) ...
b9e03e0489a8616fc415e62128d05ad0159a20a2
Analyze and fix the following issue in the Linux kernel code: IB/qib: Mask hardware error during link reset
Problem Details: The HCA checks for certain hardware errors which can be falsely triggered when the IB link is reset. The fix is to mask them rather than report them. Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
```diff diff --git a/drivers/infiniband/hw/qib/qib_7322_regs.h b/drivers/infiniband/hw/qib/qib_7322_regs.h index a97440ba924c..32dc81ff8d4a 100644 --- a/drivers/infiniband/hw/qib/qib_7322_regs.h +++ b/drivers/infiniband/hw/qib/qib_7322_regs.h @@ -742,15 +742,15 @@ #define QIB_7322_HwErrMask_IBCBusFromSPCParityErrMask_...