id stringlengths 40 40 | instruction stringlengths 68 308 | input stringlengths 17 33.4k | output stringlengths 100 30k |
|---|---|---|---|
f62388187207bea83f1865d507bf892a1f9152c3 | Analyze and fix the following issue in the Linux kernel code: mm: fix off-by-one bug in print_nodes_state() | Problem Details:
/sys/devices/system/node/{online,possible} outputs a garbage byte
because print_nodes_state() returns content size + 1. To fix the bug,
the patch changes the use of cpuset_sprintf_cpulist to follow the use at
other places, which is clearer and safer.
This bug was introduced in v2.6.24 (commit bde631a... | ```diff
diff --git a/drivers/base/node.c b/drivers/base/node.c
index 90aa2a11a933..af1a177216f1 100644
--- a/drivers/base/node.c
+++ b/drivers/base/node.c
@@ -592,11 +592,9 @@ static ssize_t print_nodes_state(enum node_states state, char *buf)
{
int n;
- n = nodelist_scnprintf(buf, PAGE_SIZE, node_states[state]);
... |
08fa29d916c6e271ad13978cd993e7238c68db97 | Analyze and fix the following issue in the Linux kernel code: mm: fix NULL ptr deref when walking hugepages | Problem Details:
A missing validation of the value returned by find_vma() could cause a
NULL ptr dereference when walking the pagetable.
This is triggerable from usermode by a simple user by trying to read a
page info out of /proc/pid/pagemap which doesn't exist.
Introduced by commit 025c5b2451e4 ("thp: optimize away... | ```diff
diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
index 1030a716d155..7faaf2acc570 100644
--- a/fs/proc/task_mmu.c
+++ b/fs/proc/task_mmu.c
@@ -784,7 +784,7 @@ static int pagemap_pte_range(pmd_t *pmd, unsigned long addr, unsigned long end,
/* find the first VMA at or above 'addr' */
vma = find_vma(walk... |
af2e840971dee21ba9b87e9ecee7d5cc6109baaa | Analyze and fix the following issue in the Linux kernel code: pagemap.h: fix warning about possibly used before init var | Problem Details:
Commit f56f821feb7b ("mm: extend prefault helpers to fault in more than
PAGE_SIZE") added in the new functions: fault_in_multipages_writeable()
and fault_in_multipages_readable().
However, we currently see:
include/linux/pagemap.h:492: warning: 'ret' may be used uninitialized in this function
inc... | ```diff
diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h
index efa26b4da8d2..7cfad3bbb0cc 100644
--- a/include/linux/pagemap.h
+++ b/include/linux/pagemap.h
@@ -460,11 +460,11 @@ static inline int fault_in_pages_readable(const char __user *uaddr, int size)
*/
static inline int fault_in_multipages_write... |
79fba9f51755c704c0a7d7b7f0df10874dc0a744 | Analyze and fix the following issue in the Linux kernel code: net: sh_eth: fix the rxdesc pointer when rx descriptor empty happens | Problem Details:
When Receive Descriptor Empty happens, rxdesc pointer of the driver
and actual next descriptor of the controller may be mismatch.
This patch fixes it.
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/drivers/net/ethernet/renesas/sh_eth.c b/drivers/net/ethernet/renesas/sh_eth.c
index be3c22179161..667169b82526 100644
--- a/drivers/net/ethernet/renesas/sh_eth.c
+++ b/drivers/net/ethernet/renesas/sh_eth.c
@@ -1101,8 +1101,12 @@ static int sh_eth_rx(struct net_device *ndev)
/* Restart Rx engine... |
c51ce49735c183ef2592db70f918ee698716276b | Analyze and fix the following issue in the Linux kernel code: l2tp: fix oops in L2TP IP sockets for connect() AF_UNSPEC case | Problem Details:
An application may call connect() to disconnect a socket using an
address with family AF_UNSPEC. The L2TP IP sockets were not handling
this case when the socket is not bound and an attempt to connect()
using AF_UNSPEC in such cases would result in an oops. This patch
addresses the problem by protecting... | ```diff
diff --git a/net/l2tp/l2tp_ip.c b/net/l2tp/l2tp_ip.c
index 889f5d13d7ba..70614e7affab 100644
--- a/net/l2tp/l2tp_ip.c
+++ b/net/l2tp/l2tp_ip.c
@@ -239,9 +239,16 @@ static int l2tp_ip_bind(struct sock *sk, struct sockaddr *uaddr, int addr_len)
{
struct inet_sock *inet = inet_sk(sk);
struct sockaddr_l2tpip *... |
804eaf29bac4148aa265bedc62182ed41a4c6120 | Analyze and fix the following issue in the Linux kernel code: RDMA/ocrdma: Fix signaled event for SRQ_LIMIT_REACHED | Problem Details:
Signed-off-by: Parav Pandit <parav.pandit@emulex.com>
Signed-off-by: Roland Dreier <roland@purestorage.com> | ```diff
diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_hw.c b/drivers/infiniband/hw/ocrdma/ocrdma_hw.c
index f26314fd5f6e..9343a1522977 100644
--- a/drivers/infiniband/hw/ocrdma/ocrdma_hw.c
+++ b/drivers/infiniband/hw/ocrdma/ocrdma_hw.c
@@ -732,7 +732,7 @@ static void ocrdma_dispatch_ibevent(struct ocrdma_dev *dev,
... |
e49e6ff553ffee2e747a8e331a9dcf3a80555944 | Analyze and fix the following issue in the Linux kernel code: sparc: fix sparc64 build due to leon.h inclusion | Problem Details:
Stephen Rothwell <sfr@canb.auug.org.au> reported following error:
In file included from arch/sparc/kernel/prom_common.c:26:0:
arch/sparc/include/asm/leon.h:221:9: error: unknown type name 'irq_flow_handler_t'
arch/sparc/include/asm/leon.h:224:10: error: unknown type name 'irq_flow_handler_t'
Fix this ... | ```diff
diff --git a/arch/sparc/include/asm/leon.h b/arch/sparc/include/asm/leon.h
index ba46083ee42e..3375c6293893 100644
--- a/arch/sparc/include/asm/leon.h
+++ b/arch/sparc/include/asm/leon.h
@@ -213,6 +213,7 @@ struct leon3_cacheregs {
unsigned long dccr; /* 0x0c - Data Cache Configuration Register */
};
+#inc... |
1ddb22e13dea3f9511c8e934331e1e44b666bc79 | Analyze and fix the following issue in the Linux kernel code: sparc32,leon: fix leon bootup | Problem Details:
head_32.S failed to set cputypval for leon, causing boot to fail.
The boot failed because we failed to recognize this was a LEON
cpu so we did not preoperly run-time patch the the kernel.
This resulted in an early crash.
Reported-by: Daniel Hellstrom <daniel@gaisler.com>
Tested-by: Daniel Hellstrom <d... | ```diff
diff --git a/arch/sparc/kernel/head_32.S b/arch/sparc/kernel/head_32.S
index cdc7f29ba17b..5364a05177c2 100644
--- a/arch/sparc/kernel/head_32.S
+++ b/arch/sparc/kernel/head_32.S
@@ -372,36 +372,9 @@ execute_in_high_mem:
sethi %hi(linux_dbvec), %g1
st %o1, [%g1 + %lo(linux_dbvec)]
- /* Check if this is... |
38c92fff988d518fe80dc23d0d44d66bd7e47ddd | Analyze and fix the following issue in the Linux kernel code: ACPI / PM: Make __acpi_bus_get_power() cover D3cold correctly | Problem Details:
After recent changes of the ACPI device power states definitions, if
power resources are not used for the device's power management, the
state returned by __acpi_bus_get_power() cannot exceed D3hot, because
the return values of _PSC are 0 through 3. However, if the _PR3
method is not present for the d... | ```diff
diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c
index a41be56c1cc0..adceafda9c17 100644
--- a/drivers/acpi/bus.c
+++ b/drivers/acpi/bus.c
@@ -202,37 +202,44 @@ static const char *state_string(int state)
static int __acpi_bus_get_power(struct acpi_device *device, int *state)
{
- int result = 0;
- acpi_s... |
63a1a765dffb1e59d82c7948638e56d5f4f2e3a1 | Analyze and fix the following issue in the Linux kernel code: ACPI / PM: Fix error messages in drivers/acpi/bus.c | Problem Details:
After recent changes of the ACPI device low-power states definitions
kernel messages in drivers/acpi/bus.c need to be updated so that they
include the correct names of the states in question (currently is
"D3" for D3hot and "D4" for D3cold, which is incorrect).
Signed-off-by: Rafael J. Wysocki <rjw@si... | ```diff
diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c
index 3188da3df8da..a41be56c1cc0 100644
--- a/drivers/acpi/bus.c
+++ b/drivers/acpi/bus.c
@@ -182,6 +182,24 @@ EXPORT_SYMBOL(acpi_bus_get_private_data);
Power Management
---------------------------------------------------... |
7b21aea04d084916ac4e0e8852dcc9cd60ec0d1d | Analyze and fix the following issue in the Linux kernel code: mac80211: fix ADDBA declined after suspend with wowlan | Problem Details:
WLAN_STA_BLOCK_BA is set while suspending but doesn't get cleared
when resuming in case of wowlan. This causes further ADDBA requests
received to be rejected. Fix it by clearing it in the wowlan path
as well.
Signed-off-by: Eyal Shapira <eyal@wizery.com>
Reviewed-by: Johannes Berg <johannes@sipsolutio... | ```diff
diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index 22f2216b397e..a44c6807df01 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -1371,6 +1371,12 @@ int ieee80211_reconfig(struct ieee80211_local *local)
}
}
+ /* add back keys */
+ list_for_each_entry(sdata, &local->interfaces, list)
... |
4161923a2410e8d0dd04ebbf93dde46552c07492 | Analyze and fix the following issue in the Linux kernel code: wlcore: fix undefined symbols when CONFIG_PM is not defined | Problem Details:
commit c21eebb50379a96e1335e933583dcd5b455c6b64
"wl12xx: add RX filters ACX commands" breaks the build
when CONFIG_PM isn't defined:
ERROR: "wl1271_rx_filter_get_fields_size"
[drivers/net/wireless/ti/wlcore/wlcore.ko] undefined!
ERROR: "wl1271_rx_filter_flatten_fields"
[drivers/net/wireless/ti/wlcore/... | ```diff
diff --git a/drivers/net/wireless/ti/wlcore/acx.c b/drivers/net/wireless/ti/wlcore/acx.c
index 509aa881d790..f3d6fa508269 100644
--- a/drivers/net/wireless/ti/wlcore/acx.c
+++ b/drivers/net/wireless/ti/wlcore/acx.c
@@ -1715,6 +1715,7 @@ out:
}
+#ifdef CONFIG_PM
/* Set the global behaviour of RX filters - ... |
c26a0e105cf11fa482116cc59a7c6cd9c01dd61b | Analyze and fix the following issue in the Linux kernel code: mac80211: fix flag check for QoS NOACK frames | Problem Details:
Signed-off-by: Claudio Pisa <claudio.pisa@uniroma2.it>
Signed-off-by: John W. Linville <linville@tuxdriver.com> | ```diff
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 5f827a6b0d8d..847215bb2a6f 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -153,7 +153,7 @@ static __le16 ieee80211_duration(struct ieee80211_tx_data *tx,
/* Don't calculate ACKs for QoS Frames with NoAck Policy set */
if (ieee80211_is_dat... |
5a71f134026b17d4000e54c2a5a5ab4e4189f53c | Analyze and fix the following issue in the Linux kernel code: ath9k_hw: update AR933x initvals to fix issues with high power devices | Problem Details:
"> Can you provide more information about the issues with high power devices?
Tx being flakey and Rx not working at all."
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com> | ```diff
diff --git a/drivers/net/wireless/ath/ath9k/ar9330_1p1_initvals.h b/drivers/net/wireless/ath/ath9k/ar9330_1p1_initvals.h
index f11d9b2677fd..1bd3a3d22101 100644
--- a/drivers/net/wireless/ath/ath9k/ar9330_1p1_initvals.h
+++ b/drivers/net/wireless/ath/ath9k/ar9330_1p1_initvals.h
@@ -1,5 +1,6 @@
/*
- * Copyright... |
81357a281dcc454841532c46b30e6f2ba12b73ea | Analyze and fix the following issue in the Linux kernel code: ath9k: fix a use-after-free-bug when ath_tx_setup_buffer() fails | Problem Details:
ath_tx_setup_buffer() can fail if there is no ath_buf left, or if mapping DMA
failed. In this case it frees the skb passed to it.
If ath_tx_setup_buffer is called from ath_tx_form_aggr, the skb is still
linked into the tid buffer list and must be dequeued before being released.
Signed-off-by: Felix Fi... | ```diff
diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c
index 23eaa1b26ebe..d59dd01d6cde 100644
--- a/drivers/net/wireless/ath/ath9k/xmit.c
+++ b/drivers/net/wireless/ath/ath9k/xmit.c
@@ -64,7 +64,8 @@ static void ath_tx_update_baw(struct ath_softc *sc, struct ath_atx_tid *tid... |
8f6576ad476b2a22d05ddafd2ddaee102577a4ed | Analyze and fix the following issue in the Linux kernel code: tty: fix ldisc lock inversion trace | Problem Details:
This is caused by tty_release using tty_lock_pair to lock both sides of
the pty/tty pair, and then tty_ldisc_release dropping and relocking one
side only. We can drop both fine, so drop both to avoid any lock
ordering concerns.
Rework the release path to fix the new locking model.
Signed-off-by: Ala... | ```diff
diff --git a/drivers/tty/tty_ldisc.c b/drivers/tty/tty_ldisc.c
index 173a9000a6cb..ba8be396a621 100644
--- a/drivers/tty/tty_ldisc.c
+++ b/drivers/tty/tty_ldisc.c
@@ -894,6 +894,23 @@ int tty_ldisc_setup(struct tty_struct *tty, struct tty_struct *o_tty)
tty_ldisc_enable(tty);
return 0;
}
+
+static void tty... |
d3ca8b64b97ef4dc54d7bb0b88bbc01a1fca8cb9 | Analyze and fix the following issue in the Linux kernel code: pty: Fix lock inversion | Problem Details:
The ptmx_open path takes the tty and devpts locks in the wrong order
because tty_init_dev locks and returns a locked tty. As far as I can
tell this is actually safe anyway because the tty being returned is new
so nobody can get a reference to lock it at this point.
However we don't even need the devp... | ```diff
diff --git a/drivers/tty/pty.c b/drivers/tty/pty.c
index 59af3945ea85..65c7c62c7aae 100644
--- a/drivers/tty/pty.c
+++ b/drivers/tty/pty.c
@@ -633,7 +633,6 @@ static int ptmx_open(struct inode *inode, struct file *filp)
mutex_unlock(&devpts_mutex);
mutex_lock(&tty_mutex);
- mutex_lock(&devpts_mutex);
tt... |
f90da3c7a52ac0c8f07f4d6cd0a7f7677e831916 | Analyze and fix the following issue in the Linux kernel code: ARM: imx: only call l2x0_init if it's available | Problem Details:
This fixes a build failure with CONFIG_CACHE_L2X0=n:
arch/arm/mach-imx/built-in.o: In function `imx3_init_l2x0':
imx53-dt.c:(.init.text+0x190): undefined reference to `l2x0_init'
make[2]: *** [.tmp_vmlinux1] Error 1
make[1]: *** [sub-make] Error 2
make: *** [all] Error 2
When the l2 cache isn't ... | ```diff
diff --git a/arch/arm/mach-imx/mm-imx3.c b/arch/arm/mach-imx/mm-imx3.c
index 74127389e7ab..6a80496d72dc 100644
--- a/arch/arm/mach-imx/mm-imx3.c
+++ b/arch/arm/mach-imx/mm-imx3.c
@@ -81,6 +81,7 @@ static void __iomem *imx3_ioremap_caller(unsigned long phys_addr, size_t size,
void __init imx3_init_l2x0(void)
... |
c895305e806b4346006d3cfba2b432d52268ecd3 | Analyze and fix the following issue in the Linux kernel code: video: bfin_adv7393fb: Fix cleanup code | Problem Details:
This patch fixes the cleanup code of the bfin_adv7393_fb_probe
function.
1) The resources were not freed in the order that we allocated them
so we call dma_free_coherent() before it was allocated.
2) The labels weren't in the right place which also meant that we
freed resources that weren't allo... | ```diff
diff --git a/drivers/video/bfin_adv7393fb.c b/drivers/video/bfin_adv7393fb.c
index 1a268a294478..33ea874c87d2 100644
--- a/drivers/video/bfin_adv7393fb.c
+++ b/drivers/video/bfin_adv7393fb.c
@@ -414,14 +414,14 @@ static int __devinit bfin_adv7393_fb_probe(struct i2c_client *client,
if (ret) {
dev_err(&cl... |
cc4401142c1cbc63b01d6024cbc7a9f804cb3143 | Analyze and fix the following issue in the Linux kernel code: fb: handle NULL pointers in framebuffer release | Problem Details:
This function is called with a potential NULL pointer in
picolcd_init_framebuffer() and it causes a static checker warning. This
used to handle NULL pointers when the picolcd code was written, but a
couple months later we added the "info->apertures" dereference.
Signed-off-by: Dan Carpenter <dan.carp... | ```diff
diff --git a/drivers/video/fbsysfs.c b/drivers/video/fbsysfs.c
index 67afa9c2289d..a55e3669d135 100644
--- a/drivers/video/fbsysfs.c
+++ b/drivers/video/fbsysfs.c
@@ -80,6 +80,8 @@ EXPORT_SYMBOL(framebuffer_alloc);
*/
void framebuffer_release(struct fb_info *info)
{
+ if (!info)
+ return;
kfree(info->ape... |
df6a7072ac3213229c788913f25779e8ab93c9b5 | Analyze and fix the following issue in the Linux kernel code: ath6kl: Fix typo in htc mbox debug print msg | Problem Details:
Add missing ZERO (x%x to 0x%x) in the format specifier
while printing hex value in htc module.
Signed-off-by: Raja Mani <rmani@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com> | ```diff
diff --git a/drivers/net/wireless/ath/ath6kl/htc_mbox.c b/drivers/net/wireless/ath/ath6kl/htc_mbox.c
index 2798624d3a9d..cd0e1ba410d6 100644
--- a/drivers/net/wireless/ath/ath6kl/htc_mbox.c
+++ b/drivers/net/wireless/ath/ath6kl/htc_mbox.c
@@ -1309,7 +1309,7 @@ static int ath6kl_htc_rx_packet(struct htc_target *... |
1ebf169ad4dc68f18cc0dab35163b0f324fc6c41 | Analyze and fix the following issue in the Linux kernel code: drm/radeon: fix XFX quirk | Problem Details:
Only override the ddc bus if the connector doesn't have
a valid one. The existing code overrode the ddc bus for
all connectors even if it had ddc bus.
Fixes ddc on another XFX card with the same pci ids that
was broken by the quirk overwriting the correct ddc bus.
Reported-by: Mehdi Aqadjani Memar <... | ```diff
diff --git a/drivers/gpu/drm/radeon/radeon_atombios.c b/drivers/gpu/drm/radeon/radeon_atombios.c
index f6e69b8c06c6..b1e3820df363 100644
--- a/drivers/gpu/drm/radeon/radeon_atombios.c
+++ b/drivers/gpu/drm/radeon/radeon_atombios.c
@@ -444,7 +444,9 @@ static bool radeon_atom_apply_quirks(struct drm_device *dev,
... |
1f73cca799d29df80de3e8f1f1c488485467577a | Analyze and fix the following issue in the Linux kernel code: drm/radeon: fix typo in trinity tiling setup | Problem Details:
Using the wrong union.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com> | ```diff
diff --git a/drivers/gpu/drm/radeon/ni.c b/drivers/gpu/drm/radeon/ni.c
index b01c2dd627b0..ce4e7cc6c905 100644
--- a/drivers/gpu/drm/radeon/ni.c
+++ b/drivers/gpu/drm/radeon/ni.c
@@ -865,7 +865,7 @@ static void cayman_gpu_init(struct radeon_device *rdev)
/* num banks is 8 on all fusion asics. 0 = 4, 1 = 8, ... |
3ef7cf1839061b275ee1fc59c042194dc452b7e2 | Analyze and fix the following issue in the Linux kernel code: ARM: mx31_3ds: Fix build due to missing IMX_HAVE_PLATFORM_IMX_SSI | Problem Details:
commit 5fb86e5 (ARM: mx31_3ds: Add sound support) missed to select IMX_HAVE_PLATFORM_IMX_SSI,
which causes the following build error when only mx31_3ds is selected:
arch/arm/mach-imx/built-in.o: In function `mx31_3ds_init':
mach-mx31_3ds.c:(.init.text+0x15dc): undefined reference to `imx_add_imx_ssi'
... | ```diff
diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig
index 7561eca131b0..8abcee3c34d0 100644
--- a/arch/arm/mach-imx/Kconfig
+++ b/arch/arm/mach-imx/Kconfig
@@ -467,6 +467,7 @@ config MACH_MX31_3DS
select IMX_HAVE_PLATFORM_IMX2_WDT
select IMX_HAVE_PLATFORM_IMX_I2C
select IMX_HAVE_PLATFORM_IM... |
34a5704d91d6f8376a4c0a0143a1dd3eb3ccb37e | Analyze and fix the following issue in the Linux kernel code: mtd: nand: fix scan_read_raw_oob | Problem Details:
It seems there is a bug in scan_read_raw_oob() in nand_bbt.c which
should cause wrong functioning of NAND_BBT_SCANALLPAGES option.
Artem: the patch did not apply and I had to amend it a bit.
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Cc: stable@kernel.org | ```diff
diff --git a/drivers/mtd/nand/nand_bbt.c b/drivers/mtd/nand/nand_bbt.c
index 20a112f591fe..30d1319ff065 100644
--- a/drivers/mtd/nand/nand_bbt.c
+++ b/drivers/mtd/nand/nand_bbt.c
@@ -324,6 +324,7 @@ static int scan_read_raw_oob(struct mtd_info *mtd, uint8_t *buf, loff_t offs,
buf += mtd->oobsize + mtd->wri... |
52c2d9aad4923536c10d278e02da2e0254e46ee0 | Analyze and fix the following issue in the Linux kernel code: mtd: docg3 fix in-middle of blocks reads | Problem Details:
Corner case reads do not work, and return false data and
ECC. This case is typically seen in a ubifs usage, with a
read of type:
- docg3 docg3: doc_read_oob(from=14882415, mode=1,
data=(c30eca40:12), oob=( (null):0))
This results in the following reads:
- docg3 docg3: doc_read_data_area(buf= (nul... | ```diff
diff --git a/drivers/mtd/devices/docg3.c b/drivers/mtd/devices/docg3.c
index 65d22a0439c6..3dbbfa58251d 100644
--- a/drivers/mtd/devices/docg3.c
+++ b/drivers/mtd/devices/docg3.c
@@ -227,7 +227,7 @@ static void doc_read_data_area(struct docg3 *docg3, void *buf, int len,
u8 data8, *dst8;
doc_dbg("doc_read_... |
6f2e9f0e7d795214b9cf5a47724a273b705fd113 | Analyze and fix the following issue in the Linux kernel code: ext4: protect group inode free counting with group lock | Problem Details:
Now when we set the group inode free count, we don't have a proper
group lock so that multiple threads may decrease the inode free
count at the same time. And e2fsck will complain something like:
Free inodes count wrong for group #1 (1, counted=0).
Fix? no
Free inodes count wrong for group #2 (3, cou... | ```diff
diff --git a/fs/ext4/ialloc.c b/fs/ext4/ialloc.c
index ea32d7e1d6e3..03583ab52e0e 100644
--- a/fs/ext4/ialloc.c
+++ b/fs/ext4/ialloc.c
@@ -797,7 +797,10 @@ got:
ext4_itable_unused_set(sb, gdp,
(EXT4_INODES_PER_GROUP(sb) - ino));
up_read(&grp->alloc_sem);
+ } else {
+ ext4_lock_group(sb, group);
... |
0bf09e829dd4b07227ed5a8bc4ac85752a044458 | Analyze and fix the following issue in the Linux kernel code: i7core: fix ranks information at the per-channel struct | Problem Details:
There is a flag at the per-channel struct that indicates if there are
any 4R dimm on it. The way the presence of this flag were reported
is not ok, as it might give the false idea that the channel were filled
with 2R memories:
[ 580.588701] EDAC DEBUG: get_dimm_config: Ch1 phy rd1, wr1 (0x063f7431): ... | ```diff
diff --git a/drivers/edac/i7core_edac.c b/drivers/edac/i7core_edac.c
index 2aacd951d41c..c05e1ada7a3d 100644
--- a/drivers/edac/i7core_edac.c
+++ b/drivers/edac/i7core_edac.c
@@ -221,7 +221,9 @@ struct i7core_inject {
};
struct i7core_channel {
- u32 ranks;
+ bool is_3dimms_present;
+ bool is_single_4ran... |
486dfb1638bc49e9f3bbbefbe4832024ba6abe0d | Analyze and fix the following issue in the Linux kernel code: i5000: Fix the fatal error handling | Problem Details:
The fatal error channel bits point to a single channel, and not
to a range of channels. Fix the code to properly report it,
instead of printing messages like:
kernel: EDAC MC0: INTERNAL ERROR: channel-b out of range (4 >= 4)
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com> | ```diff
diff --git a/drivers/edac/i5000_edac.c b/drivers/edac/i5000_edac.c
index 1c1aa7a23c3c..11ea835f155a 100644
--- a/drivers/edac/i5000_edac.c
+++ b/drivers/edac/i5000_edac.c
@@ -474,7 +474,6 @@ static void i5000_process_fatal_error_info(struct mem_ctl_info *mci,
char msg[EDAC_MC_LABEL_LEN + 1 + 160];
char *spe... |
9f70d08a4c4581eee802563b709f710ad492d966 | Analyze and fix the following issue in the Linux kernel code: i5100_edac: Fix a warning when compiled with 32 bits | Problem Details:
drivers/edac/i5100_edac.c: In function ‘i5100_init_csrows’:
drivers/edac/i5100_edac.c:862:3: warning: format ‘%zd’ expects argument of type ‘signed size_t’, but argument 5 has type ‘long unsigned int’ [-Wformat]
Reviewed-by: Aristeu Rozanski <arozansk@redhat.com>
Cc: "Niklas Söderlund" <niklas.soderlu... | ```diff
diff --git a/drivers/edac/i5100_edac.c b/drivers/edac/i5100_edac.c
index d9b4921707f8..e9e7c2a29dc3 100644
--- a/drivers/edac/i5100_edac.c
+++ b/drivers/edac/i5100_edac.c
@@ -859,8 +859,8 @@ static void __devinit i5100_init_csrows(struct mem_ctl_info *mci)
i5100_rank_to_slot(mci, chan, rank));
}
- de... |
64e1fdaf55d61eb79ae970f78bb00edf6aa696fb | Analyze and fix the following issue in the Linux kernel code: i5000_edac: Fix the logic that retrieves memory information | Problem Details:
The logic there is broken: it basically creates two csrows for
each DIMM and assumes that all DIMM's are dual rank. Only one of
the csrows will contain the entire DIMM size. If single rank
memories are found, they'll be marked with 0 bytes.
The check if the AMB is present were also wrong.
Yet, as the... | ```diff
diff --git a/drivers/edac/i5000_edac.c b/drivers/edac/i5000_edac.c
index 82f3f4d2e7b8..1c1aa7a23c3c 100644
--- a/drivers/edac/i5000_edac.c
+++ b/drivers/edac/i5000_edac.c
@@ -270,7 +270,8 @@
#define MTR3 0x8C
#define NUM_MTRS 4
-#define CHANNELS_PER_BRANCH (2)
+#define CHANNELS_PER_BRANCH 2
+#define MAX_B... |
68d086f89b8064d5576f8c1e47fa7ecb4fd6f141 | Analyze and fix the following issue in the Linux kernel code: i5400_edac: improve debug messages to better represent the filled memory | Problem Details:
Improves the debug output message, in order to better represent the
memory controller hierarchy, when outputing the debug messages.
No functional changes when debug is disabled.
Reviewed-by: Aristeu Rozanski <arozansk@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com> | ```diff
diff --git a/drivers/edac/i5400_edac.c b/drivers/edac/i5400_edac.c
index ff7bf8050c9c..6640c29e1885 100644
--- a/drivers/edac/i5400_edac.c
+++ b/drivers/edac/i5400_edac.c
@@ -963,7 +963,7 @@ static void calculate_dimm_size(struct i5400_pvt *pvt)
int dimm, max_dimms;
char *p, *mem_buffer;
int space, n;
- i... |
a7d7d2e1a07e3811dc49af2962c940fd8bbb6c8f | Analyze and fix the following issue in the Linux kernel code: edac: Create a dimm struct and move the labels into it | Problem Details:
The way a DIMM is currently represented implies that they're
linked into a per-csrow struct. However, some drivers don't see
csrows, as they're ridden behind some chip like the AMB's
on FBDIMM's, for example.
This forced drivers to fake^Wvirtualize a csrow struct, and to create
a mess under csrow/chan... | ```diff
diff --git a/drivers/edac/edac_mc.c b/drivers/edac/edac_mc.c
index feef7733fae7..c1aae7233022 100644
--- a/drivers/edac/edac_mc.c
+++ b/drivers/edac/edac_mc.c
@@ -44,7 +44,7 @@ static void edac_mc_dump_channel(struct rank_info *chan)
debugf4("\tchannel = %p\n", chan);
debugf4("\tchannel->chan_idx = %d\n", c... |
8563000d3bf3ccfccce335c092a7c43078be8ffd | Analyze and fix the following issue in the Linux kernel code: ext4: use consistent ssize_t type in ext4_file_write() | Problem Details:
The generic_file_aio_write() function returns ssize_t, and
ext4_file_write() returns a ssize_t, so use a ssize_t to collect the
return value from generic_file_aio_write(). It shouldn't matter since
the VFS read/write paths shouldn't allow a read greater than MAX_INT,
but there was previously a bug in ... | ```diff
diff --git a/fs/ext4/file.c b/fs/ext4/file.c
index cb70f1812a70..8c7642a00054 100644
--- a/fs/ext4/file.c
+++ b/fs/ext4/file.c
@@ -95,7 +95,7 @@ ext4_file_write(struct kiocb *iocb, const struct iovec *iov,
{
struct inode *inode = iocb->ki_filp->f_path.dentry->d_inode;
int unaligned_aio = 0;
- int ret;
+ ss... |
4a3c3a5120bff77cc8c3a70c7cb681f458f47bfd | Analyze and fix the following issue in the Linux kernel code: ext4: fix format flag in ext4_ext_binsearch_idx() | Problem Details:
fix ext_debug format flag in ext4_ext_binsearch_idx().
Signed-off-by: Zheng Liu <wenqing.lz@taobao.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> | ```diff
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
index 6f3b49bd34c7..496151f893eb 100644
--- a/fs/ext4/extents.c
+++ b/fs/ext4/extents.c
@@ -603,7 +603,7 @@ ext4_ext_binsearch_idx(struct inode *inode,
}
path->p_idx = l - 1;
- ext_debug(" -> %d->%lld ", le32_to_cpu(path->p_idx->ei_block),
+ ext_debug(" ... |
fb13bfa7e1bcfdcfdece47c24b62f1a1cad957e9 | Analyze and fix the following issue in the Linux kernel code: NFSv4: Map NFS4ERR_SHARE_DENIED into an EACCES error instead of EIO | Problem Details:
If a file OPEN is denied due to a share lock, the resulting
NFS4ERR_SHARE_DENIED is currently mapped to the default EIO.
This patch adds a more appropriate mapping, and brings Linux
into line with what Solaris 10 does.
See https://bugzilla.kernel.org/show_bug.cgi?id=43286
Signed-off-by: Trond Myklebu... | ```diff
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index af2db2c49c5f..42d9e9ca7d2f 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -103,6 +103,8 @@ static int nfs4_map_errors(int err)
case -NFS4ERR_BADOWNER:
case -NFS4ERR_BADNAME:
return -EINVAL;
+ case -NFS4ERR_SHARE_DENIED:
+ return -EACCES... |
7e936b737211e6b54e34b71a827e56b872e958d8 | Analyze and fix the following issue in the Linux kernel code: ext4: disallow hard-linked directory in ext4_lookup | Problem Details:
A hard-linked directory to its parent can cause the VFS to deadlock,
and is a sign of a corrupted file system. So detect this case in
ext4_lookup(), before the rmdir() lockup scenario can take place.
Signed-off-by: Andreas Dilger <adilger@dilger.ca>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Cc: ... | ```diff
diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c
index a9fd5f48f3bf..daf8260f0b03 100644
--- a/fs/ext4/namei.c
+++ b/fs/ext4/namei.c
@@ -1330,6 +1330,12 @@ static struct dentry *ext4_lookup(struct inode *dir, struct dentry *dentry, stru
EXT4_ERROR_INODE(dir, "bad inode number: %u", ino);
return ERR_PTR(-E... |
967ac8af4475ce45474800709b12137aa7634c77 | Analyze and fix the following issue in the Linux kernel code: ext4: fix potential integer overflow in alloc_flex_gd() | Problem Details:
In alloc_flex_gd(), when flexbg_size is large, kmalloc size would
overflow and flex_gd->groups would point to a buffer smaller than
expected, causing OOB accesses when it is used.
Note that in ext4_resize_fs(), flexbg_size is calculated using
sbi->s_log_groups_per_flex, which is read from the disk and... | ```diff
diff --git a/fs/ext4/resize.c b/fs/ext4/resize.c
index a58ce7c507ae..05c7979226e5 100644
--- a/fs/ext4/resize.c
+++ b/fs/ext4/resize.c
@@ -161,6 +161,8 @@ static struct ext4_new_flex_group_data *alloc_flex_gd(unsigned long flexbg_size)
if (flex_gd == NULL)
goto out3;
+ if (flexbg_size >= UINT_MAX / sizeo... |
bb3d132a24cd8bf5e7773b2d9f9baa58b07a7dae | Analyze and fix the following issue in the Linux kernel code: ext4: fix potential NULL dereference in ext4_free_inodes_counts() | Problem Details:
The ext4_get_group_desc() function returns NULL on error, and
ext4_free_inodes_count() function dereferences it without checking.
There is a check on the next line, but it's too late.
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: "Theodore ... | ```diff
diff --git a/fs/ext4/ialloc.c b/fs/ext4/ialloc.c
index a044a9b77491..ea32d7e1d6e3 100644
--- a/fs/ext4/ialloc.c
+++ b/fs/ext4/ialloc.c
@@ -508,10 +508,12 @@ fallback_retry:
for (i = 0; i < ngroups; i++) {
grp = (parent_group + i) % ngroups;
desc = ext4_get_group_desc(sb, grp, NULL);
- grp_free = ext4_f... |
21f0d423b989284f82004d0f80c75581fec91fb2 | Analyze and fix the following issue in the Linux kernel code: perf ui: Make --stdio default when TUI is not supported | Problem Details:
The commit dc41b9b8f02db ("perf ui: Change fallback policy of
setup_browser") changed default behavior of the function but missed
setting the use_browser variable to 0 accidently. So perf report ends up
doing nothing in such cases. Fix it.
Signed-off-by: Namhyung Kim <namhyung@gmail.com>
Cc: Ingo Moln... | ```diff
diff --git a/tools/perf/ui/setup.c b/tools/perf/ui/setup.c
index 9f5f888f73e3..791fb15ce350 100644
--- a/tools/perf/ui/setup.c
+++ b/tools/perf/ui/setup.c
@@ -22,6 +22,7 @@ void setup_browser(bool fallback_to_pager)
break;
/* fall through */
default:
+ use_browser = 0;
if (fallback_to_pager)
se... |
41c73b6e89c69cbe36fae5b24da04d6fb52c3b11 | Analyze and fix the following issue in the Linux kernel code: ASoC: imx-ssi: Use clk_prepare_enable/clk_disable_unprepare | Problem Details:
Fix the following kernel crash:
------------[ cut here ]------------
WARNING: at drivers/clk/clk.c:508 __clk_enable+0x9c/0xa8()
Modules linked in:
Backtrace:
[<80011ef4>] (dump_backtrace+0x0/0x10c) from [<803fd48c>] (dump_stack+0x18/0x1c)
r7:00000009 r6:000001fc r5:803002ac r4:00000000
[<803fd474>] (... | ```diff
diff --git a/sound/soc/fsl/imx-ssi.c b/sound/soc/fsl/imx-ssi.c
index cf3ed0362c9c..28dd76c7cb1c 100644
--- a/sound/soc/fsl/imx-ssi.c
+++ b/sound/soc/fsl/imx-ssi.c
@@ -543,7 +543,7 @@ static int imx_ssi_probe(struct platform_device *pdev)
ret);
goto failed_clk;
}
- clk_enable(ssi->clk);
+ clk_prepare_en... |
c35866678391861942b3836c219a8898a259255a | Analyze and fix the following issue in the Linux kernel code: KVM: MMU: fix huge page adapted on non-PAE host | Problem Details:
The huge page size is 4M on non-PAE host, but 2M page size is used in
transparent_hugepage_adjust(), so the page we get after adjust the
mapping level is not the head page, the BUG_ON() will be triggered
Signed-off-by: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
Signed-off-by: Avi Kivity <avi@re... | ```diff
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
index 72102e0ab7cb..be3cea4407ff 100644
--- a/arch/x86/kvm/mmu.c
+++ b/arch/x86/kvm/mmu.c
@@ -2595,8 +2595,7 @@ static void transparent_hugepage_adjust(struct kvm_vcpu *vcpu,
*gfnp = gfn;
kvm_release_pfn_clean(pfn);
pfn &= ~mask;
- if (!get_page... |
3732106a1a565a592966290fbcef322db9933f91 | Analyze and fix the following issue in the Linux kernel code: sparc32: refactor cpu_idle() | Problem Details:
With the removal of sun4c we can use the same cpu_idle()
implementation on UP and SMP.
This also fix it so we use the same version independent on LEON
enabled or not.
V2: Fixed whitespace issue pointed out by Josip Rodin.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Josip Rodin <joy@entuzijast.... | ```diff
diff --git a/arch/sparc/kernel/process_32.c b/arch/sparc/kernel/process_32.c
index fe6787cc62fc..cb36e82dcd5d 100644
--- a/arch/sparc/kernel/process_32.c
+++ b/arch/sparc/kernel/process_32.c
@@ -65,50 +65,25 @@ extern void fpsave(unsigned long *, unsigned long *, void *, unsigned long *);
struct task_struct *l... |
080f88837b489ff53c9ca62bc3adefdf74eb61e8 | Analyze and fix the following issue in the Linux kernel code: sparc32,leon: fix section mismatch warning | Problem Details:
Fix following warning:
WARNING: arch/sparc/kernel/built-in.o(.cpuinit.text+0x9f4): Section mismatch in reference from the function leon_callin() to the function .init.text:leon_configure_cache_smp()
The function __cpuinit leon_callin() references
a function __init leon_configure_cache_smp().
If leon_c... | ```diff
diff --git a/arch/sparc/kernel/leon_smp.c b/arch/sparc/kernel/leon_smp.c
index 218c2f022695..0f3fb6d9c8ef 100644
--- a/arch/sparc/kernel/leon_smp.c
+++ b/arch/sparc/kernel/leon_smp.c
@@ -54,7 +54,7 @@ extern ctxd_t *srmmu_ctx_table_phys;
static int smp_processors_ready;
extern volatile unsigned long cpu_calli... |
3107948848ebc52b98ffd853f72065338bbc57e2 | Analyze and fix the following issue in the Linux kernel code: sparc32,leon: always include leon_smp + leon_mm in build | Problem Details:
Fix-up leon specific assembler to use ASI_LEON_MMUREGS
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Daniel Hellstrom <daniel@gaisler.com>
Cc: Konrad Eisele <konrad@gaisler.com> | ```diff
diff --git a/arch/sparc/include/asm/leon.h b/arch/sparc/include/asm/leon.h
index 95fa93187dde..995c4e05be6d 100644
--- a/arch/sparc/include/asm/leon.h
+++ b/arch/sparc/include/asm/leon.h
@@ -254,16 +254,4 @@ extern int leon_ipi_irq;
#define _pfn_valid(pfn) ((pfn < last_valid_pfn) && (pfn >= PFN(phys_base)))
... |
492c24e5894c65e23b11e5043c7144c2f2310abf | Analyze and fix the following issue in the Linux kernel code: sparc: fix bad merge of sparc Kconfig | Problem Details:
Fixes this sparc32 defconfig build error:
timekeeping.c:(.text+0x277c4): undefined reference to `arch_gettimeoffset'
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig
index 83bd051754e1..e74ff1377626 100644
--- a/arch/sparc/Kconfig
+++ b/arch/sparc/Kconfig
@@ -41,7 +41,6 @@ config SPARC32
def_bool !64BIT
select GENERIC_ATOMIC64
select CLZ_TAB
- select ARCH_USES_GETTIMEOFFSET
config SPARC64
def_bool 64BIT
``` |
2aa4ee2a8805ec0260dde971e9e6699917c868a7 | Analyze and fix the following issue in the Linux kernel code: lib/raid6: fix sparse warnings in recovery functions | Problem Details:
Make the recovery functions static to fix the following sparse warnings:
lib/raid6/recov.c:25:6: warning: symbol 'raid6_2data_recov_intx1' was
not declared. Should it be static?
lib/raid6/recov.c:69:6: warning: symbol 'raid6_datap_recov_intx1' was
not declared. Should it be static?
lib/raid6/recov_sss... | ```diff
diff --git a/lib/raid6/recov.c b/lib/raid6/recov.c
index 1805a5cc5daa..a95bccb8497d 100644
--- a/lib/raid6/recov.c
+++ b/lib/raid6/recov.c
@@ -22,8 +22,8 @@
#include <linux/raid/pq.h>
/* Recover two failed data blocks. */
-void raid6_2data_recov_intx1(int disks, size_t bytes, int faila, int failb,
- ... |
69ea6405980f217557b6a58f70ff60d8d88519a5 | Analyze and fix the following issue in the Linux kernel code: lib: Fix generic strnlen_user for 32-bit big-endian machines | Problem Details:
The aligned_byte_mask() definition is wrong for 32-bit big-endian
machines: the "7-(n)" part of the definition assumes a long is 8
bytes. This fixes it by using BITS_PER_LONG - 8 instead of 8*7.
Tested on 32-bit and 64-bit PowerPC.
Signed-off-by: Paul Mackerras <paulus@samba.org>
Acked-by: David S. M... | ```diff
diff --git a/lib/strnlen_user.c b/lib/strnlen_user.c
index 90900ecfeb54..a28df5206d95 100644
--- a/lib/strnlen_user.c
+++ b/lib/strnlen_user.c
@@ -8,7 +8,7 @@
#ifdef __LITTLE_ENDIAN
# define aligned_byte_mask(n) ((1ul << 8*(n))-1)
#else
-# define aligned_byte_mask(n) (~0xfful << 8*(7-(n)))
+# define align... |
fa980ca87d15bb8a1317853f257a505990f3ffde | Analyze and fix the following issue in the Linux kernel code: cgroup: superblock can't be released with active dentries | Problem Details:
48ddbe1946 "cgroup: make css->refcnt clearing on cgroup removal
optional" allowed a css to linger after the associated cgroup is
removed. As a css holds a reference on the cgroup's dentry, it means
that cgroup dentries may linger for a while.
cgroup_create() does grab an active reference on the super... | ```diff
diff --git a/kernel/cgroup.c b/kernel/cgroup.c
index ad8eae5bb801..e887b55f1f29 100644
--- a/kernel/cgroup.c
+++ b/kernel/cgroup.c
@@ -896,10 +896,13 @@ static void cgroup_diput(struct dentry *dentry, struct inode *inode)
mutex_unlock(&cgroup_mutex);
/*
- * Drop the active superblock reference that we... |
0c1833797a5a6ec23ea9261d979aa18078720b74 | Analyze and fix the following issue in the Linux kernel code: ipv6: fix incorrect ipsec fragment | Problem Details:
Since commit ad0081e43a
"ipv6: Fragment locally generated tunnel-mode IPSec6 packets as needed"
the fragment of packets is incorrect.
because tunnel mode needs IPsec headers and trailer for all fragments,
while on transport mode it is sufficient to add the headers to the
first fragment and the trailer ... | ```diff
diff --git a/include/net/dst.h b/include/net/dst.h
index bed833d9796a..8197eadca819 100644
--- a/include/net/dst.h
+++ b/include/net/dst.h
@@ -60,6 +60,7 @@ struct dst_entry {
#define DST_NOCOUNT 0x0020
#define DST_NOPEER 0x0040
#define DST_FAKE_RTABLE 0x0080
+#define DST_XFRM_TUNNEL 0x0100
short e... |
976b1908d97bd8cbd024ba7aafaa3fb637ea8e13 | Analyze and fix the following issue in the Linux kernel code: Btrfs: look into the extent during find_all_leafs | Problem Details:
Before this patch we called find_all_leafs for a data extent, then called
find_all_roots and then looked into the extent to grab the information
we were seeking. This was done without holding the leaves locked to avoid
deadlocks. However, this can obviouly race with concurrent tree
modifications.
Inst... | ```diff
diff --git a/fs/btrfs/backref.c b/fs/btrfs/backref.c
index 366978c5cdd3..fd13101aafa3 100644
--- a/fs/btrfs/backref.c
+++ b/fs/btrfs/backref.c
@@ -24,6 +24,79 @@
#include "delayed-ref.h"
#include "locking.h"
+struct extent_inode_elem {
+ u64 inum;
+ u64 offset;
+ struct extent_inode_elem *next;
+};
+
+stati... |
d5c88b735fdf2ef796bb937396dd58dac84e8407 | Analyze and fix the following issue in the Linux kernel code: Btrfs: bugfix: ignore the wrong key for indirect tree block backrefs | Problem Details:
The key we store with a tree block backref is only a hint. It is set when
the ref is created and can remain correct for a long time. As the tree is
rebalanced, however, eventually the key no longer points to the correct
destination.
With this patch, we change find_parent_nodes to no longer add keys un... | ```diff
diff --git a/fs/btrfs/backref.c b/fs/btrfs/backref.c
index c69a846999bf..366978c5cdd3 100644
--- a/fs/btrfs/backref.c
+++ b/fs/btrfs/backref.c
@@ -30,16 +30,55 @@
struct __prelim_ref {
struct list_head list;
u64 root_id;
- struct btrfs_key key;
+ struct btrfs_key key_for_search;
int level;
int count;
... |
dadcaf78b51e239d93f5ec9aac736de99081ee74 | Analyze and fix the following issue in the Linux kernel code: Btrfs: bugfix in btrfs_find_parent_nodes | Problem Details:
That one has been around since the addition of backref.c. Due to the way we
calculate our slot numbers, after adding inline refs we're missing one keyed
ref unless it's located at the beginning of a new leaf.
Reported-by: Alexander Block <ablock84@googlemail.com>
Signed-off-by: Jan Schmidt <list.btrfs... | ```diff
diff --git a/fs/btrfs/backref.c b/fs/btrfs/backref.c
index b41d94a6471b..c69a846999bf 100644
--- a/fs/btrfs/backref.c
+++ b/fs/btrfs/backref.c
@@ -413,7 +413,7 @@ static int __add_inline_refs(struct btrfs_fs_info *fs_info,
* enumerate all inline refs
*/
leaf = path->nodes[0];
- slot = path->slots[0] - 1... |
cd1b413c5c863a96bfdeab8e91b1fb3a52665e42 | Analyze and fix the following issue in the Linux kernel code: Btrfs: ulist realloc bugfix | Problem Details:
ulist_next gets the pointer to the previously returned element to find the
next element from there. However, when we call ulist_add while iteration
with ulist_next is in progress (ulist explicitly supports this), we can
realloc the ulist internal memory, which makes the pointer to the previous
element ... | ```diff
diff --git a/fs/btrfs/backref.c b/fs/btrfs/backref.c
index bcec06750232..b41d94a6471b 100644
--- a/fs/btrfs/backref.c
+++ b/fs/btrfs/backref.c
@@ -201,6 +201,7 @@ static int __resolve_indirect_refs(struct btrfs_fs_info *fs_info,
struct __prelim_ref *new_ref;
struct ulist *parents;
struct ulist_node *node;... |
96b70641b937e99c1579cb6ebbcdb7b0af98cdd0 | Analyze and fix the following issue in the Linux kernel code: gpio/tca6424: merge I2C transactions, remove cast | Problem Details:
This is a follow-up to ae79c1904 "[PATCH v2] Add support for TCA6424"
merged in the v3.5 merge window. It fixes comments made when the
patch was merged.
- Use 3 byte transfers instead of two separate transfers (2+1 byte)
- An unnecessary cast removed
Signed-off-by: Andreas Schallenberg <Andreas.Schal... | ```diff
diff --git a/drivers/gpio/gpio-pca953x.c b/drivers/gpio/gpio-pca953x.c
index 1c313c710be3..de24af202447 100644
--- a/drivers/gpio/gpio-pca953x.c
+++ b/drivers/gpio/gpio-pca953x.c
@@ -98,12 +98,11 @@ static int pca953x_write_reg(struct pca953x_chip *chip, int reg, u32 val)
if (chip->gpio_chip.ngpio <= 8)
re... |
0df2c999f748c9528f6629f45baaa86118d60cd1 | Analyze and fix the following issue in the Linux kernel code: gpio/of: fix a typo of comment message | Problem Details:
Signed-off-by: Dong Aisheng <dong.aisheng@linaro.org>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca> | ```diff
diff --git a/drivers/gpio/gpiolib-of.c b/drivers/gpio/gpiolib-of.c
index d18068a9f3ec..8389d4a0ec45 100644
--- a/drivers/gpio/gpiolib-of.c
+++ b/drivers/gpio/gpiolib-of.c
@@ -21,7 +21,7 @@
#include <linux/of_gpio.h>
#include <linux/slab.h>
-/* Private data structure for of_gpiochip_is_match */
+/* Private d... |
a00dc319e98161949aa87f71a17db32e925c3257 | Analyze and fix the following issue in the Linux kernel code: perf record: Fix branch_stack type in perf_record_opts | Problem Details:
The attr.branch_sample_type field is defined as u64 by the API. As
such, we need to ensure the variable holding the value of the branch
stack filters is also u64 otherwise we may lose bits in the future.
Note also that the bogus definition of the field in perf_record_opts
caused problems on big-endia... | ```diff
diff --git a/tools/perf/perf.h b/tools/perf/perf.h
index 14f1034f14f9..f960ccb2edc6 100644
--- a/tools/perf/perf.h
+++ b/tools/perf/perf.h
@@ -227,7 +227,7 @@ struct perf_record_opts {
unsigned int freq;
unsigned int mmap_pages;
unsigned int user_freq;
- int branch_stack;
+ u64 branch_stack;... |
89a217360ef4e96eb83758cb9647f1c42581b097 | Analyze and fix the following issue in the Linux kernel code: NFSv4.1: Handle NFS4ERR_SEQ_MISORDERED when confirming the lease | Problem Details:
Apparently the patch "NFS: Always use the same SETCLIENTID boot verifier"
is tickling a Linux nfs server bug, and causing a regression: the server
can get into a situation where it keeps replying NFS4ERR_SEQ_MISORDERED
to our CREATE_SESSION request even when we are sending the correct
sequence ID.
Fix... | ```diff
diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c
index 604c6009d1ac..419f8c44429e 100644
--- a/fs/nfs/nfs4state.c
+++ b/fs/nfs/nfs4state.c
@@ -1580,6 +1580,11 @@ out:
static int nfs4_handle_reclaim_lease_error(struct nfs_client *clp, int status)
{
switch (status) {
+ case -NFS4ERR_SEQ_MISORDERED:
+ if ... |
c410431cefefd766266139ed56bca21668e4f9a7 | Analyze and fix the following issue in the Linux kernel code: perf tools: Reconstruct event with modifiers from perf_event_attr | Problem Details:
The modifiers:
k kernel space
u user space
h hypervisor
G guest
H host
p, pp, ppp precision level (PEBS)
that can be suffixed to an event were lost when tools used event_name()
to reconstruct them from the perf_event_attr entries in a perf.data
file.
Fix it by following the defau... | ```diff
diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
index 57e4ce57bbcc..91d19138f3ec 100644
--- a/tools/perf/util/evsel.c
+++ b/tools/perf/util/evsel.c
@@ -15,6 +15,7 @@
#include "cpumap.h"
#include "thread_map.h"
#include "target.h"
+#include "../../include/linux/perf_event.h"
#define FD(e, x,... |
9f1d62bed7f015d11b9164078b7fea433b474114 | Analyze and fix the following issue in the Linux kernel code: tile: fix bug where fls(0) was not returning 0 | Problem Details:
This is because __builtin_clz(0) returns 64 for the "undefined" case
of 0, since the builtin just does a right-shift 32 and "clz" instruction.
So, use the alpha approach of casting to u32 and using __builtin_clzll().
Cc: stable@vger.kernel.org
Signed-off-by: Chris Metcalf <cmetcalf@tilera.com> | ```diff
diff --git a/arch/tile/include/asm/bitops.h b/arch/tile/include/asm/bitops.h
index 16f1fa51fea1..bd186c4eaa50 100644
--- a/arch/tile/include/asm/bitops.h
+++ b/arch/tile/include/asm/bitops.h
@@ -77,6 +77,11 @@ static inline int ffs(int x)
return __builtin_ffs(x);
}
+static inline int fls64(__u64 w)
+{
+ re... |
895d97663c83f8ed7a3386e912009155524fe7dd | Analyze and fix the following issue in the Linux kernel code: perf top: Fix counter name fixup when fallbacking to cpu-clock | Problem Details:
In 40491eaa "perf top: Update event name when falling back to cpu-clock"
we freed counter->name but didn't reset it to NULL, then when setting it
to the result of event_name(), event_name() would use the cached value,
which by now was overwritten and thus we got garbage or a zero lenght
string.
Fix it... | ```diff
diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c
index 6031dce0429f..d4a5f9b7f4f9 100644
--- a/tools/perf/builtin-top.c
+++ b/tools/perf/builtin-top.c
@@ -953,7 +953,7 @@ try_again:
attr->config = PERF_COUNT_SW_CPU_CLOCK;
if (counter->name) {
free(counter->name);
- counter->n... |
73636b1aacb1a07e6fbe0d25e560e69b024a8e25 | Analyze and fix the following issue in the Linux kernel code: arch/tile: allow building Linux with transparent huge pages enabled | Problem Details:
The change adds some infrastructure for managing tile pmd's more generally,
using pte_pmd() and pmd_pte() methods to translate pmd values to and
from ptes, since on TILEPro a pmd is really just a nested structure
holding a pgd (aka pte). Several existing pmd methods are moved into
this framework, and ... | ```diff
diff --git a/arch/tile/include/asm/pgtable.h b/arch/tile/include/asm/pgtable.h
index 67490910774d..ec907d4dbd7a 100644
--- a/arch/tile/include/asm/pgtable.h
+++ b/arch/tile/include/asm/pgtable.h
@@ -187,6 +187,7 @@ static inline void __pte_clear(pte_t *ptep)
* Undefined behaviour if not..
*/
#define pte_pr... |
992e68bf2eb9f3319f098560b8d4a03aa52fd7b8 | Analyze and fix the following issue in the Linux kernel code: mac80211: Fix race in checking AP status by sending null frame | Problem Details:
mac80211 tries to verify the existence of the current AP by
probing or sending a NULL frame in function
ieee80211_mgd_probe_ap_send. It 1st sends a null frame to the AP,
increments probe_send_count and waits for the ACK to the NULL
frame for a finite duration of time. At times, it happens that by
the t... | ```diff
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index b3b3c264ff66..04c306308987 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -1522,6 +1522,8 @@ static void ieee80211_mgd_probe_ap_send(struct ieee80211_sub_if_data *sdata)
* anymore. The timeout will be reset if the frame is ACKed by
... |
885ba1da689299ec52e646ca1a2429b8de55f364 | Analyze and fix the following issue in the Linux kernel code: NFC: potential integer overflow problem in check_crc() | Problem Details:
If "buf[0]" is 255 then "len" gets set to 0. The call to
"crc_ccitt(0xffff, buf, len - 2);" casts the "len - 2" to a high
positive number which is ugly.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com> | ```diff
diff --git a/drivers/nfc/pn544_hci.c b/drivers/nfc/pn544_hci.c
index 46f4a9f9f5e4..281f18c2fb82 100644
--- a/drivers/nfc/pn544_hci.c
+++ b/drivers/nfc/pn544_hci.c
@@ -232,7 +232,7 @@ static int pn544_hci_i2c_write(struct i2c_client *client, u8 *buf, int len)
static int check_crc(u8 *buf, int buflen)
{
- u8 ... |
f380f2c4a12e913356bd49f8790ec1063c4fe9f8 | Analyze and fix the following issue in the Linux kernel code: wl1251: fix oops on early interrupt | Problem Details:
This driver disables interrupt just after requesting it and enables it
later, after interface is up. However currently there is a time window
between request_irq() and disable_irq() where if interrupt arrives, the
driver oopses because it's not yet ready to process it. This can be
reproduced by inserti... | ```diff
diff --git a/drivers/net/wireless/ti/wl1251/sdio.c b/drivers/net/wireless/ti/wl1251/sdio.c
index 1b851f650e07..e2750a12c6f1 100644
--- a/drivers/net/wireless/ti/wl1251/sdio.c
+++ b/drivers/net/wireless/ti/wl1251/sdio.c
@@ -260,6 +260,7 @@ static int wl1251_sdio_probe(struct sdio_func *func,
}
if (wl->irq)... |
75813bde1f671aaab3185a9438da7730d356cea6 | Analyze and fix the following issue in the Linux kernel code: iwlwifi: fix memory leak if opmode fails to init | Problem Details:
If drv->op_mode is NULL after trying to init the
opmode, we go to the wrong label. Fix this, and
clean up the code a bit.
Reviewed-by: Gregory Greenman <gregory.greenman@intel.com>
Reviewed-by: Guy Cohen <guy.cohen@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: ... | ```diff
diff --git a/drivers/net/wireless/iwlwifi/iwl-drv.c b/drivers/net/wireless/iwlwifi/iwl-drv.c
index 3c72bad0ae56..d742900969ea 100644
--- a/drivers/net/wireless/iwlwifi/iwl-drv.c
+++ b/drivers/net/wireless/iwlwifi/iwl-drv.c
@@ -657,17 +657,17 @@ static int iwl_parse_tlv_firmware(struct iwl_drv *drv,
return -EI... |
f4c37176ef555560a1d13bc4bf2cf3debd442f40 | Analyze and fix the following issue in the Linux kernel code: iwlwifi: do not send lq cmd when station add fails | Problem Details:
When adding a station fails in
iwl_restore_stations, the driver treats it
like a successful station add and sends a
link quality command, when it it shouldn't.
This patch fixes one of the potential
sources for kernel warnings like this one:
WARNING: at drivers/net/wireless/iwlwifi/iwl-agn-sta.c:905 i... | ```diff
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-sta.c b/drivers/net/wireless/iwlwifi/iwl-agn-sta.c
index b31584e87bc7..aea07aab3c9e 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-sta.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-sta.c
@@ -772,7 +772,7 @@ void iwl_restore_stations(struct iwl_priv *priv, stru... |
66a770729a5cdd24efed8afa5258f81232d8bba2 | Analyze and fix the following issue in the Linux kernel code: iwlwifi: do not use shadow registers by default | Problem Details:
Shadow registers in the device are meant to
allow the driver to update certain device
registers without needing to wake up all
components of the device. However, using
this feature in the device causes
communication between the driver and the
device to become unreliable, resulting in
host command timeo... | ```diff
diff --git a/drivers/net/wireless/iwlwifi/iwl-2000.c b/drivers/net/wireless/iwlwifi/iwl-2000.c
index 7f793417c787..8133105ac645 100644
--- a/drivers/net/wireless/iwlwifi/iwl-2000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-2000.c
@@ -79,7 +79,7 @@ static const struct iwl_base_params iwl2000_base_params = {
.chai... |
ebed633c61c023e5d1aa4ed159cd67406e9e37c2 | Analyze and fix the following issue in the Linux kernel code: iwlwifi: fix the Transmit Frame Descriptor rings | Problem Details:
The logic that allows to have a short TFD queue was completely wrong.
We do maintain 256 Transmit Frame Descriptors, but they point to
recycled buffers. We used to attach and de-attach different TFDs for
the same buffer and it worked since they pointed to the same buffer.
Also zero the number of BDs a... | ```diff
diff --git a/drivers/net/wireless/iwlwifi/iwl-trans-pcie-int.h b/drivers/net/wireless/iwlwifi/iwl-trans-pcie-int.h
index 6213c05a4b52..e959207c630a 100644
--- a/drivers/net/wireless/iwlwifi/iwl-trans-pcie-int.h
+++ b/drivers/net/wireless/iwlwifi/iwl-trans-pcie-int.h
@@ -347,7 +347,7 @@ void iwl_trans_tx_queue_s... |
882dde8eb0d49ce0f853f8f4084dde56a21fe55f | Analyze and fix the following issue in the Linux kernel code: iwlwifi: update BT traffic load states correctly | Problem Details:
When BT traffic load changes from its
previous state, a new LQ command needs to be
sent down to the firmware. This needs to
be done only once per change. The state
variable that keeps track of this change is
last_bt_traffic_load. However, it was not
being updated when the change had been
handled. Not u... | ```diff
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
index 51e1a69ffdda..8cebd7c363fc 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
@@ -884,6 +884,7 @@ static void rs_bt_update_lq(struct iwl_priv *priv, struct... |
e8cdd947776300f962d5b699c34087af45a8aea7 | Analyze and fix the following issue in the Linux kernel code: perf tools: fix thread_map__new_by_pid_str() memory leak in error path | Problem Details:
The namelist array (including its content) was not freed if we fail to
realloc a new 'threads' structure.
Signed-off-by: Franck Bui-Huu <fbuihuu@gmail.com>
Cc: David Ahern <dsahern@gmail.com>
Link: http://lkml.kernel.org/r/1337952109-31995-1-git-send-email-fbuihuu@gmail.com
Signed-off-by: Arnaldo Carv... | ```diff
diff --git a/tools/perf/util/thread_map.c b/tools/perf/util/thread_map.c
index 84d9bd782004..9b5f856cc280 100644
--- a/tools/perf/util/thread_map.c
+++ b/tools/perf/util/thread_map.c
@@ -188,28 +188,27 @@ static struct thread_map *thread_map__new_by_pid_str(const char *pid_str)
nt = realloc(threads, (sizeof(... |
1b38a3a10f2ad96a3c0130f63b7f3610bab7090d | Analyze and fix the following issue in the Linux kernel code: x86: hpet: Fix copy-and-paste mistake in earlier change | Problem Details:
This fixes an oversight in 396e2c6fed4ff13b53ce0e573105531cf53b0cad
("x86: Clear HPET configuration registers on startup"), noticed by
Thomas Gleixner.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Link: http://lkml.kernel.org/r/4FBF7DA902000078000861EE@nat28.tlf.novell.com
Signed-off-by: Thomas Glei... | ```diff
diff --git a/arch/x86/kernel/hpet.c b/arch/x86/kernel/hpet.c
index 9cc7b4392f7c..1460a5df92f7 100644
--- a/arch/x86/kernel/hpet.c
+++ b/arch/x86/kernel/hpet.c
@@ -870,7 +870,7 @@ int __init hpet_enable(void)
else
pr_warn("HPET initial state will not be saved\n");
cfg &= ~(HPET_CFG_ENABLE | HPET_CFG_LEGAC... |
eeafaaca763408c099d2ade3a69e0716f296a97b | Analyze and fix the following issue in the Linux kernel code: drm/i915/hdmi: Fix reg values for g4x_hdmi_connected | Problem Details:
Paulo pointed out that gen4 re-used the SDVO registers for HDMI (the
separate HDMI registers where introduced with the first PCH) and so
g4x_hdmi_connected() never selected the right bit and always returned
disconnected.
Regression in
commit 8ec22b214d76773c9d89f4040505ce10f677ed9a
Author: Chris Wils... | ```diff
diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
index 77f0f8fb9e35..4c6f1411b28a 100644
--- a/drivers/gpu/drm/i915/intel_hdmi.c
+++ b/drivers/gpu/drm/i915/intel_hdmi.c
@@ -459,15 +459,12 @@ static bool g4x_hdmi_connected(struct intel_hdmi *intel_hdmi)
uint32_t bit;
switc... |
23ba4fd0a42a46551041e379712e808ad496ba45 | Analyze and fix the following issue in the Linux kernel code: drm/i915: wait render timeout ioctl | Problem Details:
This helps implement GL_ARB_sync but stops short of allowing full blown
sync objects. Finally we can use the new timed seqno waiting function
to allow userspace to wait on a buffer object with a timeout. This
implements that interface.
The IOCTL will take as input a buffer object handle, and a timeout... | ```diff
diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
index f94792626b94..262a74d1f852 100644
--- a/drivers/gpu/drm/i915/i915_dma.c
+++ b/drivers/gpu/drm/i915/i915_dma.c
@@ -1803,6 +1803,7 @@ struct drm_ioctl_desc i915_ioctls[] = {
DRM_IOCTL_DEF_DRV(I915_OVERLAY_ATTRS, intel_overlay_a... |
8275b91aad22144c4e2ea0c68b8d51090a81ba31 | Analyze and fix the following issue in the Linux kernel code: [PARISC] Fix parisc compile failure after smp: Add task_struct argument to __cpu_up() | Problem Details:
commit 8239c25f47d2b318156993b15f33900a86ea5e17 added an argument to our
__cpu_up() function, but didn't notice we have an extra definition for
this in asm/smp.h resulting in a compile failure.
Fix by removing the extraneous parisc definition of __cpu_up(). While
we're at it, remove the duplicated de... | ```diff
diff --git a/arch/parisc/include/asm/smp.h b/arch/parisc/include/asm/smp.h
index e8f8037d872b..a5dc9066c6d8 100644
--- a/arch/parisc/include/asm/smp.h
+++ b/arch/parisc/include/asm/smp.h
@@ -25,7 +25,6 @@ typedef unsigned long address_t;
#define cpu_number_map(cpu) (cpu)
#define cpu_logical_map(cpu) (cpu)
-... |
423b9788023263364ea5de04189f02bd9b6a12db | Analyze and fix the following issue in the Linux kernel code: KEYS: Fix some sparse warnings | Problem Details:
Fix some sparse warnings in the keyrings code:
(1) compat_keyctl_instantiate_key_iov() should be static.
(2) There were a couple of places where a pointer was being compared against
integer 0 rather than NULL.
(3) keyctl_instantiate_key_common() should not take a __user-labelled iovec
p... | ```diff
diff --git a/security/keys/compat.c b/security/keys/compat.c
index fab4f8dda6c6..e35ae1d208a8 100644
--- a/security/keys/compat.c
+++ b/security/keys/compat.c
@@ -24,7 +24,7 @@
*
* If successful, 0 will be returned.
*/
-long compat_keyctl_instantiate_key_iov(
+static long compat_keyctl_instantiate_key_iov... |
2f649c1f6f0fef445ce79a19b79e5ce8fe9d7f19 | Analyze and fix the following issue in the Linux kernel code: [PARISC] fix TLB fault path on PA2.0 narrow systems | Problem Details:
commit 5e185581d7c46ddd33cd9c01106d1fc86efb9376
Author: James Bottomley <JBottomley@Parallels.com>
[PARISC] fix PA1.1 oops on boot
Didn't quite fix the crash on boot. It moved it from PA1.1 processors to
PA2.0 narrow kernels. The final fix is to make sure the [id]tlb_miss_20 paths
also work. E... | ```diff
diff --git a/arch/parisc/kernel/entry.S b/arch/parisc/kernel/entry.S
index 535034217021..07ef351edd57 100644
--- a/arch/parisc/kernel/entry.S
+++ b/arch/parisc/kernel/entry.S
@@ -552,7 +552,7 @@
* entry (identifying the physical page) and %r23 up with
* the from tlb entry (or nothing if only a to entry---... |
ed5fb2471b7060767957fb964eb1aaec71533ab1 | Analyze and fix the following issue in the Linux kernel code: [PARISC] fix boot failure on 32-bit systems caused by branch stubs placed before .text | Problem Details:
In certain configurations, the resulting kernel becomes too large to boot
because the linker places the long branch stubs for the merged .text section
at the very start of the image. As a result, the initial transfer of control
jumps to an unexpected location. Fix this by placing the head text in a
s... | ```diff
diff --git a/arch/parisc/kernel/vmlinux.lds.S b/arch/parisc/kernel/vmlinux.lds.S
index fa6f2b8163e0..64a999882e4f 100644
--- a/arch/parisc/kernel/vmlinux.lds.S
+++ b/arch/parisc/kernel/vmlinux.lds.S
@@ -50,8 +50,10 @@ SECTIONS
. = KERNEL_BINARY_TEXT_START;
_text = .; /* Text and read-only data */
- .text... |
ef12dab779acdb907eb4c3fa723e1c6f035ee13c | Analyze and fix the following issue in the Linux kernel code: drm/i915: tune down the noise of the RP irq limit fail | Problem Details:
We still don't understand why this fails exactly, but if fails way
too often for a simple debug information. Furthermore the current
ducttape should prevent the gpu from getting stuck at low frequencies.
Hence tune down the dmesg noise.
Note that the known failure case is that the register read retur... | ```diff
diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index 00462ef96627..d0ce2a5b1d3f 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -3603,8 +3603,9 @@ static void gen6_sanitize_pm(struct drm_device *dev)
limits |= (dev_priv->min_delay & 0x3f) ... |
31d8d651eb646498413abe5f17acc7fa2b68b2fc | Analyze and fix the following issue in the Linux kernel code: drm/i915: Remove the error message for unbinding pinned buffers | Problem Details:
This is now used intentionally to prevent proliferation of is-pinned
checks upon the inactive list following:
commit 1b50247a8ddde4af5aaa0e6bc125615372ce6c16
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date: Tue Apr 24 15:47:30 2012 +0100
drm/i915: Remove the list of pinned inactive objects... | ```diff
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 1d4b51c53874..465e775b8cde 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -2033,10 +2033,8 @@ i915_gem_object_unbind(struct drm_i915_gem_object *obj)
if (obj->gtt_space == NULL)
retur... |
5c81fe85dad3c8c2bcec03e3fc2bfd4ea198763c | Analyze and fix the following issue in the Linux kernel code: drm/i915: timeout parameter for seqno wait | Problem Details:
Insert a wait parameter in the code so we can possibly timeout on a
seqno wait if need be. The code should be functionally the same as
before because all the callers will continue to retry if an arbitrary
timeout elapses.
We'd like to have nanosecond granularity, but the only way to do this is
with hr... | ```diff
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 6d2180cf3da5..c8a5b04bc8d5 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -1869,34 +1869,82 @@ i915_gem_check_olr(struct intel_ring_buffer *ring, u32 seqno)
return ret;
}
+/**
+ * __w... |
af06bb9f12990cae941816f9d7051dc5bf93c8a2 | Analyze and fix the following issue in the Linux kernel code: ARM: fix out[bwl]() | Problem Details:
out[bwl]() had a side effect that gcc read-back from the register after
writing its value. This causes a problem for at least 3c589_cs, which
spits out lots of "adapter failure, FIFO diagnostic register 2011."
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> | ```diff
diff --git a/arch/arm/include/asm/io.h b/arch/arm/include/asm/io.h
index 9af5563dd3eb..815c669fec0a 100644
--- a/arch/arm/include/asm/io.h
+++ b/arch/arm/include/asm/io.h
@@ -47,9 +47,9 @@ extern void __raw_readsb(const void __iomem *addr, void *data, int bytelen);
extern void __raw_readsw(const void __iomem *... |
456d3d42460c1fc20ba0d27442443fcd63aaac35 | Analyze and fix the following issue in the Linux kernel code: sparc64: Fix several bugs in quad floating point emulation. | Problem Details:
UltraSPARC-T2 and later do not use the fp_exception_other trap and do
not set the floating point trap type field in the %fsr at all when you
try to execute an unimplemented FPU operation.
Instead, it uses the illegal_instruction trap and it leaves the
floating point trap type field clear.
So we shoul... | ```diff
diff --git a/arch/sparc/kernel/traps_64.c b/arch/sparc/kernel/traps_64.c
index c72fdf55e1c1..3b05e6697710 100644
--- a/arch/sparc/kernel/traps_64.c
+++ b/arch/sparc/kernel/traps_64.c
@@ -2054,7 +2054,7 @@ void do_fpieee(struct pt_regs *regs)
do_fpe_common(regs);
}
-extern int do_mathemu(struct pt_regs *, s... |
12c4727e1d5370270a7df781d2ba0a76e05c1137 | Analyze and fix the following issue in the Linux kernel code: dma-buf: minor documentation fixes. | Problem Details:
Some minor inline documentation fixes for gaps resulting from new patches.
Signed-off-by: Sumit Semwal <sumit.semwal@ti.com>
Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org> | ```diff
diff --git a/drivers/base/dma-buf.c b/drivers/base/dma-buf.c
index d43d80256fda..20258e179211 100644
--- a/drivers/base/dma-buf.c
+++ b/drivers/base/dma-buf.c
@@ -429,7 +429,7 @@ EXPORT_SYMBOL_GPL(dma_buf_kunmap);
/**
* dma_buf_mmap - Setup up a userspace mmap with the given vma
- * @dma_buf: [in] buffer t... |
98f86c9e4ae3205e4c85c535691a5d36426360ee | Analyze and fix the following issue in the Linux kernel code: dma-buf: add vmap interface | Problem Details:
The main requirement I have for this interface is for scanning out
using the USB gpu devices. Since these devices have to read the
framebuffer on updates and linearly compress it, using kmaps
is a major overhead for every update.
v2: fix warn issues pointed out by Sylwester Nawrocki.
v3: fix compile ... | ```diff
diff --git a/drivers/base/dma-buf.c b/drivers/base/dma-buf.c
index 7cfb405b1ad5..d43d80256fda 100644
--- a/drivers/base/dma-buf.c
+++ b/drivers/base/dma-buf.c
@@ -468,3 +468,37 @@ int dma_buf_mmap(struct dma_buf *dmabuf, struct vm_area_struct *vma,
return dmabuf->ops->mmap(dmabuf, vma);
}
EXPORT_SYMBOL_GPL(... |
4c78513e457f72d5554a0f6e2eabfad7b98e4f19 | Analyze and fix the following issue in the Linux kernel code: dma-buf: mmap support | Problem Details:
Compared to Rob Clark's RFC I've ditched the prepare/finish hooks
and corresponding ioctls on the dma_buf file. The major reason for
that is that many people seem to be under the impression that this is
also for synchronization with outstanding asynchronous processsing.
I'm pretty massively opposed to ... | ```diff
diff --git a/Documentation/dma-buf-sharing.txt b/Documentation/dma-buf-sharing.txt
index 3bbd5c51605a..5ff4d2b84f72 100644
--- a/Documentation/dma-buf-sharing.txt
+++ b/Documentation/dma-buf-sharing.txt
@@ -29,13 +29,6 @@ The buffer-user
in memory, mapped into its own address space, so it can access the sam... |
adcc70b249ca77c1197eb62b1645146721ba6e5b | Analyze and fix the following issue in the Linux kernel code: ALSA: hda/realtek - Add new codec support for ALC269VD | Problem Details:
Also fix some settings applied only for ALC269VB.
Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de> | ```diff
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 3cb1f7128b5f..1ce7feaed91c 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -2368,6 +2368,7 @@ static struct alc_codec_rename_table rename_tbl[] = {
{ 0x10ec0269, 0xffff, 0xa023, "ALC259" },
{ 0... |
8d95e1224afa22e7881fc823849342b5602d736e | Analyze and fix the following issue in the Linux kernel code: microblaze: Add TLS support to sys_clone | Problem Details:
Formerly unused Args 4/5 now load parent tid / child tid so the brid to
do_fork can pick up TLS from r10. Arg 3 still unused
There is also necessary to fix old glibc which do not setup r9/r10 (arg 4/5).
Simple clearing them is fine.
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Signed-o... | ```diff
diff --git a/arch/microblaze/kernel/entry.S b/arch/microblaze/kernel/entry.S
index 66e34a3bfe1b..288678c5fea6 100644
--- a/arch/microblaze/kernel/entry.S
+++ b/arch/microblaze/kernel/entry.S
@@ -493,10 +493,11 @@ C_ENTRY(sys_clone):
bnei r6, 1f; /* See if child SP arg (arg 1) is 0. */
lwi r6, r1, PT_R1; /... |
4a70d2d9909b43ed88043b98cabe2c7fbd563021 | Analyze and fix the following issue in the Linux kernel code: smpboot, idle: Fix comment mismatch over idle_threads_init() | Problem Details:
The comment over idle_threads_init() really talks about the functionality
of idle_init(). Move that comment to idle_init(), and add a suitable
comment over idle_threads_init().
Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
Cc: suresh.b.siddha@intel.com
Cc: venki@google.com
Cc: nik... | ```diff
diff --git a/kernel/smpboot.c b/kernel/smpboot.c
index 0f2162f808a7..98f60c5caa1b 100644
--- a/kernel/smpboot.c
+++ b/kernel/smpboot.c
@@ -31,6 +31,12 @@ void __init idle_thread_set_boot_cpu(void)
per_cpu(idle_threads, smp_processor_id()) = current;
}
+/**
+ * idle_init - Initialize the idle thread for a c... |
c5389831cda3b38a56606a348a537a1332f2d729 | Analyze and fix the following issue in the Linux kernel code: sparc: Fix user_addr_max() definition. | Problem Details:
We need to use TASK_SIZE because for 64-bit tasks the value
of STACK_TOP actually sits in the middle of the address space
so we'll get false-negatives.
Adjust the TASK_SIZE definition on sparc64 to accomodate this,
in the context in which user_addr_max() is used we have the
test_thread_flag() definiti... | ```diff
diff --git a/arch/sparc/include/asm/processor_64.h b/arch/sparc/include/asm/processor_64.h
index e713db249931..6ca7709971d2 100644
--- a/arch/sparc/include/asm/processor_64.h
+++ b/arch/sparc/include/asm/processor_64.h
@@ -42,7 +42,9 @@
#define TASK_SIZE_OF(tsk) \
(test_tsk_thread_flag(tsk,TIF_32BIT) ? \
... |
bbafffd293e47f4cd5f0ae8b91d7d5767b242a5e | Analyze and fix the following issue in the Linux kernel code: NFSv4.1: Exchange ID must use GFP_NOFS allocation mode | Problem Details:
Exchange ID can be called in a lease reclaim situation, so it
will deadlock if it then tries to write out dirty NFS pages.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> | ```diff
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index e8988c000e7f..f8817e81096e 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -5192,20 +5192,20 @@ int nfs4_proc_exchange_id(struct nfs_client *clp, struct rpc_cred *cred)
clp->cl_rpcclient->cl_auth->au_flavor);
res.server_owner = kzalloc(... |
b4bd8ad9bb311e8536f726f7a633620ccd358cde | Analyze and fix the following issue in the Linux kernel code: solos-pci: Fix DMA support | Problem Details:
DMA support has finally made its way to the top of the TODO list, having
realised that a Geode using MMIO can't keep up with two ADSL2+ lines
each running at 21Mb/s.
This patch fixes a couple of bugs in the DMA support in the driver, so
once the corresponding FPGA update is complete and tested everyth... | ```diff
diff --git a/drivers/atm/solos-pci.c b/drivers/atm/solos-pci.c
index e8cd652d2017..98510931c815 100644
--- a/drivers/atm/solos-pci.c
+++ b/drivers/atm/solos-pci.c
@@ -984,6 +984,7 @@ static uint32_t fpga_tx(struct solos_card *card)
} else if (skb && card->using_dma) {
SKB_CB(skb)->dma_addr = pci_map_si... |
5842f5768599094758931b74190cdf93641a8e35 | Analyze and fix the following issue in the Linux kernel code: xen/hvc: Check HVM_PARAM_CONSOLE_[EVTCHN|PFN] for correctness. | Problem Details:
We need to make sure that those parameters are setup to be correct.
As such the value of 0 is deemed invalid and we find that we
bail out. The hypervisor sets by default all of them to be zero
and when the hypercall is done does a simple:
a.value = d->arch.hvm_domain.params[a.index];
Which means tha... | ```diff
diff --git a/drivers/tty/hvc/hvc_xen.c b/drivers/tty/hvc/hvc_xen.c
index 3277f0eec4a7..944eaeb8e0cf 100644
--- a/drivers/tty/hvc/hvc_xen.c
+++ b/drivers/tty/hvc/hvc_xen.c
@@ -214,14 +214,19 @@ static int xen_hvm_console_init(void)
/* already configured */
if (info->intf != NULL)
return 0;
-
+ /*
+ * If ... |
a32c88b9386ce3df87f28dd46bdc3776cd6edf75 | Analyze and fix the following issue in the Linux kernel code: xen/hvc: Fix error cases around HVM_PARAM_CONSOLE_PFN | Problem Details:
We weren't resetting the parameter to be passed in to a
known default. Nor were we checking the return value of
hvm_get_parameter.
CC: stable@kernel.org
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | ```diff
diff --git a/drivers/tty/hvc/hvc_xen.c b/drivers/tty/hvc/hvc_xen.c
index afc7fc27aa52..3277f0eec4a7 100644
--- a/drivers/tty/hvc/hvc_xen.c
+++ b/drivers/tty/hvc/hvc_xen.c
@@ -219,7 +219,8 @@ static int xen_hvm_console_init(void)
if (r < 0)
goto err;
info->evtchn = v;
- hvm_get_parameter(HVM_PARAM_CONSOLE... |
a83eb3ea97efbc891b2f67e91329638cd4e21622 | Analyze and fix the following issue in the Linux kernel code: perf tools: Do not use _FORTIFY_SOURCE when DEBUG=1 is specified | Problem Details:
As:
make DEBUG=1 -C tools/perf
disables optimizations and _FORTIFY_SOURCE in recent distros requires
optimizations to be enabled, seen on a Fedora 17 system:
[acme@Fedora17 linux]$ make DEBUG=1 O=/home/acme/git/build/perf/ -C
tools/perf install
In file included from /usr/include/sys/types.h:26:0,
... | ```diff
diff --git a/tools/perf/Makefile b/tools/perf/Makefile
index 1d3d513beb9b..0eee64cfe9a0 100644
--- a/tools/perf/Makefile
+++ b/tools/perf/Makefile
@@ -80,7 +80,7 @@ ifeq ("$(origin DEBUG)", "command line")
PERF_DEBUG = $(DEBUG)
endif
ifndef PERF_DEBUG
- CFLAGS_OPTIMIZE = -O6
+ CFLAGS_OPTIMIZE = -O6 -D_FO... |
0af78a2bb4296839cfe7a855cd128e8687e77bc1 | Analyze and fix the following issue in the Linux kernel code: drm/i915: reject doubleclocked cea modes on dp | Problem Details:
These are ultra-low-res modes used to upscale SDTV content and we
don't know how to support these on dp on intel hw:
- It's unclear whether we can send avi infoframes over dp ports.
- And the pixel repeat setting that work for hdmi/sdvo explicitly
don't work for dp.
So don't bother and just reject t... | ```diff
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 3bbd7540bcd8..eb57ec7b36f4 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -266,6 +266,9 @@ intel_dp_mode_valid(struct drm_connector *connector,
if (mode->clock < 10000)
return MODE_CL... |
bf2125e2f7e931b50a6c76ba0435ba001409ccbf | Analyze and fix the following issue in the Linux kernel code: drm/i915: wait for a vblank to pass after tv detect | Problem Details:
Otherwise the hw will get confused and result in a black screen.
This regression has been most likely introduce in
commit 974b93315b2213b74a42a87e8a9d4fc8c0dbe90c
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date: Sun Sep 5 00:44:20 2010 +0100
drm/i915/tv: Poll for DAC state change
That co... | ```diff
diff --git a/drivers/gpu/drm/i915/intel_tv.c b/drivers/gpu/drm/i915/intel_tv.c
index 3346612d2953..475f6d4d97fd 100644
--- a/drivers/gpu/drm/i915/intel_tv.c
+++ b/drivers/gpu/drm/i915/intel_tv.c
@@ -1194,6 +1194,11 @@ intel_tv_detect_type(struct intel_tv *intel_tv,
I915_WRITE(TV_DAC, save_tv_dac & ~TVDAC_ST... |
6cb49835da0426f69a2931bc2a0a8156344b0e41 | Analyze and fix the following issue in the Linux kernel code: drm/i915: enable vdd when switching off the eDP panel | Problem Details:
We have one bug report from a validation team that we get the eDP
panel sequencing still somewhat wrong: We need to enable VDD while
switching off the panel and backlight. Unfortunately that reporter
seems to have fallen off the earth :(
For another reporter this actually fixes a black panel issue bec... | ```diff
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index a1a5ce71558a..3bbd7540bcd8 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -1154,11 +1154,10 @@ static void ironlake_edp_panel_off(struct intel_dp *intel_dp)
DRM_DEBUG_KMS("Turn eDP pow... |
92b27b088c51bd9a979e39e184c41b1f57352dca | Analyze and fix the following issue in the Linux kernel code: drm/i915: Fix PCH PLL assertions to not assume CRTC:PLL relationship | Problem Details:
The existing assertions were written under the assumption that we wanted
to test the related PLL to a CRTC. With the split of PLL into a
separately managed entity which may be shared amongst CRTCs, we need to
pass in both the CRTC and the PLL to the assertion routine.
Occassionally, this means passing ... | ```diff
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 3c71850ddf20..67ed819220a4 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -910,9 +910,10 @@ static void assert_pll(struct drm_i915_private *dev_priv,
/* For ILK+ */
... |
7b9e0ae6da0a7eaf2680a1a788f08df123724f3b | Analyze and fix the following issue in the Linux kernel code: drm/i915: Always update RPS interrupts thresholds along with frequency | Problem Details:
In order to avoid missed down-interrupts when coming out of RC6, it is
advised that we always reset the down-threshold upon a PM event. This is
due to that the PM unit goes through a little dance when coming out of
RC6, it first brings the GPU up at the lowest frequency then a short
time later it resto... | ```diff
diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
index cc4a63307611..1417660a93ec 100644
--- a/drivers/gpu/drm/i915/i915_irq.c
+++ b/drivers/gpu/drm/i915/i915_irq.c
@@ -350,8 +350,8 @@ static void gen6_pm_rps_work(struct work_struct *work)
{
drm_i915_private_t *dev_priv = contai... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.