id stringlengths 40 40 | instruction stringlengths 68 308 | input stringlengths 17 33.4k | output stringlengths 100 30k |
|---|---|---|---|
caecd0af8fe0635e8e6900399b951433af35bf52 | Analyze and fix the following issue in the Linux kernel code: ext4: replace plain integer with NULL in super.c | Problem Details:
Fixes the following sparse warning:
fs/ext4/super.c:1672:45: warning: Using plain integer as NULL pointer
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> | ```diff
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index bae4124e1473..b875ff555865 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -1673,7 +1673,7 @@ static int parse_options(char *options, struct super_block *sb,
* Initialize args struct so we know whether arg was
* found; some options take optional... |
64f503076f9921fc714a2c79fb0fa520869d2c08 | Analyze and fix the following issue in the Linux kernel code: sections: Fix section conflicts in drivers/hwmon | Problem Details:
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net> | ```diff
diff --git a/drivers/hwmon/coretemp.c b/drivers/hwmon/coretemp.c
index faa16f80db9c..0fa356fe82cc 100644
--- a/drivers/hwmon/coretemp.c
+++ b/drivers/hwmon/coretemp.c
@@ -196,7 +196,7 @@ struct tjmax {
int tjmax;
};
-static struct tjmax __cpuinitconst tjmax_table[] = {
+static const struct tjmax __cpuinitc... |
515c7af85ed92696c311c53d53cb4898ff32d784 | Analyze and fix the following issue in the Linux kernel code: x32: Use compat shims for {g,s}etsockopt | Problem Details:
Some of the arguments to {g,s}etsockopt are passed in userland pointers.
If we try to use the 64bit entry point, we end up sometimes failing.
For example, dhcpcd doesn't run in x32:
# dhcpcd eth0
dhcpcd[1979]: version 5.5.6 starting
dhcpcd[1979]: eth0: broadcasting for a lease
dhcpcd[1979]: eth0: ... | ```diff
diff --git a/arch/x86/syscalls/syscall_64.tbl b/arch/x86/syscalls/syscall_64.tbl
index 29aed7ac2c02..a582bfed95bb 100644
--- a/arch/x86/syscalls/syscall_64.tbl
+++ b/arch/x86/syscalls/syscall_64.tbl
@@ -60,8 +60,8 @@
51 common getsockname sys_getsockname
52 common getpeername sys_getpeername
53 common sock... |
ab5625c30a0a3c8a8491b641c939575c84bc0dbb | Analyze and fix the following issue in the Linux kernel code: i2c: diolan-u2c: Fix master_xfer return code | Problem Details:
The master_xfer function returns 0 on success. It should return the number of
successful transactions.
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> | ```diff
diff --git a/drivers/i2c/busses/i2c-diolan-u2c.c b/drivers/i2c/busses/i2c-diolan-u2c.c
index aedb94f34bf7..dae3ddfe7619 100644
--- a/drivers/i2c/busses/i2c-diolan-u2c.c
+++ b/drivers/i2c/busses/i2c-diolan-u2c.c
@@ -405,6 +405,7 @@ static int diolan_usb_xfer(struct i2c_adapter *adapter, struct i2c_msg *msgs,
... |
33ec5e818b7b0d0d02864a9586050c6f9a6a8b98 | Analyze and fix the following issue in the Linux kernel code: I2C: OMAP: xfer: fix runtime PM get/put balance on error | Problem Details:
In omap_i2c_xfer(), ensure pm_runtime_put() is called, even on
failure.
Without this, after a failed xfer, the runtime PM usecount will have
been incremented, but not decremented causing the usecount to never
reach zero after a failure. This keeps the device always runtime PM
enabled which keeps the ... | ```diff
diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
index 6849635b268a..5d19a49803c1 100644
--- a/drivers/i2c/busses/i2c-omap.c
+++ b/drivers/i2c/busses/i2c-omap.c
@@ -584,7 +584,7 @@ omap_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[], int num)
r = pm_runtime_get_sync(dev->... |
99f347caa4568cb803862730b3b1f1942639523f | Analyze and fix the following issue in the Linux kernel code: USB: CDC ACM: Fix NULL pointer dereference | Problem Details:
If a device specifies zero endpoints in its interface descriptor,
the kernel oopses in acm_probe(). Even though that's clearly an
invalid descriptor, we should test wether we have all endpoints.
This is especially bad as this oops can be triggered by just
plugging a USB device in.
Signed-off-by: Sven ... | ```diff
diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c
index 56d6bf668488..f763ed7ba91e 100644
--- a/drivers/usb/class/cdc-acm.c
+++ b/drivers/usb/class/cdc-acm.c
@@ -1104,7 +1104,8 @@ skip_normal_probe:
}
- if (data_interface->cur_altsetting->desc.bNumEndpoints < 2)
+ if (data_interface->... |
74f4cf290918f05b6489aa732dfb08aa5606b9d6 | Analyze and fix the following issue in the Linux kernel code: target: Fix regression bug with handling of zero-length data CDBs | Problem Details:
This patch fixes a regression bug with the handling of zero-length
data CDBs within transport_generic_new_cmd() code. The bug was introduced
with the following commit as part of the single task conversion work:
commit 4101f0a89d4eb13f04cb0344d59a335b862ca5f9
Author: Christoph Hellwig <hch@infrade... | ```diff
diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c
index a7589ccdb6f3..ea9a3d2e4f55 100644
--- a/drivers/target/target_core_transport.c
+++ b/drivers/target/target_core_transport.c
@@ -2323,9 +2323,12 @@ int transport_generic_new_cmd(struct se_cmd *cmd)
if (ret < 0)
... |
e0ee778528bbaad28a5c69d2e219269a3a096607 | Analyze and fix the following issue in the Linux kernel code: md/raid10: fix problem with on-stack allocation of r10bio structure. | Problem Details:
A 'struct r10bio' has an array of per-copy information at the end.
This array is declared with size [0] and r10bio_pool_alloc allocates
enough extra space to store the per-copy information depending on the
number of copies needed.
So declaring a 'struct r10bio on the stack isn't going to work. It
won... | ```diff
diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c
index de5ed6fd8806..1c2eb38f3c51 100644
--- a/drivers/md/raid10.c
+++ b/drivers/md/raid10.c
@@ -659,7 +659,11 @@ static int raid10_mergeable_bvec(struct request_queue *q,
max = biovec->bv_len;
if (mddev->merge_check_needed) {
- struct r10bio r10_bio... |
6887237cd7da904184dab2750504040c68f3a080 | Analyze and fix the following issue in the Linux kernel code: spi/pl022: fix spi-pl022 pm enable at probe | Problem Details:
amba drivers does not need to enable pm runtime at probe.
amba_probe already enables pm runtime.
This rids this warning in the ux500 boot log:
ssp-pl022 ssp0: Unbalanced pm_runtime_enable!
Signed-off-by: Michel JAOUEN <michel.jaouen@stericsson.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.o... | ```diff
diff --git a/drivers/spi/spi-pl022.c b/drivers/spi/spi-pl022.c
index aab518ec2bbc..6abbe23c39b4 100644
--- a/drivers/spi/spi-pl022.c
+++ b/drivers/spi/spi-pl022.c
@@ -2053,7 +2053,6 @@ pl022_probe(struct amba_device *adev, const struct amba_id *id)
printk(KERN_INFO "pl022: mapped registers from 0x%08x to %p\n... |
28c42c28309244d0b15d1b385e33429d59997679 | Analyze and fix the following issue in the Linux kernel code: ASoC: wm9712: Fix inverted capture volume | Problem Details:
The capture volume increases with the register value so it shouldn't be
flagged as inverted.
Reported-by: Christoph Fritz <chf.fritz@googlemail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> | ```diff
diff --git a/sound/soc/codecs/wm9712.c b/sound/soc/codecs/wm9712.c
index fd74b8843d34..c6d2076a796b 100644
--- a/sound/soc/codecs/wm9712.c
+++ b/sound/soc/codecs/wm9712.c
@@ -148,7 +148,7 @@ SOC_SINGLE("Treble Volume", AC97_MASTER_TONE, 0, 15, 1),
SOC_SINGLE("Capture ADC Switch", AC97_REC_GAIN, 15, 1, 1),
S... |
ccf795847a38235ee4a56a24129ce75147d6ba8f | Analyze and fix the following issue in the Linux kernel code: ASoC: wm9712: Fix microphone source selection | Problem Details:
Currently the microphone input source is not selectable as while there is
a DAPM widget it's not connected to anything so it won't be properly
instantiated. Add something more correct for the input structure to get
things going, even though it's not hooked into the rest of the routing
map and so won't ... | ```diff
diff --git a/sound/soc/codecs/wm9712.c b/sound/soc/codecs/wm9712.c
index f16fb361a4eb..fd74b8843d34 100644
--- a/sound/soc/codecs/wm9712.c
+++ b/sound/soc/codecs/wm9712.c
@@ -272,7 +272,7 @@ SOC_DAPM_ENUM("Route", wm9712_enum[9]);
/* Mic select */
static const struct snd_kcontrol_new wm9712_mic_src_controls... |
f94f0f103c440f1dbe5d89a28c92fd1a9bdf7012 | Analyze and fix the following issue in the Linux kernel code: apple-gmux: Fix kconfig dependencies | Problem Details:
Fix the dependencies of apple-gmux to prevent it from being built-in
when one or more of its dependencies is built as a module. Otherwise it
can fail to build due to missing symbols.
v2: Add dependency on ACPI to fix build failure when ACPI=n
Reported-by: Arun Raghavan <arun.raghavan@collabora.co.uk>... | ```diff
diff --git a/drivers/platform/x86/Kconfig b/drivers/platform/x86/Kconfig
index 2a262f5c5c0c..637074d89790 100644
--- a/drivers/platform/x86/Kconfig
+++ b/drivers/platform/x86/Kconfig
@@ -758,8 +758,11 @@ config SAMSUNG_Q10
config APPLE_GMUX
tristate "Apple Gmux Driver"
+ depends on ACPI
depends on PNP
- ... |
9f6f955ae4994dd4ad5513a0d959468763a45fa5 | Analyze and fix the following issue in the Linux kernel code: apple_gmux: Fix ACPI video unregister | Problem Details:
We were only calling acpi_video_unregister() if ACPI video support was built
in, not if it was a module.
Signed-off-by: Matthew Garrett <mjg@redhat.com> | ```diff
diff --git a/drivers/platform/x86/apple-gmux.c b/drivers/platform/x86/apple-gmux.c
index 0d140e1879e7..85e1bfbd1121 100644
--- a/drivers/platform/x86/apple-gmux.c
+++ b/drivers/platform/x86/apple-gmux.c
@@ -348,7 +348,7 @@ static int __devinit gmux_probe(struct pnp_dev *pnp,
* Disable the other backlight cho... |
60916a9382e88fbf5e54fd36a3e658efd7ab7bed | Analyze and fix the following issue in the Linux kernel code: tracing/syscalls: Fix perf syscall tracing when syscall_nr == -1 | Problem Details:
syscall_get_nr can return -1 in the case that the task is not executing
a system call.
This patch fixes perf_syscall_{enter,exit} to check that the syscall
number is valid before using it as an index into a bitmap.
Link: http://lkml.kernel.org/r/1345137254-7377-1-git-send-email-will.deacon@arm.com
C... | ```diff
diff --git a/kernel/trace/trace_syscalls.c b/kernel/trace/trace_syscalls.c
index 60e4d7875672..6b245f64c8dd 100644
--- a/kernel/trace/trace_syscalls.c
+++ b/kernel/trace/trace_syscalls.c
@@ -506,6 +506,8 @@ static void perf_syscall_enter(void *ignore, struct pt_regs *regs, long id)
int size;
syscall_nr = ... |
a938da0682c2487f6aafc9a7c3caa8d675acdb38 | Analyze and fix the following issue in the Linux kernel code: PM / Sleep: Print name of wakeup source that aborts suspend | Problem Details:
A driver or app may repeatedly request a wakeup source while the system
is attempting to enter suspend, which may indicate a bug or at least
point out a highly active system component that is responsible for
decreased battery life on a mobile device. Even when the incidence
of suspend abort is not sev... | ```diff
diff --git a/drivers/base/power/wakeup.c b/drivers/base/power/wakeup.c
index cbb463b3a750..8a0a9ca6ad65 100644
--- a/drivers/base/power/wakeup.c
+++ b/drivers/base/power/wakeup.c
@@ -649,6 +649,31 @@ void pm_wakeup_event(struct device *dev, unsigned int msec)
}
EXPORT_SYMBOL_GPL(pm_wakeup_event);
+static vo... |
5fbbb90dfdedb9a258550e4e5debd3013266372e | Analyze and fix the following issue in the Linux kernel code: cpuidle: Prevent null pointer dereference in cpuidle_coupled_cpu_notify | Problem Details:
When a kernel is built to support multiple hardware types it's possible
that CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED is set but the hardware the
kernel is run on doesn't support cpuidle and therefore doesn't load a
driver for it. In this case, when the system is shut down,
cpuidle_coupled_cpu_notify() gets ... | ```diff
diff --git a/drivers/cpuidle/coupled.c b/drivers/cpuidle/coupled.c
index c24dda03c143..3265844839bf 100644
--- a/drivers/cpuidle/coupled.c
+++ b/drivers/cpuidle/coupled.c
@@ -693,7 +693,7 @@ static int cpuidle_coupled_cpu_notify(struct notifier_block *nb,
mutex_lock(&cpuidle_lock);
dev = per_cpu(cpuidle_d... |
63c6ba4352009a5f85b32307c001abeb5baebd28 | Analyze and fix the following issue in the Linux kernel code: cpuidle: coupled: fix sleeping while atomic in cpu notifier | Problem Details:
The cpu hotplug notifier gets called in both atomic and non-atomic
contexts, it is not always safe to lock a mutex. Filter out all events
except the six necessary ones, which are all sleepable, before taking
the mutex.
Signed-off-by: Colin Cross <ccross@android.com>
Reviewed-by: Srivatsa S. Bhat <sri... | ```diff
diff --git a/drivers/cpuidle/coupled.c b/drivers/cpuidle/coupled.c
index 2c9bf2692232..c24dda03c143 100644
--- a/drivers/cpuidle/coupled.c
+++ b/drivers/cpuidle/coupled.c
@@ -678,6 +678,18 @@ static int cpuidle_coupled_cpu_notify(struct notifier_block *nb,
int cpu = (unsigned long)hcpu;
struct cpuidle_devic... |
7f321c26c04807834fef4c524d2b21573423fc74 | Analyze and fix the following issue in the Linux kernel code: PM / Runtime: Fix rpm_resume() return value for power.no_callbacks set | Problem Details:
For devices whose power.no_callbacks flag is set, rpm_resume()
should return 1 if the device's parent is already active, so that
the callers of pm_runtime_get() don't think that they have to wait
for the device to resume (asynchronously) in that case (the core
won't queue up an asynchronous resume in t... | ```diff
diff --git a/drivers/base/power/runtime.c b/drivers/base/power/runtime.c
index 59894873a3b3..9891a8559203 100644
--- a/drivers/base/power/runtime.c
+++ b/drivers/base/power/runtime.c
@@ -584,6 +584,7 @@ static int rpm_resume(struct device *dev, int rpmflags)
|| dev->parent->power.runtime_status == RPM_AC... |
834009170986f295c5eca37c76c59f1b28670d69 | Analyze and fix the following issue in the Linux kernel code: [libata] acpi: call ata_acpi_gtm during ata port init time | Problem Details:
Commit 30dcf76acc695cbd2fa919e294670fe9552e16e7 mistakenly dropped
the code to get an initial gtm for the IDE channel. This caused the
following problem for Sergei:
http://marc.info/?l=linux-kernel&m=134484963618457&w=2
Fix this by adding the call back in ata_acpi_bind_host, and due to
this, the ata_a... | ```diff
diff --git a/drivers/ata/libata-acpi.c b/drivers/ata/libata-acpi.c
index 902b5a457170..fd9ecf74e631 100644
--- a/drivers/ata/libata-acpi.c
+++ b/drivers/ata/libata-acpi.c
@@ -60,17 +60,7 @@ acpi_handle ata_ap_acpi_handle(struct ata_port *ap)
if (ap->flags & ATA_FLAG_ACPI_SATA)
return NULL;
- /*
- * If a... |
ae0c514cce96fa8eb68f1fdb1563eba1ff61056f | Analyze and fix the following issue in the Linux kernel code: staging: bcm: Fix typo in drivers/bcm | Problem Details:
Correct spelling typo in drivers/bcm
Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | ```diff
diff --git a/drivers/staging/bcm/PHSModule.c b/drivers/staging/bcm/PHSModule.c
index 479574234e4c..6dc0bbcfeab0 100644
--- a/drivers/staging/bcm/PHSModule.c
+++ b/drivers/staging/bcm/PHSModule.c
@@ -66,7 +66,7 @@ Input parameters: IN struct bcm_mini_adapter *Adapter - Miniport Adapte
BOOLEAN bHe... |
ac9bbd085f5d22a2f01a03cb79abe740412bdae1 | Analyze and fix the following issue in the Linux kernel code: staging/olpc_dcon: fix checkpatch warnings | Problem Details:
The below checkpatch warnings was fixed,
- WARNING: Prefer pr_debug(... to printk(KERN_DEBUG, ...
- WARNING: Prefer pr_warn(... to printk(KERN_WARNING, ...
- WARNING: Prefer pr_info(... to printk(KERN_INFO, ...
- WARNING: Prefer pr_err(... to printk(KERN_ERR, ...
And added pr_fmt.
Signed-off-by:... | ```diff
diff --git a/drivers/staging/olpc_dcon/olpc_dcon.c b/drivers/staging/olpc_dcon/olpc_dcon.c
index 2c4bd746715a..d49c32a95690 100644
--- a/drivers/staging/olpc_dcon/olpc_dcon.c
+++ b/drivers/staging/olpc_dcon/olpc_dcon.c
@@ -11,6 +11,7 @@
* License as published by the Free Software Foundation.
*/
+#define p... |
93efc55b42536273d8ca5cccb5261cfe5e1471bb | Analyze and fix the following issue in the Linux kernel code: staging: usbip: export usbip_debug_flag as a usbip-core module parameter. | Problem Details:
Now usbip_common.c's pr_fmt is the only thing setup by CONFIG_USBIP_DEBUG
that you can't subsequently alter using this parameter.
Signed-off-by: W. Trevor King <wking@tremily.us>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | ```diff
diff --git a/drivers/staging/usbip/usbip_common.c b/drivers/staging/usbip/usbip_common.c
index 70f230269329..891984238cdc 100644
--- a/drivers/staging/usbip/usbip_common.c
+++ b/drivers/staging/usbip/usbip_common.c
@@ -22,7 +22,9 @@
#include <linux/fs.h>
#include <linux/kernel.h>
#include <linux/slab.h>
+#in... |
0df7c0e3a73f5d12bca24d81ee5ed52947b372b6 | Analyze and fix the following issue in the Linux kernel code: scripts/kernel-doc: fix fatal script error | Problem Details:
Fix fatal error in scripts/kernel-doc by ignoring the "__weak" attribute:
Error(drivers/pci/pci.c:2820): cannot understand prototype: 'char * __weak pcibios_setup(char *str) '
Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | ```diff
diff --git a/scripts/kernel-doc b/scripts/kernel-doc
index 9b0c0b8b4ab4..8fd107a3fac4 100755
--- a/scripts/kernel-doc
+++ b/scripts/kernel-doc
@@ -1786,6 +1786,7 @@ sub dump_function($$) {
$prototype =~ s/__init +//;
$prototype =~ s/__init_or_module +//;
$prototype =~ s/__must_check +//;
+ $pr... |
f4d834367cda98eee3769638da6ad687607c74e6 | Analyze and fix the following issue in the Linux kernel code: perf tools: Fix type for evsel->ids and add size check for ids | Problem Details:
Use same type for ids everywhere.
In case of writing to perf.data the size is u32. In pipe mode it is
limited to header.size (less than u16). Adding a size check here.
Size overflow due to casting shouldn't actually happen in practice, but
during development this may cause type missmatch warninngs/er... | ```diff
diff --git a/tools/perf/util/evsel.h b/tools/perf/util/evsel.h
index 65f39fdf821a..94f6ba16747f 100644
--- a/tools/perf/util/evsel.h
+++ b/tools/perf/util/evsel.h
@@ -53,7 +53,7 @@ struct perf_evsel {
u64 *id;
struct perf_counts *counts;
int idx;
- int ids;
+ u32 ids;
struct hists hists;
char... |
0985a94891c73740dea1e2697f9d598a4a7810ab | Analyze and fix the following issue in the Linux kernel code: perf ui gtk: Add perf_gtk__show_helpline() for pr_* | Problem Details:
Use helpline for printing error/debug messages. The code resembles a TUI
counter part and only print the first line of the message.
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Acked-by: Pekka Enberg <penberg@kernel.org>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc:... | ```diff
diff --git a/tools/perf/ui/gtk/helpline.c b/tools/perf/ui/gtk/helpline.c
index 2511b3746797..5db4432ff12a 100644
--- a/tools/perf/ui/gtk/helpline.c
+++ b/tools/perf/ui/gtk/helpline.c
@@ -1,5 +1,10 @@
+#include <stdio.h>
+#include <string.h>
+
#include "gtk.h"
+#include "../ui.h"
#include "../helpline.h"
+#inc... |
c7ac601e1d744da6b213531eac140982c6821b6f | Analyze and fix the following issue in the Linux kernel code: staging: comedi: cb_pcimdda: fix bug in call to subdev_8255_cleanup | Problem Details:
The attach function only allocated 2 subdevices, an analog output
sundevice (index 0) and the 8255 dio subdevice (index 1). The
detach function is passing the wrong subdevice (index 2) to the
subdev_8255_cleanup function which will result in a bug when
it tries to do the kfree(s->private).
Signed-off-... | ```diff
diff --git a/drivers/staging/comedi/drivers/cb_pcimdda.c b/drivers/staging/comedi/drivers/cb_pcimdda.c
index b10831d3cf22..99a6160d3724 100644
--- a/drivers/staging/comedi/drivers/cb_pcimdda.c
+++ b/drivers/staging/comedi/drivers/cb_pcimdda.c
@@ -257,7 +257,7 @@ static void cb_pcimdda_detach(struct comedi_devic... |
424d56ec3ca0ea5a4cc4caad885d8e49a3cfafc8 | Analyze and fix the following issue in the Linux kernel code: staging: tidspbridge: fix uuid strings | Problem Details:
Commit 8cb05f4b54535cb91d7a5f9f8eb230bd4fa86e4e (staging:
tidspbridge: eliminate uuid_uuid_to_string), not only broke
compilation but also functionality for tidspbridge driver.
So:
- Replace remaining instances of uuid_uuid_to_string with snprintf
to fix compilation.
- Fix the format from %pU to %pU... | ```diff
diff --git a/drivers/staging/tidspbridge/rmgr/dbdcd.c b/drivers/staging/tidspbridge/rmgr/dbdcd.c
index e05670dfeb46..9d52c3cb92f0 100644
--- a/drivers/staging/tidspbridge/rmgr/dbdcd.c
+++ b/drivers/staging/tidspbridge/rmgr/dbdcd.c
@@ -346,11 +346,13 @@ int dcd_get_object_def(struct dcd_manager *hdcd_mgr,
stru... |
ab6dd8e5ecf8c1a38ee1b9b9dfa9ab129dc3e200 | Analyze and fix the following issue in the Linux kernel code: firmware loader: fix build failure if FW_LOADER is m | Problem Details:
device_cache_fw_images need to iterate devices in system,
so this patch applies the introduced dpm_for_each_dev to
avoid link failure if CONFIG_FW_LOADER is m.
Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Ming Lei <ming.lei@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@... | ```diff
diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c
index 4c8d8efecdf4..ed0510a912c8 100644
--- a/drivers/base/firmware_class.c
+++ b/drivers/base/firmware_class.c
@@ -27,7 +27,6 @@
#include <linux/suspend.h>
#include "base.h"
-#include "power/power.h"
MODULE_AUTHOR("Manuel Estrada... |
c08f67730aba342b03f070209acc2990d3decf3c | Analyze and fix the following issue in the Linux kernel code: firmware loader: fix compile failure if !PM | Problem Details:
'return 0' should be added to fw_pm_notify if !PM because
return value of the funcion is defined as 'int'.
Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Ming Lei <ming.lei@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | ```diff
diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c
index 5bd2100a4dcf..4c8d8efecdf4 100644
--- a/drivers/base/firmware_class.c
+++ b/drivers/base/firmware_class.c
@@ -1242,7 +1242,9 @@ static int fw_pm_notify(struct notifier_block *notify_block,
#else
static int fw_pm_notify(struct not... |
9b78c5a3007e10a172d4e83bea18509fdff2e8e3 | Analyze and fix the following issue in the Linux kernel code: [media] b2c2: export b2c2_flexcop_debug symbol | Problem Details:
ERROR: "b2c2_flexcop_debug" [drivers/media/pci/b2c2/b2c2-flexcop-pci.ko] undefined!
Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com> | ```diff
diff --git a/drivers/media/common/b2c2/flexcop.c b/drivers/media/common/b2c2/flexcop.c
index b1e8c99f469b..412c5daf2b48 100644
--- a/drivers/media/common/b2c2/flexcop.c
+++ b/drivers/media/common/b2c2/flexcop.c
@@ -43,6 +43,7 @@
#endif
int b2c2_flexcop_debug;
+EXPORT_SYMBOL_GPL(b2c2_flexcop_debug);
module_... |
0e376b1e3ccedee49cb8cc6b652fbc1e7c15eeef | Analyze and fix the following issue in the Linux kernel code: ext4: return an error if kset_create_and_add fails in ext4_init_fs() | Problem Details:
In the very unlikely case that kset_create_and_add() fails when the
ext4.ko module is being loaded (or during kernel startup) set err so
that it's clear that the module load failed.
https://bugzilla.kernel.org/show_bug.cgi?id=27912
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> | ```diff
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 0423e2e7f615..3ab798d00f02 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -5285,8 +5285,10 @@ static int __init ext4_init_fs(void)
if (err)
goto out6;
ext4_kset = kset_create_and_add("ext4", NULL, fs_kobj);
- if (!ext4_kset)
+ if (!ext4_kset) {
... |
127c6e731106a2071ee4a6c5a34c471cd3e719f0 | Analyze and fix the following issue in the Linux kernel code: booke/wdt: some ioctls do not return values properly | Problem Details:
Fix some booke wdt ioctls return value error.
Signed-off-by: Tiejun Chen <tiejun.chen@windriver.com>
Acked-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org> | ```diff
diff --git a/drivers/watchdog/booke_wdt.c b/drivers/watchdog/booke_wdt.c
index 3fe82d0e8caa..5b06d31ab6a9 100644
--- a/drivers/watchdog/booke_wdt.c
+++ b/drivers/watchdog/booke_wdt.c
@@ -166,18 +166,17 @@ static long booke_wdt_ioctl(struct file *file,
switch (cmd) {
case WDIOC_GETSUPPORT:
- if (copy_to_u... |
d807ff838f48e7778996e577e2a57a5796c32e84 | Analyze and fix the following issue in the Linux kernel code: autofs4 - fix expire check | Problem Details:
In some cases when an autofs indirect mount is contained in a file
system that is marked as shared (such as when systemd does the
equivalent of "mount --make-rshared /" early in the boot), mounts
stop expiring.
When this happens the first expiry check on a mountpoint dentry in
autofs_expire_indirect()... | ```diff
diff --git a/fs/autofs4/expire.c b/fs/autofs4/expire.c
index 8c0e56d92938..842d00048a65 100644
--- a/fs/autofs4/expire.c
+++ b/fs/autofs4/expire.c
@@ -399,11 +399,6 @@ struct dentry *autofs4_expire_indirect(struct super_block *sb,
DPRINTK("checking mountpoint %p %.*s",
dentry, (int)dentry->d_name.len, ... |
210c05264d46ddf688bc26861ffb8e2323fb25cb | Analyze and fix the following issue in the Linux kernel code: ext4: realign trace events structs to make it smaller | Problem Details:
Most hardware architectures require that data (including struct fields)
have to be aligned in memory. To make it happen compiler inserts padding
between struct fields if they are not aligned correctly.
Reorder fields to remove paddings and make structures denser. Making data
smaller saves some memory ... | ```diff
diff --git a/include/trace/events/ext4.h b/include/trace/events/ext4.h
index 69d8a69ea831..db67c717fc6d 100644
--- a/include/trace/events/ext4.h
+++ b/include/trace/events/ext4.h
@@ -26,19 +26,19 @@ TRACE_EVENT(ext4_free_inode,
TP_STRUCT__entry(
__field( dev_t, dev )
__field( ino_t, ino )
- __field... |
df981d03eeff7971ac7e6ff37000bfa702327ef1 | Analyze and fix the following issue in the Linux kernel code: ext4: add max_dir_size_kb mount option | Problem Details:
Very large directories can cause significant performance problems, or
perhaps even invoke the OOM killer, if the process is running in a
highly constrained memory environment (whether it is VM's with a small
amount of memory or in a small memory cgroup).
So it is useful, in cloud server/data center en... | ```diff
diff --git a/Documentation/filesystems/ext4.txt b/Documentation/filesystems/ext4.txt
index 1b7f9acbcbbe..104322bf378c 100644
--- a/Documentation/filesystems/ext4.txt
+++ b/Documentation/filesystems/ext4.txt
@@ -375,6 +375,16 @@ dioread_nolock locking. If the dioread_nolock option is specified
Because of th... |
01fc48e8929e45e67527200017cff4e74e4ba054 | Analyze and fix the following issue in the Linux kernel code: ext4: don't load the block bitmap for block groups which have no space | Problem Details:
Add a short circuit check to ext4_mb_group_group() so that we don't
bother to load the block bitmap for a block group which does not have
any space available. (Or which does not have enough space until we
are in desperation mode, i.e., when cr == 3.)
Resolves-bug: https://bugzilla.kernel.org/show_bug... | ```diff
diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
index 8eae94771c45..3a57975b73cc 100644
--- a/fs/ext4/mballoc.c
+++ b/fs/ext4/mballoc.c
@@ -1862,6 +1862,12 @@ static int ext4_mb_good_group(struct ext4_allocation_context *ac,
BUG_ON(cr < 0 || cr >= 4);
+ free = grp->bb_free;
+ if (free == 0)
+ return 0... |
ecb94f5fdf4b72547fca022421a9dca1672bddd4 | Analyze and fix the following issue in the Linux kernel code: ext4: collapse a single extent tree block into the inode if possible | Problem Details:
If an inode has more than 4 extents, but then later some of the
extents are merged together, we can optimize the file system by moving
the extents up into the inode, and discarding the extent tree block.
This is important, because if there are a large number of inodes with
an external extent tree block... | ```diff
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
index aabbb3f53683..e8755c21f4b9 100644
--- a/fs/ext4/extents.c
+++ b/fs/ext4/extents.c
@@ -1655,17 +1655,61 @@ static int ext4_ext_try_to_merge_right(struct inode *inode,
return merge_done;
}
+/*
+ * This function does a very simple check to see if we can... |
89a4e48f8479f8145eca9698f39fe188c982212f | Analyze and fix the following issue in the Linux kernel code: ext4: fix kernel BUG on large-scale rm -rf commands | Problem Details:
Commit 968dee7722: "ext4: fix hole punch failure when depth is greater
than 0" introduced a regression in v3.5.1/v3.6-rc1 which caused kernel
crashes when users ran run "rm -rf" on large directory hierarchy on
ext4 filesystems on RAID devices:
BUG: unable to handle kernel NULL pointer dereference ... | ```diff
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
index cd0c7ed06772..aabbb3f53683 100644
--- a/fs/ext4/extents.c
+++ b/fs/ext4/extents.c
@@ -2662,6 +2662,7 @@ cont:
}
path[0].p_depth = depth;
path[0].p_hdr = ext_inode_hdr(inode);
+ i = 0;
if (ext4_ext_check(inode, path[0].p_hdr, depth)) {
e... |
250a41e0ecc433cdd553a364d0fc74c766425209 | Analyze and fix the following issue in the Linux kernel code: xen/p2m: Reuse existing P2M leafs if they are filled with 1:1 PFNs or INVALID. | Problem Details:
If P2M leaf is completly packed with INVALID_P2M_ENTRY or with
1:1 PFNs (so IDENTITY_FRAME type PFNs), we can swap the P2M leaf
with either a p2m_missing or p2m_identity respectively. The old
page (which was created via extend_brk or was grafted on from the
mfn_list) can be re-used for setting new PFNs... | ```diff
diff --git a/arch/x86/xen/p2m.c b/arch/x86/xen/p2m.c
index b2e91d40a4cb..d4b255463253 100644
--- a/arch/x86/xen/p2m.c
+++ b/arch/x86/xen/p2m.c
@@ -196,9 +196,11 @@ RESERVE_BRK(p2m_mid_identity, PAGE_SIZE * 2 * 3);
/* When we populate back during bootup, the amount of pages can vary. The
* max we have is se... |
0548bbb85337e532ca2ed697c3e9b227ff2ed4b4 | Analyze and fix the following issue in the Linux kernel code: ext4: fix long mount times on very big file systems | Problem Details:
Commit 8aeb00ff85a: "ext4: fix overhead calculation used by
ext4_statfs()" introduced a O(n**2) calculation which makes very large
file systems take forever to mount. Fix this with an optimization for
non-bigalloc file systems. (For bigalloc file systems the overhead
needs to be set in the the superb... | ```diff
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 56bcaec9149c..598498904035 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -3120,6 +3120,10 @@ static int count_overhead(struct super_block *sb, ext4_group_t grp,
ext4_group_t i, ngroups = ext4_get_groups_count(sb);
int s, j, count = 0;
+ if (!... |
e50d3523ff45646a48666ebbd3d8aeb0c75084ed | Analyze and fix the following issue in the Linux kernel code: pwm: core: Fix coding style issues | Problem Details:
Fixes the following:
WARNING: line over 80 characters
ERROR: spaces required around that ':' (ctx:VxW)
WARNING: Prefer pr_warn(... to pr_warning(...
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de> | ```diff
diff --git a/drivers/pwm/core.c b/drivers/pwm/core.c
index 4a8bdfa79e7f..c6e05078d3ad 100644
--- a/drivers/pwm/core.c
+++ b/drivers/pwm/core.c
@@ -129,8 +129,8 @@ static int pwm_device_request(struct pwm_device *pwm, const char *label)
return 0;
}
-static struct pwm_device *of_pwm_simple_xlate(struct pwm_c... |
eba7cbe5d8bbc3bc24f46973e44f1566f81d1f56 | Analyze and fix the following issue in the Linux kernel code: pwm: vt8500: Fix coding style issue | Problem Details:
Fixes the following:
WARNING: Prefer pr_warn(... to pr_warning(...
pr_warning("Waiting for status bits 0x%x to clear timed out\n",
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de> | ```diff
diff --git a/drivers/pwm/pwm-vt8500.c b/drivers/pwm/pwm-vt8500.c
index 548021439f0c..ad14389b7144 100644
--- a/drivers/pwm/pwm-vt8500.c
+++ b/drivers/pwm/pwm-vt8500.c
@@ -41,7 +41,7 @@ static inline void pwm_busy_wait(void __iomem *reg, u8 bitmask)
cpu_relax();
if (unlikely(!loops))
- pr_warning("Waitin... |
dfeb86ecde7ae6ce15bd69a6a205b5e13aea8111 | Analyze and fix the following issue in the Linux kernel code: pwm: Add missing static storage class specifiers in core.c file | Problem Details:
Fixes the following sparse warnings:
drivers/pwm/core.c:152:6: warning:
symbol 'of_pwmchip_add' was not declared. Should it be static?
drivers/pwm/core.c:165:6: warning:
symbol 'of_pwmchip_remove' was not declared. Should it be static?
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-b... | ```diff
diff --git a/drivers/pwm/core.c b/drivers/pwm/core.c
index ecb76909e946..4a8bdfa79e7f 100644
--- a/drivers/pwm/core.c
+++ b/drivers/pwm/core.c
@@ -149,7 +149,7 @@ static struct pwm_device *of_pwm_simple_xlate(struct pwm_chip *pc,
return pwm;
}
-void of_pwmchip_add(struct pwm_chip *chip)
+static void of_pwm... |
7612bfeecc197bbb6629842b5c6ff1967f0a9b70 | Analyze and fix the following issue in the Linux kernel code: Yama: access task_struct->comm directly | Problem Details:
The core ptrace access checking routine holds a task lock, and when
reporting a failure, Yama takes a separate task lock. To avoid a
potential deadlock with two ptracers taking the opposite locks, do not
use get_task_comm() and just use ->comm directly since accuracy is not
important for the report.
R... | ```diff
diff --git a/security/yama/yama_lsm.c b/security/yama/yama_lsm.c
index d51b7c76c37d..0cc99a3ea42d 100644
--- a/security/yama/yama_lsm.c
+++ b/security/yama/yama_lsm.c
@@ -279,12 +279,9 @@ static int yama_ptrace_access_check(struct task_struct *child,
}
if (rc) {
- char name[sizeof(current->comm)];
pri... |
97f50c6c415d84c612094d9514a3df3d70ab30e3 | Analyze and fix the following issue in the Linux kernel code: ARM: ux500: Fix merge error, no matching driver name for 'snd_soc_u8500' | Problem Details:
The platform attempts to register platform device 'snd_soc_u8500'
which doesn't actually exist. Here we change the reference to the
correct one 'snd_soc_mop500'.
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org> | ```diff
diff --git a/arch/arm/mach-ux500/board-mop500-msp.c b/arch/arm/mach-ux500/board-mop500-msp.c
index 996048038743..df15646036aa 100644
--- a/arch/arm/mach-ux500/board-mop500-msp.c
+++ b/arch/arm/mach-ux500/board-mop500-msp.c
@@ -191,9 +191,9 @@ static struct platform_device *db8500_add_msp_i2s(struct device *pare... |
4c39104da846379151b9c37cffaf8b00a5580229 | Analyze and fix the following issue in the Linux kernel code: pinctrl/nomadik: add kp_b_2 keyboard function group list | Problem Details:
There is yet another way to mux the keyboard, so fix up that
group.
Signed-off-by: Patrice Chotard <patrice.chotard@stericsson.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org> | ```diff
diff --git a/drivers/pinctrl/pinctrl-nomadik-db8500.c b/drivers/pinctrl/pinctrl-nomadik-db8500.c
index 5f3e9d0221e1..a39fb7a6fc51 100644
--- a/drivers/pinctrl/pinctrl-nomadik-db8500.c
+++ b/drivers/pinctrl/pinctrl-nomadik-db8500.c
@@ -505,6 +505,8 @@ static const unsigned kp_b_1_pins[] = { DB8500_PIN_F3, DB8500... |
b20fd25a947584cf949ad3066e41697c5cdad816 | Analyze and fix the following issue in the Linux kernel code: pinctrl: imx51: fix .conf_reg of MX51_PAD_SD2_CMD__CSPI_MOSI | Problem Details:
The .conf_reg of MX51_PAD_SD2_CMD__CSPI_MOSI should be 0x7bc rather
than NO_PAD. This error will cause SD2 probe failure.
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org> | ```diff
diff --git a/drivers/pinctrl/pinctrl-imx51.c b/drivers/pinctrl/pinctrl-imx51.c
index 689b3c88dd2e..9fd02162a3c2 100644
--- a/drivers/pinctrl/pinctrl-imx51.c
+++ b/drivers/pinctrl/pinctrl-imx51.c
@@ -974,7 +974,7 @@ static struct imx_pin_reg imx51_pin_regs[] = {
IMX_PIN_REG(MX51_PAD_EIM_DA13, NO_PAD, 0x050, 0,... |
d1a83d3b1729ac53ebcc6134f0d88faa311c42b9 | Analyze and fix the following issue in the Linux kernel code: Documentation/pinctrl.txt: Fix some misspelled macros | Problem Details:
Signed-off-by: Daniel Mack <zonque@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org> | ```diff
diff --git a/Documentation/pinctrl.txt b/Documentation/pinctrl.txt
index e40f4b4e1977..1479aca23744 100644
--- a/Documentation/pinctrl.txt
+++ b/Documentation/pinctrl.txt
@@ -840,9 +840,9 @@ static unsigned long i2c_pin_configs[] = {
static struct pinctrl_map __initdata mapping[] = {
PIN_MAP_MUX_GROUP("foo... |
2ee38d4de5b0f1bd4ed9f0c830ae6949e39c18f0 | Analyze and fix the following issue in the Linux kernel code: pinctrl/nomadik: fix null in irqdomain errorpath | Problem Details:
The irqdomain conversion failed to notice that we do not always
have a DT node to dereference, fix this up by using a simple
dev_err() that also tells the name of the device.
Cc: Loic Pallardy <loic.pallardy@st.com>
Cc: Patrice Chotard <patrice.chotard@stericsson.com>
Acked-by: Lee Jones <lee.jones@li... | ```diff
diff --git a/drivers/pinctrl/pinctrl-nomadik.c b/drivers/pinctrl/pinctrl-nomadik.c
index ec6ac501b23a..3dde6537adb8 100644
--- a/drivers/pinctrl/pinctrl-nomadik.c
+++ b/drivers/pinctrl/pinctrl-nomadik.c
@@ -1292,7 +1292,7 @@ static int __devinit nmk_gpio_probe(struct platform_device *dev)
NOMADIK_GPIO_TO... |
5a6704454a68ab6e27e4fc5b82818a8c5733bf29 | Analyze and fix the following issue in the Linux kernel code: MIPS: BCM63xx: Fix SPI message control register handling for BCM6338/6348. | Problem Details:
BCM6338 and BCM6348 have a message control register width of 8 bits, instead
of 16-bits like what the SPI driver assumes right now. Also the SPI message
type shift value of 14 is actually 6 for these SoCs.
This resulted in transmit FIFO corruption because we were writing 16-bits
to an 8-bits wide regis... | ```diff
diff --git a/arch/mips/bcm63xx/dev-spi.c b/arch/mips/bcm63xx/dev-spi.c
index e39f73048d4f..f1c9c3e2f678 100644
--- a/arch/mips/bcm63xx/dev-spi.c
+++ b/arch/mips/bcm63xx/dev-spi.c
@@ -106,11 +106,15 @@ int __init bcm63xx_spi_register(void)
if (BCMCPU_IS_6338() || BCMCPU_IS_6348()) {
spi_resources[0].end += ... |
861667dc82f561e65336ea67f73021b782b4ff74 | Analyze and fix the following issue in the Linux kernel code: MIPS: Fix race condition in module relocation code. | Problem Details:
The relocation code was essentially taken from the 2.4 modutils which
perform relocation in userspace. In 2.6 relocation of multiple modules
may be performed in parallel by the in-kernel loader so the global
variable mips_hi16_list won't fly anymore. Fix race by moving it into
mod_arch_specific.
[ra... | ```diff
diff --git a/arch/mips/include/asm/module.h b/arch/mips/include/asm/module.h
index 7531ecd654d6..dca8bce8c7ab 100644
--- a/arch/mips/include/asm/module.h
+++ b/arch/mips/include/asm/module.h
@@ -10,6 +10,7 @@ struct mod_arch_specific {
struct list_head dbe_list;
const struct exception_table_entry *dbe_start... |
d3cac35cd0a2a987f7559e1829fb0253cea33872 | Analyze and fix the following issue in the Linux kernel code: MIPS: Fix memory leak in error path of HI16/LO16 relocation handling. | Problem Details:
Commit 6f5d2e970452b5c86906adcb8e7ad246f535ba39 (lmo) /
477c4b07406357ad93d0e32788dbf3ee814eadaa (kernel.org) [[MIPS: VPE: Free
relocation chain on error.] fixed the same issue in the vpe loader in 2009
but back then the same bug in module.c went unfixed.
Signed-off-by: Ralf Baechle <ralf@linux-mips.o... | ```diff
diff --git a/arch/mips/kernel/module.c b/arch/mips/kernel/module.c
index a5066b1c3de3..e5f2f56524ea 100644
--- a/arch/mips/kernel/module.c
+++ b/arch/mips/kernel/module.c
@@ -146,16 +146,15 @@ static int apply_r_mips_lo16_rel(struct module *me, u32 *location, Elf_Addr v)
{
unsigned long insnlo = *location;
... |
5fb234560eb3033b35812cd0d80613dbf37dca2f | Analyze and fix the following issue in the Linux kernel code: MIPS: ath79: Use correct IRQ number for the OHCI controller on AR7240 | Problem Details:
The currently assigned IRQ number to the OHCI controller is incorrect for
the AR7240 SoC, and that leads to the following error message from the
OHCI driver:
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
ath79-ohci ath79-ohci: Atheros built-in OHCI controller
ath79-ohci ath79-ohci: new USB bu... | ```diff
diff --git a/arch/mips/ath79/dev-usb.c b/arch/mips/ath79/dev-usb.c
index 36e9570e7bc4..b2a2311ec85b 100644
--- a/arch/mips/ath79/dev-usb.c
+++ b/arch/mips/ath79/dev-usb.c
@@ -145,6 +145,8 @@ static void __init ar7240_usb_setup(void)
ath79_ohci_resources[0].start = AR7240_OHCI_BASE;
ath79_ohci_resources[0]... |
b4da14abf27227fc767ec257f44de70085a0bc68 | Analyze and fix the following issue in the Linux kernel code: MIPS: ath79: Fix number of GPIO lines for AR724[12] | Problem Details:
The AR724[12] SoCs have more GPIO lines than the AR7240.
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Cc: Cc: linux-mips@linux-mips.org
Patchwork: https://http://patchwork.linux-mips.org/patch/4167/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org> | ```diff
diff --git a/arch/mips/ath79/gpio.c b/arch/mips/ath79/gpio.c
index 29054f211832..48fe762d2526 100644
--- a/arch/mips/ath79/gpio.c
+++ b/arch/mips/ath79/gpio.c
@@ -188,8 +188,10 @@ void __init ath79_gpio_init(void)
if (soc_is_ar71xx())
ath79_gpio_count = AR71XX_GPIO_COUNT;
- else if (soc_is_ar724x())
- a... |
87161ccdc61862c8b49e75c21209d7f79dc758e9 | Analyze and fix the following issue in the Linux kernel code: MIPS: Octeon: Fix broken interrupt controller code. | Problem Details:
Since 3.6.0-rc1, We are getting many messages like:
WARNING: at kernel/irq/irqdomain.c:444 irq_domain_associate_many+0x23c/0x260()
Modules linked in:
Call Trace:
[<ffffffff814cb698>] dump_stack+0x8/0x34
[<ffffffff81133d00>] warn_slowpath_common+0x78/0xa8
[<ffffffff81187e44>] irq_domain_associate_many... | ```diff
diff --git a/arch/mips/cavium-octeon/octeon-irq.c b/arch/mips/cavium-octeon/octeon-irq.c
index 7fb1f222b8a5..274cd4fad30c 100644
--- a/arch/mips/cavium-octeon/octeon-irq.c
+++ b/arch/mips/cavium-octeon/octeon-irq.c
@@ -61,6 +61,12 @@ static void octeon_irq_set_ciu_mapping(int irq, int line, int bit,
octeon_ir... |
33faad195eec0c72fec84e638623ea25652eed72 | Analyze and fix the following issue in the Linux kernel code: drm/fb-helper: don't clobber output routing in setup_crtcs | Problem Details:
Yet again the too close relationship between the fb helper and the
crtc helper code strikes. This time around the fb helper resets all
encoder->crtc pointers to NULL before starting to set up it's own
mode. Which is total bullocks, because this will clobber the existing
output routing, which the new dr... | ```diff
diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
index f546d1e8af82..4ecc869fb5be 100644
--- a/drivers/gpu/drm/drm_fb_helper.c
+++ b/drivers/gpu/drm/drm_fb_helper.c
@@ -1230,7 +1230,6 @@ static void drm_setup_crtcs(struct drm_fb_helper *fb_helper)
struct drm_device *dev = fb_help... |
e9a851ed634628489ca4a392740694d0ded78cb9 | Analyze and fix the following issue in the Linux kernel code: drm/i915: fix wrong order of parameters in port checking functions | Problem Details:
Wrong order of parameters passed-in when calling hdmi/adpa
/lvds_pipe_enabled(), 2nd and 3rd parameters are reversed.
This bug was indroduced by
commit 1519b9956eb4b4180fa3f47c73341463cdcfaa37
Author: Keith Packard <keithp@keithp.com>
Date: Sat Aug 6 10:35:34 2011 -0700
drm/i915: Fix PCH port ... | ```diff
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index a9ab1aff2c77..46a4c921a174 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -1384,7 +1384,7 @@ static void assert_pch_hdmi_disabled(struct drm_i915_private *dev_priv,
... |
f1a2f5b7c5f0941d23eef0a095c0b99bf8d051e6 | Analyze and fix the following issue in the Linux kernel code: drm/i915: fall back to bit-banging if GMBUS fails in CRT EDID reads | Problem Details:
GMBUS was enabled over bit-banging as the default in commits:
commit c3dfefa0a6d235bd465309e12f4c56ea16e71111
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date: Tue Feb 14 22:37:25 2012 +0100
drm/i915: reenable gmbus on gen3+ again
and
commit 0fb3f969c8683505fb7323c06bf8a999a5a45a15
Author:... | ```diff
diff --git a/drivers/gpu/drm/i915/intel_crt.c b/drivers/gpu/drm/i915/intel_crt.c
index 7ed4a41c3965..23bdc8cd1458 100644
--- a/drivers/gpu/drm/i915/intel_crt.c
+++ b/drivers/gpu/drm/i915/intel_crt.c
@@ -326,6 +326,36 @@ static bool intel_crt_detect_hotplug(struct drm_connector *connector)
return ret;
}
+st... |
4eab81366465aedcfd26de960c595bc03599c09f | Analyze and fix the following issue in the Linux kernel code: drm/i915: extract connector update from intel_ddc_get_modes() for reuse | Problem Details:
Refactor the connector update part of intel_ddc_get_modes() into a separate
intel_connector_update_modes() function for reuse. No functional changes.
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=45881
Tested-by: Alex Ferrando <alferpal@gmail.... | ```diff
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
index 132ab511b90c..cd54cf88a28f 100644
--- a/drivers/gpu/drm/i915/intel_drv.h
+++ b/drivers/gpu/drm/i915/intel_drv.h
@@ -342,6 +342,8 @@ struct intel_fbc_work {
int interval;
};
+int intel_connector_update_modes(struct drm_co... |
a843af186c3157cee58f1cf689385ab906e1f109 | Analyze and fix the following issue in the Linux kernel code: drm/i915: fix hsw uncached pte | Problem Details:
They've changed it ... for no apparent reason. Meh.
V2: remove unused 'is_hsw' field.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> | ```diff
diff --git a/drivers/char/agp/intel-agp.h b/drivers/char/agp/intel-agp.h
index 6f007b6c240d..6ec0fff79bc2 100644
--- a/drivers/char/agp/intel-agp.h
+++ b/drivers/char/agp/intel-agp.h
@@ -64,6 +64,7 @@
#define I830_PTE_SYSTEM_CACHED 0x00000006
/* GT PTE cache control fields */
#define GEN6_PTE_UNCACHED 0x000... |
b6c7488df68ae3660d81b149b61b55b97929da83 | Analyze and fix the following issue in the Linux kernel code: drm/i915/contexts: fix list corruption | Problem Details:
After reset we unconditionally reinitialize lists. If the context switch
hasn't yet completed before the suspend, the default context object will
end up on lists that are going to go away when we resume.
The patch forces the context switch to be synchronous before suspend
assuring that the active/inac... | ```diff
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 5c4657a54f97..489e2b162b27 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -2365,6 +2365,10 @@ int i915_gpu_idle(struct drm_device *dev)
/* Flush everything onto the inactive list. */
... |
38ab8a2009e33ded06bf80d3a95da393d8d651d6 | Analyze and fix the following issue in the Linux kernel code: drm/i915: fix EDID memory leak in SDVO | Problem Details:
The EDID returned by drm_get_edid() was never freed.
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> | ```diff
diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers/gpu/drm/i915/intel_sdvo.c
index d172e9873131..d81bb0bf2885 100644
--- a/drivers/gpu/drm/i915/intel_sdvo.c
+++ b/drivers/gpu/drm/i915/intel_sdvo.c
@@ -1692,6 +1692,7 @@ static bool intel_sdvo_detect_hdmi_audio(struct drm_connector *connector)
edid = inte... |
1d2a2cd95ee0137a2353d1b5635739c281f27cd4 | Analyze and fix the following issue in the Linux kernel code: target/pscsi: Fix bug with REPORT_LUNs handling for SCSI passthrough | Problem Details:
This patch fixes a regression bug in pscsi_transport_complete() callback
code where *pt was being NULL dereferenced during REPORT_LUNS handling,
that was introduced with the spc/sbc refactoring in:
commit 1fd032ee10d2816c947f5d5b9abda95e728f0a8f
Author: Christoph Hellwig <hch@infradead.org>
Date: Su... | ```diff
diff --git a/drivers/target/target_core_pscsi.c b/drivers/target/target_core_pscsi.c
index 6e32ff6f2fa0..5552fa7426bc 100644
--- a/drivers/target/target_core_pscsi.c
+++ b/drivers/target/target_core_pscsi.c
@@ -673,8 +673,15 @@ static int pscsi_transport_complete(struct se_cmd *cmd, struct scatterlist *sg)
st... |
c61307a7cc1be87b6785dad0885492b6ca7998db | Analyze and fix the following issue in the Linux kernel code: gpio: Fix debug message in of_get_named_gpio_flags() | Problem Details:
This was probably missed in the conversion done in commit 3d0f7cf
("gpio: Adjust of_xlate API to support multiple GPIO chips").
Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org> | ```diff
diff --git a/drivers/gpio/gpiolib-of.c b/drivers/gpio/gpiolib-of.c
index a18c4aa68b1e..f1a45997aea8 100644
--- a/drivers/gpio/gpiolib-of.c
+++ b/drivers/gpio/gpiolib-of.c
@@ -82,7 +82,7 @@ int of_get_named_gpio_flags(struct device_node *np, const char *propname,
gpiochip_find(&gg_data, of_gpiochip_find_and_xl... |
16339464c5d67d0536837fc5342c9c2432b80ae0 | Analyze and fix the following issue in the Linux kernel code: ARM i.MX6q: Add virtual 1/3.5 dividers in the LDB clock path | Problem Details:
The ldb_di[01]_podf is implemented as a clk-divider that
divides by 1 or 2. In reality, the ldb_di[01]_ipu_div
dividers divide by either 3.5 or 7. Adding a fixed factor
of 1/3.5 fixes their children's clock rates.
This should probably be converted to rate table based dividers,
once available.
Cc: <st... | ```diff
diff --git a/arch/arm/mach-imx/clk-imx6q.c b/arch/arm/mach-imx/clk-imx6q.c
index ea89520b6e22..4233d9e3531d 100644
--- a/arch/arm/mach-imx/clk-imx6q.c
+++ b/arch/arm/mach-imx/clk-imx6q.c
@@ -152,7 +152,7 @@ enum mx6q_clks {
ssi2, ssi3, uart_ipg, uart_serial, usboh3, usdhc1, usdhc2, usdhc3,
usdhc4, vdo_axi, ... |
d0e27c88d795fb9647153063ec48051fd84e1731 | Analyze and fix the following issue in the Linux kernel code: target: fix NULL pointer dereference bug alloc_page() fails to get memory | Problem Details:
I am hitting this bug when the target is low in memory that fails the
alloc_page() for the newly submitted command. This is a sort of off-by-one
bug causing NULL pointer dereference in __free_page() since 'i' here is
really the counter of total pages that have been successfully allocated here.
Signed-... | ```diff
diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c
index 0eaae23d12b5..a7589ccdb6f3 100644
--- a/drivers/target/target_core_transport.c
+++ b/drivers/target/target_core_transport.c
@@ -2294,9 +2294,9 @@ transport_generic_get_mem(struct se_cmd *cmd)
return 0;
out:
-... |
1fa8f4504130adc34a071a29170f570102136835 | Analyze and fix the following issue in the Linux kernel code: tcm_fc: Avoid debug overhead when not debugging | Problem Details:
Stop doing a pile of work related to debugging messages when
the ft_debug_logging flag is not set. Use unlikely to add the
check in a way that the check can be inlined without inlining the
whole thing.
Signed-off-by: Mark Rustad <mark.d.rustad@intel.com>
Signed-off-by: Nicholas Bellinger <nab@linux-is... | ```diff
diff --git a/drivers/target/tcm_fc/tcm_fc.h b/drivers/target/tcm_fc/tcm_fc.h
index c5eb3c33c3db..eea69358ced3 100644
--- a/drivers/target/tcm_fc/tcm_fc.h
+++ b/drivers/target/tcm_fc/tcm_fc.h
@@ -131,6 +131,7 @@ extern struct list_head ft_lport_list;
extern struct mutex ft_lport_lock;
extern struct fc4_prov ft... |
101998f6fcd680ed12d85633b81504feb1cb0667 | Analyze and fix the following issue in the Linux kernel code: tcm_vhost: Post-merge review changes requested by MST | Problem Details:
This patch contains the post RFC-v5 (post-merge) changes, this includes:
- Add locking comment
- Move vhost_scsi_complete_cmd ahead of TFO callbacks in order to
drop forward declarations
- Drop extra '!= NULL' usage in vhost_scsi_complete_cmd_work()
- Change vhost_scsi_*_handle_kick() to use pr_debu... | ```diff
diff --git a/drivers/vhost/tcm_vhost.c b/drivers/vhost/tcm_vhost.c
index 481af88a5ff5..74b2edaaf1f6 100644
--- a/drivers/vhost/tcm_vhost.c
+++ b/drivers/vhost/tcm_vhost.c
@@ -53,9 +53,14 @@
#include "vhost.h"
#include "tcm_vhost.h"
+enum {
+ VHOST_SCSI_VQ_CTL = 0,
+ VHOST_SCSI_VQ_EVT = 1,
+ VHOST_SCSI_VQ_IO... |
f0e0e9bba5eed2086f6001be14f21566a49bed10 | Analyze and fix the following issue in the Linux kernel code: tcm_vhost: Fix incorrect IS_ERR() usage in vhost_scsi_map_iov_to_sgl | Problem Details:
Fix up a new coccinelle warnings reported by Fengguang Wu + Intel
0-DAY kernel build testing backend:
drivers/vhost/tcm_vhost.c:537:23-29: ERROR: allocation function on line
533 returns NULL not ERR_PTR on failure
vim +537 drivers/vhost/tcm_vhost.c
534 if (!sg)
535 ret... | ```diff
diff --git a/drivers/vhost/tcm_vhost.c b/drivers/vhost/tcm_vhost.c
index fb366540ed54..481af88a5ff5 100644
--- a/drivers/vhost/tcm_vhost.c
+++ b/drivers/vhost/tcm_vhost.c
@@ -533,8 +533,8 @@ static int vhost_scsi_map_iov_to_sgl(struct tcm_vhost_cmd *tv_cmd,
sg = kmalloc(sizeof(tv_cmd->tvc_sgl[0]) * sgl_count,... |
898132ae76d1aeb52301f10e8795c34fbb54e853 | Analyze and fix the following issue in the Linux kernel code: ipv6: move dereference after check in fl_free() | Problem Details:
There is a dereference before checking for NULL bug here. Generally
free() functions should accept NULL pointers. For example, fl_create()
can pass a NULL pointer to fl_free() on the error path.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Eric W. Biederman <ebiederm@xmissi... | ```diff
diff --git a/net/ipv6/ip6_flowlabel.c b/net/ipv6/ip6_flowlabel.c
index c836a6a20a34..90bbefb57943 100644
--- a/net/ipv6/ip6_flowlabel.c
+++ b/net/ipv6/ip6_flowlabel.c
@@ -91,12 +91,9 @@ static struct ip6_flowlabel *fl_lookup(struct net *net, __be32 label)
static void fl_free(struct ip6_flowlabel *fl)
{
- sw... |
88f8472c9fc6c08f5113887471f1f4aabf7b2929 | Analyze and fix the following issue in the Linux kernel code: [media] Fix some Makefile rules | Problem Details:
On a few places, := were using instead of +=, causing drivers to
not compile.
While here, standardize the usage of += on all cases where multiple
lines are needed, and for obj-y/obj-m targets, and := when just one
line is needed, on <module>-obj rules.
Reported-by: Hans Verkuil <hverkuil@xs4all.nl>
I... | ```diff
diff --git a/drivers/media/common/b2c2/Makefile b/drivers/media/common/b2c2/Makefile
index 48a4c906a173..24993a5b38ba 100644
--- a/drivers/media/common/b2c2/Makefile
+++ b/drivers/media/common/b2c2/Makefile
@@ -1,5 +1,6 @@
-b2c2-flexcop-objs = flexcop.o flexcop-fe-tuner.o flexcop-i2c.o \
- flexcop-sram.o flexco... |
476ad154f3b41dd7d9a08a2f641e28388abc2fd1 | Analyze and fix the following issue in the Linux kernel code: net: netprio: fix cgrp create and write priomap race | Problem Details:
A race exists where creating cgroups and also updating the priomap
may result in losing a priomap update. This is because priomap
writers are not protected by rtnl_lock.
Move priority writer into rtnl_lock()/rtnl_unlock().
CC: Neil Horman <nhorman@tuxdriver.com>
Reported-by: Al Viro <viro@ZenIV.linux... | ```diff
diff --git a/net/core/netprio_cgroup.c b/net/core/netprio_cgroup.c
index f65dba3afd99..c75e3f9d060f 100644
--- a/net/core/netprio_cgroup.c
+++ b/net/core/netprio_cgroup.c
@@ -101,12 +101,10 @@ static int write_update_netdev_table(struct net_device *dev)
u32 max_len;
struct netprio_map *map;
- rtnl_lock();... |
48a87cc26c13b68f6cce4e9d769fcb17a6b3e4b8 | Analyze and fix the following issue in the Linux kernel code: net: netprio: fd passed in SCM_RIGHTS datagram not set correctly | Problem Details:
A socket fd passed in a SCM_RIGHTS datagram was not getting
updated with the new tasks cgrp prioidx. This leaves IO on
the socket tagged with the old tasks priority.
To fix this add a check in the scm recvmsg path to update the
sock cgrp prioidx with the new tasks value.
Thanks to Al Viro for catchin... | ```diff
diff --git a/net/core/scm.c b/net/core/scm.c
index 8f6ccfd68ef4..040cebeed45b 100644
--- a/net/core/scm.c
+++ b/net/core/scm.c
@@ -265,6 +265,7 @@ void scm_detach_fds(struct msghdr *msg, struct scm_cookie *scm)
for (i=0, cmfptr=(__force int __user *)CMSG_DATA(cm); i<fdmax;
i++, cmfptr++)
{
+ struct ... |
f796c20cf67aa54c9130d0dc41307c0025719b85 | Analyze and fix the following issue in the Linux kernel code: net: netprio: fix files lock and remove useless d_path bits | Problem Details:
Add lock to prevent a race with a file closing and also remove
useless and ugly sscanf code. The extra code was never needed
and the case it supposedly protected against is in fact handled
correctly by sock_from_file as pointed out by Al Viro.
CC: Neil Horman <nhorman@tuxdriver.com>
Reported-by: Al Vi... | ```diff
diff --git a/net/core/netprio_cgroup.c b/net/core/netprio_cgroup.c
index ed0c0431fcd8..f65dba3afd99 100644
--- a/net/core/netprio_cgroup.c
+++ b/net/core/netprio_cgroup.c
@@ -277,12 +277,6 @@ out_free_devname:
void net_prio_attach(struct cgroup *cgrp, struct cgroup_taskset *tset)
{
struct task_struct *p;
- ... |
643bfc061c47e9c7661324a09fb0a0bc6601e5d6 | Analyze and fix the following issue in the Linux kernel code: xfs: check for possible overflow in xfs_ioc_trim | Problem Details:
If range.start or range.minlen is bigger than filesystem size, return
invalid value error. This fixes possible overflow in BTOBB macro when
passed value was nearly ULLONG_MAX.
Signed-off-by: Tomas Racek <tracek@redhat.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Ben Myers <bpm@s... | ```diff
diff --git a/fs/xfs/xfs_discard.c b/fs/xfs/xfs_discard.c
index f9c3fe304a17..69cf4fcde03e 100644
--- a/fs/xfs/xfs_discard.c
+++ b/fs/xfs/xfs_discard.c
@@ -179,12 +179,14 @@ xfs_ioc_trim(
* used by the fstrim application. In the end it really doesn't
* matter as trimming blocks is an advisory interface.
... |
1aabe902ca3638d862bf0dad5a697d3a8e046b0a | Analyze and fix the following issue in the Linux kernel code: workqueue: introduce system_highpri_wq | Problem Details:
Commit 3270476a6c0ce322354df8679652f060d66526dc ('workqueue: reimplement
WQ_HIGHPRI using a separate worker_pool') introduce separate worker pool
for HIGHPRI. When we handle busyworkers for gcwq, it can be normal worker
or highpri worker. But, we don't consider this difference in rebind_workers(),
we u... | ```diff
diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index 99ee9b939264..329c404b68c2 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -269,12 +269,14 @@ struct workqueue_struct {
};
struct workqueue_struct *system_wq __read_mostly;
+struct workqueue_struct *system_highpri_wq __read_mostly;
stru... |
02644a17457414f38e29f32d5c640b06d08fa092 | Analyze and fix the following issue in the Linux kernel code: sctp: fix bogus if statement in sctp_auth_recv_cid() | Problem Details:
There is an extra semi-colon here, so we always return 0 instead of
calling __sctp_auth_cid().
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/net/sctp/auth.c b/net/sctp/auth.c
index aaa6c121ecce..159b9bc5d633 100644
--- a/net/sctp/auth.c
+++ b/net/sctp/auth.c
@@ -695,7 +695,7 @@ int sctp_auth_recv_cid(sctp_cid_t chunk, const struct sctp_association *asoc)
return 0;
net = sock_net(asoc->base.sk);
- if (!net->sctp.auth_enable);
+ if... |
6932f119bd71a315a1945276377277d91c4a71c6 | Analyze and fix the following issue in the Linux kernel code: sctp: fix compile issue with disabled CONFIG_NET_NS | Problem Details:
struct seq_net_private has no struct net
if CONFIG_NET_NS is not enabled
Signed-off-by: Ulrich Weber <ulrich.weber@sophos.com>
Reviewed-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/net/sctp/proc.c b/net/sctp/proc.c
index 3e62ee55228f..d9cb2ab149fe 100644
--- a/net/sctp/proc.c
+++ b/net/sctp/proc.c
@@ -199,7 +199,6 @@ static void * sctp_eps_seq_next(struct seq_file *seq, void *v, loff_t *pos)
/* Display sctp endpoints (/proc/net/sctp/eps). */
static int sctp_eps_seq_show(str... |
6f21a62a58bc3c80cd8b05cacb55003cccd4863e | Analyze and fix the following issue in the Linux kernel code: firmware loader: fix comments on request_firmware_nowait | Problem Details:
request_firmware_nowait is allowed to be called in atomic
context now if @gfp is GFP_ATOMIC, so fix the obsolete
comments and states which situations are suitable for using
it.
Signed-off-by: Ming Lei <ming.lei@canonical.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah... | ```diff
diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c
index 7d3a83bb1318..a47266ccfc60 100644
--- a/drivers/base/firmware_class.c
+++ b/drivers/base/firmware_class.c
@@ -846,9 +846,13 @@ static void request_firmware_work_func(struct work_struct *work)
*
* Caller must hold the reference ... |
0cfc1e1e7b5347b4b6df1212f365ce6620bdd98f | Analyze and fix the following issue in the Linux kernel code: firmware loader: fix device lifetime | Problem Details:
Callers of request_firmware* must hold the reference count of
@device, otherwise it is easy to trigger oops since the firmware
loader device is the child of @device.
This patch adds comments about the usage. In fact, most of drivers
call request_firmware* in its probe() or open(), so the constraint
sh... | ```diff
diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c
index fc119ce6fdb8..7d3a83bb1318 100644
--- a/drivers/base/firmware_class.c
+++ b/drivers/base/firmware_class.c
@@ -742,6 +742,8 @@ err_put_dev:
* @name will be used as $FIRMWARE in the uevent environment and
* should be di... |
b291f1b1c86aa0c7bc3df2994e6a1a4e53f1fde0 | Analyze and fix the following issue in the Linux kernel code: NFSv4: Fix the acl cache size calculation | Problem Details:
Currently, we do not take into account the size of the 16 byte
struct nfs4_cached_acl header, when deciding whether or not we should
cache the acl data. Consequently, we will end up allocating an
8k buffer in order to fit a maximum size 4k acl.
This patch adjusts the calculation so that we limit the ... | ```diff
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index 286ab7078413..635274140b18 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -3737,9 +3737,10 @@ out:
static void nfs4_write_cached_acl(struct inode *inode, struct page **pages, size_t pgbase, size_t acl_len)
{
struct nfs4_cached_acl *acl;
+ s... |
519d3959e30a98f8e135e7a16647c10af5ad63d5 | Analyze and fix the following issue in the Linux kernel code: NFSv4: Fix pointer arithmetic in decode_getacl | Problem Details:
Resetting the cursor xdr->p to a previous value is not a safe
practice: if the xdr_stream has crossed out of the initial iovec,
then a bunch of other fields would need to be reset too.
Fix this issue by using xdr_enter_page() so that the buffer gets
page aligned at the bitmap _before_ we decode it.
A... | ```diff
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index c77d296bdaa6..286ab7078413 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -3819,7 +3819,7 @@ static ssize_t __nfs4_get_acl_uncached(struct inode *inode, void *buf, size_t bu
if (ret)
goto out_free;
- acl_len = res.acl_len - res.acl_data_... |
1ae811ee27912a0521e4b92dc9a1850c0243a247 | Analyze and fix the following issue in the Linux kernel code: NFS: Fix a regression when loading the NFS v4 module | Problem Details:
Some systems have a modprobe.d/nfs.conf file that sets an nfs4 alias
pointing to nfs.ko, rather than nfs4.ko. This can prevent the v4 module
from loading on mount, since the kernel sees that something named "nfs4"
has already been loaded. To work around this, I've renamed the modules
to "nfsv2.ko" "n... | ```diff
diff --git a/fs/nfs/Makefile b/fs/nfs/Makefile
index 8bf3a3f6925a..b7db60897f91 100644
--- a/fs/nfs/Makefile
+++ b/fs/nfs/Makefile
@@ -12,19 +12,19 @@ nfs-$(CONFIG_ROOT_NFS) += nfsroot.o
nfs-$(CONFIG_SYSCTL) += sysctl.o
nfs-$(CONFIG_NFS_FSCACHE) += fscache.o fscache-index.o
-obj-$(CONFIG_NFS_V2) += nfs2.o
-... |
99c2aa72306079976369aad7fc62cc71931d692a | Analyze and fix the following issue in the Linux kernel code: firmware loader: fix creation failure of fw loader device | Problem Details:
If one device driver calls request_firmware_nowait() to request
several different firmwares' loading, device_add() will return
failure since all firmware loader device use same name of the
device who is requesting firmware.
This patch always use the name of firmware image as the firmware
loader device... | ```diff
diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c
index 0bd09c7545c9..04c75b56f4fc 100644
--- a/drivers/base/firmware_class.c
+++ b/drivers/base/firmware_class.c
@@ -452,7 +452,7 @@ fw_create_instance(struct firmware *firmware, const char *fw_name,
f_dev = &fw_priv->dev;
device_in... |
28eefa750b5e16b13bb869c2c4f7d624a43eb48b | Analyze and fix the following issue in the Linux kernel code: firmware loader: fix races during loading firmware | Problem Details:
This patch fixes two races in loading firmware:
1, FW_STATUS_DONE should be set before waking up the task waitting
on _request_firmware_load, otherwise FW_STATUS_ABORT may be
thought as DONE mistakenly.
2, Inside _request_firmware_load(), there is a small window between
wait_for_completion() and mute... | ```diff
diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c
index 1cbefcfd15f7..1915ad821688 100644
--- a/drivers/base/firmware_class.c
+++ b/drivers/base/firmware_class.c
@@ -243,18 +243,21 @@ static ssize_t firmware_loading_store(struct device *dev,
switch (loading) {
case 1:
/* discardi... |
65710cb6ea315b3ef76a8a3da7be99afcf58d2bb | Analyze and fix the following issue in the Linux kernel code: firmware loader: simplify pages ownership transfer | Problem Details:
This patch doesn't transfer ownership of pages' buffer to the
instance of firmware until the firmware loading is completed,
which will simplify firmware_loading_store a lot, so help
to introduce the following cache_firmware and uncache_firmware
mechanism during system suspend-resume cycle.
In fact, th... | ```diff
diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c
index 803cfc1597a9..1cbefcfd15f7 100644
--- a/drivers/base/firmware_class.c
+++ b/drivers/base/firmware_class.c
@@ -93,6 +93,8 @@ struct firmware_priv {
struct completion completion;
struct firmware *fw;
unsigned long status;
+ voi... |
224a257190694f253f7a4c533fd6958d2e5fa669 | Analyze and fix the following issue in the Linux kernel code: localmodconfig: Set default value for ksource in streamline_config.pl | Problem Details:
Running streamline_config.pl as it's shown it in the comment header,
you will get a warning about $ksource being uninitialized. This is
because $ksource is set to ARGV[0], but the examples don't require any
arguments. Fix by setting ksource to . if no ARGV[0] is given.
Signed-off-by: Bill Pemberton ... | ```diff
diff --git a/scripts/kconfig/streamline_config.pl b/scripts/kconfig/streamline_config.pl
index 2fbbbc1ddea0..e3687f98e0c8 100644
--- a/scripts/kconfig/streamline_config.pl
+++ b/scripts/kconfig/streamline_config.pl
@@ -135,7 +135,7 @@ GetOptions("localmodconfig" => \$localmodconfig,
"localyesconfig" => \$l... |
f3d9d365ff7f36c4e3491ef31788449f419b781b | Analyze and fix the following issue in the Linux kernel code: ti-st: Fix check for pdata->chip_awake function pointer | Problem Details:
ll_device_want_to_wakeup(): Fix the NULL pointer check on pdata->chip_awake,
which is performed on the wrong function pointer
Signed-off-by: Matthias Kaehlcke <matthias@kaehlcke.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | ```diff
diff --git a/drivers/misc/ti-st/st_ll.c b/drivers/misc/ti-st/st_ll.c
index 1ff460a8e9c7..93b4d67cc4a3 100644
--- a/drivers/misc/ti-st/st_ll.c
+++ b/drivers/misc/ti-st/st_ll.c
@@ -87,7 +87,7 @@ static void ll_device_want_to_wakeup(struct st_data_s *st_data)
/* communicate to platform about chip wakeup */
kim... |
95d1c8c7e26e303ccab5b65fe0ce04f70f42ea8a | Analyze and fix the following issue in the Linux kernel code: iio: lm3533-als: Fix build warnings | Problem Details:
Fix below build warnings:
CC [M] drivers/iio/light/lm3533-als.o
drivers/iio/light/lm3533-als.c:667:8: warning: initialization from incompatible pointer type [enabled by default]
drivers/iio/light/lm3533-als.c:667:8: warning: (near initialization for 'dev_attr_in_illuminance0_thresh_either_en.show') ... | ```diff
diff --git a/drivers/iio/light/lm3533-als.c b/drivers/iio/light/lm3533-als.c
index c3e7bac13123..e45712a921ce 100644
--- a/drivers/iio/light/lm3533-als.c
+++ b/drivers/iio/light/lm3533-als.c
@@ -404,7 +404,7 @@ out:
return ret;
}
-static int show_thresh_either_en(struct device *dev,
+static ssize_t show_th... |
74aa933894e1c32376a8372ec8264b8c6f7faf24 | Analyze and fix the following issue in the Linux kernel code: staging:iio:ad7192: Fix setting ACX | Problem Details:
Write to the correct register when setting the ACX bit.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org> | ```diff
diff --git a/drivers/staging/iio/adc/ad7192.c b/drivers/staging/iio/adc/ad7192.c
index b9a74425ff75..0a1bc6a31d02 100644
--- a/drivers/staging/iio/adc/ad7192.c
+++ b/drivers/staging/iio/adc/ad7192.c
@@ -754,7 +754,7 @@ static ssize_t ad7192_set(struct device *dev,
else
st->mode &= ~AD7192_MODE_ACX;
- ... |
87a0c1574d2fd478c24e841c96f5019e5b44762f | Analyze and fix the following issue in the Linux kernel code: staging:iio:ad7793: Fix internal reference value | Problem Details:
The internal reference for the ad7793 and similar is 1.17V
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org> | ```diff
diff --git a/drivers/staging/iio/adc/ad7793.c b/drivers/staging/iio/adc/ad7793.c
index 91cb95c67635..112e2b7b5bc4 100644
--- a/drivers/staging/iio/adc/ad7793.c
+++ b/drivers/staging/iio/adc/ad7793.c
@@ -922,7 +922,7 @@ static int __devinit ad7793_probe(struct spi_device *spi)
else if (voltage_uv)
st->int_v... |
2a9e0662f6779d2074ecaa80ea5753d5f0cf1b93 | Analyze and fix the following issue in the Linux kernel code: staging:iio:ad7793: Fix temperature scale and offset | Problem Details:
The temperature channel uses the internal 1.17V reference with 0.81 mv/C. The
reported temperature is in Kevlin, so we need to add the Kelvin to Celcius
offset when reporting the offset for the temperature channel.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <ji... | ```diff
diff --git a/drivers/staging/iio/adc/ad7793.c b/drivers/staging/iio/adc/ad7793.c
index 56014a8b6876..3c8d1d4c6192 100644
--- a/drivers/staging/iio/adc/ad7793.c
+++ b/drivers/staging/iio/adc/ad7793.c
@@ -617,30 +617,37 @@ static int ad7793_read_raw(struct iio_dev *indio_dev,
return IIO_VAL_INT_PLUS_NANO;
... |
1c795ebd00042b3a5c97e049fd1c08763714a7a8 | Analyze and fix the following issue in the Linux kernel code: iio/adjd_s311: Fix potential memory leak in adjd_s311_update_scan_mode() | Problem Details:
Do not leak memory by updating pointer with potentially NULL realloc return value.
There is no need to preserve data in the buffer,
so replace krealloc() by kfree()-kmalloc() pair.
Found by Linux Driver Verification project (linuxtesting.org).
Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>... | ```diff
diff --git a/drivers/iio/light/adjd_s311.c b/drivers/iio/light/adjd_s311.c
index 1cbb449b319a..9a99f43094f0 100644
--- a/drivers/iio/light/adjd_s311.c
+++ b/drivers/iio/light/adjd_s311.c
@@ -271,9 +271,10 @@ static int adjd_s311_update_scan_mode(struct iio_dev *indio_dev,
const unsigned long *scan_mask)
{
... |
8857df3aceb7a8eb7558059b7da109e41dd1fb95 | Analyze and fix the following issue in the Linux kernel code: iio: frequency: ADF4350: Fix potential reference div factor overflow. | Problem Details:
With small channel spacing values and high reference frequencies it is
possible to exceed the range of the 10-bit counter.
Workaround by checking the range and widening some constrains.
We don't use the REG1_PHASE value in this case the datasheet recommends to set
it to 1 if not used.
Signed-off-by: ... | ```diff
diff --git a/drivers/iio/frequency/adf4350.c b/drivers/iio/frequency/adf4350.c
index 59fbb3ae40e7..e35bb8f6fe75 100644
--- a/drivers/iio/frequency/adf4350.c
+++ b/drivers/iio/frequency/adf4350.c
@@ -129,7 +129,7 @@ static int adf4350_set_freq(struct adf4350_state *st, unsigned long long freq)
{
struct adf435... |
dfffd0d65fdf16d034681716dcbea74776f62e40 | Analyze and fix the following issue in the Linux kernel code: iio: staging: ad7298_ring: Fix maybe-uninitialized warning | Problem Details:
drivers/staging/iio/adc/ad7298_ring.c:97:37: warning: 'time_ns' may
be used uninitialized in this function [-Wmaybe-uninitialized]
Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org> | ```diff
diff --git a/drivers/staging/iio/adc/ad7298_ring.c b/drivers/staging/iio/adc/ad7298_ring.c
index fd1d855ff57a..506016f01593 100644
--- a/drivers/staging/iio/adc/ad7298_ring.c
+++ b/drivers/staging/iio/adc/ad7298_ring.c
@@ -76,7 +76,7 @@ static irqreturn_t ad7298_trigger_handler(int irq, void *p)
struct iio_de... |
38f8eefccf3a23c4058a570fa2938a4f553cf8e0 | Analyze and fix the following issue in the Linux kernel code: pmac_zilog,kdb: Fix console poll hook to return instead of loop | Problem Details:
kdb <-> kgdb transitioning does not work properly with this UART
driver because the get character routine loops indefinitely as opposed
to returning NO_POLL_CHAR per the expectation of the KDB I/O driver
API.
The symptom is a kernel hang when trying to switch debug modes.
Cc: Alan Cox <alan@linux.int... | ```diff
diff --git a/drivers/tty/serial/pmac_zilog.c b/drivers/tty/serial/pmac_zilog.c
index 654755a990df..333c8d012b0e 100644
--- a/drivers/tty/serial/pmac_zilog.c
+++ b/drivers/tty/serial/pmac_zilog.c
@@ -1348,10 +1348,16 @@ static int pmz_verify_port(struct uart_port *port, struct serial_struct *ser)
static int pmz... |
00592021010ad86d3b26bac7034034f6af145a2c | Analyze and fix the following issue in the Linux kernel code: serial: mxs-auart: fix the wrong RTS hardware flow control | Problem Details:
Without checking if the auart supports the hardware flow control or not,
the old mxs_auart_set_mctrl() asserted the RTS pin blindly.
This will causes the auart receives wrong data in the following case:
The far-end has already started the write operation, and wait for
the auart asserts the RTS pin.... | ```diff
diff --git a/drivers/tty/serial/mxs-auart.c b/drivers/tty/serial/mxs-auart.c
index 2e341b81ff89..3a667eed63d6 100644
--- a/drivers/tty/serial/mxs-auart.c
+++ b/drivers/tty/serial/mxs-auart.c
@@ -73,6 +73,7 @@
#define AUART_CTRL0_CLKGATE (1 << 30)
#define AUART_CTRL2_CTSEN (1 << 15)
+#define AUART_CTRL2_... |
221ca778d677c5ec3a33385a3b6dd548174252a6 | Analyze and fix the following issue in the Linux kernel code: serial: sc26xx: Fix compile breakage | Problem Details:
This patch fixes the following compile breakage:
CC drivers/tty/serial/sc26xx.o
drivers/tty/serial/sc26xx.c: In function 'read_sc_port':
drivers/tty/serial/sc26xx.c:100: error: implicit declaration of function 'readb'
drivers/tty/serial/sc26xx.c: In function 'write_sc_port':
drivers/tty/serial/... | ```diff
diff --git a/drivers/tty/serial/sc26xx.c b/drivers/tty/serial/sc26xx.c
index e0b4b0a30a5a..3992e48b4c71 100644
--- a/drivers/tty/serial/sc26xx.c
+++ b/drivers/tty/serial/sc26xx.c
@@ -20,6 +20,7 @@
#include <linux/init.h>
#include <linux/platform_device.h>
#include <linux/irq.h>
+#include <linux/io.h>
#if ... |
88ed2a60610974443335c924d7cb8e5dcf9dbdc1 | Analyze and fix the following issue in the Linux kernel code: n_gsm: memory leak in uplink error path | Problem Details:
Uplink (TX) network data will go through gsm_dlci_data_output_framed
there is a bug where if memory allocation fails, the skb which
has already been pulled off the list will be lost.
In addition TX skbs were being processed in LIFO order
Fixed the memory leak, and changed to FIFO order processing
Si... | ```diff
diff --git a/drivers/tty/n_gsm.c b/drivers/tty/n_gsm.c
index a8c82f5d769b..3e210a430fb3 100644
--- a/drivers/tty/n_gsm.c
+++ b/drivers/tty/n_gsm.c
@@ -868,7 +868,7 @@ static int gsm_dlci_data_output_framed(struct gsm_mux *gsm,
/* dlci->skb is locked by tx_lock */
if (dlci->skb == NULL) {
- dlci->skb = sk... |
b4338e1efc339986cf6c0a3652906e914a86e2d3 | Analyze and fix the following issue in the Linux kernel code: n_gsm: avoid accessing freed memory during CMD_FCOFF condition | Problem Details:
gsm_data_kick was recently modified to allow messages on the
tx queue bound for DLCI0 to flow even during FCOFF conditions.
Unfortunately we introduced a bug discovered by code inspection
where subsequent list traversers can access freed memory if
the DLCI0 messages were not all at the head of the list... | ```diff
diff --git a/drivers/tty/n_gsm.c b/drivers/tty/n_gsm.c
index 0d93e51cb23d..6f4f8d3654d2 100644
--- a/drivers/tty/n_gsm.c
+++ b/drivers/tty/n_gsm.c
@@ -108,7 +108,7 @@ struct gsm_mux_net {
*/
struct gsm_msg {
- struct gsm_msg *next;
+ struct list_head list;
u8 addr; /* DLCI address + flags */
u8 ctrl; ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.