id stringlengths 40 40 | instruction stringlengths 68 308 | input stringlengths 17 33.4k | output stringlengths 100 30k |
|---|---|---|---|
640bf0607c110b0be4da04b9d480bf0aad9de772 | Analyze and fix the following issue in the Linux kernel code: ARM: mx23: Fix registers range | Problem Details:
Fix registers range.
Cc: stable@vger.kernel.org
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Marek Vasut <marex@denx.de>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org> | ```diff
diff --git a/arch/arm/boot/dts/imx23.dtsi b/arch/arm/boot/dts/imx23.dtsi
index a874dbfb5ae6..e6138310e5ce 100644
--- a/arch/arm/boot/dts/imx23.dtsi
+++ b/arch/arm/boot/dts/imx23.dtsi
@@ -51,11 +51,11 @@
dma-apbh@80004000 {
compatible = "fsl,imx23-dma-apbh";
- reg = <0x80004000 2000>;
+ reg = <0... |
c810f9039f040681ec9d9f2983b748c193037297 | Analyze and fix the following issue in the Linux kernel code: ALSA: PCM: Fix possible memory leaks in the error path | Problem Details:
When the first page allocation failed for sgbuf, it leaks the records
that have been formerly allocated.
Signed-off-by: Takashi Iwai <tiwai@suse.de> | ```diff
diff --git a/sound/core/sgbuf.c b/sound/core/sgbuf.c
index 4e7ec2b49873..d0f00356fc11 100644
--- a/sound/core/sgbuf.c
+++ b/sound/core/sgbuf.c
@@ -101,7 +101,7 @@ void *snd_malloc_sgbuf_pages(struct device *device,
if (snd_dma_alloc_pages_fallback(SNDRV_DMA_TYPE_DEV, device,
chunk, &tmpb) < 0) {
... |
5b24c421621792fcc588af6f644d6acf2dd798cc | Analyze and fix the following issue in the Linux kernel code: [PARISC] fix personality flag check in copy_thread() | Problem Details:
Directly comparing task_struct->personality against PER_* is not fully
correct, as it doesn't take flags potentially stored in top three bytes
into account.
Analogically, directly forcefully setting personality to PER_LINUX32 or
PER_LINUX discards any flags stored in the top three bytes.
Signed-off-b... | ```diff
diff --git a/arch/parisc/kernel/process.c b/arch/parisc/kernel/process.c
index d4b94b395c16..2c05a9292a81 100644
--- a/arch/parisc/kernel/process.c
+++ b/arch/parisc/kernel/process.c
@@ -309,7 +309,7 @@ copy_thread(unsigned long clone_flags, unsigned long usp,
cregs->ksp = (unsigned long)stack
+ (pregs->... |
f283862f3b5cb1f3dde37b9d21007b299c083e66 | Analyze and fix the following issue in the Linux kernel code: usb: musb: NAK timeout scheme on bulk TX endpoint | Problem Details:
Fixes endpoint starvation issue when more than one bulk QH is
multiplexed on the reserved bulk TX endpoint.
This patch sets the NAK timeout interval for such QHs, and when
a timeout triggers the next QH will be scheduled.
This scheme doesn't work for devices which are connected to a
high to full spee... | ```diff
diff --git a/drivers/usb/musb/musb_host.c b/drivers/usb/musb/musb_host.c
index 29b5149f5756..2f6f9a89802e 100644
--- a/drivers/usb/musb/musb_host.c
+++ b/drivers/usb/musb/musb_host.c
@@ -892,6 +892,73 @@ static void musb_ep_program(struct musb *musb, u8 epnum,
}
}
+/* Schedule next QH from musb->in_bulk/ou... |
3bb5534853dbb1e445a9b26ecab8ad331ff14a7e | Analyze and fix the following issue in the Linux kernel code: usb: musb: am335x: fix pdev resource bug | Problem Details:
We are overwriting the resource->name to "mc" so that musb_core.c
can understand it but this is also changing the platform device's
resource->name as the "name" address remains same.
Fixing the same by changing the resource->name field of local
structure only.
Signed-off-by: Ajay Kumar Gupta <ajay.gu... | ```diff
diff --git a/drivers/usb/musb/musb_dsps.c b/drivers/usb/musb/musb_dsps.c
index 217808d9fbe1..dabe7b63654f 100644
--- a/drivers/usb/musb/musb_dsps.c
+++ b/drivers/usb/musb/musb_dsps.c
@@ -479,9 +479,9 @@ static int __devinit dsps_create_musb_pdev(struct dsps_glue *glue, u8 id)
ret = -ENODEV;
goto err0;
}... |
1f3f7eceff47f9e320ca67b3e9f16fb295106514 | Analyze and fix the following issue in the Linux kernel code: usb: musb: Fix wrong config for am33xx and ti81xx | Problem Details:
Commit "bb6abcf: ARM: OMAP2+: Kconfig: convert SOC_OMAPAM33XX to
SOC_AM33XX" and "3395955: ARM: OMAP2+: Kconfig: convert
SOC_OMAPTI81XX to SOC_TI81XX" has changed the SOC config for AM33XX
and TI81XX as shown below
CONFIG_SOC_OMAPAM33XX --> CONFIG_SOC_AM33XX
CONFIG_SOC_OMAPTI81XX --> CONFIG_SOC_TI81XX... | ```diff
diff --git a/drivers/usb/musb/Kconfig b/drivers/usb/musb/Kconfig
index ef0c3f9f0947..6259f0d99324 100644
--- a/drivers/usb/musb/Kconfig
+++ b/drivers/usb/musb/Kconfig
@@ -8,7 +8,7 @@ config USB_MUSB_HDRC
tristate 'Inventra Highspeed Dual Role Controller (TI, ADI, ...)'
depends on USB && USB_GADGET
select ... |
7125d584d20ba7624488ddefa84b17ea6ce558f1 | Analyze and fix the following issue in the Linux kernel code: usb: dwc3: ep0: fix status phase delayed status direction | Problem Details:
commit 68d3e66 (usb: dwc3: ep0: fix for possible early
delayed_status) added handling for early delayed status,
but the current code only works because so far delayed
status will always be on the IN direction.
This patch makes the code more robust by making sure that
we can handle all directions prope... | ```diff
diff --git a/drivers/usb/dwc3/ep0.c b/drivers/usb/dwc3/ep0.c
index 3936c64c8bab..3f2c698a2bd1 100644
--- a/drivers/usb/dwc3/ep0.c
+++ b/drivers/usb/dwc3/ep0.c
@@ -164,10 +164,13 @@ static int __dwc3_gadget_ep0_queue(struct dwc3_ep *dep,
* handle it here.
*/
if (dwc->delayed_status) {
+ unsigned directi... |
fca8892ae552668e726ec9dad6ba7a26743e9a09 | Analyze and fix the following issue in the Linux kernel code: usb: dwc3: ep0: move DATA phase away from on-demand | Problem Details:
We uncovered a limitation of this core WRT to the
Link Layer Compliance Suite's TD7.06.
On that test, host will start a GetDescriptor(DEVICE)
standard request, but it will do so only on the
SETUP phase, meaning there will *NOT* be any DATA or
STATUS phases.
The idea of the test is to verify robustnes... | ```diff
diff --git a/drivers/usb/dwc3/ep0.c b/drivers/usb/dwc3/ep0.c
index 39abc589187a..69d5741a4db0 100644
--- a/drivers/usb/dwc3/ep0.c
+++ b/drivers/usb/dwc3/ep0.c
@@ -174,6 +174,49 @@ static int __dwc3_gadget_ep0_queue(struct dwc3_ep *dep,
return 0;
}
+ /*
+ * Unfortunately we have uncovered a limitation wr... |
de4bb3b9c788ea5504dfe094e34d831e8395075d | Analyze and fix the following issue in the Linux kernel code: samples/seccomp: fix endianness bug in LO_ARG define | Problem Details:
The LO_ARG define needs to consider endianness also for 32 bit builds.
The "bpf_fancy" test case didn't work on s390 in 32 bit and compat mode
because the LO_ARG define resulted in a BPF program which read the upper
halve of the 64 bit system call arguments instead of the lower halves.
Signed-off-by:... | ```diff
diff --git a/samples/seccomp/bpf-helper.h b/samples/seccomp/bpf-helper.h
index 643279dd30fb..38ee70f3cd5b 100644
--- a/samples/seccomp/bpf-helper.h
+++ b/samples/seccomp/bpf-helper.h
@@ -59,6 +59,16 @@ void seccomp_bpf_print(struct sock_filter *filter, size_t count);
#define FIND_LABEL(labels, label) seccomp_b... |
b7db60f45d74497c723dc7ae1370cf0b37dfb0d8 | Analyze and fix the following issue in the Linux kernel code: ACPI processor: Fix tick_broadcast_mask online/offline regression | Problem Details:
In commit 99b725084 "ACPI processor hotplug: Delay acpi_processor_start()
call for hotplugged cores", acpi_processor_hotplug(pr) was wrongly replaced
by acpi_processor_cst_has_changed() inside the acpi_cpu_soft_notify(). This
patch will restore it back, fixing the tick_broadcast_mask regression:
https... | ```diff
diff --git a/drivers/acpi/processor_driver.c b/drivers/acpi/processor_driver.c
index 0734086537b8..bbac51e79d1f 100644
--- a/drivers/acpi/processor_driver.c
+++ b/drivers/acpi/processor_driver.c
@@ -442,7 +442,7 @@ static int acpi_cpu_soft_notify(struct notifier_block *nfb,
/* Normal CPU soft online event */... |
095adbb6441172985f5ddc3b9e88cb3191bdeac4 | Analyze and fix the following issue in the Linux kernel code: ACPI: Only count valid srat memory structures | Problem Details:
Otherwise you could run into:
WARN_ON in numa_register_memblks(), because node_possible_map is zero
References: https://bugzilla.novell.com/show_bug.cgi?id=757888
On this machine (ProLiant ML570 G3) the SRAT table contains:
- No processor affinities
- One memory affinity structure (which is set d... | ```diff
diff --git a/arch/ia64/kernel/acpi.c b/arch/ia64/kernel/acpi.c
index 6f38b6120d96..440578850ae5 100644
--- a/arch/ia64/kernel/acpi.c
+++ b/arch/ia64/kernel/acpi.c
@@ -497,7 +497,7 @@ acpi_numa_processor_affinity_init(struct acpi_srat_cpu_affinity *pa)
srat_num_cpus++;
}
-void __init
+int __init
acpi_numa_... |
8554116e17eef055d9dd58a94b3427cb2ad1c317 | Analyze and fix the following issue in the Linux kernel code: pnfs: defer release of pages in layoutget | Problem Details:
we have encountered a bug whereby reading a lot of files (copying
fedora's /bin) from a pNFS mount and hitting Ctrl+C in the middle caused
a general protection fault in xdr_shrink_bufhead. this function is
called when decoding the response from LAYOUTGET. the decoding is done
by a worker thread, and th... | ```diff
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index a99a8d948721..6a78d49da5c1 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -6223,11 +6223,58 @@ static void nfs4_layoutget_done(struct rpc_task *task, void *calldata)
dprintk("<-- %s\n", __func__);
}
+static size_t max_response_pages(struct... |
8c1057e43c99e393fe2e14cca879affcb516d36b | Analyze and fix the following issue in the Linux kernel code: libertas: fix two memory leaks | Problem Details:
The if_sdio_card structure was never being freed, and neither
was the command structure used for association.
Signed-off-by: Daniel Drake <dsd@laptop.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com> | ```diff
diff --git a/drivers/net/wireless/libertas/cfg.c b/drivers/net/wireless/libertas/cfg.c
index eb5de800ed90..1c10b542ab23 100644
--- a/drivers/net/wireless/libertas/cfg.c
+++ b/drivers/net/wireless/libertas/cfg.c
@@ -1254,6 +1254,7 @@ static int lbs_associate(struct lbs_private *priv,
netif_tx_wake_all_queues... |
16ebd60856bc5d980722cb85b259a4d5b301e94a | Analyze and fix the following issue in the Linux kernel code: rt2x00 : fix rt3290 resuming failed. | Problem Details:
This patch is going to fix the resuming failed from S3/S4
for rt3290 chip.
Signed-off-by: Woody Hung <Woody.Hung@mediatek.com>
Cc: Kevin Chou <kevin.chou@mediatek.com>
Signed-off-by: Chen, Chien-Chia <machen@suse.com>
Reviewed-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville... | ```diff
diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c
index 88455b1b9fe0..cb8c2aca54e4 100644
--- a/drivers/net/wireless/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/rt2x00/rt2800lib.c
@@ -221,6 +221,67 @@ static void rt2800_rf_write(struct rt2x00_dev *rt2x00dev,
mute... |
828afd26fe78f87d0bd1dfce64c561f78c1a8969 | Analyze and fix the following issue in the Linux kernel code: b43: fix logic in GPIO init | Problem Details:
Add some comments by the way
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com> | ```diff
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c
index b80352b308d5..a140165dfee0 100644
--- a/drivers/net/wireless/b43/main.c
+++ b/drivers/net/wireless/b43/main.c
@@ -2719,32 +2719,37 @@ static int b43_gpio_init(struct b43_wldev *dev)
if (dev->dev->chip_id == 0x4301) {
mask ... |
8783b6e2b2cb726f2734cf208d101f73ac1ba616 | Analyze and fix the following issue in the Linux kernel code: mm: remove node_start_pfn checking in new WARN_ON for now | Problem Details:
Borislav Petkov reports that the new warning added in commit
88fdf75d1bb5 ("mm: warn if pg_data_t isn't initialized with zero")
triggers for him, and it is the node_start_pfn field that has already
been initialized once.
The call trace looks like this:
x86_64_start_kernel ->
x86_64_start_reserv... | ```diff
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 889532b8e6c1..009ac285fea7 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -4511,7 +4511,7 @@ void __paginginit free_area_init_node(int nid, unsigned long *zones_size,
pg_data_t *pgdat = NODE_DATA(nid);
/* pg_data_t should be reset to zero when it... |
bac6f61550043195ee59e9cef0db67af23baf11e | Analyze and fix the following issue in the Linux kernel code: ARM: mmp: add missing irqs.h | Problem Details:
arch/arm/mach-mmp/gplugd.c:195:13: error: ‘MMP_NR_IRQS’ undeclared here
(not in a function)
make[1]: *** [arch/arm/mach-mmp/gplugd.o] Error 1
Include <mach/irqs.h> to fix this issue.
Signed-off-by: Haojian Zhuang <haojian.zhuang@gmail.com>
Signed-off-by: Olof Johansson <olof@lixom.net> | ```diff
diff --git a/arch/arm/mach-mmp/gplugd.c b/arch/arm/mach-mmp/gplugd.c
index f516e74ce0d5..5c3d61ee729a 100644
--- a/arch/arm/mach-mmp/gplugd.c
+++ b/arch/arm/mach-mmp/gplugd.c
@@ -14,6 +14,7 @@
#include <asm/mach/arch.h>
#include <asm/mach-types.h>
+#include <mach/irqs.h>
#include <mach/pxa168.h>
#include ... |
10b683cba5ef5cf4e0b50aabe5ed7137960b64e0 | Analyze and fix the following issue in the Linux kernel code: arm: mvebu: fix typo in .dtsi comment for Armada XP SoCs | Problem Details:
The comment was wrongly referring to Armada 370 while the file is
related to Armada XP.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Olof Johansson <olof@lixom.net> | ```diff
diff --git a/arch/arm/boot/dts/armada-xp.dtsi b/arch/arm/boot/dts/armada-xp.dtsi
index e1fa7e6edfe8..71d6b5d0daf1 100644
--- a/arch/arm/boot/dts/armada-xp.dtsi
+++ b/arch/arm/boot/dts/armada-xp.dtsi
@@ -12,7 +12,7 @@
* License version 2. This program is licensed "as is" without any
* warranty of any kind, ... |
f0666b1ac875ff32fe290219b150ec62eebbe10e | Analyze and fix the following issue in the Linux kernel code: libceph: fix crypto key null deref, memory leak | Problem Details:
Avoid crashing if the crypto key payload was NULL, as when it was not correctly
allocated and initialized. Also, avoid leaking it.
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Alex Elder <elder@inktank.com> | ```diff
diff --git a/net/ceph/crypto.c b/net/ceph/crypto.c
index b780cb7947dd..9da7fdd3cd8a 100644
--- a/net/ceph/crypto.c
+++ b/net/ceph/crypto.c
@@ -466,6 +466,7 @@ void ceph_key_destroy(struct key *key) {
struct ceph_crypto_key *ckey = key->payload.data;
ceph_crypto_key_destroy(ckey);
+ kfree(ckey);
}
stru... |
5ef50c3bec20060bc114f62d6503c5d86d70bdd7 | Analyze and fix the following issue in the Linux kernel code: ceph: simplify+fix atomic_open | Problem Details:
The initial ->atomic_open op was carried over from the old intent code,
which was incomplete and didn't really work. Replace it with a fresh
method. In particular:
* always attempt to do an atomic open+lookup, both for the create case
and for lookups of existing files.
* fix symlink handling by... | ```diff
diff --git a/fs/ceph/dir.c b/fs/ceph/dir.c
index f391f1e75414..e5b77319c97b 100644
--- a/fs/ceph/dir.c
+++ b/fs/ceph/dir.c
@@ -633,44 +633,6 @@ static struct dentry *ceph_lookup(struct inode *dir, struct dentry *dentry,
return dentry;
}
-int ceph_atomic_open(struct inode *dir, struct dentry *dentry,
- ... |
5bc6f9888db5739abfa0cae279b4b442e4db8049 | Analyze and fix the following issue in the Linux kernel code: xen/p2m: Reserve 8MB of _brk space for P2M leafs when populating back. | Problem Details:
When we release pages back during bootup:
Freeing 9d-100 pfn range: 99 pages freed
Freeing 9cf36-9d0d2 pfn range: 412 pages freed
Freeing 9f6bd-9f6bf pfn range: 2 pages freed
Freeing 9f714-9f7bf pfn range: 171 pages freed
Freeing 9f7e0-9f7ff pfn range: 31 pages freed
Freeing 9f800-100000 pfn ran... | ```diff
diff --git a/arch/x86/xen/p2m.c b/arch/x86/xen/p2m.c
index 64effdc6da94..b2e91d40a4cb 100644
--- a/arch/x86/xen/p2m.c
+++ b/arch/x86/xen/p2m.c
@@ -194,6 +194,11 @@ RESERVE_BRK(p2m_mid_mfn, PAGE_SIZE * (MAX_DOMAIN_PAGES / (P2M_PER_PAGE * P2M_MID
* boundary violation will require three middle nodes. */
RESERVE... |
9e62bb4458ad2cf28bd701aa5fab380b846db326 | Analyze and fix the following issue in the Linux kernel code: ore: Fix out-of-bounds access in _ios_obj() | Problem Details:
_ios_obj() is accessed by group_index not device_table index.
The oc->comps array is only a group_full of devices at a time
it is not like ore_comp_dev() which is indexed by a global
device_table index.
This did not BUG until now because exofs only uses a single
COMP for all devices. But with other F... | ```diff
diff --git a/fs/exofs/ore.c b/fs/exofs/ore.c
index 24a49d47e935..1585db1aa365 100644
--- a/fs/exofs/ore.c
+++ b/fs/exofs/ore.c
@@ -837,11 +837,11 @@ static int _write_mirror(struct ore_io_state *ios, int cur_comp)
bio->bi_rw |= REQ_WRITE;
}
- osd_req_write(or, _ios_obj(ios, dev), per_dev->offset,
-... |
4b74f6ea8417e48bb1fc65880a0574134a8b4745 | Analyze and fix the following issue in the Linux kernel code: exofs: Fix __r4w_get_page when offset is beyond i_size | Problem Details:
It is very common for the end of the file to be unaligned on
stripe size. But since we know it's beyond file's end then
the XOR should be preformed with all zeros.
Old code used to just read zeros out of the OSD devices, which is a great
waist. But what scares me more about this situation is that, we ... | ```diff
diff --git a/fs/exofs/inode.c b/fs/exofs/inode.c
index 9a5ed30b8a35..3b2ee72aecbe 100644
--- a/fs/exofs/inode.c
+++ b/fs/exofs/inode.c
@@ -574,8 +574,16 @@ static struct page *__r4w_get_page(void *priv, u64 offset, bool *uptodate)
if (!pcol->that_locked_page ||
(pcol->that_locked_page->index != index)... |
98d3088e534a2a61f6690b5426909b0c3b57a785 | Analyze and fix the following issue in the Linux kernel code: ASoC: core: Fix check before defaulting to regmap | Problem Details:
Check if the chip has provided a write operation (which is mandatory for
I/O) rather than looking for control data as some of the MFDs use a global
for this. Also skip the attempt if there's no regmap available by device
in case things get confused by the attempt to default.
Signed-off-by: Mark Brown ... | ```diff
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index f219b2f7ee68..f81c5976b961 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -1096,7 +1096,7 @@ static int soc_probe_codec(struct snd_soc_card *card,
}
/* If the driver didn't set I/O up try regmap */
- if (!codec->control_data)
... |
2d4e6dc628b43fbbbc9219e233ec3ee0afb707e3 | Analyze and fix the following issue in the Linux kernel code: ARM: dts: imx27-3ds.dts: Fix serial console node | Problem Details:
Fix serial console node and allow the board to boot again.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> | ```diff
diff --git a/arch/arm/boot/dts/imx27-3ds.dts b/arch/arm/boot/dts/imx27-3ds.dts
index d3f8296e19e0..0a8978a40ece 100644
--- a/arch/arm/boot/dts/imx27-3ds.dts
+++ b/arch/arm/boot/dts/imx27-3ds.dts
@@ -27,7 +27,7 @@
status = "okay";
};
- uart@1000a000 {
+ uart1: serial@1000a000 {
fsl,uart-has-r... |
53362a05ae683e12a20d9ffdf58a88094a0bed9d | Analyze and fix the following issue in the Linux kernel code: fs/block-dev.c:fix performance regression in O_DIRECT writes to md block devices | Problem Details:
For regular file, write operaion used blk_plug function.But for block
file,write operation did not use blk_plug.
This patch is also for write-cache mode for block-device.
Signed-off-by: Jianpeng Ma <majianpeng@gmail.com>
Reviewed-by: NeilBrown <neilb@suse.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk... | ```diff
diff --git a/fs/block_dev.c b/fs/block_dev.c
index 1e519195d45b..38e721b35d45 100644
--- a/fs/block_dev.c
+++ b/fs/block_dev.c
@@ -1578,10 +1578,12 @@ ssize_t blkdev_aio_write(struct kiocb *iocb, const struct iovec *iov,
unsigned long nr_segs, loff_t pos)
{
struct file *file = iocb->ki_filp;
+ struct bl... |
f6ff53d3611b564661896be23369b54d84941a0e | Analyze and fix the following issue in the Linux kernel code: block: reorganize rounding of max_discard_sectors | Problem Details:
Mostly a preparation for the next patch.
In principle this fixes an infinite loop if max_discard_sectors < granularity,
but that really shouldn't happen.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
Tested-by: Mike Snitzer <snitzer@redhat.com>
Signed-of... | ```diff
diff --git a/block/blk-lib.c b/block/blk-lib.c
index 2b461b496a78..16b06f62e68c 100644
--- a/block/blk-lib.c
+++ b/block/blk-lib.c
@@ -44,6 +44,7 @@ int blkdev_issue_discard(struct block_device *bdev, sector_t sector,
struct request_queue *q = bdev_get_queue(bdev);
int type = REQ_WRITE | REQ_DISCARD;
unsi... |
a27032eee8cb6e16516f13c8a9752e9d5d4cc430 | Analyze and fix the following issue in the Linux kernel code: sparc64: do not clobber personality flags in sys_sparc64_personality() | Problem Details:
There are multiple errors in how sys_sparc64_personality() handles
personality flags stored in top three bytes.
- directly comparing current->personality against PER_LINUX32 doesn't work
in cases when any of the personality flags stored in the top three bytes
are used.
- directly forcefully settin... | ```diff
diff --git a/arch/sparc/kernel/sys_sparc_64.c b/arch/sparc/kernel/sys_sparc_64.c
index 0dc1f5786081..11c6c9603e71 100644
--- a/arch/sparc/kernel/sys_sparc_64.c
+++ b/arch/sparc/kernel/sys_sparc_64.c
@@ -502,12 +502,12 @@ SYSCALL_DEFINE1(sparc64_personality, unsigned long, personality)
{
int ret;
- if (curr... |
8b6d5c09bc0c49aea041486d77c2f67e98ae0bc3 | Analyze and fix the following issue in the Linux kernel code: bnx2x: fix mem leak when command is unknown | Problem Details:
In bnx2x_mcast_enqueue_cmd() we'll leak the memory allocated to
'new_cmd' if we hit the deafault case of the 'switch (cmd)'.
Add a 'kfree(new_cmd)' to that case to avoid the leak.
Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Acked-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: David S. Mille... | ```diff
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c
index 734fd87cd990..62f754bd0dfe 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c
@@ -2485,6 +2485,7 @@ static int bnx2x_mcast_enqueue_cmd(... |
e3c0d04750751389d5116267f8cf4687444d9a50 | Analyze and fix the following issue in the Linux kernel code: Fix unexpected SA hard expiration after changing date | Problem Details:
After SA is setup, one timer is armed to detect soft/hard expiration,
however the timer handler uses xtime to do the math. This makes hard
expiration occurs first before soft expiration after setting new date
with big interval. As a result new child SA is deleted before rekeying
the new one.
Signed-of... | ```diff
diff --git a/include/net/xfrm.h b/include/net/xfrm.h
index d9509eb29b80..62b619e82a90 100644
--- a/include/net/xfrm.h
+++ b/include/net/xfrm.h
@@ -213,6 +213,9 @@ struct xfrm_state {
struct xfrm_lifetime_cur curlft;
struct tasklet_hrtimer mtimer;
+ /* used to fix curlft->add_time when changing date */
+ l... |
7e6d06f0de3f74ca929441add094518ae332257c | Analyze and fix the following issue in the Linux kernel code: sfc: Fix maximum number of TSO segments and minimum TX queue size | Problem Details:
Currently an skb requiring TSO may not fit within a minimum-size TX
queue. The TX queue selected for the skb may stall and trigger the TX
watchdog repeatedly (since the problem skb will be retried after the
TX reset). This issue is designated as CVE-2012-3412.
Set the maximum number of TSO segments ... | ```diff
diff --git a/drivers/net/ethernet/sfc/efx.c b/drivers/net/ethernet/sfc/efx.c
index 70554a1b2b02..65a8d49106a4 100644
--- a/drivers/net/ethernet/sfc/efx.c
+++ b/drivers/net/ethernet/sfc/efx.c
@@ -1503,6 +1503,11 @@ static int efx_probe_all(struct efx_nic *efx)
goto fail2;
}
+ BUILD_BUG_ON(EFX_DEFAULT_DMAQ... |
30b678d844af3305cda5953467005cebb5d7b687 | Analyze and fix the following issue in the Linux kernel code: net: Allow driver to limit number of GSO segments per skb | Problem Details:
A peer (or local user) may cause TCP to use a nominal MSS of as little
as 88 (actual MSS of 76 with timestamps). Given that we have a
sufficiently prodigious local sender and the peer ACKs quickly enough,
it is nevertheless possible to grow the window for such a connection
to the point that we will tr... | ```diff
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index eb06e58bed0b..a9db4f33407f 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -1300,6 +1300,8 @@ struct net_device {
/* for setting kernel sock attribute on TCP connection setup */
#define GSO_MAX_SIZE 65536
un... |
aa67f6096c19bcdb1951ef88be3cf3d2118809dc | Analyze and fix the following issue in the Linux kernel code: KVM: VMX: Fix ds/es corruption on i386 with preemption | Problem Details:
Commit b2da15ac26a0c ("KVM: VMX: Optimize %ds, %es reload") broke i386
in the following scenario:
vcpu_load
...
vmx_save_host_state
vmx_vcpu_run
(ds.rpl, es.rpl cleared by hardware)
interrupt
push ds, es # pushes bad ds, es
schedule
vmx_vcpu_put
vmx_load_host_state
... | ```diff
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index c39b60707e02..c00f03de1b79 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -1488,13 +1488,6 @@ static void __vmx_load_host_state(struct vcpu_vmx *vmx)
loadsegment(ds, vmx->host_state.ds_sel);
loadsegment(es, vmx->host_state.es_sel);
... |
d4afcba95fca4dd0f831fe72c1fa4f0638f23765 | Analyze and fix the following issue in the Linux kernel code: um: fix ubd_file_size for read-only files | Problem Details:
Made ubd_file_size not request write access. Fixes use of read-only images.
Signed-off-by: Martin Pärtel <martin.partel@gmail.com>
Signed-off-by: Richard Weinberger <richard@nod.at> | ```diff
diff --git a/arch/um/drivers/ubd_kern.c b/arch/um/drivers/ubd_kern.c
index 20505cafa299..0643e5bc9f41 100644
--- a/arch/um/drivers/ubd_kern.c
+++ b/arch/um/drivers/ubd_kern.c
@@ -514,7 +514,7 @@ static inline int ubd_file_size(struct ubd *ubd_dev, __u64 *size_out)
goto out;
}
- fd = os_open_file(ubd_dev-... |
0ecf4f0c02b7802de5d1251e03e6eab360f158e1 | Analyze and fix the following issue in the Linux kernel code: perf target: Fix check on buffer size | Problem Details:
It was a mistake just replace assert to BUG_ON since its condition
should be negated. Fix it.
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Cc: "Kirill A. Shutemov" <kirill@shutemov.name>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Kirill A. Shutemov <kirill@shutemov.name>
Cc: Paul Mackerras <paulus@sa... | ```diff
diff --git a/tools/perf/util/target.c b/tools/perf/util/target.c
index 3f59c496e64c..051eaa68095e 100644
--- a/tools/perf/util/target.c
+++ b/tools/perf/util/target.c
@@ -110,7 +110,7 @@ int perf_target__strerror(struct perf_target *target, int errnum,
int idx;
const char *msg;
- BUG_ON(buflen > 0);
+ BUG... |
028df76726c5637c6f70a064d94452808ec74f9e | Analyze and fix the following issue in the Linux kernel code: perf symbols: Fix array sizes for binary types arrays | Problem Details:
Following commit introduced wrong array boundaries, that could lead to
SIGSEGV.
perf symbols: Factor DSO symtab types to generic binary types
commit 44f24cb3156a1e7d2b6bb501b7f6153aed08994c
Author: Jiri Olsa <jolsa@redhat.com>
Fixing to use proper array size.
Reported-by: Markus Trippelsdorf <... | ```diff
diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c
index fdad4eeeb429..fe86612afadc 100644
--- a/tools/perf/util/symbol.c
+++ b/tools/perf/util/symbol.c
@@ -64,7 +64,7 @@ static enum dso_binary_type binary_type_symtab[] = {
DSO_BINARY_TYPE__NOT_FOUND,
};
-#define DSO_BINARY_TYPE__SYMTAB_CNT s... |
30f31c0a492d0c1cd64af631476697f38d6a79d4 | Analyze and fix the following issue in the Linux kernel code: perf test: Fix parse events automated tests | Problem Details:
Parse events tests got broken after following commit:
perf tools: Fix trace events storms due to weight demux
commit 0983cc0dbca45250cbb5984bec7c303ac265b8e5
Author: Frederic Weisbecker <fweisbec@gmail.com>
that added PERF_SAMPLE_PERIOD sample type for tracepoints.
Updating related tests.
Sig... | ```diff
diff --git a/tools/perf/util/parse-events-test.c b/tools/perf/util/parse-events-test.c
index 1b997d2b89ce..127d648cc548 100644
--- a/tools/perf/util/parse-events-test.c
+++ b/tools/perf/util/parse-events-test.c
@@ -13,6 +13,9 @@ do { \
} \
} while (0)
+#define PERF_TP_SAMPLE_TYPE (PERF_SAMPLE_RAW | PERF_SA... |
4b00951f6f2fd335f063e553b474fe4648b3307d | Analyze and fix the following issue in the Linux kernel code: MIPS: Loongson 1: more clk support and add select HAVE_CLK | Problem Details:
This fixes a redefinition of clk_*:
arch/mips/loongson1/common/clock.c:23:13: error: redefinition of 'clk_get'
include/linux/clk.h:281:27: note: previous definition of 'clk_get' was here
arch/mips/loongson1/common/clock.c:41:15: error: redefinition of 'clk_get_rate'
include/linux/clk.h:302:29: note: p... | ```diff
diff --git a/arch/mips/loongson1/Kconfig b/arch/mips/loongson1/Kconfig
index 237fa214de9f..a9a14d6e81af 100644
--- a/arch/mips/loongson1/Kconfig
+++ b/arch/mips/loongson1/Kconfig
@@ -15,6 +15,7 @@ config LOONGSON1_LS1B
select SYS_SUPPORTS_LITTLE_ENDIAN
select SYS_SUPPORTS_HIGHMEM
select SYS_HAS_EARLY_PRIN... |
47cd7343f5467bf38d17a78eb99eaa8019e17007 | Analyze and fix the following issue in the Linux kernel code: MIPS: txx9: Fix redefinition of clk_* by adding select HAVE_CLK | Problem Details:
arch/mips/txx9/generic/setup.c:87:13: error: redefinition of 'clk_get'
include/linux/clk.h:281:27: note: previous definition of 'clk_get' was here
arch/mips/txx9/generic/setup.c:97:5: error: redefinition of 'clk_enable'
include/linux/clk.h:295:19: note: previous definition of 'clk_enable' was here
arch... | ```diff
diff --git a/arch/mips/txx9/Kconfig b/arch/mips/txx9/Kconfig
index 852ae4bb7a85..6d40bc783459 100644
--- a/arch/mips/txx9/Kconfig
+++ b/arch/mips/txx9/Kconfig
@@ -20,6 +20,7 @@ config MACH_TXX9
select SYS_SUPPORTS_32BIT_KERNEL
select SYS_SUPPORTS_LITTLE_ENDIAN
select SYS_SUPPORTS_BIG_ENDIAN
+ select HAVE_... |
3e82eeebad58a8bd9d263236ead0a0734e752792 | Analyze and fix the following issue in the Linux kernel code: MIPS: BCM63xx: Fix redefinition of clk_* by adding select HAVE_CLK | Problem Details:
arch/mips/bcm63xx/clk.c:249:5: error: redefinition of 'clk_enable'
include/linux/clk.h:295:19: note: previous definition of 'clk_enable' was here
arch/mips/bcm63xx/clk.c:259:6: error: redefinition of 'clk_disable'
include/linux/clk.h:300:20: note: previous definition of 'clk_disable' was here
arch/mips... | ```diff
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index 45fdad419d82..331d574df99c 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -125,6 +125,7 @@ config BCM63XX
select SYS_HAS_EARLY_PRINTK
select SWAP_IO_SPACE
select ARCH_REQUIRE_GPIOLIB
+ select HAVE_CLK
help
Support for BCM63XX based b... |
8551fb643ad6fe07f16d0825c8b6d99246024b9a | Analyze and fix the following issue in the Linux kernel code: MIPS: AR7: Fix redefinition of clk_* by adding select HAVE_CLK | Problem Details:
arch/mips/ar7/clock.c:420:5: error: redefinition of 'clk_enable'
include/linux/clk.h:295:19: note: previous definition of 'clk_enable' was here
arch/mips/ar7/clock.c:426:6: error: redefinition of 'clk_disable'
include/linux/clk.h:300:20: note: previous definition of 'clk_disable' was here
arch/mips/ar7... | ```diff
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index e3efc06e6409..45fdad419d82 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -77,6 +77,7 @@ config AR7
select SYS_SUPPORTS_ZBOOT_UART16550
select ARCH_REQUIRE_GPIOLIB
select VLYNQ
+ select HAVE_CLK
help
Support for the Texas Instrument... |
e29b72f5e129b4dd4b77dc01dba340006bb103f8 | Analyze and fix the following issue in the Linux kernel code: MIPS: Lantiq: Fix interface clock and PCI control register offset | Problem Details:
The XRX200 based SoC have a different register offset for the interface
clock and PCI control registers. This patch detects the SoC and sets the
register offset at runtime. This make PCI work on the VR9 SoC.
Signed-off-by: John Crispin <blogic@openwrt.org>
Cc: linux-mips@linux-mips.org
Patchwork: http... | ```diff
diff --git a/arch/mips/lantiq/xway/sysctrl.c b/arch/mips/lantiq/xway/sysctrl.c
index 83780f7c842b..befbb760ab76 100644
--- a/arch/mips/lantiq/xway/sysctrl.c
+++ b/arch/mips/lantiq/xway/sysctrl.c
@@ -20,10 +20,12 @@
/* clock control register */
#define CGU_IFCCR 0x0018
+#define CGU_IFCCR_VR9 0x0024
/* syste... |
4a905077134849ea30d1c6dbf4071ea9e8e71b93 | Analyze and fix the following issue in the Linux kernel code: crypto: caam - fix possible deadlock condition | Problem Details:
commit "crypto: caam - use non-irq versions of spinlocks for job rings"
made two bad assumptions:
(a) The caam_jr_enqueue lock isn't used in softirq context.
Not true: jr_enqueue can be interrupted by an incoming net
interrupt and the received packet may be sent for encryption,
via caam_jr_enqueue in ... | ```diff
diff --git a/drivers/crypto/caam/jr.c b/drivers/crypto/caam/jr.c
index 53c8c51d5881..93d14070141a 100644
--- a/drivers/crypto/caam/jr.c
+++ b/drivers/crypto/caam/jr.c
@@ -63,7 +63,7 @@ static void caam_jr_dequeue(unsigned long devarg)
head = ACCESS_ONCE(jrp->head);
- spin_lock_bh(&jrp->outlock);
+ spin... |
aff252a848ce21b431ba822de3dab9c4c94571cb | Analyze and fix the following issue in the Linux kernel code: ALSA: snd-usb: fix clock source validity index | Problem Details:
uac_clock_source_is_valid() uses the control selector value to access
the bmControls bitmap of the clock source unit. This is wrong, as
control selector values start from 1, while the bitmap uses all
available bits.
In other words, "Clock Validity Control" is stored in D3..2, not D5..4
of the clock se... | ```diff
diff --git a/sound/usb/clock.c b/sound/usb/clock.c
index 379baad3d5ad..5e634a2eb282 100644
--- a/sound/usb/clock.c
+++ b/sound/usb/clock.c
@@ -111,7 +111,8 @@ static bool uac_clock_source_is_valid(struct snd_usb_audio *chip, int source_id)
return 0;
/* If a clock source can't tell us whether it's valid, ... |
1e32dfe323d156d5d7b25b9feffe015d19713db2 | Analyze and fix the following issue in the Linux kernel code: sh: pfc: Fix up init ordering mess. | Problem Details:
Commit ca5481c68e9fbcea62bb3c78ae6cccf99ca8fb73 ("sh: pfc: Rudimentary
pinctrl-backed GPIO support.") introduced a regression for platforms that
were doing early GPIO API calls (from arch_initcall() or earlier),
leading to a situation where our two-stage registration logic would trip
itself up and we'd... | ```diff
diff --git a/drivers/sh/pfc/pinctrl.c b/drivers/sh/pfc/pinctrl.c
index 814b29255aef..2804eaae804e 100644
--- a/drivers/sh/pfc/pinctrl.c
+++ b/drivers/sh/pfc/pinctrl.c
@@ -325,20 +325,6 @@ static struct pinctrl_desc sh_pfc_pinctrl_desc = {
.confops = &sh_pfc_pinconf_ops,
};
-int sh_pfc_register_pinctrl(stru... |
4dc4c51675c137c30838425ecc8d471ff5eb138b | Analyze and fix the following issue in the Linux kernel code: serial: sh-sci: fix compilation breakage, when DMA is enabled | Problem Details:
A recent commit:
commit d6fa5a4e7ab605370fd6c982782f84ef2e6660e7
Author: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
serial: sh-sci: prepare for conversion to the shdma base library
is not sufficient to update the sh-sci driver to the new shdma driver
layout. This caused compilation breakage, w... | ```diff
diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c
index d4d8c9453cd8..9be296cf7295 100644
--- a/drivers/tty/serial/sh-sci.c
+++ b/drivers/tty/serial/sh-sci.c
@@ -25,6 +25,7 @@
#include <linux/module.h>
#include <linux/errno.h>
+#include <linux/sh_dma.h>
#include <linux/timer.h>
#inclu... |
d833352a4338dc31295ed832a30c9ccff5c7a183 | Analyze and fix the following issue in the Linux kernel code: mm: hugetlbfs: close race during teardown of hugetlbfs shared page tables | Problem Details:
If a process creates a large hugetlbfs mapping that is eligible for page
table sharing and forks heavily with children some of whom fault and
others which destroy the mapping then it is possible for page tables to
get corrupted. Some teardowns of the mapping encounter a "bad pmd" and
output a message ... | ```diff
diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h
index f9db20bfa9fc..225164842ab6 100644
--- a/include/linux/hugetlb.h
+++ b/include/linux/hugetlb.h
@@ -48,6 +48,10 @@ int follow_hugetlb_page(struct mm_struct *, struct vm_area_struct *,
unsigned long *, int *, int, unsigned int flags);
void u... |
b214514592d2dcb0b9d14ee8dd14f3699e3b0a84 | Analyze and fix the following issue in the Linux kernel code: memcg: add mem_cgroup_from_css() helper | Problem Details:
Add a mem_cgroup_from_css() helper to replace open-coded invokations of
container_of(). To clarify the code and to add a little more type safety.
[akpm@linux-foundation.org: fix extensive breakage]
Signed-off-by: Wanpeng Li <liwanp@linux.vnet.ibm.com>
Acked-by: Michal Hocko <mhocko@suse.cz>
Cc: Johan... | ```diff
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index b06833f2b89e..795e525afaba 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -405,6 +405,12 @@ enum charge_type {
static void mem_cgroup_get(struct mem_cgroup *memcg);
static void mem_cgroup_put(struct mem_cgroup *memcg);
+static inline
+struct mem_cg... |
e62e384e9da8d9a0c599795464a7e76fd490931c | Analyze and fix the following issue in the Linux kernel code: memcg: prevent OOM with too many dirty pages | Problem Details:
The current implementation of dirty pages throttling is not memcg aware
which makes it easy to have memcg LRUs full of dirty pages. Without
throttling, these LRUs can be scanned faster than the rate of writeback,
leading to memcg OOM conditions when the hard limit is small.
This patch fixes the probl... | ```diff
diff --git a/mm/vmscan.c b/mm/vmscan.c
index 88804017e7d6..ca43aa00ea0e 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -720,9 +720,26 @@ static unsigned long shrink_page_list(struct list_head *page_list,
(PageSwapCache(page) && (sc->gfp_mask & __GFP_IO));
if (PageWriteback(page)) {
- nr_writeback++;
-... |
3ad3d901bbcfb15a5e4690e55350db0899095a68 | Analyze and fix the following issue in the Linux kernel code: mm: mmu_notifier: fix freed page still mapped in secondary MMU | Problem Details:
mmu_notifier_release() is called when the process is exiting. It will
delete all the mmu notifiers. But at this time the page belonging to the
process is still present in page tables and is present on the LRU list, so
this race will happen:
CPU 0 CPU 1
mmu_notifier_release: ... | ```diff
diff --git a/mm/mmu_notifier.c b/mm/mmu_notifier.c
index 9a611d3a1848..862b60822d9f 100644
--- a/mm/mmu_notifier.c
+++ b/mm/mmu_notifier.c
@@ -33,6 +33,24 @@
void __mmu_notifier_release(struct mm_struct *mm)
{
struct mmu_notifier *mn;
+ struct hlist_node *n;
+
+ /*
+ * RCU here will block mmu_notifier_unre... |
bdf4f4d2161a795b9323855a81a047bd68f16202 | Analyze and fix the following issue in the Linux kernel code: mm: memcg: only check anon swapin page charges for swap cache | Problem Details:
shmem knows for sure that the page is in swap cache when attempting to
charge a page, because the cache charge entry function has a check for it.
Only anon pages may be removed from swap cache already when trying to
charge their swapin.
Adjust the comment, though: '4969c11 mm: fix swapin race conditio... | ```diff
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 1a2020d72ca0..b06833f2b89e 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -2818,14 +2818,6 @@ static int __mem_cgroup_try_charge_swapin(struct mm_struct *mm,
return 0;
if (!do_swap_account)
goto charge_cur_mm;
- /*
- * A racing thread's fault,... |
24467cacc03cf8b156d4c6786697e5e5d13c9321 | Analyze and fix the following issue in the Linux kernel code: mm: memcg: remove needless !mm fixup to init_mm when charging | Problem Details:
It does not matter to __mem_cgroup_try_charge() if the passed mm is NULL
or init_mm, it will charge the root memcg in either case.
Also fix up the comment in __mem_cgroup_try_charge() that claimed the
init_mm would be charged when no mm was passed. It's not really
incorrect, but confusing. Clarify t... | ```diff
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 17a79e5ed688..10b370345a5b 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -2333,7 +2333,7 @@ static int __mem_cgroup_try_charge(struct mm_struct *mm,
* We always charge the cgroup the mm_struct belongs to.
* The mm_struct's mem_cgroup changes on ... |
5d84c7766e8aacc6e3477bdf02fdb417163cf89b | Analyze and fix the following issue in the Linux kernel code: mm: swapfile: clean up unuse_pte race handling | Problem Details:
The conditional mem_cgroup_cancel_charge_swapin() is a leftover from when
the function would continue to reestablish the page even after
mem_cgroup_try_charge_swapin() failed. After 85d9fc8 "memcg: fix refcnt
handling at swapoff", the condition is always true when this code is
reached.
Signed-off-by:... | ```diff
diff --git a/mm/swapfile.c b/mm/swapfile.c
index 63958d60ecb0..14e254c768fc 100644
--- a/mm/swapfile.c
+++ b/mm/swapfile.c
@@ -835,8 +835,7 @@ static int unuse_pte(struct vm_area_struct *vma, pmd_t *pmd,
pte = pte_offset_map_lock(vma->vm_mm, pmd, addr, &ptl);
if (unlikely(!pte_same(*pte, swp_entry_to_pte(... |
0030f535a5cf9b1841d2088c10a0b2f8f2987460 | Analyze and fix the following issue in the Linux kernel code: mm: memcg: fix compaction/migration failing due to memcg limits | Problem Details:
Compaction (and page migration in general) can currently be hindered
through pages being owned by memory cgroups that are at their limits and
unreclaimable.
The reason is that the replacement page is being charged against the limit
while the page being replaced is also still charged. But this seems
u... | ```diff
diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h
index 5a3ee6423634..8d9489fdab2e 100644
--- a/include/linux/memcontrol.h
+++ b/include/linux/memcontrol.h
@@ -98,9 +98,9 @@ int mm_match_cgroup(const struct mm_struct *mm, const struct mem_cgroup *cgroup)
extern struct cgroup_subsys_state *... |
a564b8f0398636ba30b07c0eaebdef7ff7837249 | Analyze and fix the following issue in the Linux kernel code: nfs: enable swap on NFS | Problem Details:
Implement the new swapfile a_ops for NFS and hook up ->direct_IO. This
will set the NFS socket to SOCK_MEMALLOC and run socket reconnect under
PF_MEMALLOC as well as reset SOCK_MEMALLOC before engaging the protocol
->connect() method.
PF_MEMALLOC should allow the allocation of struct socket and relat... | ```diff
diff --git a/fs/nfs/Kconfig b/fs/nfs/Kconfig
index 404c6a8ac394..6fd5f2cdcd1e 100644
--- a/fs/nfs/Kconfig
+++ b/fs/nfs/Kconfig
@@ -86,6 +86,14 @@ config NFS_V4
If unsure, say Y.
+config NFS_SWAP
+ bool "Provide swap over NFS support"
+ default n
+ depends on NFS_FS
+ select SUNRPC_SWAP
+ help
+ This o... |
c76562b6709fee5eff8a6a779be41c0bce661fd7 | Analyze and fix the following issue in the Linux kernel code: netvm: prevent a stream-specific deadlock | Problem Details:
This patch series is based on top of "Swap-over-NBD without deadlocking
v15" as it depends on the same reservation of PF_MEMALLOC reserves logic.
When a user or administrator requires swap for their application, they
create a swap partition and file, format it with mkswap and activate it
with swapon. ... | ```diff
diff --git a/include/net/sock.h b/include/net/sock.h
index 43a470d40d76..b3730239bf18 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -1329,12 +1329,14 @@ static inline bool sk_wmem_schedule(struct sock *sk, int size)
__sk_mem_schedule(sk, size, SK_MEM_SEND);
}
-static inline bool sk_rmem_sche... |
7f338fe4540b1d0600b02314c7d885fd358e9eca | Analyze and fix the following issue in the Linux kernel code: nbd: set SOCK_MEMALLOC for access to PFMEMALLOC reserves | Problem Details:
Set SOCK_MEMALLOC on the NBD socket to allow access to PFMEMALLOC reserves
so pages backed by NBD, particularly if swap related, can be cleaned to
prevent the machine being deadlocked. It is still possible that the
PFMEMALLOC reserves get depleted resulting in deadlock but this can be
resolved by the ... | ```diff
diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c
index 061427a75d37..76bc96fd01c8 100644
--- a/drivers/block/nbd.c
+++ b/drivers/block/nbd.c
@@ -154,6 +154,7 @@ static int sock_xmit(struct nbd_device *nbd, int send, void *buf, int size,
struct msghdr msg;
struct kvec iov;
sigset_t blocked, oldset;
+... |
b4b9e3558508980fc0cd161a545ffb55a1f13ee9 | Analyze and fix the following issue in the Linux kernel code: netvm: set PF_MEMALLOC as appropriate during SKB processing | Problem Details:
In order to make sure pfmemalloc packets receive all memory needed to
proceed, ensure processing of pfmemalloc SKBs happens under PF_MEMALLOC.
This is limited to a subset of protocols that are expected to be used for
writing to swap. Taps are not allowed to use PF_MEMALLOC as these are
expected to com... | ```diff
diff --git a/include/net/sock.h b/include/net/sock.h
index 81198632ac2a..43a470d40d76 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -754,8 +754,13 @@ static inline __must_check int sk_add_backlog(struct sock *sk, struct sk_buff *s
return 0;
}
+extern int __sk_backlog_rcv(struct sock *sk, stru... |
c93bdd0e03e848555d144eb44a1f275b871a8dd5 | Analyze and fix the following issue in the Linux kernel code: netvm: allow skb allocation to use PFMEMALLOC reserves | Problem Details:
Change the skb allocation API to indicate RX usage and use this to fall
back to the PFMEMALLOC reserve when needed. SKBs allocated from the
reserve are tagged in skb->pfmemalloc. If an SKB is allocated from the
reserve and the socket is later found to be unrelated to page reclaim, the
packet is dropp... | ```diff
diff --git a/include/linux/gfp.h b/include/linux/gfp.h
index cbd7400e5862..4883f393f50a 100644
--- a/include/linux/gfp.h
+++ b/include/linux/gfp.h
@@ -385,6 +385,9 @@ void drain_local_pages(void *dummy);
*/
extern gfp_t gfp_allowed_mask;
+/* Returns true if the gfp_mask allows use of ALLOC_NO_WATERMARK */
... |
7cb0240492caea2f6467f827313478f41877e6ef | Analyze and fix the following issue in the Linux kernel code: netvm: allow the use of __GFP_MEMALLOC by specific sockets | Problem Details:
Allow specific sockets to be tagged SOCK_MEMALLOC and use __GFP_MEMALLOC
for their allocations. These sockets will be able to go below watermarks
and allocate from the emergency reserve. Such sockets are to be used to
service the VM (iow. to swap over). They must be handled kernel side,
exposing su... | ```diff
diff --git a/include/net/sock.h b/include/net/sock.h
index 11ccde65c4cf..bfa7d20e6646 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -621,6 +621,7 @@ enum sock_flags {
SOCK_RCVTSTAMPNS, /* %SO_TIMESTAMPNS setting */
SOCK_LOCALROUTE, /* route locally only, %SO_DONTROUTE setting */
SOCK_QUEUE_S... |
5091b74a95d447e34530e713a8971450a45498b3 | Analyze and fix the following issue in the Linux kernel code: mm: slub: optimise the SLUB fast path to avoid pfmemalloc checks | Problem Details:
This patch removes the check for pfmemalloc from the alloc hotpath and
puts the logic after the election of a new per cpu slab. For a pfmemalloc
page we do not use the fast path but force the use of the slow path which
is also used for the debug case.
This has the side-effect of weakening pfmemalloc ... | ```diff
diff --git a/mm/slub.c b/mm/slub.c
index c3f05e1599c0..8f78e2577031 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -2281,11 +2281,11 @@ new_slab:
}
page = c->page;
- if (likely(!kmem_cache_debug(s)))
+ if (likely(!kmem_cache_debug(s) && pfmemalloc_match(page, gfpflags)))
goto load_freelist;
/* Only ente... |
072bb0aa5e062902968c5c1007bba332c7820cf4 | Analyze and fix the following issue in the Linux kernel code: mm: sl[au]b: add knowledge of PFMEMALLOC reserve pages | Problem Details:
When a user or administrator requires swap for their application, they
create a swap partition and file, format it with mkswap and activate it
with swapon. Swap over the network is considered as an option in diskless
systems. The two likely scenarios are when blade servers are used as part
of a clust... | ```diff
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h
index 074eb98fe15d..375e79eb009b 100644
--- a/include/linux/mm_types.h
+++ b/include/linux/mm_types.h
@@ -54,6 +54,15 @@ struct page {
union {
pgoff_t index; /* Our offset within mapping. */
void *freelist; /* slub/slob first free obj... |
702d1a6e0766d45642c934444fd41f658d251305 | Analyze and fix the following issue in the Linux kernel code: memory-hotplug: fix kswapd looping forever problem | Problem Details:
When hotplug offlining happens on zone A, it starts to mark freed page as
MIGRATE_ISOLATE type in buddy for preventing further allocation.
(MIGRATE_ISOLATE is very irony type because it's apparently on buddy but
we can't allocate them).
When the memory shortage happens during hotplug offlining, curren... | ```diff
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
index 98f079bcf399..64b2c3a48286 100644
--- a/include/linux/mmzone.h
+++ b/include/linux/mmzone.h
@@ -478,6 +478,14 @@ struct zone {
* rarely used fields:
*/
const char *name;
+#ifdef CONFIG_MEMORY_ISOLATION
+ /*
+ * the number of MIGRATE_IS... |
2cfed0752808625d30aca7fc9f383af386fd8a13 | Analyze and fix the following issue in the Linux kernel code: mm: fix free page check in zone_watermark_ok() | Problem Details:
__zone_watermark_ok currently compares free_pages which is a signed type
with z->lowmem_reserve[classzone_idx] which is unsigned which might lead
to sign overflow if free_pages doesn't satisfy the given order (or it came
as negative already) and then we rely on the following order loop to fix
it (which... | ```diff
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 228194728ccd..2e6635993558 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -1595,6 +1595,7 @@ static bool __zone_watermark_ok(struct zone *z, int order, unsigned long mark,
{
/* free_pages my go negative - that's OK */
long min = mark;
+ long lowme... |
6b0c81b3be114a93f79bd4c5639ade5107d77c21 | Analyze and fix the following issue in the Linux kernel code: mm, oom: reduce dependency on tasklist_lock | Problem Details:
Since exiting tasks require write_lock_irq(&tasklist_lock) several times,
try to reduce the amount of time the readside is held for oom kills. This
makes the interface with the memcg oom handler more consistent since it
now never needs to take tasklist_lock unnecessarily.
The only time the oom killer... | ```diff
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index b78972e2f43f..77a29cea5d76 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -1521,11 +1521,8 @@ void __mem_cgroup_out_of_memory(struct mem_cgroup *memcg, gfp_t gfp_mask,
if (!chosen)
return;
points = chosen_points * 1000 / totalpages;
- read_lock(... |
340175b7d14d5617559d0c1a54fa0ea204d9edcd | Analyze and fix the following issue in the Linux kernel code: mm/hotplug: free zone->pageset when a zone becomes empty | Problem Details:
When a zone becomes empty after memory offlining, free zone->pageset.
Otherwise it will cause memory leak when adding memory to the empty zone
again because build_all_zonelists() will allocate zone->pageset for an
empty zone.
Signed-off-by: Jiang Liu <liuj97@gmail.com>
Signed-off-by: Wei Wang <Bessel.... | ```diff
diff --git a/include/linux/mm.h b/include/linux/mm.h
index 3955bedeeed1..7c6dfd2faa69 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -1331,6 +1331,7 @@ void warn_alloc_failed(gfp_t gfp_mask, int order, const char *fmt, ...);
extern void setup_per_cpu_pageset(void);
extern void zone_pcp_update(s... |
08dff7b7d629807dbb1f398c68dd9cd58dd657a1 | Analyze and fix the following issue in the Linux kernel code: mm/hotplug: correctly add new zone to all other nodes' zone lists | Problem Details:
When online_pages() is called to add new memory to an empty zone, it
rebuilds all zone lists by calling build_all_zonelists(). But there's a
bug which prevents the new zone to be added to other nodes' zone lists.
online_pages() {
build_all_zonelists()
.....
node_set_state(zone_to_nid(zone), N_HIGH... | ```diff
diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c
index b8731040b9f9..597d371329d3 100644
--- a/mm/memory_hotplug.c
+++ b/mm/memory_hotplug.c
@@ -512,19 +512,20 @@ int __ref online_pages(unsigned long pfn, unsigned long nr_pages)
zone->present_pages += onlined_pages;
zone->zone_pgdat->node_present_pa... |
ca57df79d4f64e1a4886606af4289d40636189c5 | Analyze and fix the following issue in the Linux kernel code: mm: setup pageblock_order before it's used by sparsemem | Problem Details:
On architectures with CONFIG_HUGETLB_PAGE_SIZE_VARIABLE set, such as
Itanium, pageblock_order is a variable with default value of 0. It's set
to the right value by set_pageblock_order() in function
free_area_init_core().
But pageblock_order may be used by sparse_init() before free_area_init_core()
is... | ```diff
diff --git a/mm/internal.h b/mm/internal.h
index da6b9b2ed3fc..3314f79d775a 100644
--- a/mm/internal.h
+++ b/mm/internal.h
@@ -353,3 +353,5 @@ extern u32 hwpoison_filter_enable;
extern unsigned long vm_mmap_pgoff(struct file *, unsigned long,
unsigned long, unsigned long,
unsigned long, unsig... |
8e125cd85517c9716695b0abfabc0a4a3fcb94f3 | Analyze and fix the following issue in the Linux kernel code: vmscan: remove obsolete shrink_control comment | Problem Details:
09f363c7 ("vmscan: fix shrinker callback bug in fs/super.c") fixed a
shrinker callback which was returning -1 when nr_to_scan is zero, which
caused excessive slab scanning. But 635697c6 ("vmscan: fix initial
shrinker size handling") fixed the problem, again so we can freely return
-1 although nr_to_sc... | ```diff
diff --git a/fs/super.c b/fs/super.c
index 4c5d82f56ec4..4bf714459a4b 100644
--- a/fs/super.c
+++ b/fs/super.c
@@ -62,7 +62,7 @@ static int prune_super(struct shrinker *shrink, struct shrink_control *sc)
return -1;
if (!grab_super_passive(sb))
- return !sc->nr_to_scan ? 0 : -1;
+ return -1;
if (sb-... |
7db8889ab05b57200158432755af318fb68854a2 | Analyze and fix the following issue in the Linux kernel code: mm: have order > 0 compaction start off where it left | Problem Details:
Order > 0 compaction stops when enough free pages of the correct page
order have been coalesced. When doing subsequent higher order
allocations, it is possible for compaction to be invoked many times.
However, the compaction code always starts out looking for things to
compact at the start of the zon... | ```diff
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
index 1495d952e641..1aeadce4d56e 100644
--- a/include/linux/mmzone.h
+++ b/include/linux/mmzone.h
@@ -368,6 +368,10 @@ struct zone {
*/
spinlock_t lock;
int all_unreclaimable; /* All pages pinned */
+#if defined CONFIG_COMP... |
567fb435bb7a37afda35902b884562c40756dc45 | Analyze and fix the following issue in the Linux kernel code: memcg: fix bad behavior in use_hierarchy file | Problem Details:
I have an application that does the following:
* copy the state of all controllers attached to a hierarchy
* replicate it as a child of the current level.
I would expect writes to the files to mostly succeed, since they are
inheriting sane values from parents.
But that is not the case for use_hierar... | ```diff
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 55a85e1a342f..6d3dd54ec429 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -3764,6 +3764,10 @@ static int mem_cgroup_hierarchy_write(struct cgroup *cont, struct cftype *cft,
parent_memcg = mem_cgroup_from_cont(parent);
cgroup_lock();
+
+ if (memc... |
c255a458055e459f65eb7b7f51dc5dbdd0caf1d8 | Analyze and fix the following issue in the Linux kernel code: memcg: rename config variables | Problem Details:
Sanity:
CONFIG_CGROUP_MEM_RES_CTLR -> CONFIG_MEMCG
CONFIG_CGROUP_MEM_RES_CTLR_SWAP -> CONFIG_MEMCG_SWAP
CONFIG_CGROUP_MEM_RES_CTLR_SWAP_ENABLED -> CONFIG_MEMCG_SWAP_ENABLED
CONFIG_CGROUP_MEM_RES_CTLR_KMEM -> CONFIG_MEMCG_KMEM
[mhocko@suse.cz: fix missed bits]
Cc: Glauber Costa <glommer@parallels.com>... | ```diff
diff --git a/Documentation/cgroups/memory.txt b/Documentation/cgroups/memory.txt
index dd88540bb995..672676ac9615 100644
--- a/Documentation/cgroups/memory.txt
+++ b/Documentation/cgroups/memory.txt
@@ -187,12 +187,12 @@ the cgroup that brought it in -- this will happen on memory pressure).
But see section 8.2... |
121d1ba0a019e1465a53533aea133b1b0f6b442d | Analyze and fix the following issue in the Linux kernel code: mm, oom: fix potential killing of thread that is disabled from oom killing | Problem Details:
/proc/sys/vm/oom_kill_allocating_task will immediately kill current when
the oom killer is called to avoid a potentially expensive tasklist scan
for large systems.
Currently, however, it is not checking current's oom_score_adj value which
may be OOM_SCORE_ADJ_MIN, meaning that it has been disabled fro... | ```diff
diff --git a/mm/oom_kill.c b/mm/oom_kill.c
index e8ab3dfbc74b..50e74373e855 100644
--- a/mm/oom_kill.c
+++ b/mm/oom_kill.c
@@ -719,9 +719,9 @@ void out_of_memory(struct zonelist *zonelist, gfp_t gfp_mask,
check_panic_on_oom(constraint, gfp_mask, order, mpol_mask);
read_lock(&tasklist_lock);
- if (sysctl_o... |
2a13515c398bbe471bf64519ada87fd708152ced | Analyze and fix the following issue in the Linux kernel code: mm: clear pages_scanned only if draining a pcp adds pages to the buddy allocator again | Problem Details:
commit 2ff754fa8f ("mm: clear pages_scanned only if draining a pcp adds
pages to the buddy allocator again") fixed one free_pcppages_bulk()
misuse. But two another miuse still exist.
This patch fixes it.
Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Acked-by: David Rientjes <rientj... | ```diff
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 80ef99234b89..18747528eec3 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -1158,8 +1158,10 @@ void drain_zone_pages(struct zone *zone, struct per_cpu_pages *pcp)
to_drain = pcp->batch;
else
to_drain = pcp->count;
- free_pcppages_bulk(zone, to_d... |
3d3727cdb07ff17ddc3c551ef8d03d37b60a0372 | Analyze and fix the following issue in the Linux kernel code: mm, fadvise: don't return -EINVAL when filesystem cannot implement fadvise() | Problem Details:
Eric Wong reported his test suite failex when /tmp is tmpfs.
https://lkml.org/lkml/2012/2/24/479
Currentlt the input check of POSIX_FADV_WILLNEED has two problems.
- requires a_ops->readpage. But in fact, force_page_cache_readahead()
requires that the target filesystem has either ->readpage or ->... | ```diff
diff --git a/mm/fadvise.c b/mm/fadvise.c
index 469491e0af79..9b75a045dbf4 100644
--- a/mm/fadvise.c
+++ b/mm/fadvise.c
@@ -93,11 +93,6 @@ SYSCALL_DEFINE(fadvise64_64)(int fd, loff_t offset, loff_t len, int advice)
spin_unlock(&file->f_lock);
break;
case POSIX_FADV_WILLNEED:
- if (!mapping->a_ops->readp... |
df858fa8276f85106f2f5c3cd49c1fa524058070 | Analyze and fix the following issue in the Linux kernel code: documentation: update how page-cluster affects swap I/O | Problem Details:
Fix of the documentation of /proc/sys/vm/page-cluster to match the
behavior of the code and add some comments about what the tunable will
change in that behavior.
Signed-off-by: Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com>
Acked-by: Jens Axboe <axboe@kernel.dk>
Reviewed-by: Minchan Kim <minchan@ke... | ```diff
diff --git a/Documentation/sysctl/vm.txt b/Documentation/sysctl/vm.txt
index 96f0ee825bed..84eb25cd69aa 100644
--- a/Documentation/sysctl/vm.txt
+++ b/Documentation/sysctl/vm.txt
@@ -574,16 +574,24 @@ of physical RAM. See above.
page-cluster
-page-cluster controls the number of pages which are written to ... |
c2cddf991974a00aa7b40a21e829bc034b8199b6 | Analyze and fix the following issue in the Linux kernel code: drivers/media/video/v4l2-ioctl.c: fix build | Problem Details:
Fix zillions of these:
drivers/media/video/v4l2-ioctl.c:1848: error: unknown field 'func' specified in initializer
drivers/media/video/v4l2-ioctl.c:1848: warning: missing braces around initializer
drivers/media/video/v4l2-ioctl.c:1848: warning: (near initialization for 'v4l2_ioctls[0].<anonymous>')
dr... | ```diff
diff --git a/drivers/media/video/v4l2-ioctl.c b/drivers/media/video/v4l2-ioctl.c
index 70e0efb127a6..4b4059d64272 100644
--- a/drivers/media/video/v4l2-ioctl.c
+++ b/drivers/media/video/v4l2-ioctl.c
@@ -1831,7 +1831,9 @@ struct v4l2_ioctl_info {
.ioctl = _ioctl, \
.flags = _flags | INFO_FL_STD, \
... |
c66af411189fdae3bcb301fae830f078fc205fca | Analyze and fix the following issue in the Linux kernel code: xtensa: select generic atomic64_t support | Problem Details:
This will fix build errors:
block/blk-cgroup.c:609:2: error: unknown type name 'atomic64_t'
block/blk-cgroup.c:609:2: error: implicit declaration of function 'ATOMIC64_INIT' [-Werror=implicit-function-declaration]
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Cc: Chris Zankel <chris@zankel.net... | ```diff
diff --git a/arch/xtensa/Kconfig b/arch/xtensa/Kconfig
index 8a3f8351f438..8ed64cfae4ff 100644
--- a/arch/xtensa/Kconfig
+++ b/arch/xtensa/Kconfig
@@ -7,6 +7,7 @@ config ZONE_DMA
config XTENSA
def_bool y
select HAVE_IDE
+ select GENERIC_ATOMIC64
select HAVE_GENERIC_HARDIRQS
select GENERIC_IRQ_SHOW
se... |
d6b09e754c23b657544f6e7f39fbf7de24c58aa2 | Analyze and fix the following issue in the Linux kernel code: fault-injection: fix failcmd.sh warning | Problem Details:
"fault-injection: add tool to run command with failslab or
fail_page_alloc" added tools/testing/fault-injection/failcmd.sh to make it
easier to inject slab/page allocation failures by fault injection.
failcmd.sh prints the following warning when running with arguments
for command.
# ./failcmd.sh ech... | ```diff
diff --git a/tools/testing/fault-injection/failcmd.sh b/tools/testing/fault-injection/failcmd.sh
index 1776e924b202..78a9ed7fecdb 100644
--- a/tools/testing/fault-injection/failcmd.sh
+++ b/tools/testing/fault-injection/failcmd.sh
@@ -206,7 +206,7 @@ while true; do
esac
done
-[ -z "$@" ] && exit 0
+[ -z "$... |
54764bb647b2e847c512acf8d443df965da35000 | Analyze and fix the following issue in the Linux kernel code: ipv4: Restore old dst_free() behavior. | Problem Details:
commit 404e0a8b6a55 (net: ipv4: fix RCU races on dst refcounts) tried
to solve a race but added a problem at device/fib dismantle time :
We really want to call dst_free() as soon as possible, even if sockets
still have dst in their cache.
dst_release() calls in free_fib_info_rcu() are not welcomed.
R... | ```diff
diff --git a/include/net/dst.h b/include/net/dst.h
index 31a9fd39edb6..baf597890064 100644
--- a/include/net/dst.h
+++ b/include/net/dst.h
@@ -61,7 +61,6 @@ struct dst_entry {
#define DST_NOPEER 0x0040
#define DST_FAKE_RTABLE 0x0080
#define DST_XFRM_TUNNEL 0x0100
-#define DST_RCU_FREE 0x0200
unsigned... |
0ac13140d796eb1e2f8956aea97a6e5e4ebcf981 | Analyze and fix the following issue in the Linux kernel code: NVMe: Fix whitespace damage in nvme_init | Problem Details:
Commit 5c42ea1643 used spaces instead of tabs.
Also remove the unnecessary initialisation of the 'result' variable.
Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com> | ```diff
diff --git a/drivers/block/nvme.c b/drivers/block/nvme.c
index 064e86a6bb4e..0ba6b7cb344b 100644
--- a/drivers/block/nvme.c
+++ b/drivers/block/nvme.c
@@ -1720,7 +1720,7 @@ static struct pci_driver nvme_driver = {
static int __init nvme_init(void)
{
- int result = -EBUSY;
+ int result;
nvme_thread = kth... |
58f598ff0bb0c030e026a0738450c6a46248f6a8 | Analyze and fix the following issue in the Linux kernel code: ASoC: ab8500: Inform SoC Core that we have our own I/O arrangements | Problem Details:
If codec->control_data is not populated SoC Core assumes we want to
use regmap, which fails catastrophically, as we don't have one:
Unable to handle kernel NULL pointer dereference at virtual address 00000080
pgd = c0004000
[00000080] *pgd=00000000
Internal error: Oops: 17 [#1] PREEMPT SMP ARM
Modules... | ```diff
diff --git a/sound/soc/codecs/ab8500-codec.c b/sound/soc/codecs/ab8500-codec.c
index 3c795921c5f6..23b40186f9b8 100644
--- a/sound/soc/codecs/ab8500-codec.c
+++ b/sound/soc/codecs/ab8500-codec.c
@@ -2406,6 +2406,10 @@ static int ab8500_codec_probe(struct snd_soc_codec *codec)
/* Setup AB8500 according to bo... |
d07bdfd322d307789f15b427dbcc39257665356f | Analyze and fix the following issue in the Linux kernel code: perf/x86: Fix USER/KERNEL tagging of samples properly | Problem Details:
Some PMUs don't provide a full register set for their sample,
specifically 'advanced' PMUs like AMD IBS and Intel PEBS which provide
'better' than regular interrupt accuracy.
In this case we use the interrupt regs as basis and over-write some
fields (typically IP) with different information.
The perf... | ```diff
diff --git a/arch/x86/include/asm/perf_event.h b/arch/x86/include/asm/perf_event.h
index dab39350e51e..cb4e43bce98a 100644
--- a/arch/x86/include/asm/perf_event.h
+++ b/arch/x86/include/asm/perf_event.h
@@ -196,11 +196,16 @@ static inline u32 get_ibs_caps(void) { return 0; }
extern void perf_events_lapic_init(... |
7740dfc0363a70546ef25c0383aca252f95a91d2 | Analyze and fix the following issue in the Linux kernel code: perf/x86/intel/uncore: Make UNCORE_PMU_HRTIMER_INTERVAL 64-bit | Problem Details:
i386 allmodconfig:
arch/x86/kernel/cpu/perf_event_intel_uncore.c: In function 'uncore_pmu_hrtimer':
arch/x86/kernel/cpu/perf_event_intel_uncore.c:728: warning: integer overflow in expression
arch/x86/kernel/cpu/perf_event_intel_uncore.c: In function 'uncore_pmu_start_hrtimer':
arch/x86/kernel/cpu/... | ```diff
diff --git a/arch/x86/kernel/cpu/perf_event_intel_uncore.h b/arch/x86/kernel/cpu/perf_event_intel_uncore.h
index f3851892e077..c9e5dc56630a 100644
--- a/arch/x86/kernel/cpu/perf_event_intel_uncore.h
+++ b/arch/x86/kernel/cpu/perf_event_intel_uncore.h
@@ -5,7 +5,7 @@
#include "perf_event.h"
#define UNCORE_PM... |
ae6aa16fdc163afe6b04b6c073ad4ddd4663c03b | Analyze and fix the following issue in the Linux kernel code: kprobes: introduce ftrace based optimization | Problem Details:
Introduce function trace based kprobes optimization.
With using ftrace optimization, kprobes on the mcount calling
address, use ftrace's mcount call instead of breakpoint.
Furthermore, this optimization works with preemptive kernel
not like as current jump-based optimization. Of cource,
this feature w... | ```diff
diff --git a/include/linux/kprobes.h b/include/linux/kprobes.h
index b6e1f8c00577..aa0d05e852e3 100644
--- a/include/linux/kprobes.h
+++ b/include/linux/kprobes.h
@@ -38,6 +38,7 @@
#include <linux/spinlock.h>
#include <linux/rcupdate.h>
#include <linux/mutex.h>
+#include <linux/ftrace.h>
#ifdef CONFIG_KPR... |
6b77863b719a4e32909c218c0d5a83a14f4d98c5 | Analyze and fix the following issue in the Linux kernel code: mac80211: fix current vs. operating channel in preq/beacon | Problem Details:
When sending probe requests, e.g. during software scanning,
these will go out on the *current* channel, so their IEs
need to be built from the current channel. At other times,
e.g. for beacons or probe request templates, the IEs will
be used on the *operating* channel and using the current
channel inst... | ```diff
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index 1b8d19112943..5583f5b73dc9 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -2655,6 +2655,7 @@ ieee80211_prep_tdls_encap_data(struct wiphy *wiphy, struct net_device *dev,
u16 status_code, struct sk_buff *skb)
{
struct ieee80211_... |
930e1915e73dd12c5e3a0e6a5a4349bdb9ab0ab7 | Analyze and fix the following issue in the Linux kernel code: wlcore: don't get the hlid from a queued skb | Problem Details:
There was a bug hiding here since the hlid was sometimes inferred from
the sta, which might be invalid at this point.
Instead, propagate the hlid from the skb-queue where we got the skb
in the first place.
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Acked-by: Luciano Coelho <coelho@ti.com>
Signed-o... | ```diff
diff --git a/drivers/net/wireless/ti/wlcore/tx.c b/drivers/net/wireless/ti/wlcore/tx.c
index f0081f746482..6ec29df386e0 100644
--- a/drivers/net/wireless/ti/wlcore/tx.c
+++ b/drivers/net/wireless/ti/wlcore/tx.c
@@ -344,13 +344,12 @@ static void wl1271_tx_fill_hdr(struct wl1271 *wl, struct wl12xx_vif *wlvif,
... |
7eeff74c29259e9cb7765e3845c0b74057f744da | Analyze and fix the following issue in the Linux kernel code: mac80211: don't react to beacon loss if HW monitoring | Problem Details:
If the HW is monitoring connection loss (as advertised
by IEEE80211_HW_CONNECTION_MONITOR) but not filtering
beacons (IEEE80211_VIF_BEACON_FILTER) then mac80211 will
still start the beacon loss timer and if a few beacons
are lost, e.g. due to scanning, drop the connection.
If the hardware doesn't adve... | ```diff
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 725258c20746..81b2269e8f3a 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -146,6 +146,9 @@ void ieee80211_sta_reset_beacon_monitor(struct ieee80211_sub_if_data *sdata)
if (sdata->vif.driver_flags & IEEE80211_VIF_BEACON_FILTER)
retu... |
f96a4216e85050c0a9d41a41ecb0ae9d8e39b509 | Analyze and fix the following issue in the Linux kernel code: USB: echi-dbgp: increase the controller wait time to come out of halt. | Problem Details:
The default 10 microsecond delay for the controller to come out of
halt in dbgp_ehci_startup is too short, so increase it to 1 millisecond.
This is based on emperical testing on various USB debug ports on
modern machines such as a Lenovo X220i and an Ivybridge development
platform that needed to wait ... | ```diff
diff --git a/drivers/usb/early/ehci-dbgp.c b/drivers/usb/early/ehci-dbgp.c
index 1fc8f1249806..347bb058e1ee 100644
--- a/drivers/usb/early/ehci-dbgp.c
+++ b/drivers/usb/early/ehci-dbgp.c
@@ -450,7 +450,7 @@ static int dbgp_ehci_startup(void)
writel(FLAG_CF, &ehci_regs->configured_flag);
/* Wait until the ... |
b10d22d6e8f76b9e94871aebe0fc62aab2748200 | Analyze and fix the following issue in the Linux kernel code: kernel/debug: Make use of KGDB_REASON_NMI | Problem Details:
Currently kernel never set KGDB_REASON_NMI. We do now, when we enter
KGDB/KDB from an NMI.
This is not to be confused with kgdb_nmicallback(), NMI callback is
an entry for the slave CPUs during CPUs roundup, but REASON_NMI is the
entry for the master CPU.
Signed-off-by: Anton Vorontsov <anton.voronts... | ```diff
diff --git a/kernel/debug/kdb/kdb_debugger.c b/kernel/debug/kdb/kdb_debugger.c
index 8b68ce78ff17..be7b33b73d30 100644
--- a/kernel/debug/kdb/kdb_debugger.c
+++ b/kernel/debug/kdb/kdb_debugger.c
@@ -12,6 +12,7 @@
#include <linux/kdb.h>
#include <linux/kdebug.h>
#include <linux/export.h>
+#include <linux/hard... |
04e8c7bc2c1eda2d06ff6eb57a7df97e64d895e6 | Analyze and fix the following issue in the Linux kernel code: ARM: 7464/1: mmc: omap_hsmmc: ensure probe returns error if DMA channel request fails | Problem Details:
If dma_request_channel() fails (e.g. because DMA enine is not built
into the kernel), the return value from probe is zero causing the
driver to be bound to the device even though probe failed.
To fix, ensure that probe returns an error value when a DMA channel
request fail.
Signed-off-by: Kevin Hilma... | ```diff
diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
index 2338703746a4..823d21cb87c0 100644
--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc/host/omap_hsmmc.c
@@ -1924,12 +1924,14 @@ static int __devinit omap_hsmmc_probe(struct platform_device *pdev)
host->rx_chan = dma_request_cha... |
15ac49b65024f55c4371a53214879a9c77c4fbf9 | Analyze and fix the following issue in the Linux kernel code: ARM: Fix undefined instruction exception handling | Problem Details:
While trying to get a v3.5 kernel booted on the cubox, I noticed that
VFP does not work correctly with VFP bounce handling. This is because
of the confusion over 16-bit vs 32-bit instructions, and where PC is
supposed to point to.
The rule is that FP handlers are entered with regs->ARM_pc pointing at... | ```diff
diff --git a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S
index 0d1851ca6eb9..0f82098c9bfe 100644
--- a/arch/arm/kernel/entry-armv.S
+++ b/arch/arm/kernel/entry-armv.S
@@ -244,6 +244,19 @@ svc_preempt:
b 1b
#endif
+__und_fault:
+ @ Correct the PC such that it is pointing at the instruction
+... |
2fb2ca6f5b953192d5a94fcc778d9abba06462df | Analyze and fix the following issue in the Linux kernel code: floppy: remove duplicated flag FD_RAW_NEED_DISK | Problem Details:
Fix coccinelle warning (without behavior change):
drivers/block/floppy.c:2518:32-48: duplicated argument to & or |
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz> | ```diff
diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c
index 1347ba8b8377..9d6ef68e2f1b 100644
--- a/drivers/block/floppy.c
+++ b/drivers/block/floppy.c
@@ -2516,8 +2516,7 @@ static int make_raw_rw_request(void)
set_fdc((long)current_req->rq_disk->private_data);
raw_cmd = &default_raw_cmd;
- raw_cmd... |
c5dff4ffd327088d85035bec535b7d0c9ea03151 | Analyze and fix the following issue in the Linux kernel code: ARM: 7480/1: only call smp_send_stop() on SMP | Problem Details:
On reboot or poweroff (machine_shutdown()) a call to smp_send_stop() is
made (to stop the others CPU's) when CONFIG_SMP=y.
arch/arm/kernel/process.c:
void machine_shutdown(void)
{
#ifdef CONFIG_SMP
smp_send_stop();
#endif
}
smp_send_stop() calls the function pointer smp_cross_call(), which ... | ```diff
diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c
index aea74f5bc34a..ebd8ad274d76 100644
--- a/arch/arm/kernel/smp.c
+++ b/arch/arm/kernel/smp.c
@@ -563,7 +563,8 @@ void smp_send_stop(void)
cpumask_copy(&mask, cpu_online_mask);
cpumask_clear_cpu(smp_processor_id(), &mask);
- smp_cross_call(&mask... |
24b35521b8ddf088531258f06f681bb7b227bf47 | Analyze and fix the following issue in the Linux kernel code: ARM: 7477/1: vfp: Always save VFP state in vfp_pm_suspend on UP | Problem Details:
vfp_pm_suspend should save the VFP state in suspend after
any lazy context switch. If it only saves when the VFP is enabled,
the state can get lost when, on a UP system:
Thread 1 uses the VFP
Context switch occurs to thread 2, VFP is disabled but the
VFP context is not saved
Thread 2 initia... | ```diff
diff --git a/arch/arm/vfp/vfpmodule.c b/arch/arm/vfp/vfpmodule.c
index 9428006728f2..fb849d044bde 100644
--- a/arch/arm/vfp/vfpmodule.c
+++ b/arch/arm/vfp/vfpmodule.c
@@ -457,6 +457,12 @@ static int vfp_pm_suspend(void)
/* disable, just in case */
fmxr(FPEXC, fmrx(FPEXC) & ~FPEXC_EN);
+ } else if (vfp_c... |
4c36595ec87115f2f876f7d4fdec8ca284a42b9c | Analyze and fix the following issue in the Linux kernel code: ARM: 7468/1: ftrace: Trace function entry before updating index | Problem Details:
Commit 722b3c74695377d11d18a52f3da08114d37f3f37 modified x86 ftrace to
avoid tracing all functions called from irqs when function graph was
used with a filter. Port the same fix to ARM.
Acked-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Colin Cross <ccross@android.com>
Signed-off-by: Russe... | ```diff
diff --git a/arch/arm/kernel/ftrace.c b/arch/arm/kernel/ftrace.c
index df0bf0c8cb79..34e56647dcee 100644
--- a/arch/arm/kernel/ftrace.c
+++ b/arch/arm/kernel/ftrace.c
@@ -179,19 +179,20 @@ void prepare_ftrace_return(unsigned long *parent, unsigned long self_addr,
old = *parent;
*parent = return_hooker;
- ... |
1f43f6c1bc8d740e75b4177eb29110858bb5fea2 | Analyze and fix the following issue in the Linux kernel code: ALSA: hda - Fix mute-LED GPIO initialization for IDT codecs | Problem Details:
The IDT codecs initializes the GPIO setup for mute LEDs via
snd_hda_sync_vmaster_hook(). This works in most cases except for the
very first call, which is called before PCM and control creations.
Thus before Master switch is set manually via alsactl, the mute LED
may show the wrong state, depending on... | ```diff
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
index a760c30f1caa..94040ccf8e8f 100644
--- a/sound/pci/hda/patch_sigmatel.c
+++ b/sound/pci/hda/patch_sigmatel.c
@@ -4420,7 +4420,12 @@ static int stac92xx_init(struct hda_codec *codec)
snd_hda_jack_report_sync(codec);
/* sync m... |
ff8a1e274cbc11da6b57849f925b895a212b56c9 | Analyze and fix the following issue in the Linux kernel code: ALSA: hda - Fix polarity of mute LED on HP Mini 210 | Problem Details:
The commit a3e199732b made the LED working again on HP Mini 210 but
with a wrong polarity. This patch fixes the polarity for this
machine, and also introduce a new model string "hp-inv-led".
Bugzilla: https://bugzilla.novell.com/show_bug.cgi?id=772923
Cc: <stable@vger.kernel.org> [v3.3+]
Signed-off-... | ```diff
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
index 217ee1f344b8..a760c30f1caa 100644
--- a/sound/pci/hda/patch_sigmatel.c
+++ b/sound/pci/hda/patch_sigmatel.c
@@ -102,6 +102,7 @@ enum {
STAC_HP_DV7_4000,
STAC_HP_ZEPHYR,
STAC_92HD83XXX_HP_LED,
+ STAC_92HD83XXX_HP_INV_LED,
... |
ad36cb0d1d3e2b7f161cd33932433f9349cade1e | Analyze and fix the following issue in the Linux kernel code: powerpc/kvm/book3s_32: Fix MTMSR_EERI macro | Problem Details:
Commit b38c77d82e4 moved the MTMSR_EERI macro from the KVM code to generic
ppc_asm.h code. However, while adding it in the headers for the ppc32 case,
it missed out to remove the former definition in the KVM code.
This patch fixes compilation on server type PPC32 targets with CONFIG_KVM
enabled.
Sign... | ```diff
diff --git a/arch/powerpc/kvm/book3s_rmhandlers.S b/arch/powerpc/kvm/book3s_rmhandlers.S
index ab523f3c1731..9ecf6e35cd8d 100644
--- a/arch/powerpc/kvm/book3s_rmhandlers.S
+++ b/arch/powerpc/kvm/book3s_rmhandlers.S
@@ -67,7 +67,6 @@ kvmppc_skip_Hinterrupt:
#elif defined(CONFIG_PPC_BOOK3S_32)
#define FUNC(na... |
b42353011e9001e88f5a57097dcf7d9424a0e9c4 | Analyze and fix the following issue in the Linux kernel code: [media] s5k6aa: Add missing static storage class specifier | Problem Details:
Fixes the following sparse warning:
drivers/media/video/s5k6aa.c:1439:5: warning:
symbol 's5k6aa_check_fw_revision' was not declared. Should it be static?
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com> | ```diff
diff --git a/drivers/media/video/s5k6aa.c b/drivers/media/video/s5k6aa.c
index 6625e46a4638..decb64808346 100644
--- a/drivers/media/video/s5k6aa.c
+++ b/drivers/media/video/s5k6aa.c
@@ -1436,7 +1436,7 @@ static int s5k6aa_open(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
return 0;
}
-int s5k6aa_chec... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.