id stringlengths 40 40 | instruction stringlengths 68 308 | input stringlengths 17 33.4k | output stringlengths 100 30k |
|---|---|---|---|
7111ebc97ed53a32314011c85a6f235f0dab8ae8 | Analyze and fix the following issue in the Linux kernel code: xhci: Resume bus on any port status change. | Problem Details:
The original code that resumed the USB bus on a port status change would
only do so when there was a device connected to the port. If a device was
just disconnected, the event would be queued for khubd, but khubd wouldn't
run. That would leave the connect status change (CSC) bit set.
If a USB device... | ```diff
diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
index df558f6f84e3..62c70c230e83 100644
--- a/drivers/usb/host/xhci-ring.c
+++ b/drivers/usb/host/xhci-ring.c
@@ -1188,7 +1188,7 @@ static void handle_port_status(struct xhci_hcd *xhci,
addr = &xhci->op_regs->port_status_base + NUM_POR... |
ab0724ffee24409a7f81afb539b2ac29090bff3e | Analyze and fix the following issue in the Linux kernel code: PCI / ACPI: Fix build issue in pci_root.c for !CONFIG_PCIEPORTBUS | Problem Details:
The compilation of drivers/acpi/pci_root.c fails if
CONFIG_PCIEPORTBUS is unset. Fix the problem.
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | ```diff
diff --git a/include/linux/pci.h b/include/linux/pci.h
index 9e67dcd054c4..559d02897075 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -993,8 +993,13 @@ extern void pci_restore_msi_state(struct pci_dev *dev);
extern int pci_msi_enabled(void);
#endif
+#ifdef CONFIG_PCIEPORTBUS
extern bool pci... |
9a1fe2f27f71dd275caf2be5be2fa59bd2a3f8d4 | Analyze and fix the following issue in the Linux kernel code: ACPI / ACPICA: Initialize the global lock spinlock as appropriate | Problem Details:
Commit 9cd0314 (ACPI / ACPICA: Fix global lock acquisition) forgot to
initialize the spinlock it added. Fix that.
Reported-and-tested-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Tested-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-o... | ```diff
diff --git a/drivers/acpi/acpica/acglobal.h b/drivers/acpi/acpica/acglobal.h
index 9bb69c59bb12..0e4dba0d0325 100644
--- a/drivers/acpi/acpica/acglobal.h
+++ b/drivers/acpi/acpica/acglobal.h
@@ -228,8 +228,10 @@ ACPI_EXTERN u8 acpi_gbl_global_lock_present;
*/
ACPI_EXTERN spinlock_t _acpi_gbl_gpe_lock; /* For... |
94a1b6d8eb903818773ad24fe48529b0d295052d | Analyze and fix the following issue in the Linux kernel code: spi/amba-pl022: fixing compilation warning. | Problem Details:
clk_freq is used uninitialized in pl022_setup routine. This patch
fix compilation warning for using uninitialized variable
Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
Acked-by: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca> | ```diff
diff --git a/drivers/spi/amba-pl022.c b/drivers/spi/amba-pl022.c
index a2a5921c730a..71a1219a995d 100644
--- a/drivers/spi/amba-pl022.c
+++ b/drivers/spi/amba-pl022.c
@@ -1795,7 +1795,7 @@ static int pl022_setup(struct spi_device *spi)
{
struct pl022_config_chip const *chip_info;
struct chip_data *chip;
- ... |
0f73f2c5a3ebb957ee66718c903c17ed71a4fc2e | Analyze and fix the following issue in the Linux kernel code: GRETH: resolve SMP issues and other problems | Problem Details:
Fixes the following:
1. POLL should not enable IRQ when work is not completed
2. No locking between TX descriptor cleaning and XMIT descriptor handling
3. No locking between RX POLL and XMIT modifying control register
4. Since TX cleaning (called from POLL) is running in parallel with XMIT
unnecessa... | ```diff
diff --git a/drivers/net/greth.c b/drivers/net/greth.c
index b888abe6cd21..fdb0333f5cb6 100644
--- a/drivers/net/greth.c
+++ b/drivers/net/greth.c
@@ -1,7 +1,7 @@
/*
* Aeroflex Gaisler GRETH 10/100/1G Ethernet MAC.
*
- * 2005-2009 (c) Aeroflex Gaisler AB
+ * 2005-2010 (c) Aeroflex Gaisler AB
*
* This d... |
b669e7f0580f3c0058f1b32c276ef6da8f05c138 | Analyze and fix the following issue in the Linux kernel code: GRETH: fixed skb buffer memory leak on frame errors | Problem Details:
A new SKB buffer should not be allocated when the old SKB is reused.
Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/drivers/net/greth.c b/drivers/net/greth.c
index 869e38d6f41b..9386bce9dea5 100644
--- a/drivers/net/greth.c
+++ b/drivers/net/greth.c
@@ -870,10 +870,9 @@ static int greth_rx_gbit(struct net_device *dev, int limit)
}
}
- /* Allocate new skb to replace current */
- newskb = netdev_alloc_s... |
bbe9e637330abe55442aebe799425e224086959f | Analyze and fix the following issue in the Linux kernel code: GRETH: fix opening/closing | Problem Details:
When NAPI is disabled there is no point in having IRQs enabled, TX/RX
should be off before clearing the TX/RX descriptor rings.
Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/drivers/net/greth.c b/drivers/net/greth.c
index 1c2dbdb43631..b307696e0f63 100644
--- a/drivers/net/greth.c
+++ b/drivers/net/greth.c
@@ -356,6 +356,8 @@ static int greth_open(struct net_device *dev)
dev_dbg(&dev->dev, " starting queue\n");
netif_start_queue(dev);
+ GRETH_REGSAVE(greth->regs... |
92d76e81b9df5f33b0c9e2091e892560a437a15f | Analyze and fix the following issue in the Linux kernel code: cassini: Fix build bustage on x86. | Problem Details:
Unfortunately, not all CONFIG_OF platforms provide
pci_device_to_OF_node().
Change the test to CONFIG_SPARC for now to deal with
the build regressions.
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/drivers/net/cassini.c b/drivers/net/cassini.c
index 7206ab2cbbf8..3437613f0454 100644
--- a/drivers/net/cassini.c
+++ b/drivers/net/cassini.c
@@ -3203,7 +3203,7 @@ static int cas_get_vpd_info(struct cas *cp, unsigned char *dev_addr,
int phy_type = CAS_PHY_MII_MDIO0; /* default phy type */
int m... |
a8f2800b4f7b76cecb7209cb6a7d2b14904fc711 | Analyze and fix the following issue in the Linux kernel code: nfsd4: fix callback restarting | Problem Details:
Ensure a new callback is added to the client's list of callbacks at most
once.
Signed-off-by: J. Bruce Fields <bfields@redhat.com> | ```diff
diff --git a/fs/nfsd/nfs4callback.c b/fs/nfsd/nfs4callback.c
index 209e186386a0..ae93c5c83e87 100644
--- a/fs/nfsd/nfs4callback.c
+++ b/fs/nfsd/nfs4callback.c
@@ -639,9 +639,12 @@ static void nfsd4_cb_prepare(struct rpc_task *task, void *calldata)
if (!nfsd41_cb_get_slot(clp, task))
return;
}
- cb->cb_... |
6ce1f81f51c7b22f539012e446c01e8c75d20fd9 | Analyze and fix the following issue in the Linux kernel code: [IA64] fix ia64 build failure in pmdp_get_and_clear | Problem Details:
Implement __pmd macro for ia64 too.
Signed-off-by: Andrea Arcangeli <aarcange@redhat.com>
Signed-off-by: Tony Luck <tony.luck@intel.com> | ```diff
diff --git a/arch/ia64/include/asm/page.h b/arch/ia64/include/asm/page.h
index 41b6d31110fd..961a16f43e6b 100644
--- a/arch/ia64/include/asm/page.h
+++ b/arch/ia64/include/asm/page.h
@@ -189,6 +189,7 @@ get_order (unsigned long size)
# define pgprot_val(x) ((x).pgprot)
# define __pte(x) ((pte_t) { (x) } )
+... |
fcdc2ea76d266e06fc95a364d0e547ca44e3890b | Analyze and fix the following issue in the Linux kernel code: AT91: Support for gsia18s board | Problem Details:
The GS_IA18_S (GMS) is a carrier board from GeoSIG Ltd used with the
Stamp9G20 SoM from Taskit company.
It operate as an internet accelerometer.
Signed-off-by: Igor Plyatov <plyatov@gmail.com>
[nicolas.ferre@atmel.com: rm Kconfig, whitespace fixes, change machine name]
Signed-off-by: Nicolas Ferre <ni... | ```diff
diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig
index 06fb66d53203..19390231a0e9 100644
--- a/arch/arm/mach-at91/Kconfig
+++ b/arch/arm/mach-at91/Kconfig
@@ -387,6 +387,13 @@ config MACH_PCONTROL_G20
Select this if you are using taskit's Stamp9G20 CPU module on this
carrier board, b... |
0fb55d3bb73c7d20b39658e65debd7331c223035 | Analyze and fix the following issue in the Linux kernel code: AT91: Acme Systems FOX Board G20 board files | Problem Details:
Signed-off-by: Sergio Tanzilli <tanzilli@acmesystems.it>
[nicolas.ferre@atmel.com: whitespace fixes, change machine name]
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> | ```diff
diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig
index c015b684b4fe..06fb66d53203 100644
--- a/arch/arm/mach-at91/Kconfig
+++ b/arch/arm/mach-at91/Kconfig
@@ -362,6 +362,12 @@ config MACH_CPU9G20
Select this if you are using a Eukrea Electromatique's
CPU9G20 Board <http://www.eukrea.... |
62627bec8a601c5679bf3d20a2096a1206d61b71 | Analyze and fix the following issue in the Linux kernel code: x86: tsc: Fix calibration refinement conditionals to avoid divide by zero | Problem Details:
Konrad Wilk reported that the new delayed calibration crashes with a
divide by zero on Xen. The reason is that Xen sets the pmtimer
address, but reading from it returns 0xffffff. That results in the
ref_start and ref_stop value being the same, so the delta is zero
which causes the divide by zero later ... | ```diff
diff --git a/arch/x86/kernel/tsc.c b/arch/x86/kernel/tsc.c
index 463901efdba4..ae09f970e626 100644
--- a/arch/x86/kernel/tsc.c
+++ b/arch/x86/kernel/tsc.c
@@ -464,7 +464,7 @@ unsigned long native_calibrate_tsc(void)
tsc_pit_min = min(tsc_pit_min, tsc_pit_khz);
/* hpet or pmtimer available ? */
- if (!h... |
ba28b93a5227cc69ec811507f7d85ac25fa20fe2 | Analyze and fix the following issue in the Linux kernel code: FS-Cache: Fix operation handling | Problem Details:
fscache_submit_exclusive_op() adds an operation to the pending list if
other operations are pending. Fix the check for pending ops as n_ops
must be greater than 0 at the point it is checked as it is incremented
immediately before under lock.
Signed-off-by: Akshat Aranya <aranya@nec-labs.com>
Signed-o... | ```diff
diff --git a/fs/fscache/operation.c b/fs/fscache/operation.c
index b9f34eaede09..48a18f184d50 100644
--- a/fs/fscache/operation.c
+++ b/fs/fscache/operation.c
@@ -101,7 +101,7 @@ int fscache_submit_exclusive_op(struct fscache_object *object,
object->n_ops++;
object->n_exclusive++; /* reads and writes must... |
64a5fed6663edcf7e3864ed5534e42e2b9f340c7 | Analyze and fix the following issue in the Linux kernel code: x86/PCI: make Broadcom CNB20LE driver EMBEDDED and EXPERIMENTAL | Problem Details:
This functionality is known to be incomplete, so discourage its use in
general-purpose kernels.
The only reason to use this driver is to support PCI hotplug on CNB20LE-
based machines that don't have ACPI, and there are very few such
systems.
Reference: https://bugzilla.redhat.com/show_bug.cgi?id=665... | ```diff
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index e330da21b84f..5c5666d4a040 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -1907,13 +1907,19 @@ config PCI_MMCONFIG
depends on X86_64 && PCI && ACPI
config PCI_CNB20LE_QUIRK
- bool "Read CNB20LE Host Bridge Windows"
- depends on PCI
+ bool "Rea... |
30e664afb5cb597dd6f7651e6d116e10b9741084 | Analyze and fix the following issue in the Linux kernel code: x86/PCI: don't use native Broadcom CNB20LE driver when ACPI is available | Problem Details:
The broadcom_bus.c quirk was written (without benefit of documentation)
to support PCI hotplug on an old system that doesn't have ACPI. As
such, we should only use it when the system doesn't have ACPI.
If the system does have ACPI and we need the host bridge description, we
should get it from the ACP... | ```diff
diff --git a/arch/x86/pci/broadcom_bus.c b/arch/x86/pci/broadcom_bus.c
index 0846a5bbbfbd..ab8269b0da29 100644
--- a/arch/x86/pci/broadcom_bus.c
+++ b/arch/x86/pci/broadcom_bus.c
@@ -9,6 +9,7 @@
* option) any later version.
*/
+#include <linux/acpi.h>
#include <linux/delay.h>
#include <linux/dmi.h>
#in... |
415e12b2379239973feab91850b0dce985c6058a | Analyze and fix the following issue in the Linux kernel code: PCI/ACPI: Request _OSC control once for each root bridge (v3) | Problem Details:
Move the evaluation of acpi_pci_osc_control_set() (to request control of
PCI Express native features) into acpi_pci_root_add() to avoid calling
it many times for the same root complex with the same arguments.
Additionally, check if all of the requisite _OSC support bits are set
before calling acpi_pci_... | ```diff
diff --git a/drivers/acpi/apei/hest.c b/drivers/acpi/apei/hest.c
index daa7bc63f1d4..4ee58e72b730 100644
--- a/drivers/acpi/apei/hest.c
+++ b/drivers/acpi/apei/hest.c
@@ -195,24 +195,24 @@ static int __init setup_hest_disable(char *str)
__setup("hest_disable", setup_hest_disable);
-static int __init hest_i... |
53371edaef692bef7eee8070bd680401ccf65706 | Analyze and fix the following issue in the Linux kernel code: agp/intel: Fix device names of i845 and 845G | Problem Details:
They got mixed up when the switch was converted to a table in 2007.
Signed-off-by: Oswald Buddenhagen <ossi@kde.org>
[ickle: minor changes for 2.6.37+]
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> | ```diff
diff --git a/drivers/char/agp/intel-agp.c b/drivers/char/agp/intel-agp.c
index 07e9796fead7..857df10c0428 100644
--- a/drivers/char/agp/intel-agp.c
+++ b/drivers/char/agp/intel-agp.c
@@ -717,8 +717,8 @@ static const struct intel_agp_driver_description {
{ PCI_DEVICE_ID_INTEL_82820_UP_HB, "i820", &intel_820_dr... |
1b624fb64c2de44c00576cc9695680983f05c1ce | Analyze and fix the following issue in the Linux kernel code: ARM: pxa: fix suspend/resume array index miscalculation | Problem Details:
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com> | ```diff
diff --git a/arch/arm/mach-pxa/irq.c b/arch/arm/mach-pxa/irq.c
index 8f947002c0bf..b71677bce548 100644
--- a/arch/arm/mach-pxa/irq.c
+++ b/arch/arm/mach-pxa/irq.c
@@ -156,7 +156,7 @@ static inline void __iomem *irq_base(int i)
0x40d00130,
};
- return (void __iomem *)io_p2v(phys_base[i >> 5]);
+ return (v... |
bc3e55c69c404158ef3c5b1a6515f5e9f1294403 | Analyze and fix the following issue in the Linux kernel code: ARM: pxa: fix warning in zeus.c | Problem Details:
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com> | ```diff
diff --git a/arch/arm/mach-pxa/zeus.c b/arch/arm/mach-pxa/zeus.c
index a894770d203b..f4b053b35815 100644
--- a/arch/arm/mach-pxa/zeus.c
+++ b/arch/arm/mach-pxa/zeus.c
@@ -830,8 +830,8 @@ static void __init zeus_init(void)
pr_info("Zeus CPLD V%dI%d\n", (system_rev & 0xf0) >> 4, (system_rev & 0x0f));
/* Fix... |
cae399880f82fdc6b0afccf42224fc2a759aa6b3 | Analyze and fix the following issue in the Linux kernel code: ARM: sa1111: fix typo in sa1111_retrigger_lowirq() | Problem Details:
Signed-off-by: Pavel Machek <pma@sysgo.com>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com> | ```diff
diff --git a/arch/arm/common/sa1111.c b/arch/arm/common/sa1111.c
index d6c784e78c83..eb9796b0dab2 100644
--- a/arch/arm/common/sa1111.c
+++ b/arch/arm/common/sa1111.c
@@ -279,7 +279,7 @@ static int sa1111_retrigger_lowirq(struct irq_data *d)
for (i = 0; i < 8; i++) {
sa1111_writel(ip0 ^ mask, mapbase + SA1... |
7f5db6a8022e8d4bb92b3d638068d2c2a9c9b59b | Analyze and fix the following issue in the Linux kernel code: gpio: timbgpio: Fix up irq_data conversion breakage. | Problem Details:
Commit a1f5f22adc3206c47e70652c12671666c65b579f ("gpio: timbgpio:
irq_data conversion") was slightly too enthusiastic in converting
timbgpio_irq() over to take an irq_data * argument instead of an
unsigned int irq argument, as it is a flow handler, which still take
IRQ numbers for now. (And on top of ... | ```diff
diff --git a/drivers/gpio/timbgpio.c b/drivers/gpio/timbgpio.c
index 349131eb1ce0..58c8f30352dd 100644
--- a/drivers/gpio/timbgpio.c
+++ b/drivers/gpio/timbgpio.c
@@ -193,13 +193,13 @@ out:
return ret;
}
-static void timbgpio_irq(struct irq_data *d, struct irq_desc *desc)
+static void timbgpio_irq(unsigned... |
c72a04e34735ec3f19f4788b7f95017310b5e1eb | Analyze and fix the following issue in the Linux kernel code: cgroup_fs: fix cgroup use of simple_lookup() | Problem Details:
cgroup can't use simple_lookup(), since that'd override its desired ->d_op.
Tested-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | ```diff
diff --git a/kernel/cgroup.c b/kernel/cgroup.c
index 5c5f4cc2e99a..ffb7bbad0638 100644
--- a/kernel/cgroup.c
+++ b/kernel/cgroup.c
@@ -764,6 +764,7 @@ EXPORT_SYMBOL_GPL(cgroup_unlock);
*/
static int cgroup_mkdir(struct inode *dir, struct dentry *dentry, int mode);
+static struct dentry *cgroup_lookup(struc... |
2bae0093cab4ee0a7a8728fdfc35b74569350863 | Analyze and fix the following issue in the Linux kernel code: [SCSI] sd: implement sd_check_events() | Problem Details:
Replace sd_media_change() with sd_check_events().
* Move media removed logic into set_media_not_present() and
media_not_present() and set sdev->changed iff an existing media is
removed or the device indicates UNIT_ATTENTION.
* Make sd_check_events() sets sdev->changed if previously missing
medi... | ```diff
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index b65e65aa07eb..7d257465bd98 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -990,30 +990,51 @@ out:
static void set_media_not_present(struct scsi_disk *sdkp)
{
- sdkp->media_present = 0;
- sdkp->capacity = 0;
- sdkp->device->changed = 1;
+ if... |
32385c7cf60a78375b63afc4f02001df84dfd1a0 | Analyze and fix the following issue in the Linux kernel code: kernel: fix hlist_bl again | Problem Details:
__d_rehash is dereferencing an almost-NULL pointer on my ARM926.
CONFIG_SMP=n and CONFIG_DEBUG_SPINLOCK=y.
The faulting instruction is: strne r3, [r2, #4]
and as can be seen from the register dump below, r2 is 0x00000001, hence
the faulting 0x00000005 address.
__d_rehash is essentially:
... | ```diff
diff --git a/include/linux/list_bl.h b/include/linux/list_bl.h
index b2adbb4b2f73..5bad17d1acde 100644
--- a/include/linux/list_bl.h
+++ b/include/linux/list_bl.h
@@ -16,7 +16,7 @@
* some fast and compact auxiliary data.
*/
-#if defined(CONFIG_SMP)
+#if defined(CONFIG_SMP) || defined(CONFIG_DEBUG_SPINLOCK... |
c7066f70d9610df0b9406cc635fc09e86136e714 | Analyze and fix the following issue in the Linux kernel code: netfilter: fix Kconfig dependencies | Problem Details:
Fix dependencies of netfilter realm match: it depends on NET_CLS_ROUTE,
which itself depends on NET_SCHED; this dependency is missing from netfilter.
Since matching on realms is also useful without having NET_SCHED enabled and
the option really only controls whether the tclassid member is included in
... | ```diff
diff --git a/include/net/dst.h b/include/net/dst.h
index a5bd72646d65..6baba836ad8b 100644
--- a/include/net/dst.h
+++ b/include/net/dst.h
@@ -72,7 +72,7 @@ struct dst_entry {
u32 metrics[RTAX_MAX];
-#ifdef CONFIG_NET_CLS_ROUTE
+#ifdef CONFIG_IP_ROUTE_CLASSID
__u32 tclassid;
#else
__u32 __pad2;... |
228dd545147a07c5e81e4732ad0e829d19ce5daa | Analyze and fix the following issue in the Linux kernel code: ASoC: WL1273 FM radio: Fix breakage with MFD API changes | Problem Details:
These changes are needed to keep up with the changes in the
MFD core and V4L2 parts of the wl1273 FM radio driver.
Use function pointers instead of exported functions for I2C IO.
Also move all preprocessor constants from the wl1273.h to
include/linux/mfd/wl1273-core.h.
Signed-off-by: Matti J. Aaltone... | ```diff
diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig
index 883a312bb293..c48b23c1d4fc 100644
--- a/sound/soc/codecs/Kconfig
+++ b/sound/soc/codecs/Kconfig
@@ -44,7 +44,7 @@ config SND_SOC_ALL_CODECS
select SND_SOC_TWL6040 if TWL4030_CORE
select SND_SOC_UDA134X
select SND_SOC_UDA1380 if I2C
- s... |
30b99d07b7e08d0e6bcc2f0b924828c03e67f881 | Analyze and fix the following issue in the Linux kernel code: ARM: fix wrongly patched constants | Problem Details:
e3d9c625 (ARM: CPU hotplug: fix hard-coded control register constants)
changed the wrong constants in the hotplug assembly code. Fix this.
Reported-by: viresh kumar <viresh.kumar@st.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> | ```diff
diff --git a/arch/arm/mach-s5pv310/hotplug.c b/arch/arm/mach-s5pv310/hotplug.c
index afa5392d9fc0..c24235c89eed 100644
--- a/arch/arm/mach-s5pv310/hotplug.c
+++ b/arch/arm/mach-s5pv310/hotplug.c
@@ -30,10 +30,10 @@ static inline void cpu_enter_lowpower(void)
* Turn off coherency
*/
" mrc p15, 0, %0, c1,... |
1db0b427eec6f18477fa95aab8edf6176dffcea4 | Analyze and fix the following issue in the Linux kernel code: gpio: Fix cs5535 printk warnings | Problem Details:
drivers/gpio/cs5535-gpio.c: In function 'cs5535_gpio_probe':
drivers/gpio/cs5535-gpio.c:269: warning: format '%x' expects type 'unsigned int', but argument 3 has type 'resource_size_t'
drivers/gpio/cs5535-gpio.c:269: warning: format '%x' expects type 'unsigned int', but argument 4 has type 'resource_si... | ```diff
diff --git a/drivers/gpio/cs5535-gpio.c b/drivers/gpio/cs5535-gpio.c
index f9813ef48534..0d05ea7d499b 100644
--- a/drivers/gpio/cs5535-gpio.c
+++ b/drivers/gpio/cs5535-gpio.c
@@ -329,8 +329,7 @@ static int __devinit cs5535_gpio_probe(struct platform_device *pdev)
cs5535_gpio_chip.pdev = pdev;
spin_lock_init... |
7eb19812eead8d0faf30682b69970b36dc02e570 | Analyze and fix the following issue in the Linux kernel code: misc: Fix cs5535 printk warnings | Problem Details:
drivers/misc/cs5535-mfgpt.c: In function 'cs5535_mfgpt_probe':
drivers/misc/cs5535-mfgpt.c:320: warning: format '%x' expects type 'unsigned int', but argument 3 has type 'resource_size_t'
drivers/misc/cs5535-mfgpt.c:320: warning: format '%x' expects type 'unsigned int', but argument 4 has type 'resourc... | ```diff
diff --git a/drivers/misc/cs5535-mfgpt.c b/drivers/misc/cs5535-mfgpt.c
index 26693060b29b..d02d302ee6d5 100644
--- a/drivers/misc/cs5535-mfgpt.c
+++ b/drivers/misc/cs5535-mfgpt.c
@@ -317,8 +317,7 @@ static int __devinit cs5535_mfgpt_probe(struct platform_device *pdev)
cs5535_mfgpt_chip.pdev = pdev;
spin_loc... |
87fff232cb76828b44312843d96854704f71ed19 | Analyze and fix the following issue in the Linux kernel code: mfd: Use NULL to initialise NULL pointers in ab8500-debugfs | Problem Details:
Partly for coding style reasons, but mostly because sparse warns on it.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Mattias Wallin <mattias.wallin@stericsson.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com> | ```diff
diff --git a/drivers/mfd/ab8500-debugfs.c b/drivers/mfd/ab8500-debugfs.c
index dfdc76e0b96e..3c1541ae7223 100644
--- a/drivers/mfd/ab8500-debugfs.c
+++ b/drivers/mfd/ab8500-debugfs.c
@@ -189,7 +189,7 @@ static struct ab8500_i2c_ranges debug_ranges[AB8500_NUM_BANKS] = {
},
[AB8500_DBI] = {
.num_ranges = 0... |
5b9cecd68f3ef72ab9e586b0c2995a40a2f1e630 | Analyze and fix the following issue in the Linux kernel code: mfd: Fix twl_probe section mismatch warning in mfd/twl-core.c | Problem Details:
Fix the following section mismatch warning when building
omap2plus_defconfig:
WARNING: vmlinux.o(.data+0x47d7c): Section mismatch in reference
from the variable twl_driver to the function .init.text:twl_probe()
Signed-off-by: Bryan Wu <bryan.wu@canonical.com>
Signed-off-by: Paul Walmsley <paul@pwsan.... | ```diff
diff --git a/drivers/mfd/twl-core.c b/drivers/mfd/twl-core.c
index 12abd5b924b3..a35fa7dcbf53 100644
--- a/drivers/mfd/twl-core.c
+++ b/drivers/mfd/twl-core.c
@@ -1003,7 +1003,7 @@ static int twl_remove(struct i2c_client *client)
}
/* NOTE: this driver only handles a single twl4030/tps659x0 chip */
-static... |
816b4580cef948c7d9ac9e3e63fb1b663012f057 | Analyze and fix the following issue in the Linux kernel code: mfd: Fix cs5535 warning on x86-64 | Problem Details:
ARRAY_SIZE() returns size_t; use %zu instead of %d so that we don't
get warnings on x86-64.
Signed-off-by: Andres Salomon <dilinger@queued.net>
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com> | ```diff
diff --git a/drivers/mfd/cs5535-mfd.c b/drivers/mfd/cs5535-mfd.c
index b141ca7c777c..59ca6f151e78 100644
--- a/drivers/mfd/cs5535-mfd.c
+++ b/drivers/mfd/cs5535-mfd.c
@@ -103,7 +103,7 @@ static int __devinit cs5535_mfd_probe(struct pci_dev *pdev,
goto err_disable;
}
- dev_info(&pdev->dev, "%d devices reg... |
1591192d3a17adeebd03be0ce5888b88bddfaf89 | Analyze and fix the following issue in the Linux kernel code: drm/i915: Disable GPU semaphores on SandyBridge mobile | Problem Details:
Hopefully, this is a temporary measure whilst the root cause is
understood. At the moment, we experience a hard hang whilst looping
urbanterror that has been identified as a result of the use of
semaphores, but so far only on SNB mobile.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=32752
Tes... | ```diff
diff --git a/drivers/gpu/drm/i915/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
index 8db88e34ef7b..dcfdf4151b6d 100644
--- a/drivers/gpu/drm/i915/i915_gem_execbuffer.c
+++ b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
@@ -772,7 +772,8 @@ i915_gem_execbuffer_sync_rings(struct drm_i915_gem_ob... |
639cef0eb6df05d5516520aa89b0c9fe62ee2d3b | Analyze and fix the following issue in the Linux kernel code: ALSA: hda - Store PCM parameters properly in HDMI open callback | Problem Details:
In hdmi_pcm_open(), the evaluated PCM hw parameters are stored in
hinfo, but these aren't properly set back to the current runtime
record since these have been set beforehand in azx_pcm_open().
This patch fixes the behavior.
Signed-off-by: Takashi Iwai <tiwai@suse.de> | ```diff
diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c
index 2d288793ceb3..5980552f5970 100644
--- a/sound/pci/hda/patch_hdmi.c
+++ b/sound/pci/hda/patch_hdmi.c
@@ -817,6 +817,7 @@ static int hdmi_pcm_open(struct hda_pcm_stream *hinfo,
struct hdmi_spec *spec = codec->spec;
struct hdmi_eld *eld... |
b9214b9780d6897a6892e7c8cc903168d6fef097 | Analyze and fix the following issue in the Linux kernel code: ARM mxs: clkdev related compile fixes | Problem Details:
Since commit
6d803ba (ARM: 6483/1: arm & sh: factorised duplicated clkdev.c)
platforms need to select CLKDEV_LOOKUP instead of COMMON_CLKDEV and need
to include <linux/clkdev.h>.
Cc: Shawn Guo <shawn.guo@freescale.com>
Cc: Lothar Waßmann <LW@KARO-electronics.de>
Signed-off-by: Uwe Kleine-König <u.k... | ```diff
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 0f3417065d13..e348db16a9e2 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -355,7 +355,7 @@ config ARCH_MXS
bool "Freescale MXS-based"
select GENERIC_CLOCKEVENTS
select ARCH_REQUIRE_GPIOLIB
- select COMMON_CLKDEV
+ select CLKDEV_LOOKUP
help
... |
4d2692a736c95240100755ba98b2403e11f12e06 | Analyze and fix the following issue in the Linux kernel code: ARM: 6624/1: fix dependency for CONFIG_SMP_ON_UP | Problem Details:
This depends on !XIP_KERNEL and not !XIP.
Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> | ```diff
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index a3fb23be87f3..53ea54782ef5 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -1275,7 +1275,7 @@ config SMP
config SMP_ON_UP
bool "Allow booting SMP kernel on uniprocessor systems (EXPERIMENTAL)"
depends on EXPERIMENTAL
- depends on SMP && !XIP
+ ... |
874d5d3ccc04c0659b76b05ee0c761f568062cb1 | Analyze and fix the following issue in the Linux kernel code: ARM: 6623/1: Thumb-2: Fix out-of-range offset for Thumb-2 in proc-v7.S | Problem Details:
Commit d30e45e (ARM: pgtable: switch order of Linux vs hardware page tables)
introduced a pre-increment addressing offset which is out of range for
Thumb-2. Thumb-2 only permits offsets <256. So split the intruction in
two for Thumb-2.
Signed-off-by: Dave Martin <dave.martin@linaro.org>
Signed-off-b... | ```diff
diff --git a/arch/arm/mm/proc-v7.S b/arch/arm/mm/proc-v7.S
index b49fab21517c..0c1172b56b4e 100644
--- a/arch/arm/mm/proc-v7.S
+++ b/arch/arm/mm/proc-v7.S
@@ -159,7 +159,9 @@ ENTRY(cpu_v7_set_pte_ext)
tstne r1, #L_PTE_PRESENT
moveq r3, #0
- str r3, [r0, #2048]!
+ ARM( str r3, [r0, #2048]! )
+ THUMB( add r... |
f8fe80e4383bf5f542beb80bf2abe9fc1505c366 | Analyze and fix the following issue in the Linux kernel code: ALSA: oxygen: Xonar DG: fix CS4245 register writes | Problem Details:
Accidentally exchanging register addresses and register values leads to
many strange errors ...
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de> | ```diff
diff --git a/sound/pci/oxygen/xonar_dg.c b/sound/pci/oxygen/xonar_dg.c
index e4de0b8d087a..e1fa602eba79 100644
--- a/sound/pci/oxygen/xonar_dg.c
+++ b/sound/pci/oxygen/xonar_dg.c
@@ -75,7 +75,7 @@ static void cs4245_write(struct oxygen *chip, unsigned int reg, u8 value)
OXYGEN_SPI_CEN_LATCH_CLOCK_HI,
... |
c97b73939a3ed8618ad1baf3be4c8f5d11426de6 | Analyze and fix the following issue in the Linux kernel code: ARM i.MX mx31_3ds: Fix MC13783 regulator names | Problem Details:
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> | ```diff
diff --git a/arch/arm/mach-mx3/mach-mx31_3ds.c b/arch/arm/mach-mx3/mach-mx31_3ds.c
index 4e516b49a901..6b4aa2c47107 100644
--- a/arch/arm/mach-mx3/mach-mx31_3ds.c
+++ b/arch/arm/mach-mx3/mach-mx31_3ds.c
@@ -147,10 +147,10 @@ static struct mc13783_regulator_init_data mx31_3ds_regulators[] = {
.init_data = &pw... |
3ec762ad8be364c2fadfe0d6b2cc6d4d3b5e1b54 | Analyze and fix the following issue in the Linux kernel code: cgroups: Fix a lockdep warning at cgroup removal | Problem Details:
Commit 2fd6b7f5 ("fs: dcache scale subdirs") forgot to annotate a dentry
lock, which caused a lockdep warning.
Reported-by: Valdis Kletnieks <Valdis.Kletnieks@vt.edu>
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com> | ```diff
diff --git a/kernel/cgroup.c b/kernel/cgroup.c
index 51cddc11cd85..a7837e2d9d6b 100644
--- a/kernel/cgroup.c
+++ b/kernel/cgroup.c
@@ -912,7 +912,7 @@ static void cgroup_d_remove_dir(struct dentry *dentry)
parent = dentry->d_parent;
spin_lock(&parent->d_lock);
- spin_lock(&dentry->d_lock);
+ spin_lock_nes... |
7b9337aaf98f9941d0927a75217d3ff31afec609 | Analyze and fix the following issue in the Linux kernel code: fs: namei fix ->put_link on wrong inode in do_filp_open | Problem Details:
J. R. Okajima noticed that ->put_link is being attempted on the
wrong inode, and suggested the way to fix it. I changed it a bit
according to Al's suggestion to keep an explicit link path around.
Signed-off-by: Nick Piggin <npiggin@kernel.dk> | ```diff
diff --git a/fs/namei.c b/fs/namei.c
index bc24894c5f14..9cda4c452a6d 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -779,7 +779,8 @@ static void path_put_conditional(struct path *path, struct nameidata *nd)
mntput(path->mnt);
}
-static inline void path_to_nameidata(struct path *path, struct nameidata *nd)
+... |
f8ae6e3eb8251be32c6e913393d9f8d9e0609489 | Analyze and fix the following issue in the Linux kernel code: block cfq: make queue preempt work for queues from different workload | Problem Details:
I got this:
fio-874 [007] 2157.724514: 8,32 m N cfq874 preempt
fio-874 [007] 2157.724519: 8,32 m N cfq830 slice expired t=1
fio-874 [007] 2157.724520: 8,32 m N cfq830 sl_used=1 disp=0 charge=1 iops=0 sect=0
fio-874 [007] ... | ```diff
diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c
index 8427697c5437..7bfea53c1bb5 100644
--- a/block/cfq-iosched.c
+++ b/block/cfq-iosched.c
@@ -3284,9 +3284,18 @@ cfq_should_preempt(struct cfq_data *cfqd, struct cfq_queue *new_cfqq,
*/
static void cfq_preempt_queue(struct cfq_data *cfqd, struct cfq_qu... |
c289ef41431144a538b5fb5f94fc83c81b3020e2 | Analyze and fix the following issue in the Linux kernel code: mmc: sdhci-of: fix build on non-powerpc platforms | Problem Details:
Explicitly include err.h, of_address.h and of_irq.h.
Make use of machine_is() conditional on PPC.
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca> | ```diff
diff --git a/drivers/mmc/host/sdhci-of-core.c b/drivers/mmc/host/sdhci-of-core.c
index fa19d849a920..dd84124f4209 100644
--- a/drivers/mmc/host/sdhci-of-core.c
+++ b/drivers/mmc/host/sdhci-of-core.c
@@ -13,6 +13,7 @@
* your option) any later version.
*/
+#include <linux/err.h>
#include <linux/module.h>
... |
bba958783b1b4cb0a9420f4e11082467132a334c | Analyze and fix the following issue in the Linux kernel code: mmc: sh_mmcif: Convert to __raw_xxx() I/O accessors. | Problem Details:
When using the I/O accessors in raw mode from the boot stubs we don't
want to bother with any of the complexity associated with readl/writel
and friends. Furthermore, utilization within the context of the host
driver itself is all performed on an ioremapped window, so using the
__raw variants there doe... | ```diff
diff --git a/include/linux/mmc/sh_mmcif.h b/include/linux/mmc/sh_mmcif.h
index bf173502d744..38d393092812 100644
--- a/include/linux/mmc/sh_mmcif.h
+++ b/include/linux/mmc/sh_mmcif.h
@@ -94,12 +94,12 @@ struct sh_mmcif_plat_data {
static inline u32 sh_mmcif_readl(void __iomem *addr, int reg)
{
- return read... |
8f82f0c7029d39b499389c8e225cf147fb83abe2 | Analyze and fix the following issue in the Linux kernel code: sh: Fix up breakage from asm-generic/pgtable.h changes. | Problem Details:
We require a forward declaration for mm_struct:
In file included from arch/sh/include/asm/pgtable.h:163,
from arch/sh/include/asm/io.h:21,
from arch/sh/kernel/machvec.c:20:
include/asm-generic/pgtable.h:104: error: 'struct mm_struct' declared inside parameter list
inc... | ```diff
diff --git a/arch/sh/include/asm/pgtable.h b/arch/sh/include/asm/pgtable.h
index 083ea068e819..db85916b9e95 100644
--- a/arch/sh/include/asm/pgtable.h
+++ b/arch/sh/include/asm/pgtable.h
@@ -134,6 +134,7 @@ typedef pte_t *pte_addr_t;
extern void pgtable_cache_init(void);
struct vm_area_struct;
+struct mm_st... |
9e56790ad31d72a5a44142af462d047c0c897b29 | Analyze and fix the following issue in the Linux kernel code: USB CDC NCM: Don't deref NULL in cdc_ncm_rx_fixup() and don't use uninitialized variable. | Problem Details:
skb_clone() dynamically allocates memory and may fail. If it does it
returns NULL. This means we'll dereference a NULL pointer in
drivers/net/usb/cdc_ncm.c::cdc_ncm_rx_fixup().
As far as I can tell, the proper way to deal with this is simply to goto
the error label.
Furthermore gcc complains that 'skb... | ```diff
diff --git a/drivers/net/usb/cdc_ncm.c b/drivers/net/usb/cdc_ncm.c
index 593c104ab199..d776c4a8d3c1 100644
--- a/drivers/net/usb/cdc_ncm.c
+++ b/drivers/net/usb/cdc_ncm.c
@@ -1021,13 +1021,15 @@ static int cdc_ncm_rx_fixup(struct usbnet *dev, struct sk_buff *skb_in)
(temp > CDC_NCM_MAX_DATAGRAM_SIZE) || ... |
f20877d94a74557b7c28b4ed8920d834c31e0ea5 | Analyze and fix the following issue in the Linux kernel code: fs: fix do_last error case when need_reval_dot | Problem Details:
When open(2) without O_DIRECTORY opens an existing dir, it should return
EISDIR. In do_last(), the variable 'error' is initialized EISDIR, but it
is changed by d_revalidate() which returns any positive to represent
'the target dir is valid.'
Should we keep and return the initialized 'error' in this ca... | ```diff
diff --git a/fs/namei.c b/fs/namei.c
index 14c73edca9ce..bc24894c5f14 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -2122,11 +2122,13 @@ static struct file *do_last(struct nameidata *nd, struct path *path,
dir = nd->path.dentry;
case LAST_DOT:
if (need_reval_dot(dir)) {
- error = d_revalidate(nd->path.d... |
2c6755988afc003a0332406a134fb6a1626f9b28 | Analyze and fix the following issue in the Linux kernel code: fs: hlist UP debug fixup | Problem Details:
Po-Yu Chuang <ratbert.chuang@gmail.com> noticed that hlist_bl_set_first could
crash on a UP system when LIST_BL_LOCKMASK is 0, because
LIST_BL_BUG_ON(!((unsigned long)h->first & LIST_BL_LOCKMASK));
always evaulates to true.
Fix the expression, and also avoid a dependency between bit spinlock
implem... | ```diff
diff --git a/include/linux/list_bl.h b/include/linux/list_bl.h
index 9ee97e7f2be4..b2adbb4b2f73 100644
--- a/include/linux/list_bl.h
+++ b/include/linux/list_bl.h
@@ -16,7 +16,7 @@
* some fast and compact auxiliary data.
*/
-#if defined(CONFIG_SMP) || defined(CONFIG_DEBUG_SPINLOCK)
+#if defined(CONFIG_SMP... |
90dbb77ba48dddb87445d238e84cd137cf97dd98 | Analyze and fix the following issue in the Linux kernel code: fs: fix dropping of rcu-walk from force_reval_path | Problem Details:
As J. R. Okajima noted, force_reval_path passes in the same dentry to
d_revalidate as the one in the nameidata structure (other callers pass in a
child), so the locking breaks. This can oops with a chrooted nfs mount, for
example. Similarly there can be other problems with revalidating a dentry
which i... | ```diff
diff --git a/fs/namei.c b/fs/namei.c
index 0f02359ce685..14c73edca9ce 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -479,6 +479,14 @@ static int nameidata_dentry_drop_rcu(struct nameidata *nd, struct dentry *dentry
struct fs_struct *fs = current->fs;
struct dentry *parent = nd->path.dentry;
+ /*
+ * It can... |
a82416da83722944d78d933301e32e7c5ad70edd | Analyze and fix the following issue in the Linux kernel code: fs: small rcu-walk documentation fixes | Problem Details:
Signed-off-by: Nick Piggin <npiggin@kernel.dk> | ```diff
diff --git a/Documentation/filesystems/porting b/Documentation/filesystems/porting
index 07a32b42cf9c..7fcac6393cd0 100644
--- a/Documentation/filesystems/porting
+++ b/Documentation/filesystems/porting
@@ -365,8 +365,8 @@ must be done in the RCU callback.
[recommended]
vfs now tries to do path walking in "r... |
50de1dd967d4ba3b8a90ebe7a4f5feca24191317 | Analyze and fix the following issue in the Linux kernel code: memcg: fix memory migration of shmem swapcache | Problem Details:
In the current implementation mem_cgroup_end_migration() decides whether
the page migration has succeeded or not by checking "oldpage->mapping".
But if we are tring to migrate a shmem swapcache, the page->mapping of it
is NULL from the begining, so the check would be invalid. As a result,
mem_cgroup_... | ```diff
diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h
index 067115ce6b3e..6a576f989437 100644
--- a/include/linux/memcontrol.h
+++ b/include/linux/memcontrol.h
@@ -98,7 +98,7 @@ extern int
mem_cgroup_prepare_migration(struct page *page,
struct page *newpage, struct mem_cgroup **ptr);
extern v... |
dfe076b0971a783469bc2066e85d46e23c8acb1c | Analyze and fix the following issue in the Linux kernel code: memcg: fix deadlock between cpuset and memcg | Problem Details:
Commit b1dd693e ("memcg: avoid deadlock between move charge and
try_charge()") can cause another deadlock about mmap_sem on task migration
if cpuset and memcg are mounted onto the same mount point.
After the commit, cgroup_attach_task() has sequence like:
cgroup_attach_task()
ss->can_attach()
c... | ```diff
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 1b44ad64f281..c339d7431bda 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -292,7 +292,6 @@ static struct move_charge_struct {
unsigned long moved_charge;
unsigned long moved_swap;
struct task_struct *moving_task; /* a task moving charges */
- str... |
f3e8eb70b1807d1b30aa6972af0cf30077c40112 | Analyze and fix the following issue in the Linux kernel code: memcg: fix unit mismatch in memcg oom limit calculation | Problem Details:
Adding the number of swap pages to the byte limit of a memory control
group makes no sense. Convert the pages to bytes before adding them.
The only user of this code is the OOM killer, and the way it is used means
that the error results in a higher OOM badness value. Since the cgroup
limit is the sa... | ```diff
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index d888956a2cfc..9f8ad77f091b 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -1312,8 +1312,9 @@ u64 mem_cgroup_get_limit(struct mem_cgroup *memcg)
u64 limit;
u64 memsw;
- limit = res_counter_read_u64(&memcg->res, RES_LIMIT) +
- total_swap_pages;
+... |
dbd4ea78f002df283c95d9774837041735fa1bf9 | Analyze and fix the following issue in the Linux kernel code: memcg: add lock to synchronize page accounting and migration | Problem Details:
Introduce a new bit spin lock, PCG_MOVE_LOCK, to synchronize the page
accounting and migration code. This reworks the locking scheme of
_update_stat() and _move_account() by adding new lock bit PCG_MOVE_LOCK,
which is always taken under IRQ disable.
1. If pages are being migrated from a memcg, then u... | ```diff
diff --git a/include/linux/page_cgroup.h b/include/linux/page_cgroup.h
index fdb5a92b5ac7..5b0c971d7cae 100644
--- a/include/linux/page_cgroup.h
+++ b/include/linux/page_cgroup.h
@@ -35,15 +35,18 @@ struct page_cgroup *lookup_page_cgroup(struct page *page);
enum {
/* flags for mem_cgroup */
- PCG_LOCK, /*... |
ece72400c2a27a3d726cb0854449f991d9fcd2da | Analyze and fix the following issue in the Linux kernel code: memcg: document cgroup dirty memory interfaces | Problem Details:
Document cgroup dirty memory interfaces and statistics.
[akpm@linux-foundation.org: fix use_hierarchy description]
Signed-off-by: Andrea Righi <arighi@develer.com>
Signed-off-by: Greg Thelen <gthelen@google.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Daisuke Nishimura <nishimura@mx... | ```diff
diff --git a/Documentation/cgroups/memory.txt b/Documentation/cgroups/memory.txt
index 7781857dc940..bac328c232f5 100644
--- a/Documentation/cgroups/memory.txt
+++ b/Documentation/cgroups/memory.txt
@@ -385,6 +385,10 @@ mapped_file - # of bytes of mapped file (includes tmpfs/shmem)
pgpgin - # of pages paged i... |
744ed1442757767ffede5008bb13e0805085902e | Analyze and fix the following issue in the Linux kernel code: mm: batch activate_page() to reduce lock contention | Problem Details:
The zone->lru_lock is heavily contented in workload where activate_page()
is frequently used. We could do batch activate_page() to reduce the lock
contention. The batched pages will be added into zone list when the pool
is full or page reclaim is trying to drain them.
For example, in a 4 socket 64 C... | ```diff
diff --git a/mm/internal.h b/mm/internal.h
index 69488205723d..4c98630f0f77 100644
--- a/mm/internal.h
+++ b/mm/internal.h
@@ -39,6 +39,15 @@ static inline void __put_page(struct page *page)
extern unsigned long highest_memmap_pfn;
+#ifdef CONFIG_SMP
+extern int putback_active_lru_page(struct zone *zone, s... |
fd4a4663db293bfd5dc20fb4113977f62895e550 | Analyze and fix the following issue in the Linux kernel code: mm: fix hugepage migration | Problem Details:
2.6.37 added an unmap_and_move_huge_page() for memory failure recovery,
but its anon_vma handling was still based around the 2.6.35 conventions.
Update it to use page_lock_anon_vma, get_anon_vma, page_unlock_anon_vma,
drop_anon_vma in the same way as we're now changing unmap_and_move().
I don't partic... | ```diff
diff --git a/mm/migrate.c b/mm/migrate.c
index a20cf12edede..5b7d1fd29621 100644
--- a/mm/migrate.c
+++ b/mm/migrate.c
@@ -827,7 +827,6 @@ static int unmap_and_move_huge_page(new_page_t get_new_page,
int rc = 0;
int *result = NULL;
struct page *new_hpage = get_new_page(hpage, private, &result);
- int rcu_... |
1ce82b69e96c838d007f316b8347b911fdfa9842 | Analyze and fix the following issue in the Linux kernel code: mm: fix migration hangs on anon_vma lock | Problem Details:
Increased usage of page migration in mmotm reveals that the anon_vma
locking in unmap_and_move() has been deficient since 2.6.36 (or even
earlier). Review at the time of f18194275c39835cb84563500995e0d503a32d9a
("mm: fix hang on anon_vma->root->lock") missed the issue here: the
anon_vma to which we ge... | ```diff
diff --git a/mm/migrate.c b/mm/migrate.c
index 89a6bc8cd307..a20cf12edede 100644
--- a/mm/migrate.c
+++ b/mm/migrate.c
@@ -622,7 +622,6 @@ static int unmap_and_move(new_page_t get_new_page, unsigned long private,
int *result = NULL;
struct page *newpage = get_new_page(page, private, &result);
int remap_sw... |
73ae31e5986a4c0ee84bfd13ccd9b57a98956f6f | Analyze and fix the following issue in the Linux kernel code: hugetlb: fix handling of parse errors in sysfs | Problem Details:
When parsing changes to the huge page pool sizes made from userspace via
the sysfs interface, bogus input values are being covered up by
nr_hugepages_store_common and nr_overcommit_hugepages_store returning 0
when strict_strtoul returns an error. This can cause an infinite loop in
the nr_hugepages_sto... | ```diff
diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index ce8e5bb6f031..bb0b7c128015 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -1375,10 +1375,8 @@ static ssize_t nr_hugepages_store_common(bool obey_mempolicy,
NODEMASK_ALLOC(nodemask_t, nodes_allowed, GFP_KERNEL | __GFP_NORETRY);
err = strict_strtoul(buf, 10, &... |
cb9ef8d5e394f70db64bda79c20d3569a20d2574 | Analyze and fix the following issue in the Linux kernel code: fs/fs-writeback.c: fix sync_inodes_sb() return value kernel-doc | Problem Details:
The sync_inodes_sb() function does not have a return value. Remove the
outdated documentation comment.
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | ```diff
diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c
index 05aab263e9aa..59c6e4956786 100644
--- a/fs/fs-writeback.c
+++ b/fs/fs-writeback.c
@@ -1225,7 +1225,7 @@ EXPORT_SYMBOL(writeback_inodes_sb_nr_if_idle);
* @sb: the superblock
*
* This function writes and waits on any dirty inode belonging to this
- * ... |
43506fad21ca3d8dc59e768ff458f7c5e5c01086 | Analyze and fix the following issue in the Linux kernel code: mm/page_alloc.c: simplify calculation of combined index of adjacent buddy lists | Problem Details:
The previous approach of calucation of combined index was
page_idx & ~(1 << order))
but we have same result with
page_idx & buddy_idx
This reduces instructions slightly as well as enhances readability.
[akpm@linux-foundation.org: coding-style fixes]
[akpm@linux-foundation.org: fix used-unintiali... | ```diff
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 9dfe49bceff4..bda1db301d44 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -427,18 +427,10 @@ static inline void rmv_page_order(struct page *page)
*
* Assumption: *_mem_map is contiguous at least up to MAX_ORDER
*/
-static inline struct page *
-__... |
5520e89485252c759ee60d313e9422447659947b | Analyze and fix the following issue in the Linux kernel code: brk: fix min_brk lower bound computation for COMPAT_BRK | Problem Details:
Even if CONFIG_COMPAT_BRK is set in the kernel configuration, it can still
be overriden by randomize_va_space sysctl.
If this is the case, the min_brk computation in sys_brk() implementation
is wrong, as it solely takes into account COMPAT_BRK setting, assuming
that brk start is not randomized. But t... | ```diff
diff --git a/mm/mmap.c b/mm/mmap.c
index 73cc648873d6..2ec8eb5a9cdd 100644
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -254,7 +254,15 @@ SYSCALL_DEFINE1(brk, unsigned long, brk)
down_write(&mm->mmap_sem);
#ifdef CONFIG_COMPAT_BRK
- min_brk = mm->end_code;
+ /*
+ * CONFIG_COMPAT_BRK can still be overridden by setti... |
32d6feadf4e17ea9b98071be9bbf402a74a4f818 | Analyze and fix the following issue in the Linux kernel code: mm/hugetlb.c: fix error-path memory leak in nr_hugepages_store_common() | Problem Details:
The NODEMASK_ALLOC macro may dynamically allocate memory for its second
argument ('nodes_allowed' in this context).
In nr_hugepages_store_common() we may abort early if strict_strtoul()
fails, but in that case we do not free the memory already allocated to
'nodes_allowed', causing a memory leak.
This... | ```diff
diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index 7bf223d6677b..8e31cda6fc22 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -1374,8 +1374,10 @@ static ssize_t nr_hugepages_store_common(bool obey_mempolicy,
NODEMASK_ALLOC(nodemask_t, nodes_allowed, GFP_KERNEL | __GFP_NORETRY);
err = strict_strtoul(buf, 10, &... |
29c1f677d424e8c5683a837fc4f03fc9f19201d7 | Analyze and fix the following issue in the Linux kernel code: mm: migration: use rcu_dereference_protected when dereferencing the radix tree slot during file page migration | Problem Details:
migrate_pages() -> unmap_and_move() only calls rcu_read_lock() for
anonymous pages, as introduced by git commit
989f89c57e6361e7d16fbd9572b5da7d313b073d ("fix rcu_read_lock() in page
migraton"). The point of the RCU protection there is part of getting a
stable reference to anon_vma and is only held fo... | ```diff
diff --git a/include/linux/radix-tree.h b/include/linux/radix-tree.h
index ab2baa5c4884..23241c2fecce 100644
--- a/include/linux/radix-tree.h
+++ b/include/linux/radix-tree.h
@@ -145,6 +145,22 @@ static inline void *radix_tree_deref_slot(void **pslot)
return rcu_dereference(*pslot);
}
+/**
+ * radix_tree_d... |
91600e9e592e48736e630851c83da2ad6bf0e91f | Analyze and fix the following issue in the Linux kernel code: thp: fix memory-failure hugetlbfs vs THP collision | Problem Details:
hugetlbfs was changed to allow memory failure to migrate the hugetlbfs
pages and that broke THP as split_huge_page was then called on hugetlbfs
pages too.
compound_head/order was also run unsafe on THP pages that can be splitted
at any time.
All compound_head() invocations in memory-failure.c that ar... | ```diff
diff --git a/mm/memory-failure.c b/mm/memory-failure.c
index 6a283cc9317c..1b43d0ffff65 100644
--- a/mm/memory-failure.c
+++ b/mm/memory-failure.c
@@ -386,7 +386,7 @@ static void collect_procs_anon(struct page *page, struct list_head *to_kill,
struct task_struct *tsk;
struct anon_vma *av;
- if (unlikely(s... |
14d1a55cd26f1860f837f37ae42520c7c13b1347 | Analyze and fix the following issue in the Linux kernel code: thp: add debug checks for mapcount related invariants | Problem Details:
Add debug checks for invariants that if broken could lead to mapcount vs
page_mapcount debug checks to trigger later in split_huge_page.
Signed-off-by: Andrea Arcangeli <aarcange@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundati... | ```diff
diff --git a/mm/memory.c b/mm/memory.c
index 12ee1ea237f5..31250faff390 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -804,6 +804,7 @@ static inline int copy_pmd_range(struct mm_struct *dst_mm, struct mm_struct *src
next = pmd_addr_end(addr, end);
if (pmd_trans_huge(*src_pmd)) {
int err;
+ VM_BUG_ON... |
2c888cfbc1b45508a44763d85ba2e8ac43faff5f | Analyze and fix the following issue in the Linux kernel code: thp: fix anon memory statistics with transparent hugepages | Problem Details:
Count each transparent hugepage as HPAGE_PMD_NR pages in the LRU
statistics, so the Active(anon) and Inactive(anon) statistics in
/proc/meminfo are correct.
Signed-off-by: Rik van Riel <riel@redhat.com>
Signed-off-by: Andrea Arcangeli <aarcange@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foun... | ```diff
diff --git a/include/linux/huge_mm.h b/include/linux/huge_mm.h
index 827595228734..9b48c24df260 100644
--- a/include/linux/huge_mm.h
+++ b/include/linux/huge_mm.h
@@ -117,11 +117,19 @@ static inline void vma_adjust_trans_huge(struct vm_area_struct *vma,
return;
__vma_adjust_trans_huge(vma, start, end, adju... |
ce83d2174ea9c3d72d5821cf3ebc974e36391bf7 | Analyze and fix the following issue in the Linux kernel code: thp: allocate memory in khugepaged outside of mmap_sem write mode | Problem Details:
This tries to be more friendly to filesystem in userland, with userland
backends that allocate memory in the I/O paths and that could deadlock if
khugepaged holds the mmap_sem write mode of the userland backend while
allocating memory. Memory allocation may wait for writeback I/O
completion from the d... | ```diff
diff --git a/mm/huge_memory.c b/mm/huge_memory.c
index f6559e7711bd..bce6e12140e2 100644
--- a/mm/huge_memory.c
+++ b/mm/huge_memory.c
@@ -1664,9 +1664,9 @@ static void __collapse_huge_page_copy(pte_t *pte, struct page *page,
static void collapse_huge_page(struct mm_struct *mm,
unsigned long addre... |
5f24ce5fd34c3ca1b3d10d30da754732da64d5c0 | Analyze and fix the following issue in the Linux kernel code: thp: remove PG_buddy | Problem Details:
PG_buddy can be converted to _mapcount == -2. So the PG_compound_lock can
be added to page->flags without overflowing (because of the sparse section
bits increasing) with CONFIG_X86_PAE=y and CONFIG_X86_PAT=y. This also
has to move the memory hotplug code from _mapcount to lru.next to avoid
any risk ... | ```diff
diff --git a/fs/proc/page.c b/fs/proc/page.c
index b06c674624e6..6d8e6a9e93ab 100644
--- a/fs/proc/page.c
+++ b/fs/proc/page.c
@@ -116,15 +116,17 @@ u64 stable_page_flags(struct page *page)
if (PageHuge(page))
u |= 1 << KPF_HUGE;
- u |= kpf_copy_bit(k, KPF_LOCKED, PG_locked);
-
/*
- * Caveats on high ... |
3f04f62f90d46a82dd73027c5fd7a15daed5c33d | Analyze and fix the following issue in the Linux kernel code: thp: split_huge_page paging | Problem Details:
Paging logic that splits the page before it is unmapped and added to swap
to ensure backwards compatibility with the legacy swap code. Eventually
swap should natively pageout the hugepages to increase performance and
decrease seeking and fragmentation of swap space. swapoff can just skip
over huge pm... | ```diff
diff --git a/mm/memory-failure.c b/mm/memory-failure.c
index 2323a8039a98..6a283cc9317c 100644
--- a/mm/memory-failure.c
+++ b/mm/memory-failure.c
@@ -386,6 +386,8 @@ static void collect_procs_anon(struct page *page, struct list_head *to_kill,
struct task_struct *tsk;
struct anon_vma *av;
+ if (unlikely(s... |
8ac1f8320a0073f28cf9e0491af4cd98f504f92a | Analyze and fix the following issue in the Linux kernel code: thp: pte alloc trans splitting | Problem Details:
pte alloc routines must wait for split_huge_page if the pmd is not present
and not null (i.e. pmd_trans_splitting). The additional branches are
optimized away at compile time by pmd_trans_splitting if the config option
is off. However we must pass the vma down in order to know the anon_vma
lock to w... | ```diff
diff --git a/arch/arm/mm/pgd.c b/arch/arm/mm/pgd.c
index 93292a18cf77..709244c66fa3 100644
--- a/arch/arm/mm/pgd.c
+++ b/arch/arm/mm/pgd.c
@@ -50,7 +50,7 @@ pgd_t *pgd_alloc(struct mm_struct *mm)
if (!new_pmd)
goto no_pmd;
- new_pte = pte_alloc_map(mm, new_pmd, 0);
+ new_pte = pte_alloc_map(mm, NULL,... |
4e9f64c42d0ba5eb0c78569435ada4c224332ce4 | Analyze and fix the following issue in the Linux kernel code: thp: fix bad_page to show the real reason the page is bad | Problem Details:
page_count shows the count of the head page, but the actual check is done
on the tail page, so show what is really being checked.
Signed-off-by: Andrea Arcangeli <aarcange@redhat.com>
Acked-by: Rik van Riel <riel@redhat.com>
Acked-by: Mel Gorman <mel@csn.ul.ie>
Reviewed-by: KOSAKI Motohiro <kosaki.mot... | ```diff
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index c18d1f7cff84..2a67c3bd403a 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -5618,7 +5618,7 @@ void dump_page(struct page *page)
{
printk(KERN_ALERT
"page:%p count:%d mapcount:%d mapping:%p index:%#lx\n",
- page, page_count(page), page_mapco... |
240c879f20a605346705be24253bc9fc6fa8a106 | Analyze and fix the following issue in the Linux kernel code: writeback: avoid unnecessary determine_dirtyable_memory call | Problem Details:
I think determine_dirtyable_memory() is a rather costly function since it
need many atomic reads for gathering zone/global page state. But when we
use vm_dirty_bytes && dirty_background_bytes, we don't need that costly
calculation.
This patch eliminates such unnecessary overhead.
NOTE : newly added ... | ```diff
diff --git a/mm/page-writeback.c b/mm/page-writeback.c
index 28763b8bdbdd..2cb01f6ec5d0 100644
--- a/mm/page-writeback.c
+++ b/mm/page-writeback.c
@@ -410,9 +410,12 @@ void global_dirty_limits(unsigned long *pbackground, unsigned long *pdirty)
{
unsigned long background;
unsigned long dirty;
- unsigned lon... |
ecb256f815232b35ae8382cff36ca8ce0bbd077e | Analyze and fix the following issue in the Linux kernel code: mm: set correct numa_zonelist_order string when configured on the kernel command line | Problem Details:
When numa_zonelist_order parameter is set to "node" or "zone" on the
command line it's still showing as "default" in sysctl. That's because
early_param parsing function changes only user_zonelist_order variable.
Fix this by copying user-provided string to numa_zonelist_order if it was
successfully par... | ```diff
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index c31460918506..c18d1f7cff84 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -2631,9 +2631,16 @@ static int __parse_numa_zonelist_order(char *s)
static __init int setup_numa_zonelist_order(char *s)
{
- if (s)
- return __parse_numa_zonelist_order(s);
... |
355b09c47a0cbb73b3e65a57c03f157f2e7ddb0b | Analyze and fix the following issue in the Linux kernel code: mm: kswapd: treat zone->all_unreclaimable in sleeping_prematurely similar to balance_pgdat() | Problem Details:
After DEF_PRIORITY, balance_pgdat() considers all_unreclaimable zones to
be balanced but sleeping_prematurely does not. This can force kswapd to
stay awake longer than it should. This patch fixes it.
Signed-off-by: Mel Gorman <mel@csn.ul.ie>
Reviewed-by: Eric B Munson <emunson@mgebm.net>
Cc: Minchan... | ```diff
diff --git a/mm/vmscan.c b/mm/vmscan.c
index dafb9d91b604..388a0447b8e8 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -2244,8 +2244,16 @@ static bool sleeping_prematurely(pg_data_t *pgdat, int order, long remaining)
if (!populated_zone(zone))
continue;
- if (zone->all_unreclaimable)
+ /*
+ * balanc... |
9950474883e027e6e728cbcff25f7f2bf0c96530 | Analyze and fix the following issue in the Linux kernel code: mm: kswapd: stop high-order balancing when any suitable zone is balanced | Problem Details:
Simon Kirby reported the following problem
We're seeing cases on a number of servers where cache never fully
grows to use all available memory. Sometimes we see servers with 4 GB
of memory that never seem to have less than 1.5 GB free, even with a
constantly-active VM. In some cases, the... | ```diff
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
index 48906629335c..dad3612a7e39 100644
--- a/include/linux/mmzone.h
+++ b/include/linux/mmzone.h
@@ -639,6 +639,7 @@ typedef struct pglist_data {
wait_queue_head_t kswapd_wait;
struct task_struct *kswapd;
int kswapd_max_order;
+ enum zone_type ... |
77f1fe6b08b13a87391549c8a820ddc817b6f50e | Analyze and fix the following issue in the Linux kernel code: mm: migration: allow migration to operate asynchronously and avoid synchronous compaction in the faster path | Problem Details:
Migration synchronously waits for writeback if the initial passes fails.
Callers of memory compaction do not necessarily want this behaviour if the
caller is latency sensitive or expects that synchronous migration is not
going to have a significantly better success rate.
This patch adds a sync paramet... | ```diff
diff --git a/include/linux/compaction.h b/include/linux/compaction.h
index 2592883d862d..72cba4034785 100644
--- a/include/linux/compaction.h
+++ b/include/linux/compaction.h
@@ -21,10 +21,11 @@ extern int sysctl_extfrag_handler(struct ctl_table *table, int write,
extern int fragmentation_index(struct zone *... |
3e7d344970673c5334cf7b5bb27c8c0942b06126 | Analyze and fix the following issue in the Linux kernel code: mm: vmscan: reclaim order-0 and use compaction instead of lumpy reclaim | Problem Details:
Lumpy reclaim is disruptive. It reclaims a large number of pages and
ignores the age of the pages it reclaims. This can incur significant
stalls and potentially increase the number of major faults.
Compaction has reached the point where it is considered reasonably stable
(meaning it has passed a lot... | ```diff
diff --git a/include/linux/compaction.h b/include/linux/compaction.h
index 5ac51552d908..2592883d862d 100644
--- a/include/linux/compaction.h
+++ b/include/linux/compaction.h
@@ -22,6 +22,9 @@ extern int sysctl_extfrag_handler(struct ctl_table *table, int write,
extern int fragmentation_index(struct zone *zone... |
c32b0d4b3f19c2f5d29568f8b7b72b61693f1277 | Analyze and fix the following issue in the Linux kernel code: fs/mpage.c: consolidate code | Problem Details:
Merge mpage_end_io_read() and mpage_end_io_write() into mpage_end_io() to
eliminate code duplication.
[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Hai Shan <shan.hai@windriver.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-... | ```diff
diff --git a/fs/mpage.c b/fs/mpage.c
index fd56ca2ea556..d78455a81ec9 100644
--- a/fs/mpage.c
+++ b/fs/mpage.c
@@ -40,7 +40,7 @@
* status of that page is hard. See end_buffer_async_read() for the details.
* There is no point in duplicating all that complexity.
*/
-static void mpage_end_io_read(struct bio... |
c3f0da631539b3b8e17f6dda567af9958d49d14f | Analyze and fix the following issue in the Linux kernel code: mm/page-writeback.c: fix __set_page_dirty_no_writeback() return value | Problem Details:
__set_page_dirty_no_writeback() should return true if it actually
transitioned the page from a clean to dirty state although it seems nobody
uses its return value at present.
Signed-off-by: Bob Liu <lliubbo@gmail.com>
Acked-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Andrew Morton <akpm@l... | ```diff
diff --git a/mm/page-writeback.c b/mm/page-writeback.c
index b5d8a1f820a0..28763b8bdbdd 100644
--- a/mm/page-writeback.c
+++ b/mm/page-writeback.c
@@ -1103,7 +1103,7 @@ EXPORT_SYMBOL(write_one_page);
int __set_page_dirty_no_writeback(struct page *page)
{
if (!PageDirty(page))
- SetPageDirty(page);
+ retur... |
c691b9d983d7015d54057034f4cd9b6d8affd976 | Analyze and fix the following issue in the Linux kernel code: sync_inode_metadata: fix comment | Problem Details:
Use correct function name, remove incorrect apostrophe
Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | ```diff
diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c
index e8063c938dd2..05aab263e9aa 100644
--- a/fs/fs-writeback.c
+++ b/fs/fs-writeback.c
@@ -1303,11 +1303,11 @@ int sync_inode(struct inode *inode, struct writeback_control *wbc)
EXPORT_SYMBOL(sync_inode);
/**
- * sync_inode - write an inode to disk
+ * syn... |
b9543dac5bbc4aef0a598965b6b34f6259ab9a9b | Analyze and fix the following issue in the Linux kernel code: writeback: avoid livelocking WB_SYNC_ALL writeback | Problem Details:
When wb_writeback() is called in WB_SYNC_ALL mode, work->nr_to_write is
usually set to LONG_MAX. The logic in wb_writeback() then calls
__writeback_inodes_sb() with nr_to_write == MAX_WRITEBACK_PAGES and we
easily end up with non-positive nr_to_write after the function returns, if
the inode has more t... | ```diff
diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c
index 9e72d04e706e..e8063c938dd2 100644
--- a/fs/fs-writeback.c
+++ b/fs/fs-writeback.c
@@ -630,6 +630,7 @@ static long wb_writeback(struct bdi_writeback *wb,
};
unsigned long oldest_jif;
long wrote = 0;
+ long write_chunk;
struct inode *inode;
if (... |
88f5acf88ae6a9778f6d25d0d5d7ec2d57764a97 | Analyze and fix the following issue in the Linux kernel code: mm: page allocator: adjust the per-cpu counter threshold when memory is low | Problem Details:
Commit aa45484 ("calculate a better estimate of NR_FREE_PAGES when memory
is low") noted that watermarks were based on the vmstat NR_FREE_PAGES. To
avoid synchronization overhead, these counters are maintained on a per-cpu
basis and drained both periodically and when a threshold is above a
threshold. ... | ```diff
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
index 39c24ebe9cfd..48906629335c 100644
--- a/include/linux/mmzone.h
+++ b/include/linux/mmzone.h
@@ -458,12 +458,6 @@ static inline int zone_is_oom_locked(const struct zone *zone)
return test_bit(ZONE_OOM_LOCKED, &zone->flags);
}
-#ifdef CONFIG_... |
5dfbd1d734ef5415bc47b034df7433ba21e40e7b | Analyze and fix the following issue in the Linux kernel code: atmel_serial: fix RTS high after initialization in RS485 mode | Problem Details:
When working in RS485 mode, the atmel_serial driver keeps RTS high after
the initialization of the serial port. It goes low only after the first
character has been sent.
[akpm@linux-foundation.org: simplify code]
Signed-off-by: Claudio Scordino <claudio@evidence.eu.com>
Signed-off-by: Arkadiusz Bubal... | ```diff
diff --git a/drivers/serial/atmel_serial.c b/drivers/serial/atmel_serial.c
index 3892666b5fbd..2a1d52fb4936 100644
--- a/drivers/serial/atmel_serial.c
+++ b/drivers/serial/atmel_serial.c
@@ -1732,6 +1732,11 @@ static int __devinit atmel_serial_probe(struct platform_device *pdev)
device_init_wakeup(&pdev->dev,... |
6254b32b5791e47ba1c679d023f26985fa34755a | Analyze and fix the following issue in the Linux kernel code: ecryptfs: fix broken build | Problem Details:
Stephen Rothwell reports that the vfs merge broke the build of ecryptfs.
The breakage comes from commit 66cb76666d69 ("sanitize ecryptfs
->mount()") which was obviously not even build tested. Tssk, tssk, Al.
This is the minimal build fixup for the situation, although I don't have
a filesystem to actua... | ```diff
diff --git a/fs/ecryptfs/main.c b/fs/ecryptfs/main.c
index 9ed476906327..d3b28abdd6aa 100644
--- a/fs/ecryptfs/main.c
+++ b/fs/ecryptfs/main.c
@@ -141,13 +141,12 @@ int ecryptfs_init_persistent_file(struct dentry *ecryptfs_dentry)
return rc;
}
-static inode *ecryptfs_get_inode(struct inode *lower_inode,
+s... |
17db143fc091238c43ab9f373974ca2224a4c3f8 | Analyze and fix the following issue in the Linux kernel code: ceph: fix xattr rbtree search | Problem Details:
Fix xattr name comparison in rbtree search for strings that share a prefix.
The *name argument is null terminated, but the xattr name is not, so we
need to use strncmp, but that means adjusting for the case where name is
a prefix of xattr->name.
The corresponding case in __set_xattr() already handles ... | ```diff
diff --git a/fs/ceph/xattr.c b/fs/ceph/xattr.c
index 6e12a6ba5f79..8c9eba6ef9df 100644
--- a/fs/ceph/xattr.c
+++ b/fs/ceph/xattr.c
@@ -219,6 +219,7 @@ static struct ceph_inode_xattr *__get_xattr(struct ceph_inode_info *ci,
struct rb_node **p;
struct rb_node *parent = NULL;
struct ceph_inode_xattr *xattr =... |
1c1266bb916e6a6b362d3be95f2cc7f3c41277a6 | Analyze and fix the following issue in the Linux kernel code: ceph: fix getattr on directory when using norbytes | Problem Details:
The norbytes mount option was broken, and when doing getattr
on a directory it return the rbytes instead of the number of
entities. This commit fixes it.
Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
Signed-off-by: Sage Weil <sage@newdream.net> | ```diff
diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c
index e791fa34b23d..50001de66c69 100644
--- a/fs/ceph/inode.c
+++ b/fs/ceph/inode.c
@@ -701,10 +701,6 @@ static int fill_inode(struct inode *inode,
ci->i_ceph_flags |= CEPH_I_COMPLETE;
ci->i_max_offset = 2;
}
-
- /* it may be better to set st_size in ge... |
40c1001792de63e0f90e977eb05393fd71f78692 | Analyze and fix the following issue in the Linux kernel code: trusted-keys: free memory bugfix | Problem Details:
Add missing kfree(td) in tpm_seal() before the return, freeing
td on error paths as well.
Reported-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Mimi Zohar <zohar@us.ibm.com>
Acked-by: David Safford <safford@watson.ibm.com>
Acked-by: David Howells <dhowells@redhat.com>
Signed-off-by: Serge Hall... | ```diff
diff --git a/security/keys/trusted_defined.c b/security/keys/trusted_defined.c
index 975e9f29a52c..932f8687df16 100644
--- a/security/keys/trusted_defined.c
+++ b/security/keys/trusted_defined.c
@@ -511,7 +511,7 @@ static int tpm_seal(struct tpm_buf *tb, uint16_t keytype,
/* get session for sealing key */
r... |
09579770dcb8769f4f61046dcd01cc758cfa6d91 | Analyze and fix the following issue in the Linux kernel code: [IA64] fix build error - arch/ia64/kernel/perfmon.c | Problem Details:
arch/ia64/kernel/perfmon.c:621: error: duplicate 'static'
Introduced by commit c74a1cbb3cac348f276fabc381758f5b0b4713b2
pass default dentry_operations to mount_pseudo()
Signed-off-by: Tony Luck <tony.luck@intel.com> | ```diff
diff --git a/arch/ia64/kernel/perfmon.c b/arch/ia64/kernel/perfmon.c
index ac76da099a6d..89accc626b86 100644
--- a/arch/ia64/kernel/perfmon.c
+++ b/arch/ia64/kernel/perfmon.c
@@ -618,7 +618,7 @@ pfm_get_unmapped_area(struct file *file, unsigned long addr, unsigned long len,
}
/* forward declaration */
-stat... |
df6212529c646710502657b18d8f42927f3dda81 | Analyze and fix the following issue in the Linux kernel code: tty: update MAINTAINERS file due to driver movement | Problem Details:
This fixes up the MAINTAINERS file due to moving the serial
drivers to the drivers/tty/ directory.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ```diff
diff --git a/MAINTAINERS b/MAINTAINERS
index 78162c4f9544..fd05bb773494 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -162,7 +162,7 @@ L: linux-serial@vger.kernel.org
W: http://serial.sourceforge.net
S: Maintained
T: git git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6.git
-F: drivers/serial/8250... |
bd1689cd7566d35520e66acace790bf7b7fdc34c | Analyze and fix the following issue in the Linux kernel code: ARM: mach-shmobile: fix cpu_base of gic_init() on sh73a0 | Problem Details:
The latest rmobile-latest doesn't run on ag5evm because of a
small mistake on initialization.
Though, I don't have any idea to write them smart.
anyway,
On sh73a0, GIC cpu_base is 0xf0000100 but 0xf0001000.
Signed-off-by: Takashi YOSHII <takashi.yoshii.zj@renesas.com>
Signed-off-by: Paul Mundt <letha... | ```diff
diff --git a/arch/arm/mach-shmobile/intc-sh73a0.c b/arch/arm/mach-shmobile/intc-sh73a0.c
index 322d8d57cbcf..5d0e1503ece6 100644
--- a/arch/arm/mach-shmobile/intc-sh73a0.c
+++ b/arch/arm/mach-shmobile/intc-sh73a0.c
@@ -252,10 +252,11 @@ static irqreturn_t sh73a0_intcs_demux(int irq, void *dev_id)
void __init... |
bf2cb0dab8c97f00a71875d9b13dbac17a2f47ca | Analyze and fix the following issue in the Linux kernel code: md: Fix removal of extra drives when converting RAID6 to RAID5 | Problem Details:
When a RAID6 is converted to a RAID5, the extra drive should
be discarded. However it isn't due to a typo in a comparison.
This bug was introduced in commit e93f68a1fc6 in 2.6.35-rc4
and is suitable for any -stable since than.
As the extra drive is not removed, the 'degraded' counter is wrong and
so... | ```diff
diff --git a/drivers/md/md.c b/drivers/md/md.c
index 665851308818..3194a80f3620 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -3126,7 +3126,7 @@ level_store(mddev_t *mddev, const char *buf, size_t len)
char nm[20];
if (rdev->raid_disk < 0)
continue;
- if (rdev->new_raid_disk > mddev->raid_dis... |
13ae864bc86ff65547ffe7e966b6433a0d0edb8a | Analyze and fix the following issue in the Linux kernel code: md: fix sync_completed reporting for very large drives (>2TB) | Problem Details:
The values exported in the sync_completed file are unsigned long, which
overflows with very large drives, resulting in wrong values reported.
Since sync_completed uses sectors as unit, we'll start getting wrong
values with components larger than 2TB.
This patch simply replaces the use of unsigned lon... | ```diff
diff --git a/drivers/md/md.c b/drivers/md/md.c
index dd64ad30a0fe..5e3714fecee9 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -3918,7 +3918,7 @@ static struct md_sysfs_entry md_sync_speed = __ATTR_RO(sync_speed);
static ssize_t
sync_completed_show(mddev_t *mddev, char *page)
{
- unsigned long max_sec... |
43c73ca43b3e03bb228ff9350b6b44d0e560f262 | Analyze and fix the following issue in the Linux kernel code: md/raid5: use sysfs_notify_dirent_safe to avoid NULL pointer | Problem Details:
With the module parameter 'start_dirty_degraded' set,
raid5_spare_active() previously called sysfs_notify_dirent() with a NULL
argument (rdev->sysfs_state) when a rebuild finished.
Signed-off-by: Jonathan Brassow <jbrassow@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com> | ```diff
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
index 316fbe79389a..9212c077095c 100644
--- a/drivers/md/raid5.c
+++ b/drivers/md/raid5.c
@@ -5338,7 +5338,7 @@ static int raid5_spare_active(mddev_t *mddev)
&& !test_bit(Faulty, &tmp->rdev->flags)
&& !test_and_set_bit(In_sync, &tmp->rdev->flags... |
0ca69886a8273ac1350143d562280bfcbe4760dc | Analyze and fix the following issue in the Linux kernel code: md: Ensure no IO request to get md device before it is properly initialised. | Problem Details:
When an md device is in the process of coming on line it is possible
for an IO request (typically a partition table probe) to get through
before the array is fully initialised, which can cause unexpected
behaviour (e.g. a crash).
So explicitly record when the array is ready for IO and don't allow IO
t... | ```diff
diff --git a/drivers/md/md.c b/drivers/md/md.c
index a3019121dc57..540347c538f9 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -288,10 +288,12 @@ static int md_make_request(struct request_queue *q, struct bio *bio)
int rv;
int cpu;
- if (mddev == NULL || mddev->pers == NULL) {
+ if (mddev == NULL |... |
067032bc628598606056412594042564fcf09e22 | Analyze and fix the following issue in the Linux kernel code: md: Fix single printks with multiple KERN_<level>s | Problem Details:
Noticed-by: Russell King <linux@arm.linux.org.uk>
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: NeilBrown <neilb@suse.de> | ```diff
diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c
index 845cf95b612c..d50056ba596b 100644
--- a/drivers/md/raid1.c
+++ b/drivers/md/raid1.c
@@ -1027,8 +1027,9 @@ static void error(mddev_t *mddev, mdk_rdev_t *rdev)
} else
set_bit(Faulty, &rdev->flags);
set_bit(MD_CHANGE_DEVS, &mddev->flags);
- printk(K... |
6c9879101442b08581e8a0e3ae6b7f643a78fd63 | Analyze and fix the following issue in the Linux kernel code: md: fix regression resulting in delays in clearing bits in a bitmap | Problem Details:
commit 589a594be1fb (2.6.37-rc4) fixed a problem were md_thread would
sometimes call the ->run function at a bad time.
If an error is detected during array start up after the md_thread has
been started, the md_thread is killed. This resulted in the ->run
function being called once. However the array... | ```diff
diff --git a/drivers/md/md.c b/drivers/md/md.c
index 0da25daea9be..a3019121dc57 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -6042,7 +6042,8 @@ static int md_thread(void * arg)
|| kthread_should_stop(),
thread->timeout);
- if (test_and_clear_bit(THREAD_WAKEUP, &thread->flags))
+ clear_bit... |
695b83495e2fba9d3a883193cfc9d5eefa96a911 | Analyze and fix the following issue in the Linux kernel code: IB/srp: Test only once whether iu allocation succeeded | Problem Details:
Merge the two tests in srp_queuecommand() of whether information unit
allocation succeeded into one. An intended side effect of this change
is that we fix the warning:
drivers/infiniband/ulp/srp/ib_srp.c: In function 'srp_queuecommand':
drivers/infiniband/ulp/srp/ib_srp.c:1116: warning: 'req'... | ```diff
diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c
index 4b62105ed1e8..b28c2b9db26b 100644
--- a/drivers/infiniband/ulp/srp/ib_srp.c
+++ b/drivers/infiniband/ulp/srp/ib_srp.c
@@ -1132,15 +1132,12 @@ static int srp_queuecommand(struct Scsi_Host *shost, struct scsi_cmnd *scmnd)... |
ed7809d9c41b514115ddffaa860694393c2016b3 | Analyze and fix the following issue in the Linux kernel code: batman-adv: Even Batman should not dereference NULL pointers | Problem Details:
There's a problem in net/batman-adv/unicast.c::frag_send_skb().
dev_alloc_skb() allocates memory and may fail, thus returning NULL. If
this happens we'll pass a NULL pointer on to skb_split() which in turn
hands it to skb_split_inside_header() from where it gets passed to
skb_put() that lets skb_tail_p... | ```diff
diff --git a/net/batman-adv/unicast.c b/net/batman-adv/unicast.c
index dc2e28bed844..ee41fef04b21 100644
--- a/net/batman-adv/unicast.c
+++ b/net/batman-adv/unicast.c
@@ -229,10 +229,12 @@ int frag_send_skb(struct sk_buff *skb, struct bat_priv *bat_priv,
if (!bat_priv->primary_if)
goto dropped;
- unicast... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.