id
stringlengths
40
40
instruction
stringlengths
68
308
input
stringlengths
17
33.4k
output
stringlengths
100
30k
ce45b873028fdf94a24f0850cd554e6fda593e16
Analyze and fix the following issue in the Linux kernel code: ehea: Fixing statistics
Problem Details: (Applied over Eric's "ehea: fix use after free" patch) Currently ehea stats are broken. The bytes counters are got from the hardware, while the packets counters are got from the device driver. Also, the device driver counters are resetted during the the down process, and the hardware aren't, causing s...
```diff diff --git a/drivers/net/ehea/ehea.h b/drivers/net/ehea/ehea.h index 1321cb6401cf..8e745e74828d 100644 --- a/drivers/net/ehea/ehea.h +++ b/drivers/net/ehea/ehea.h @@ -396,7 +396,9 @@ struct ehea_port_res { int swqe_ll_count; u32 swqe_id_counter; u64 tx_packets; + u64 tx_bytes; u64 rx_packets; + u64 rx_b...
a71fb88145a03678fef3796930993e390db68a15
Analyze and fix the following issue in the Linux kernel code: bonding: Fix lockdep warning after bond_vlan_rx_register()
Problem Details: Fix lockdep warning: [ 52.991402] ====================================================== [ 52.991511] [ INFO: SOFTIRQ-safe -> SOFTIRQ-unsafe lock order detected ] [ 52.991569] 2.6.36-04573-g4b60626-dirty #65 [ 52.991622] ------------------------------------------------------ [ 52.991696] ip/4...
```diff diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index beb3b7cecd52..bdb68a600382 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c @@ -493,9 +493,9 @@ static void bond_vlan_rx_register(struct net_device *bond_dev, struct slave *slave; int i; ...
6f9419619ef6de9d7781c1a312cf6099e5b44789
Analyze and fix the following issue in the Linux kernel code: msm: timer: Decrease shift on timer clocksource
Problem Details: The shift of 24 causes the shift and multiply operation to sometimes overflow, resulting in incorrect timer values and poor performance. Signed-off-by: Jeff Ohlstein <johlstei@codeaurora.org> Signed-off-by: Daniel Walker <dwalker@codeaurora.org>
```diff diff --git a/arch/arm/mach-msm/timer.c b/arch/arm/mach-msm/timer.c index 7689848ec680..950100f19d07 100644 --- a/arch/arm/mach-msm/timer.c +++ b/arch/arm/mach-msm/timer.c @@ -137,7 +137,7 @@ static struct msm_clock msm_clocks[] = { .rating = 200, .read = msm_gpt_read, .mask ...
a86c44d48a03dcd73972ddadb55a77e6b308fa0b
Analyze and fix the following issue in the Linux kernel code: arm: mach-msm: fix error handling in msm_iommu_probe()
Problem Details: msm_iommu_probe() didn't free mem_region and mapped IO. Also if request_mem_region() failed then error handling code dereferenced NULL pointer. Signed-off-by: Vasiliy Kulikov <segooon@gmail.com> Acked-by: Stepan Moskovchenko <stepanm@codeaurora.org> Signed-off-by: Daniel Walker <dwalker@codeaurora.org...
```diff diff --git a/arch/arm/mach-msm/iommu_dev.c b/arch/arm/mach-msm/iommu_dev.c index c33ae786c41f..9019cee2907b 100644 --- a/arch/arm/mach-msm/iommu_dev.c +++ b/arch/arm/mach-msm/iommu_dev.c @@ -128,7 +128,7 @@ static void msm_iommu_reset(void __iomem *base) static int msm_iommu_probe(struct platform_device *pde...
efdfb2b118cc11c88adcbcb8036795eb34f419a8
Analyze and fix the following issue in the Linux kernel code: msm: fix Kconfig target board selection
Problem Details: This prevents build failures since it's currently possible to select 8x50, 7x30, or 7x00 without selecting a specific board. These changes just force a target selection, which is currently defaulting to the most common one (7x30 only has one). Signed-off-by: Daniel Walker <dwalker@codeaurora.org>
```diff diff --git a/arch/arm/mach-msm/Kconfig b/arch/arm/mach-msm/Kconfig index 3115a29dec4e..3d74a737e70a 100644 --- a/arch/arm/mach-msm/Kconfig +++ b/arch/arm/mach-msm/Kconfig @@ -6,6 +6,7 @@ choice config ARCH_MSM7X00A bool "MSM7x00A / MSM7x01A" + select MACH_TROUT if !MACH_HALIBUT select ARCH_MSM_ARM11 se...
79d98313e0985fa754fc50ea639cbafdfc0860a6
Analyze and fix the following issue in the Linux kernel code: msm: fix compile failure on struct membank node member
Problem Details: In commit be370302742ff9948f2a42b15cb2ba174d97b930 "ARM: Remove DISCONTIGMEM support", it removed this "node" member which cased the following compile failure in mach-msm, linux/arch/arm/mach-msm/board-halibut.c: In function 'halibut_fixup': linux/arch/arm/mach-msm/board-halibut.c:86: error: 'struct m...
```diff diff --git a/arch/arm/mach-msm/board-halibut.c b/arch/arm/mach-msm/board-halibut.c index 59edecbe126c..75dabb16c802 100644 --- a/arch/arm/mach-msm/board-halibut.c +++ b/arch/arm/mach-msm/board-halibut.c @@ -83,7 +83,6 @@ static void __init halibut_fixup(struct machine_desc *desc, struct tag *tags, { mi->nr_b...
74b0b85b88aaa952023762e0280799aaae849841
Analyze and fix the following issue in the Linux kernel code: tunnels: Fix tunnels change rcu protection
Problem Details: After making rcu protection for tunnels (ipip, gre, sit and ip6) a bug was introduced into the SIOCCHGTUNNEL code. The tunnel is first unlinked, then addresses change, then it is linked back probably into another bucket. But while changing the parms, the hash table is unlocked to readers and they can ...
```diff diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c index d0ffcbe369b7..01087e035b7d 100644 --- a/net/ipv4/ip_gre.c +++ b/net/ipv4/ip_gre.c @@ -1072,6 +1072,7 @@ ipgre_tunnel_ioctl (struct net_device *dev, struct ifreq *ifr, int cmd) break; } ipgre_tunnel_unlink(ign, t); + synchronize_net(); ...
4e929d2bcf13eeaa9636448c55690b383a910391
Analyze and fix the following issue in the Linux kernel code: ARM: fix memblock breakage
Problem Details: Will says: | Commit e63075a3 removed the explicit MEMBLOCK_REAL_LIMIT #define | and introduced the requirement that arch code calls | memblock_set_current_limit to ensure that the __va macro can | be used on physical addresses returned from memblock_alloc. Unfortunately, ARM was missed out of this cha...
```diff diff --git a/arch/arm/include/asm/memblock.h b/arch/arm/include/asm/memblock.h index fdbc43b2e6c0..b8da2e415e4e 100644 --- a/arch/arm/include/asm/memblock.h +++ b/arch/arm/include/asm/memblock.h @@ -1,13 +1,6 @@ #ifndef _ASM_ARM_MEMBLOCK_H #define _ASM_ARM_MEMBLOCK_H -#ifdef CONFIG_MMU -extern phys_addr_t l...
88d927e94805ebeec11ec7687df7789b954e334e
Analyze and fix the following issue in the Linux kernel code: ARM: 6465/1: Fix data abort accessing proc_info from __lookup_processor_type
Problem Details: Commit 5085f3ff458521045f7e43da62b8c30ea7df2e82 added better support for CONFIG_HOTPLUG_CPU by keeping proc_info around. However, depending on the Kconfig options selected, this can make the booting fail mysteriously early on. Turns out a data abort can happen in __lookup_processor in ldmia r5 {r3, r4...
```diff diff --git a/arch/arm/kernel/vmlinux.lds.S b/arch/arm/kernel/vmlinux.lds.S index 1953e3d21abf..cead8893b46b 100644 --- a/arch/arm/kernel/vmlinux.lds.S +++ b/arch/arm/kernel/vmlinux.lds.S @@ -113,6 +113,7 @@ SECTIONS *(.rodata.*) *(.glue_7) *(.glue_7t) + . = ALIGN(4); *(.got) /* Global offset t...
d463f3633da7307c4162c4b45e0a94bb7fab44d3
Analyze and fix the following issue in the Linux kernel code: ARM: 6460/1: ixp2000: fix type of ixp2000_timer_interrupt
Problem Details: This fixes a build warning existing since at least 2.6.30: arch/arm/mach-ixp2000/core.c:217: warning: initialization from incompatible pointer type Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
```diff diff --git a/arch/arm/mach-ixp2000/core.c b/arch/arm/mach-ixp2000/core.c index babb22597163..e24e3d05397f 100644 --- a/arch/arm/mach-ixp2000/core.c +++ b/arch/arm/mach-ixp2000/core.c @@ -197,7 +197,7 @@ unsigned long ixp2000_gettimeoffset (void) return offset / ticks_per_usec; } -static int ixp2000_timer_i...
521e9549d58ebcb53042c7aad6bc60d5c2fc975f
Analyze and fix the following issue in the Linux kernel code: ARM: 6449/1: Fix for compiler warning of uninitialized variable.
Problem Details: ARM: mach-sa1100: Fix for compiler warning of uninitialized variable. This is a fix for the compiler warning: 'new_ppcr' may be used uninitialized in this function. Signed-off-by: Marcelo Roberto Jimenez <mroberto@cpti.cetuc.puc-rio.br> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
```diff diff --git a/arch/arm/mach-sa1100/cpu-sa1100.c b/arch/arm/mach-sa1100/cpu-sa1100.c index c0a13ef5436f..96f7dc103b59 100644 --- a/arch/arm/mach-sa1100/cpu-sa1100.c +++ b/arch/arm/mach-sa1100/cpu-sa1100.c @@ -184,16 +184,15 @@ static int sa1100_target(struct cpufreq_policy *policy, { unsigned int cur = sa11x0_...
f444fce3c0aa199facc8c2be7635a4a82b84b71e
Analyze and fix the following issue in the Linux kernel code: ARM: 6445/1: fixup TCM memory types
Problem Details: After Santosh's fixup of the generic MT_MEMORY and MT_MEMORY_NONCACHED I add this fix to the TCM memory types. The main change is that the ITCM memory is L_PTE_WRITE and DOMAIN_KERNEL which works just fine. The changed to the DTCM is just cosmetic to fit with surrounding code. Cc: Santosh Shilimkar <s...
```diff diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c index c32f731d56d3..d184d25e9a5f 100644 --- a/arch/arm/mm/mmu.c +++ b/arch/arm/mm/mmu.c @@ -265,17 +265,17 @@ static struct mem_type mem_types[] = { .domain = DOMAIN_KERNEL, }, [MT_MEMORY_DTCM] = { - .prot_pte = L_PTE_PRESENT | L_PTE_YOUNG | - ...
f7347ce4ee7c65415f84be915c018473e7076f31
Analyze and fix the following issue in the Linux kernel code: fasync: re-organize fasync entry insertion to allow it under a spinlock
Problem Details: You currently cannot use "fasync_helper()" in an atomic environment to insert a new fasync entry, because it will need to allocate the new "struct fasync_struct". Yet fcntl_setlease() wants to call this under lock_flocks(), which is in the process of being converted from the BKL to a spinlock. In ord...
```diff diff --git a/fs/fcntl.c b/fs/fcntl.c index f8cc34f542c3..dcdbc6f5c33b 100644 --- a/fs/fcntl.c +++ b/fs/fcntl.c @@ -640,7 +640,7 @@ static void fasync_free_rcu(struct rcu_head *head) * match the state "is the filp on a fasync list". * */ -static int fasync_remove_entry(struct file *filp, struct fasync_stru...
3d435ad7218ff58c846d7e52d87c2daf115f50cd
Analyze and fix the following issue in the Linux kernel code: ath5k: Fix double free on hw attach error path
Problem Details: If ath5k_hw_attach fails it will free sc->ah (local variable ah) before returning. However, when it reports failure the caller (ath5k_pci_probe) will also free sc->ah. Let the caller handle the deallocation, it does so on further errors as well. Signed-off-by: Jones Desougi <jones.desougi@27m.se> Sign...
```diff diff --git a/drivers/net/wireless/ath/ath5k/attach.c b/drivers/net/wireless/ath/ath5k/attach.c index cd0b14a0a93a..fbe8aca975d8 100644 --- a/drivers/net/wireless/ath/ath5k/attach.c +++ b/drivers/net/wireless/ath/ath5k/attach.c @@ -139,12 +139,12 @@ int ath5k_hw_attach(struct ath5k_softc *sc) /* Fill the ath5k...
dc9f48ce7c7d345be31208def51572a8250a4a03
Analyze and fix the following issue in the Linux kernel code: mac80211: Fix scan_ies_len to include DS Params
Problem Details: Commit 651b52254fc061f02d965524e71de4333a009a5a added DS Parameter Set information into Probe Request frames that are transmitted on 2.4 GHz band, but it failed to increment local->scan_ies_len to cover this new information. This variable needs to be updated to match the maximum IE data length so that ...
```diff diff --git a/net/mac80211/main.c b/net/mac80211/main.c index 6b322fa681f5..107a0cbe52ac 100644 --- a/net/mac80211/main.c +++ b/net/mac80211/main.c @@ -677,10 +677,11 @@ int ieee80211_register_hw(struct ieee80211_hw *hw) /* * Calculate scan IE length -- we need this to alloc * memory and to subtract from...
e609e2ea2cdb3448e7849703179cd792a28dcc55
Analyze and fix the following issue in the Linux kernel code: ath9k: fix tx aggregation flush on AR9003
Problem Details: Completing aggregate frames can lead to new buffers being pushed into the tid queues due to software retransmission. When the tx queues are being drained, all pending aggregates must be completed before the tid queues get drained, otherwise buffers might be leaked. Signed-off-by: Felix Fietkau <nbd@op...
```diff diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c index 30ef2dfc1ed2..f2ade2402ce2 100644 --- a/drivers/net/wireless/ath/ath9k/xmit.c +++ b/drivers/net/wireless/ath/ath9k/xmit.c @@ -1089,15 +1089,6 @@ void ath_draintxq(struct ath_softc *sc, struct ath_txq *txq, bool retr...
5e848f789d60000d39d9a5f26ab02dbdd963f6cd
Analyze and fix the following issue in the Linux kernel code: ath9k: lock reset and PCU start/stopping
Problem Details: Apart from locking the start and stop PCU we need to ensure we also content starting and stopping the PCU between hardware resets. This is part of a series that will help resolve the bug: https://bugzilla.kernel.org/show_bug.cgi?id=14624 For more details about this issue refer to: http://marc.info/...
```diff diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c index 47df22b14cf8..b52f1cf8a603 100644 --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c @@ -241,6 +241,9 @@ int ath_set_channel(struct ath_softc *sc, struct ieee80211_hw *hw, */ ...
b79b33c4baf2532aac2c0924dce5a738099b888c
Analyze and fix the following issue in the Linux kernel code: ath9k: rename rxflushlock to pcu_lock
Problem Details: The real way to lock RX is to contend on the PCU and reset, this will be fixed in the next patch but for now just do the renames so that the next patch which changes the locking order is crystal clear. This is part of a series that will help resolve the bug: https://bugzilla.kernel.org/show_bug.cgi?i...
```diff diff --git a/drivers/net/wireless/ath/ath9k/ath9k.h b/drivers/net/wireless/ath/ath9k/ath9k.h index 973c919fdd27..9b8e7e3fcebd 100644 --- a/drivers/net/wireless/ath/ath9k/ath9k.h +++ b/drivers/net/wireless/ath/ath9k/ath9k.h @@ -310,7 +310,7 @@ struct ath_rx { u8 rxotherant; u32 *rxlink; unsigned int rxfilt...
7583c550c3e635dcc61ab127c36ecefd59fb8dc8
Analyze and fix the following issue in the Linux kernel code: ath9k: add locking for starting the PCU on RX
Problem Details: There was some locking for starting some parts of RX but not for starting the PCU. Include this otherwise we can content against stopping the PCU. This can potentially lead to races against different buffers on the PCU which can lead to to the DMA RX engine writing to buffers which are already freed. ...
```diff diff --git a/drivers/net/wireless/ath/ath9k/recv.c b/drivers/net/wireless/ath/ath9k/recv.c index e581b1f6c40c..b3c9baf855c4 100644 --- a/drivers/net/wireless/ath/ath9k/recv.c +++ b/drivers/net/wireless/ath/ath9k/recv.c @@ -297,11 +297,11 @@ static void ath_edma_start_recv(struct ath_softc *sc) ath_rx_addbuffe...
1e450285281bdf766272c181ecd43d4f2f0711ce
Analyze and fix the following issue in the Linux kernel code: ath9k: add locking for stopping RX
Problem Details: ath9k locks for starting RX but not for stopping RX. We could potentially run into a situation where tried to stop RX but immediately started RX. This allows for races on the the RX engine deciding what buffer we last left off on and could potentially cause ath9k to DMA into already free'd memory or in...
```diff diff --git a/drivers/net/wireless/ath/ath9k/recv.c b/drivers/net/wireless/ath/ath9k/recv.c index fe73fc50082a..e581b1f6c40c 100644 --- a/drivers/net/wireless/ath/ath9k/recv.c +++ b/drivers/net/wireless/ath/ath9k/recv.c @@ -306,10 +306,8 @@ static void ath_edma_start_recv(struct ath_softc *sc) static void ath...
a282a1fa6b23bd21ba0b86e53ed2a316b001836f
Analyze and fix the following issue in the Linux kernel code: lockd: fix nlmsvc_notify_blocked locking
Problem Details: nlmsvc_notify_blocked walks the nlm_blocked list, which requires nlm_blocked_lock. Signed-off-by: J. Bruce Fields <bfields@redhat.com> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
```diff diff --git a/fs/lockd/svclock.c b/fs/lockd/svclock.c index 6f1ef000975a..c462d346acbd 100644 --- a/fs/lockd/svclock.c +++ b/fs/lockd/svclock.c @@ -700,14 +700,16 @@ nlmsvc_notify_blocked(struct file_lock *fl) struct nlm_block *block; dprintk("lockd: VFS unblock notification for block %p\n", fl); + spin_lo...
e5edb7b19fd207f78adfdf4d9d5e1dd74a7eabd3
Analyze and fix the following issue in the Linux kernel code: qlcnic: fix mac learning
Problem Details: In failover bonding case, same mac address can be programmed on other slave function. Fw will delete old entry (original func) associated with that mac address. Need to reporgram mac address, if failover again happen to original function. Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Sig...
```diff diff --git a/drivers/net/qlcnic/qlcnic.h b/drivers/net/qlcnic/qlcnic.h index 26c37d3a5868..a60ff17eafd8 100644 --- a/drivers/net/qlcnic/qlcnic.h +++ b/drivers/net/qlcnic/qlcnic.h @@ -942,6 +942,7 @@ struct qlcnic_ipaddr { #define QLCNIC_LOOPBACK_TEST 2 #define QLCNIC_FILTER_AGE 80 +#define QLCNIC_READD_AGE...
e5ccd96110d5ac0f73b695ba606feb6d69472f26
Analyze and fix the following issue in the Linux kernel code: ehea: fix use after free
Problem Details: ehea_start_xmit() dereferences skb after its freeing in ehea_xmit3() to get vlan tags. Move the offending block before the potential ehea_xmit3() call. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: Breno Leitao <leitao@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@da...
```diff diff --git a/drivers/net/ehea/ehea_main.c b/drivers/net/ehea/ehea_main.c index bb7d306fb446..e59d38629099 100644 --- a/drivers/net/ehea/ehea_main.c +++ b/drivers/net/ehea/ehea_main.c @@ -2249,6 +2249,11 @@ static int ehea_start_xmit(struct sk_buff *skb, struct net_device *dev) memset(swqe, 0, SWQE_HEADER_SIZE...
c1b60092cf307fef12f793abf7cf8167e26a6ccf
Analyze and fix the following issue in the Linux kernel code: qlge: bugfix: Restoring the vlan setting.
Problem Details: Signed-off-by: Jitendra Kalsaria <jitendra.kalsaria@qlogic.com> Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
```diff diff --git a/drivers/net/qlge/qlge_main.c b/drivers/net/qlge/qlge_main.c index e6210563abd4..c30e0fe55a31 100644 --- a/drivers/net/qlge/qlge_main.c +++ b/drivers/net/qlge/qlge_main.c @@ -2385,6 +2385,20 @@ static void qlge_vlan_rx_kill_vid(struct net_device *ndev, u16 vid) } +static void qlge_restore_vlan(...
f203af7088cad0845ee128bb736bd372158c3e22
Analyze and fix the following issue in the Linux kernel code: be2net: Schedule/Destroy worker thread in probe()/remove() rather than open()/close()
Problem Details: When async mcc compls are rcvd on an i/f that is down (and so interrupts are disabled) they just lie unprocessed in the compl queue.The compl queue can eventually get filled up and cause the BE to lock up.The fix is to use be_worker to reap mcc compls when the i/f is down.be_worker is now launched in b...
```diff diff --git a/drivers/net/benet/be_main.c b/drivers/net/benet/be_main.c index 6b80a06eb3a7..c36cd2ffbadc 100644 --- a/drivers/net/benet/be_main.c +++ b/drivers/net/benet/be_main.c @@ -1802,6 +1802,20 @@ static void be_worker(struct work_struct *work) struct be_rx_obj *rxo; int i; + /* when interrupts are n...
853dc2e03ddd0c49885ed55c48755d2b1073122a
Analyze and fix the following issue in the Linux kernel code: ipv6: fix refcnt problem related to POSTDAD state
Problem Details: After running this bonding setup script modprobe bonding miimon=100 mode=0 max_bonds=1 ifconfig bond0 10.1.1.1/16 ifenslave bond0 eth1 ifenslave bond0 eth3 on s390 with qeth-driven slaves, modprobe -r fails with this message unregister_netdevice: waiting for bond0 to become free. Us...
```diff diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index ef6fc16ae5d9..e048ec62d109 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c @@ -1427,8 +1427,10 @@ void addrconf_dad_failure(struct inet6_ifaddr *ifp) { struct inet6_dev *idev = ifp->idev; - if (addrconf_dad_end(ifp)) + if (addrconf_dad...
af1905dbec44445d75851996819ac2203670bd0f
Analyze and fix the following issue in the Linux kernel code: net: Fix some corner cases in dev_can_checksum()
Problem Details: dev_can_checksum() incorrectly returns true in these cases: 1. The skb has both out-of-band and in-band VLAN tags and the device supports checksum offload for the encapsulated protocol but only with one layer of encapsulation. 2. The skb has a VLAN tag and the device supports generic checksummin...
```diff diff --git a/net/core/dev.c b/net/core/dev.c index e8a8dc19365b..3c5fbfbb3181 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -1696,22 +1696,18 @@ static bool can_checksum_protocol(unsigned long features, __be16 protocol) static bool dev_can_checksum(struct net_device *dev, struct sk_buff *skb) { + __be...
cd0ea2419544cfc4ccbf8ee0087d0d9f109852d2
Analyze and fix the following issue in the Linux kernel code: gianfar: Fix crashes on RX path (Was Re: [Bugme-new] [Bug 19692] New: linux-2.6.36-rc5 crash with gianfar ethernet at full line rate traffic)
Problem Details: The rx_recycle queue is global per device but can be accesed by many napi handlers at the same time, so it needs full skb_queue primitives (with locking). Otherwise, various crashes caused by broken skbs are possible. This patch resolves, at least partly, bugzilla bug 19692. (Because of some doubts th...
```diff diff --git a/drivers/net/gianfar.c b/drivers/net/gianfar.c index 4c4cc80ec0a1..49e4ce1246a7 100644 --- a/drivers/net/gianfar.c +++ b/drivers/net/gianfar.c @@ -2511,7 +2511,7 @@ static int gfar_clean_tx_ring(struct gfar_priv_tx_q *tx_queue) skb_recycle_check(skb, priv->rx_buffer_size + RXBUF_ALIGNMENT...
7655e594945289b418af39f6669fea4666a7b520
Analyze and fix the following issue in the Linux kernel code: [media] af9015: Fix max I2C message size when used with tda18271
Problem Details: Changeset 1724c8fa7eb33d68898e060a08a8e6a88348b62f added an option to change the maximum I2C size to 8 bytes. However, it forgot to replace the previous usage at af9015 to use the newly defined macro value (TDA18271_16_BYTE_CHUNK_INIT). A latter changeset (e350d44fed8eb86a7192a579e3687fcd76a4645b) ext...
```diff diff --git a/drivers/media/common/tuners/tda18271-common.c b/drivers/media/common/tuners/tda18271-common.c index 195b30e3872d..5466d47db899 100644 --- a/drivers/media/common/tuners/tda18271-common.c +++ b/drivers/media/common/tuners/tda18271-common.c @@ -237,7 +237,7 @@ int tda18271_write_regs(struct dvb_fronte...
292aa141277b142148d15bf28104f8890616e291
Analyze and fix the following issue in the Linux kernel code: MN10300: BUG to BUG_ON changes
Problem Details: Signed-off-by: Stoyan Gaydarov <stoyboyker@gmail.com> Signed-off-by: David Howells <dhowells@redhat.com>
```diff diff --git a/arch/mn10300/kernel/irq.c b/arch/mn10300/kernel/irq.c index e2d5ed891f37..b5b970d2954a 100644 --- a/arch/mn10300/kernel/irq.c +++ b/arch/mn10300/kernel/irq.c @@ -159,8 +159,7 @@ asmlinkage void do_IRQ(void) int irq; sp = current_stack_pointer(); - if (sp - (sp & ~(THREAD_SIZE - 1)) < STACK_WA...
95a2f6f72d37762ba1b3d6c8031f66a6467a63df
Analyze and fix the following issue in the Linux kernel code: Partially revert patch that encloses asm-offset.h numbers in brackets
Problem Details: Partially revert patch: commit 3234282f33b29d349bcada40204fc7c8fda7fe72 Author: Jan Beulich <JBeulich@novell.com> Date: Tue Oct 19 14:52:26 2010 +0100 x86, asm: Fix CFI macro invocations to deal with shortcomings in gas This breaks MN10300 arch as this changes many instances of instructions sim...
```diff diff --git a/Kbuild b/Kbuild index 431f7ca2404c..b00037ad7e03 100644 --- a/Kbuild +++ b/Kbuild @@ -53,7 +53,7 @@ targets += arch/$(SRCARCH)/kernel/asm-offsets.s # Default sed regexp - multiline due to syntax constraints define sed-y "/^->/{s:->#\(.*\):/* \1 */:; \ - s:^->\([^ ]*\) [\$$#]*\([-0-9]*\) \(.*\):...
abbce906d05ec37289cd0c3b4e35b2db26eab19b
Analyze and fix the following issue in the Linux kernel code: (trivial) Fix compiler warning in kernel/modules.c
Problem Details: Building with CONFIG_KALLSYMS=n gives following warning: /mnt/src/linux-git/kernel/module.c: In function ‘post_relocation’: /mnt/src/linux-git/kernel/module.c:2534:2: warning: passing argument 2 of ‘add_kallsyms’ discards qualifiers from pointer target type /mnt/src/linux-git/kernel/module.c:2038:13: ...
```diff diff --git a/kernel/module.c b/kernel/module.c index 2df46301a7a4..437a74a7524a 100644 --- a/kernel/module.c +++ b/kernel/module.c @@ -2037,7 +2037,7 @@ static inline void layout_symtab(struct module *mod, struct load_info *info) { } -static void add_kallsyms(struct module *mod, struct load_info *info) +sta...
d1ba71f7645696020864fe3cea3049befbe50408
Analyze and fix the following issue in the Linux kernel code: sh64: oprofile: Fix up kernel stack pointer size mismatch.
Problem Details: For the backtrace code its assumed that the stack pointer is 32-bits, which is not the case with the sh64 registers. Use the shared kernel_stack_pointer() helper to get at the actual register, which already takes care of the necessary typecasting. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
```diff diff --git a/arch/sh/oprofile/backtrace.c b/arch/sh/oprofile/backtrace.c index 2bc74de23f08..37f3a75ea6cb 100644 --- a/arch/sh/oprofile/backtrace.c +++ b/arch/sh/oprofile/backtrace.c @@ -91,7 +91,7 @@ void sh_backtrace(struct pt_regs * const regs, unsigned int depth) if (depth > backtrace_limit) depth = ba...
dd2b379f071424f36f9f90ff83cb4ad058c7b6ed
Analyze and fix the following issue in the Linux kernel code: drm/i915: Fix typo from "Enable DisplayPort Audio"
Problem Details: Hi, while I looked through your changes in drm-intel git tree (as I've got a pressure for supporting DisplayPort audio), I stumbled on the possible bug in the commit a9756bb5b25d5d997df0c5d8c95db01292191bea Author: Zhenyu Wang <zhenyuw@linux.intel.com> Date: Sun Sep 19 13:09:06 2010 +0800 drm/i9...
```diff diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index 891f4f1d63b1..c8e005553310 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c @@ -1517,7 +1517,7 @@ g4x_dp_detect(struct intel_dp *intel_dp) status = connector_status_connected; } - retur...
2e4f17d230d84579fef07836fb5f69bf1a0a47ad
Analyze and fix the following issue in the Linux kernel code: sh: oprofile: Fix up and extend op_name_from_perf_id().
Problem Details: op_name_from_perf_id() currently returns a local variable, which isn't terribly productive. As we only handle a single PMU case for now, simply allocate and free the string from the arch init/exit context and have op_name_from_perf_id() hand back the cached string. This also takes UTS_MACHINE in to ac...
```diff diff --git a/arch/sh/kernel/cpu/sh4/perf_event.c b/arch/sh/kernel/cpu/sh4/perf_event.c index 7f9ecc9c2d02..dbf3b4bb71fe 100644 --- a/arch/sh/kernel/cpu/sh4/perf_event.c +++ b/arch/sh/kernel/cpu/sh4/perf_event.c @@ -225,7 +225,7 @@ static void sh7750_pmu_enable_all(void) } static struct sh_pmu sh7750_pmu = {...
cdefba03e44bd3b3311a3849a81ec7030dfa1519
Analyze and fix the following issue in the Linux kernel code: PNP: Set up pnp_debug via module and not via boot param.
Problem Details: Cleanup only, no functional change (pnp.debug can be enabled and disabled at runtime, but that's not a real enhancement). This one depends on another PNP cleanup patch: PNP: Compile all pnp built-in stuff in one module namespace Signed-off-by: Thomas Renninger <trenn@suse.de> Signed-off-by: Bjorn Hel...
```diff diff --git a/drivers/pnp/core.c b/drivers/pnp/core.c index 88b3cde52596..9801918b2726 100644 --- a/drivers/pnp/core.c +++ b/drivers/pnp/core.c @@ -218,10 +218,5 @@ subsys_initcall(pnp_init); int pnp_debug; #if defined(CONFIG_PNP_DEBUG_MESSAGES) -static int __init pnp_debug_setup(char *__unused) -{ - pnp_deb...
803711afdbea5c6a6dd2b46eca76097f6d50fb53
Analyze and fix the following issue in the Linux kernel code: PNP: Compile all pnp built-in stuff in one module namespace
Problem Details: This is cleanup mostly, nothing urgent. I came up with it when looking at dynamic debug which can enable pr_debug messages at runtime or boot param for a specific module. Advantages: - Any pnp code can make use of the moduleparam.h interface, the modules will show up as pnp.param. - Passing pn...
```diff diff --git a/drivers/pnp/Makefile b/drivers/pnp/Makefile index 8de3775ec242..bfba893cb321 100644 --- a/drivers/pnp/Makefile +++ b/drivers/pnp/Makefile @@ -2,11 +2,13 @@ # Makefile for the Linux Plug-and-Play Support. # -obj-y := core.o card.o driver.o resource.o manager.o support.o interface.o quirks.o +ob...
0d040df9984c8fcb6a777a8f6d5dc513eaefd2de
Analyze and fix the following issue in the Linux kernel code: ASoC: sound/wm9090: add missing __devexit marker
Problem Details: This fixes the following warning: sound/soc/codecs/wm9090.c:668:12: warning: 'wm9090_i2c_remove' defined but not used Signed-off-by: Arnaud Lacombe <lacombar@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
```diff diff --git a/sound/soc/codecs/wm9090.c b/sound/soc/codecs/wm9090.c index 7a1825418ee4..99c046ba46bb 100644 --- a/sound/soc/codecs/wm9090.c +++ b/sound/soc/codecs/wm9090.c @@ -665,7 +665,7 @@ static int wm9090_i2c_probe(struct i2c_client *i2c, return ret; } -static int wm9090_i2c_remove(struct i2c_client *i...
f3607aef0d3370ae9edbfecfc7182233397cb0aa
Analyze and fix the following issue in the Linux kernel code: ASoC: sound/max98088: add missing __devexit marker
Problem Details: This fixes the following warning: sound/soc/codecs/max98088.c:2054:12: warning: 'max98088_i2c_remove' defined but not used Signed-off-by: Arnaud Lacombe <lacombar@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
```diff diff --git a/sound/soc/codecs/max98088.c b/sound/soc/codecs/max98088.c index e7a40d16df90..bc22ee93a75d 100644 --- a/sound/soc/codecs/max98088.c +++ b/sound/soc/codecs/max98088.c @@ -2051,7 +2051,7 @@ static int max98088_i2c_probe(struct i2c_client *i2c, return ret; } -static int max98088_i2c_remove(...
836f5394061830a9d1ece4aafc437c098774522f
Analyze and fix the following issue in the Linux kernel code: ASoC: sound/ad73311: add missing __devexit marker
Problem Details: This fixes the following warning: sound/soc/codecs/ad73311.c:50:12: warning: 'ad73311_remove' defined but not used Signed-off-by: Arnaud Lacombe <lacombar@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
```diff diff --git a/sound/soc/codecs/ad73311.c b/sound/soc/codecs/ad73311.c index c53955fe17b6..de799cd1ba72 100644 --- a/sound/soc/codecs/ad73311.c +++ b/sound/soc/codecs/ad73311.c @@ -47,7 +47,7 @@ static int ad73311_probe(struct platform_device *pdev) &soc_codec_dev_ad73311, &ad73311_dai, 1); } -static int a...
9cc1cf380e15f7314f8defb849b8e926d5755f8b
Analyze and fix the following issue in the Linux kernel code: sh: Fix the sparsemem disabled build.
Problem Details: The introduction of MAX_PHYSMEM_BITS in to the initial cpuinfo struct causes a build error when sparsemem is disabled and asm/sparsemem.h is not brought in by other means. Include it explicitly. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
```diff diff --git a/arch/sh/kernel/setup.c b/arch/sh/kernel/setup.c index 82c0a0c1df0d..d6b018c7ebdc 100644 --- a/arch/sh/kernel/setup.c +++ b/arch/sh/kernel/setup.c @@ -41,6 +41,7 @@ #include <asm/smp.h> #include <asm/mmu_context.h> #include <asm/mmzone.h> +#include <asm/sparsemem.h> /* * Initialize loops_per...
12ba8d1e9262ce81a695795410bd9ee5c9407ba1
Analyze and fix the following issue in the Linux kernel code: fix braino in fs: do not assign default i_ino in new_inode
Problem Details: usbfs_get_inode() is something completely different... Bogosity introduced by commit 85fe4025c616 ("fs: do not assign default i_ino in new_inode"). Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Cc: Christoph Hellwig <hch@lst.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/drivers/usb/gadget/f_fs.c b/drivers/usb/gadget/f_fs.c index e093fd8d04d3..f276e9594f00 100644 --- a/drivers/usb/gadget/f_fs.c +++ b/drivers/usb/gadget/f_fs.c @@ -980,7 +980,7 @@ ffs_sb_make_inode(struct super_block *sb, void *data, if (likely(inode)) { struct timespec current_time = CURRENT_TI...
f7c5445a9deecffea8a4fffc0163bf582411ac8a
Analyze and fix the following issue in the Linux kernel code: NTLM auth and sign - minor error corrections and cleanup
Problem Details: Minor cleanup - Fix spelling mistake, make meaningful (goto) label In function setup_ntlmv2_rsp(), do not return 0 and leak memory, let the tiblob get freed. For function find_domain_name(), pass already available nls table pointer instead of loading and unloading the table again in this function. F...
```diff diff --git a/fs/cifs/cifsencrypt.c b/fs/cifs/cifsencrypt.c index 96908874a45c..17d603ad5e34 100644 --- a/fs/cifs/cifsencrypt.c +++ b/fs/cifs/cifsencrypt.c @@ -391,7 +391,7 @@ build_avpair_blob(struct cifsSesInfo *ses, const struct nls_table *nls_cp) * about target string i.e. for some, just user name might su...
8f895da57da80b307efa2f94b5d4caf801e959a5
Analyze and fix the following issue in the Linux kernel code: drm/radeon/kms: fix r6xx/7xx 1D tiling CS checker v2
Problem Details: broken by: drm/radeon/r600: fix tiling issues in CS checker. v2: only apply it to 1D tiling case. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
```diff diff --git a/drivers/gpu/drm/radeon/r600_cs.c b/drivers/gpu/drm/radeon/r600_cs.c index 41802915f93f..7b294c127c5f 100644 --- a/drivers/gpu/drm/radeon/r600_cs.c +++ b/drivers/gpu/drm/radeon/r600_cs.c @@ -215,6 +215,9 @@ static inline int r600_cs_track_validate_cb(struct radeon_cs_parser *p, int i) __func__...
56083ab17e0075e538270823c374b59cc97e73b9
Analyze and fix the following issue in the Linux kernel code: docbook: add idr/ida to kernel-api docbook
Problem Details: Add idr/ida to kernel-api docbook. Fix typos and kernel-doc notation. Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Acked-by: Tejun Heo <tj@kernel.org> Cc: Naohiro Aota <naota@elisp.net> Cc: Jiri Kosina <jkosina@suse.cz> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/Documentation/DocBook/kernel-api.tmpl b/Documentation/DocBook/kernel-api.tmpl index 6b4e07f28b69..7160652a8736 100644 --- a/Documentation/DocBook/kernel-api.tmpl +++ b/Documentation/DocBook/kernel-api.tmpl @@ -93,6 +93,12 @@ X!Ilib/string.c !Elib/crc32.c !Elib/crc-ccitt.c </sect1> + + <...
ee2f154a598e96df2ebb01648a7699373bc085c7
Analyze and fix the following issue in the Linux kernel code: docbook: add more wait/wake/completion to device-drivers docbook
Problem Details: Add more wait, wake, and completion interfaces to the device-drivers docbook. Fix kernel-doc notation in the added files. Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/Documentation/DocBook/device-drivers.tmpl b/Documentation/DocBook/device-drivers.tmpl index feca0758391e..22edcbb9ddaf 100644 --- a/Documentation/DocBook/device-drivers.tmpl +++ b/Documentation/DocBook/device-drivers.tmpl @@ -51,7 +51,12 @@ <sect1><title>Delaying, scheduling, and timer routin...
01464f30a97c5c30bf9633309b27cce055cef8fd
Analyze and fix the following issue in the Linux kernel code: checkpatch: statement/block context analyser should look at sanitised lines
Problem Details: When tracking context to find a block or statement we need to use the sanitised lines, else perentheses '(' & ')' and braces '{' & '}' can throw the scanner out. Also fix up a couple of error outputs which include those sanitised lines incorrectly. Signed-off-by: Andy Whitcroft <apw@canonical.com> Si...
```diff diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 8ab45b72b396..d086ffe377d5 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -691,15 +691,15 @@ sub ctx_block_get { $blk .= $rawlines[$line]; # Handle nested #if/#else. - if ($rawlines[$line] =~ /^.\s*#\s*(?:ifndef|ifdef|i...
3cbf62df3a8ce61cb1aa20b7dae964058988bfdd
Analyze and fix the following issue in the Linux kernel code: checkpatch: handle EXPORT_SYMBOL for DEVICE_ATTR and similar
Problem Details: Handly definitions similar to below. The definition macro spits out a symbol with a prefix. Add matching of any identifier prefix: DEVICE_ATTR(link_power_management_policy, S_IRUGO | S_IWUSR, ata_scsi_lpm_show, ata_scsi_lpm_put); EXPORT_SYMBOL_GPL(dev_attr_link_power_management_p...
```diff diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index d5361e49abad..8ab45b72b396 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -1822,8 +1822,17 @@ sub process { !defined $suppress_export{$realline_next} && ($lines[$realline_next - 1] =~ /EXPORT_SYMBOL.*\((.*)\)/ || ...
6b4c5bebcebb0a48d29947e9aa749650751a7696
Analyze and fix the following issue in the Linux kernel code: checkpatch: fix regressions in "fix handling of leading spaces"
Problem Details: The patch "checkpatch: fix handling of leading spaces" added checks for leading spaces on lines, but this introduces regressions. Firstly it does not correctly detect when we are in a comment. Secondly it does not allow for preprocessor command spacing. Finally it does not allow for label indentatio...
```diff diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 2039acdf5122..0a87c7417ada 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -1459,10 +1459,13 @@ sub process { } # check for spaces at the beginning of a line. - if ($rawline =~ /^\+ / && $rawline !~ /\+ +\*/) { +# Excepti...
658716d19f8f155c67d4677ba68034b8e492dfbe
Analyze and fix the following issue in the Linux kernel code: div64_u64(): improve precision on 32bit platforms
Problem Details: The current implementation of div64_u64 for 32bit systems returns an approximately correct result when the divisor exceeds 32bits. Since doing 64bit division using 32bit hardware is a long since solved problem we just use one of the existing proven methods. Additionally, add a div64_s64 function to c...
```diff diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 77b04ed037df..450092c1e35f 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h @@ -173,6 +173,11 @@ extern int _cond_resched(void); (__x < 0) ? -__x : __x; \ }) +#define abs64(x) ({ \ + s64 __x = (x); \ + (__x < 0) ? ...
014afa943d44f0df8e65bc4bd071c67772277d93
Analyze and fix the following issue in the Linux kernel code: lib/list_sort: test: unify test messages
Problem Details: This patch unifies 'list_sort_test()' messages a bit and makes sure all of them start with the "list_sort_test:" prefix to make it obvious for users where the messages come from. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Cc: Don Mullis <don.mullis@gmail.com> Signed-off-by: Andrew Mo...
```diff diff --git a/lib/list_sort.c b/lib/list_sort.c index 2b99ff80f4be..01aff9e80821 100644 --- a/lib/list_sort.c +++ b/lib/list_sort.c @@ -170,12 +170,12 @@ static int __init list_sort_test(void) struct list_head *cur, *tmp; LIST_HEAD(head); - printk(KERN_DEBUG "testing list_sort()\n"); + printk(KERN_DEBUG "l...
f3dc0e384248ea6fda0987f909007fa9ab5fb51a
Analyze and fix the following issue in the Linux kernel code: lib/list_sort: test: improve errors handling
Problem Details: The 'lib_sort()' test does not free memory if it fails, and it makes the kernel panic if it cannot allocate memory. This patch fixes the problem. This patch also changes several small things: o use 'list_add()' helper instead of adding manually o introduce temporary 'el1' variable to avoid ugly and...
```diff diff --git a/lib/list_sort.c b/lib/list_sort.c index 8f3c24415ae5..2b99ff80f4be 100644 --- a/lib/list_sort.c +++ b/lib/list_sort.c @@ -165,56 +165,67 @@ static int cmp(void *priv, struct list_head *a, struct list_head *b) static int __init list_sort_test(void) { - int i, count; - struct list_head *head = km...
6d411e6c01608cefb7b9ea6712110538a1432f9f
Analyze and fix the following issue in the Linux kernel code: lib/Kconfig.debug: add list_sort debugging switch
Problem Details: While hunting a non-existing bug in 'list_sort()', I've improved the 'list_sort_test()' function which tests the 'list_sort()' library call. Although at the end I found a bug in my code, but not in 'list_sort()', I think my clean-ups and improvements are worth merging because they make the test functio...
```diff diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index 0d5c762532a5..95bda87a3e84 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug @@ -748,6 +748,15 @@ config DEBUG_LIST If unsure, say N. +config TEST_LIST_SORT + bool "Linked list sorting test" + depends on DEBUG_KERNEL + help + Enable this to...
e2852ae825dba5ebc159788720baec1a28a57125
Analyze and fix the following issue in the Linux kernel code: percpu_counter: add debugobj support
Problem Details: All percpu counters are linked to a global list on initialization and removed from it on destruction. The list is walked during CPU up/down. If a percpu counter is freed without being properly destroyed, the system will oops only on the next CPU up/down making it pretty nasty to track down. This patc...
```diff diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index 69a32664c289..0d5c762532a5 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug @@ -317,6 +317,14 @@ config DEBUG_OBJECTS_RCU_HEAD help Enable this to turn on debugging of RCU list heads (call_rcu() usage). +config DEBUG_OBJECTS_PERCPU_COUNTER +...
066a9be6c0124edc9527088231f03c6236be375d
Analyze and fix the following issue in the Linux kernel code: idr: fix idr_pre_get() locking description
Problem Details: Despite the idr_pre_get() kernel-doc, there are some cases where you can call idr_pre_get() from within locked regions. Add a description for such cases. See also: http://lkml.org/lkml/2010/9/16/462 [akpm@linux-foundation.org: cleanups, grammatical fixes] Signed-off-by: Naohiro Aota <naota@elisp.net...
```diff diff --git a/lib/idr.c b/lib/idr.c index 5e0966be0f7c..e35850d3004a 100644 --- a/lib/idr.c +++ b/lib/idr.c @@ -110,9 +110,10 @@ static void idr_mark_full(struct idr_layer **pa, int id) * @idp: idr handle * @gfp_mask: memory allocation flags * - * This function should be called prior to locking and calling...
1fa7e5473cba543b02a396ced9e407f614bb117c
Analyze and fix the following issue in the Linux kernel code: MAINTAINERS: use "T: git" and whitespace trivia
Problem Details: Add missing git as a prefix for git repositories in the few places it wasn't already used. Convert a space delimiter to a tab. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/MAINTAINERS b/MAINTAINERS index c67d606e8477..014b648f99ed 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -657,7 +657,7 @@ ARM/FARADAY FA526 PORT M: Hans Ulli Kroll <ulli.kroll@googlemail.com> L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) S: Maintained -T: git://git.berl...
ec15408206e6b87a11dc1560b2bd758d2ad7ccb1
Analyze and fix the following issue in the Linux kernel code: MAINTAINERS: fix Colibri PXA270 file pattern
Problem Details: The original commit 403d29713e0a ("pxa/income: Add Income SBC support") started with the wrong file pattern. Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Marek Vasut <marek.vasut@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux...
```diff diff --git a/MAINTAINERS b/MAINTAINERS index 146b8a068a4e..a8d1f5686cee 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -710,8 +710,7 @@ ARM/INCOME PXA270 SUPPORT M: Marek Vasut <marek.vasut@gmail.com> L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) S: Maintained -F: arch/arm/mach-pxa/i...
fae99206769b6bbf8a20ab883726b164945771d7
Analyze and fix the following issue in the Linux kernel code: scripts/get_maintainer.pl: don't deduplicate unnamed addresses ie: mailing lists
Problem Details: Fix a defect with the first mailing list address being used for each subsequent mailing list. Updated to 0.26-beta6. Signed-off-by: Joe Perches <joe@perches.com> Cc: Florian Mickler <florian@mickler.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@...
```diff diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl index e822518bc610..d21ec3a89603 100755 --- a/scripts/get_maintainer.pl +++ b/scripts/get_maintainer.pl @@ -13,7 +13,7 @@ use strict; my $P = $0; -my $V = '0.26-beta5'; +my $V = '0.26-beta6'; use Getopt::Long qw(:config no_auto_abbrev); ...
7fa8ff2e0c0f326cdaaa4ae7d00f5d021e43ffa2
Analyze and fix the following issue in the Linux kernel code: scripts/get_maintainer.pl: fix mailmap handling
Problem Details: Implement it, like it is described in git-shortlog. Signed-off-by: Florian Mickler <florian@mickler.org> Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl index 61d3bb51bddf..faeace4e1fd0 100755 --- a/scripts/get_maintainer.pl +++ b/scripts/get_maintainer.pl @@ -295,31 +295,76 @@ while (<$maint>) { } close($maint); -my %mailmap; -if ($email_remove_duplicates) { - open(my $mailmap, '<', "$...
6ffd9485f5c9c0b2d2aea9f904dff08e7088010a
Analyze and fix the following issue in the Linux kernel code: scripts/get_maintainer.pl: use correct indentation
Problem Details: Fix an overly indented block. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl index a91ae6318403..65c6acf1bb3b 100755 --- a/scripts/get_maintainer.pl +++ b/scripts/get_maintainer.pl @@ -420,23 +420,23 @@ foreach my $file (@files) { foreach my $line (sort {$hash{$b} <=> $hash{$a}} keys %hash) { add_categories($lin...
b903c0b8899b46829a9b80ba55b61079b35940ec
Analyze and fix the following issue in the Linux kernel code: lib: fix scnprintf() if @size is == 0
Problem Details: scnprintf() should return 0 if @size is == 0. Update the comment for it, as @size is unsigned. Signed-off-by: Changli Gao <xiaosuo@gmail.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Joe Perches <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torval...
```diff diff --git a/lib/vsprintf.c b/lib/vsprintf.c index 8378c136b6e1..c150d3dafff4 100644 --- a/lib/vsprintf.c +++ b/lib/vsprintf.c @@ -1504,7 +1504,7 @@ EXPORT_SYMBOL(snprintf); * @...: Arguments for the format string * * The return value is the number of characters written into @buf not including - * the tra...
ca51c5a76345b28c6f1b742f9f5f0a6fc9afd9ca
Analyze and fix the following issue in the Linux kernel code: kernel/stop_machine.c: fix unused variable warning
Problem Details: kernel/stop_machine.c: In function `cpu_stopper_thread': kernel/stop_machine.c:265: warning: unused variable `ksym_buf' ksym_buf[] is unused if WARN_ON() is a no-op. Signed-off-by: Rakib Mullick <rakib.mullick@gmail.com> Cc: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@linux-foundat...
```diff diff --git a/kernel/stop_machine.c b/kernel/stop_machine.c index 090c28812ce1..3cb4a9a8ae1c 100644 --- a/kernel/stop_machine.c +++ b/kernel/stop_machine.c @@ -262,7 +262,7 @@ repeat: cpu_stop_fn_t fn = work->fn; void *arg = work->arg; struct cpu_stop_done *done = work->done; - char ksym_buf[KSYM_NAME_...
518de9b39e854542de59bfb8b9f61c8f7ecf808b
Analyze and fix the following issue in the Linux kernel code: fs: allow for more than 2^31 files
Problem Details: Robin Holt tried to boot a 16TB system and found af_unix was overflowing a 32bit value : <quote> We were seeing a failure which prevented boot. The kernel was incapable of creating either a named pipe or unix domain socket. This comes down to a common kernel function called unix_create1() which doe...
```diff diff --git a/fs/file_table.c b/fs/file_table.c index a04bdd81c11c..c3dee381f1b4 100644 --- a/fs/file_table.c +++ b/fs/file_table.c @@ -60,7 +60,7 @@ static inline void file_free(struct file *f) /* * Return the total number of open files in the system */ -static int get_nr_files(void) +static long get_nr_fi...
8a233f01b7d7dd587f85fa581274f168f1e88bb8
Analyze and fix the following issue in the Linux kernel code: pca953x: pca953x driver fixes for x86 mrst
Problem Details: Our Moorestown platform has two max7315 chips which is covered by pca953x i2c gpio driver. A while ago this driver got updated with nested irq thread support, and it broke the compatibity with "request_irq". For example, the gpio_keys.c driver can not work with this driver now. This patch fixes the ...
```diff diff --git a/drivers/gpio/pca953x.c b/drivers/gpio/pca953x.c index a2b12aa1f2b9..501866662e05 100644 --- a/drivers/gpio/pca953x.c +++ b/drivers/gpio/pca953x.c @@ -345,7 +345,7 @@ static irqreturn_t pca953x_irq_handler(int irq, void *devid) do { level = __ffs(pending); - handle_nested_irq(level + chip->i...
2e85c4ddd3f32d3e1da51f4129473399e505ffa3
Analyze and fix the following issue in the Linux kernel code: drivers/misc/isl29020.c: ambient light sensor
Problem Details: The LS driver will read the latest Lux measurement based upon the light brightness and will report the LUX output through sysfs interface. This hardware isn't quite the same as the ISL29003 so has a different driver. [akpm@linux-foundation.org: put PM code under #ifdef CONFIG_PM] Signed-off-by: Kalha...
```diff diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig index 7362851a2ca8..477a9434b9c0 100644 --- a/drivers/misc/Kconfig +++ b/drivers/misc/Kconfig @@ -295,6 +295,16 @@ config ISL29003 This driver can also be built as a module. If so, the module will be called isl29003. +config ISL29020 + tristate...
93e2f585c149b5056d5c5eaffcaf747bbe9c3015
Analyze and fix the following issue in the Linux kernel code: lkdtm: prefix enum constants
Problem Details: Prefix cname and ctype constants with CN/CT_. This is especially for the conflict on BUG which causes a build break if arch defines it as a inline function, i.e. MIPS. Signed-off-by: Namhyung Kim <namhyung@gmail.com> Cc: Ankita Garg <ankita@in.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-founda...
```diff diff --git a/drivers/misc/lkdtm.c b/drivers/misc/lkdtm.c index 343b5d8ea697..81d7fa4ec0db 100644 --- a/drivers/misc/lkdtm.c +++ b/drivers/misc/lkdtm.c @@ -52,32 +52,32 @@ #define REC_NUM_DEFAULT 10 enum cname { - INVALID, - INT_HARDWARE_ENTRY, - INT_HW_IRQ_EN, - INT_TASKLET_ENTRY, - FS_DEVRW, - MEM_SWAPOUT,...
5f400cf40fc703673aa791966ffb1c628c1ff45a
Analyze and fix the following issue in the Linux kernel code: drivers/misc/ad525x_dpot.c: fix part name typos in defines
Problem Details: There is no runtime effect by this change. It frees up namespace for defines erroneously used. This is required to actually support devices requiring the namespace, added with "drivers/misc/ad525x_dpot.c: new features". All defines touched have the same value defined, after the change. Signed-off-b...
```diff diff --git a/drivers/misc/ad525x_dpot.c b/drivers/misc/ad525x_dpot.c index 5e6fa8449e8b..9698c7546911 100644 --- a/drivers/misc/ad525x_dpot.c +++ b/drivers/misc/ad525x_dpot.c @@ -166,7 +166,7 @@ static s32 dpot_read_i2c(struct dpot_data *dpot, u8 reg) case DPOT_UID(AD5280_ID): case DPOT_UID(AD5282_ID): c...
99dc829256bb8cfcb1f58b7f118893fdbf608e60
Analyze and fix the following issue in the Linux kernel code: procfs: fix numbering in /proc/locks
Problem Details: The lock number in /proc/locks (first field) is implemented by a counter (private field of struct seq_file) which is incremented at each call of locks_show() and reset to 1 in locks_start() whatever the offset is. It should be reset according to the actual position in the list. Because of this, the n...
```diff diff --git a/fs/locks.c b/fs/locks.c index 8b2b6ad56a09..4de3a2666810 100644 --- a/fs/locks.c +++ b/fs/locks.c @@ -2109,7 +2109,7 @@ EXPORT_SYMBOL_GPL(vfs_cancel_lock); #include <linux/seq_file.h> static void lock_get_status(struct seq_file *f, struct file_lock *fl, - int id, char *pfx) + loff_t...
cd1c584f380183aca268d454c14b22d8454eac4f
Analyze and fix the following issue in the Linux kernel code: fs/direct-io.c: fix truncation error in dio_complete() return
Problem Details: Fix up truncation (ssize_t->int). This only matters with >2G reads/writes, which the kernel doesn't permit. Signed-off-by: Edward Shishkin <edward@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Acked-by: Jeff Moyer <jmoyer@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> ...
```diff diff --git a/fs/direct-io.c b/fs/direct-io.c index 48d74c7391d1..85882f6ba5f7 100644 --- a/fs/direct-io.c +++ b/fs/direct-io.c @@ -218,7 +218,7 @@ static struct page *dio_get_page(struct dio *dio) * filesystems can use it to hold additional state between get_block calls and * dio_complete. */ -static int ...
f27c85c56b32c42bcc54a43189c1e00fdceb23ec
Analyze and fix the following issue in the Linux kernel code: kernel.h: add {min,max}3 macros
Problem Details: Introduce two additional min/max macros to compare three operands. This will save some cycles as well as some bytes on the stack and last but not least more pleasing as macro nesting. [akpm@linux-foundation.org: fix warnings] Signed-off-by: Hagen Paul Pfeifer <hagen@jauu.net> Cc: Joe Perches <joe@per...
```diff diff --git a/include/linux/kernel.h b/include/linux/kernel.h index edef168a0406..8e786a27cfe6 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h @@ -651,6 +651,24 @@ static inline void ftrace_dump(enum ftrace_dump_mode oops_dump_mode) { } (void) (&_max1 == &_max2); \ _max1 > _max2 ? _max1 : _...
aa5fb4dbfd121296ca97c68cf90043a7ea97579d
Analyze and fix the following issue in the Linux kernel code: uml: fix CONFIG_STATIC_LINK=y build failure with newer glibc
Problem Details: With glibc 2.11 or later that was built with --enable-multi-arch, the UML link fails with undefined references to __rel_iplt_start and similar symbols. In recent binutils, the default linker script defines these symbols (see ld --verbose). Fix the UML linker scripts to match the new defaults for thes...
```diff diff --git a/arch/um/kernel/dyn.lds.S b/arch/um/kernel/dyn.lds.S index 69268014dd8e..a3cab6d3ae02 100644 --- a/arch/um/kernel/dyn.lds.S +++ b/arch/um/kernel/dyn.lds.S @@ -50,8 +50,18 @@ SECTIONS .rela.got : { *(.rela.got) } .rel.bss : { *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*) } .rela....
98c532ecbe582586e204688c6cde7e27580cc43f
Analyze and fix the following issue in the Linux kernel code: alpha: use single HAE window on T2 core logic (gamma, sable)
Problem Details: T2 are the only alpha SMP systems that do HAE switching at runtime, which is fundamentally racy on SMP. This patch limits MMIO space on T2 to HAE0 only, like we did on MCPCIA (rawhide) long ago. This leaves us with only 112 Mb of PCI MMIO (128 Mb HAE aperture minus 16 Mb reserved for EISA), but since...
```diff diff --git a/arch/alpha/include/asm/core_mcpcia.h b/arch/alpha/include/asm/core_mcpcia.h index 21ac53383b37..9f67a056b461 100644 --- a/arch/alpha/include/asm/core_mcpcia.h +++ b/arch/alpha/include/asm/core_mcpcia.h @@ -247,7 +247,7 @@ struct el_MCPCIA_uncorrected_frame_mcheck { #define vip volatile int __force...
dae512edc6e945e127f0848aa757055265d70aa2
Analyze and fix the following issue in the Linux kernel code: drivers/char/hpet.c: fix information leak to userland
Problem Details: Structure info is copied to userland with some padding fields unitialized. It leads to leaking of stack memory. [akpm@linux-foundation.org: remove now-unneeded zeroing of info->hi_ireqfreq] Signed-off-by: Vasiliy Kulikov <segooon@gmail.com> Cc: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Andre...
```diff diff --git a/drivers/char/hpet.c b/drivers/char/hpet.c index fcb5f0d6ce70..55b8667f739f 100644 --- a/drivers/char/hpet.c +++ b/drivers/char/hpet.c @@ -596,11 +596,10 @@ hpet_ioctl_common(struct hpet_dev *devp, int cmd, unsigned long arg, break; case HPET_INFO: { + memset(info, 0, sizeof(*info)); i...
0ca01763a028d0034042a9397534bc1f27848652
Analyze and fix the following issue in the Linux kernel code: hpet: fix style problems
Problem Details: Fix the following style problems: WARNING: Use #include <linux/uaccess.h> instead of <asm/uaccess.h> WARNING: Use #include <linux/io.h> instead of <asm/io.h> ERROR: code indent should use tabs where possible ERROR: do not initialise statics to 0 or NULL Signed-off-by: Jaswinder Singh Rajput <jaswinde...
```diff diff --git a/drivers/char/hpet.c b/drivers/char/hpet.c index a2cbb828e92a..fcb5f0d6ce70 100644 --- a/drivers/char/hpet.c +++ b/drivers/char/hpet.c @@ -32,12 +32,12 @@ #include <linux/bitops.h> #include <linux/compat.h> #include <linux/clocksource.h> +#include <linux/uaccess.h> #include <linux/slab.h> +#incl...
96e9694df446d1154ec2f4fdba8908588b9cba38
Analyze and fix the following issue in the Linux kernel code: hpet: fix unwanted interrupt due to stale irq status bit
Problem Details: Jaswinder Singh Rajput wrote: > By executing Documentation/timers/hpet_example.c > > for polling, I requested for 3 iterations but it seems iteration work > for only 2 as first expired time is always very small. > > # ./hpet_example poll /dev/hpet 10 3 > -hpet: executing poll > hpet_poll: info.hi_flags...
```diff diff --git a/drivers/char/hpet.c b/drivers/char/hpet.c index 84e6a7e673b7..a2cbb828e92a 100644 --- a/drivers/char/hpet.c +++ b/drivers/char/hpet.c @@ -465,6 +465,21 @@ static int hpet_ioctl_ieon(struct hpet_dev *devp) if (irq) { unsigned long irq_flags; + if (devp->hd_flags & HPET_SHARED_IRQ) { + /* +...
a56d5318716d120e040294bb258901ba89fb9c90
Analyze and fix the following issue in the Linux kernel code: hpet: unmap unused I/O space
Problem Details: When the initialization code in hpet finds a memory resource and does not find an IRQ, it does not unmap the memory resource previously mapped. There are buggy BIOSes which report resources exactly like this and what is worse the memory region bases point to normal RAM. This normally would not matter...
```diff diff --git a/drivers/char/hpet.c b/drivers/char/hpet.c index a4eee324eb1e..84e6a7e673b7 100644 --- a/drivers/char/hpet.c +++ b/drivers/char/hpet.c @@ -1000,6 +1000,8 @@ static int hpet_acpi_add(struct acpi_device *device) return -ENODEV; if (!data.hd_address || !data.hd_nirqs) { + if (data.hd_address) +...
f6a3607e5f30dc642bead8cd95c48d47b6b4bfbb
Analyze and fix the following issue in the Linux kernel code: mm: page_isolation: codeclean fix comment and rm unneeded val init
Problem Details: __test_page_isolated_in_pageblock() returns 1 if all pages in the range are isolated, so fix the comment. Variable `pfn' will be initialised in the following loop so remove it. Signed-off-by: Bob Liu <lliubbo@gmail.com> Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Cc: Wu Fengguang <fe...
```diff diff --git a/mm/page_isolation.c b/mm/page_isolation.c index 5e0ffd967452..4ae42bb40892 100644 --- a/mm/page_isolation.c +++ b/mm/page_isolation.c @@ -86,7 +86,7 @@ undo_isolate_page_range(unsigned long start_pfn, unsigned long end_pfn) * all pages in [start_pfn...end_pfn) must be in the same zone. * zone->...
572438f9b52236bd8938b1647cc15e027d27ef55
Analyze and fix the following issue in the Linux kernel code: mm: fix is_mem_section_removable() page_order BUG_ON check
Problem Details: page_order() is called by memory hotplug's user interface to check the section is removable or not. (is_mem_section_removable()) It calls page_order() withoug holding zone->lock. So, even if the caller does if (PageBuddy(page)) ret = page_order(page) ... The caller may hit BUG_ON(). For fixing t...
```diff diff --git a/mm/internal.h b/mm/internal.h index 6a697bb97fc5..dedb0aff673f 100644 --- a/mm/internal.h +++ b/mm/internal.h @@ -62,7 +62,7 @@ extern bool is_free_buddy_page(struct page *page); */ static inline unsigned long page_order(struct page *page) { - VM_BUG_ON(!PageBuddy(page)); + /* PageBuddy() must ...
70384dc6dcc6aa76762200262820bdb8b724ecd5
Analyze and fix the following issue in the Linux kernel code: mm: fix error reporting in move_pages() syscall
Problem Details: The vma returned by find_vma does not necessarily include the target address. If this happens the code tries to follow a page outside of any vma and returns ENOENT instead of EFAULT. Signed-off-by: Gleb Natapov <gleb@redhat.com> Acked-by: Christoph Lameter <cl@linux-foundation.org> Cc: Minchan Kim <m...
```diff diff --git a/mm/migrate.c b/mm/migrate.c index 35e454189966..fe5a3c6a5426 100644 --- a/mm/migrate.c +++ b/mm/migrate.c @@ -1037,7 +1037,7 @@ static int do_move_page_to_node_array(struct mm_struct *mm, err = -EFAULT; vma = find_vma(mm, pp->addr); - if (!vma || !vma_migratable(vma)) + if (!vma || pp->ad...
16b56cf4b8a0fa9acc21bd2ad19839b917999b96
Analyze and fix the following issue in the Linux kernel code: mm: fix sparse warnings on GFP_ZONE_TABLE/BAD
Problem Details: Introduce ___GFP_* masks in order for gfp_t to not be mixed with plain integers which causes a lot of warnings like the following: warning: restricted gfp_t degrades to integer Signed-off-by: Namhyung Kim <namhyung@gmail.com> Cc: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Andrew Morton <akpm@l...
```diff diff --git a/include/linux/gfp.h b/include/linux/gfp.h index 975609cb8548..e8713d55360a 100644 --- a/include/linux/gfp.h +++ b/include/linux/gfp.h @@ -9,6 +9,32 @@ struct vm_area_struct; +/* Plain integer GFP bitmasks. Do not use this directly. */ +#define ___GFP_DMA 0x01u +#define ___GFP_HIGHMEM 0x02u +...
170168d0a351c045adc0bee0987e51dfc82890c0
Analyze and fix the following issue in the Linux kernel code: vmalloc: rename temporary variable in __insert_vmap_area()
Problem Details: Rename redundant 'tmp' to fix following sparse warnings: mm/vmalloc.c:296:34: warning: symbol 'tmp' shadows an earlier one mm/vmalloc.c:293:24: originally declared here Signed-off-by: Namhyung Kim <namhyung@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Tor...
```diff diff --git a/mm/vmalloc.c b/mm/vmalloc.c index 9f909622a25e..55c7a47391f6 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c @@ -293,13 +293,13 @@ static void __insert_vmap_area(struct vmap_area *va) struct rb_node *tmp; while (*p) { - struct vmap_area *tmp; + struct vmap_area *tmp_va; parent = *p; - tm...
d065bd810b6deb67d4897a14bfe21f8eb526ba99
Analyze and fix the following issue in the Linux kernel code: mm: retry page fault when blocking on disk transfer
Problem Details: This change reduces mmap_sem hold times that are caused by waiting for disk transfers when accessing file mapped VMAs. It introduces the VM_FAULT_ALLOW_RETRY flag, which indicates that the call site wants mmap_sem to be released if blocking on a pending disk transfer. In that case, filemap_fault() ret...
```diff diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c index 852b319edbdc..9b2345c9e0c3 100644 --- a/arch/x86/mm/fault.c +++ b/arch/x86/mm/fault.c @@ -956,8 +956,10 @@ do_page_fault(struct pt_regs *regs, unsigned long error_code) struct task_struct *tsk; unsigned long address; struct mm_struct *mm; - int ...
7a837d1bb7cb2bceb093ec639068626586a89234
Analyze and fix the following issue in the Linux kernel code: perf, x86: Fix up kmap_atomic() type
Problem Details: Now that the KM_type stuff is history, clean up the compiler warning. Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Acked-by: Chris Metcalf <cmetcalf@tilera.com> Cc: David Howells <dhowells@redhat.com> Cc: Hugh Dickins <hughd@google.com> Cc: Rik van Riel <riel@redhat.com> Cc: Ingo Molnar <min...
```diff diff --git a/arch/x86/kernel/cpu/perf_event.c b/arch/x86/kernel/cpu/perf_event.c index fe73c1844a9a..c1e8c7a51164 100644 --- a/arch/x86/kernel/cpu/perf_event.c +++ b/arch/x86/kernel/cpu/perf_event.c @@ -49,7 +49,6 @@ static unsigned long copy_from_user_nmi(void *to, const void __user *from, unsigned long n) {...
4cbec4c8b9fda9ec784086fe7f74cd32a8adda95
Analyze and fix the following issue in the Linux kernel code: writeback: remove the internal 5% low bound on dirty_ratio
Problem Details: The dirty_ratio was silently limited in global_dirty_limits() to >= 5%. This is not a user expected behavior. And it's inconsistent with calc_period_shift(), which uses the plain vm_dirty_ratio value. Let's remove the internal bound. At the same time, fix balance_dirty_pages() to work with the dirty...
```diff diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c index ab38fef1c9a1..97d2951bd4d1 100644 --- a/fs/fs-writeback.c +++ b/fs/fs-writeback.c @@ -582,7 +582,7 @@ static inline bool over_bground_thresh(void) global_dirty_limits(&background_thresh, &dirty_thresh); return (global_page_state(NR_FILE_DIRTY) + - ...
bce54bbfde07e8b300f39dae14756c12a6ceca65
Analyze and fix the following issue in the Linux kernel code: mm: fix typo in mm.h when NODE_NOT_IN_PAGE_FLAGS
Problem Details: NODE_NOT_IN_PAGE_FLAGS is defined in mm.h when the node information is not stored in the page flags bitmap. Unfortunately, there's a typo in one of the checks for it. This patch fixes it (s/NODE_NOT_IN_PAGEFLAGS/NODE_NOT_IN_PAGE_FLAGS/). Since this has been around for ages, I doubt it's been causing...
```diff diff --git a/include/linux/mm.h b/include/linux/mm.h index c36297faf7cb..2862009f9573 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -497,8 +497,8 @@ static inline void set_compound_order(struct page *page, unsigned long order) #define NODES_PGSHIFT (NODES_PGOFF * (NODES_WIDTH != 0)) #define ZON...
49ac825587f33afec8841b7fab2eb4db775014e6
Analyze and fix the following issue in the Linux kernel code: memory hotplug: unify is_removable and offline detection code
Problem Details: Now, sysfs interface of memory hotplug shows whether the section is removable or not. But it checks only migrateype of pages and doesn't check details of cluster of pages. Next, memory hotplug's set_migratetype_isolate() has the same kind of check, too. This patch adds the function __count_unmovable...
```diff diff --git a/include/linux/memory_hotplug.h b/include/linux/memory_hotplug.h index 864035fb8f8a..4307231bd22f 100644 --- a/include/linux/memory_hotplug.h +++ b/include/linux/memory_hotplug.h @@ -70,6 +70,10 @@ extern void online_page(struct page *page); extern int online_pages(unsigned long, unsigned long); e...
4b20477f588055fbe87e69435d3c2344d250f0d7
Analyze and fix the following issue in the Linux kernel code: memory hotplug: fix notifier's return value check
Problem Details: Even if notifier cannot find any pages, it doesn't mean no pages are available...And, if there are no notifiers registered, this condition will be always true and memory hotplug will show -EBUSY. This is a bug but not critical. In most case, a pageblock which will be offlined is MIGRATE_MOVABLE This ...
```diff diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 5faf876cfc3a..099790052bfe 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -5336,7 +5336,7 @@ int set_migratetype_isolate(struct page *page) */ notifier_ret = memory_isolate_notify(MEM_ISOLATE_COUNT, &arg); notifier_ret = notifier_to_errno(notifi...
cf608ac19c95804dc2df43b1f4f9e068aa9034ab
Analyze and fix the following issue in the Linux kernel code: mm: compaction: fix COMPACTPAGEFAILED counting
Problem Details: Presently update_nr_listpages() doesn't have a role. That's because lists passed is always empty just after calling migrate_pages. The migrate_pages cleans up page list which have failed to migrate before returning by aaa994b3. [PATCH] page migration: handle freeing of pages in migrate_pages() Do...
```diff diff --git a/mm/memory-failure.c b/mm/memory-failure.c index 44a8cefeae6e..124324134ff6 100644 --- a/mm/memory-failure.c +++ b/mm/memory-failure.c @@ -1292,6 +1292,7 @@ static int soft_offline_huge_page(struct page *page, int flags) list_add(&hpage->lru, &pagelist); ret = migrate_huge_pages(&pagelist, new_p...
f19e77a3dc884510dba740caa6dee126b7d40156
Analyze and fix the following issue in the Linux kernel code: include/linux/pageblock-flags.h: fix set_pageblock_flags() macro definiton
Problem Details: The presently-unused macro was missing one parameter. Signed-off-by: zeal <zealcook@gmail.com> Acked-by: Mel Gorman <mel@csn.ul.ie> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
```diff diff --git a/include/linux/pageblock-flags.h b/include/linux/pageblock-flags.h index e8c06122be36..19ef95d293ae 100644 --- a/include/linux/pageblock-flags.h +++ b/include/linux/pageblock-flags.h @@ -67,7 +67,8 @@ void set_pageblock_flags_group(struct page *page, unsigned long flags, #define get_pageblock_fla...
d19d5476f4b9f91d2de92b91588bb118beba6c0d
Analyze and fix the following issue in the Linux kernel code: oom: fix locking for oom_adj and oom_score_adj
Problem Details: The locking order in oom_adjust_write() and oom_score_adj_write() for task->alloc_lock and task->sighand->siglock is reversed, and lockdep notices that irqs could encounter an ABBA scenario. This fixes the locking order so that we always take task_lock(task) prior to lock_task_sighand(task). Signed-o...
```diff diff --git a/fs/proc/base.c b/fs/proc/base.c index 34d11ac31f2e..53dc8ad40ae6 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c @@ -1042,9 +1042,16 @@ static ssize_t oom_adjust_write(struct file *file, const char __user *buf, err = -ESRCH; goto out; } + + task_lock(task); + if (!task->mm) { + err = -EIN...
dbec921370ea049eccd38e34e067373fb3bd9b01
Analyze and fix the following issue in the Linux kernel code: um: fix IRQ flag handling naming
Problem Details: Commit df9ee292 ("Fix IRQ flag handling naming") changed the IRQ flag handling naming scheme and broke UML: In file included from arch/um/include/asm/fixmap.h:5, from arch/um/include/shared/um_uaccess.h:10, from arch/um/include/asm/uaccess.h:41, from ...
```diff diff --git a/arch/um/include/asm/system.h b/arch/um/include/asm/system.h index 93af1cf0907d..68a90ecd1450 100644 --- a/arch/um/include/asm/system.h +++ b/arch/um/include/asm/system.h @@ -8,23 +8,38 @@ extern int set_signals(int enable); extern void block_signals(void); extern void unblock_signals(void); -#d...
8474b591faf3bb0a1e08a60d21d6baac498f15e4
Analyze and fix the following issue in the Linux kernel code: percpu: fix list_head init bug in __percpu_counter_init()
Problem Details: WARNING: at lib/list_debug.c:26 __list_add+0x3f/0x81() Hardware name: Express5800/B120a [N8400-085] list_add corruption. next->prev should be prev (ffffffff81a7ea00), but was dead000000200200. (next=ffff88080b872d58). Modules linked in: aoe ipt_MASQUERADE iptable_nat nf_nat autofs4 sunrpc bridge 8021q ...
```diff diff --git a/lib/percpu_counter.c b/lib/percpu_counter.c index ec9048e74f44..209448e1d2b9 100644 --- a/lib/percpu_counter.c +++ b/lib/percpu_counter.c @@ -76,6 +76,7 @@ int __percpu_counter_init(struct percpu_counter *fbc, s64 amount, if (!fbc->counters) return -ENOMEM; #ifdef CONFIG_HOTPLUG_CPU + INIT_LI...
1b627d5771312c92404b66f0a0b16f66036dd2e1
Analyze and fix the following issue in the Linux kernel code: hostfs: fix UML crash: remove f_spare from hostfs
Problem Details: 365b1818 ("add f_flags to struct statfs(64)") resized f_spare within struct statfs which caused a UML crash. There is no need to copy f_spare. Signed-off-by: Richard Weinberger <richard@nod.at> Reported-by: Toralf Förster <toralf.foerster@gmx.de> Tested-by: Toralf Förster <toralf.foerster@gmx.de> Cc:...
```diff diff --git a/fs/hostfs/hostfs.h b/fs/hostfs/hostfs.h index 7c232c1487ee..bf15a43016b9 100644 --- a/fs/hostfs/hostfs.h +++ b/fs/hostfs/hostfs.h @@ -91,7 +91,6 @@ extern int rename_file(char *from, char *to); extern int do_statfs(char *root, long *bsize_out, long long *blocks_out, long long *bfree_out, l...
de5e2ddf9bb3ce7b643223b9b0718062254f302f
Analyze and fix the following issue in the Linux kernel code: ipmi: proper spinlock initialization
Problem Details: Unloading ipmi module can trigger following error. (if CONFIG_DEBUG_SPINLOCK=y) [ 9633.779590] BUG: spinlock bad magic on CPU#1, rmmod/7170 [ 9633.779606] lock: f41f5414, .magic: 00000000, .owner: <none>/-1, .owner_cpu: 0 [ 9633.779626] Pid: 7170, comm: rmmod Not tainted 2.6.36-rc7-11474-gb71eb1e-di...
```diff diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c index e537610d2f09..b293d57d30a7 100644 --- a/drivers/char/ipmi/ipmi_si_intf.c +++ b/drivers/char/ipmi/ipmi_si_intf.c @@ -1665,6 +1665,17 @@ static int check_hotmod_int_op(const char *curr, const char *option, return 0; } +sta...
1f9fa5216eacf4fdf9d3e4ab57feb8b642f0e78b
Analyze and fix the following issue in the Linux kernel code: drivers/misc/ad525x_dpot.c: fix typo in spi write16 and write24 transfer counts
Problem Details: This is a bug fix. Some SPI connected devices using 16/24 bit accesses, previously failed, now work. This typo slipped in after testing, during some restructuring. Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Cc: Mike Frysinger <vapier@gentoo.org> Cc: Chris Verges <chrisv@cyberswi...
```diff diff --git a/drivers/misc/ad525x_dpot-spi.c b/drivers/misc/ad525x_dpot-spi.c index b8c6df9c8437..6cfcb636577a 100644 --- a/drivers/misc/ad525x_dpot-spi.c +++ b/drivers/misc/ad525x_dpot-spi.c @@ -53,13 +53,13 @@ static int write8(void *client, u8 val) static int write16(void *client, u8 reg, u8 val) { u8 dat...
6915e04f8847bea16d0890f559694ad8eedd026c
Analyze and fix the following issue in the Linux kernel code: um: remove PAGE_SIZE alignment in linker script causing kernel segfault.
Problem Details: The linker script cleanup that I did in commit 5d150a97f93 ("um: Clean up linker script using standard macros.") (2.6.32) accidentally introduced an ALIGN(PAGE_SIZE) when converting to use INIT_TEXT_SECTION; Richard Weinberger reported that this causes the kernel to segfault with CONFIG_STATIC_LINK=y. ...
```diff diff --git a/arch/um/kernel/uml.lds.S b/arch/um/kernel/uml.lds.S index ec6378550671..9a873d765615 100644 --- a/arch/um/kernel/uml.lds.S +++ b/arch/um/kernel/uml.lds.S @@ -22,7 +22,7 @@ SECTIONS _text = .; _stext = .; __init_begin = .; - INIT_TEXT_SECTION(PAGE_SIZE) + INIT_TEXT_SECTION(0) . = ALIGN...
482db6df1746c4fa7d64a2441d4cb2610249c679
Analyze and fix the following issue in the Linux kernel code: um: fix global timer issue when using CONFIG_NO_HZ
Problem Details: This fixes a issue which was introduced by fe2cc53e ("uml: track and make up lost ticks"). timeval_to_ns() returns long long and not int. Due to that UML's timer did not work properlt and caused timer freezes. Signed-off-by: Richard Weinberger <richard@nod.at> Acked-by: Pekka Enberg <penberg@kernel....
```diff diff --git a/arch/um/os-Linux/time.c b/arch/um/os-Linux/time.c index dec5678fc17f..6e3359d6a839 100644 --- a/arch/um/os-Linux/time.c +++ b/arch/um/os-Linux/time.c @@ -60,7 +60,7 @@ static inline long long timeval_to_ns(const struct timeval *tv) long long disable_timer(void) { struct itimerval time = ((struc...
b7f50cfa3630b6e079929ffccfd442d65064ee1f
Analyze and fix the following issue in the Linux kernel code: mm, page-allocator: do not check the state of a non-existant buddy during free
Problem Details: There is a bug in commit 6dda9d55 ("page allocator: reduce fragmentation in buddy allocator by adding buddies that are merging to the tail of the free lists") that means a buddy at order MAX_ORDER is checked for merging. A page of this order never exists so at times, an effectively random piece of mem...
```diff diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 2a362c52fdf4..5faf876cfc3a 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -531,7 +531,7 @@ static inline void __free_one_page(struct page *page, * so it's less likely to be used soon and more likely to be merged * as a higher order page */ - i...
f8f72ad5396987e05a42cf7eff826fb2a15ff148
Analyze and fix the following issue in the Linux kernel code: mm: fix return value of scan_lru_pages in memory unplug
Problem Details: scan_lru_pages returns pfn. So, it's type should be "unsigned long" not "int". Note: I guess this has been work until now because memory hotplug tester's machine has not very big memory.... physical address < 32bit << PAGE_SHIFT. Reported-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.co...
```diff diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c index d4e940a26945..06662c5a3e86 100644 --- a/mm/memory_hotplug.c +++ b/mm/memory_hotplug.c @@ -659,7 +659,7 @@ static int test_pages_in_a_zone(unsigned long start_pfn, unsigned long end_pfn) * Scanning pfn is much easier than scanning lru list. * Scan ...
9e43e0106d6f526724911e80adb97dbcec520b5d
Analyze and fix the following issue in the Linux kernel code: IB/qib: Fix uninitialized pointer if CONFIG_PCI_MSI not set
Problem Details: If CONFIG_PCI_MSI is not set, and a QLE7140 is present, the pointer "dd" is uninitialized. 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_init.c b/drivers/infiniband/hw/qib/qib_init.c index f1d16d3a01f6..f3b503936043 100644 --- a/drivers/infiniband/hw/qib/qib_init.c +++ b/drivers/infiniband/hw/qib/qib_init.c @@ -1243,6 +1243,7 @@ static int __devinit qib_init_one(struct pci_dev *pdev, qib_early_err(&p...