id stringlengths 40 40 | instruction stringlengths 68 308 | input stringlengths 17 33.4k | output stringlengths 100 30k |
|---|---|---|---|
4678d6f970c2f7c0cbfefc0cc666432d153b321b | Analyze and fix the following issue in the Linux kernel code: virtio_blk: fix config handler race | Problem Details:
Fix a theoretical race related to config work
handler: a config interrupt might happen
after we flush config work but before we
reset the device. It will then cause the
config work to run during or after reset.
Two problems with this:
- if this runs after device is gone we will get use after free
- ac... | ```diff
diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c
index a345e40e1bca..ba73661fb9f3 100644
--- a/drivers/block/virtio_blk.c
+++ b/drivers/block/virtio_blk.c
@@ -4,6 +4,7 @@
#include <linux/blkdev.h>
#include <linux/hdreg.h>
#include <linux/module.h>
+#include <linux/mutex.h>
#include <linu... |
e93300b1afc7cd4fe1e741ceaf06714d060e88b8 | Analyze and fix the following issue in the Linux kernel code: virtio: add debugging if driver doesn't kick. | Problem Details:
Under the existing #ifdef DEBUG, check that they don't have more than
1/10 of a second between an add_buf() and a
virtqueue_notify()/virtqueue_kick_prepare() call.
We could get false positives on a really busy system, but good for
development.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> | ```diff
diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c
index 36bb6a613728..79e1b292c030 100644
--- a/drivers/virtio/virtio_ring.c
+++ b/drivers/virtio/virtio_ring.c
@@ -22,6 +22,7 @@
#include <linux/device.h>
#include <linux/slab.h>
#include <linux/module.h>
+#include <linux/hrtimer.h>
/... |
ceb6143b2df81c8a554bd5de898087926568cc51 | Analyze and fix the following issue in the Linux kernel code: mmc: sdhci: fix vmmc handling | Problem Details:
Presently the vmmc regulator is enabled when the host
controller is added and disabled when it is removed.
However, the vmmc regulator should be under the control
of the upper layers via ->set_ios(). Make it so.
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Chris Ball <cjb@lap... | ```diff
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index ab6018fc2338..6a35d0368117 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -1170,7 +1170,7 @@ out:
host->clock = clock;
}
-static void sdhci_set_power(struct sdhci_host *host, unsigned short power)
+static int sd... |
ee4b88879f23badd54f5557852745fa28a1570f6 | Analyze and fix the following issue in the Linux kernel code: mmc: sh_mmcif: cosmetic clean up | Problem Details:
This patch doesn't introduce any functional changes, it only simplifies
some code fragments, removes superfluous parameters, fixes typos.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Chris Ball <cjb@laptop.org> | ```diff
diff --git a/drivers/mmc/host/sh_mmcif.c b/drivers/mmc/host/sh_mmcif.c
index 0cba85a7f561..8aee127e60b8 100644
--- a/drivers/mmc/host/sh_mmcif.c
+++ b/drivers/mmc/host/sh_mmcif.c
@@ -124,6 +124,11 @@
#define MASK_MRBSYTO (1 << 1)
#define MASK_MRSPTO (1 << 0)
+#define MASK_START_CMD (MASK_MCMDVIO | MASK_M... |
913047e9e5787a90696533a9f109552b7694ecc9 | Analyze and fix the following issue in the Linux kernel code: mmc: core: Fix voltage select in DDR mode | Problem Details:
This patch fixes the wrong comparison before setting the interface
voltage in DDR mode.
The assignment to the variable ddr before comaprison is either
ddr = MMC_1_2V_DDR_MODE; or ddr == MMC_1_8V_DDR_MODE. But the comparison
is done with the extended csd value if ddr == EXT_CSD_CARD_TYPE_DDR_1_2V.
Sig... | ```diff
diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c
index 006e932a3ae3..f0a9f1fbd1f6 100644
--- a/drivers/mmc/core/mmc.c
+++ b/drivers/mmc/core/mmc.c
@@ -1058,7 +1058,7 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr,
*
* WARNING: eMMC rules are NOT the same as SD DDR
*/
- i... |
4137e50494cb3496fbb6ccd27aa7b6d7c9634c1e | Analyze and fix the following issue in the Linux kernel code: mmc: core: Fixup delayed work clock gating patch | Problem Details:
c31b50e (mmc: core: Use delayed work in clock gating framework,
2011-11-14) missed a few things during review:
o A useless pr_info()
o milliseconds was written as two words
o The sysfs file had units in its output
Fix all three problems.
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Cc: Su... | ```diff
diff --git a/Documentation/mmc/mmc-dev-attrs.txt b/Documentation/mmc/mmc-dev-attrs.txt
index b0245565875a..22ae8441489f 100644
--- a/Documentation/mmc/mmc-dev-attrs.txt
+++ b/Documentation/mmc/mmc-dev-attrs.txt
@@ -71,6 +71,6 @@ SD/MMC/SDIO Clock Gating Attribute
Read and write access is provided to following ... |
739c69c964fb4c040df451ef2e4cd6ea4f8b8e2d | Analyze and fix the following issue in the Linux kernel code: mmc: mmc_test: align max_seg_size | Problem Details:
If max_seg_size is unaligned, mmc_test_map_sg() may create sg element
sizes that are not aligned with 512 byte. Fix, align max_seg_size at
mmc_test_area_init().
Signed-off-by: Per Forlin <per.forlin@stericsson.com>
Signed-off-by: Chris Ball <cjb@laptop.org> | ```diff
diff --git a/drivers/mmc/card/mmc_test.c b/drivers/mmc/card/mmc_test.c
index b038c4a9468b..584899889e8f 100644
--- a/drivers/mmc/card/mmc_test.c
+++ b/drivers/mmc/card/mmc_test.c
@@ -1581,6 +1581,7 @@ static int mmc_test_area_init(struct mmc_test_card *test, int erase, int fill)
t->max_segs = test->card->ho... |
597dd9d79cfbbb1636d00a7fd0880355d9b20c41 | Analyze and fix the following issue in the Linux kernel code: mmc: core: Use delayed work in clock gating framework | Problem Details:
Current clock gating framework disables the MCI clock as soon as the
request is completed and enables it when a request arrives. This aggressive
clock gating framework, when enabled, cause following issues:
When there are back-to-back requests from the Queue layer, we unnecessarily
end up disabling an... | ```diff
diff --git a/Documentation/mmc/mmc-dev-attrs.txt b/Documentation/mmc/mmc-dev-attrs.txt
index 8898a95b41e5..b0245565875a 100644
--- a/Documentation/mmc/mmc-dev-attrs.txt
+++ b/Documentation/mmc/mmc-dev-attrs.txt
@@ -64,3 +64,13 @@ Note on Erase Size and Preferred Erase Size:
size specified by the card.
"pr... |
df16219f365f7f5a2d88a6e123251d57255cca3f | Analyze and fix the following issue in the Linux kernel code: mmc: debugfs: expose the SDCLK frq in sys ios | Problem Details:
This patch is to expose the actual SDCLK frequency in
/sys/kernel/debug/mmcX/ios entry.
For example, if the max clk for a normal speed card is 20MHz this
is reported in /sys/kernel/debug/mmcX/ios. Unfortunately the actual
SDCLK frequency (i.e. Baseclock / divisor) is not reported at all:
for example,... | ```diff
diff --git a/drivers/mmc/core/debugfs.c b/drivers/mmc/core/debugfs.c
index 3923880118b6..027615d3bf3e 100644
--- a/drivers/mmc/core/debugfs.c
+++ b/drivers/mmc/core/debugfs.c
@@ -57,6 +57,8 @@ static int mmc_ios_show(struct seq_file *s, void *data)
const char *str;
seq_printf(s, "clock:\t\t%u Hz\n", ios->... |
052d81da6e6f0f8839ef6d5a46f215fc8cd99d5a | Analyze and fix the following issue in the Linux kernel code: mmc: sdio: Fix to support any block size optimally | Problem Details:
This patch allows any block size to be set on the SDIO link,
and still have an arbitrary sized packet (adjusted in size by
using sdio_align_size) transferred in an optimal way
(preferably one transfer).
Previously if the block size was larger than the default of
512 bytes and the transfer size was exa... | ```diff
diff --git a/drivers/mmc/core/sdio_io.c b/drivers/mmc/core/sdio_io.c
index b1f3168f791b..8f6f5ac131fc 100644
--- a/drivers/mmc/core/sdio_io.c
+++ b/drivers/mmc/core/sdio_io.c
@@ -196,6 +196,9 @@ static inline unsigned int sdio_max_byte_size(struct sdio_func *func)
else
mval = min(mval, func->max_blksize);
... |
d46cfba5363a163851dc768f717f34185527a472 | Analyze and fix the following issue in the Linux kernel code: ceph: always initialize the dentry in open_root_dentry() | Problem Details:
When open_root_dentry() gets a dentry via d_obtain_alias() it does
not get initialized. If the dentry obtained came from the cache,
this is OK. But if not, the result is an improperly initialized
dentry.
To fix this, call ceph_init_dentry() regardless of which path
produced the dentry. That functio... | ```diff
diff --git a/fs/ceph/super.c b/fs/ceph/super.c
index b48f15f101a0..ec74313e901f 100644
--- a/fs/ceph/super.c
+++ b/fs/ceph/super.c
@@ -638,12 +638,11 @@ static struct dentry *open_root_dentry(struct ceph_fs_client *fsc,
if (err == 0) {
dout("open_root_inode success\n");
if (ceph_ino(req->r_target_inode)... |
1140afa862842ac3e56678693050760edc4ecde9 | Analyze and fix the following issue in the Linux kernel code: mac80211: fix rx->key NULL pointer dereference in promiscuous mode | Problem Details:
Since:
commit 816c04fe7ef01dd9649f5ccfe796474db8708be5
Author: Christian Lamparter <chunkeey@googlemail.com>
Date: Sat Apr 30 15:24:30 2011 +0200
mac80211: consolidate MIC failure report handling
is possible to that we dereference rx->key == NULL when driver set
RX_FLAG_MMIC_STRIPPED and not R... | ```diff
diff --git a/net/mac80211/wpa.c b/net/mac80211/wpa.c
index 93aab0715e8a..422b79851ec5 100644
--- a/net/mac80211/wpa.c
+++ b/net/mac80211/wpa.c
@@ -106,7 +106,7 @@ ieee80211_rx_h_michael_mic_verify(struct ieee80211_rx_data *rx)
if (status->flag & RX_FLAG_MMIC_ERROR)
goto mic_fail;
- if (!(status->flag ... |
bdd3ae3d1e749cf6597f035a5357f297a1af8eb3 | Analyze and fix the following issue in the Linux kernel code: nl80211: fix old station flags compatibility | Problem Details:
My patch to validate station flags broke compatibility
with the old station flags setting where all flags are
always set at once since it always set the mask as all
possible flags which ended up being rejected later in
the station add/modify code.
Fix by parsing only the current flags in the old flags... | ```diff
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index b3d3cf8931cb..afeea32e04ad 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -2250,6 +2250,7 @@ static const struct nla_policy sta_flags_policy[NL80211_STA_FLAG_MAX + 1] = {
};
static int parse_station_flags(struct genl_inf... |
6e11e0bd82ecacd13b839558a49f65ebc958e1bd | Analyze and fix the following issue in the Linux kernel code: ARM: S3C64XX: Fix interrupt configuration for PCA935x on Cragganmore | Problem Details:
0 is a valid IRQ but the interrupt line for the pca935x certainly isn't
connected there which causes it to fail to probe.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com> | ```diff
diff --git a/arch/arm/mach-s3c64xx/mach-crag6410.c b/arch/arm/mach-s3c64xx/mach-crag6410.c
index 6998b5b54141..3d8b20bcd21a 100644
--- a/arch/arm/mach-s3c64xx/mach-crag6410.c
+++ b/arch/arm/mach-s3c64xx/mach-crag6410.c
@@ -355,7 +355,7 @@ static struct platform_device *crag6410_devices[] __initdata = {
stati... |
91b60b1d5a56e5971237f9c88de2faf168a5ceaf | Analyze and fix the following issue in the Linux kernel code: ARM: S3C64XX: Fix the memory mapped GPIOs on Cragganmore | Problem Details:
Rather than letting them get allocated dynamically where we don't know
where they are, and also name the data line resource as gpio-generic
requires that. Without these changes the GPIOs are useless.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Kukjin Kim <kgene.kim@... | ```diff
diff --git a/arch/arm/mach-s3c64xx/include/mach/crag6410.h b/arch/arm/mach-s3c64xx/include/mach/crag6410.h
index 5d55ab018b6b..4cb2f951f1e9 100644
--- a/arch/arm/mach-s3c64xx/include/mach/crag6410.h
+++ b/arch/arm/mach-s3c64xx/include/mach/crag6410.h
@@ -21,5 +21,6 @@
#define CODEC_GPIO_BASE (GPIO_BOARD_STAR... |
d34315da9146253351146140ea4b277193ee5e5f | Analyze and fix the following issue in the Linux kernel code: UBIFS: fix debugging messages | Problem Details:
Patch 56e46742e846e4de167dde0e1e1071ace1c882a5 broke UBIFS debugging messages:
before that commit when UBIFS debugging was enabled, users saw few useful
debugging messages after mount. However, that patch turned 'dbg_msg()' into
'pr_debug()', so to enable the debugging messages users have to enable the... | ```diff
diff --git a/fs/ubifs/debug.h b/fs/ubifs/debug.h
index 164fd48c583a..c9d294111a53 100644
--- a/fs/ubifs/debug.h
+++ b/fs/ubifs/debug.h
@@ -188,7 +188,10 @@ extern spinlock_t dbg_lock;
pr_debug("UBIFS DBG " type ": " fmt "\n", ##__VA_ARGS__)
/* Just a debugging messages not related to any specific UBIFS sub... |
1f5d78dc4823a85f112aaa2d0f17624f8c2a6c52 | Analyze and fix the following issue in the Linux kernel code: UBIFS: make debugging messages light again | Problem Details:
We switch to dynamic debugging in commit
56e46742e846e4de167dde0e1e1071ace1c882a5 but did not take into account that
now we do not control anymore whether a specific message is enabled or not.
So now we lock the "dbg_lock" and release it in every debugging macro, which
make them not so light-weight.
T... | ```diff
diff --git a/fs/ubifs/debug.h b/fs/ubifs/debug.h
index 8d9c46810189..164fd48c583a 100644
--- a/fs/ubifs/debug.h
+++ b/fs/ubifs/debug.h
@@ -175,19 +175,17 @@ const char *dbg_key_str1(const struct ubifs_info *c,
const union ubifs_key *key);
/*
- * DBGKEY macros require @dbg_lock to be held, which it is in... |
72f0d453d81d35087b1d3ad7c8285628c2be6e1d | Analyze and fix the following issue in the Linux kernel code: UBI: fix debugging messages | Problem Details:
Patch ab50ff684707031ed4bad2fdd313208ae392e5bb broke UBI debugging messages:
before that commit when UBI debugging was enabled, users saw few useful
debugging messages after attaching an MTD device. However, that patch turned
'dbg_msg()' into 'pr_debug()', so to enable the debugging messages users have... | ```diff
diff --git a/drivers/mtd/ubi/debug.h b/drivers/mtd/ubi/debug.h
index 64fbb0021825..ead2cd16ba75 100644
--- a/drivers/mtd/ubi/debug.h
+++ b/drivers/mtd/ubi/debug.h
@@ -43,7 +43,10 @@
pr_debug("UBI DBG " type ": " fmt "\n", ##__VA_ARGS__)
/* Just a debugging messages not related to any specific UBI subsystem... |
bced76aeaca03b45e3b4bdb868cada328e497847 | Analyze and fix the following issue in the Linux kernel code: sched: Fix lockup by limiting load-balance retries on lock-break | Problem Details:
Eric and David reported dead machines and traced it to commit
a195f004 ("sched: Fix load-balance lock-breaking"), it turns out
there's still a scenario where we can end up re-trying forever.
Since there is no strict forward progress guarantee in the
load-balance iteration we can get stuck re-retrying ... | ```diff
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 8e42de9105f8..84adb2d66cbd 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -3130,8 +3130,10 @@ task_hot(struct task_struct *p, u64 now, struct sched_domain *sd)
}
#define LBF_ALL_PINNED 0x01
-#define LBF_NEED_BREAK 0x02
-#define LBF_... |
353b67d8ced4dc53281c88150ad295e24bc4b4c5 | Analyze and fix the following issue in the Linux kernel code: jbd: Issue cache flush after checkpointing | Problem Details:
When we reach cleanup_journal_tail(), there is no guarantee that
checkpointed buffers are on a stable storage - especially if buffers were
written out by log_do_checkpoint(), they are likely to be only in disk's
caches. Thus when we update journal superblock, effectively removing old
transaction from j... | ```diff
diff --git a/fs/jbd/checkpoint.c b/fs/jbd/checkpoint.c
index 5d1a00a5041b..05f0754f2b46 100644
--- a/fs/jbd/checkpoint.c
+++ b/fs/jbd/checkpoint.c
@@ -453,8 +453,6 @@ out:
*
* Return <0 on error, 0 on success, 1 if there was nothing to clean up.
*
- * Called with the journal lock held.
- *
* This is the... |
66ad863b410efb7f537719006f9ac52400c1a5c5 | Analyze and fix the following issue in the Linux kernel code: GFS2: Fix nlink setting on inode creation | Problem Details:
Since the nlink count will be 0, we need to use set_nlink rather
than inc_nlink in order to avoid triggering the inc_nlink warning
which was added recently.
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com> | ```diff
diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c
index 017960cf1d7a..a7d611b93f0f 100644
--- a/fs/gfs2/inode.c
+++ b/fs/gfs2/inode.c
@@ -599,9 +599,7 @@ static int link_dinode(struct gfs2_inode *dip, const struct qstr *name,
error = gfs2_meta_inode_buffer(ip, &dibh);
if (error)
goto fail_end_trans;
- inc_n... |
f2cbba7602383cd9cdd21f0a5d0b8bd1aad47b33 | Analyze and fix the following issue in the Linux kernel code: ALSA: hda - Fix the lost power-setup of seconary pins after PM resume | Problem Details:
When multiple headphone or other detectable output pins are present,
the power-map has to be updated after resume appropriately, but the
current driver doesn't check all pins but only the first pin (since
it's enough to check it for the mute-behavior). This resulted in the
silent output from the secon... | ```diff
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
index 03145aec65f1..87e684fa830f 100644
--- a/sound/pci/hda/patch_sigmatel.c
+++ b/sound/pci/hda/patch_sigmatel.c
@@ -4236,6 +4236,27 @@ static void stac_store_hints(struct hda_codec *codec)
}
}
+static void stac_issue_unsol_event... |
9398d1ce09b9009996f7d2468e1d3c785fa6feda | Analyze and fix the following issue in the Linux kernel code: mtd: gpmi-nand bugfix: reset the BCH module when it is not MX23 | Problem Details:
In MX28, if we do not reset the BCH module. The BCH module may
becomes unstable when the board reboots for several thousands times.
This bug has been catched in customer's production.
The patch adds some comments (some from Wolfram Sang), and fixes it now.
Also change gpmi_reset_block() to static.
S... | ```diff
diff --git a/drivers/mtd/nand/gpmi-nand/gpmi-lib.c b/drivers/mtd/nand/gpmi-nand/gpmi-lib.c
index 2a56fc6f399a..c56f8e021b90 100644
--- a/drivers/mtd/nand/gpmi-nand/gpmi-lib.c
+++ b/drivers/mtd/nand/gpmi-nand/gpmi-lib.c
@@ -69,17 +69,19 @@ static int clear_poll_bit(void __iomem *addr, u32 mask)
* [1] enable t... |
12183a20a8baf009bf570ab3db45a27fd6b1fd03 | Analyze and fix the following issue in the Linux kernel code: mtd: nand: fix typo in comment | Problem Details:
Funny one :) "Heck" fits somehow, too, but I am sure it was meant to be "Check".
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com> | ```diff
diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
index 35b4565050f1..8a393f9e6027 100644
--- a/drivers/mtd/nand/nand_base.c
+++ b/drivers/mtd/nand/nand_base.c
@@ -2588,7 +2588,7 @@ int nand_erase_nand(struct mtd_info *mtd, struct erase_info *instr,
instr->state = MTD_ERASING;
while... |
49528b4e479195e5db4fe51fcd5ddd97901efc16 | Analyze and fix the following issue in the Linux kernel code: GFS2: Fix a use-after-free that coverity spotted | Problem Details:
In function gfs2_inplace_release it was trying to unlock a gfs2_holder
structure associated with a reservation, after said reservation was
freed. The problem is that the statements have the wrong order.
This patch corrects the order so that the reservation is freed after
the gfs2_holder is unlocked.
S... | ```diff
diff --git a/fs/gfs2/rgrp.c b/fs/gfs2/rgrp.c
index 22234627f684..981bfa32121a 100644
--- a/fs/gfs2/rgrp.c
+++ b/fs/gfs2/rgrp.c
@@ -1108,9 +1108,9 @@ void gfs2_inplace_release(struct gfs2_inode *ip)
{
struct gfs2_blkreserv *rs = ip->i_res;
- gfs2_blkrsv_put(ip);
if (rs->rs_rgd_gh.gh_gl)
gfs2_glock_dq_u... |
8753333266be67ff3a984ac1f6566d31c260bee4 | Analyze and fix the following issue in the Linux kernel code: autofs4: catatonic_mode vs. notify_daemon race | Problem Details:
we need to hold ->wq_mutex while we are forming the packet to send,
lest we have autofs4_catatonic_mode() setting wq->name.name to NULL
just as autofs4_notify_daemon() decides to memcpy() from it...
We do have check for catatonic mode immediately after that (under
->wq_mutex, as it ought to be) and pa... | ```diff
diff --git a/fs/autofs4/waitq.c b/fs/autofs4/waitq.c
index c13273afd546..9a0256da5d56 100644
--- a/fs/autofs4/waitq.c
+++ b/fs/autofs4/waitq.c
@@ -110,6 +110,13 @@ static void autofs4_notify_daemon(struct autofs_sb_info *sbi,
pkt.hdr.proto_version = sbi->version;
pkt.hdr.type = type;
+ mutex_lock(&sbi->wq... |
b367e47fb3a70f5d24ebd6faf7d42436d485fb2d | Analyze and fix the following issue in the Linux kernel code: Btrfs: fix possible deadlock when opening a seed device | Problem Details:
The correct lock order is uuid_mutex -> volume_mutex -> chunk_mutex,
but when we mount a filesystem which has backing seed devices, we have
this lock chain:
open_ctree()
lock(chunk_mutex);
read_chunk_tree();
read_one_dev();
open_seed_devices();
... | ```diff
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index 3f9d5551e582..858ab347413e 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -2270,9 +2270,7 @@ struct btrfs_root *open_ctree(struct super_block *sb,
(unsigned long)btrfs_header_chunk_tree_uuid(chunk_root->node),
BTRFS_UUID_SIZE);
... |
c7c144db531fda414e532adac56e965ce332e2a5 | Analyze and fix the following issue in the Linux kernel code: Btrfs: update global block_rsv when creating a new block group | Problem Details:
A bug was triggered while using seed device:
# mkfs.btrfs /dev/loop1
# btrfstune -S 1 /dev/loop1
# mount -o /dev/loop1 /mnt
# btrfs dev add /dev/loop2 /mnt
btrfs: block rsv returned -28
------------[ cut here ]------------
WARNING: at fs/btrfs/extent-tree.c:5969 btrfs_alloc_free_block... | ```diff
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index 5b53479ce07b..bf30f670cda9 100644
--- a/fs/btrfs/extent-tree.c
+++ b/fs/btrfs/extent-tree.c
@@ -7446,6 +7446,7 @@ int btrfs_make_block_group(struct btrfs_trans_handle *trans,
ret = update_space_info(root->fs_info, cache->flags, size, bytes_use... |
a1ee5a45818acc7f9c13e560827cf3e8735ac919 | Analyze and fix the following issue in the Linux kernel code: Btrfs: avoid possible NULL deref in io_ctl_drop_pages() | Problem Details:
If we run into some failure path in io_ctl_prepare_pages(),
io_ctl->pages[] array may have some NULL pointers.
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com> | ```diff
diff --git a/fs/btrfs/free-space-cache.c b/fs/btrfs/free-space-cache.c
index 01840ef95a32..4e55af333e19 100644
--- a/fs/btrfs/free-space-cache.c
+++ b/fs/btrfs/free-space-cache.c
@@ -319,9 +319,11 @@ static void io_ctl_drop_pages(struct io_ctl *io_ctl)
io_ctl_unmap_page(io_ctl);
for (i = 0; i < io_ctl->nu... |
ebb7f616abf6ee11603e6b63aa6c5f84c80a17d0 | Analyze and fix the following issue in the Linux kernel code: powerpc: Fix unpaired __trace_hcall_entry and __trace_hcall_exit | Problem Details:
Unpaired calling of __trace_hcall_entry and __trace_hcall_exit could
cause incorrect preempt count. And it might happen as the global
variable hcall_tracepoint_refcount is checked separately before calling
them.
Instead, store the value that was used on entry in the stack frame
and retreive it fr... | ```diff
diff --git a/arch/powerpc/platforms/pseries/hvCall.S b/arch/powerpc/platforms/pseries/hvCall.S
index fd05fdee576a..3ce73d0052b1 100644
--- a/arch/powerpc/platforms/pseries/hvCall.S
+++ b/arch/powerpc/platforms/pseries/hvCall.S
@@ -36,6 +36,7 @@ BEGIN_FTR_SECTION; \
b 1f; \
END_FTR_SECTION(0, 1); ... |
9544e8a64795d75875ff4c680a43aa452a37b260 | Analyze and fix the following issue in the Linux kernel code: [media] [BUG] it913x-fe fix typo error making SNR levels unstable | Problem Details:
Fix error where SNR unstable and jumps levels.
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com> | ```diff
diff --git a/drivers/media/dvb/frontends/it913x-fe.c b/drivers/media/dvb/frontends/it913x-fe.c
index 7290801eac63..ccc36bf2deb4 100644
--- a/drivers/media/dvb/frontends/it913x-fe.c
+++ b/drivers/media/dvb/frontends/it913x-fe.c
@@ -525,7 +525,7 @@ static int it913x_fe_read_snr(struct dvb_frontend *fe, u16 *snr)
... |
0963119fca6ad250146fd7d27eb90f205e188beb | Analyze and fix the following issue in the Linux kernel code: [media] rc-videomate-m1f.c Rename to match remote controler name | Problem Details:
This remote was added with support for card Compro VideoMate M1F.
This remote is shipped with various Compro cards, not this one only.
Furthermore this remote can be bought separately under name Compro
VideoMate K100.
http://compro.com.tw/en/product/k100/k100.html
So give it a proper name.
[mch... | ```diff
diff --git a/drivers/media/rc/keymaps/rc-videomate-m1f.c b/drivers/media/rc/keymaps/rc-videomate-m1f.c
index 3bd1de1f585c..23ee05e53949 100644
--- a/drivers/media/rc/keymaps/rc-videomate-m1f.c
+++ b/drivers/media/rc/keymaps/rc-videomate-m1f.c
@@ -1,4 +1,4 @@
-/* videomate-m1f.h - Keytable for videomate_m1f Remo... |
c18e1c7bd1f825ac55e00b23bb37fe36e2e4c784 | Analyze and fix the following issue in the Linux kernel code: [media] drivers: media: au0828: Fix dependency for VIDEO_AU0828 | Problem Details:
Fix the following build warning:
warning: (VIDEO_AU0828) selects DVB_AU8522 which has unmet direct dependencies (MEDIA_SUPPORT && DVB_CAPTURE_DRIVERS && DVB_CORE && I2C && VIDEO_V4L2)
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com> | ```diff
diff --git a/drivers/media/video/au0828/Kconfig b/drivers/media/video/au0828/Kconfig
index 0c3a5ba0e857..81ba9d9d1b52 100644
--- a/drivers/media/video/au0828/Kconfig
+++ b/drivers/media/video/au0828/Kconfig
@@ -2,6 +2,7 @@
config VIDEO_AU0828
tristate "Auvitek AU0828 support"
depends on I2C && INPUT && DVB... |
aa5fb974cf3a30162c9c426c507486f3c2ab54c5 | Analyze and fix the following issue in the Linux kernel code: [media] drivers: video: cx231xx: Fix dependency for VIDEO_CX231XX_DVB | Problem Details:
Fix the following build warning:
warning: (VIDEO_CX231XX_DVB) selects DVB_MB86A20S which has unmet direct dependencies (MEDIA_SUPPORT && DVB_CAPTURE_DRIVERS && DVB_CORE && I2C)
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com> | ```diff
diff --git a/drivers/media/video/cx231xx/Kconfig b/drivers/media/video/cx231xx/Kconfig
index c74ce9e450e8..446f692aabb7 100644
--- a/drivers/media/video/cx231xx/Kconfig
+++ b/drivers/media/video/cx231xx/Kconfig
@@ -40,7 +40,7 @@ config VIDEO_CX231XX_ALSA
config VIDEO_CX231XX_DVB
tristate "DVB/ATSC Support ... |
392d9e1d02edcbe9bc94bc292dd364339556f8ec | Analyze and fix the following issue in the Linux kernel code: [media] v4l: s5p-tv: mixer: fix setup of VP scaling | Problem Details:
Adjusting of Video Processor's scaling factors was flawed. It bounded scaling
to range 1/16 to 1/1. The correct range should be 1/4 to 4/1. This patch fixes
this bug.
Signed-off-by: Tomasz Stanislawski <t.stanislaws@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: M... | ```diff
diff --git a/drivers/media/video/s5p-tv/mixer_vp_layer.c b/drivers/media/video/s5p-tv/mixer_vp_layer.c
index e41ec2ec45f8..3d13a636877b 100644
--- a/drivers/media/video/s5p-tv/mixer_vp_layer.c
+++ b/drivers/media/video/s5p-tv/mixer_vp_layer.c
@@ -172,10 +172,10 @@ static void mxr_vp_fix_geometry(struct mxr_laye... |
dab734ec95168488c4b32632e968ce885a083078 | Analyze and fix the following issue in the Linux kernel code: [media] hd29l2: fix review findings | Problem Details:
Fix some issues pointed out by Mauro.
Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com> | ```diff
diff --git a/drivers/media/dvb/frontends/hd29l2.c b/drivers/media/dvb/frontends/hd29l2.c
index 9959a5abb532..a00318190837 100644
--- a/drivers/media/dvb/frontends/hd29l2.c
+++ b/drivers/media/dvb/frontends/hd29l2.c
@@ -30,7 +30,7 @@ MODULE_PARM_DESC(debug, "Turn on/off frontend debugging (default:off).");
stat... |
852023b58bbe8600693f1df44ade404298ac89d4 | Analyze and fix the following issue in the Linux kernel code: [media] hd29l2: add debug for used IF frequency | Problem Details:
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com> | ```diff
diff --git a/drivers/media/dvb/frontends/hd29l2.c b/drivers/media/dvb/frontends/hd29l2.c
index e67d7c410a35..9959a5abb532 100644
--- a/drivers/media/dvb/frontends/hd29l2.c
+++ b/drivers/media/dvb/frontends/hd29l2.c
@@ -394,7 +394,7 @@ static enum dvbfe_search hd29l2_search(struct dvb_frontend *fe)
if (ret)
... |
53b667eb12edd1bb33beca73ab14dbdf4d536c37 | Analyze and fix the following issue in the Linux kernel code: [media] em28xx: Fix tuner_type for Terratec Cinergy 200 USB | Problem Details:
The card definition of the Terratec Cinergy 200 USB uses the
wrong tuner type. Therefore some channels are currently missing.
Attached patch fixes this problem.
Signed-off-by: Sascha Sommer <saschasommer@freenet.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com> | ```diff
diff --git a/drivers/media/video/em28xx/em28xx-cards.c b/drivers/media/video/em28xx/em28xx-cards.c
index 21cc910ecd83..9deb5698ec21 100644
--- a/drivers/media/video/em28xx/em28xx-cards.c
+++ b/drivers/media/video/em28xx/em28xx-cards.c
@@ -1179,7 +1179,7 @@ struct em28xx_board em28xx_boards[] = {
.name ... |
a5ccfee05a439b803640e94584056204501db31c | Analyze and fix the following issue in the Linux kernel code: powerpc: Fix RCU idle and hcall tracing | Problem Details:
Tracepoints should not be called inside an rcu_idle_enter/rcu_idle_exit
region. Since pSeries calls H_CEDE in the idle loop, we were violating
this rule.
commit a7b152d5342c (powerpc: Tell RCU about idle after hcall tracing)
tried to work around it by delaying the rcu_idle_enter until after we
called ... | ```diff
diff --git a/arch/powerpc/kernel/idle.c b/arch/powerpc/kernel/idle.c
index 7c66ce13da89..0a48bf5db6c8 100644
--- a/arch/powerpc/kernel/idle.c
+++ b/arch/powerpc/kernel/idle.c
@@ -50,12 +50,6 @@ static int __init powersave_off(char *arg)
}
__setup("powersave=off", powersave_off);
-#if defined(CONFIG_PPC_PSER... |
1020d13d50d0a5bfcfc8a0a6826ed221cdf8a775 | Analyze and fix the following issue in the Linux kernel code: [media] em28xx: increase maxwidth for em2800 | Problem Details:
The MaxPacketSize for em2800 based devices is too small to capture at full resolution.
Therefore scale down when the maximum frame size is selected.
The previous workaround that simply reduced the X resolution cannot be used
because it crops a part of the input as
the em2800 can only scale down with a ... | ```diff
diff --git a/drivers/media/video/em28xx/em28xx-video.c b/drivers/media/video/em28xx/em28xx-video.c
index 9b4557a2f6d0..613300b51a9e 100644
--- a/drivers/media/video/em28xx/em28xx-video.c
+++ b/drivers/media/video/em28xx/em28xx-video.c
@@ -1070,6 +1070,10 @@ static int vidioc_try_fmt_vid_cap(struct file *file, v... |
0903bb540e5bb99a9e58d583a596a30620f65702 | Analyze and fix the following issue in the Linux kernel code: [media] em28xx: Fix: I2C_CLK write error message checks wrong return code | Problem Details:
It looks like the return value check that is done after setting the I2C
speed checks the wrong return code.
Signed-off-by: Sascha Sommer <saschasommer@freenet.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com> | ```diff
diff --git a/drivers/media/video/em28xx/em28xx-cards.c b/drivers/media/video/em28xx/em28xx-cards.c
index ebfb7a3beab2..6448011e3a1b 100644
--- a/drivers/media/video/em28xx/em28xx-cards.c
+++ b/drivers/media/video/em28xx/em28xx-cards.c
@@ -3014,7 +3014,7 @@ static int em28xx_init_dev(struct em28xx *dev, struct u... |
9e94136d364a424b53048031bd35a4261ae8f9e2 | Analyze and fix the following issue in the Linux kernel code: [media] mxl5007t: bugfix DVB-T 7 MHz and 8 MHz bandwidth | Problem Details:
DVB-T did not work at all - only 6 MHz was working but it is not
commonly used.
Fix it.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com> | ```diff
diff --git a/drivers/media/common/tuners/mxl5007t.c b/drivers/media/common/tuners/mxl5007t.c
index 8f4899b0dc64..69e453ef0a1a 100644
--- a/drivers/media/common/tuners/mxl5007t.c
+++ b/drivers/media/common/tuners/mxl5007t.c
@@ -644,8 +644,10 @@ static int mxl5007t_set_params(struct dvb_frontend *fe)
break;
... |
083b6b8a234dc13121ddab7fc622574d8ab66bc4 | Analyze and fix the following issue in the Linux kernel code: [media] tda18271-fe: Fix support for ISDB-T | Problem Details:
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com> | ```diff
diff --git a/drivers/media/common/tuners/tda18271-fe.c b/drivers/media/common/tuners/tda18271-fe.c
index d3d91ea9f1ac..2e67f4459904 100644
--- a/drivers/media/common/tuners/tda18271-fe.c
+++ b/drivers/media/common/tuners/tda18271-fe.c
@@ -946,6 +946,7 @@ static int tda18271_set_params(struct dvb_frontend *fe)
... |
990862a2f024296f27460306393de8f0cdab8997 | Analyze and fix the following issue in the Linux kernel code: [media] cx231xx: fix device disconnect checks | Problem Details:
The driver were using DEV_MISCONFIGURED on some places, and
DEV_DISCONNECTED on others. In a matter of fact, DEV_MISCONFIGURED
were set only during the usb disconnect callback, with
was confusing.
Also, the alsa driver never checks if the device is present,
before doing some dangerous things.
Remove ... | ```diff
diff --git a/drivers/media/video/cx231xx/cx231xx-audio.c b/drivers/media/video/cx231xx/cx231xx-audio.c
index 30d13c15739a..e5742a0e19a0 100644
--- a/drivers/media/video/cx231xx/cx231xx-audio.c
+++ b/drivers/media/video/cx231xx/cx231xx-audio.c
@@ -111,6 +111,9 @@ static void cx231xx_audio_isocirq(struct urb *urb... |
7528cd273e14020117e6cdb6cc307f223e97c5ed | Analyze and fix the following issue in the Linux kernel code: [media] cx231xx: Fix unregister logic | Problem Details:
There are several weirdness at the unregister logic.
First of all, IR has a poll thread. This thread needs to be
removed, as it uses some resources associated to the main driver.
So, the driver needs to explicitly unregister the I2C client for
ir-kbd-i2c.
If, for some reason, the driver needs to wait... | ```diff
diff --git a/drivers/media/video/cx231xx/cx231xx-cards.c b/drivers/media/video/cx231xx/cx231xx-cards.c
index 2a28882ee1d3..bd82f017ccdf 100644
--- a/drivers/media/video/cx231xx/cx231xx-cards.c
+++ b/drivers/media/video/cx231xx/cx231xx-cards.c
@@ -843,15 +843,25 @@ void cx231xx_release_resources(struct cx231xx *... |
6b550f9495947fc279d12c38feaf98500e8d0646 | Analyze and fix the following issue in the Linux kernel code: user namespace: make signal.c respect user namespaces | Problem Details:
ipc/mqueue.c: for __SI_MESQ, convert the uid being sent to recipient's
user namespace. (new, thanks Oleg)
__send_signal: convert current's uid to the recipient's user namespace
for any siginfo which is not SI_FROMKERNEL (patch from Oleg, thanks
again :)
do_notify_parent and do_notify_parent_cldstop: ... | ```diff
diff --git a/ipc/mqueue.c b/ipc/mqueue.c
index 9a142a290749..9b7c8ab7d75c 100644
--- a/ipc/mqueue.c
+++ b/ipc/mqueue.c
@@ -32,6 +32,7 @@
#include <linux/nsproxy.h>
#include <linux/pid.h>
#include <linux/ipc_namespace.h>
+#include <linux/user_namespace.h>
#include <linux/slab.h>
#include <net/sock.h>
@@ -... |
640708a2cff7f81e246243b0073c66e6ece7e53e | Analyze and fix the following issue in the Linux kernel code: procfs: introduce the /proc/<pid>/map_files/ directory | Problem Details:
This one behaves similarly to the /proc/<pid>/fd/ one - it contains
symlinks one for each mapping with file, the name of a symlink is
"vma->vm_start-vma->vm_end", the target is the file. Opening a symlink
results in a file that point exactly to the same inode as them vma's one.
For example the ls -l ... | ```diff
diff --git a/fs/proc/base.c b/fs/proc/base.c
index e31d95055c67..4d755fed3ecb 100644
--- a/fs/proc/base.c
+++ b/fs/proc/base.c
@@ -83,6 +83,7 @@
#include <linux/pid_namespace.h>
#include <linux/fs_struct.h>
#include <linux/slab.h>
+#include <linux/flex_array.h>
#ifdef CONFIG_HARDWALL
#include <asm/hardwall... |
9b467e6ebebbe75288aeb7e816ffbb5d35d6eaa3 | Analyze and fix the following issue in the Linux kernel code: reiserfs: don't lock root inode searching | Problem Details:
Nothing requires that we lock the filesystem until the root inode is
provided.
Also iget5_locked() triggers a warning because we are holding the
filesystem lock while allocating the inode, which result in a lockdep
suspicion that we have a lock inversion against the reclaim path:
[ 1986.896979] =====... | ```diff
diff --git a/fs/reiserfs/super.c b/fs/reiserfs/super.c
index 61b60380d2ce..e12d8b97cd4d 100644
--- a/fs/reiserfs/super.c
+++ b/fs/reiserfs/super.c
@@ -1519,9 +1519,7 @@ static int read_super_block(struct super_block *s, int offset)
static int reread_meta_blocks(struct super_block *s)
{
ll_rw_block(READ, 1, ... |
e74a8f2edb92cb690b467cea0ab652c509e9f624 | Analyze and fix the following issue in the Linux kernel code: drivers/rtc/interface.c: fix alarm rollover when day or month is out-of-range | Problem Details:
Commit f44f7f96a20a ("RTC: Initialize kernel state from RTC") introduced a
potential infinite loop. If an alarm time contains a wildcard month and
an invalid day (> 31), or a wildcard year and an invalid month (>= 12),
the loop searching for the next matching date will never terminate. Treat
the inva... | ```diff
diff --git a/drivers/rtc/interface.c b/drivers/rtc/interface.c
index 8e286259a007..8a1c031391d6 100644
--- a/drivers/rtc/interface.c
+++ b/drivers/rtc/interface.c
@@ -228,11 +228,11 @@ int __rtc_read_alarm(struct rtc_device *rtc, struct rtc_wkalrm *alarm)
alarm->time.tm_hour = now.tm_hour;
/* For simplic... |
5f85d20d04cdc4c6ed15022a5ed76907ad88d4ae | Analyze and fix the following issue in the Linux kernel code: drivers/rtc/rtc-wm831x.c: convert to devm_kzalloc() | Problem Details:
Marginally less code and eliminate the possibility of memory leaks.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Si... | ```diff
diff --git a/drivers/rtc/rtc-wm831x.c b/drivers/rtc/rtc-wm831x.c
index dabbd456dfe1..657c6f67b287 100644
--- a/drivers/rtc/rtc-wm831x.c
+++ b/drivers/rtc/rtc-wm831x.c
@@ -399,7 +399,7 @@ static int wm831x_rtc_probe(struct platform_device *pdev)
int alm_irq = platform_get_irq_byname(pdev, "ALM");
int ret = 0... |
dda367ac064d7473d397b1965019fb3be7cfb6b0 | Analyze and fix the following issue in the Linux kernel code: rtc/ab8500: add calibration attribute to AB8500 RTC | Problem Details:
The rtc_calibration attribute allows user-space to get and set the
AB8500's RtcCalibration register. The AB8500 will then use the value in
this register to compensate for RTC drift every 60 seconds.
[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Mark Godfrey <mark.godfrey@stericsson.c... | ```diff
diff --git a/Documentation/ABI/testing/sysfs-class-rtc-rtc0-device-rtc_calibration b/Documentation/ABI/testing/sysfs-class-rtc-rtc0-device-rtc_calibration
new file mode 100644
index 000000000000..4cf1e72222d9
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-class-rtc-rtc0-device-rtc_calibration
@@ -0,0 +1,12... |
c92182ee0b5a33c74e4b6c0ded36166e4ef3bc3e | Analyze and fix the following issue in the Linux kernel code: drivers/rtc/rtc-mxc.c: make alarm work | Problem Details:
Fix alarm IRQ handling, make the alarm one-shot. Cleanup black magick
with a validation of already validated time data.
Add ability to wake the system with alarm.
[akpm@linux-foundation.org: fix CONFIG_PM=n build]
Signed-off-by: Yauhen Kharuzhy <jekhor@gmail.com>
Cc: Daniel Mack <daniel@caiaq.de>
Cc... | ```diff
diff --git a/drivers/rtc/rtc-mxc.c b/drivers/rtc/rtc-mxc.c
index 11b7b614fc8d..5e1d64ee5228 100644
--- a/drivers/rtc/rtc-mxc.c
+++ b/drivers/rtc/rtc-mxc.c
@@ -155,7 +155,6 @@ static int rtc_update_alarm(struct device *dev, struct rtc_time *alrm)
{
struct rtc_time alarm_tm, now_tm;
unsigned long now, time;
... |
7287be1d0ac8c82999b67c2a33517c6ec9cfdbe7 | Analyze and fix the following issue in the Linux kernel code: drivers/rtc/rtc-mxc.c: fix setting time for MX1 SoC | Problem Details:
There is no way to track year in the i.MX1 RTC: Days Counter register is
9-bit wide only. Attempt to save date after 1970-01-01 plus 512 days
causes endless loop in mxc_rtc_set_mmss(). Fix this by resetting year to
1970.
[akpm@linux-foundation.org: use conventional comment layout]
Signed-off-by: Yau... | ```diff
diff --git a/drivers/rtc/rtc-mxc.c b/drivers/rtc/rtc-mxc.c
index 39e41fbdf08b..11b7b614fc8d 100644
--- a/drivers/rtc/rtc-mxc.c
+++ b/drivers/rtc/rtc-mxc.c
@@ -290,6 +290,17 @@ static int mxc_rtc_read_time(struct device *dev, struct rtc_time *tm)
*/
static int mxc_rtc_set_mmss(struct device *dev, unsigned lon... |
b43c1ea4d622b6951377de92edfb219d893e23ef | Analyze and fix the following issue in the Linux kernel code: drivers/rtc/rtc-cmos.c: fix broken NVRAM bank 2 writing | Problem Details:
Fix writing to NVRAM bank 2 in rtc-cmos driver. It never worked since its
introduction in 2.6.28 because of a typo.
Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvald... | ```diff
diff --git a/drivers/rtc/rtc-cmos.c b/drivers/rtc/rtc-cmos.c
index 05beb6c1ca79..d7782aa09943 100644
--- a/drivers/rtc/rtc-cmos.c
+++ b/drivers/rtc/rtc-cmos.c
@@ -164,7 +164,7 @@ static inline unsigned char cmos_read_bank2(unsigned char addr)
static inline void cmos_write_bank2(unsigned char val, unsigned char... |
bfcb2cc798a14230d22b6dd999e2e680623de622 | Analyze and fix the following issue in the Linux kernel code: checkpatch: catch all occurences of type and cast spacing errors per line | Problem Details:
Fix up type and cast spacing checks such that all occurences on a line are
examined and reported. For example the line below has a valid cast and a
bad type, but currently we check the cast first which is good and stop:
u16* bar = (u16 *)baz;
We will also only report one of the errors in this ex... | ```diff
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index eb4b55940c0e..e3bfcbe8a520 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -2209,8 +2209,9 @@ sub process {
# * goes on variable not on type
# (char*[ const])
- if ($line =~ m{\($NonptrType(\s*(?:$Modifier\b\s*|\*\s*)+)\)}... |
c81769fdc84ed7c6eb3cc5cecb194324a5e4c8ad | Analyze and fix the following issue in the Linux kernel code: checkpatch: fix complex macros handling of square brackets | Problem Details:
Signed-off-by: Andy Whitcroft <apw@canonical.com>
Cc: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | ```diff
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 5e3f4191f959..ba7bcf34ad01 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -2815,7 +2815,7 @@ sub process {
# Flatten any parentheses and braces
while ($dstat =~ s/\([^\(\)]*\)/1/ ||
$dstat =~ s/\{[^\{\}]*\}/1/... |
e01886ada28741d7cb2cfb3224e9caccfbc1a2d5 | Analyze and fix the following issue in the Linux kernel code: checkpatch: fix 'return is not a function' square bracket handling | Problem Details:
We are incorrectly matching square brackets '[' and ']' leading to false
positives on more complex functions as below:
return (dt3155_fbuffer[m]->ready_head -
dt3155_fbuffer[m]->ready_len +
dt3155_fbuffer[m]->nbuffers)%
(dt3155_fbuffer[m]->nbuffers);
Signed-off-by: Andy Whitcroft <apw@canonica... | ```diff
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index ca6d0fb229f2..5e3f4191f959 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -2609,7 +2609,7 @@ sub process {
# Flatten any parentheses
$value =~ s/\(/ \(/g;
$value =~ s/\)/\) /g;
- while ($value =~ s/\[[^\{\}]*\]/1/ ... |
87a53877185627b49a903023255425bda78f890c | Analyze and fix the following issue in the Linux kernel code: checkpatch: fix EXPORT_SYMBOL handling following a function | Problem Details:
The following fragment defeats the DEVICE_ATTR style handing, check for
and ignore the close brace '}' in this context:
int foo()
{
}
DEVICE_ATTR(link_power_management_policy, S_IRUGO | S_IWUSR,
ata_scsi_lpm_show, ata_scsi_lpm_put);
EXPORT_SYMBOL_GPL(dev_attr_link_p... | ```diff
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index d8ac16ab5e61..afc656d00589 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -2131,7 +2131,7 @@ sub process {
# XXX(foo);
# EXPORT_SYMBOL(something_foo);
my $name = $1;
- if ($stat =~ /^.([A-Z_]+)\s*\(\s*($Ident)/... |
d7c76ba7e58bc3ca674f20759c686535db484749 | Analyze and fix the following issue in the Linux kernel code: checkpatch: improve memset and min/max with cast checking | Problem Details:
Improve the checking of arguments to memset and min/max tests.
Move the checking of min/max to statement blocks instead of single line.
Change $Constant to allow any case type 0x initiator and trailing ul
specifier. Add $FuncArg type as any function argument with or without a
cast. Print the whole s... | ```diff
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 8199d59d0ad7..4c53d6f67339 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -227,7 +227,7 @@ our $Inline = qr{inline|__always_inline|noinline};
our $Member = qr{->$Ident|\.$Ident|\[[^]]*\]};
our $Lval = qr{$Ident(?:$Member)*};
... |
f74bd1942e04a0cedd1e9c8b331141e75add49c0 | Analyze and fix the following issue in the Linux kernel code: checkpatch: correctly track the end of preprocessor commands in context | Problem Details:
When looking for a statement we currently run on through preprocessor
commands. This means that a header file with just definitions is parsed
over and over again combining all of the lines from the current line to
the end of file leading to severe performance issues.
Fix up context accumulation to tr... | ```diff
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index e94626ca77cf..06e22caa5692 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -676,6 +676,10 @@ sub ctx_statement_block {
if ($off >= $len) {
last;
}
+ if ($level == 0 && substr($blk, $off) =~ /^.\s*#\s*define/) {
+ ... |
3b080945aa7670354364c8f9e1a3a07cbb97beb3 | Analyze and fix the following issue in the Linux kernel code: drivers/leds/leds-mc13783.c: fix off-by-one for checking num_leds | Problem Details:
The LED id begins from 0. Thus the maximum number of leds should be
MC13783_LED_MAX + 1.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Philippe Retornaz <philippe.retornaz@epfl.ch>
Cc: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: ... | ```diff
diff --git a/drivers/leds/leds-mc13783.c b/drivers/leds/leds-mc13783.c
index c61e8c4f5469..8bc491541550 100644
--- a/drivers/leds/leds-mc13783.c
+++ b/drivers/leds/leds-mc13783.c
@@ -275,7 +275,7 @@ static int __devinit mc13783_led_probe(struct platform_device *pdev)
return -ENODEV;
}
- if (pdata->num_le... |
a6d511e5155406cd214d3af3ff9cffc69548b006 | Analyze and fix the following issue in the Linux kernel code: leds: add driver for TCA6507 LED controller | Problem Details:
TI's TCA6507 is the LED driver in the GTA04 Openmoko motherboard. The
driver provides full support for brightness levels and hardware blinking.
This driver can drive each of 7 outputs as an LED or a GPIO output,
and provides hardware-assist blinking.
[akpm@linux-foundation.org: fix __mod_i2c_device_... | ```diff
diff --git a/drivers/leds/Kconfig b/drivers/leds/Kconfig
index 1b75a56ebd08..897a77dfa9d7 100644
--- a/drivers/leds/Kconfig
+++ b/drivers/leds/Kconfig
@@ -388,6 +388,14 @@ config LEDS_RENESAS_TPU
pin function. The latter to support brightness control.
Brightness control is supported but hardware blinkin... |
e2c17bc6f717a8847df2a867caec6ba4fe85f3fc | Analyze and fix the following issue in the Linux kernel code: backlight: convert pwm_bl to dev_pm_ops | Problem Details:
Should be no functional changes, mainly a reorganisation to support future
work.
[akpm@linux-foundation.org: fix CONFIG_PM=n build]
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Signed-off... | ```diff
diff --git a/drivers/video/backlight/pwm_bl.c b/drivers/video/backlight/pwm_bl.c
index b811e8fb4062..7496d04e1d3c 100644
--- a/drivers/video/backlight/pwm_bl.c
+++ b/drivers/video/backlight/pwm_bl.c
@@ -169,10 +169,9 @@ static int pwm_backlight_remove(struct platform_device *pdev)
}
#ifdef CONFIG_PM
-static... |
66655760bf38861299e3c8196f5303f886b0eef9 | Analyze and fix the following issue in the Linux kernel code: backlight: use kstrtoul() | Problem Details:
The usage of simple_strtoul() or strict_strtoul() is not preferred. Thus,
kstrtoul should be used.
This patch also fixes checkpatch error as follows:
ERROR: space required after that ',' (ctx:VxV)
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: A... | ```diff
diff --git a/drivers/video/backlight/backlight.c b/drivers/video/backlight/backlight.c
index 7363c1b169e8..bf5b1ece7160 100644
--- a/drivers/video/backlight/backlight.c
+++ b/drivers/video/backlight/backlight.c
@@ -102,7 +102,7 @@ static void backlight_generate_event(struct backlight_device *bd,
}
static ss... |
3770490ec82ca63d5fdcebeb95f2f68af2626357 | Analyze and fix the following issue in the Linux kernel code: mm: vmscan: fix typo in isolating lru pages | Problem Details:
It is not the tag page but the cursor page that we should process, and it
looks a typo.
Signed-off-by: Hillf Danton <dhillf@gmail.com>
Cc: Michal Hocko <mhocko@suse.cz>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: David Rientjes <rientjes@google... | ```diff
diff --git a/mm/vmscan.c b/mm/vmscan.c
index 8a4e767fb8ac..26f4a8a4e0c7 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -1173,7 +1173,7 @@ static unsigned long isolate_lru_pages(unsigned long nr_to_scan,
if (__isolate_lru_page(cursor_page, mode, file) == 0) {
list_move(&cursor_page->lru, dst);
mem_c... |
1ebb7044c9142c67d1d2b04d84010b4810a43fd8 | Analyze and fix the following issue in the Linux kernel code: mempool: fix first round failure behavior | Problem Details:
mempool modifies gfp_mask so that the backing allocator doesn't try too
hard or trigger warning message when there's pool to fall back on. In
addition, for the first try, it removes __GFP_WAIT and IO, so that it
doesn't trigger reclaim or wait when allocation can be fulfilled from
pool; however, when ... | ```diff
diff --git a/mm/mempool.c b/mm/mempool.c
index e3a802a0cea0..d9049811f352 100644
--- a/mm/mempool.c
+++ b/mm/mempool.c
@@ -221,14 +221,23 @@ repeat_alloc:
return element;
}
- /* We must not sleep in the GFP_ATOMIC case */
+ /*
+ * We use gfp mask w/o __GFP_WAIT or IO for the first round. If
+ * alloc ... |
0565d317768cc66b13e37184f29d9f270c2886dc | Analyze and fix the following issue in the Linux kernel code: mempool: drop unnecessary and incorrect BUG_ON() from mempool_destroy() | Problem Details:
mempool_destroy() is a thin wrapper around free_pool(). The only thing it
adds is BUG_ON(pool->curr_nr != pool->min_nr). The intention seems to be
to enforce that all allocated elements are freed; however, the BUG_ON()
can't achieve that (it doesn't know anything about objects above min_nr)
and incor... | ```diff
diff --git a/mm/mempool.c b/mm/mempool.c
index 11f0d0a5e0f8..e3a802a0cea0 100644
--- a/mm/mempool.c
+++ b/mm/mempool.c
@@ -27,7 +27,15 @@ static void *remove_element(mempool_t *pool)
return pool->elements[--pool->curr_nr];
}
-static void free_pool(mempool_t *pool)
+/**
+ * mempool_destroy - deallocate a me... |
5b990546e33477c34ee6fbc20fad6584386b46c3 | Analyze and fix the following issue in the Linux kernel code: mempool: fix and document synchronization and memory barrier usage | Problem Details:
mempool_alloc/free() use undocumented smp_mb()'s. The code is slightly
broken and misleading.
The lockless part is in mempool_free(). It wants to determine whether the
item being freed needs to be returned to the pool or backing allocator
without grabbing pool->lock. Two things need to be guarantee... | ```diff
diff --git a/mm/mempool.c b/mm/mempool.c
index e73641b79bb5..11f0d0a5e0f8 100644
--- a/mm/mempool.c
+++ b/mm/mempool.c
@@ -224,28 +224,31 @@ repeat_alloc:
if (likely(pool->curr_nr)) {
element = remove_element(pool);
spin_unlock_irqrestore(&pool->lock, flags);
+ /* paired with rmb in mempool_free(), rea... |
0c176d52b0b2619f231b2bbf329b90c028134f58 | Analyze and fix the following issue in the Linux kernel code: mm: hugetlb: fix pgoff computation when unmapping page from vma | Problem Details:
The computation for pgoff is incorrect, at least with
(vma->vm_pgoff >> PAGE_SHIFT)
involved. It is fixed with the available method if HPAGE_SIZE is
concerned in page cache lookup.
[akpm@linux-foundation.org: use vma_hugecache_offset() directly, per Michal]
Signed-off-by: Hillf Danton <dhillf@gmai... | ```diff
diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index ab89d6f382d1..bb7dc405634f 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -2315,8 +2315,7 @@ static int unmap_ref_private(struct mm_struct *mm, struct vm_area_struct *vma,
* from page cache lookup which is in HPAGE_SIZE units.
*/
address = address & huge_p... |
43d2b113241d6797b890318767e0af78e313414b | Analyze and fix the following issue in the Linux kernel code: tracepoint: add tracepoints for debugging oom_score_adj | Problem Details:
oom_score_adj is used for guarding processes from OOM-Killer. One of
problem is that it's inherited at fork(). When a daemon set oom_score_adj
and make children, it's hard to know where the value is set.
This patch adds some tracepoints useful for debugging. This patch adds
3 trace points.
- creat... | ```diff
diff --git a/fs/exec.c b/fs/exec.c
index 3f64b9f26e7d..aeb135c7ff5c 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -59,6 +59,8 @@
#include <asm/uaccess.h>
#include <asm/mmu_context.h>
#include <asm/tlb.h>
+
+#include <trace/events/task.h>
#include "internal.h"
int core_uses_pid;
@@ -1054,6 +1056,8 @@ void set... |
df0a6daa01fa3856c08f4274d4f21a8092caa480 | Analyze and fix the following issue in the Linux kernel code: mm: fix off-by-two in __zone_watermark_ok() | Problem Details:
Commit 88f5acf88ae6 ("mm: page allocator: adjust the per-cpu counter
threshold when memory is low") changed the form how free_pages is
calculated but it forgot that we used to do free_pages - ((1 << order) -
1) so we ended up with off-by-two when calculating free_pages.
Reported-by: Wang Sheng-Hui <sh... | ```diff
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 4f95bcf0f2b1..59153da58c69 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -1525,7 +1525,7 @@ static bool __zone_watermark_ok(struct zone *z, int order, unsigned long mark,
long min = mark;
int o;
- free_pages -= (1 << order) + 1;
+ free_pages -= ... |
ccafa2879fb8d13b8031337a8743eac4189e5d6e | Analyze and fix the following issue in the Linux kernel code: mm: writeback: cleanups in preparation for per-zone dirty limits | Problem Details:
The next patch will introduce per-zone dirty limiting functions in
addition to the traditional global dirty limiting.
Rename determine_dirtyable_memory() to global_dirtyable_memory() before
adding the zone-specific version, and fix up its documentation.
Also, move the functions to determine the dirty... | ```diff
diff --git a/mm/page-writeback.c b/mm/page-writeback.c
index 9ab6de82d8e6..433fa990fe8b 100644
--- a/mm/page-writeback.c
+++ b/mm/page-writeback.c
@@ -146,6 +146,7 @@ static struct prop_descriptor vm_completions;
* We make sure that the background writeout level is below the adjusted
* clamping level.
*/
... |
ab8fabd46f811d5153d8a0cd2fac9a0d41fb593d | Analyze and fix the following issue in the Linux kernel code: mm: exclude reserved pages from dirtyable memory | Problem Details:
Per-zone dirty limits try to distribute page cache pages allocated for
writing across zones in proportion to the individual zone sizes, to reduce
the likelihood of reclaim having to write back individual pages from the
LRU lists in order to make progress.
This patch:
The amount of dirtyable pages sho... | ```diff
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
index 3ac040f19369..ca6ca92418a6 100644
--- a/include/linux/mmzone.h
+++ b/include/linux/mmzone.h
@@ -317,6 +317,12 @@ struct zone {
*/
unsigned long lowmem_reserve[MAX_NR_ZONES];
+ /*
+ * This is a per-zone reserve of pages that should not b... |
f6d7e0cb3ecc248e98fa11d83253f6174bd7e085 | Analyze and fix the following issue in the Linux kernel code: mm, debug: test for online nid when allocating on single node | Problem Details:
Calling alloc_pages_exact_node() means the allocation only passes the
zonelist of a single node into the page allocator. If that node isn't
online, it's zonelist may never have been initialized causing a strange
oops that may not immediately be clear.
I recently debugged an issue where node 0 wasn't ... | ```diff
diff --git a/include/linux/gfp.h b/include/linux/gfp.h
index 91812df1351a..66f172fdf5fe 100644
--- a/include/linux/gfp.h
+++ b/include/linux/gfp.h
@@ -313,7 +313,7 @@ static inline struct page *alloc_pages_node(int nid, gfp_t gfp_mask,
static inline struct page *alloc_pages_exact_node(int nid, gfp_t gfp_mask,
... |
fc8d8620d39dbbaf412b1b9247d77d196d92adb9 | Analyze and fix the following issue in the Linux kernel code: slub: min order when debug_guardpage_minorder > 0 | Problem Details:
Disable slub debug facilities and allocate slabs at minimal order when
debug_guardpage_minorder > 0 to increase probability to catch random
memory corruption by cpu exception.
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Andrea Arcangeli <aarcange@re... | ```diff
diff --git a/mm/slub.c b/mm/slub.c
index 025f6ac51569..d99acbf14e01 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -3654,6 +3654,9 @@ void __init kmem_cache_init(void)
struct kmem_cache *temp_kmem_cache_node;
unsigned long kmalloc_size;
+ if (debug_guardpage_minorder())
+ slub_max_order = 0;
+
kmem_size = o... |
c6968e73b90c2a2fb9a32d4bad249f8f70f70125 | Analyze and fix the following issue in the Linux kernel code: PM/Hibernate: do not count debug pages as savable | Problem Details:
When debugging with CONFIG_DEBUG_PAGEALLOC and debug_guardpage_minorder >
0, we have lot of free pages that are not marked so. Snapshot code
account them as savable, what cause hibernate memory preallocation
failure.
It is pretty hard to make hibernate allocation succeed with
debug_guardpage_minorder... | ```diff
diff --git a/kernel/power/snapshot.c b/kernel/power/snapshot.c
index cbe2c1441392..1cf88900ec4f 100644
--- a/kernel/power/snapshot.c
+++ b/kernel/power/snapshot.c
@@ -858,6 +858,9 @@ static struct page *saveable_highmem_page(struct zone *zone, unsigned long pfn)
PageReserved(page))
return NULL;
+ if ... |
1399ff86f2a2bbacbbe68fa00c5f8c752b344723 | Analyze and fix the following issue in the Linux kernel code: kernel.h: add BUILD_BUG() macro | Problem Details:
We can place this in definitions that we expect the compiler to remove by
dead code elimination. If this assertion fails, we get a nice error
message at build time.
The GCC function attribute error("message") was added in version 4.3, so
we define a new macro __linktime_error(message) to expand to th... | ```diff
diff --git a/include/linux/compiler-gcc4.h b/include/linux/compiler-gcc4.h
index dfadc96e9d63..2f4079175afb 100644
--- a/include/linux/compiler-gcc4.h
+++ b/include/linux/compiler-gcc4.h
@@ -29,6 +29,7 @@
the kernel context */
#define __cold __attribute__((__cold__))
+#define __linktime_error(message) ... |
1e16a539ac16e7b3a8c2cee188897d4bdb88e6e8 | Analyze and fix the following issue in the Linux kernel code: mm/hugetlb.c: fix virtual address handling in hugetlb fault | Problem Details:
handle_mm_fault() passes 'faulted' address to hugetlb_fault(). This
address is not aligned to a hugepage boundary.
Most of the functions for hugetlb pages are aware of that and calculate an
alignment themselves. However some functions such as
copy_user_huge_page() and clear_huge_page() don't handle ... | ```diff
diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index 49e693b7fd0c..ab89d6f382d1 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -2640,6 +2640,8 @@ int hugetlb_fault(struct mm_struct *mm, struct vm_area_struct *vma,
static DEFINE_MUTEX(hugetlb_instantiation_mutex);
struct hstate *h = hstate_vma(vma);
+ address &... |
f90ac3982a78d36f894824636beeef13361d7c59 | Analyze and fix the following issue in the Linux kernel code: mm: avoid livelock on !__GFP_FS allocations | Problem Details:
Colin Cross reported;
Under the following conditions, __alloc_pages_slowpath can loop forever:
gfp_mask & __GFP_WAIT is true
gfp_mask & __GFP_FS is false
reclaim and compaction make no progress
order <= PAGE_ALLOC_COSTLY_ORDER
These conditions happen very often during suspend and resume,
... | ```diff
diff --git a/include/linux/gfp.h b/include/linux/gfp.h
index 656295865d58..91812df1351a 100644
--- a/include/linux/gfp.h
+++ b/include/linux/gfp.h
@@ -368,9 +368,25 @@ void drain_zone_pages(struct zone *zone, struct per_cpu_pages *pcp);
void drain_all_pages(void);
void drain_local_pages(void *dummy);
+/*
+ ... |
938929f14cb595f43cd1a4e63e22d36cab1e4a1f | Analyze and fix the following issue in the Linux kernel code: mm: reduce the amount of work done when updating min_free_kbytes | Problem Details:
When min_free_kbytes is updated, some pageblocks are marked
MIGRATE_RESERVE. Ordinarily, this work is unnoticable as it happens early
in boot but on large machines with 1TB of memory, this has been reported
to delay boot times, probably due to the NUMA distances involved.
The bulk of the work is due ... | ```diff
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 516ab623d773..671e6c94fed7 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -3388,25 +3388,33 @@ static void setup_zone_migrate_reserve(struct zone *zone)
if (page_to_nid(page) != zone_to_nid(zone))
continue;
- /* Blocks with reserved pages wil... |
90a5d5af74f6570af063fb6bff33c6b2f8361bbc | Analyze and fix the following issue in the Linux kernel code: mm-tracepoint: fix documentation and examples | Problem Details:
We renamed the page-free mm tracepoints.
Signed-off-by: Konstantin Khlebnikov <khlebnikov@openvz.org>
Cc: Mel Gorman <mel@csn.ul.ie>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Reviewed-by: Minchan Kim <minchan.kim@gmail.com>
Cc: Hugh Dickins <hughd@google.com>
Signed-off-by: Andrew Morton <a... | ```diff
diff --git a/Documentation/trace/tracepoint-analysis.txt b/Documentation/trace/tracepoint-analysis.txt
index 87bee3c129ba..058cc6c9dc56 100644
--- a/Documentation/trace/tracepoint-analysis.txt
+++ b/Documentation/trace/tracepoint-analysis.txt
@@ -93,14 +93,14 @@ By specifying the -a switch and analysing sleep, ... |
34dbc67a644f11ab3475d822d72e25409911e760 | Analyze and fix the following issue in the Linux kernel code: vmscan: promote shared file mapped pages | Problem Details:
Commit 645747462435 ("vmscan: detect mapped file pages used only once")
greatly decreases lifetime of single-used mapped file pages.
Unfortunately it also decreases life time of all shared mapped file
pages. Because after commit bf3f3bc5e7347 ("mm: don't mark_page_accessed
in fault path") page-fault h... | ```diff
diff --git a/mm/vmscan.c b/mm/vmscan.c
index 11adc890ce30..753c1e6755f0 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -715,7 +715,7 @@ static enum page_references page_check_references(struct page *page,
*/
SetPageReferenced(page);
- if (referenced_page)
+ if (referenced_page || referenced_ptes > 1)
... |
e51e07e0ac7e3ff847d640f41b7527db04d4a4e7 | Analyze and fix the following issue in the Linux kernel code: sparc32: forced setting of mode of sun4m per-cpu timers | Problem Details:
SUN4M per-cpu timers have two modes of work. These are timer mode and
counter mode. Kernel doesn't write anything to the register, which is
connected with mode choice.
So, the mode is chosen by bootloader. This patch forces to use timer
mode from the kernel and to be independent of bootloader.
I had t... | ```diff
diff --git a/arch/sparc/kernel/sun4m_irq.c b/arch/sparc/kernel/sun4m_irq.c
index 422c16dad1f6..e61165161dd3 100644
--- a/arch/sparc/kernel/sun4m_irq.c
+++ b/arch/sparc/kernel/sun4m_irq.c
@@ -399,6 +399,9 @@ static void __init sun4m_init_timers(irq_handler_t counter_fn)
timers_global = (void __iomem *)
(uns... |
a116a05cb4c2d057b3e15ef3bd0f3d657cb6ef99 | Analyze and fix the following issue in the Linux kernel code: [media] cx231xx: fix crash after load/unload/load of module | Problem Details:
The following sequence of commands was triggering a kernel crash in
cdev_get():
modprobe cx231xx
rmmod cx231xx
modprobe cx231xx
v4l2grab -n 1
The problem was that cx231xx_usb_disconnect() was not doing anything
because the test:
if (!dev->udev)
return;
was reached (i.e, dev->udev was NULL).
... | ```diff
diff --git a/drivers/media/video/cx231xx/cx231xx-cards.c b/drivers/media/video/cx231xx/cx231xx-cards.c
index 53dae2a8272d..bfcc8ab706e7 100644
--- a/drivers/media/video/cx231xx/cx231xx-cards.c
+++ b/drivers/media/video/cx231xx/cx231xx-cards.c
@@ -1135,7 +1135,7 @@ static int cx231xx_usb_probe(struct usb_interfa... |
6bc6204e3b7f4ac235e98e362714213369d6a012 | Analyze and fix the following issue in the Linux kernel code: [SCSI] bfa: Fix possible NULL pointer dereference in lunmask add/delete. | Problem Details:
Patch fixes the possible NULL pointer dereference when we try to add or delete
a rpwwn to the lunmask config which is not zoned to this port. Check if the
FCS rport is not NULL before de-referencing it.
Signed-off-by: Krishna Gudipati <kgudipat@brocade.com>
Signed-off-by: James Bottomley <JBottomley@... | ```diff
diff --git a/drivers/scsi/bfa/bfa_fcpim.c b/drivers/scsi/bfa/bfa_fcpim.c
index e07bd4745d8b..846f15b6e1d8 100644
--- a/drivers/scsi/bfa/bfa_fcpim.c
+++ b/drivers/scsi/bfa/bfa_fcpim.c
@@ -2647,7 +2647,8 @@ bfa_fcpim_lunmask_add(struct bfa_s *bfa, u16 vf_id, wwn_t *pwwn,
if (port) {
*pwwn = port->port_cfg.pw... |
cced5041ed5a2d1352186510944b0ddfbdbe4c0b | Analyze and fix the following issue in the Linux kernel code: [SCSI] sym53c8xx: Fix NULL pointer dereference in slave_destroy | Problem Details:
sym53c8xx_slave_destroy unconditionally assumes that sym53c8xx_slave_alloc has
succesesfully allocated a sym_lcb. This can lead to a NULL pointer dereference
(exposed by commit 4e6c82b).
Signed-off-by: Stratos Psomadakis <psomas@gentoo.org>
Cc: stable@vger.kernel.org
Signed-off-by: James Bottomley <JB... | ```diff
diff --git a/drivers/scsi/sym53c8xx_2/sym_glue.c b/drivers/scsi/sym53c8xx_2/sym_glue.c
index b4543f575f46..36d1ed7817eb 100644
--- a/drivers/scsi/sym53c8xx_2/sym_glue.c
+++ b/drivers/scsi/sym53c8xx_2/sym_glue.c
@@ -839,6 +839,10 @@ static void sym53c8xx_slave_destroy(struct scsi_device *sdev)
struct sym_lcb *... |
9fc397fc0878c9540af20cbffc4d546541fe8b23 | Analyze and fix the following issue in the Linux kernel code: [SCSI] scsi_dh_rdac: Fix error path | Problem Details:
If create_singlethread_workqueue() failes, rdac_init should fail too.
Signed-off-by: Richard Weinberger <richard@nod.at>
Acked-by: "Moger, Babu" <Babu.Moger@netapp.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com> | ```diff
diff --git a/drivers/scsi/device_handler/scsi_dh_rdac.c b/drivers/scsi/device_handler/scsi_dh_rdac.c
index 841ebf4a6788..53a31c753cb1 100644
--- a/drivers/scsi/device_handler/scsi_dh_rdac.c
+++ b/drivers/scsi/device_handler/scsi_dh_rdac.c
@@ -953,6 +953,8 @@ static int __init rdac_init(void)
if (!kmpath_rdacd... |
71bc5d94061516c4e70303570128797bcf768b10 | Analyze and fix the following issue in the Linux kernel code: asix: fix setting custom MAC address on Asix 88178 devices | Problem Details:
In kernel v3.2 initialization sequence for Asix 88178 devices was changed so
that hardware is reseted on every time interface is brought up (ifconfig up),
instead just at USB probe time. This causes problem with setting custom MAC
address to device as ax88178_reset causes reload of MAC address from EEP... | ```diff
diff --git a/drivers/net/usb/asix.c b/drivers/net/usb/asix.c
index 8414bdc21235..8e84f5bdd6ca 100644
--- a/drivers/net/usb/asix.c
+++ b/drivers/net/usb/asix.c
@@ -1328,6 +1328,13 @@ static int ax88178_reset(struct usbnet *dev)
if (ret < 0)
return ret;
+ /* Rewrite MAC address */
+ memcpy(data->mac_addr, ... |
8ef66bdc4bda6aac2dae73b84d79dc8c2db33637 | Analyze and fix the following issue in the Linux kernel code: asix: fix setting custom MAC address on Asix 88772 devices | Problem Details:
In kernel v3.2 initialization sequence for Asix 88772 devices was changed so
that hardware is reseted on every time interface is brought up (ifconfig up),
instead just at USB probe time. This causes problem with setting custom MAC
address to device as ax88772_reset causes reload of MAC address from EEP... | ```diff
diff --git a/drivers/net/usb/asix.c b/drivers/net/usb/asix.c
index d0937c4634c9..8414bdc21235 100644
--- a/drivers/net/usb/asix.c
+++ b/drivers/net/usb/asix.c
@@ -978,6 +978,7 @@ static int ax88772_link_reset(struct usbnet *dev)
static int ax88772_reset(struct usbnet *dev)
{
+ struct asix_data *data = (stru... |
2193ceabdcde1fca5e017acf1d0023285531748f | Analyze and fix the following issue in the Linux kernel code: drivers: isdn: Fix dependency for ISDN_PPP | Problem Details:
Fix the following build warning:
warning: (ISDN_PPP) selects SLHC which has unmet direct dependencies (NETDEVICES)
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/drivers/isdn/i4l/Kconfig b/drivers/isdn/i4l/Kconfig
index 9c6650ea848e..2302fbe70ac6 100644
--- a/drivers/isdn/i4l/Kconfig
+++ b/drivers/isdn/i4l/Kconfig
@@ -6,7 +6,7 @@ if ISDN_I4L
config ISDN_PPP
bool "Support synchronous PPP"
- depends on INET
+ depends on INET && NETDEVICES
select SLHC
... |
1dd8117e3320fb42ec40ef2ace982871572d34ed | Analyze and fix the following issue in the Linux kernel code: stmmac: Fix compilation error in mmc_core.c | Problem Details:
Fix this error:
CC drivers/net/ethernet/stmicro/stmmac/mmc_core.o
drivers/net/ethernet/stmicro/stmmac/mmc_core.c: In function 'dwmac_mmc_ctrl':
drivers/net/ethernet/stmicro/stmmac/mmc_core.c:143:2: error: implicit
declaration of function 'pr_debug' [-Werror=implicit-function-declaration]
Sig... | ```diff
diff --git a/drivers/net/ethernet/stmicro/stmmac/mmc_core.c b/drivers/net/ethernet/stmicro/stmmac/mmc_core.c
index 41e6b33e1b08..c07cfe989f6e 100644
--- a/drivers/net/ethernet/stmicro/stmmac/mmc_core.c
+++ b/drivers/net/ethernet/stmicro/stmmac/mmc_core.c
@@ -22,6 +22,7 @@
Author: Giuseppe Cavallaro <peppe.ca... |
e4e9e05409280b50003280afffe27ade21480dd7 | Analyze and fix the following issue in the Linux kernel code: ASoC: Fix recursive dependency due to select ATMEL_SSC in SND_ATMEL_SOC_SSC | Problem Details:
commit 739be96 "ASoC: Fix build dependency for SND_ATMEL_SOC_SSC"
introduces below build warnings:
drivers/misc/Kconfig:212:error: recursive dependency detected!
drivers/misc/Kconfig:212: symbol ATMEL_SSC is selected by SND_ATMEL_SOC_SSC
sound/soc/atmel/Kconfig:9: symbol SND_ATMEL_SOC_SSC i... | ```diff
diff --git a/sound/soc/atmel/Kconfig b/sound/soc/atmel/Kconfig
index a4d6742d61e3..72b09cfd3dc3 100644
--- a/sound/soc/atmel/Kconfig
+++ b/sound/soc/atmel/Kconfig
@@ -9,7 +9,6 @@ config SND_ATMEL_SOC
config SND_ATMEL_SOC_SSC
tristate
depends on SND_ATMEL_SOC
- select ATMEL_SSC
help
Say Y or M if you ... |
307729c8bc5b5a41361af8af95906eee7552acb1 | Analyze and fix the following issue in the Linux kernel code: md/raid1: perform bad-block tests for WriteMostly devices too. | Problem Details:
We normally try to avoid reading from write-mostly devices, but when
we do we really have to check for bad blocks and be sure not to
try reading them.
With the current code, best_good_sectors might not get set and that
causes zero-length read requests to be send down which is very
confusing.
This bug... | ```diff
diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c
index cc24f0cb7ee3..a368db2431a5 100644
--- a/drivers/md/raid1.c
+++ b/drivers/md/raid1.c
@@ -531,8 +531,17 @@ static int read_balance(struct r1conf *conf, struct r1bio *r1_bio, int *max_sect
if (test_bit(WriteMostly, &rdev->flags)) {
/* Don't balance ... |
624f0c186978f9cb0ce6582f445922eaaa4a7f4a | Analyze and fix the following issue in the Linux kernel code: [media] dvb_ca_en50221: fix compilation breakage | Problem Details:
As reported by Toralf:
the build failed with :
CC [M] drivers/media/dvb/dvb-core/dvb_ca_en50221.o
In file included from arch/x86/include/asm/uaccess.h:573:0,
from include/linux/poll.h:14,
from drivers/media/dvb/dvb-core/dvbdev.h:27,
from drivers/me... | ```diff
diff --git a/drivers/media/dvb/dvb-core/dvb_ca_en50221.c b/drivers/media/dvb/dvb-core/dvb_ca_en50221.c
index 7ea517b7e186..9be65a3b931f 100644
--- a/drivers/media/dvb/dvb-core/dvb_ca_en50221.c
+++ b/drivers/media/dvb/dvb-core/dvb_ca_en50221.c
@@ -1306,6 +1306,10 @@ static ssize_t dvb_ca_en50221_io_write(struct ... |
1a19f77f3642b8194ad9cf55548cc5d92e841766 | Analyze and fix the following issue in the Linux kernel code: ath9k: Fix regression in channelwidth switch at the same channel | Problem Details:
The commit "ath9k: Fix invalid noisefloor reading due to channel update"
preserves the current channel noisefloor readings before updating
channel type at the same channel index. It is also updating the curchan
pointer. As survey updation is also referring curchan pointer to fetch
the appropriate index... | ```diff
diff --git a/drivers/net/wireless/ath/ath9k/calib.c b/drivers/net/wireless/ath/ath9k/calib.c
index 172e33db7f4c..2f4b48e6fb03 100644
--- a/drivers/net/wireless/ath/ath9k/calib.c
+++ b/drivers/net/wireless/ath/ath9k/calib.c
@@ -400,6 +400,7 @@ bool ath9k_hw_getnf(struct ath_hw *ah, struct ath9k_channel *chan)
... |
e4922f2b5f1c2b3daa80b56a6eeca984cbee0dde | Analyze and fix the following issue in the Linux kernel code: ath9k_hw: fix a comment | Problem Details:
also remove an unused macro and a function declaration
Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com> | ```diff
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_phy.c b/drivers/net/wireless/ath/ath9k/ar9003_phy.c
index 2589b38b689a..2b0bfb8cca02 100644
--- a/drivers/net/wireless/ath/ath9k/ar9003_phy.c
+++ b/drivers/net/wireless/ath/ath9k/ar9003_phy.c
@@ -46,7 +46,7 @@ static const int m2ThreshExt_off = 127;
* @chan:
... |
d90db4b12bc1b9b8a787ef28550fdb767ee25a49 | Analyze and fix the following issue in the Linux kernel code: rtl8192se: Fix BUG caused by failure to check skb allocation | Problem Details:
When downloading firmware into the device, the driver fails to check the
return when allocating an skb. When the allocation fails, a BUG can be
generated, as seen in https://bugzilla.redhat.com/show_bug.cgi?id=771656.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Stable <stable@vger.kern... | ```diff
diff --git a/drivers/net/wireless/rtlwifi/rtl8192se/fw.c b/drivers/net/wireless/rtlwifi/rtl8192se/fw.c
index 6f91a148c222..3fda6b1dcf46 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192se/fw.c
+++ b/drivers/net/wireless/rtlwifi/rtl8192se/fw.c
@@ -196,6 +196,8 @@ static bool _rtl92s_firmware_downloadcode(struct ... |
497421880acecd0281d3182d534f3d28c927caec | Analyze and fix the following issue in the Linux kernel code: NVMe: Fix DMA mapping for admin commands | Problem Details:
We were always mapping as DMA_FROM_DEVICE then unmapping with
DMA_TO_DEVICE which was clearly not correct. Follow the same pattern as
nvme_submit_io() and key off the bottom bit of the opcode to determine
whether this is a read or a write.
Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com> | ```diff
diff --git a/drivers/block/nvme.c b/drivers/block/nvme.c
index 1cc01872f6dc..3f8cae9dc960 100644
--- a/drivers/block/nvme.c
+++ b/drivers/block/nvme.c
@@ -1165,7 +1165,8 @@ static int nvme_user_admin_cmd(struct nvme_ns *ns,
length = cmd.data_len;
if (cmd.data_len) {
- iod = nvme_map_user_pages(dev, 1, cm... |
74ee4ef1f901fbb014bdcdc9171d126490ce2b62 | Analyze and fix the following issue in the Linux kernel code: slub: disallow changing cpu_partial from userspace for debug caches | Problem Details:
For caches with debugging enabled, "slub: Switch per cpu partial page
support off for debugging" changes cpu_partial to 0. It shouldn't be
tunable from userspace for such caches, otherwise the same accounting
issues arise during validation.
This patch disallows tuning /sys/kernel/slab/cache/cpu_parti... | ```diff
diff --git a/mm/slub.c b/mm/slub.c
index 6dc79f8e6ce9..a47df0aa5d36 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -4649,6 +4649,8 @@ static ssize_t cpu_partial_store(struct kmem_cache *s, const char *buf,
err = strict_strtoul(buf, 10, &objects);
if (err)
return err;
+ if (objects && kmem_cache_debug(s))
+ r... |
d0cd5d482b8a6dc92c6c69a5387baf72ea84f23a | Analyze and fix the following issue in the Linux kernel code: xhci: Fix USB 3.0 device restart on resume. | Problem Details:
The xHCI hub port code gets passed a zero-based port number by the USB
core. It then adds one to in order to find a device slot by port number
and device speed by calling xhci_find_slot_id_by_port. That function
clearly states it requires a one-based port number. The xHCI port
status change event ha... | ```diff
diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
index b90e1386418b..5a818cbbab44 100644
--- a/drivers/usb/host/xhci-ring.c
+++ b/drivers/usb/host/xhci-ring.c
@@ -1204,6 +1204,7 @@ static void handle_vendor_event(struct xhci_hcd *xhci,
*
* Returns a zero-based port number, which is s... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.