id stringlengths 40 40 | instruction stringlengths 68 308 | input stringlengths 17 33.4k | output stringlengths 100 30k |
|---|---|---|---|
327c0e968645f2601a43f5ea7c19c7b3a5fa0a34 | Analyze and fix the following issue in the Linux kernel code: vmscan: fix it to take care of nodemask | Problem Details:
try_to_free_pages() is used for the direct reclaim of up to
SWAP_CLUSTER_MAX pages when watermarks are low. The caller to
alloc_pages_nodemask() can specify a nodemask of nodes that are allowed to
be used but this is not passed to try_to_free_pages(). This can lead to
unnecessary reclaim of pages tha... | ```diff
diff --git a/fs/buffer.c b/fs/buffer.c
index 0c14f8d52ee5..c77b848c3d43 100644
--- a/fs/buffer.c
+++ b/fs/buffer.c
@@ -290,7 +290,7 @@ static void free_more_memory(void)
&zone);
if (zone)
try_to_free_pages(node_zonelist(nid, GFP_NOFS), 0,
- GFP_NOFS);
+ GFP_NOFS, NULL);
}
}
diff --g... |
851a039cc547b33b8139fe6d7c2bbfb158e2724e | Analyze and fix the following issue in the Linux kernel code: mm: page_mkwrite change prototype to match fault: fix sysfs | Problem Details:
Fix warnings and return values in sysfs bin_page_mkwrite(), fixing
fs/sysfs/bin.c: In function `bin_page_mkwrite':
fs/sysfs/bin.c:250: warning: passing argument 2 of `bb->vm_ops->page_mkwrite' from incompatible pointer type
fs/sysfs/bin.c: At top level:
fs/sysfs/bin.c:280: warning: initialization from ... | ```diff
diff --git a/fs/sysfs/bin.c b/fs/sysfs/bin.c
index 07703d3ff4a1..93e0c0281d45 100644
--- a/fs/sysfs/bin.c
+++ b/fs/sysfs/bin.c
@@ -234,7 +234,7 @@ static int bin_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
return ret;
}
-static int bin_page_mkwrite(struct vm_area_struct *vma, struct page *page)... |
56a76f8275c379ed73c8a43cfa1dfa2f5e9cfa19 | Analyze and fix the following issue in the Linux kernel code: fs: fix page_mkwrite error cases in core code and btrfs | Problem Details:
page_mkwrite is called with neither the page lock nor the ptl held. This
means a page can be concurrently truncated or invalidated out from
underneath it. Callers are supposed to prevent truncate races themselves,
however previously the only thing they can do in case they hit one is to
raise a SIGBUS... | ```diff
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index ec5423790bbb..17e608c4dc70 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -4307,10 +4307,15 @@ int btrfs_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf)
u64 page_end;
ret = btrfs_check_data_free_space(root, inode, PAGE_CACHE_SI... |
c2ec175c39f62949438354f603f4aa170846aabb | Analyze and fix the following issue in the Linux kernel code: mm: page_mkwrite change prototype to match fault | Problem Details:
Change the page_mkwrite prototype to take a struct vm_fault, and return
VM_FAULT_xxx flags. There should be no functional change.
This makes it possible to return much more detailed error information to
the VM (and also can provide more information eg. virtual_address to the
driver, which might be i... | ```diff
diff --git a/Documentation/filesystems/Locking b/Documentation/filesystems/Locking
index 4e78ce677843..76efe5b71d7d 100644
--- a/Documentation/filesystems/Locking
+++ b/Documentation/filesystems/Locking
@@ -505,7 +505,7 @@ prototypes:
void (*open)(struct vm_area_struct*);
void (*close)(struct vm_area_struct... |
704503d836042d4a4c7685b7036e7de0418fbc0f | Analyze and fix the following issue in the Linux kernel code: mm: fix proc_dointvec_userhz_jiffies "breakage" | Problem Details:
Addresses http://bugzilla.kernel.org/show_bug.cgi?id=9838
On i386, HZ=1000, jiffies_to_clock_t() converts time in a somewhat strange
way from the user's point of view:
# echo 500 >/proc/sys/vm/dirty_writeback_centisecs
# cat /proc/sys/vm/dirty_writeback_centisecs
499
So, we have 5000 jiffies conv... | ```diff
diff --git a/include/linux/writeback.h b/include/linux/writeback.h
index 7300ecdc480c..93445477f86a 100644
--- a/include/linux/writeback.h
+++ b/include/linux/writeback.h
@@ -109,8 +109,8 @@ extern int dirty_background_ratio;
extern unsigned long dirty_background_bytes;
extern int vm_dirty_ratio;
extern unsi... |
6a11f75b6a17b5d9ac5025f8d048382fd1f47377 | Analyze and fix the following issue in the Linux kernel code: generic debug pagealloc | Problem Details:
CONFIG_DEBUG_PAGEALLOC is now supported by x86, powerpc, sparc64, and
s390. This patch implements it for the rest of the architectures by
filling the pages with poison byte patterns after free_pages() and
verifying the poison patterns before alloc_pages().
This generic one cannot detect invalid page ... | ```diff
diff --git a/arch/avr32/mm/fault.c b/arch/avr32/mm/fault.c
index ce4e4296b954..62d4abbaa654 100644
--- a/arch/avr32/mm/fault.c
+++ b/arch/avr32/mm/fault.c
@@ -250,21 +250,3 @@ asmlinkage void do_bus_error(unsigned long addr, int write_access,
dump_dtlb();
die("Bus Error", regs, SIGKILL);
}
-
-/*
- * This f... |
ad1c3544d0a85da7738ce8cff6f8a148da57935c | Analyze and fix the following issue in the Linux kernel code: mm: don't free swap slots on page deactivation | Problem Details:
The pagevec_swap_free() at the end of shrink_active_list() was introduced
in 68a22394 "vmscan: free swap space on swap-in/activation" when
shrink_active_list() was still rotating referenced active pages.
In 7e9cd48 "vmscan: fix pagecache reclaim referenced bit check" this was
changed, the rotating rem... | ```diff
diff --git a/mm/vmscan.c b/mm/vmscan.c
index 988aef933016..e70fae31e968 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -1303,9 +1303,6 @@ static void shrink_active_list(unsigned long nr_pages, struct zone *zone,
spin_unlock_irq(&zone->lru_lock);
if (buffer_heads_over_limit)
pagevec_strip(&pvec);
- if (vm_... |
8a0bdec194c21c8fdef840989d0d7b742bb5d4bc | Analyze and fix the following issue in the Linux kernel code: mm: fix SHM_HUGETLB to work with users in hugetlb_shm_group | Problem Details:
Fix hugetlb subsystem so that non root users belonging to
hugetlb_shm_group can actually allocate hugetlb backed shm.
Currently non root users cannot even map one large page using SHM_HUGETLB
when they belong to the gid in /proc/sys/vm/hugetlb_shm_group. This is
because allocation size is verified ag... | ```diff
diff --git a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c
index 9b800d97a687..bc56df8ce001 100644
--- a/fs/hugetlbfs/inode.c
+++ b/fs/hugetlbfs/inode.c
@@ -943,9 +943,7 @@ static struct vfsmount *hugetlbfs_vfsmount;
static int can_do_hugetlb_shm(void)
{
- return likely(capable(CAP_IPC_LOCK) ||
- in_group_p... |
9786bf841da57fac3457a1dac41acb4c1f2eced6 | Analyze and fix the following issue in the Linux kernel code: vmscan: clip swap_cluster_max in shrink_all_memory() | Problem Details:
shrink_inactive_list() scans in sc->swap_cluster_max chunks until it hits
the scan limit it was passed.
shrink_inactive_list()
{
do {
isolate_pages(swap_cluster_max)
shrink_page_list()
} while (nr_scanned < max_scan);
}
This assumes that swap_cluster_max is not bigger than the scan limit
becaus... | ```diff
diff --git a/mm/vmscan.c b/mm/vmscan.c
index b15dcbb9e174..9578063cd943 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -2109,7 +2109,6 @@ unsigned long shrink_all_memory(unsigned long nr_pages)
struct scan_control sc = {
.gfp_mask = GFP_KERNEL,
.may_unmap = 0,
- .swap_cluster_max = nr_pages,
.may_wri... |
d979677c4c02f0a72db5a03ecd8184bd9d6695c8 | Analyze and fix the following issue in the Linux kernel code: mm: shrink_all_memory(): use sc.nr_reclaimed | Problem Details:
Commit a79311c14eae4bb946a97af25f3e1b17d625985d "vmscan: bail out of
direct reclaim after swap_cluster_max pages" moved the nr_reclaimed
counter into the scan control to accumulate the number of all reclaimed
pages in a reclaim invocation.
shrink_all_memory() can use the same mechanism. it increase co... | ```diff
diff --git a/mm/vmscan.c b/mm/vmscan.c
index 301f057fd115..b15dcbb9e174 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -2050,16 +2050,15 @@ unsigned long global_lru_pages(void)
#ifdef CONFIG_PM
/*
* Helper function for shrink_all_memory(). Tries to reclaim 'nr_pages' pages
- * from LRU lists system-wide, fo... |
ae149b6bec64a09373ba20fce75f8aa6b14b78fd | Analyze and fix the following issue in the Linux kernel code: proc tty: add struct tty_operations::proc_fops | Problem Details:
Used for gradual switch of TTY drivers from using ->read_proc which helps
with gradual switch from ->read_proc for the whole tree.
As side effect, fix possible race condition when ->data initialized after
PDE is hooked into proc tree.
->proc_fops takes precedence over ->read_proc.
Signed-off-by: Ale... | ```diff
diff --git a/fs/proc/proc_tty.c b/fs/proc/proc_tty.c
index 4a9e0f65ae60..854827b1d463 100644
--- a/fs/proc/proc_tty.c
+++ b/fs/proc/proc_tty.c
@@ -144,16 +144,22 @@ void proc_tty_register_driver(struct tty_driver *driver)
{
struct proc_dir_entry *ent;
- if (!driver->ops->read_proc || !driver->driver_name... |
46e0bb9c12f4bab539736f1714cbf16600f681ec | Analyze and fix the following issue in the Linux kernel code: sched: Print sched_group::__cpu_power in sched_domain_debug | Problem Details:
Impact: extend debug info /proc/sched_debug
If the user changes the value of the sched_mc/smt_power_savings sysfs
tunable, it'll trigger a rebuilding of the whole sched_domain tree,
with the SD_POWERSAVINGS_BALANCE flag set at certain levels.
As a result, there would be a change in the __cpu_power of... | ```diff
diff --git a/kernel/sched.c b/kernel/sched.c
index 8d1bdbe8aafc..6234d10c6a79 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -6963,7 +6963,8 @@ static int sched_domain_debug_one(struct sched_domain *sd, int cpu, int level,
cpumask_or(groupmask, groupmask, sched_group_cpus(group));
cpulist_scnprintf... |
0f8f308925ebe0480bd9831d32963ee0b885e24b | Analyze and fix the following issue in the Linux kernel code: x86: signal: check sas_ss_size instead of sas_ss_flags() | Problem Details:
Impact: fix redundant and incorrect check
Oleg Nesterov noticed wrt commit:
14fc9fb: x86: signal: check signal stack overflow properly
>> No need to check SA_ONSTACK if we're already using alternate signal stack.
>
> Yes, but this also mean that we don't need sas_ss_flags() under
> "if (!onsigstac... | ```diff
diff --git a/arch/x86/kernel/signal.c b/arch/x86/kernel/signal.c
index dfcc74ab0ab6..14425166b8e3 100644
--- a/arch/x86/kernel/signal.c
+++ b/arch/x86/kernel/signal.c
@@ -221,7 +221,7 @@ get_sigframe(struct k_sigaction *ka, struct pt_regs *regs, size_t frame_size,
if (!onsigstack) {
/* This is the X/Open s... |
ef12fefabf94b6a902ad3abd3eb124b00560c445 | Analyze and fix the following issue in the Linux kernel code: cpuacct: add per-cgroup utime/stime statistics | Problem Details:
Add per-cgroup cpuacct controller statistics like the system and user
time consumed by the group of tasks.
Changelog:
v7
- Changed the name of the statistic from utime to user and from stime to
system so that in future we could easily add other statistics like irq,
softirq, steal times etc easily... | ```diff
diff --git a/Documentation/cgroups/cpuacct.txt b/Documentation/cgroups/cpuacct.txt
index bb775fbe43d7..8b930946c52a 100644
--- a/Documentation/cgroups/cpuacct.txt
+++ b/Documentation/cgroups/cpuacct.txt
@@ -30,3 +30,21 @@ The above steps create a new group g1 and move the current shell
process (bash) into it. ... |
c5f8d99585d7b5b7e857fabf8aefd0174903a98c | Analyze and fix the following issue in the Linux kernel code: posixtimers, sched: Fix posix clock monotonicity | Problem Details:
Impact: Regression fix (against clock_gettime() backwarding bug)
This patch re-introduces a couple of functions, task_sched_runtime
and thread_group_sched_runtime, which was once removed at the
time of 2.6.28-rc1.
These functions protect the sampling of thread/process clock with
rq lock. This rq loc... | ```diff
diff --git a/kernel/posix-cpu-timers.c b/kernel/posix-cpu-timers.c
index fa07da94d7be..4318c3085788 100644
--- a/kernel/posix-cpu-timers.c
+++ b/kernel/posix-cpu-timers.c
@@ -224,7 +224,7 @@ static int cpu_clock_sample(const clockid_t which_clock, struct task_struct *p,
cpu->cpu = virt_ticks(p);
break;
... |
2e572895bf3203e881356a4039ab0fa428ed2639 | Analyze and fix the following issue in the Linux kernel code: ring-buffer: do not remove reader page from list on ring buffer free | Problem Details:
Impact: prevent possible memory leak
The reader page of the ring buffer is special. Although it points
into the ring buffer, it is not part of the actual buffer. It is
a page used by the reader to swap with a page in the ring buffer.
Once the swap is made, the new reader page is again outside the
buff... | ```diff
diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c
index edce2ff38944..960cbf44c844 100644
--- a/kernel/trace/ring_buffer.c
+++ b/kernel/trace/ring_buffer.c
@@ -563,7 +563,6 @@ static void rb_free_cpu_buffer(struct ring_buffer_per_cpu *cpu_buffer)
struct list_head *head = &cpu_buffer->pages;... |
2aad1b76e6b0cc5a2e5d9b95a9f356ddddbfa8a9 | Analyze and fix the following issue in the Linux kernel code: function-graph: allow unregistering twice | Problem Details:
Impact: fix to permanent disabling of function graph tracer
There should be nothing to prevent a tracer from unregistering a
function graph callback more than once. This can simplify error paths.
But currently, the counter does not account for mulitple unregistering
of the function graph callback. If... | ```diff
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
index 1752a63f37c0..f1ed080406c3 100644
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -2719,6 +2719,9 @@ void unregister_ftrace_graph(void)
{
mutex_lock(&ftrace_lock);
+ if (!unlikely(atomic_read(&ftrace_graph_active)))
+ goto out;
+
... |
a5032bfdd9c80e0231a6324661e123818eb46ecd | Analyze and fix the following issue in the Linux kernel code: ACPI: EC: Always parse EC device | Problem Details:
If ECDT info is not valid, we have last chance to configure
EC driver properly at this point, don't miss it.
http://bugzilla.kernel.org/show_bug.cgi?id=12461
Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com> | ```diff
diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
index 2fe15060dcdc..5a2d5372ea39 100644
--- a/drivers/acpi/ec.c
+++ b/drivers/acpi/ec.c
@@ -755,6 +755,10 @@ ec_parse_device(acpi_handle handle, u32 Level, void *context, void **retval)
unsigned long long tmp = 0;
struct acpi_ec *ec = context;
+
+ /* clea... |
34ff4dbccccce54c83b1234d39b7ad9e548a75dd | Analyze and fix the following issue in the Linux kernel code: ACPI: EC: Separate delays for MSI hardware | Problem Details:
MSI notebooks require very strict delays, while all others
are happy with msleep().
References: http://bugzilla.kernel.org/show_bug.cgi?id=9998
Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com> | ```diff
diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
index 2fe15060dcdc..ac9dd3b386b1 100644
--- a/drivers/acpi/ec.c
+++ b/drivers/acpi/ec.c
@@ -67,7 +67,7 @@ enum ec_command {
#define ACPI_EC_DELAY 500 /* Wait 500ms max. during EC ops */
#define ACPI_EC_UDELAY_GLK 1000 /* Wait 1ms max. to get global lock */... |
eeb5f5c9b3c8bee5ab4794323c1d23d100a9db59 | Analyze and fix the following issue in the Linux kernel code: ETHOC: fix build breakage on s390 | Problem Details:
Let driver depend on HAS_IOMEM to avoid build breakage on s390:
CC drivers/net/ethoc.o
drivers/net/ethoc.c: In function 'ethoc_read':
drivers/net/ethoc.c:221: error: implicit declaration of function 'ioread32'
drivers/net/ethoc.c: In function 'ethoc_write':
drivers/net/ethoc.c:226: error: impli... | ```diff
diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
index f062b424704e..c99ee38f952e 100644
--- a/drivers/net/Kconfig
+++ b/drivers/net/Kconfig
@@ -974,7 +974,7 @@ config ENC28J60_WRITEVERIFY
config ETHOC
tristate "OpenCores 10/100 Mbps Ethernet MAC support"
- depends on NET_ETHERNET
+ depends on NET_ET... |
0f861e8c47ede537a8ad280c61d5d00d541f04db | Analyze and fix the following issue in the Linux kernel code: MAINTAINERS: move old ide-{floppy,tape} entries to CREDITS (take 2) | Problem Details:
Ben Hutchings noticed that MAINTAINERS somehow still contain old
ide-{floppy,tape} entries. Fix it by moving them to CREDITS (kudos
to Gadi and Paul for all the early hard work on ide-{floppy,tape}).
v2:
Rename IDE/ATAPI CDROM DRIVER entry to IDE/ATAPI DRIVERS one.
Cc: Gadi Oxman <gadio@netvision.ne... | ```diff
diff --git a/CREDITS b/CREDITS
index e8b7d36611e5..9a93e3e26d70 100644
--- a/CREDITS
+++ b/CREDITS
@@ -495,6 +495,11 @@ S: Kopmansg 2
S: 411 13 Goteborg
S: Sweden
+N: Paul Bristow
+E: paul@paulbristow.net
+W: http://paulbristow.net/linux/idefloppy.html
+D: Maintainer of IDE/ATAPI floppy driver
+
N: Domini... |
8d64fcd9357798ad0d61f8877de13d5e1b1ab510 | Analyze and fix the following issue in the Linux kernel code: ide: identify data word 53 bit 1 doesn't cover words 62 and 63 (take 3) | Problem Details:
The IDE code assumed for years that the bit 1 of the identify data word 53 also
covers the validity of the SW/MW DMA information in words 62 and 63, but it has
always covered only words 64 thru 70, with words 62 and 63 being defined in the
original ATA spec, not in ATA-2...
This fix however should onl... | ```diff
diff --git a/drivers/ide/cs5530.c b/drivers/ide/cs5530.c
index 8e8b35a89901..40bf05eddf6e 100644
--- a/drivers/ide/cs5530.c
+++ b/drivers/ide/cs5530.c
@@ -92,8 +92,7 @@ static u8 cs5530_udma_filter(ide_drive_t *drive)
if ((mateid[ATA_ID_FIELD_VALID] & 4) &&
(mateid[ATA_ID_UDMA_MODES] & 7))
goto ou... |
349d12a1fe57d49287a539909cf14f362634342d | Analyze and fix the following issue in the Linux kernel code: ide-floppy: use ide_pio_bytes() | Problem Details:
* Fix ide_init_sg_cmd() setup for non-fs requests.
* Convert ide_pc_intr() to use ide_pio_bytes() for floppy media.
* Remove no longer needed ide_io_buffers() and sg/sg_cnt fields
from struct ide_atapi_pc.
* Remove partial completions; kill idefloppy_update_buffers(), as a
result.
* Add some mo... | ```diff
diff --git a/drivers/ide/ide-atapi.c b/drivers/ide/ide-atapi.c
index 40f413b20bd8..100e6f94b4f0 100644
--- a/drivers/ide/ide-atapi.c
+++ b/drivers/ide/ide-atapi.c
@@ -71,49 +71,6 @@ int ide_check_atapi_device(ide_drive_t *drive, const char *s)
}
EXPORT_SYMBOL_GPL(ide_check_atapi_device);
-/* PIO data transf... |
d93bc4521c80e9d87767779814e88f6d725453d7 | Analyze and fix the following issue in the Linux kernel code: ide-{floppy,tape}: fix padding for PIO transfers | Problem Details:
* Return number of bytes left to transfer from idetape_{in,out}put_buffers()
and number of bytes done from ide_tape_io_buffers().
* Fix padding for PIO transfers in ide_pc_intr() so read/write buffers are
always completely processed and then the transfer is padded if necessary.
* Remove invalid e... | ```diff
diff --git a/drivers/ide/ide-atapi.c b/drivers/ide/ide-atapi.c
index 3f3fc7c7b2fe..40f413b20bd8 100644
--- a/drivers/ide/ide-atapi.c
+++ b/drivers/ide/ide-atapi.c
@@ -110,13 +110,6 @@ int ide_io_buffers(ide_drive_t *drive, struct ide_atapi_pc *pc,
}
}
- if (bcount) {
- printk(KERN_ERR "%s: %d leftover b... |
b5479167f4206e0d821a51ae149d921cd7a58e54 | Analyze and fix the following issue in the Linux kernel code: ide: fix locking in drive_release_dev() | Problem Details:
* Request queue cleanup should happen before freeing drive->id
and marking device as non-present. Fix it.
* Remove superfluous hwif->lock acquiring/releasing.
Cc: Stanislaw Gruszka <stf_xl@wp.pl>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | ```diff
diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c
index 548864510ba9..7c1f1bf81836 100644
--- a/drivers/ide/ide-probe.c
+++ b/drivers/ide/ide-probe.c
@@ -942,20 +942,16 @@ EXPORT_SYMBOL_GPL(ide_init_disk);
static void drive_release_dev (struct device *dev)
{
ide_drive_t *drive = container_of(de... |
4453011f959a5f5c6c7a33aea54fe17f5e43a867 | Analyze and fix the following issue in the Linux kernel code: ide: destroy DMA mappings after ending DMA (v2) | Problem Details:
Move ide_destroy_dmatable() call out from ->dma_end method to
{ide_pc,cdrom_newpc,ide_dma}_intr(), ide_dma_timeout_retry()
and sgiioc4_resetproc().
This causes minor/safe behavior changes w.r.t.:
* cmd64x.c::cmd64{8,x}_dma_end()
* cs5536.c::cs5536_dma_end()
* icside.c::icside_dma_end()
* it821x.c::it8... | ```diff
diff --git a/drivers/ide/au1xxx-ide.c b/drivers/ide/au1xxx-ide.c
index 0c08c5e01f2a..ba2a211758a9 100644
--- a/drivers/ide/au1xxx-ide.c
+++ b/drivers/ide/au1xxx-ide.c
@@ -280,8 +280,6 @@ static int auide_build_dmatable(ide_drive_t *drive, struct ide_cmd *cmd)
static int auide_dma_end(ide_drive_t *drive)
{
-... |
06a449e30135aabb6686c95bf0c42b46d169a3b3 | Analyze and fix the following issue in the Linux kernel code: ide-cd: fix non-SECTOR_SIZE-multiples PIO transfers for fs requests | Problem Details:
We now support arbitrary number of bytes per-IRQ also for fs requests
so remove ide_cd_check_transfer_size() and IDE_AFLAG_LIMIT_NFRAMES.
Cc: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | ```diff
diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c
index 5f15859c2c73..c0cefe5becf3 100644
--- a/drivers/ide/ide-cd.c
+++ b/drivers/ide/ide-cd.c
@@ -509,31 +509,6 @@ static int ide_cd_check_ireason(ide_drive_t *drive, struct request *rq,
return -1;
}
-/*
- * Assume that the drive will always provide ... |
c4c69e21b51005e24e2fc4efc8a73460a5ab7799 | Analyze and fix the following issue in the Linux kernel code: ide-cd: kill whole failed request in ide_cd_do_request() | Problem Details:
Untangling cdrom_end_request() uncovered an error in completing
failed requests in ide_cd_do_request(). Fix it.
Cc: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | ```diff
diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c
index c859eafe759b..978e1c0c1722 100644
--- a/drivers/ide/ide-cd.c
+++ b/drivers/ide/ide-cd.c
@@ -1083,7 +1083,7 @@ out_end:
rq->errors = -EIO;
}
- nsectors = rq->hard_cur_sectors;
+ nsectors = rq->hard_nr_sectors;
if (nsectors == 0)
nsecto... |
da19620d99377a52b953245089f831a9c3f049c2 | Analyze and fix the following issue in the Linux kernel code: at91_ide: fix ->ftf_flags handling | Problem Details:
Fix some incorrect IDE_FTFLAG_* changes which slipped in commit
"ide: add "flagged" taskfile flags to struct ide_taskfile (v2)"
(commit 19710d25d50ae0be05eebe4231ed8918b1092d82) few days ago.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | ```diff
diff --git a/drivers/ide/at91_ide.c b/drivers/ide/at91_ide.c
index 27547121daff..6bb45a2b24c2 100644
--- a/drivers/ide/at91_ide.c
+++ b/drivers/ide/at91_ide.c
@@ -192,10 +192,10 @@ static void at91_ide_tf_load(ide_drive_t *drive, struct ide_cmd *cmd)
struct ide_taskfile *tf = &cmd->tf;
u8 HIHI = (cmd->tf_fl... |
9010941c5483a7a5bb1f7d97ee62491fb078bb51 | Analyze and fix the following issue in the Linux kernel code: ide: Fix code dealing with sleeping devices in do_ide_request() | Problem Details:
Unfortunately, I missed a catch when reviewing the patch committed as
201bffa4. Here is the fix to the currently broken handling of sleeping
devices. In particular, this is required to get the disk shock
protection code working again.
Reported-by: Christian Thaeter <ct@pipapo.org>
Cc: stable@kernel.or... | ```diff
diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c
index 1adc5e2e7fb3..3c52317d8524 100644
--- a/drivers/ide/ide-io.c
+++ b/drivers/ide/ide-io.c
@@ -481,11 +481,10 @@ repeat:
prev_port = hwif->host->cur_port;
hwif->rq = NULL;
- if (drive->dev_flags & IDE_DFLAG_SLEEPING) {
- if (time_before(driv... |
edb5abb1e2a84fd8802a3577d95eac84fe1405ab | Analyze and fix the following issue in the Linux kernel code: IPoIB: Avoid free_netdev() BUG when destroying a child interface | Problem Details:
We have to release the RTNL before calling free_netdev() so that the
device state has a chance to become NETREG_UNREGISTERED. Otherwise
when removing a child interface, we hit the BUG() that tests the
device state in free_netdev().
Reported-by: Yossi Etigin <yosefe@voltaire.com>
Signed-off-by: Roland... | ```diff
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_vlan.c b/drivers/infiniband/ulp/ipoib/ipoib_vlan.c
index 5a76a5510350..4c57f329dd50 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_vlan.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_vlan.c
@@ -70,12 +70,14 @@ int ipoib_vlan_add(struct net_device *pdev, unsigned shor... |
33b26d7951619e4debf3a82f30a03423a36a1412 | Analyze and fix the following issue in the Linux kernel code: [S390] fix hypfs build failure | Problem Details:
Fix build breakage below which probably was introduced with
("rcu: don't include unnecessary headers, allow kmemtrace w/ tracepoints").
CC arch/s390/hypfs/hypfs_diag.o
arch/s390/hypfs/hypfs_diag.c: In function 'diag204_free_buffer':
arch/s390/hypfs/hypfs_diag.c:364: error: implicit declaration ... | ```diff
diff --git a/arch/s390/hypfs/hypfs_diag.c b/arch/s390/hypfs/hypfs_diag.c
index b1e892a43816..704dd396257b 100644
--- a/arch/s390/hypfs/hypfs_diag.c
+++ b/arch/s390/hypfs/hypfs_diag.c
@@ -12,6 +12,8 @@
#include <linux/types.h>
#include <linux/errno.h>
+#include <linux/gfp.h>
+#include <linux/slab.h>
#includ... |
352b09edd7fa8145bfc9e5db0cc0fed971b69440 | Analyze and fix the following issue in the Linux kernel code: mlx4_core: Don't leak mailbox for SET_PORT on Ethernet ports | Problem Details:
Commit 793730bf ("mlx4_core: Don't perform SET_PORT command for
Ethernet ports") introduced a leak of mailbox buffers when SET_PORT
was called for Ethernet ports, since it added a return after the
mailbox was allocated. Fix this by checking the port type and
returning *before* allocating the mailbox.
... | ```diff
diff --git a/drivers/net/mlx4/port.c b/drivers/net/mlx4/port.c
index 7cce3342ef8c..606aa58afdea 100644
--- a/drivers/net/mlx4/port.c
+++ b/drivers/net/mlx4/port.c
@@ -299,13 +299,14 @@ int mlx4_SET_PORT(struct mlx4_dev *dev, u8 port)
struct mlx4_cmd_mailbox *mailbox;
int err;
+ if (dev->caps.port_type[por... |
a18b83b7ef3c98cd8b4bb885e4a649a8f30fb7b0 | Analyze and fix the following issue in the Linux kernel code: cpuacct: make cpuacct hierarchy walk in cpuacct_charge() safe when rcupreempt is used -v2 | Problem Details:
Impact: fix cgroups race under rcu-preempt
cpuacct_charge() obtains task's ca and does a hierarchy walk upwards.
This can race with the task's movement between cgroups. This race
can cause an access to freed ca pointer in cpuacct_charge() or access
to invalid cgroups pointer of the task. This will not... | ```diff
diff --git a/kernel/sched.c b/kernel/sched.c
index 186c6fd08acf..cc397aae5eae 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -9654,12 +9654,17 @@ static void cpuacct_charge(struct task_struct *tsk, u64 cputime)
return;
cpu = task_cpu(tsk);
+
+ rcu_read_lock();
+
ca = task_ca(tsk);
for (; ca; c... |
b14b70a6a4e394c9630bcde17e07d3bcdcbca27e | Analyze and fix the following issue in the Linux kernel code: trace: make argument 'mem' of trace_seq_putmem() const | Problem Details:
Impact: fix build warning
I passed a const value to trace_seq_putmem(), and I got compile warning.
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Acked-by: Jens Axboe <jens.axboe@oracle.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Frederic Weisbecker... | ```diff
diff --git a/kernel/trace/trace_output.c b/kernel/trace/trace_output.c
index 6595074cbac5..d72b9a63b247 100644
--- a/kernel/trace/trace_output.c
+++ b/kernel/trace/trace_output.c
@@ -137,7 +137,7 @@ int trace_seq_putc(struct trace_seq *s, unsigned char c)
return 1;
}
-int trace_seq_putmem(struct trace_seq ... |
ad5dd5493a55e462796e42e50a49e76df76fdb05 | Analyze and fix the following issue in the Linux kernel code: blktrace: fix memory leak when freeing struct blk_io_trace | Problem Details:
Impact: fix mixed ioctl and ftrace-plugin blktrace use memory leak
When mixing the use of ioctl-based blktrace and ftrace-based blktrace,
we can leak memory in this way:
# btrace /dev/sda > /dev/null &
# echo 0 > /sys/block/sda/sda1/trace/enable
now we leak bt->dropped_file, bt->msg_file, bt->rc... | ```diff
diff --git a/kernel/trace/blktrace.c b/kernel/trace/blktrace.c
index 8d6bd12aab10..2f21d7761600 100644
--- a/kernel/trace/blktrace.c
+++ b/kernel/trace/blktrace.c
@@ -247,7 +247,7 @@ record_it:
static struct dentry *blk_tree_root;
static DEFINE_MUTEX(blk_tree_mutex);
-static void blk_trace_cleanup(struct bl... |
17ba97e347bec9bbc47a0877c7a098708982129d | Analyze and fix the following issue in the Linux kernel code: blktrace: fix blk_probes_ref chaos | Problem Details:
Impact: fix mixed ioctl and ftrace-plugin blktrace use refcount bugs
ioctl-based blktrace allocates bt and registers tracepoints when
ioctl(BLKTRACESETUP), and do all cleanups when ioctl(BLKTRACETEARDOWN).
while ftrace-based blktrace allocates/frees bt when:
# echo 1/0 > /sys/block/sda/sda1/trace/e... | ```diff
diff --git a/kernel/trace/blktrace.c b/kernel/trace/blktrace.c
index 5b28f0f119c5..8d6bd12aab10 100644
--- a/kernel/trace/blktrace.c
+++ b/kernel/trace/blktrace.c
@@ -478,7 +478,7 @@ int do_blk_trace_setup(struct request_queue *q, char *name, dev_t dev,
goto err;
}
- if (atomic_add_return(1, &blk_probes_... |
35ac51bfe4c293b67ce9f85082ba0b9bc6123c40 | Analyze and fix the following issue in the Linux kernel code: blktrace: make classic output more classic | Problem Details:
Impact: fix ftrace plugin timestamp output
In the classic user-space blktrace, the output timestamp is sec.nsec
not sec.usec.
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Acked-by: Jens Axboe <jens.axboe@oracle.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Steven Rostedt <rostedt@goodmis.o... | ```diff
diff --git a/kernel/trace/blktrace.c b/kernel/trace/blktrace.c
index d43cdac7c754..5b28f0f119c5 100644
--- a/kernel/trace/blktrace.c
+++ b/kernel/trace/blktrace.c
@@ -994,8 +994,8 @@ static void get_pdu_remap(const struct trace_entry *ent,
static int blk_log_action_iter(struct trace_iterator *iter, const char ... |
eb08f8eb0673d9c1e62b69ad1b41593e73c40467 | Analyze and fix the following issue in the Linux kernel code: blktrace: fix off-by-one bug | Problem Details:
'what' is used as the index of array what2act, so it can't >= the array size.
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Acked-by: Jens Axboe <jens.axboe@oracle.com>
Acked-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Acked-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Ingo Molnar <mingo... | ```diff
diff --git a/kernel/trace/blktrace.c b/kernel/trace/blktrace.c
index a7f7ff5db38b..d43cdac7c754 100644
--- a/kernel/trace/blktrace.c
+++ b/kernel/trace/blktrace.c
@@ -1152,7 +1152,7 @@ static enum print_line_t blk_trace_event_print(struct trace_iterator *iter,
if (!trace_print_context(iter))
return TRACE_T... |
5554720482a631702146a959db22fe417740e0a6 | Analyze and fix the following issue in the Linux kernel code: blktrace: fix the original blktrace | Problem Details:
Currently the original blktrace, which is using relay and is used via
ioctl, is broken. You can use ftrace to see the output of blktrace,
but user-space blktrace is unusable.
It's broken by "blktrace: add ftrace plugin"
(c71a896154119f4ca9e89d6078f5f63ad60ef199)
- if (unlikely(bt->trace_state != Blk... | ```diff
diff --git a/kernel/trace/blktrace.c b/kernel/trace/blktrace.c
index 95f89faca73e..a7f7ff5db38b 100644
--- a/kernel/trace/blktrace.c
+++ b/kernel/trace/blktrace.c
@@ -110,7 +110,7 @@ void __trace_note_message(struct blk_trace *bt, const char *fmt, ...)
unsigned long flags;
char *buf;
- if (blk_tr) {
+ if ... |
b5230b56ee6caeb27cedb7753c0c319646383bb4 | Analyze and fix the following issue in the Linux kernel code: blktrace: fix a race when creating blk_tree_root in debugfs | Problem Details:
t1 t2
------ ------
do_blk_trace_setup() do_blk_trace_setup()
if (!blk_tree_root) {
if (!blk_tree_root)
blk_tree_root = create_dir()
blk_tree_root = cre... | ```diff
diff --git a/kernel/trace/blktrace.c b/kernel/trace/blktrace.c
index ee7a8bb8b1e8..95f89faca73e 100644
--- a/kernel/trace/blktrace.c
+++ b/kernel/trace/blktrace.c
@@ -426,11 +426,15 @@ int do_blk_trace_setup(struct request_queue *q, char *name, dev_t dev,
ret = -ENOENT;
+ mutex_lock(&blk_tree_mutex);
if... |
6c051ce0307526adec32a847f0daa1af2124f0a9 | Analyze and fix the following issue in the Linux kernel code: blktrace: fix timestamp in binary output | Problem Details:
I found the timestamp is wrong:
# echo bin > trace_option
# echo blk > current_tracer
# cat trace_pipe | blkparse -i -
8,0 0 0 0.000000000 504 A W ...
...
8,7 1 0 0.008534097 0 C R ...
(should be 8.534097xxx)
user-space blkparse expects the ti... | ```diff
diff --git a/kernel/trace/blktrace.c b/kernel/trace/blktrace.c
index 6fb274f5f34e..ee7a8bb8b1e8 100644
--- a/kernel/trace/blktrace.c
+++ b/kernel/trace/blktrace.c
@@ -1168,7 +1168,7 @@ static int blk_trace_synthesize_old_trace(struct trace_iterator *iter)
const int offset = offsetof(struct blk_io_trace, secto... |
fe671772ab1bf5624f2c4dbe2295e6ebeb8055fc | Analyze and fix the following issue in the Linux kernel code: powerpc/85xx: Use fsl,mpc85.. as prefix for memory ctrl & l2-cache nodes | Problem Details:
Older devices tree's used "fsl,85.." instead of the preferred
"fsl,mpc85.." for the memory controller & l2 cache controller nodes.
The EDAC code is the only use of these and has been updated for some
time to support both "fsl,85.." and "fsl,mpc85.."
Signed-off-by: Kumar Gala <galak@kernel.crashing.org... | ```diff
diff --git a/arch/powerpc/boot/dts/ksi8560.dts b/arch/powerpc/boot/dts/ksi8560.dts
index 308fe7c29dea..c9cfd374bffb 100644
--- a/arch/powerpc/boot/dts/ksi8560.dts
+++ b/arch/powerpc/boot/dts/ksi8560.dts
@@ -57,14 +57,14 @@
bus-frequency = <0>; /* Fixed by bootwrapper */
memory-controller@2000 {
- c... |
eedeeabdeeadb016b8c783e3620d06b98d0cb4e1 | Analyze and fix the following issue in the Linux kernel code: lockdep: add stack dumps to asserts | Problem Details:
Have a better idea about exactly which loc causes a lockdep
limit overflow. Often it's a bug or inefficiency in that
subsystem.
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <1237376327.5069.253.camel@laptop>
Signed-off-by: Ingo Molnar <mingo@elte.hu> | ```diff
diff --git a/kernel/lockdep.c b/kernel/lockdep.c
index 981cd4854281..a288ae107b50 100644
--- a/kernel/lockdep.c
+++ b/kernel/lockdep.c
@@ -792,6 +792,7 @@ register_lock_class(struct lockdep_map *lock, unsigned int subclass, int force)
printk("BUG: MAX_LOCKDEP_KEYS too low!\n");
printk("turning off the l... |
7f1e2ca9f04b02794597f60e7b1d43f0a1317939 | Analyze and fix the following issue in the Linux kernel code: hrtimer: fix rq->lock inversion (again) | Problem Details:
It appears I inadvertly introduced rq->lock recursion to the
hrtimer_start() path when I delegated running already expired
timers to softirq context.
This patch fixes it by introducing a __hrtimer_start_range_ns()
method that will not use raise_softirq_irqoff() but
__raise_softirq_irqoff() which avoid... | ```diff
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h
index bd37078c2d7d..0d2f7c8a33d6 100644
--- a/include/linux/hrtimer.h
+++ b/include/linux/hrtimer.h
@@ -336,6 +336,11 @@ extern int hrtimer_start(struct hrtimer *timer, ktime_t tim,
const enum hrtimer_mode mode);
extern int hrtimer_start_range... |
de0975781a1a8bc92e07eb7681d10ef9bb5e6df9 | Analyze and fix the following issue in the Linux kernel code: UBIFS: fix recovery bug | Problem Details:
UBIFS did not recovery in a situation in which it could
have. The relevant function assumed there could not be
more nodes in an eraseblock after a corrupted node, but
in fact the last (NAND) page written might contain anything.
The correct approach is to check for empty space (0xFF bytes)
from then on.... | ```diff
diff --git a/fs/ubifs/recovery.c b/fs/ubifs/recovery.c
index 90acac603e63..10662975d2ef 100644
--- a/fs/ubifs/recovery.c
+++ b/fs/ubifs/recovery.c
@@ -425,59 +425,35 @@ static void clean_buf(const struct ubifs_info *c, void **buf, int lnum,
* @lnum: LEB number of the LEB from which @buf was read
* @offs: of... |
cd94b5053081963614f6ad77b9b66a7968056c84 | Analyze and fix the following issue in the Linux kernel code: regulator: refcount fixes | Problem Details:
Fix some refcounting issues in the regulator framework, supporting
regulator_disable() for regulators that were enabled at boot time
via machine constraints:
- Update those regulators' usecounts after enabling, so they
can cleanly be disabled at that level.
- Remove the problematic per-consumer ... | ```diff
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index 019a8a42ac18..944887578d66 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -52,7 +52,6 @@ struct regulator {
int uA_load;
int min_uV;
int max_uV;
- int enabled; /* count of client enables */
char *supply_name;... |
3b2a6061afe6fcc44437cd5ec641b0aeb2825ee3 | Analyze and fix the following issue in the Linux kernel code: regulator: get_status() grows kerneldoc | Problem Details:
Add kerneldoc for the new get_status() message. Fix the existing
kerneldoc for that struct in two ways:
(a) Syntax, making sure parameter descriptions immediately
follow the one-line struct description and that the first
blank lines is before any more expansive description;
(b) Presentati... | ```diff
diff --git a/include/linux/regulator/driver.h b/include/linux/regulator/driver.h
index 2255468d456f..4848d8dacd90 100644
--- a/include/linux/regulator/driver.h
+++ b/include/linux/regulator/driver.h
@@ -35,11 +35,8 @@ enum regulator_status {
/**
* struct regulator_ops - regulator operations.
*
- * This str... |
33f301af0c56971e3c0f4a4eb4b92f7e80230f49 | Analyze and fix the following issue in the Linux kernel code: regulator: Fix get_mode() for WM835x DCDCs | Problem Details:
The WM835x regulators need a different register checking for force
mode on each DCDC. Previously the force mode status for DCDC1 was
checked.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk> | ```diff
diff --git a/drivers/regulator/wm8350-regulator.c b/drivers/regulator/wm8350-regulator.c
index 93e0ce5a5c23..261db94e0e7b 100644
--- a/drivers/regulator/wm8350-regulator.c
+++ b/drivers/regulator/wm8350-regulator.c
@@ -1031,18 +1031,30 @@ static unsigned int wm8350_dcdc_get_mode(struct regulator_dev *rdev)
in... |
0f1d747bfa89de4ca52dc1dffdcce35a2b8a1532 | Analyze and fix the following issue in the Linux kernel code: regulator: add unset_regulator_supplies to fix regulator_unregister | Problem Details:
Currently regulator_unregister does not clear regulator <--> consumer
mapping.
This patch introduces unset_regulator_supplies that clear the map.
Signed-off-by: Mike Rapoport <mike@compulab.co.il>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co... | ```diff
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index 0ed13c2a8c3c..b85e4a9dafcf 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -831,6 +831,19 @@ static void unset_consumer_device_supply(struct regulator_dev *rdev,
}
}
+static void unset_regulator_supplies(struct r... |
90ca563b1030bece8a4f15a910e39a46f059ff48 | Analyze and fix the following issue in the Linux kernel code: regulator: fix header file missing kernel-doc | Problem Details:
Fix regulator/driver.h missing kernel-doc:
Warning(linux-next-20090120//include/linux/regulator/driver.h:108): No description found for parameter 'get_status'
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
cc: Liam Girdwood <lrg@slimlogic.co.uk>
cc: Mark Brown <broonie@opensource.wolfsonmicro.... | ```diff
diff --git a/include/linux/regulator/driver.h b/include/linux/regulator/driver.h
index c263e36e564e..eb8773b05ac3 100644
--- a/include/linux/regulator/driver.h
+++ b/include/linux/regulator/driver.h
@@ -51,6 +51,7 @@ enum regulator_status {
*
* @set_mode: Set the operating mode for the regulator.
* @get_m... |
1fa9ad52b07811ebf258f3f6907de8dbf020ec2d | Analyze and fix the following issue in the Linux kernel code: regulator: Hoist struct regulator_dev out of core to fix notifiers | Problem Details:
Commit 872ed3fe176833f7d43748eb88010da4bbd2f983 caused regulator drivers
to take the struct regulator_dev lock themselves which requires that the
struct be visible to them. Band aid this by making the struct visible.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam G... | ```diff
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index f17362ac9c61..0ed13c2a8c3c 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -29,33 +29,6 @@ static DEFINE_MUTEX(regulator_list_mutex);
static LIST_HEAD(regulator_list);
static LIST_HEAD(regulator_map_list);
-/*
- *... |
b136fb4463d13eea129bf090a8a465bba6bf0003 | Analyze and fix the following issue in the Linux kernel code: Regulator: Push lock out of _notifier_call_chain + add voltage change event. | Problem Details:
Regulator: Push lock out of _notifier_call_chain and into caller functions
(side effect of fixing deadlock in regulator_force_disable)
+ Add a voltage changed event.
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk> | ```diff
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index 0ff95c3ccf5b..96c877dd9daf 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -1284,6 +1284,7 @@ int regulator_set_voltage(struct regulator *regulator, int min_uV, int max_uV)
ret = rdev->desc->ops->set_voltage(rdev, m... |
9485397aa2195e82da6373586a66689526675ad4 | Analyze and fix the following issue in the Linux kernel code: regulator: minor cleanup of virtual consumer | Problem Details:
On Thu, 15 Jan 2009 16:10:22 -0800
Andrew Morton <akpm@linux-foundation.org> wrote:
> On Wed, 14 Jan 2009 13:16:27 -0800
> David Brownell <david-b@pacbell.net> wrote:
>
> > From: David Brownell <dbrownell@users.sourceforge.net>
> >
> > Minor cleanup to the regulator set_mode sysfs support:
> > switch ... | ```diff
diff --git a/drivers/regulator/virtual.c b/drivers/regulator/virtual.c
index a38d42bc8f8f..45ebbc22f470 100644
--- a/drivers/regulator/virtual.c
+++ b/drivers/regulator/virtual.c
@@ -226,6 +226,10 @@ static ssize_t set_mode(struct device *dev, struct device_attribute *attr,
unsigned int mode;
int ret;
+ /... |
ec32a2bd35bd6b933a5db6542c48210ce069a376 | Analyze and fix the following issue in the Linux kernel code: md: allow number of drives in raid5 to be reduced | Problem Details:
When reshaping a raid5 to have fewer devices, we work from the end of
the array to the beginning.
md_do_sync gives addresses to sync_request that go from the beginning
to the end. So largely ignore them use the internal state variable
"reshape_progress" to keep track of what to do next.
Never allow t... | ```diff
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
index 1023c4e48a91..76eed592371e 100644
--- a/drivers/md/raid5.c
+++ b/drivers/md/raid5.c
@@ -3725,6 +3725,7 @@ static sector_t reshape_request(mddev_t *mddev, sector_t sector_nr, int *skipped
int i;
int dd_idx;
sector_t writepos, safepos, gap;
+ sector... |
cea9c22800773cecb1d41f4a6139f9eb6a95368b | Analyze and fix the following issue in the Linux kernel code: md: add explicit method to signal the end of a reshape. | Problem Details:
Currently raid5 (the only module that supports restriping)
notices that the reshape has finished be sync_request being
given a large value, and handles any cleanup them.
This patch changes it so md_check_recovery calls into an
explicit finish_reshape method as well.
The clean-up from sync_request can... | ```diff
diff --git a/drivers/md/md.c b/drivers/md/md.c
index 923d1250b9a9..c50931352b23 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -5073,14 +5073,6 @@ void md_set_array_sectors(mddev_t *mddev, sector_t array_sectors)
}
EXPORT_SYMBOL(md_set_array_sectors);
-void md_set_array_sectors_lock(mddev_t *mddev, s... |
18b0033491f584a2d79697da714b1ef9d6b27d22 | Analyze and fix the following issue in the Linux kernel code: md: raid5 run(): Fix max_degraded for raid level 4. | Problem Details:
raid4 allows only one failed disk.
Signed-off-by: Andre Noll <maan@systemlinux.org>
Signed-off-by: NeilBrown <neilb@suse.de> | ```diff
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
index 1aebd3ef80b7..e1ee181b79bb 100644
--- a/drivers/md/raid5.c
+++ b/drivers/md/raid5.c
@@ -4331,7 +4331,7 @@ static int run(mddev_t *mddev)
*/
sector_t here_new, here_old;
int old_disks;
- int max_degraded = (mddev->level == 5 ? 1 : 2);
+ int m... |
b522adcde9c4d3fb7b579cfa9160d8bde7744be8 | Analyze and fix the following issue in the Linux kernel code: md: 'array_size' sysfs attribute | Problem Details:
Allow userspace to set the size of the array according to the following
semantics:
1/ size must be <= to the size returned by mddev->pers->size(mddev, 0, 0)
a) If size is set before the array is running, do_md_run will fail
if size is greater than the default size
b) A reshape attempt that... | ```diff
diff --git a/drivers/md/md.c b/drivers/md/md.c
index 76ba69b31d6a..923d1250b9a9 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -387,6 +387,11 @@ static inline int mddev_lock(mddev_t * mddev)
return mutex_lock_interruptible(&mddev->reconfig_mutex);
}
+static inline int mddev_is_locked(mddev_t *mddev)... |
93ed05e2a56b5ee06c0100a169433b11c4aa5d0b | Analyze and fix the following issue in the Linux kernel code: md: fix typo in FSF address | Problem Details:
Hello,
I found a typo Bosto"m" in FSF address.
And I am checking around linux source code.
Here is the only place which uses Bosto"m" (not Boston).
Signed-off-by: Atsushi SAKAI <sakaia@jp.fujitsu.com>
Signed-off-by: NeilBrown <neilb@suse.de> | ```diff
diff --git a/drivers/md/raid6.h b/drivers/md/raid6.h
index 66e6b0c6734f..8a9c823bab9e 100644
--- a/drivers/md/raid6.h
+++ b/drivers/md/raid6.h
@@ -5,7 +5,7 @@
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*... |
34817e8c3948ea20316dfa8fd8947d6d0ee82ba9 | Analyze and fix the following issue in the Linux kernel code: md: make sure new_level, new_chunksize, new_layout always have sensible values. | Problem Details:
When an md array is undergoing a change, we have new_* fields that
show the new values.
When no change is happening, it is least confusing if these have
the same value as the normal fields.
This is true in most cases, but not when the values are set via sysfs.
So fix this up.
A subsequent patch will ... | ```diff
diff --git a/drivers/md/md.c b/drivers/md/md.c
index 07ab6790e29d..117ea5fde568 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -2633,9 +2633,9 @@ layout_store(mddev_t *mddev, const char *buf, size_t len)
if (mddev->pers)
return -EBUSY;
- if (mddev->reshape_position != MaxSector)
- mddev->new_layo... |
d0a4bb492772ce5c4bdfba3744a99ed6f6fb238f | Analyze and fix the following issue in the Linux kernel code: md: never clear bit from the write-intent bitmap when the array is degraded. | Problem Details:
It is safe to clear a bit from the write-intent bitmap for a raid1
if we know the data has been written to all devices, which is
what the current test does.
But it is not always safe to update the 'events_cleared' counter in
that case. This is because one request could complete successfully
after som... | ```diff
diff --git a/drivers/md/bitmap.c b/drivers/md/bitmap.c
index 8fa3277f72dc..2ef497d1848c 100644
--- a/drivers/md/bitmap.c
+++ b/drivers/md/bitmap.c
@@ -1307,6 +1307,9 @@ void bitmap_endwrite(struct bitmap *bitmap, sector_t offset, unsigned long secto
PRINTK(KERN_DEBUG "dec write-behind count %d/%d\n",
at... |
eea1bf384e05b5ab747f8530c4fba9e9e6907fff | Analyze and fix the following issue in the Linux kernel code: md: Fix is_mddev_idle test (again). | Problem Details:
There are two problems with is_mddev_idle.
1/ sync_io is 'atomic_t' and hence 'int'. curr_events and all the
rest are 'long'.
So if sync_io were to wrap on a 64bit host, the value of
curr_events would go very negative suddenly, and take a very
long time to return to positive.
So do al... | ```diff
diff --git a/drivers/md/md.c b/drivers/md/md.c
index 03b4cd0a6344..a99c50e217c0 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -5716,19 +5716,19 @@ int unregister_md_personality(struct mdk_personality *p)
return 0;
}
-static int is_mddev_idle(mddev_t *mddev)
+static int is_mddev_idle(mddev_t *mddev,... |
47e669ce10901dc92960096653d6b22990b5188f | Analyze and fix the following issue in the Linux kernel code: parisc: fix macro expansion in atomic.h | Problem Details:
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: Kyle McMartin <kyle@mcmartin.ca> | ```diff
diff --git a/arch/parisc/include/asm/atomic.h b/arch/parisc/include/asm/atomic.h
index edbfe25c5fc1..ada3e5364d82 100644
--- a/arch/parisc/include/asm/atomic.h
+++ b/arch/parisc/include/asm/atomic.h
@@ -25,7 +25,7 @@
* Since "a" is usually an address, use one spinlock per cacheline.
*/
# define ATOMIC_HAS... |
2d6d79bbe589b74c0a6612fc88e4d150f8dfa1e1 | Analyze and fix the following issue in the Linux kernel code: parisc: iosapic: fix build breakage | Problem Details:
drivers/parisc/iosapic.c:717: error: incompatible types in assignment
irq_desc::affinity was changed from cpumask_t to cpumask_var_t in
7f7ace0cda (cpumask: update irq_desc to use cpumask_var_t)
Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: Kyle McMartin <kyle@mcmartin.ca> | ```diff
diff --git a/drivers/parisc/iosapic.c b/drivers/parisc/iosapic.c
index 501aaf1f253f..73348c4047e9 100644
--- a/drivers/parisc/iosapic.c
+++ b/drivers/parisc/iosapic.c
@@ -714,7 +714,7 @@ static void iosapic_set_affinity_irq(unsigned int irq,
if (dest_cpu < 0)
return;
- irq_desc[irq].affinity = cpumask_of... |
445c088f88d63db49598390be3525252d211688f | Analyze and fix the following issue in the Linux kernel code: parisc: expose 32/64-bit capabilities in cpuinfo | Problem Details:
It'd be rather useful for debian-installer if we could get hold of
accurate firmware information on whether only 32-bit kernels are
supported, only 64-bit kernels, or both; this would allow us to present
an accurate menu of kernel packages if more than one is available,
rather than the user having to g... | ```diff
diff --git a/arch/parisc/include/asm/pdc.h b/arch/parisc/include/asm/pdc.h
index 430f1aeea0b8..a26e98dc0d41 100644
--- a/arch/parisc/include/asm/pdc.h
+++ b/arch/parisc/include/asm/pdc.h
@@ -49,6 +49,8 @@
#define PDC_MODEL_CPU_ID 6 /* returns cpu-id (only newer machines!) */
#define PDC_MODEL_CAPABILITIES 7 /... |
48d27cb2299c0b2fc4d551bddb6a1005828dc0c6 | Analyze and fix the following issue in the Linux kernel code: parisc: fix usage of 32bit PTE page table entries on 32bit kernels | Problem Details:
This patch fixes a long outstanding bug on 32bit parisc linux kernels
which prevented us from using 32bit PTE table entries (instead of 64bit
entries of which 32bit were unused).
The problem was caused by this assembler statement in the L2_ptep
macro in arch/parisc/kernel/entry.S:447:
EXTR \va,31-ASM... | ```diff
diff --git a/arch/parisc/include/asm/page.h b/arch/parisc/include/asm/page.h
index c3941f09a878..7bc5125d7d4c 100644
--- a/arch/parisc/include/asm/page.h
+++ b/arch/parisc/include/asm/page.h
@@ -36,16 +36,7 @@ void clear_user_page(void *page, unsigned long vaddr, struct page *pg);
*/
#define STRICT_MM_TYPECH... |
66f92cf9d415e96a5bdd6c64de8dd8418595d2fc | Analyze and fix the following issue in the Linux kernel code: strstarts: helper function for !strncmp(str, prefix, strlen(prefix)) | Problem Details:
Impact: minor new API
ksplice added a "starts_with" function, which seems like a common need.
When people open-code it they seem to use fixed numbers rather than strlen,
so it's quite a readability win (also, strncmp() almost always wants != 0
on it).
So here's strstarts().
Cc: Anders Kaseorg <ander... | ```diff
diff --git a/include/linux/string.h b/include/linux/string.h
index d18fc198aa2f..76ec218bb30f 100644
--- a/include/linux/string.h
+++ b/include/linux/string.h
@@ -114,5 +114,14 @@ extern bool sysfs_streq(const char *s1, const char *s2);
extern ssize_t memory_read_from_buffer(void *to, size_t count, loff_t *ppo... |
acae05156551fd7528fbb616271e672789388e3c | Analyze and fix the following issue in the Linux kernel code: module: create a request_module_nowait() | Problem Details:
There seems to be a common pattern in the kernel where drivers want to
call request_module() from inside a module_init() function. Currently
this would deadlock.
As a result, several drivers go through hoops like scheduling things via
kevent, or creating custom work queues (because kevent can deadlock... | ```diff
diff --git a/include/linux/kmod.h b/include/linux/kmod.h
index 92213a9194e1..d5fa565086d1 100644
--- a/include/linux/kmod.h
+++ b/include/linux/kmod.h
@@ -29,10 +29,15 @@
#ifdef CONFIG_MODULES
/* modprobe exit status on success, -ve on error. Return value
* usually useless though. */
-extern int request_mo... |
414fd31b2553aaf160ca9b9afe45aa0372b01b92 | Analyze and fix the following issue in the Linux kernel code: module: Make find_symbol return a struct kernel_symbol | Problem Details:
Impact: Cleanup, internal API change
Ksplice needs access to the kernel_symbol structure in order to support
modifications to the exported symbol table.
Cc: Anders Kaseorg <andersk@mit.edu>
Cc: Jeff Arnold <jbarnold@mit.edu>
Signed-off-by: Tim Abbott <tabbott@mit.edu>
Signed-off-by: Rusty Russell <ru... | ```diff
diff --git a/kernel/module.c b/kernel/module.c
index 7af72bbe4cc0..2f0fddf3c114 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -283,7 +283,7 @@ struct find_symbol_arg {
/* Output */
struct module *owner;
const unsigned long *crc;
- unsigned long value;
+ const struct kernel_symbol *sym;
};
stat... |
b10153fe31dde3805f8320b61ef147cebe379aee | Analyze and fix the following issue in the Linux kernel code: kernel/module.c: fix an unused goto label | Problem Details:
Impact: cleanup
Label 'free_init' is only used when defined(CONFIG_MODULE_UNLOAD) &&
defined(CONFIG_SMP), so move it inside to shut up gcc.
Signed-off-by: WANG Cong <xiyou.wangcong@gmail.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> | ```diff
diff --git a/kernel/module.c b/kernel/module.c
index b862fdb6a372..7af72bbe4cc0 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -2319,8 +2319,8 @@ static noinline struct module *load_module(void __user *umod,
ftrace_release(mod->module_core, mod->core_size);
free_unload:
module_unload_free(mod);
- f... |
e180a6b7759a99a28cbcce3547c4c80822cb6c2a | Analyze and fix the following issue in the Linux kernel code: param: fix charp parameters set via sysfs | Problem Details:
Impact: fix crash on reading from /sys/module/.../ieee80211_default_rc_algo
The module_param type "charp" simply sets a char * pointer in the
module to the parameter in the commandline string: this is why we keep
the (mangled) module command line around. But when set via sysfs (as
about 11 charp para... | ```diff
diff --git a/include/linux/module.h b/include/linux/module.h
index 145a75528cc1..08e5e75d6122 100644
--- a/include/linux/module.h
+++ b/include/linux/module.h
@@ -248,6 +248,10 @@ struct module
const unsigned long *crcs;
unsigned int num_syms;
+ /* Kernel parameters. */
+ struct kernel_param *kp;
+ unsign... |
0bd4781d40ffc3bff939a2540041144b99c373b8 | Analyze and fix the following issue in the Linux kernel code: sh: Fix up -Wformat-security whining. | Problem Details:
Triggers -Werror on gcc-4.3:
arch/sh/kernel/setup.c: In function 'early_parse_mem':
arch/sh/kernel/setup.c:111: error: format not a string literal and no format arguments
...
Signed-off-by: Paul Mundt <lethal@linux-sh.org> | ```diff
diff --git a/arch/sh/kernel/setup.c b/arch/sh/kernel/setup.c
index 24c60251f680..04a6004fccc4 100644
--- a/arch/sh/kernel/setup.c
+++ b/arch/sh/kernel/setup.c
@@ -103,12 +103,11 @@ static int __init early_parse_mem(char *p)
size = memparse(p, &p);
if (size > __MEMORY_SIZE) {
- static char msg[] __initdat... |
1c58b0b1a1412ceb6b25dad81bc537bf0fe6ad46 | Analyze and fix the following issue in the Linux kernel code: sh: Tidy up sh7786 pinmux table. | Problem Details:
Formatting and typo fix.
Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org> | ```diff
diff --git a/arch/sh/include/cpu-sh4/cpu/sh7786.h b/arch/sh/include/cpu-sh4/cpu/sh7786.h
index 48688adc0c84..977862f9072a 100644
--- a/arch/sh/include/cpu-sh4/cpu/sh7786.h
+++ b/arch/sh/include/cpu-sh4/cpu/sh7786.h
@@ -51,142 +51,86 @@ enum {
GPIO_PJ7, GPIO_PJ6, GPIO_PJ5, GPIO_PJ4,
GPIO_PJ3, GPIO_PJ2, GPIO_... |
93c36ed8348934b462044d2d60ab345055318933 | Analyze and fix the following issue in the Linux kernel code: dma-debug: fix printk formats (i386) | Problem Details:
Fix printk format warnings in dma-debug:
lib/dma-debug.c:645: warning: format '%016llx' expects type 'long long unsigned int', but argument 6 has type 'dma_addr_t'
lib/dma-debug.c:662: warning: format '%016llx' expects type 'long long unsigned int', but argument 6 has type 'dma_addr_t'
lib/dma-d... | ```diff
diff --git a/lib/dma-debug.c b/lib/dma-debug.c
index 1a992089486c..d3da7edc034f 100644
--- a/lib/dma-debug.c
+++ b/lib/dma-debug.c
@@ -648,7 +648,7 @@ static void check_sync(struct device *dev, dma_addr_t addr,
err_printk(dev, NULL, "DMA-API: device driver tries "
"to sync DMA memory it has not allocate... |
77e465867080c2d1e0c410e96dcdcd51e8584a6f | Analyze and fix the following issue in the Linux kernel code: reiserfs: fix build breakage | Problem Details:
Fix this build error when REISERFS_FS_POSIX_ACL is not set:
fs/reiserfs/inode.c: In function 'reiserfs_new_inode':
fs/reiserfs/inode.c:1919: warning: passing argument 1 of 'reiserfs_inherit_default_acl' from incompatible pointer type
fs/reiserfs/inode.c:1919: warning: passing argument 2 of 'reis... | ```diff
diff --git a/include/linux/reiserfs_acl.h b/include/linux/reiserfs_acl.h
index 52240e02de02..8cc65757e47a 100644
--- a/include/linux/reiserfs_acl.h
+++ b/include/linux/reiserfs_acl.h
@@ -80,7 +80,8 @@ static inline int reiserfs_acl_chmod(struct inode *inode)
}
static inline int
-reiserfs_inherit_default_acl... |
2f8501815256af8498904e68bd0984b1afffd6f8 | Analyze and fix the following issue in the Linux kernel code: lockdep: fix deadlock in lockdep_trace_alloc | Problem Details:
Heiko reported that we grab the graph lock with irqs enabled.
Fix this by providng the same wrapper as all other lockdep entry
functions have.
Reported-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Nick Piggin <npiggin@suse.de>
LKML-Referenc... | ```diff
diff --git a/kernel/lockdep.c b/kernel/lockdep.c
index 022d2ed7fd8b..3673a3f44d9d 100644
--- a/kernel/lockdep.c
+++ b/kernel/lockdep.c
@@ -2260,7 +2260,7 @@ void trace_softirqs_off(unsigned long ip)
debug_atomic_inc(&redundant_softirqs_off);
}
-void lockdep_trace_alloc(gfp_t gfp_mask)
+static void __lockd... |
3dec7f59c370c7b58184d63293c3dc984d475840 | Analyze and fix the following issue in the Linux kernel code: proc 1/2: do PDE usecounting even for ->read_proc, ->write_proc | Problem Details:
struct proc_dir_entry::owner is going to be removed. Now it's only necessary
to protect PDEs which are using ->read_proc, ->write_proc hooks.
However, ->owner assignments are racy and make it very easy for someone to switch
->owner on live PDE (as some subsystems do) without fixing refcounts and so on... | ```diff
diff --git a/fs/proc/generic.c b/fs/proc/generic.c
index 8c68bbe2b61e..fa678abc9db1 100644
--- a/fs/proc/generic.c
+++ b/fs/proc/generic.c
@@ -37,7 +37,7 @@ static int proc_match(int len, const char *name, struct proc_dir_entry *de)
#define PROC_BLOCK_SIZE (PAGE_SIZE - 1024)
static ssize_t
-proc_file_read(s... |
09729a9919fdaf137995b0f19cbd401e22229cac | Analyze and fix the following issue in the Linux kernel code: proc: fix sparse warnings in pagemap_read() | Problem Details:
fs/proc/task_mmu.c:696:12: warning: cast removes address space of expression
fs/proc/task_mmu.c:696:9: warning: incorrect type in assignment (different address spaces)
fs/proc/task_mmu.c:696:9: expected unsigned long long [noderef] [usertype] <asn:1>*out
fs/proc/task_mmu.c:696:9: got unsigned lon... | ```diff
diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
index 94063840832a..b0ae0be4801f 100644
--- a/fs/proc/task_mmu.c
+++ b/fs/proc/task_mmu.c
@@ -693,8 +693,8 @@ static ssize_t pagemap_read(struct file *file, char __user *buf,
goto out_pages;
}
- pm.out = (u64 *)buf;
- pm.end = (u64 *)(buf + count);
+ p... |
19cefdffbfe0f7e280f21e80875937e8700e99e2 | Analyze and fix the following issue in the Linux kernel code: lockdep: annotate reclaim context (__GFP_NOFS), fix SLOB | Problem Details:
Impact: build fix
fix typo in mm/slob.c:
mm/slob.c:469: error: ‘flags’ undeclared (first use in this function)
mm/slob.c:469: error: (Each undeclared identifier is reported only once
mm/slob.c:469: error: for each function it appears in.)
Cc: Nick Piggin <npiggin@suse.de>
Cc: Peter Zijlstra <a.p.... | ```diff
diff --git a/mm/slob.c b/mm/slob.c
index 1264799df5d1..4b1c0c1d63cb 100644
--- a/mm/slob.c
+++ b/mm/slob.c
@@ -464,7 +464,7 @@ void *__kmalloc_node(size_t size, gfp_t gfp, int node)
unsigned int *m;
int align = max(ARCH_KMALLOC_MINALIGN, ARCH_SLAB_MINALIGN);
- lockdep_trace_alloc(flags);
+ lockdep_trace_a... |
0e5dd46b761195356065a30611f265adec286d0d | Analyze and fix the following issue in the Linux kernel code: PCI PM: Introduce __pci_[start|complete]_power_transition() (rev. 2) | Problem Details:
The radeonfb driver needs to program the device's PMCSR directly due
to some quirky hardware it has to handle (see
http://bugzilla.kernel.org/show_bug.cgi?id=12846 for details) and
after doing that it needs to call the platform (usually ACPI) to
finish the power transition of the device. Currently it ... | ```diff
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index 979ceb1d37e8..de54fd643baf 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -539,6 +539,53 @@ void pci_update_current_state(struct pci_dev *dev, pci_power_t state)
}
}
+/**
+ * pci_platform_power_transition - Use platform to change device po... |
46939f8b15e44f065d052e89ea4f2adc81fdc740 | Analyze and fix the following issue in the Linux kernel code: PCI PM: Put devices into low power states during late suspend (rev. 2) | Problem Details:
Once we have allowed timer interrupts to be enabled during the late
phase of suspending devices, we are now able to use the generic
pci_set_power_state() to put PCI devices into low power states at
that time. We can also use some related platform callbacks, like the
ones preparing devices for wake-up,... | ```diff
diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c
index 8395206d1aee..3c1831c82f5b 100644
--- a/drivers/pci/pci-driver.c
+++ b/drivers/pci/pci-driver.c
@@ -352,53 +352,60 @@ static int pci_legacy_suspend(struct device *dev, pm_message_t state)
{
struct pci_dev * pci_dev = to_pci_dev(dev);
st... |
4aecd6718939eb3c4145b248369b65f7483a8a02 | Analyze and fix the following issue in the Linux kernel code: PM: Change hibernation code ordering | Problem Details:
Change the ordering of the hibernation core code so that the platform
"prepare" callbacks are executed and the nonboot CPUs are disabled
after calling device drivers' "late suspend" methods.
This change (along with the previous analogous change of the suspend
core code) will allow us to rework the PCI... | ```diff
diff --git a/kernel/power/disk.c b/kernel/power/disk.c
index 320bb0949bdf..e886d1332a10 100644
--- a/kernel/power/disk.c
+++ b/kernel/power/disk.c
@@ -228,13 +228,22 @@ static int create_image(int platform_mode)
goto Unlock;
}
+ error = platform_pre_snapshot(platform_mode);
+ if (error || hibernation_tes... |
900af0d973856d6feb6fc088c2d0d3fde57707d3 | Analyze and fix the following issue in the Linux kernel code: PM: Change suspend code ordering | Problem Details:
Change the ordering of the suspend core code so that the platform
"prepare" callback is executed and the nonboot CPUs are disabled
after calling device drivers' "late suspend" methods.
This change will allow us to rework the PCI PM core so that the power
state of devices is changed in the "late" phase... | ```diff
diff --git a/kernel/power/main.c b/kernel/power/main.c
index f0a466736c01..f172f41858bb 100644
--- a/kernel/power/main.c
+++ b/kernel/power/main.c
@@ -297,6 +297,19 @@ static int suspend_enter(suspend_state_t state)
goto Done;
}
+ if (suspend_ops->prepare) {
+ error = suspend_ops->prepare();
+ if (erro... |
b6a33fe2cc1b44851174967943fe5989f7e0550f | Analyze and fix the following issue in the Linux kernel code: hwmon: (hdaps) Fix Thinkpad X41 axis inversion | Problem Details:
Fix for kernel.org bug #7154: hdaps inversion of actual Thinkpad
X41's Y-axis.
Signed-off-by: Frank Seidel <frank@f-seidel.de>
Signed-off-by: Jean Delvare <khali@linux-fr.org> | ```diff
diff --git a/drivers/hwmon/hdaps.c b/drivers/hwmon/hdaps.c
index dd058e06e344..d3612a1f1981 100644
--- a/drivers/hwmon/hdaps.c
+++ b/drivers/hwmon/hdaps.c
@@ -527,7 +527,7 @@ static struct dmi_system_id __initdata hdaps_whitelist[] = {
HDAPS_DMI_MATCH_INVERT("LENOVO", "ThinkPad T61p", HDAPS_BOTH_AXES),
HDAP... |
2b8cf3e8c0638687a7a28a7517e673f855623e3b | Analyze and fix the following issue in the Linux kernel code: hwmon: (hdaps) Allow inversion of separate axis | Problem Details:
Fix for kernel.org bug #7154: hdaps inversion of each axis. This
version is based on the work from Michael Ruoss <miruoss@student.ethz.ch>.
Signed-off-by: Frank Seidel <frank@f-seidel.de>
Signed-off-by: Jean Delvare <khali@linux-fr.org> | ```diff
diff --git a/drivers/hwmon/hdaps.c b/drivers/hwmon/hdaps.c
index a4d92d246d52..dd058e06e344 100644
--- a/drivers/hwmon/hdaps.c
+++ b/drivers/hwmon/hdaps.c
@@ -65,6 +65,10 @@
#define HDAPS_INPUT_FUZZ 4 /* input event threshold */
#define HDAPS_INPUT_FLAT 4
+#define HDAPS_X_AXIS (1 << 0)
+#define HDAPS_Y_AXI... |
594592dc6f68356a3b7278eb4d260a50a66f0a06 | Analyze and fix the following issue in the Linux kernel code: hwmon: (ds1621) Clean up register access | Problem Details:
Fix a few oddities in how the ds1621 driver accesses the registers:
* We don't need a wrapper to access the configuration register.
* Check for error before calling swab16. Error checking isn't
complete yet, but that's a start.
* Device-specific read functions should never be called during
detectio... | ```diff
diff --git a/drivers/hwmon/ds1621.c b/drivers/hwmon/ds1621.c
index e688798e115f..fe160c54b959 100644
--- a/drivers/hwmon/ds1621.c
+++ b/drivers/hwmon/ds1621.c
@@ -81,28 +81,27 @@ struct ds1621_data {
u8 conf; /* Register encoding, combined */
};
-/* All registers are word-sized, except for the configurat... |
0ab2621ebd9a28bf7a524ecd50d492a10579dfcc | Analyze and fix the following issue in the Linux kernel code: reiserfs: journaled xattrs | Problem Details:
Deadlocks are possible in the xattr code between the journal lock and the
xattr sems.
This patch implements journalling for xattr operations. The benefit is
twofold:
* It gets rid of the deadlock possibility by always ensuring that xattr
write operations are initiated inside a transaction.
* It c... | ```diff
diff --git a/fs/reiserfs/inode.c b/fs/reiserfs/inode.c
index 50a73e7afdc8..995f6975cae1 100644
--- a/fs/reiserfs/inode.c
+++ b/fs/reiserfs/inode.c
@@ -1914,9 +1914,8 @@ int reiserfs_new_inode(struct reiserfs_transaction_handle *th,
goto out_inserted_sd;
}
- /* XXX CHECK THIS */
if (reiserfs_posixacl(in... |
fd7cb031efb1dd71cb731668e2f597d9e61acdcb | Analyze and fix the following issue in the Linux kernel code: reiserfs: eliminate reiserfs_warning from uniqueness functions | Problem Details:
uniqueness2type and type2uniquness issue a warning when the value is
unknown. When called from reiserfs_warning, this causes a re-entrancy
problem and deadlocks on the error buffer lock.
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | ```diff
diff --git a/include/linux/reiserfs_fs.h b/include/linux/reiserfs_fs.h
index 056e2a3b04e3..cf5407ee0f32 100644
--- a/include/linux/reiserfs_fs.h
+++ b/include/linux/reiserfs_fs.h
@@ -560,10 +560,8 @@ static inline int uniqueness2type(__u32 uniqueness)
return TYPE_DIRECT;
case V1_DIRENTRY_UNIQUENESS:
ret... |
cacbe3d7ad3c0a345ca1ce7bf1ecb4c5bfe54d7b | Analyze and fix the following issue in the Linux kernel code: reiserfs: prepare_error_buf wrongly consumes va_arg | Problem Details:
vsprintf will consume varargs on its own. Skipping them manually
results in garbage in the error buffer, or Oopses in the case of
pointers.
This patch removes the advancement and fixes a number of bugs where
crashes were observed as side effects of a regular error report.
Signed-off-by: Jeff Mahoney ... | ```diff
diff --git a/fs/reiserfs/prints.c b/fs/reiserfs/prints.c
index 50ed4bd3ef63..b87b23717c23 100644
--- a/fs/reiserfs/prints.c
+++ b/fs/reiserfs/prints.c
@@ -157,19 +157,16 @@ static void sprintf_disk_child(char *buf, struct disk_child *dc)
dc_size(dc));
}
-static char *is_there_reiserfs_struct(char *fmt, in... |
600ed41675d8c384519d8f0b3c76afed39ef2f4b | Analyze and fix the following issue in the Linux kernel code: reiserfs: audit transaction ids to always be unsigned ints | Problem Details:
This patch fixes up the reiserfs code such that transaction ids are
always unsigned ints. In places they can currently be signed ints or
unsigned longs.
The former just causes an annoying clm-2200 warning and may join a
transaction when it should wait.
The latter is just for correctness since the di... | ```diff
diff --git a/fs/reiserfs/journal.c b/fs/reiserfs/journal.c
index 9643c3bbeb3b..677bb926e7d6 100644
--- a/fs/reiserfs/journal.c
+++ b/fs/reiserfs/journal.c
@@ -574,7 +574,7 @@ static inline void put_journal_list(struct super_block *s,
struct reiserfs_journal_list *jl)
{
if (jl->j_refcount < 1) {
- r... |
eeafda70bf2807544e96fa4e52b2433cd470ff46 | Analyze and fix the following issue in the Linux kernel code: PCI: fix HT MSI mapping fix | Problem Details:
Impact: fix bug
This patch reworks the nv_msi_ht_cap_quirk() and will only try to avoid
to enable ht_msi on device following that root dev, and don't touch that
root dev, but only do that trick with end_device on the chain.
Reported-by: Prakash Punnoor <prakash@punnoor.de>
Tested-by: Prakash Punnoor ... | ```diff
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index faf02dd00015..9b2f0d96900d 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -2206,6 +2206,33 @@ static int __devinit host_bridge_with_leaf(struct pci_dev *host_bridge)
return found;
}
+#define PCI_HT_CAP_SLAVE_CTRL0 4 /* l... |
25c1a411e8a0a709abe3449866125dc290711ea8 | Analyze and fix the following issue in the Linux kernel code: x86: fix mismerge in arch/x86/include/asm/timer.h | Problem Details:
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | ```diff
diff --git a/arch/x86/include/asm/timer.h b/arch/x86/include/asm/timer.h
index a81195eaa2b3..bd37ed444a21 100644
--- a/arch/x86/include/asm/timer.h
+++ b/arch/x86/include/asm/timer.h
@@ -12,9 +12,9 @@ unsigned long native_calibrate_tsc(void);
#ifdef CONFIG_X86_32
extern int timer_ack;
-extern int recalibrat... |
0a4666b539a0e896ec4e8396a034a479e3573125 | Analyze and fix the following issue in the Linux kernel code: xen/dev-evtchn: clean up locking in evtchn | Problem Details:
Define a new per_user_data mutex to serialize bind/unbind operations
to prevent them from racing with each other. Fix error returns
and don't do a bind while holding a spinlock.
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> | ```diff
diff --git a/drivers/xen/evtchn.c b/drivers/xen/evtchn.c
index 517b9ee63e18..af031950f9b1 100644
--- a/drivers/xen/evtchn.c
+++ b/drivers/xen/evtchn.c
@@ -54,6 +54,8 @@
#include <asm/xen/hypervisor.h>
struct per_user_data {
+ struct mutex bind_mutex; /* serialize bind/unbind operations */
+
/* Notificatio... |
1e6fcf840e11ceff8a656a678c6e4b0560a98e08 | Analyze and fix the following issue in the Linux kernel code: xen: resume interrupts before system devices. | Problem Details:
Impact: bugfix Xen domain restore
Otherwise the first timer interrupt after resume is missed and we never
get another.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> | ```diff
diff --git a/drivers/xen/manage.c b/drivers/xen/manage.c
index 3ccd348d112d..b703dd2c9f11 100644
--- a/drivers/xen/manage.c
+++ b/drivers/xen/manage.c
@@ -68,15 +68,15 @@ static int xen_suspend(void *data)
gnttab_resume();
xen_mm_unpin_all();
- sysdev_resume();
- device_power_up(PMSG_RESUME);
-
if (!*ca... |
8de07bbdede03598801cf33ab23dcbcd28a918d2 | Analyze and fix the following issue in the Linux kernel code: xen/mmu: weaken flush_tlb_other test | Problem Details:
Impact: fixes crashing bug
There's no particular problem with getting an empty cpu mask,
so just shortcut-return if we get one.
Avoids crash reported by Christophe Saout <christophe@saout.de>
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> | ```diff
diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c
index df87c803cecc..e425a32e0a90 100644
--- a/arch/x86/xen/mmu.c
+++ b/arch/x86/xen/mmu.c
@@ -1293,8 +1293,8 @@ static void xen_flush_tlb_others(const struct cpumask *cpus,
} *args;
struct multicall_space mcs;
- BUG_ON(cpumask_empty(cpus));
- BUG_ON(!mm... |
e9e2d1ffcfdb38bed11a3064aa74bea9ee38ed80 | Analyze and fix the following issue in the Linux kernel code: NULL noise: arch/x86/xen/smp.c | Problem Details:
Fix this sparse warnings:
arch/x86/xen/smp.c:316:52: warning: Using plain integer as NULL pointer
arch/x86/xen/smp.c:421:60: warning: Using plain integer as NULL pointer
Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> | ```diff
diff --git a/arch/x86/xen/smp.c b/arch/x86/xen/smp.c
index 8d470562ffc9..304d832710cd 100644
--- a/arch/x86/xen/smp.c
+++ b/arch/x86/xen/smp.c
@@ -317,7 +317,7 @@ static int __cpuinit xen_cpu_up(unsigned int cpu)
BUG_ON(rc);
while(per_cpu(cpu_state, cpu) != CPU_ONLINE) {
- HYPERVISOR_sched_op(SCHEDOP_yie... |
b4b7e58590d0e94ed78bd6be1aa163caba7b6c74 | Analyze and fix the following issue in the Linux kernel code: xen: remove xen_load_gdt debug | Problem Details:
Don't need the noise.
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> | ```diff
diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c
index 48b399bd6e0d..75b7a0f90380 100644
--- a/arch/x86/xen/enlighten.c
+++ b/arch/x86/xen/enlighten.c
@@ -310,9 +310,6 @@ static void xen_load_gdt(const struct desc_ptr *dtr)
frames[f] = mfn;
- printk("xen_load_gdt: %d va=%p mfn=%lx pfn=%l... |
7c4673335b5f0508a47763840d7f2403fa6d2773 | Analyze and fix the following issue in the Linux kernel code: V4L/DVB (11315): cx25840: fix 'unused variable' warning. | Problem Details:
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com> | ```diff
diff --git a/drivers/media/video/cx25840/cx25840-core.c b/drivers/media/video/cx25840/cx25840-core.c
index ec67aea0cdb8..737ee4ea8830 100644
--- a/drivers/media/video/cx25840/cx25840-core.c
+++ b/drivers/media/video/cx25840/cx25840-core.c
@@ -824,8 +824,6 @@ static int cx25840_g_ctrl(struct v4l2_subdev *sd, str... |
b8341e1d2acadf3935fb299a325f569a1c20daa6 | Analyze and fix the following issue in the Linux kernel code: V4L/DVB (11300): cx88: convert to v4l2_subdev. | Problem Details:
Convert cx88 to use v4l2_subdev since the old i2c autoprobing mechanism
will be removed.
Added code to explicitly load tvaudio where needed. Also fix the rtc-isl1208
support: since that driver no longer supports autoprobing it has to be
loaded using the new i2c API.
Signed-off-by: Hans Verkuil <hverk... | ```diff
diff --git a/drivers/media/video/cx88/cx88-blackbird.c b/drivers/media/video/cx88/cx88-blackbird.c
index 484df549345c..44eacfb0d0d6 100644
--- a/drivers/media/video/cx88/cx88-blackbird.c
+++ b/drivers/media/video/cx88/cx88-blackbird.c
@@ -915,7 +915,7 @@ static int vidioc_log_status (struct file *file, void *pr... |
d35ed62704bc1d44dd4746a242e8c09f2a48fc40 | Analyze and fix the following issue in the Linux kernel code: V4L/DVB (11296): cx23885: bugfix error message if firmware is not found | Problem Details:
If the firmware failed to be found the error message indicated
the incorrect filename.
Signed-off-by: Steven Toth <stoth@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com> | ```diff
diff --git a/drivers/media/video/cx23885/cx23885-417.c b/drivers/media/video/cx23885/cx23885-417.c
index b02944d38932..9e57c33b5496 100644
--- a/drivers/media/video/cx23885/cx23885-417.c
+++ b/drivers/media/video/cx23885/cx23885-417.c
@@ -896,7 +896,7 @@ static int cx23885_load_firmware(struct cx23885_dev *dev)... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.