id stringlengths 40 40 | instruction stringlengths 68 308 | input stringlengths 17 33.4k | output stringlengths 100 30k |
|---|---|---|---|
f278d97215d3cca43aa1569b5ae712cc17e74702 | Analyze and fix the following issue in the Linux kernel code: drm/i915: only set the HDMI port on the DIP once | Problem Details:
Not once for each InfoFrame. Now we have a function that allows us to
do this.
[danvet: Paulo clarified on irc that a later bugfix patch needs this
cleanup.]
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> | ```diff
diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
index 2f2adc4e511c..1df1ec764a01 100644
--- a/drivers/gpu/drm/i915/intel_hdmi.c
+++ b/drivers/gpu/drm/i915/intel_hdmi.c
@@ -121,18 +121,9 @@ static void g4x_write_infoframe(struct drm_encoder *encoder,
uint32_t *data = (uint32_... |
0c14c7f957e70c3cb100e3fd6553b0ebea557571 | Analyze and fix the following issue in the Linux kernel code: drm/i915: properly alternate between DVI and HDMI | Problem Details:
This solves problems that happen when you alternate between HDMI and
DVI on the same port. I can reproduce these problems using DP->HDMI
and DP->DVI adapters on a DP port.
When you first plug HDMI and then plug DVI, you need to stop sending
DIPs, even if the port is in DVI mode (see the HDMI register ... | ```diff
diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
index 8d892b0cd8a1..2f2adc4e511c 100644
--- a/drivers/gpu/drm/i915/intel_hdmi.c
+++ b/drivers/gpu/drm/i915/intel_hdmi.c
@@ -308,9 +308,6 @@ static void intel_set_infoframe(struct drm_encoder *encoder,
{
struct intel_hdmi *inte... |
ea1b3ebac9a1c72c4362c784b4ed069a938a4ddb | Analyze and fix the following issue in the Linux kernel code: perf tools: Fix pager on minimal-install embedded systems | Problem Details:
Some Distributions may lack "less" package being included by default,
e.g., Linaro nano rootfs. In those cases use the portable "pager"
command instead of "less".
Signed-off-by: Avik Sil <avik.sil@linaro.org>
Acked-by: Ingo Molnar <mingo@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijl... | ```diff
diff --git a/tools/perf/util/pager.c b/tools/perf/util/pager.c
index 1915de20dcac..3322b8446e89 100644
--- a/tools/perf/util/pager.c
+++ b/tools/perf/util/pager.c
@@ -57,6 +57,10 @@ void setup_pager(void)
}
if (!pager)
pager = getenv("PAGER");
+ if (!pager) {
+ if (!access("/usr/bin/pager", X_OK))
+ p... |
f1439c315b328bbb3f7f6fdd814a7057f9e130d5 | Analyze and fix the following issue in the Linux kernel code: perf tools: Fix make tarballs | Problem Details:
The patch series that introduced the top level tools/ makefile and the
libtraceevent broke this feature where files needed to build in a
detached tarball were not included in the MANIFEST file and thus not
included in the tarball.
Fix it by adding the relevant files to the MANIFEST.
Cc: Borislav Petk... | ```diff
diff --git a/tools/perf/MANIFEST b/tools/perf/MANIFEST
index 5476bc0a1eac..b4b572e8c100 100644
--- a/tools/perf/MANIFEST
+++ b/tools/perf/MANIFEST
@@ -1,4 +1,6 @@
tools/perf
+tools/scripts
+tools/lib/traceevent
include/linux/const.h
include/linux/perf_event.h
include/linux/rbtree.h
``` |
52deff71bc2b2c24587ab71f588ff5e4c9279349 | Analyze and fix the following issue in the Linux kernel code: perf script: Fix regression in callchain dso name | Problem Details:
$ perf script -i /tmp/perf.data
...
gcc 13623 544315.062858: context-switches:
ffffffff815f65c9 __schedule ([kernel.kallsyms])
ffffffff81087cea __cond_resched ([kernel.kallsyms])
ffffffff815f6b92 _cond_resched ([kernel.kallsyms])
ffffffff815fb87a do_page_fault ([kernel.kallsyms])
ff... | ```diff
diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c
index 93d355d27109..48206144758e 100644
--- a/tools/perf/util/session.c
+++ b/tools/perf/util/session.c
@@ -1460,7 +1460,7 @@ void perf_event__print_ip(union perf_event *event, struct perf_sample *sample,
}
if (print_dso) {
printf("... |
79695e1bb65ba0e21488c360a1bed6e358354aaa | Analyze and fix the following issue in the Linux kernel code: perf stat: Initialize default events wrt exclude_{guest,host} | Problem Details:
When no event is specified the tools use perf_evlist__add_default(), that will
call event_attr_init to initialize the KVM exclusion bits.
When the change was made to the tools so that by default guest samples would be
excluded, the changes were made just to the parsing routines and to
perf_evlist__add... | ```diff
diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c
index 62ae30d34fa6..262589991ea4 100644
--- a/tools/perf/builtin-stat.c
+++ b/tools/perf/builtin-stat.c
@@ -1129,7 +1129,7 @@ static int add_default_attributes(void)
return 0;
if (!evsel_list->nr_entries) {
- if (perf_evlist__add_attrs_a... |
4523e1458566a0e8ecfaff90f380dd23acc44d27 | Analyze and fix the following issue in the Linux kernel code: mm: fix vma_resv_map() NULL pointer | Problem Details:
hugetlb_reserve_pages() can be used for either normal file-backed
hugetlbfs mappings, or MAP_HUGETLB. In the MAP_HUGETLB, semi-anonymous
mode, there is not a VMA around. The new call to resv_map_put() assumed
that there was, and resulted in a NULL pointer dereference:
BUG: unable to handle kernel ... | ```diff
diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index 285a81e87ec8..e198831276a3 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -3036,7 +3036,8 @@ int hugetlb_reserve_pages(struct inode *inode,
region_add(&inode->i_mapping->private_list, from, to);
return 0;
out_err:
- resv_map_put(vma);
+ if (vma)
+ resv_map_... |
107baecaca0b2843f1a0464701b253e51ef6f0e2 | Analyze and fix the following issue in the Linux kernel code: perf annotate browser: Fix help window entry for navigating to hottest line | Problem Details:
Its 'H', not 'h'. The later is for getting to the help window.
Reported-by: Ingo Molnar <mingo@kernel.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Namhyung Kim <namhyung@gmail.com>
Cc: Paul... | ```diff
diff --git a/tools/perf/ui/browsers/annotate.c b/tools/perf/ui/browsers/annotate.c
index 4deea6aaf927..34b1c46eaf42 100644
--- a/tools/perf/ui/browsers/annotate.c
+++ b/tools/perf/ui/browsers/annotate.c
@@ -668,7 +668,7 @@ static int annotate_browser__run(struct annotate_browser *browser, int evidx,
"q/ESC/C... |
91557e847dbc715acf2d847a1ffec63f71b00b65 | Analyze and fix the following issue in the Linux kernel code: perf report: Use the right symbol for annotation | Problem Details:
In non symbolic views, i.e. --sort without "symbol", as in:
perf report --sort comm
We're segfaulting in the --tui because we're testing the symbol resolved
and then trying to use the symbol on the histogram entry where we're
coalescing all hits for a COMM, and the first hist_entry for a comm may
ha... | ```diff
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
index 8c767c6bca91..2400e009f149 100644
--- a/tools/perf/builtin-report.c
+++ b/tools/perf/builtin-report.c
@@ -162,7 +162,7 @@ static int perf_evsel__add_hist_entry(struct perf_evsel *evsel,
* so we don't allocated the extra space needed... |
48235a68a3d1db579fc20d9915815228a1825757 | Analyze and fix the following issue in the Linux kernel code: Btrfs: fix false positive in check-integrity on unmount | Problem Details:
During unmount, it could happen that the integrity checker printed a
warning message "attempt to free ... on umount which is not yet iodone"
which turned out to be a false positive.
Signed-off-by: Stefan Behrens <sbehrens@giantdisaster.de> | ```diff
diff --git a/fs/btrfs/check-integrity.c b/fs/btrfs/check-integrity.c
index ed7618389327..9cebb1fd6a3c 100644
--- a/fs/btrfs/check-integrity.c
+++ b/fs/btrfs/check-integrity.c
@@ -3337,7 +3337,7 @@ void btrfsic_unmount(struct btrfs_root *root,
btrfsic_block_link_free(l);
}
- if (b_all->is_iodone)
+ i... |
86ff7ffce0b93aed14df4c8dcedd05bb5e2fdfbc | Analyze and fix the following issue in the Linux kernel code: Btrfs: fix runtime warning in check-integrity check data mode | Problem Details:
If a file_extent_item was located at the very end of a leaf and there was
not enough space to hold a full item, but there was enough space to hold
one of type BTRFS_FILE_EXTENT_INLINE or PREALLOC, and it was only such a
short item, a warning was printed anyway. This check is now fixed.
Signed-off-by: ... | ```diff
diff --git a/fs/btrfs/check-integrity.c b/fs/btrfs/check-integrity.c
index 7f6cc359e440..ed7618389327 100644
--- a/fs/btrfs/check-integrity.c
+++ b/fs/btrfs/check-integrity.c
@@ -1428,6 +1428,28 @@ static int btrfsic_handle_extent_data(
file_extent_item_offset = offsetof(struct btrfs_leaf, items) +
i... |
5bdbeb2187a99d690b374a8c5ec9911fcbcfe739 | Analyze and fix the following issue in the Linux kernel code: Btrfs: fix return code in drop_objectid_items | Problem Details:
So dpkg fsync()'s the file and the directory containing the file whenever it
writes to a file which is really slow in btrfs. This is partly because
fsync()'ing a directory _always_ committed the transaction instead of just
going to the tree log. This is because drop_objectid_items() would return 1
si... | ```diff
diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c
index 425014bdc6ac..2017d0ff511c 100644
--- a/fs/btrfs/tree-log.c
+++ b/fs/btrfs/tree-log.c
@@ -2667,6 +2667,8 @@ static int drop_objectid_items(struct btrfs_trans_handle *trans,
btrfs_release_path(path);
}
btrfs_release_path(path);
+ if (ret > 0)
+ ... |
762f2263260d576504aeb23d20f90120acdb025f | Analyze and fix the following issue in the Linux kernel code: Btrfs: fix the same inode id problem when doing auto defragment | Problem Details:
Two files in the different subvolumes may have the same inode id, so
The rb-tree which is used to manage the defragment object must take it
into account. This patch fix this problem.
Signed-off-by: Miao Xie <miaox@cn.fujitsu.com> | ```diff
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c
index c9005f216975..2e63cdc2b093 100644
--- a/fs/btrfs/file.c
+++ b/fs/btrfs/file.c
@@ -65,6 +65,21 @@ struct inode_defrag {
int cycled;
};
+static int __compare_inode_defrag(struct inode_defrag *defrag1,
+ struct inode_defrag *defrag2)
+{
+ if (defrag1->... |
8a35d95ff4680a456d3ce47df9638f33d4f54f20 | Analyze and fix the following issue in the Linux kernel code: Btrfs: fix how we deal with the orphan block rsv | Problem Details:
Ceph was hitting this race where we would remove an inode from the per-root
orphan list before we would release the space we had reserved for the inode.
We actually don't need a list or anything, we just need to make sure the
root doesn't try to free up the orphan reserve until after the inodes have
re... | ```diff
diff --git a/fs/btrfs/btrfs_inode.h b/fs/btrfs/btrfs_inode.h
index 6265edb219e2..ce2c9d60031e 100644
--- a/fs/btrfs/btrfs_inode.h
+++ b/fs/btrfs/btrfs_inode.h
@@ -36,6 +36,7 @@
#define BTRFS_INODE_DUMMY 2
#define BTRFS_INODE_IN_DEFRAG 3
#define BTRFS_INODE_DELALLOC_META_RESERVED 4
+#define BTRFS_INODE_HA... |
cd023e7b17fe86c530475da210b3348421c40e5f | Analyze and fix the following issue in the Linux kernel code: Btrfs: merge contigous regions when loading free space cache | Problem Details:
When we write out the free space cache we will write out everything that is
in our in memory tree, and then we will just walk the pinned extents tree
and write anything we see there. The problem with this is that during
normal operations the pinned extents will be merged back into the free space
tree ... | ```diff
diff --git a/fs/btrfs/free-space-cache.c b/fs/btrfs/free-space-cache.c
index cecf8df62481..19a0d85b451c 100644
--- a/fs/btrfs/free-space-cache.c
+++ b/fs/btrfs/free-space-cache.c
@@ -33,6 +33,8 @@
static int link_free_space(struct btrfs_free_space_ctl *ctl,
struct btrfs_free_space *info);
+static void... |
f8c5d0b443ff87c43ba690fa2b5bd2c9387d8624 | Analyze and fix the following issue in the Linux kernel code: Btrfs: fix wrong error returned by adding a device | Problem Details:
Reproduce:
$ mkfs.btrfs /dev/sdb7
$ mount /dev/sdb7 /mnt/btrfs -o ro
$ btrfs dev add /dev/sdb8 /mnt/btrfs
ERROR: error adding the device '/dev/sdb8' - Invalid argument
Since we mount with readonly options, and /dev/sdb7 is not a seeding one,
a readonly notification is preferred.
Signed-off-by: Liu Bo... | ```diff
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index 1411b99555a4..48a06d1fc067 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -1633,7 +1633,7 @@ int btrfs_init_new_device(struct btrfs_root *root, char *device_path)
int ret = 0;
if ((sb->s_flags & MS_RDONLY) && !root->fs_info->fs_device... |
2eec6c8102c62c540c637176271cfdb13d828d7b | Analyze and fix the following issue in the Linux kernel code: Fix minor type issues | Problem Details:
Address some minor type issues identified by sparse checker.
Signed-off-by: Daniel J Blueman <daniel@quora.org> | ```diff
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index fccde7402cfe..9ebb2c7145ad 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -2916,7 +2916,7 @@ long btrfs_ioctl_space_info(struct btrfs_root *root, void __user *arg)
up_read(&info->groups_sem);
}
- user_dest = (struct btrfs_ioctl_space_info *)... |
0d2450abfa359ff94a2bee64a7daeba68c346c81 | Analyze and fix the following issue in the Linux kernel code: btrfs: allow changing 'thread_pool' size at remount time | Problem Details:
Changing 'mount -oremount,thread_pool=2 /' didn't make any effect:
maximum amount of worker threads is specified in 2 places:
- in 'strict btrfs_fs_info::thread_pool_size'
- in each worker struct: 'struct btrfs_workers::max_workers'
'mount -oremount' updated only 'btrfs_fs_info::thread_pool_size'.
F... | ```diff
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
index bd6d143cea85..2cd32175753d 100644
--- a/fs/btrfs/super.c
+++ b/fs/btrfs/super.c
@@ -435,11 +435,8 @@ int btrfs_parse_options(struct btrfs_root *root, char *options)
case Opt_thread_pool:
intarg = 0;
match_int(&args[0], &intarg);
- if (intarg) {... |
d7dbe9e7f64e72ec6548658857c5d92327a73633 | Analyze and fix the following issue in the Linux kernel code: Btrfs: fix compile warnings in extent_io.c | Problem Details:
These warnings are bogus since we will always have at least one page in an
eb, but to make the compiler happy just set ret = 0 in these two cases.
Thanks,
Btrfs: fix compile warnings in extent_io.c
These warnings are bogus since we will always have at least one page in an
eb, but to make the compiler ... | ```diff
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index 82b4829f00b8..836fc37a437a 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -3163,7 +3163,7 @@ static int write_one_eb(struct extent_buffer *eb,
u64 offset = eb->start;
unsigned long i, num_pages;
int rw = (epd->sync_io ? WRITE_... |
58b7b53a36b0be8081fbfc91aeea24b83c20ca1b | Analyze and fix the following issue in the Linux kernel code: xen/balloon: Subtract from xen_released_pages the count that is populated. | Problem Details:
We did not take into account that xen_released_pages would be
used outside the initial E820 parsing code. As such we would
did not subtract from xen_released_pages the count of pages
that we had populated back (instead we just did a simple
extra_pages = released - populated).
The balloon driver uses x... | ```diff
diff --git a/arch/x86/xen/setup.c b/arch/x86/xen/setup.c
index 3ebba0753d38..a4790bf22c59 100644
--- a/arch/x86/xen/setup.c
+++ b/arch/x86/xen/setup.c
@@ -371,7 +371,8 @@ char * __init xen_memory_setup(void)
populated = xen_populate_chunk(map, memmap.nr_entries,
max_pfn, &last_pfn, xen_released_pages);
... |
20b297d620cd1bb94127942bbb3702fb7b1030b2 | Analyze and fix the following issue in the Linux kernel code: Btrfs: tree mod log sanity checks in join_transaction | Problem Details:
When a fresh transaction begins, the tree mod log must be clean. Users of
the tree modification log must ensure they never span across transaction
boundaries.
We reset the sequence to 0 in this safe situation to make absolutely sure
overflow can't happen.
Signed-off-by: Jan Schmidt <list.btrfs@jan-o-... | ```diff
diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c
index eb2bd826bb04..667735fb45e6 100644
--- a/fs/btrfs/transaction.c
+++ b/fs/btrfs/transaction.c
@@ -122,6 +122,24 @@ loop:
cur_trans->delayed_refs.flushing = 0;
cur_trans->delayed_refs.run_delayed_start = 0;
cur_trans->delayed_refs.seq = 1;
+
... |
454c79999f7eaedcdf4c15c449e43902980cbdf5 | Analyze and fix the following issue in the Linux kernel code: sched/rt: Fix SCHED_RR across cgroups | Problem Details:
task_tick_rt() has an optimization to only reschedule SCHED_RR tasks
if they were the only element on their rq. However, with cgroups
a SCHED_RR task could be the only element on its per-cgroup rq but
still be competing with other SCHED_RR tasks in its parent's
cgroup. In this case, the SCHED_RR task... | ```diff
diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c
index 295da737b6fe..2a4e8dffbd6b 100644
--- a/kernel/sched/rt.c
+++ b/kernel/sched/rt.c
@@ -1985,6 +1985,8 @@ static void watchdog(struct rq *rq, struct task_struct *p)
static void task_tick_rt(struct rq *rq, struct task_struct *p, int queued)
{
+ struct sc... |
74a5ce20e6eeeb3751340b390e7ac1d1d07bbf55 | Analyze and fix the following issue in the Linux kernel code: sched: Fix SD_OVERLAP | Problem Details:
SD_OVERLAP exists to allow overlapping groups, overlapping groups
appear in NUMA topologies that aren't fully connected.
The typical result of not fully connected NUMA is that each cpu (or
rather node) will have different spans for a particular distance.
However due to how sched domains are traversed ... | ```diff
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 55733616baaa..3a69374fb427 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -6030,11 +6030,14 @@ build_overlap_sched_groups(struct sched_domain *sd, int cpu)
cpumask_or(covered, covered, sg_span);
- sg->sgp = *per_cpu_ptr(sdd->sgp... |
5aaa0b7a2ed5b12692c9ffb5222182bd558d3146 | Analyze and fix the following issue in the Linux kernel code: sched/nohz: Fix rq->cpu_load calculations some more | Problem Details:
Follow up on commit 556061b00 ("sched/nohz: Fix rq->cpu_load[]
calculations") since while that fixed the busy case it regressed the
mostly idle case.
Add a callback from the nohz exit to also age the rq->cpu_load[]
array. This closes the hole where either there was no nohz load
balance pass during the... | ```diff
diff --git a/include/linux/sched.h b/include/linux/sched.h
index f45c0b280b5d..d61e5977e517 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -145,6 +145,7 @@ extern unsigned long this_cpu_load(void);
extern void calc_global_load(unsigned long ticks);
+extern void update_cpu_load_nohz(void)... |
fbe42f66c66c279b4ed9b8f515058a09bc731c49 | Analyze and fix the following issue in the Linux kernel code: ASoC: fsi: bugfix: ensure dma is terminated | Problem Details:
FSI DMAEngine has to be stopped certainly at the start/stop time.
Without this patch, it will include noise on playback.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> | ```diff
diff --git a/sound/soc/sh/fsi.c b/sound/soc/sh/fsi.c
index 6e750a8ae2a9..2ef98536f1da 100644
--- a/sound/soc/sh/fsi.c
+++ b/sound/soc/sh/fsi.c
@@ -1178,6 +1178,8 @@ static void fsi_dma_push_start_stop(struct fsi_priv *fsi, struct fsi_stream *io,
fsi_reg_mask_set(fsi, OUT_DMAC, DMA_ON, enable);
+ dmaengine... |
4a1b09b79b07cf70c72a091e8fe0660f68541f30 | Analyze and fix the following issue in the Linux kernel code: ASoC: fsi: bugfix: correct dma area | Problem Details:
FSI driver is using dma_sync_single_xxx(),
but the dma area was not correct.
This patch fix it up.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> | ```diff
diff --git a/sound/soc/sh/fsi.c b/sound/soc/sh/fsi.c
index 05582c12b902..6e750a8ae2a9 100644
--- a/sound/soc/sh/fsi.c
+++ b/sound/soc/sh/fsi.c
@@ -1052,6 +1052,13 @@ static int fsi_dma_quit(struct fsi_priv *fsi, struct fsi_stream *io)
return 0;
}
+static dma_addr_t fsi_dma_get_area(struct fsi_stream *io)
+... |
1ff2f40305772b159a91c19590ee159d3a504afc | Analyze and fix the following issue in the Linux kernel code: [SCSI] fix scsi_wait_scan | Problem Details:
Commit c751085943362143f84346d274e0011419c84202
Author: Rafael J. Wysocki <rjw@sisk.pl>
Date: Sun Apr 12 20:06:56 2009 +0200
PM/Hibernate: Wait for SCSI devices scan to complete during resume
Broke the scsi_wait_scan module in 2.6.30. Apparently debian still uses it so
fix it and backport to ... | ```diff
diff --git a/drivers/scsi/scsi_wait_scan.c b/drivers/scsi/scsi_wait_scan.c
index 74708fcaf82f..ae7814874618 100644
--- a/drivers/scsi/scsi_wait_scan.c
+++ b/drivers/scsi/scsi_wait_scan.c
@@ -12,7 +12,7 @@
#include <linux/module.h>
#include <linux/device.h>
-#include <scsi/scsi_scan.h>
+#include "scsi_priv.h... |
32fad281c0680ed0ccade7dda85a2121cf9b1d06 | Analyze and fix the following issue in the Linux kernel code: KVM: PPC: Book3S HV: Make the guest hash table size configurable | Problem Details:
This adds a new ioctl to enable userspace to control the size of the guest
hashed page table (HPT) and to clear it out when resetting the guest.
The KVM_PPC_ALLOCATE_HTAB ioctl is a VM ioctl and takes as its parameter
a pointer to a u32 containing the desired order of the HPT (log base 2
of the size in... | ```diff
diff --git a/Documentation/virtual/kvm/api.txt b/Documentation/virtual/kvm/api.txt
index 930126698a0f..310fe508d9cd 100644
--- a/Documentation/virtual/kvm/api.txt
+++ b/Documentation/virtual/kvm/api.txt
@@ -1930,6 +1930,42 @@ The "pte_enc" field provides a value that can OR'ed into the hash
PTE's RPN field (ie... |
2e1ae9c07df5956ebab19144aa0da58ea37c9f69 | Analyze and fix the following issue in the Linux kernel code: KVM: PPC: Factor out guest epapr initialization | Problem Details:
epapr paravirtualization support is now a Kconfig
selectable option
Signed-off-by: Liu Yu <yu.liu@freescale.com>
[stuart.yoder@freescale.com: misc minor fixes, description update]
Signed-off-by: Stuart Yoder <stuart.yoder@freescale.com>
Signed-off-by: Alexander Graf <agraf@suse.de> | ```diff
diff --git a/arch/powerpc/include/asm/epapr_hcalls.h b/arch/powerpc/include/asm/epapr_hcalls.h
index 976835d8f22e..bf2c06c33871 100644
--- a/arch/powerpc/include/asm/epapr_hcalls.h
+++ b/arch/powerpc/include/asm/epapr_hcalls.h
@@ -153,6 +153,8 @@
#define EV_HCALL_CLOBBERS2 EV_HCALL_CLOBBERS3, "r5"
#define EV_... |
e42bb9bfbb43366cd1899c9564d043c41ebd8852 | Analyze and fix the following issue in the Linux kernel code: ASoC: fsi: bugfix: enable master clock control on DMA stream | Problem Details:
DMA stream handler didn't care about master clock.
This patch fixes it up.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> | ```diff
diff --git a/sound/soc/sh/fsi.c b/sound/soc/sh/fsi.c
index 7cee22515d9d..05582c12b902 100644
--- a/sound/soc/sh/fsi.c
+++ b/sound/soc/sh/fsi.c
@@ -1172,9 +1172,14 @@ static int fsi_dma_transfer(struct fsi_priv *fsi, struct fsi_stream *io)
static void fsi_dma_push_start_stop(struct fsi_priv *fsi, struct fsi_str... |
43a8d39d0137612c336aa8bbb2cb886a79772ffb | Analyze and fix the following issue in the Linux kernel code: [SCSI] fix async probe regression | Problem Details:
Commit a7a20d1 "[SCSI] sd: limit the scope of the async probe domain"
moved sd probe work out of reach of wait_for_device_probe(). Allow it
to be synced via scsi_complete_async_scans().
Reported-by: Meelis Roos <mroos@linux.ee>
Tested-by: Meelis Roos <mroos@linux.ee>
Signed-off-by: Dan Williams <dan.... | ```diff
diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c
index 01b03744f1f9..2e5fe584aad3 100644
--- a/drivers/scsi/scsi_scan.c
+++ b/drivers/scsi/scsi_scan.c
@@ -147,7 +147,7 @@ int scsi_complete_async_scans(void)
do {
if (list_empty(&scanning_hosts))
- return 0;
+ goto out;
/* If we can'... |
b83d543fd934d565fb243ef348b06a61d794b31d | Analyze and fix the following issue in the Linux kernel code: [SCSI] be2iscsi: fix dma free size mismatch regression | Problem Details:
This patch should go into 3.5 fixes. The bug was added in the
patches for the 3.5 feature window.
As you can see from the patch I made a mistake. During
development I switched from passing a struct to the size of
the struct, but left the sizeof. This results in us allocating
4 bytes (sizeof(int)) but ... | ```diff
diff --git a/drivers/scsi/be2iscsi/be_mgmt.c b/drivers/scsi/be2iscsi/be_mgmt.c
index 01bb04cd9e75..2a096795b9aa 100644
--- a/drivers/scsi/be2iscsi/be_mgmt.c
+++ b/drivers/scsi/be2iscsi/be_mgmt.c
@@ -571,13 +571,12 @@ free_cmd:
static int mgmt_alloc_cmd_data(struct beiscsi_hba *phba, struct be_dma_mem *cmd,
... |
90599b62ca80a0d2f88aa88bc05bf8795731fab8 | Analyze and fix the following issue in the Linux kernel code: [SCSI] qla4xxx: Fix clear ddb mbx command failure issue. | Problem Details:
Allow ddb state to change to DDB_DS_NO_CONNECTION_ACTIVE or
DDB_DS_SESSION_FAILED before issuing clear ddb mailbox cmd,
because clear ddb mailbox cmd fails if the ddb state is not
equal to DDB_DS_NO_CONNECTION_ACTIVE or DDB_DS_SESSION_FAILED.
Signed-off-by: Manish Rangankar <manish.rangankar@qlogic.co... | ```diff
diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c
index ee47820c30a6..45144aa04433 100644
--- a/drivers/scsi/qla4xxx/ql4_os.c
+++ b/drivers/scsi/qla4xxx/ql4_os.c
@@ -1555,19 +1555,53 @@ static void qla4xxx_session_destroy(struct iscsi_cls_session *cls_sess)
struct iscsi_session *sess;... |
3d948e2a21ed8641a84ad437d2544b215d747916 | Analyze and fix the following issue in the Linux kernel code: [SCSI] qla4xxx: Fix kernel panic during discovery logout. | Problem Details:
Update the session and connection parameter before sending
connection logged in event to iscsiadm because in some
scenario logout may come in just after we send the logged
in event to user, which free up session, connection and ddb,
but DPC is still updating session and connect parameter
which can lead... | ```diff
diff --git a/drivers/scsi/qla4xxx/ql4_init.c b/drivers/scsi/qla4xxx/ql4_init.c
index 90ee5d8fa731..05484364010e 100644
--- a/drivers/scsi/qla4xxx/ql4_init.c
+++ b/drivers/scsi/qla4xxx/ql4_init.c
@@ -884,8 +884,8 @@ int qla4xxx_ddb_change(struct scsi_qla_host *ha, uint32_t fw_ddb_index,
switch (state) {
ca... |
491af9903b858ee7c36735dc31708fe4074ce56f | Analyze and fix the following issue in the Linux kernel code: s390/uaccess: fix access_ok compile warnings | Problem Details:
On s390 access_ok is a macro which discards all parameters and always
returns 1. This can result in compile warnings which warn about unused
variables like this:
fs/read_write.c: In function 'rw_copy_check_uvector':
fs/read_write.c:684:16: warning: unused variable 'buf' [-Wunused-variable]
Fix this b... | ```diff
diff --git a/arch/s390/include/asm/uaccess.h b/arch/s390/include/asm/uaccess.h
index 8e83da66df0d..1f3a79bcd262 100644
--- a/arch/s390/include/asm/uaccess.h
+++ b/arch/s390/include/asm/uaccess.h
@@ -50,10 +50,15 @@
#define segment_eq(a,b) ((a).ar4 == (b).ar4)
-#define __access_ok(addr, size) \
-({ \
- _... |
1896d256d3513eafa2c2d506299b8f3951319ca2 | Analyze and fix the following issue in the Linux kernel code: s390/cmpxchg: fix sign extension bugs | Problem Details:
For 1 and 2 byte operands for xchg and cmpxchg the old and new values
get or'ed into the larger 4 byte old value before the compare and swap
instruction gets executed. This is done without using the proper byte
mask before or'ing the values.
If the caller passed in negative old or new values these got ... | ```diff
diff --git a/arch/s390/include/asm/cmpxchg.h b/arch/s390/include/asm/cmpxchg.h
index 26f2cb1aa9ff..8d798e962b63 100644
--- a/arch/s390/include/asm/cmpxchg.h
+++ b/arch/s390/include/asm/cmpxchg.h
@@ -29,7 +29,7 @@ static inline unsigned long __xchg(unsigned long x, void *ptr, int size)
" cs %0,0,%4\n"
" ... |
bf3db85311292eeacc9a9a8f38a0a4065a43a2fc | Analyze and fix the following issue in the Linux kernel code: s390/cmpxchg: fix 1 and 2 byte memory accesses | Problem Details:
When accessing a 1 or 2 byte memory operand we cannot use the
passed address since the compare and swap instruction only works
for 4 byte aligned memory operands.
Hence we calculate an aligned address so that compare and swap works
correctly. However we don't pass the calculated address to the inline
a... | ```diff
diff --git a/arch/s390/include/asm/cmpxchg.h b/arch/s390/include/asm/cmpxchg.h
index 13c8b2eb6983..26f2cb1aa9ff 100644
--- a/arch/s390/include/asm/cmpxchg.h
+++ b/arch/s390/include/asm/cmpxchg.h
@@ -113,9 +113,9 @@ static inline unsigned long __cmpxchg(void *ptr, unsigned long old,
" nr %1,%5\n"
" jnz 0... |
6b894a409e8c0fcbd0ea30f5b013e33b9c4b28a1 | Analyze and fix the following issue in the Linux kernel code: s390/cmpxchg: fix compile warnings specific to s390 | Problem Details:
The cmpxchg macros and functions are a bit different than on other
architectures. In particular the macros do not store the return
value of a __cmpxchg function call in a variable before returning the
value.
This causes compile warnings that only occur on s390 like this one:
net/ipv4/af_inet.c: In fu... | ```diff
diff --git a/arch/s390/include/asm/cmpxchg.h b/arch/s390/include/asm/cmpxchg.h
index ebd31481f1d2..13c8b2eb6983 100644
--- a/arch/s390/include/asm/cmpxchg.h
+++ b/arch/s390/include/asm/cmpxchg.h
@@ -160,9 +160,14 @@ static inline unsigned long __cmpxchg(void *ptr, unsigned long old,
return old;
}
-#define ... |
061da3dfb291570e780169918933ba51c2b7d554 | Analyze and fix the following issue in the Linux kernel code: s390/kernel: Fix smp_call_ipl_cpu() for offline CPUs | Problem Details:
If the IPL CPU is offline, currently the pcpu_delegate() function
used by smp_call_ipl_cpu() does not work because pcpu_delegate()
modifies the lowcore of the target CPU. In case of an offline
IPL CPU currently the prefix register is zero but pcpu->lowcore
still points to the old prefix page. Therefore... | ```diff
diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c
index 9948bd09ee57..5c7bf24849b2 100644
--- a/arch/s390/kernel/smp.c
+++ b/arch/s390/kernel/smp.c
@@ -297,26 +297,27 @@ static void pcpu_start_fn(struct pcpu *pcpu, void (*func)(void *), void *data)
static void pcpu_delegate(struct pcpu *pcpu, void (... |
73bf463efaba6a1efe69349c6d7275d03468adf4 | Analyze and fix the following issue in the Linux kernel code: s390/kernel: Introduce memcpy_absolute() function | Problem Details:
This patch introduces the new function memcpy_absolute() that allows to
copy memory using absolute addressing. This means that the prefix swap
does not apply when this function is used.
With this patch also all s390 kernel code that accesses absolute zero
now uses the new memcpy_absolute() function. T... | ```diff
diff --git a/arch/s390/include/asm/uaccess.h b/arch/s390/include/asm/uaccess.h
index 8f2cada4f7c9..8e83da66df0d 100644
--- a/arch/s390/include/asm/uaccess.h
+++ b/arch/s390/include/asm/uaccess.h
@@ -377,7 +377,7 @@ clear_user(void __user *to, unsigned long n)
}
extern int memcpy_real(void *, void *, size_t)... |
4b98b32aefb2c143a40cdaa254eb905f1bb06b5d | Analyze and fix the following issue in the Linux kernel code: watchdog: iTCO_wdt.c: fix printk format warnings | Problem Details:
Fix printk format warnings:
drivers/watchdog/iTCO_wdt.c:577:3: warning: format '%04llx' expects type 'long long unsigned int', but argument 2 has type 'resource_size_t'
drivers/watchdog/iTCO_wdt.c:594:3: warning: format '%04llx' expects type 'long long unsigned int', but argument 2 has type 'resource_... | ```diff
diff --git a/drivers/watchdog/iTCO_wdt.c b/drivers/watchdog/iTCO_wdt.c
index 741528b032e2..bc47e9012f37 100644
--- a/drivers/watchdog/iTCO_wdt.c
+++ b/drivers/watchdog/iTCO_wdt.c
@@ -575,7 +575,7 @@ static int __devinit iTCO_wdt_probe(struct platform_device *dev)
if (!request_region(iTCO_wdt_private.smi_res->... |
54e2dc9341aca23d5241699e3b74c8dce609fa2d | Analyze and fix the following issue in the Linux kernel code: watchdog: sch56xx-common: Add proper ref-counting of watchdog data | Problem Details:
This fixes referencing free-ed memory in the corner case where /dev/watchdog
is open when the platform driver gets unbound from the platform device.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be> | ```diff
diff --git a/drivers/hwmon/sch56xx-common.c b/drivers/hwmon/sch56xx-common.c
index 35846cbf1c9c..839087caa360 100644
--- a/drivers/hwmon/sch56xx-common.c
+++ b/drivers/hwmon/sch56xx-common.c
@@ -67,6 +67,7 @@ MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default="
struct sch56xx_watchdog... |
e907df32725204d6d2cb79b872529911c8eadcdf | Analyze and fix the following issue in the Linux kernel code: watchdog: Add support for dynamically allocated watchdog_device structs | Problem Details:
If a driver's watchdog_device struct is part of a dynamically allocated
struct (which it often will be), merely locking the module is not enough,
even with a drivers module locked, the driver can be unbound from the device,
examples:
1) The root user can unbind it through sysfd
2) The i2c bus master dr... | ```diff
diff --git a/Documentation/watchdog/watchdog-kernel-api.txt b/Documentation/watchdog/watchdog-kernel-api.txt
index 08d34e11bc54..086638f6c82d 100644
--- a/Documentation/watchdog/watchdog-kernel-api.txt
+++ b/Documentation/watchdog/watchdog-kernel-api.txt
@@ -1,6 +1,6 @@
The Linux WatchDog Timer Driver Core ker... |
f4e9c82f64b524314a390b13d3ba7d483f09258f | Analyze and fix the following issue in the Linux kernel code: watchdog: Add Locking support | Problem Details:
This patch fixes some potential multithreading issues, despite only
allowing one process to open the /dev/watchdog device, we can still get
called multiple times at the same time, since a program could be using thread,
or could share the fd after a fork.
This causes 2 potential problems:
1) watchdog_s... | ```diff
diff --git a/Documentation/watchdog/watchdog-kernel-api.txt b/Documentation/watchdog/watchdog-kernel-api.txt
index ce1fa22aa70b..08d34e11bc54 100644
--- a/Documentation/watchdog/watchdog-kernel-api.txt
+++ b/Documentation/watchdog/watchdog-kernel-api.txt
@@ -50,6 +50,7 @@ struct watchdog_device {
unsigned int... |
45f5fed30a6460ec58f159ff297a2974153a97de | Analyze and fix the following issue in the Linux kernel code: watchdog: Add multiple device support | Problem Details:
We keep the old /dev/watchdog interface file for the first watchdog via
miscdev. This is basically a cut and paste of the relevant interface code
from the rtc driver layer tweaked for watchdog.
Revised to fix problems noted by Hans de Goede
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by... | ```diff
diff --git a/Documentation/watchdog/watchdog-kernel-api.txt b/Documentation/watchdog/watchdog-kernel-api.txt
index 25fe4304f2fc..3c85fc7dc1f1 100644
--- a/Documentation/watchdog/watchdog-kernel-api.txt
+++ b/Documentation/watchdog/watchdog-kernel-api.txt
@@ -1,6 +1,6 @@
The Linux WatchDog Timer Driver Core ker... |
67b3f1299ab73259aed5871488188a9c59025a54 | Analyze and fix the following issue in the Linux kernel code: ath6kl: separate ht cap for each band | Problem Details:
In virtual interface structure, for each band separate ht cap
is needed. so that one can disable or enable ht capability band
wise.
This will fix the following issue:
1) Disable 11n from supplicant and start a P2P GO.
2) In beacon frames no HT-CAP IE is seen which is expected.
3) Now remove the P2P GO... | ```diff
diff --git a/drivers/net/wireless/ath/ath6kl/cfg80211.c b/drivers/net/wireless/ath/ath6kl/cfg80211.c
index 6a934e16ae83..6f20998beceb 100644
--- a/drivers/net/wireless/ath/ath6kl/cfg80211.c
+++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c
@@ -2540,7 +2540,7 @@ void ath6kl_check_wow_status(struct ath6kl *ar)
st... |
962830df366b66e71849040770ae6ba55a8b4aec | Analyze and fix the following issue in the Linux kernel code: brlocks/lglocks: API cleanups | Problem Details:
lglocks and brlocks are currently generated with some complicated macros
in lglock.h. But there's no reason to not just use common utility
functions and put all the data into a common data structure.
In preparation, this patch changes the API to look more like normal
function calls with pointers, not... | ```diff
diff --git a/fs/dcache.c b/fs/dcache.c
index 4435d8b32904..40469044088d 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -2575,7 +2575,7 @@ static int prepend_path(const struct path *path,
bool slash = false;
int error = 0;
- br_read_lock(vfsmount_lock);
+ br_read_lock(&vfsmount_lock);
while (dentry != roo... |
eea62f831b8030b0eeea8314eed73b6132d1de26 | Analyze and fix the following issue in the Linux kernel code: brlocks/lglocks: turn into functions | Problem Details:
lglocks and brlocks are currently generated with some complicated macros
in lglock.h. But there's no reason to not just use common utility
functions and put all the data into a common data structure.
Since there are at least two users it makes sense to share this code in a
library. This is also easi... | ```diff
diff --git a/fs/file_table.c b/fs/file_table.c
index 70f2a0fd6aec..f5c67c59ec10 100644
--- a/fs/file_table.c
+++ b/fs/file_table.c
@@ -34,7 +34,6 @@ struct files_stat_struct files_stat = {
.max_files = NR_FILE
};
-DECLARE_LGLOCK(files_lglock);
DEFINE_LGLOCK(files_lglock);
/* SLAB cache for file structu... |
185553b22436fe754f4ae8ec11344e822bb83717 | Analyze and fix the following issue in the Linux kernel code: fs: fix inode.c kernel-doc warnings | Problem Details:
Fix kernel-doc warnings in fs/inode.c:
Warning(fs/inode.c:1493): No description found for parameter 'path'
Warning(fs/inode.c:1493): Excess function parameter 'mnt' description in 'touch_atime'
Warning(fs/inode.c:1493): Excess function parameter 'dentry' description in 'touch_atime'
Signed-off-by: Ra... | ```diff
diff --git a/fs/inode.c b/fs/inode.c
index 6bc8761cc333..183ddd6cda71 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -1489,8 +1489,7 @@ static int relatime_need_update(struct vfsmount *mnt, struct inode *inode,
/**
* touch_atime - update the access time
- * @mnt: mount the inode is accessed on
- * @dentry: de... |
b0b0382bb4904965a9e9fca77ad87514dfda0d1c | Analyze and fix the following issue in the Linux kernel code: ->encode_fh() API change | Problem Details:
pass inode + parent's inode or NULL instead of dentry + bool saying
whether we want the parent or not.
NOTE: that needs ceph fix folded in.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> | ```diff
diff --git a/fs/btrfs/export.c b/fs/btrfs/export.c
index e887ee62b6d4..614f34a899c2 100644
--- a/fs/btrfs/export.c
+++ b/fs/btrfs/export.c
@@ -13,15 +13,14 @@
parent_root_objectid) / 4)
#define BTRFS_FID_SIZE_CONNECTABLE_ROOT (sizeof(struct btrfs_fid) / 4)
-static int btrfs_encode_fh(struct dentry... |
2033e9bf06f07e049bbc77e9452856df846714cc | Analyze and fix the following issue in the Linux kernel code: net: add MODULE_ALIAS_NET_PF_PROTO_NAME | Problem Details:
The MODULE_ALAIS_NET_PF macro set is missing a variant that allows for the
appending of an arbitrary string to the net-pf-<x>-proto-<y> base. while
MODULE_ALIAS_NET_PF_PROTO_NAME_TYPE allows an appending of a numerical type, we
need to be able to append a generic string to support generic netlink fami... | ```diff
diff --git a/include/linux/net.h b/include/linux/net.h
index 2d7510f38934..e9ac2df079ba 100644
--- a/include/linux/net.h
+++ b/include/linux/net.h
@@ -313,5 +313,8 @@ extern int kernel_sock_shutdown(struct socket *sock,
MODULE_ALIAS("net-pf-" __stringify(pf) "-proto-" __stringify(proto) \
"-type-" __s... |
a44b45f236dd1c1a8caccf9a078adf2941a20267 | Analyze and fix the following issue in the Linux kernel code: perf annotate browser: The idx_asm field should be used in asm only view | Problem Details:
When hide_src_view is true we can't use browser_disasm_line->idx, that
takes into account also non asm lines, we must use browser_disasm_line->idx_asm
instead, otherwise we may end up with an index after the number of
entries, oops, fix it.
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <... | ```diff
diff --git a/tools/perf/ui/browsers/annotate.c b/tools/perf/ui/browsers/annotate.c
index 6e0ef79be169..aaf36ce0b6fe 100644
--- a/tools/perf/ui/browsers/annotate.c
+++ b/tools/perf/ui/browsers/annotate.c
@@ -300,10 +300,14 @@ static void annotate_browser__set_rb_top(struct annotate_browser *browser,
{
struct ... |
ecb41a77411358d385e3fde5b4e98a5f3d9cfdd5 | Analyze and fix the following issue in the Linux kernel code: drivers/rtc/rtc-s3c.c: fix compiler warning | Problem Details:
rtc-s3c.c:673:32: warning: `s3c_rtc_drv_data_array' defined but not used [-Wunused-variable]
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | ```diff
diff --git a/drivers/rtc/rtc-s3c.c b/drivers/rtc/rtc-s3c.c
index 3f3a29752369..7e6af0b22f17 100644
--- a/drivers/rtc/rtc-s3c.c
+++ b/drivers/rtc/rtc-s3c.c
@@ -670,6 +670,7 @@ static int s3c_rtc_resume(struct platform_device *pdev)
#define s3c_rtc_resume NULL
#endif
+#ifdef CONFIG_OF
static struct s3c_rtc_... |
798115958967c8223f3d17e829a891564e8ea4cb | Analyze and fix the following issue in the Linux kernel code: rtc: rename CONFIG_RTC_MXC to CONFIG_RTC_DRV_MXC | Problem Details:
In order to keep consistency with other rtc drivers,rename CONFIG_RTC_MXC
to CONFIG_RTC_DRV_MXC.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Wolfram Sang <w.sang@pengutronix.de>
Cc: Alessandro Zummo <a.zummo@towertech.it>
[akpm@linux-foundation.org: fix missed arch/arm/configs... | ```diff
diff --git a/arch/arm/configs/imx_v4_v5_defconfig b/arch/arm/configs/imx_v4_v5_defconfig
index ebda45bd5763..e05a2f1665a7 100644
--- a/arch/arm/configs/imx_v4_v5_defconfig
+++ b/arch/arm/configs/imx_v4_v5_defconfig
@@ -173,7 +173,7 @@ CONFIG_LEDS_TRIGGER_DEFAULT_ON=y
CONFIG_RTC_CLASS=y
CONFIG_RTC_DRV_PCF8563=... |
0f20b767e20a800030f51712b699a5c557f2514b | Analyze and fix the following issue in the Linux kernel code: drivers/rtc/rtc-pcf8563.c: add RTC_VL_READ/RTC_VL_CLR ioctl feature | Problem Details:
Changes are based on arch/cris/arch-v10/drivers/pcf8563.c
[akpm@linux-foundation.org: fix sparse warning]
Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Mikael Starvik <starvik@axis.com>
Acked-by: Jesper Nilsson <jesper.nilsson@ax... | ```diff
diff --git a/drivers/rtc/rtc-pcf8563.c b/drivers/rtc/rtc-pcf8563.c
index bc0677de1996..97a3284bb7c6 100644
--- a/drivers/rtc/rtc-pcf8563.c
+++ b/drivers/rtc/rtc-pcf8563.c
@@ -64,6 +64,7 @@ struct pcf8563 {
* 1970...2069.
*/
int c_polarity; /* 0: MO_C=1 means 19xx, otherwise MO_C=1 means 20xx */
+ int vo... |
5536805292e64393f57054de66578f17eb1ea994 | Analyze and fix the following issue in the Linux kernel code: radix-tree: fix preload vector size | Problem Details:
We are not preallocating a sufficient number of nodes.
Signed-off-by: Nick Piggin <npiggin@kernel.dk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | ```diff
diff --git a/lib/radix-tree.c b/lib/radix-tree.c
index 86516f5588e3..d7c878cc006c 100644
--- a/lib/radix-tree.c
+++ b/lib/radix-tree.c
@@ -72,12 +72,25 @@ static unsigned long height_to_maxindex[RADIX_TREE_MAX_PATH + 1] __read_mostly;
*/
static struct kmem_cache *radix_tree_node_cachep;
+/*
+ * The radix t... |
fd0a37355c4d39affa39d5cd75168fb94b292318 | Analyze and fix the following issue in the Linux kernel code: spinlock_debug: print kallsyms name for lock | Problem Details:
When a spinlock warning is printed we usually get
BUG: spinlock bad magic on CPU#0, modprobe/111
lock: 0xdff09f38, .magic: 00000000, .owner: /0, .owner_cpu: 0
but it's nicer to print the symbol for the lock if we have it so that we
can avoid 'grep dff09f38 /proc/kallsyms' to find out which lock it... | ```diff
diff --git a/lib/spinlock_debug.c b/lib/spinlock_debug.c
index 525d160d44f0..d0ec4f3d1593 100644
--- a/lib/spinlock_debug.c
+++ b/lib/spinlock_debug.c
@@ -58,7 +58,7 @@ static void spin_dump(raw_spinlock_t *lock, const char *msg)
printk(KERN_EMERG "BUG: spinlock %s on CPU#%d, %s/%d\n",
msg, raw_smp_process... |
4796dd200db943e36f876e7029552212e5bbdf33 | Analyze and fix the following issue in the Linux kernel code: vsprintf: fix %ps on non symbols when using kallsyms | Problem Details:
Using %ps in a printk format will sometimes fail silently and print the
empty string if the address passed in does not match a symbol that
kallsyms knows about. But using %pS will fall back to printing the full
address if kallsyms can't find the symbol. Make %ps act the same as %pS
by falling back to... | ```diff
diff --git a/include/linux/kallsyms.h b/include/linux/kallsyms.h
index 387571959dd9..6883e197acb9 100644
--- a/include/linux/kallsyms.h
+++ b/include/linux/kallsyms.h
@@ -36,6 +36,7 @@ const char *kallsyms_lookup(unsigned long addr,
/* Look up a kernel symbol and return it in a text buffer. */
extern int sp... |
05a6c8a9226599f921bd0b6e439dbc04df96a6fc | Analyze and fix the following issue in the Linux kernel code: lib/bitmap.c: fix documentation for scnprintf() functions | Problem Details:
The code comments for bscnl_emit() and bitmap_scnlistprintf() are
describing snprintf() return semantics, but these functions use
scnprintf() return semantics. Fix that, and document the
bitmap_scnprintf() return value as well.
Cc: Ryota Ozaki <ozaki.ryota@gmail.com>
Signed-off-by: Andrew Morton <akp... | ```diff
diff --git a/lib/bitmap.c b/lib/bitmap.c
index b5a8b6ad2454..06fdfa1aeba7 100644
--- a/lib/bitmap.c
+++ b/lib/bitmap.c
@@ -369,7 +369,8 @@ EXPORT_SYMBOL(bitmap_find_next_zero_area);
* @nmaskbits: size of bitmap, in bits
*
* Exactly @nmaskbits bits are displayed. Hex digits are grouped into
- * comma-sepa... |
17a801f4bfeb8d55df1b05fa7adb16ada504e765 | Analyze and fix the following issue in the Linux kernel code: list_debug: WARN for adding something already in the list | Problem Details:
We were bitten by this at one point and added an additional sanity test
for DEBUG_LIST. You can't validly add a list_head to a list where either
prev or next is the same as the thing you're adding.
Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
Cc: Andi Kleen <andi@firstfloor.org>
Signed-off-by: ... | ```diff
diff --git a/lib/list_debug.c b/lib/list_debug.c
index 3810b481f940..23a5e031cd8b 100644
--- a/lib/list_debug.c
+++ b/lib/list_debug.c
@@ -31,6 +31,9 @@ void __list_add(struct list_head *new,
"list_add corruption. prev->next should be "
"next (%p), but was %p. (prev=%p).\n",
next, prev->next, prev);
+ ... |
e7e11d8ba807d451857b5c68abe249c7fc2b980f | Analyze and fix the following issue in the Linux kernel code: drivers/leds/leds-pca955x.c: fix race condition while setting brightness on several LEDs | Problem Details:
When issuing the following command:
for I in 0 1 2 3 4 5 6 7; do
echo 0 > /sys/class/leds/pca955x\:${I}/brightness;
done
It is possible that all the pca955x_read_ls calls are done sequentially
before any pca955x_write_ls call is done. This updates the LS only to
the last LED update in its se... | ```diff
diff --git a/drivers/leds/leds-pca955x.c b/drivers/leds/leds-pca955x.c
index dcc3bc3d38db..5f462dbf0dbb 100644
--- a/drivers/leds/leds-pca955x.c
+++ b/drivers/leds/leds-pca955x.c
@@ -101,11 +101,16 @@ static const struct i2c_device_id pca955x_id[] = {
};
MODULE_DEVICE_TABLE(i2c, pca955x_id);
-struct pca955x... |
49dca5aebfdeadd4bf27b6cb4c60392147dc35a4 | Analyze and fix the following issue in the Linux kernel code: leds: heartbeat: stop on shutdown | Problem Details:
A halted kernel should not show a heartbeat.
[akpm@linux-foundation.org: checkpatch fixes]
Signed-off-by: Alexander Holler <holler@ahsoftware.de>
Cc: Shuah Khan <shuahkhan@gmail.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: Bryan Wu <bryan.wu@canonical.com>
Signed-off-by: Andrew Morton <akpm@linux-f... | ```diff
diff --git a/drivers/leds/ledtrig-heartbeat.c b/drivers/leds/ledtrig-heartbeat.c
index 1aacf4c6c3e4..41dc76db4311 100644
--- a/drivers/leds/ledtrig-heartbeat.c
+++ b/drivers/leds/ledtrig-heartbeat.c
@@ -18,6 +18,7 @@
#include <linux/timer.h>
#include <linux/sched.h>
#include <linux/leds.h>
+#include <linux/r... |
1daef6d27b558d0bde72302ba7062b746887a643 | Analyze and fix the following issue in the Linux kernel code: leds: Use kcalloc instead of kzalloc to allocate array | Problem Details:
The advantage of kcalloc is that will prevent integer overflows which
could result from the multiplication of number of elements and size and it
is also a bit nicer to read.
The semantic patch that makes this change is available
in https://lkml.org/lkml/2011/11/25/107
Signed-off-by: Thomas Meyer <tho... | ```diff
diff --git a/drivers/leds/leds-mc13783.c b/drivers/leds/leds-mc13783.c
index 8bc491541550..4cc6a2e3df34 100644
--- a/drivers/leds/leds-mc13783.c
+++ b/drivers/leds/leds-mc13783.c
@@ -280,7 +280,7 @@ static int __devinit mc13783_led_probe(struct platform_device *pdev)
return -EINVAL;
}
- led = kzalloc(siz... |
872b86be0a285b11b03614456b67fdaf78e86f3d | Analyze and fix the following issue in the Linux kernel code: leds: simple_strtoul() cleanup | Problem Details:
led-class.c and ledtrig-timer.c still use simple_strtoul(). Change them
to use kstrtoul() instead of obsolete simple_strtoul().
Also fix the existing int ret declaration to be ssize_t to match the
return type for _store functions in ledtrig-timer.c.
Signed-off-by: Shuah Khan <shuahkhan@gmail.com>
Cc... | ```diff
diff --git a/drivers/leds/led-class.c b/drivers/leds/led-class.c
index 5bff8439dc68..8ee92c81aec2 100644
--- a/drivers/leds/led-class.c
+++ b/drivers/leds/led-class.c
@@ -44,23 +44,18 @@ static ssize_t led_brightness_store(struct device *dev,
struct device_attribute *attr, const char *buf, size_t size)
{
... |
5bc9ad774c063f6b41965e7314f2c26aa5e465a0 | Analyze and fix the following issue in the Linux kernel code: drivers/leds/leds-lp5521.c: fix lp5521_read() error handling | Problem Details:
Gcc 4.6.2 complains that:
drivers/leds/leds-lp5521.c: In function `lp5521_load_program':
drivers/leds/leds-lp5521.c:214:21: warning: `mode' may be used uninitialized in this function [-Wuninitialized]
drivers/leds/leds-lp5521.c: In function `lp5521_probe':
drivers/leds/leds-lp5521.c:788:5: war... | ```diff
diff --git a/drivers/leds/leds-lp5521.c b/drivers/leds/leds-lp5521.c
index 410a723b8691..23815624f35e 100644
--- a/drivers/leds/leds-lp5521.c
+++ b/drivers/leds/leds-lp5521.c
@@ -193,9 +193,14 @@ static int lp5521_load_program(struct lp5521_engine *eng, const u8 *pattern)
/* move current engine to direct mo... |
6677110b748aa1fe92d039b09d34ac7f35391fb0 | Analyze and fix the following issue in the Linux kernel code: drivers/video/backlight/l4f00242t03.c: use pr_fmt | Problem Details:
This driver uses pr_debug(), so provide it with the appropriate prefixing.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Cc: Alberto Panizzo <alberto@amarulasolutions.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org... | ```diff
diff --git a/drivers/video/backlight/l4f00242t03.c b/drivers/video/backlight/l4f00242t03.c
index 6022b67285ec..83decca4a692 100644
--- a/drivers/video/backlight/l4f00242t03.c
+++ b/drivers/video/backlight/l4f00242t03.c
@@ -11,6 +11,8 @@
* published by the Free Software Foundation.
*/
+#define pr_fmt(fmt) ... |
c3539731c22bea311c49c4df97887800c91cca83 | Analyze and fix the following issue in the Linux kernel code: backlight: progear: use pr_err() instead of printk() | Problem Details:
Use pr_err() instead of printk() to allow dynamic debugging. The pr_fmt
prefix for pr_ macros is used. Also fix checkpatch warnings as below:
WARNING: printk() should include KERN_ facility level
[akpm@linux-foundation.org: use KBUILD_MODNAME, per Joe]
Signed-off-by: Jingoo Han <jg1.han@samsung.com... | ```diff
diff --git a/drivers/video/backlight/progear_bl.c b/drivers/video/backlight/progear_bl.c
index 6af183d6465e..69b35f02929e 100644
--- a/drivers/video/backlight/progear_bl.c
+++ b/drivers/video/backlight/progear_bl.c
@@ -15,6 +15,8 @@
*
*/
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
#include <linux/modu... |
95e93132e4df461b6344256ae7f16d3c28a4c0f3 | Analyze and fix the following issue in the Linux kernel code: backlight: omap1: use pr_info() instead of printk() | Problem Details:
Use pr_info() instead of printk() to allow dynamic debugging. The pr_fmt
prefix for pr_ macros is used. Also fix checkpatch warning as below:
WARNING: Prefer pr_info(... to printk(KERN_INFO, ...
[akpm@linux-foundation.org: use KBUILD_MODNAME, per Joe]
Signed-off-by: Jingoo Han <jg1.han@samsung.com>... | ```diff
diff --git a/drivers/video/backlight/omap1_bl.c b/drivers/video/backlight/omap1_bl.c
index 0175bfb08a1c..bfdc5fbeaa11 100644
--- a/drivers/video/backlight/omap1_bl.c
+++ b/drivers/video/backlight/omap1_bl.c
@@ -18,6 +18,8 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
+... |
20c225cbb679e12edac3c335357245112152a158 | Analyze and fix the following issue in the Linux kernel code: backlight: jornada720: use pr_err()/pr_info() instead of printk() | Problem Details:
Use pr_err()/pr_info() instead of printk() to allow dynamic debugging.
The pr_fmt prefix for pr_ macros is used. Also fix checkpatch warnings as
below:
WARNING: Prefer pr_err(... to printk(KERN_ERR, ...
WARNING: Prefer pr_info(... to printk(KERN_INFO, ...
[akpm@linux-foundation.org: use KBUILD_MODNA... | ```diff
diff --git a/drivers/video/backlight/jornada720_bl.c b/drivers/video/backlight/jornada720_bl.c
index 2f8af5d786ab..16f593b64427 100644
--- a/drivers/video/backlight/jornada720_bl.c
+++ b/drivers/video/backlight/jornada720_bl.c
@@ -9,6 +9,8 @@
*
*/
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
#include <... |
8c7610f3b47c5027719c12c9af4dfdfc294afa6f | Analyze and fix the following issue in the Linux kernel code: backlight: generic_bl: use pr_info() instead of printk() | Problem Details:
Use pr_info() instead of printk() to allow dynamic debugging. The pr_fmt
prefix for pr_ macros is used. Also fix checkpatch warnings as below:
WARNING: printk() should include KERN_ facility level
[akpm@linux-foundation.org: use KBUILD_MODNAME, per Joe]
Signed-off-by: Jingoo Han <jg1.han@samsung.co... | ```diff
diff --git a/drivers/video/backlight/generic_bl.c b/drivers/video/backlight/generic_bl.c
index 9ce6170c1860..8c660fcd250d 100644
--- a/drivers/video/backlight/generic_bl.c
+++ b/drivers/video/backlight/generic_bl.c
@@ -9,6 +9,8 @@
*
*/
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
#include <linux/module... |
31e6432b3210e89a520fe17b9b29877780355b69 | Analyze and fix the following issue in the Linux kernel code: backlight: cr_bllcd: use pr_err()/pr_info() instead of printk() | Problem Details:
Use pr_err()/pr_info() instead of printk() to allow dynamic debugging.
The pr_fmt prefix for pr_ macros is used. Also fix checkpatch warnings as
below:
WARNING: printk() should include KERN_ facility level
WARNING: Prefer pr_err(... to printk(KERN_ERR, ...
[akpm@linux-foundation.org: use KBUILD_MODN... | ```diff
diff --git a/drivers/video/backlight/cr_bllcd.c b/drivers/video/backlight/cr_bllcd.c
index 22489eb5f3e0..37bae801e23b 100644
--- a/drivers/video/backlight/cr_bllcd.c
+++ b/drivers/video/backlight/cr_bllcd.c
@@ -27,6 +27,8 @@
* Alan Hourihane <alanh-at-tungstengraphics-dot-com>
*/
+#define pr_fmt(fmt) KB... |
7b12c1b9ee6f66c12f9dc16f76474caa74dbc01f | Analyze and fix the following issue in the Linux kernel code: backlight: apple_bl: use pr_debug()/pr_err() instead of printk() | Problem Details:
Use pr_debug()/pr_err() instead of printk() to allow dynamic debugging.
The pr_fmt prefix for pr_ macros is used. Also fix checkpatch warnings as
below:
WARNING: Prefer pr_debug(... to printk(KERN_DEBUG, ...
WARNING: Prefer pr_err(... to printk(KERN_ERR, ...
[akpm@linux-foundation.org: use KBUILD_MO... | ```diff
diff --git a/drivers/video/backlight/apple_bl.c b/drivers/video/backlight/apple_bl.c
index ef5ca0d6cd20..9dc73ac3709a 100644
--- a/drivers/video/backlight/apple_bl.c
+++ b/drivers/video/backlight/apple_bl.c
@@ -16,6 +16,8 @@
* get at the firmware code in order to figure out what it's actually doing.
*/
+... |
35f961623cee5212d4ee0baa8c34b1766913b36b | Analyze and fix the following issue in the Linux kernel code: backlight: use pr_warn() and pr_debug() instead of printk() | Problem Details:
Use pr_warn() and pr_debug() instead of printk to allow dynamic debugging.
The pr_fmt prefix for pr_ macros is used. Also fix checkpatch warnings
as below:
WARNING: Prefer pr_warn(... to printk(KERN_WARNING, ...
[akpm@linux-foundation.org: use KBUILD_MODNAME, per Joe]
Signed-off-by: Jingoo Han <jg1.... | ```diff
diff --git a/drivers/video/backlight/backlight.c b/drivers/video/backlight/backlight.c
index bf5b1ece7160..297db2fa91f5 100644
--- a/drivers/video/backlight/backlight.c
+++ b/drivers/video/backlight/backlight.c
@@ -5,6 +5,8 @@
*
*/
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
#include <linux/module.h>
... |
7f26c970b40b3e35ef699729b22d6915ca007135 | Analyze and fix the following issue in the Linux kernel code: backlight: add LM3533 backlight driver | Problem Details:
Add sub-driver for the backlights on National Semiconductor / TI LM3533
lighting power chips.
The chip provides 256 brightness levels and ambient-light-sensor and pwm
input control.
[akpm@linux-foundation.org: fix warning]
[akpm@linux-foundation.org: fix the type of `mode']
Signed-off-by: Johan Hovol... | ```diff
diff --git a/Documentation/ABI/testing/sysfs-class-backlight-driver-lm3533 b/Documentation/ABI/testing/sysfs-class-backlight-driver-lm3533
new file mode 100644
index 000000000000..77cf7ac949af
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-class-backlight-driver-lm3533
@@ -0,0 +1,48 @@
+What: /sys/class/b... |
1615d210dbc9c67c38b66bcff53233452dbaae22 | Analyze and fix the following issue in the Linux kernel code: drivers/video/backlight/apple_bl.c: include header for exported symbol prototypes | Problem Details:
Include the header to pickup the exported symbol prototype.
Quiets the sparse warning:
warning: symbol 'apple_bl_register' was not declared. Should it be static?
warning: symbol 'apple_bl_unregister' was not declared. Should it be static?
[akpm@linux-foundation.org: fix resulting build error]
Si... | ```diff
diff --git a/drivers/video/backlight/apple_bl.c b/drivers/video/backlight/apple_bl.c
index a523b255e124..ef5ca0d6cd20 100644
--- a/drivers/video/backlight/apple_bl.c
+++ b/drivers/video/backlight/apple_bl.c
@@ -25,6 +25,7 @@
#include <linux/pci.h>
#include <linux/acpi.h>
#include <linux/atomic.h>
+#include <... |
af7c4b0ec257ea9abb9c6749dd5a5ba0b8fae1fd | Analyze and fix the following issue in the Linux kernel code: mm: memcg: print statistics from live counters | Problem Details:
Directly print statistics and event counters instead of going through an
intermediate accumulation stage into a separate array, which used to
require defining statistic items in more than one place.
[akpm@linux-foundation.org: checkpatch fixes]
Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Acked... | ```diff
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 1118e02a40b6..35e008e25422 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -91,6 +91,13 @@ enum mem_cgroup_stat_index {
MEM_CGROUP_STAT_NSTATS,
};
+static const char * const mem_cgroup_stat_names[] = {
+ "cache",
+ "rss",
+ "mapped_file",
+ "swap",... |
78ccf5b5ab834080db25d8128e7dd33594cbf4df | Analyze and fix the following issue in the Linux kernel code: mm: memcg: print statistics directly to seq_file | Problem Details:
Being able to use seq_printf() allows being smarter about statistics
name strings, which are currently listed twice, with the only difference
being a "total_" prefix on the hierarchical version.
Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Acked-by: Michal Hocko <mhocko@suse.cz>
Acked-by: KAMEZ... | ```diff
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index ba9e1b131b4d..4200f5c59579 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -4060,26 +4060,22 @@ struct mcs_total_stat {
s64 stat[NR_MCS_STAT];
};
-static struct {
- char *local_name;
- char *total_name;
-} memcg_stat_strings[NR_MCS_STAT] = {
- {"ca... |
3d58ab5c97fa2d145050242137ac39ca7d3bc2fc | Analyze and fix the following issue in the Linux kernel code: mm/memcg: use vm_swappiness from target memory cgroup | Problem Details:
Use vm_swappiness from memory cgroup which is triggered this memory
reclaim. This is more reasonable and allows to kill one argument.
[akpm@linux-foundation.org: fix build (patch skew)]
Signed-off-by: Konstantin Khlebnikov <khlebnikov@openvz.org>
Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujtis... | ```diff
diff --git a/mm/vmscan.c b/mm/vmscan.c
index c94d17d75d73..0e2131deb2d3 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -1622,12 +1622,11 @@ static unsigned long shrink_list(enum lru_list lru, unsigned long nr_to_scan,
return shrink_inactive_list(nr_to_scan, mz, sc, priority, lru);
}
-static int vmscan_swapp... |
3a7951b4cf8c6be48e20523b724d9188f6c91ba7 | Analyze and fix the following issue in the Linux kernel code: memcg: mark stat field of mem_cgroup struct as __percpu | Problem Details:
It fixes a lot of sparse warnings.
Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Acked-by: Michal Hocko <mhocko@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-founda... | ```diff
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 5c56765c848a..18becde87577 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -304,7 +304,7 @@ struct mem_cgroup {
/*
* percpu counter.
*/
- struct mem_cgroup_stat_cpu *stat;
+ struct mem_cgroup_stat_cpu __percpu *stat;
/*
* used when a cpu is... |
3cb9945179bd04e9282f31a1173ac11b1300c462 | Analyze and fix the following issue in the Linux kernel code: mm: push lru index into shrink_[in]active_list() | Problem Details:
Let's toss lru index through call stack to isolate_lru_pages(), this is
better than its reconstructing from individual bits.
[akpm@linux-foundation.org: fix kerneldoc, per Minchan]
Signed-off-by: Konstantin Khlebnikov <khlebnikov@openvz.org>
Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>... | ```diff
diff --git a/mm/vmscan.c b/mm/vmscan.c
index e234ada18747..987be819fad6 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -1044,27 +1044,22 @@ int __isolate_lru_page(struct page *page, isolate_mode_t mode, int file)
* @nr_scanned: The number of pages that were scanned.
* @sc: The scan_control struct for this r... |
4b91355e9dc9ac1eb3d69e56de093899ff2677ef | Analyze and fix the following issue in the Linux kernel code: memcg: fix/change behavior of shared anon at moving task | Problem Details:
This patch changes memcg's behavior at task_move().
At task_move(), the kernel scans a task's page table and move the changes
for mapped pages from source cgroup to target cgroup. There has been a
bug at handling shared anonymous pages for a long time.
Before patch:
- The spec says 'shared anonymo... | ```diff
diff --git a/Documentation/cgroups/memory.txt b/Documentation/cgroups/memory.txt
index e479007f1a75..6a066a270fc5 100644
--- a/Documentation/cgroups/memory.txt
+++ b/Documentation/cgroups/memory.txt
@@ -184,12 +184,14 @@ behind this approach is that a cgroup that aggressively uses a shared
page will eventually... |
181eb39425f2b9275afcb015eaa547d11f71a02f | Analyze and fix the following issue in the Linux kernel code: mm/memblock: fix memory leak on extending regions | Problem Details:
The overall memblock has been organized into the memory regions and
reserved regions. Initially, the memory regions and reserved regions are
stored in the predetermined arrays of "struct memblock _region". It's
possible for the arrays to be enlarged when we have newly added regions,
but no free space... | ```diff
diff --git a/mm/memblock.c b/mm/memblock.c
index eae06ea3aa50..952123eba433 100644
--- a/mm/memblock.c
+++ b/mm/memblock.c
@@ -37,6 +37,8 @@ struct memblock memblock __initdata_memblock = {
int memblock_debug __initdata_memblock;
static int memblock_can_resize __initdata_memblock;
+static int memblock_memor... |
5bf5f03c271907978489868a4c72aeb42b5127d2 | Analyze and fix the following issue in the Linux kernel code: mm: fix slab->page flags corruption | Problem Details:
Transparent huge pages can change page->flags (PG_compound_lock) without
taking Slab lock. Since THP can not break slab pages we can safely access
compound page without taking compound lock.
Specifically this patch fixes a race between compound_unlock() and slab
functions which perform page-flags upd... | ```diff
diff --git a/include/linux/mm.h b/include/linux/mm.h
index aa20bafa40f6..ce26716238c3 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -321,6 +321,7 @@ static inline int is_vmalloc_or_module_addr(const void *x)
static inline void compound_lock(struct page *page)
{
#ifdef CONFIG_TRANSPARENT_HUGEPAG... |
dbda591d920b4c7692725b13e3f68ecb251e9080 | Analyze and fix the following issue in the Linux kernel code: mm: fix faulty initialization in vmalloc_init() | Problem Details:
The transfer of ->flags causes some of the static mapping virtual
addresses to be prematurely freed (before the mapping is removed) because
VM_LAZY_FREE gets "set" if tmp->flags has VM_IOREMAP set. This might
cause subsequent vmalloc/ioremap calls to fail because it might allocate
one of the freed vir... | ```diff
diff --git a/mm/vmalloc.c b/mm/vmalloc.c
index c28b0b9e5cc0..2aad49981b57 100644
--- a/mm/vmalloc.c
+++ b/mm/vmalloc.c
@@ -1185,9 +1185,10 @@ void __init vmalloc_init(void)
/* Import existing vmlist entries. */
for (tmp = vmlist; tmp; tmp = tmp->next) {
va = kzalloc(sizeof(struct vmap_area), GFP_NOWAIT);... |
26c191788f18129af0eb32a358cdaea0c7479626 | Analyze and fix the following issue in the Linux kernel code: mm: pmd_read_atomic: fix 32bit PAE pmd walk vs pmd_populate SMP race condition | Problem Details:
When holding the mmap_sem for reading, pmd_offset_map_lock should only
run on a pmd_t that has been read atomically from the pmdp pointer,
otherwise we may read only half of it leading to this crash.
PID: 11679 TASK: f06e8000 CPU: 3 COMMAND: "do_race_2_panic"
#0 [f06a9dd8] crash_kexec at c049b5ec... | ```diff
diff --git a/arch/x86/include/asm/pgtable-3level.h b/arch/x86/include/asm/pgtable-3level.h
index effff47a3c82..43876f16caf1 100644
--- a/arch/x86/include/asm/pgtable-3level.h
+++ b/arch/x86/include/asm/pgtable-3level.h
@@ -31,6 +31,56 @@ static inline void native_set_pte(pte_t *ptep, pte_t pte)
ptep->pte_low ... |
c50ac050811d6485616a193eb0f37bfbd191cc89 | Analyze and fix the following issue in the Linux kernel code: hugetlb: fix resv_map leak in error path | Problem Details:
When called for anonymous (non-shared) mappings, hugetlb_reserve_pages()
does a resv_map_alloc(). It depends on code in hugetlbfs's
vm_ops->close() to release that allocation.
However, in the mmap() failure path, we do a plain unmap_region() without
the remove_vma() which actually calls vm_ops->close... | ```diff
diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index 41a647dfb738..285a81e87ec8 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -2157,6 +2157,15 @@ static void hugetlb_vm_op_open(struct vm_area_struct *vma)
kref_get(&reservations->refs);
}
+static void resv_map_put(struct vm_area_struct *vma)
+{
+ struct resv_m... |
e48982734ea0500d1eba4f9d96195acc5406cad6 | Analyze and fix the following issue in the Linux kernel code: mm: consider all swapped back pages in used-once logic | Problem Details:
Commit 645747462435 ("vmscan: detect mapped file pages used only once")
made mapped pages have another round in inactive list because they might
be just short lived and so we could consider them again next time. This
heuristic helps to reduce pressure on the active list with a streaming
IO worklods.
... | ```diff
diff --git a/mm/vmscan.c b/mm/vmscan.c
index 44f04364a304..67a4fd4792de 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -657,7 +657,7 @@ static enum page_references page_check_references(struct page *page,
return PAGEREF_RECLAIM;
if (referenced_ptes) {
- if (PageAnon(page))
+ if (PageSwapBacked(page))
... |
be9cd873e2a706a688e37224d48e135efd8c0d26 | Analyze and fix the following issue in the Linux kernel code: mm/buddy: dump PG_compound_lock page flag | Problem Details:
The array pageflag_names[] does conversion from page flags into their
corresponding names so that a meaningful representation of the
corresponding page flag can be printed. This mechanism is used while
dumping page frames. However, the array missed PG_compound_lock. So
the PG_compound_lock page flag... | ```diff
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 457b4de122f4..72869ea5c513 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -5972,6 +5972,9 @@ static struct trace_print_flags pageflag_names[] = {
#endif
#ifdef CONFIG_MEMORY_FAILURE
{1UL << PG_hwpoison, "hwpoison" },
+#endif
+#ifdef CONFIG_TRANSPA... |
4fb5ef089b288942c6fc3f85c4ecb4016c1aa4c3 | Analyze and fix the following issue in the Linux kernel code: tmpfs: support SEEK_DATA and SEEK_HOLE | Problem Details:
It's quite easy for tmpfs to scan the radix_tree to support llseek's new
SEEK_DATA and SEEK_HOLE options: so add them while the minutiae are still
on my mind (in particular, the !PageUptodate-ness of pages fallocated but
still unwritten).
But I don't know who actually uses SEEK_DATA or SEEK_HOLE, and ... | ```diff
diff --git a/mm/shmem.c b/mm/shmem.c
index 191663a8def3..d576b84d913c 100644
--- a/mm/shmem.c
+++ b/mm/shmem.c
@@ -1674,6 +1674,98 @@ static ssize_t shmem_file_splice_read(struct file *in, loff_t *ppos,
return error;
}
+/*
+ * llseek SEEK_DATA or SEEK_HOLE through the radix_tree.
+ */
+static pgoff_t shmem... |
1aac1400319d30786f32b9290e9cc923937b3d57 | Analyze and fix the following issue in the Linux kernel code: tmpfs: quit when fallocate fills memory | Problem Details:
As it stands, a large fallocate() on tmpfs is liable to fill memory with
pages, freed on failure except when they run into swap, at which point
they become fixed into the file despite the failure. That feels quite
wrong, to be consuming resources precisely when they're in short supply.
Go the other w... | ```diff
diff --git a/mm/shmem.c b/mm/shmem.c
index 793dcd1bac8b..191663a8def3 100644
--- a/mm/shmem.c
+++ b/mm/shmem.c
@@ -84,6 +84,18 @@ struct shmem_xattr {
char value[0];
};
+/*
+ * shmem_fallocate and shmem_writepage communicate via inode->i_private
+ * (with i_mutex making sure that it has only one user at a ... |
5ceb9ce6fe9462a298bb2cd5c9f1ca6cb80a0199 | Analyze and fix the following issue in the Linux kernel code: mm: compaction: handle incorrect MIGRATE_UNMOVABLE type pageblocks | Problem Details:
When MIGRATE_UNMOVABLE pages are freed from MIGRATE_UNMOVABLE type
pageblock (and some MIGRATE_MOVABLE pages are left in it) waiting until an
allocation takes ownership of the block may take too long. The type of
the pageblock remains unchanged so the pageblock cannot be used as a
migration target dur... | ```diff
diff --git a/include/linux/compaction.h b/include/linux/compaction.h
index 51a90b7f2d60..e988037abd2a 100644
--- a/include/linux/compaction.h
+++ b/include/linux/compaction.h
@@ -1,6 +1,8 @@
#ifndef _LINUX_COMPACTION_H
#define _LINUX_COMPACTION_H
+#include <linux/node.h>
+
/* Return values for compact_zone... |
238305bb4d418c95977162ba13c11880685fc731 | Analyze and fix the following issue in the Linux kernel code: mm: remove sparsemem allocation details from the bootmem allocator | Problem Details:
alloc_bootmem_section() derives allocation area constraints from the
specified sparsemem section. This is a bit specific for a generic memory
allocator like bootmem, though, so move it over to sparsemem.
As __alloc_bootmem_node_nopanic() already retries failed allocations with
relaxed area constraint... | ```diff
diff --git a/include/linux/bootmem.h b/include/linux/bootmem.h
index 1a0cd270bb7a..324fe08ea3b1 100644
--- a/include/linux/bootmem.h
+++ b/include/linux/bootmem.h
@@ -135,9 +135,6 @@ extern void *__alloc_bootmem_low_node(pg_data_t *pgdat,
extern int reserve_bootmem_generic(unsigned long addr, unsigned long siz... |
6dccdcbe2c3ebe152847ac8507e7bded4e3f4546 | Analyze and fix the following issue in the Linux kernel code: mm: bootmem: fix checking the bitmap when finally freeing bootmem | Problem Details:
When bootmem releases an unaligned chunk of memory at the beginning of a
node to the page allocator, it iterates from that unaligned PFN but
checks an aligned word of the page bitmap. The checked bits do not
correspond to the PFNs and, as a result, reserved pages can be freed.
Properly shift the bitm... | ```diff
diff --git a/mm/bootmem.c b/mm/bootmem.c
index 0131170c9d54..67872fca97d9 100644
--- a/mm/bootmem.c
+++ b/mm/bootmem.c
@@ -203,6 +203,7 @@ static unsigned long __init free_all_bootmem_core(bootmem_data_t *bdata)
} else {
unsigned long off = 0;
+ vec >>= start & (BITS_PER_LONG - 1);
while (vec && ... |
955c1cd7401565671b064e499115344ec8067dfd | Analyze and fix the following issue in the Linux kernel code: mm/page_alloc.c: remove pageblock_default_order() | Problem Details:
This has always been broken: one version takes an unsigned int and the
other version takes no arguments. This bug was hidden because one
version of set_pageblock_order() was a macro which doesn't evaluate its
argument.
Simplify it all and remove pageblock_default_order() altogether.
Reported-by: raj... | ```diff
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 8d71ad8ffa48..84f2c599d5d4 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -4300,25 +4300,24 @@ static inline void setup_usemap(struct pglist_data *pgdat,
#ifdef CONFIG_HUGETLB_PAGE_SIZE_VARIABLE
-/* Return a sensible default order for the pagebloc... |
9295b7a07c859a42346221b5839be0ae612333b0 | Analyze and fix the following issue in the Linux kernel code: kbuild: install kernel-page-flags.h | Problem Details:
Programs using /proc/kpageflags need to know about the various flags. The
<linux/kernel-page-flags.h> provides them and the comments in the file
indicate that it is supposed to be used by user-level code. But the file
is not installed.
Install the headers and mark the unstable flags as out-of-bounds... | ```diff
diff --git a/include/linux/Kbuild b/include/linux/Kbuild
index 4cd59b95858f..7185b8f15ced 100644
--- a/include/linux/Kbuild
+++ b/include/linux/Kbuild
@@ -225,6 +225,7 @@ header-y += kd.h
header-y += kdev_t.h
header-y += kernel.h
header-y += kernelcapi.h
+header-y += kernel-page-flags.h
header-y += keyboard... |
02602a18c32d76f0e0f50eefa91b2d53c8a3a751 | Analyze and fix the following issue in the Linux kernel code: bug: completely remove code generated by disabled VM_BUG_ON() | Problem Details:
Even if CONFIG_DEBUG_VM=n gcc genereates code for some VM_BUG_ON()
for example VM_BUG_ON(!PageCompound(page) || !PageHead(page)); in
do_huge_pmd_wp_page() generates 114 bytes of code.
But they mostly disappears when I split this VM_BUG_ON into two:
-VM_BUG_ON(!PageCompound(page) || !PageHead(page)... | ```diff
diff --git a/include/linux/mmdebug.h b/include/linux/mmdebug.h
index c04ecfe03f7f..580bd587d916 100644
--- a/include/linux/mmdebug.h
+++ b/include/linux/mmdebug.h
@@ -4,7 +4,7 @@
#ifdef CONFIG_DEBUG_VM
#define VM_BUG_ON(cond) BUG_ON(cond)
#else
-#define VM_BUG_ON(cond) do { (void)(cond); } while (0)
+#define... |
baf05aa9271bdbc07d3160035a231abc5fbd429a | Analyze and fix the following issue in the Linux kernel code: bug: introduce BUILD_BUG_ON_INVALID() macro | Problem Details:
Sometimes we want to check some expressions correctness at compile time.
"(void)(e);" or "if (e);" can be dangerous if the expression has
side-effects, and gcc sometimes generates a lot of code, even if the
expression has no effect.
This patch introduces macro BUILD_BUG_ON_INVALID() for such checks, i... | ```diff
diff --git a/include/linux/bug.h b/include/linux/bug.h
index 72961c39576a..aaac4bba6f5c 100644
--- a/include/linux/bug.h
+++ b/include/linux/bug.h
@@ -30,6 +30,13 @@ struct pt_regs;
#define BUILD_BUG_ON_ZERO(e) (sizeof(struct { int:-!!(e); }))
#define BUILD_BUG_ON_NULL(e) ((void *)sizeof(struct { int:-!!(e); ... |
bde8bd8a1d5242589ddcaef8e017b48b207c4729 | Analyze and fix the following issue in the Linux kernel code: mm/vmstat.c: remove debug fs entries on failure of file creation and made extfrag_debug_root dentry local | Problem Details:
Remove debug fs files and directory on failure. Since no one is using
"extfrag_debug_root" dentry outside of extfrag_debug_init(), make it
local to the function.
Signed-off-by: Sasikantha babu <sasikanth.v19@gmail.com>
Acked-by: David Rientjes <rientjes@google.com>
Acked-by: Mel Gorman <mel@csn.ul.ie... | ```diff
diff --git a/mm/vmstat.c b/mm/vmstat.c
index 0dad31dc1618..1bbbbd9776ad 100644
--- a/mm/vmstat.c
+++ b/mm/vmstat.c
@@ -1223,7 +1223,6 @@ module_init(setup_vmstat)
#if defined(CONFIG_DEBUG_FS) && defined(CONFIG_COMPACTION)
#include <linux/debugfs.h>
-static struct dentry *extfrag_debug_root;
/*
* Return... |
7edc8b0ac16cbaed7cb4ea4c6b95ce98d2997e84 | Analyze and fix the following issue in the Linux kernel code: mm/fork: fix overflow in vma length when copying mmap on clone | Problem Details:
The vma length in dup_mmap is calculated and stored in a unsigned int,
which is insufficient and hence overflows for very large maps (beyond
16TB). The following program demonstrates this:
#include <stdio.h>
#include <unistd.h>
#include <sys/mman.h>
#define GIG 1024 * 1024 * 1024L
#define EXTENT 1639... | ```diff
diff --git a/kernel/fork.c b/kernel/fork.c
index 5b13eea2e757..017fb23d5983 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -386,7 +386,8 @@ static int dup_mmap(struct mm_struct *mm, struct mm_struct *oldmm)
}
charge = 0;
if (mpnt->vm_flags & VM_ACCOUNT) {
- unsigned int len = (mpnt->vm_end - mpnt-... |
4d67d860531ad5378dedfad7661c540f3365013d | Analyze and fix the following issue in the Linux kernel code: mm: use kcalloc() instead of kzalloc() to allocate array | Problem Details:
The advantage of kcalloc is, that will prevent integer overflows which
could result from the multiplication of number of elements and size and
it is also a bit nicer to read.
The semantic patch that makes this change is available in
https://lkml.org/lkml/2011/11/25/107
Signed-off-by: Thomas Meyer <th... | ```diff
diff --git a/mm/vmalloc.c b/mm/vmalloc.c
index 94dff883b449..c28b0b9e5cc0 100644
--- a/mm/vmalloc.c
+++ b/mm/vmalloc.c
@@ -2375,8 +2375,8 @@ struct vm_struct **pcpu_get_vm_areas(const unsigned long *offsets,
return NULL;
}
- vms = kzalloc(sizeof(vms[0]) * nr_vms, GFP_KERNEL);
- vas = kzalloc(sizeof(vas[0... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.