id stringlengths 40 40 | instruction stringlengths 68 308 | input stringlengths 17 33.4k | output stringlengths 100 30k |
|---|---|---|---|
8a9a0ea6032186e3030419262678d652b88bf6a8 | Analyze and fix the following issue in the Linux kernel code: net/ethernet: ks8851_mll fix rx frame buffer overflow | Problem Details:
At the beginning of ks_rcv(), a for loop retrieves the
header information relevant to all the frames stored
in the mac's internal buffers. The number of pending
frames is stored as an 8 bits field in KS_RXFCTR.
If interrupts are disabled long enough to allow for more than
32 frames to accumulate in the... | ```diff
diff --git a/drivers/net/ethernet/micrel/ks8851_mll.c b/drivers/net/ethernet/micrel/ks8851_mll.c
index b8104d9f4081..5ffde23ac8fb 100644
--- a/drivers/net/ethernet/micrel/ks8851_mll.c
+++ b/drivers/net/ethernet/micrel/ks8851_mll.c
@@ -40,7 +40,7 @@
#define DRV_NAME "ks8851_mll"
static u8 KS_DEFAULT_MAC_ADDR... |
e3b6193378e8549d04849eda496129f94406ed36 | Analyze and fix the following issue in the Linux kernel code: perf archive: Correct cutting of symbolic link | Problem Details:
If a '$PERF_BUILDID_DIR'(typically $HOME/.debug) is a symbolic link
directory, cutting of the path will fail.
Here is an example where a buildid directory is a symbolic link.
/ # ls -al /root
lrwxrwxrwx 1 root root 13 Mar 26 2012 /root -> opt/home/root
/ # cd ~
/opt/home/root # per... | ```diff
diff --git a/tools/perf/perf-archive.sh b/tools/perf/perf-archive.sh
index 677e59d62a8d..95b6f8b6177a 100644
--- a/tools/perf/perf-archive.sh
+++ b/tools/perf/perf-archive.sh
@@ -29,13 +29,14 @@ if [ ! -s $BUILDIDS ] ; then
fi
MANIFEST=$(mktemp /tmp/perf-archive-manifest.XXXXXX)
+PERF_BUILDID_LINKDIR=$(read... |
77394ad6e465ee3cc3d3cf448c8500c57ced60bf | Analyze and fix the following issue in the Linux kernel code: perf tools: Ignore auto-generated bison/flex files | Problem Details:
The commit 65f3e56e0c81 ("perf tools: Remove auto-generated bison/flex
files") removed those files from git, so they'll be listed on untracked
files after building perf. Fix it.
Signed-off-by: Namhyung Kim <namhyung.kim@lge.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Namhyung Kim <namhyung@gmail.com>
... | ```diff
diff --git a/tools/perf/.gitignore b/tools/perf/.gitignore
index 416684be0ad3..26b823b61aa1 100644
--- a/tools/perf/.gitignore
+++ b/tools/perf/.gitignore
@@ -19,3 +19,5 @@ TAGS
cscope*
config.mak
config.mak.autogen
+*-bison.*
+*-flex.*
``` |
2a5204fed0f313f9b55a7b4d5f48ca484446d095 | Analyze and fix the following issue in the Linux kernel code: perf tools: Fix parsers' rules to dependencies | Problem Details:
Currently the parsers objects (bison/flex related) are each time perf
is built. No matter the generated files are already in place, the
parser generation is executed every time.
Changing the rules to have proper flex/bison objects generation
dependencies.
The parsers code is not rebuilt until the fle... | ```diff
diff --git a/tools/perf/Makefile b/tools/perf/Makefile
index a20d0c599b22..03059e75665a 100644
--- a/tools/perf/Makefile
+++ b/tools/perf/Makefile
@@ -237,21 +237,20 @@ export PERL_PATH
FLEX = $(CROSS_COMPILE)flex
BISON= $(CROSS_COMPILE)bison
-event-parser:
- $(QUIET_BISON)$(BISON) -v util/parse-events.y -d... |
5ad14306a3f468df61e1739f9f252663f18f1702 | Analyze and fix the following issue in the Linux kernel code: ARM: EXYNOS: Fix Kconfig dependencies for device tree enabled machine files | Problem Details:
Add config dependency for Exynos4 and Exynos5 device tree enabled machine
files on config options ARCH_EXYNOS4 and ARCH_EXYNOS5 respectively.
Enabling machine support without proper ARCH support enabled is incorrect.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Kukjin Kim <kgen... | ```diff
diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig
index 0491ceef1cda..e81c35f936b5 100644
--- a/arch/arm/mach-exynos/Kconfig
+++ b/arch/arm/mach-exynos/Kconfig
@@ -368,6 +368,7 @@ comment "Flattened Device Tree based board for EXYNOS SoCs"
config MACH_EXYNOS4_DT
bool "Samsung Exynos4... |
3d3231b1c986aa3ee1d94ffe36082faf45f0d96b | Analyze and fix the following issue in the Linux kernel code: ARM: EXYNOS: set fix xusbxti clock for NURI and Universal210 boards | Problem Details:
On some versions of NURI and UniversalC210 boards, camera clocks are
routed directly to xusbxti clock source. This patch sets the correct
value for this clock to let usb and camera sensors to work correctly and
avoid division by zero on driver's probe.
Signed-off-by: Marek Szyprowski <m.szyprowski@sam... | ```diff
diff --git a/arch/arm/mach-exynos/mach-nuri.c b/arch/arm/mach-exynos/mach-nuri.c
index f92ec88b1266..dd3ec8eef841 100644
--- a/arch/arm/mach-exynos/mach-nuri.c
+++ b/arch/arm/mach-exynos/mach-nuri.c
@@ -1347,6 +1347,7 @@ static struct platform_device *nuri_devices[] __initdata = {
static void __init nuri_map... |
f441f8a0a180827e3f7bd705aed9cffba62cebc2 | Analyze and fix the following issue in the Linux kernel code: ARM: EXYNOS: fix regulator name for NURI board | Problem Details:
Regulator names should not contain slash to avoid issues with debugfs.
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com> | ```diff
diff --git a/arch/arm/mach-exynos/mach-nuri.c b/arch/arm/mach-exynos/mach-nuri.c
index b3982c867c9c..f92ec88b1266 100644
--- a/arch/arm/mach-exynos/mach-nuri.c
+++ b/arch/arm/mach-exynos/mach-nuri.c
@@ -571,7 +571,7 @@ static struct regulator_init_data __initdata max8997_ldo7_data = {
static struct regulator... |
3cd21f6162e7703adc13c5030f316db9ec6bf5cf | Analyze and fix the following issue in the Linux kernel code: ARM: SAMSUNG: make SAMSUNG_PM_DEBUG select DEBUG_LL | Problem Details:
When selecting SAMSUNG_PM_DEBUG, it complains about a missing printascii()
function if you do not select DEBUG_LL, so make the former select the latter.
Signed-off-by: Maurus Cuelenaere <mcuelenaere@gmail.com>
Acked-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com> | ```diff
diff --git a/arch/arm/plat-samsung/Kconfig b/arch/arm/plat-samsung/Kconfig
index 71553f410016..a0ffc77da809 100644
--- a/arch/arm/plat-samsung/Kconfig
+++ b/arch/arm/plat-samsung/Kconfig
@@ -302,6 +302,7 @@ comment "Power management"
config SAMSUNG_PM_DEBUG
bool "S3C2410 PM Suspend debug"
depends on PM
+ s... |
cbc91f71b51b8335f1fc7ccfca8011f31a717367 | Analyze and fix the following issue in the Linux kernel code: uprobes/core: Decrement uprobe count before the pages are unmapped | Problem Details:
Uprobes has a callback (uprobe_munmap()) in the unmap path to
maintain the uprobes count.
In the exit path this callback gets called in unlink_file_vma().
However by the time unlink_file_vma() is called, the pages would
have been unmapped (in unmap_vmas()) and the task->rss_stat counts
accounted (in z... | ```diff
diff --git a/include/linux/uprobes.h b/include/linux/uprobes.h
index d594d3b3ad4c..efe4b3308c74 100644
--- a/include/linux/uprobes.h
+++ b/include/linux/uprobes.h
@@ -107,7 +107,7 @@ extern bool __weak is_swbp_insn(uprobe_opcode_t *insn);
extern int uprobe_register(struct inode *inode, loff_t offset, struct up... |
7396fa818d6278694a44840f389ddc40a3269a9a | Analyze and fix the following issue in the Linux kernel code: uprobes/core: Make background page replacement logic account for rss_stat counters | Problem Details:
Background page replacement logic adds a new anonymous page
instead of a file backed (while inserting a breakpoint) /
anonymous page (while removing a breakpoint).
Hence the uprobes logic should take care to update the
task->ss_stat counters accordingly.
This bug became apparent courtesy of commit c3... | ```diff
diff --git a/kernel/events/uprobes.c b/kernel/events/uprobes.c
index 29e881b0137d..c5caeecea1dc 100644
--- a/kernel/events/uprobes.c
+++ b/kernel/events/uprobes.c
@@ -160,6 +160,11 @@ static int __replace_page(struct vm_area_struct *vma, struct page *page, struct
get_page(kpage);
page_add_new_anon_rmap(kpag... |
c509e754af96882eb46130e215cc4aa8f763d4ac | Analyze and fix the following issue in the Linux kernel code: ixgbe: fix WoL issue with fiber | Problem Details:
There are times we turn of the laser before shutdown. This is a bad thing
if we want to wake on lan to work so now we make sure the laser is on
before shutdown if we support WoL.
Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
Tested-by: Stephen Ko <stephen.s.ko@intel.com>
Signed-off-by: Je... | ```diff
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
index 3e26b1f9ac75..dac7c01f8332 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
@@ -4893,6 +4893,16 @@ static int __ixgbe_shutdown(struct pci... |
92fe173391b3e0d0a7212fa8b9d72c8d61f31c26 | Analyze and fix the following issue in the Linux kernel code: e1000e: issues in Sx on 82577/8/9 | Problem Details:
A workaround was previously put in the driver to reset the device when
transitioning to Sx in order to activate the changed settings of the PHY
OEM bits (Low Power Link Up, or LPLU, and GbE disable configuration) for
82577/8/9 devices. After further review, it was found such a reset can
cause the 8257... | ```diff
diff --git a/drivers/net/ethernet/intel/e1000e/ich8lan.c b/drivers/net/ethernet/intel/e1000e/ich8lan.c
index 64c76443a7aa..b461c24945e3 100644
--- a/drivers/net/ethernet/intel/e1000e/ich8lan.c
+++ b/drivers/net/ethernet/intel/e1000e/ich8lan.c
@@ -1310,10 +1310,6 @@ static s32 e1000_oem_bits_config_ich8lan(struc... |
6e48b550d1f5f1919e6500547ae14a73fbf66c7b | Analyze and fix the following issue in the Linux kernel code: tracing: Fix build breakage without CONFIG_PERF_EVENTS (again) | Problem Details:
Today's -next fails to link for me:
kernel/built-in.o:(.data+0x178e50): undefined reference to `perf_ftrace_event_register'
It looks like multiple fixes have been merged for the issue fixed by
commit fa73dc9 (tracing: Fix build breakage without CONFIG_PERF_EVENTS)
though I can't identify the other ch... | ```diff
diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h
index 95059f091a24..f95d65da6db8 100644
--- a/kernel/trace/trace.h
+++ b/kernel/trace/trace.h
@@ -836,11 +836,11 @@ extern const char *__stop___trace_bprintk_fmt[];
filter)
#include "trace_entries.h"
-#ifdef CONFIG_FUNCTION_TRACER
+#if defined(... |
8ac270d1e29f0428228ab2b9a8ae5e1ed4a5cd84 | Analyze and fix the following issue in the Linux kernel code: Documentation: prctl/seccomp_filter | Problem Details:
Documents how system call filtering using Berkeley Packet
Filter programs works and how it may be used.
Includes an example for x86 and a semi-generic
example using a macro-based code generator.
Acked-by: Eric Paris <eparis@redhat.com>
Signed-off-by: Will Drewry <wad@chromium.org>
Acked-by: Kees Cook ... | ```diff
diff --git a/Documentation/prctl/seccomp_filter.txt b/Documentation/prctl/seccomp_filter.txt
new file mode 100644
index 000000000000..597c3c581375
--- /dev/null
+++ b/Documentation/prctl/seccomp_filter.txt
@@ -0,0 +1,163 @@
+ SECure COMPuting with filters
+ =============================
+
+Introduction
+-----... |
a0727e8ce513fe6890416da960181ceb10fbfae6 | Analyze and fix the following issue in the Linux kernel code: signal, x86: add SIGSYS info and make it synchronous. | Problem Details:
This change enables SIGSYS, defines _sigfields._sigsys, and adds
x86 (compat) arch support. _sigsys defines fields which allow
a signal handler to receive the triggering system call number,
the relevant AUDIT_ARCH_* value for that number, and the address
of the callsite.
SIGSYS is added to the SYNCHR... | ```diff
diff --git a/arch/x86/ia32/ia32_signal.c b/arch/x86/ia32/ia32_signal.c
index a69245ba27e3..0b3f2354f6aa 100644
--- a/arch/x86/ia32/ia32_signal.c
+++ b/arch/x86/ia32/ia32_signal.c
@@ -67,6 +67,10 @@ int copy_siginfo_to_user32(compat_siginfo_t __user *to, siginfo_t *from)
switch (from->si_code >> 16) {
ca... |
acf3b2c71ed20c53dc69826683417703c2a88059 | Analyze and fix the following issue in the Linux kernel code: seccomp: add SECCOMP_RET_ERRNO | Problem Details:
This change adds the SECCOMP_RET_ERRNO as a valid return value from a
seccomp filter. Additionally, it makes the first use of the lower
16-bits for storing a filter-supplied errno. 16-bits is more than
enough for the errno-base.h calls.
Returning errors instead of immediately terminating processes t... | ```diff
diff --git a/arch/Kconfig b/arch/Kconfig
index 91c2c730fc1a..beaab68c13b7 100644
--- a/arch/Kconfig
+++ b/arch/Kconfig
@@ -220,8 +220,10 @@ config HAVE_ARCH_SECCOMP_FILTER
bool
help
This symbol should be selected by an architecure if it provides
- asm/syscall.h, specifically syscall_get_arguments() an... |
e2cfabdfd075648216f99c2c03821cf3f47c1727 | Analyze and fix the following issue in the Linux kernel code: seccomp: add system call filtering using BPF | Problem Details:
[This patch depends on luto@mit.edu's no_new_privs patch:
https://lkml.org/lkml/2012/1/30/264
The whole series including Andrew's patches can be found here:
https://github.com/redpig/linux/tree/seccomp
Complete diff here:
https://github.com/redpig/linux/compare/1dc65fed...seccomp
]
This pat... | ```diff
diff --git a/arch/Kconfig b/arch/Kconfig
index 684eb5af439d..91c2c730fc1a 100644
--- a/arch/Kconfig
+++ b/arch/Kconfig
@@ -216,4 +216,21 @@ config HAVE_CMPXCHG_DOUBLE
config ARCH_WANT_OLD_COMPAT_IPC
bool
+config HAVE_ARCH_SECCOMP_FILTER
+ bool
+ help
+ This symbol should be selected by an architecure if ... |
c29bceb3967398cf2ac8bf8edf9634fdb722df7d | Analyze and fix the following issue in the Linux kernel code: Fix execve behavior apparmor for PR_{GET,SET}_NO_NEW_PRIVS | Problem Details:
Add support for AppArmor to explicitly fail requested domain transitions
if NO_NEW_PRIVS is set and the task is not unconfined.
Transitions from unconfined are still allowed because this always results
in a reduction of privileges.
Acked-by: Eric Paris <eparis@redhat.com>
Signed-off-by: Will Drewry <... | ```diff
diff --git a/security/apparmor/domain.c b/security/apparmor/domain.c
index 18c88d06e881..b81ea10a17a3 100644
--- a/security/apparmor/domain.c
+++ b/security/apparmor/domain.c
@@ -360,10 +360,6 @@ int apparmor_bprm_set_creds(struct linux_binprm *bprm)
if (bprm->cred_prepared)
return 0;
- /* XXX: no_new_pr... |
259e5e6c75a910f3b5e656151dc602f53f9d7548 | Analyze and fix the following issue in the Linux kernel code: Add PR_{GET,SET}_NO_NEW_PRIVS to prevent execve from granting privs | Problem Details:
With this change, calling
prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0)
disables privilege granting operations at execve-time. For example, a
process will not be able to execute a setuid binary to change their uid
or gid if this bit is set. The same is true for file capabilities.
Additionally, LSM_UNSAFE... | ```diff
diff --git a/fs/exec.c b/fs/exec.c
index b1fd2025e59a..d038968b54b4 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -1245,6 +1245,13 @@ static int check_unsafe_exec(struct linux_binprm *bprm)
bprm->unsafe |= LSM_UNSAFE_PTRACE;
}
+ /*
+ * This isn't strictly necessary, but it makes it harder for LSMs to
+ * ... |
2d59dcfb54ade45cacc59a6e7bd96b8c19088c3d | Analyze and fix the following issue in the Linux kernel code: cpufreq: OMAP: fix build errors: depends on ARCH_OMAP2PLUS | Problem Details:
The OMAP driver needs a 'depends on ARCH_OMAP2PLUS' since it only
builds for OMAP2+ platforms.
This 'depends on' was in the original patch from Russell King, but was
erroneously removed by me when making this option user-selectable in
commit b09db45c (cpufreq: OMAP driver depends CPUfreq tables.) Thi... | ```diff
diff --git a/drivers/cpufreq/Kconfig.arm b/drivers/cpufreq/Kconfig.arm
index ffbb44685915..5961e6415f08 100644
--- a/drivers/cpufreq/Kconfig.arm
+++ b/drivers/cpufreq/Kconfig.arm
@@ -4,6 +4,7 @@
config ARM_OMAP2PLUS_CPUFREQ
bool "TI OMAP2+"
+ depends on ARCH_OMAP2PLUS
default ARCH_OMAP2PLUS
select CPU_... |
3d3eeb2ef26112a200785e5fca58ec58dd33bf1e | Analyze and fix the following issue in the Linux kernel code: sparc64: Eliminate obsolete __handle_softirq() function | Problem Details:
The invocation of softirq is now handled by irq_exit(), so there is no
need for sparc64 to invoke it on the trap-return path. In fact, doing so
is a bug because if the trap occurred in the idle loop, this invocation
can result in lockdep-RCU failures. The problem is that RCU ignores idle
CPUs, and th... | ```diff
diff --git a/arch/sparc/kernel/rtrap_64.S b/arch/sparc/kernel/rtrap_64.S
index 77f1b95e0806..9171fc238def 100644
--- a/arch/sparc/kernel/rtrap_64.S
+++ b/arch/sparc/kernel/rtrap_64.S
@@ -20,11 +20,6 @@
.text
.align 32
-__handle_softirq:
- call do_softirq
- nop
- ba,a,pt %xcc, __handle_softirq_... |
9e0daff30fd7ecf698e5d20b0fa7f851e427cca5 | Analyze and fix the following issue in the Linux kernel code: sparc64: Fix bootup crash on sun4v. | Problem Details:
The DS driver registers as a subsys_initcall() but this can be too
early, in particular this risks registering before we've had a chance
to allocate and setup module_kset in kernel/params.c which is
performed also as a subsyts_initcall().
Register DS using device_initcall() insteal.
Signed-off-by: Da... | ```diff
diff --git a/arch/sparc/kernel/ds.c b/arch/sparc/kernel/ds.c
index fea13c7b1aee..b93c2c9ccb1d 100644
--- a/arch/sparc/kernel/ds.c
+++ b/arch/sparc/kernel/ds.c
@@ -1264,4 +1264,4 @@ static int __init ds_init(void)
return vio_register_driver(&ds_driver);
}
-subsys_initcall(ds_init);
+fs_initcall(ds_init);
``... |
f58cc809d2fe60989095c7b55fd14e1935a2f72a | Analyze and fix the following issue in the Linux kernel code: ath9k_hw: Remove BTCOEX initvals | Problem Details:
The MAX_TXPWR table for BTCOEX is not needed for AR9462.
Programming these values to the HW results in undesirable
behavior - for example, large number of delimiter/data
underruns are seen in AES-CCMP mode. Also, registers like
AR_PCU_MISC_MODE2 return 0xdeadbeef after the BTCOEX_MAX
power table is pro... | ```diff
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_hw.c b/drivers/net/wireless/ath/ath9k/ar9003_hw.c
index 0f56e322dd3b..a0e3394b10dc 100644
--- a/drivers/net/wireless/ath/ath9k/ar9003_hw.c
+++ b/drivers/net/wireless/ath/ath9k/ar9003_hw.c
@@ -305,11 +305,6 @@ static void ar9003_hw_init_mode_regs(struct ath_hw *... |
d01b31604c55c52e08fbc6fc160137a12983df64 | Analyze and fix the following issue in the Linux kernel code: mac80211: fix an issue in ieee80211_tx_info count field management | Problem Details:
I noticed a possible issue in the status count field management of the
ieee80211_tx_info data structure. In particular, when the AGGR
processing is employed,
status.rates[].count is set just for the first frame and not for
others belonging to the same burst, leading to wrong statistic data in
the mac80... | ```diff
diff --git a/net/mac80211/status.c b/net/mac80211/status.c
index 5f8f89e89d6b..05f257aa2e08 100644
--- a/net/mac80211/status.c
+++ b/net/mac80211/status.c
@@ -355,7 +355,13 @@ void ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb)
int rtap_len;
for (i = 0; i < IEEE80211_TX_MAX_RATES; i++) ... |
133d40f9a22bdfd2617a446f1e3209537c5415ec | Analyze and fix the following issue in the Linux kernel code: mac80211: do not scan and monitor connection in parallel | Problem Details:
Before we send probes in connection monitoring we check if scan is not
pending. But we do that check without locking. Fix that and also do not
start scan if connection monitoring is in progress.
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.... | ```diff
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index 4be11ea3dfc4..1fd8cb26b3ff 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -1260,6 +1260,7 @@ int ieee80211_request_internal_scan(struct ieee80211_sub_if_data *sdata,
int ieee80211_request_scan(struct ieee802... |
3c5e979bd037888dd7d722da22da4b43659af485 | Analyze and fix the following issue in the Linux kernel code: net: smsc911x: fix skb handling in receive path | Problem Details:
The SMSC911x driver resets the ->head, ->data and ->tail pointers in the
skb on the reset path in order to avoid buffer overflow due to packet
padding performed by the hardware.
This patch fixes the receive path so that the skb pointers are fixed up
after the data has been read from the device, The er... | ```diff
diff --git a/drivers/net/ethernet/smsc/smsc911x.c b/drivers/net/ethernet/smsc/smsc911x.c
index 4a6971027076..5aa2dbe2bfb5 100644
--- a/drivers/net/ethernet/smsc/smsc911x.c
+++ b/drivers/net/ethernet/smsc/smsc911x.c
@@ -1166,10 +1166,8 @@ smsc911x_rx_counterrors(struct net_device *dev, unsigned int rxstat)
/*... |
32b92f4f3f261697a49f944e31920dbcbbd4ad01 | Analyze and fix the following issue in the Linux kernel code: ath5k: fix undefined 'THIS_MODULE' | Problem Details:
When cross compiling ath5k for a Mips machine with kernel 3.2.14
the compilation fails with "/ath5k/ahb.c:231:12: error: 'THIS_MODULE' undeclared here (not in a function)"
Fix the build by including <linux/export.h>
Signed-off-by: Jonathan Bither <jonbither@gmail.com>
Signed-off-by: John W. Linville <... | ```diff
diff --git a/drivers/net/wireless/ath/ath5k/ahb.c b/drivers/net/wireless/ath/ath5k/ahb.c
index 8faa129da5a0..47b6c35077d6 100644
--- a/drivers/net/wireless/ath/ath5k/ahb.c
+++ b/drivers/net/wireless/ath/ath5k/ahb.c
@@ -19,6 +19,7 @@
#include <linux/nl80211.h>
#include <linux/platform_device.h>
#include <linu... |
e55a4046dab28c440c96890bdddcf02dc8981f2d | Analyze and fix the following issue in the Linux kernel code: cfg80211: fix interface combinations check. | Problem Details:
Signed-off-by: Lukasz Kucharczyk <lukasz.kucharczyk@tieto.com>
Cc: stable@vger.kernel.org
Signed-off-by: John W. Linville <linville@tuxdriver.com> | ```diff
diff --git a/net/wireless/util.c b/net/wireless/util.c
index 1b7a08df933c..957f25621617 100644
--- a/net/wireless/util.c
+++ b/net/wireless/util.c
@@ -989,7 +989,7 @@ int cfg80211_can_change_interface(struct cfg80211_registered_device *rdev,
if (rdev->wiphy.software_iftypes & BIT(iftype))
continue;
... |
effcc625eb4ab3b10b4744237fd37e8f7dcd6511 | Analyze and fix the following issue in the Linux kernel code: libertas: fix signedness bug in lbs_auth_to_authtype() | Problem Details:
Return type for lbs_auth_to_authtype() is changed from "u8" to
"int" to return negative error code correctly.
Also an error check is added in connect handler for invalid auth
type.
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by... | ```diff
diff --git a/drivers/net/wireless/libertas/cfg.c b/drivers/net/wireless/libertas/cfg.c
index 3fa1ecebadfd..2fa879b015b6 100644
--- a/drivers/net/wireless/libertas/cfg.c
+++ b/drivers/net/wireless/libertas/cfg.c
@@ -103,7 +103,7 @@ static const u32 cipher_suites[] = {
* Convert NL80211's auth_type to the one f... |
51c61a2838c33dab7b6659b9a3e008bb1b40bc9b | Analyze and fix the following issue in the Linux kernel code: ks8851: Fix missing mutex_lock/unlock | Problem Details:
Move the ks8851_rdreg16 call above the call to request_irq and cache
the result for subsequent repeated use. A spurious interrupt may
otherwise cause a crash. Thanks to Stephen Boyd, Flavio Leitner, and
Ben Hutchings for feedback.
Signed-off-by: Matt Renzelmann <mjr@cs.wisc.edu>
Signed-off-by: David... | ```diff
diff --git a/drivers/net/ethernet/micrel/ks8851.c b/drivers/net/ethernet/micrel/ks8851.c
index c722aa607d07..e5dc0757f077 100644
--- a/drivers/net/ethernet/micrel/ks8851.c
+++ b/drivers/net/ethernet/micrel/ks8851.c
@@ -1418,6 +1418,7 @@ static int __devinit ks8851_probe(struct spi_device *spi)
struct net_devi... |
a7322fc2fa6417a5bc4f0a40e6e79608505416e2 | Analyze and fix the following issue in the Linux kernel code: staging:iio:Documentation: Fix a cut and paste error. | Problem Details:
falling is repeated in some entries instead of 1x falling and 1x rising
for the entry.
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | ```diff
diff --git a/drivers/staging/iio/Documentation/sysfs-bus-iio b/drivers/staging/iio/Documentation/sysfs-bus-iio
index 46a995d6d261..ca12784aa172 100644
--- a/drivers/staging/iio/Documentation/sysfs-bus-iio
+++ b/drivers/staging/iio/Documentation/sysfs-bus-iio
@@ -453,9 +453,9 @@ What: /sys/.../events/in_magn_z_... |
59a54f3082b9847c1240e24879750e3a03f96754 | Analyze and fix the following issue in the Linux kernel code: drivers/net/ethernet/xilinx/axi ethernet: Correct Copyright | Problem Details:
Also fix MAINTAINERS file to reflect autorship.
Daniel and Ariane changed coding style but not any functional changes in the driver
itself.
Signed-off-by: Michal Simek <monstr@monstr.eu>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/MAINTAINERS b/MAINTAINERS
index 32671e00800d..7cef7be8f840 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -7577,8 +7577,8 @@ F: Documentation/filesystems/xfs.txt
F: fs/xfs/
XILINX AXI ETHERNET DRIVER
-M: Ariane Keller <ariane.keller@tik.ee.ethz.ch>
-M: Daniel Borkmann <daniel.borkmann@tik.ee.eth... |
91ceae374e1ece88c8f575259ee0ad7da28ae8ab | Analyze and fix the following issue in the Linux kernel code: NET: pc300, move to staging as it is broken | Problem Details:
It was marked as BROKEN back in 2008. It is because the tty handling
in the driver is really broken.
There was some activity in January 2012 to fix the driver, but the
patch was commented to be bogus:
https://lkml.org/lkml/2012/1/29/160
and we have not heard back from the author since then:
https:... | ```diff
diff --git a/drivers/net/wan/Kconfig b/drivers/net/wan/Kconfig
index d70ede7a7f96..d58431e99f73 100644
--- a/drivers/net/wan/Kconfig
+++ b/drivers/net/wan/Kconfig
@@ -203,37 +203,6 @@ config WANXL_BUILD_FIRMWARE
You should never need this option, say N.
-config PC300
- tristate "Cyclades-PC300 support (... |
a2f892060f174e5f90041167ca00eb9e68badcb8 | Analyze and fix the following issue in the Linux kernel code: TTY: hvc, fix TTY refcounting | Problem Details:
A -next commit "TTY: HVC, use tty from tty_port" switched the driver
to use tty_port helper for tty refcounting. But it omitted to remove
manual tty refcounting from open, close and hangup. So now we are
getting random crashes caused by use-after-free:
Unable to handle kernel paging request for data at... | ```diff
diff --git a/drivers/tty/hvc/hvc_console.c b/drivers/tty/hvc/hvc_console.c
index 6c45cbf3fc91..2d691eb7c40a 100644
--- a/drivers/tty/hvc/hvc_console.c
+++ b/drivers/tty/hvc/hvc_console.c
@@ -317,8 +317,6 @@ static int hvc_open(struct tty_struct *tty, struct file * filp)
/* Check and then increment for fast pa... |
e847469bf77a1d339274074ed068d461f0c872bc | Analyze and fix the following issue in the Linux kernel code: lockd: fix the endianness bug | Problem Details:
comparing be32 values for < is not doing the right thing...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> | ```diff
diff --git a/fs/lockd/clnt4xdr.c b/fs/lockd/clnt4xdr.c
index 3ddcbb1c0a43..13ad1539fbf2 100644
--- a/fs/lockd/clnt4xdr.c
+++ b/fs/lockd/clnt4xdr.c
@@ -241,7 +241,7 @@ static int decode_nlm4_stat(struct xdr_stream *xdr, __be32 *stat)
p = xdr_inline_decode(xdr, 4);
if (unlikely(p == NULL))
goto out_overflo... |
a8c9cb106fe79c28d6b7f1397652cadd228715ff | Analyze and fix the following issue in the Linux kernel code: 8139cp: set intr mask after its handler is registered | Problem Details:
We set intr mask before its handler is registered, this does not work well when
8139cp is sharing irq line with other devices. As the irq could be enabled by
the device before 8139cp's hander is registered which may lead unhandled
irq. Fix this by introducing an helper cp_irq_enable() and call it after... | ```diff
diff --git a/drivers/net/ethernet/realtek/8139cp.c b/drivers/net/ethernet/realtek/8139cp.c
index abc79076f867..b3287c0fe279 100644
--- a/drivers/net/ethernet/realtek/8139cp.c
+++ b/drivers/net/ethernet/realtek/8139cp.c
@@ -958,6 +958,11 @@ static inline void cp_start_hw (struct cp_private *cp)
cpw8(Cmd, RxOn ... |
03662e41c7cff64a776bfb1b3816de4be43de881 | Analyze and fix the following issue in the Linux kernel code: atl1: fix kernel panic in case of DMA errors | Problem Details:
Problem:
There was two separate work_struct structures which share one
handler. Unfortunately getting atl1_adapter structure from
work_struct in case of DMA error was done from incorrect
offset which cause kernel panics.
Solution:
The useless work_struct for DMA error removed and
handler name changed ... | ```diff
diff --git a/drivers/net/ethernet/atheros/atlx/atl1.c b/drivers/net/ethernet/atheros/atlx/atl1.c
index 40ac41436549..c926857e8205 100644
--- a/drivers/net/ethernet/atheros/atlx/atl1.c
+++ b/drivers/net/ethernet/atheros/atlx/atl1.c
@@ -2476,7 +2476,7 @@ static irqreturn_t atl1_intr(int irq, void *data)
"pc... |
77577bf93275b485cecb4f358a085949c32e9dcd | Analyze and fix the following issue in the Linux kernel code: net: WIZnet drivers: fix possible NULL dereference | Problem Details:
This fixes possible null dereference in probe() function: when both
.mac_addr and .link_gpio are unknown, dev.platform_data may be NULL
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mike Sinkovsky <msink@permonline.ru>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/drivers/net/ethernet/wiznet/w5100.c b/drivers/net/ethernet/wiznet/w5100.c
index 18c80982fc6c..a75e9ef5a4ce 100644
--- a/drivers/net/ethernet/wiznet/w5100.c
+++ b/drivers/net/ethernet/wiznet/w5100.c
@@ -682,7 +682,7 @@ static int __devinit w5100_hw_probe(struct platform_device *pdev)
return ret;
... |
9b17876f3e674a794a2d83aa47a9b356d36b7418 | Analyze and fix the following issue in the Linux kernel code: rtnetlink: fix comments | Problem Details:
Fix spelling and references in rtnetlink.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/include/net/rtnetlink.h b/include/net/rtnetlink.h
index 58243739212c..9b8250152c90 100644
--- a/include/net/rtnetlink.h
+++ b/include/net/rtnetlink.h
@@ -41,9 +41,11 @@ static inline int rtnl_msg_family(const struct nlmsghdr *nlh)
* @get_size: Function to calculate required room for dumping devic... |
af33eadc73e4a5d35a966c1c7ffe28a8424c9d96 | Analyze and fix the following issue in the Linux kernel code: ARM: msm: Fix section mismatches in proc_comm.c | Problem Details:
The change
commit 4416e9eb0b4859b3d28016c5fd0a609bdcbc8a2a
Author: Gregory Bean <gbean@codeaurora.org>
Date: Wed Jul 28 10:22:12 2010 -0700
arm: msm: Fix section mismatch in smd.c.
fixes a section mismatch between the board file and the smd driver's
probe function, however, it m... | ```diff
diff --git a/arch/arm/mach-msm/proc_comm.c b/arch/arm/mach-msm/proc_comm.c
index 67e701c7f183..9980dc736e7b 100644
--- a/arch/arm/mach-msm/proc_comm.c
+++ b/arch/arm/mach-msm/proc_comm.c
@@ -121,7 +121,7 @@ int msm_proc_comm(unsigned cmd, unsigned *data1, unsigned *data2)
* and unknown state. This function sh... |
e89c0e4377303a101d1032bf1dde822218372f15 | Analyze and fix the following issue in the Linux kernel code: video: msm: Fix section mismatches in mddi.c | Problem Details:
The change
commit 461cbe77d0a4f887c33a3a95ea68a7daf23b4302
Author: Gregory Bean <gbean@codeaurora.org>
Date: Wed Jul 28 10:22:13 2010 -0700
video: msm: Fix section mismatch in mddi.c.
fixes a section mismatch between the board file and the driver's probe
function, however, it mi... | ```diff
diff --git a/drivers/video/msm/mddi.c b/drivers/video/msm/mddi.c
index 4527cbf0a4ec..b061d709bc44 100644
--- a/drivers/video/msm/mddi.c
+++ b/drivers/video/msm/mddi.c
@@ -420,7 +420,7 @@ static void mddi_resume(struct msm_mddi_client_data *cdata)
mddi_set_auto_hibernate(&mddi->client_data, 1);
}
-static in... |
204241c27c8fa2186e6d656d587f941422fff1b9 | Analyze and fix the following issue in the Linux kernel code: arm: msm: trout: fix compile failure | Problem Details:
Fixes the following warnings,
arch/arm/mach-msm/board-trout.c: In function 'trout_init':
arch/arm/mach-msm/board-trout.c:71: error: 'system_rev' undeclared (first use in this function)
arch/arm/mach-msm/board-trout.c:71: error: (Each undeclared identifier is reported only once
arch/arm/mach-msm/board-... | ```diff
diff --git a/arch/arm/mach-msm/board-trout-panel.c b/arch/arm/mach-msm/board-trout-panel.c
index 25105c1027fe..89bf6b426699 100644
--- a/arch/arm/mach-msm/board-trout-panel.c
+++ b/arch/arm/mach-msm/board-trout-panel.c
@@ -12,6 +12,7 @@
#include <asm/io.h>
#include <asm/mach-types.h>
+#include <asm/system_i... |
ef1f0982540e5f79c8bbf3675bbc0a9734dba3fc | Analyze and fix the following issue in the Linux kernel code: irq_work: fix compile failure on tile from missing include | Problem Details:
Building with IRQ_WORK configured results in
kernel/irq_work.c: In function ‘irq_work_run’:
kernel/irq_work.c:110: error: implicit declaration of function ‘irqs_disabled’
The appropriate header just needs to be included.
Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
Signed-off-by: Paul Gortmake... | ```diff
diff --git a/kernel/irq_work.c b/kernel/irq_work.c
index 0c56d44b9fd5..1588e3b2871b 100644
--- a/kernel/irq_work.c
+++ b/kernel/irq_work.c
@@ -11,6 +11,7 @@
#include <linux/irq_work.h>
#include <linux/percpu.h>
#include <linux/hardirq.h>
+#include <linux/irqflags.h>
#include <asm/processor.h>
/*
``` |
85f8f7759e418c814ee2ceacf73eddb9bed39492 | Analyze and fix the following issue in the Linux kernel code: ia64: populate the cmpxchg header with appropriate code | Problem Details:
commit 93f378883cecb9dcb2cf5b51d9d24175906659da
"Fix ia64 build errors (fallout from system.h disintegration)"
introduced arch/ia64/include/asm/cmpxchg.h as a temporary
build fix and stated:
"... leave the migration of xchg() and cmpxchg() to this new
header file for a future patch."
M... | ```diff
diff --git a/arch/ia64/include/asm/cmpxchg.h b/arch/ia64/include/asm/cmpxchg.h
index 4c96187e2049..4f37dbbb8640 100644
--- a/arch/ia64/include/asm/cmpxchg.h
+++ b/arch/ia64/include/asm/cmpxchg.h
@@ -1 +1,147 @@
-#include <asm/intrinsics.h>
+#ifndef _ASM_IA64_CMPXCHG_H
+#define _ASM_IA64_CMPXCHG_H
+
+/*
+ * Comp... |
5ba840f9da1ff96e0c6e982608a9e80e35333cc5 | Analyze and fix the following issue in the Linux kernel code: alpha: fix build failures from system.h dismemberment | Problem Details:
commit ec2212088c42ff7d1362629ec26dda4f3e8bdad3
"Disintegrate asm/system.h for Alpha"
combined with commit b4816afa3986704d1404fc48e931da5135820472
"Move the asm-generic/system.h xchg() implementation to asm-generic/cmpxchg.h"
introduced the concept of asm/cmpxchg.h but the alpha arch
never... | ```diff
diff --git a/arch/alpha/include/asm/atomic.h b/arch/alpha/include/asm/atomic.h
index f62251e82ffa..3bb7ffeae3bc 100644
--- a/arch/alpha/include/asm/atomic.h
+++ b/arch/alpha/include/asm/atomic.h
@@ -3,6 +3,7 @@
#include <linux/types.h>
#include <asm/barrier.h>
+#include <asm/cmpxchg.h>
/*
* Atomic oper... |
6f66cdc3e5d3d5ccbb7ee9265b8211cdc24aa401 | Analyze and fix the following issue in the Linux kernel code: net/garp: fix GID rbtree ordering | Problem Details:
The comparison operators were backwards in both garp_attr_lookup and
garp_attr_create, so the entire GID rbtree was in reverse order.
(There was no practical side effect to this though, except that PDUs
were sent with attributes listed in reverse order, which is still
valid by the protocol. This change... | ```diff
diff --git a/net/802/garp.c b/net/802/garp.c
index a5c224830439..8456f5d98b85 100644
--- a/net/802/garp.c
+++ b/net/802/garp.c
@@ -157,9 +157,9 @@ static struct garp_attr *garp_attr_lookup(const struct garp_applicant *app,
while (parent) {
attr = rb_entry(parent, struct garp_attr, node);
d = garp_attr_c... |
9a5d2bd99e0dfe9a31b3c160073ac445ba3d773f | Analyze and fix the following issue in the Linux kernel code: ppp: Fix race condition with queue start/stop | Problem Details:
Commit e675f0cc9a872fd152edc0c77acfed19bf28b81e ("ppp: Don't stop and
restart queue on every TX packet") introduced a race condition which
could leave the net queue stopped even when the channel is no longer
busy. By calling netif_stop_queue() from ppp_start_xmit(), based on the
return value from ppp_x... | ```diff
diff --git a/drivers/net/ppp/ppp_generic.c b/drivers/net/ppp/ppp_generic.c
index 33f8c51968b6..21d7151fb0ab 100644
--- a/drivers/net/ppp/ppp_generic.c
+++ b/drivers/net/ppp/ppp_generic.c
@@ -235,7 +235,7 @@ struct ppp_net {
/* Prototypes. */
static int ppp_unattached_ioctl(struct net *net, struct ppp_file *pf... |
9d02daf754238adac48fa075ee79e7edd3d79ed3 | Analyze and fix the following issue in the Linux kernel code: pppoatm: Fix excessive queue bloat | Problem Details:
We discovered that PPPoATM has an excessively deep transmit queue. A
queue the size of the default socket send buffer (wmem_default) is
maintained between the PPP generic core and the ATM device.
Fix it to queue a maximum of *two* packets. The one the ATM device is
currently working on, and one more f... | ```diff
diff --git a/net/atm/pppoatm.c b/net/atm/pppoatm.c
index 614d3fc47ede..ce1e59fdae7b 100644
--- a/net/atm/pppoatm.c
+++ b/net/atm/pppoatm.c
@@ -62,11 +62,24 @@ struct pppoatm_vcc {
void (*old_pop)(struct atm_vcc *, struct sk_buff *);
/* keep old push/pop for detaching */
enum pppoatm_encaps encaps;
+ a... |
1716a96101c49186bb0b8491922fd3e69030235f | Analyze and fix the following issue in the Linux kernel code: ipv6: fix problem with expired dst cache | Problem Details:
If the ipv6 dst cache which copy from the dst generated by ICMPV6 RA packet.
this dst cache will not check expire because it has no RTF_EXPIRES flag.
So this dst cache will always be used until the dst gc run.
Change the struct dst_entry,add a union contains new pointer from and expires.
When rt6_info... | ```diff
diff --git a/include/net/dst.h b/include/net/dst.h
index 59c5d18cc385..ff4da42fcfc6 100644
--- a/include/net/dst.h
+++ b/include/net/dst.h
@@ -36,7 +36,11 @@ struct dst_entry {
struct net_device *dev;
struct dst_ops *ops;
unsigned long _metrics;
- unsigned long expires;
+ union {
+ unsig... |
212da74da783ba9d4459799f4aaecd5de217a312 | Analyze and fix the following issue in the Linux kernel code: HID: Aureal Remote Control Device Driver | Problem Details:
Devices like Aureal Cy se W-01RN USB_V3.1 and some derived hardware
have a bogus HID Report Descriptor. According to that report descriptor,
the maximum logical value for key events is 1 and not 101 (101 keys).
This quirk fixes this wrong Report Descriptor.
Signed-off-by: Josenivaldo Benito Junior <j... | ```diff
diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig
index a3d033252995..1b3447460b64 100644
--- a/drivers/hid/Kconfig
+++ b/drivers/hid/Kconfig
@@ -92,6 +92,12 @@ config HID_APPLE
Say Y here if you want support for keyboards of Apple iBooks, PowerBooks,
MacBooks, MacBook Pros and Apple Aluminum.
+confi... |
bfa890a3cdeed29eef53d54cd7f80cec0fd46b11 | Analyze and fix the following issue in the Linux kernel code: Fix number parsing in cifs_parse_mount_options | Problem Details:
The function kstrtoul() used to parse number strings in the mount
option parser is set to expect a base 10 number . This treats the octal
numbers passed for mount options such as file_mode as base10 numbers
leading to incorrect behavior.
Change the 'base' argument passed to kstrtoul from 10 to 0 to
al... | ```diff
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index 6a86f3d68182..f31dc9ac37b7 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -1123,7 +1123,7 @@ static int get_option_ul(substring_t args[], unsigned long *option)
string = match_strdup(args);
if (string == NULL)
return -ENOMEM;
- rc = kstr... |
5f614e6b7005685b3e34da0742f79389c858c7e1 | Analyze and fix the following issue in the Linux kernel code: caif-hsi: Free flip_buffer at shutdown | Problem Details:
Fix memory leak of RX flip-buffer.
Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/drivers/net/caif/caif_hsi.c b/drivers/net/caif/caif_hsi.c
index 9a66e2a910ae..d0d9a6fa66f7 100644
--- a/drivers/net/caif/caif_hsi.c
+++ b/drivers/net/caif/caif_hsi.c
@@ -1210,7 +1210,7 @@ int cfhsi_probe(struct platform_device *pdev)
static void cfhsi_shutdown(struct cfhsi *cfhsi)
{
- u8 *tx_bu... |
5c699fb7d88d360023f3b3f5291cbf5b59883a1b | Analyze and fix the following issue in the Linux kernel code: caif: Fix memory leakage in the chnl_net.c. | Problem Details:
Added kfree_skb() calls in the chnk_net.c file on
the error paths.
Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/net/caif/chnl_net.c b/net/caif/chnl_net.c
index 20618dd3088b..d09340e1523f 100644
--- a/net/caif/chnl_net.c
+++ b/net/caif/chnl_net.c
@@ -103,6 +103,7 @@ static int chnl_recv_cb(struct cflayer *layr, struct cfpkt *pkt)
skb->protocol = htons(ETH_P_IPV6);
break;
default:
+ kfree_skb(skb);
... |
d1f224ae186b834af647661ffaf403a817c050ce | Analyze and fix the following issue in the Linux kernel code: l2tp: fix refcount leak in l2tp_ip sockets | Problem Details:
The l2tp_ip socket close handler does not update the module refcount
correctly which prevents module unload after the first bind() call on
an L2TPv3 IP encapulation socket.
Signed-off-by: James Chapman <jchapman@katalix.com>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/net/l2tp/l2tp_ip.c b/net/l2tp/l2tp_ip.c
index 55670ec3cd0f..b56be1452f8e 100644
--- a/net/l2tp/l2tp_ip.c
+++ b/net/l2tp/l2tp_ip.c
@@ -232,7 +232,7 @@ static void l2tp_ip_close(struct sock *sk, long timeout)
{
write_lock_bh(&l2tp_ip_lock);
hlist_del_init(&sk->sk_bind_node);
- hlist_del_init(&sk... |
31304165ffb888483e0f7c805876f25f493a3049 | Analyze and fix the following issue in the Linux kernel code: net: Fix misplaced parenthesis in virtio_net.c | Problem Details:
Commit 2e57b79ccef1ff1422fdf45a9b28fe60f8f084f7 misplaced its
parenthesis and now tx_fifo_errors will only be incremented if an
ENOMEM error is not written to the syslog.
Correct the parenthesis and indentation to the original goal of
counting all non ENOMEM errors and ratelimiting only the messages.
... | ```diff
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index 4de2760c5937..af8acc85f4bb 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -626,16 +626,15 @@ static netdev_tx_t start_xmit(struct sk_buff *skb, struct net_device *dev)
/* This can happen with OOM and indirect buffe... |
03478756b1b9298686ca9c8793e484ae39eb4649 | Analyze and fix the following issue in the Linux kernel code: phonet: Sort out initiailziation and cleanup code. | Problem Details:
Recently an oops was reported in phonet if there was a failure during
network namespace creation.
[ 163.733755] ------------[ cut here ]------------
[ 163.734501] kernel BUG at include/net/netns/generic.h:45!
[ 163.734501] invalid opcode: 0000 [#1] PREEMPT SMP
[ 163.734501] CPU 2
[ 163.734501] Pi... | ```diff
diff --git a/net/phonet/pn_dev.c b/net/phonet/pn_dev.c
index 9b9a85ecc4c7..bf5cf69c820a 100644
--- a/net/phonet/pn_dev.c
+++ b/net/phonet/pn_dev.c
@@ -331,23 +331,6 @@ static int __net_init phonet_init_net(struct net *net)
static void __net_exit phonet_exit_net(struct net *net)
{
- struct phonet_net *pnn = ... |
af1584f570b19b0285e4402a0b54731495d31784 | Analyze and fix the following issue in the Linux kernel code: ext4: fix endianness breakage in ext4_split_extent_at() | Problem Details:
->ee_len is __le16, so assigning cpu_to_le32() to it is going to do
Bad Things(tm) on big-endian hosts...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> | ```diff
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
index 1421938e6792..1d418387ffb0 100644
--- a/fs/ext4/extents.c
+++ b/fs/ext4/extents.c
@@ -2882,7 +2882,7 @@ static int ext4_split_extent_at(handle_t *handle,
if (err)
goto fix_extent_len;
/* update the extent length and mark as initialized */
- ex-... |
efe39651f08813180f37dc508d950fc7d92b29a8 | Analyze and fix the following issue in the Linux kernel code: nfsd: fix compose_entry_fh() failure exits | Problem Details:
Restore the original logics ("fail on mountpoints, negatives and in
case of fh_compose() failures"). Since commit 8177e (nfsd: clean up
readdirplus encoding) that got broken -
rv = fh_compose(fhp, exp, dchild, &cd->fh);
if (rv)
goto out;
if (!dchild->d_inode)
goto out;
rv = 0;
out:
is eq... | ```diff
diff --git a/fs/nfsd/nfs3xdr.c b/fs/nfsd/nfs3xdr.c
index 08c6e36ab2eb..43f46cd9edea 100644
--- a/fs/nfsd/nfs3xdr.c
+++ b/fs/nfsd/nfs3xdr.c
@@ -803,13 +803,13 @@ encode_entry_baggage(struct nfsd3_readdirres *cd, __be32 *p, const char *name,
return p;
}
-static int
+static __be32
compose_entry_fh(struct nfs... |
afcf6792afd66209161495f691e19d4fc5460a93 | Analyze and fix the following issue in the Linux kernel code: nfsd: fix error value on allocation failure in nfsd4_decode_test_stateid() | Problem Details:
PTR_ERR(NULL) is going to be 0...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> | ```diff
diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c
index 07a99b6d4bbe..74c00bc92b9a 100644
--- a/fs/nfsd/nfs4xdr.c
+++ b/fs/nfsd/nfs4xdr.c
@@ -1392,7 +1392,7 @@ nfsd4_decode_test_stateid(struct nfsd4_compoundargs *argp, struct nfsd4_test_sta
for (i = 0; i < test_stateid->ts_num_ids; i++) {
stateid = kmallo... |
02f5fde5df0ea930e70f93763dd48beff182b208 | Analyze and fix the following issue in the Linux kernel code: nfsd: fix endianness breakage in TEST_STATEID handling | Problem Details:
->ts_id_status gets nfs errno, i.e. it's already big-endian; no need
to apply htonl() to it. Broken by commit 174568 (NFSD: Added TEST_STATEID
operation) last year...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> | ```diff
diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c
index bcd8904ab1e3..07a99b6d4bbe 100644
--- a/fs/nfsd/nfs4xdr.c
+++ b/fs/nfsd/nfs4xdr.c
@@ -3410,7 +3410,7 @@ nfsd4_encode_test_stateid(struct nfsd4_compoundres *resp, int nfserr,
*p++ = htonl(test_stateid->ts_num_ids);
list_for_each_entry_safe(stateid, n... |
04da6e9d63427b2d0fd04766712200c250b3278f | Analyze and fix the following issue in the Linux kernel code: nfsd: fix error values returned by nfsd4_lockt() when nfsd_open() fails | Problem Details:
nfsd_open() already returns an NFS error value; only vfs_test_lock()
result needs to be fed through nfserrno(). Broken by commit 55ef12
(nfsd: Ensure nfsv4 calls the underlying filesystem on LOCKT)
three years ago...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> | ```diff
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index 1841f8bf845e..7f71c69cdcdf 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -4211,16 +4211,14 @@ out:
* vfs_test_lock. (Arguably perhaps test_lock should be done with an
* inode operation.)
*/
-static int nfsd_test_lock(struct svc_... |
96f6f98501196d46ce52c2697dd758d9300c63f5 | Analyze and fix the following issue in the Linux kernel code: nfsd: fix b0rken error value for setattr on read-only mount | Problem Details:
..._want_write() returns -EROFS on failure, _not_ an NFS error value.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> | ```diff
diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c
index 2ed14dfd00a2..694d526c8f19 100644
--- a/fs/nfsd/nfs4proc.c
+++ b/fs/nfsd/nfs4proc.c
@@ -841,6 +841,7 @@ nfsd4_setattr(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
struct nfsd4_setattr *setattr)
{
__be32 status = nfs_ok;
+ int ... |
9b7333a9c1c22409f685ff6bb6a9e3638e7ff06f | Analyze and fix the following issue in the Linux kernel code: ARM: 7381/1: nommu: fix typo in mm/Kconfig | Problem Details:
The description for the CPU_HIGH_VECTOR Kconfig option for nommu builds
doesn't make any sense.
This patch fixes up the trivial grammatical error.
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> | ```diff
diff --git a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig
index 7edef9121632..7c8a7d8467bf 100644
--- a/arch/arm/mm/Kconfig
+++ b/arch/arm/mm/Kconfig
@@ -723,7 +723,7 @@ config CPU_HIGH_VECTOR
bool "Select the High exception vector"
help
Say Y here to select high exception vector(0xFFFF0000~).
- The exce... |
9c5fd9e85f574d9d0361b2b878f55732290afe5b | Analyze and fix the following issue in the Linux kernel code: ARM: 7379/1: DT: fix atags_to_fdt() second call site | Problem Details:
atags_to_fdt() returns 1 when it fails to find a valid FDT signature.
The CONFIG_ARM_ATAG_DTB_COMPAT code is supposed to retry with another
location, but only does so when the initial call doesn't fail.
Fix this by using the correct condition in the assembly code.
Acked-by: Nicolas Pitre <nicolas.pit... | ```diff
diff --git a/arch/arm/boot/compressed/head.S b/arch/arm/boot/compressed/head.S
index 5f6045f1766c..dc7e8ce8e6be 100644
--- a/arch/arm/boot/compressed/head.S
+++ b/arch/arm/boot/compressed/head.S
@@ -273,7 +273,7 @@ restart: adr r0, LC0
add r0, r0, #0x100
mov r1, r6
sub r2, sp, r6
- blne atags_to_fdt
+... |
56fa6d6ff76c7700f8dd131bee9ffa6c3c06dcd4 | Analyze and fix the following issue in the Linux kernel code: drm/i915/intel_i2c: reduce verbosity of some messages | Problem Details:
Some of these messages can be hit when userspace tries to probe the i2c
with nothing connected or if the driver code tries to do the same.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=48248
Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.c... | ```diff
diff --git a/drivers/gpu/drm/i915/intel_i2c.c b/drivers/gpu/drm/i915/intel_i2c.c
index e24916042550..e04255edc801 100644
--- a/drivers/gpu/drm/i915/intel_i2c.c
+++ b/drivers/gpu/drm/i915/intel_i2c.c
@@ -383,7 +383,7 @@ gmbus_xfer(struct i2c_adapter *adapter,
*/
if (wait_for((I915_READ(GMBUS2 + reg_offset) ... |
79985eee842ef146ed6307a29fdc2fa008036421 | Analyze and fix the following issue in the Linux kernel code: drm/i915/intel_i2c: handle zero-length reads | Problem Details:
A common method of probing an i2c bus is trying to do a zero-length read.
Handle this case by checking the length first waiting for data to be read.
This is actually important, since attempting a zero-length read is one
of the ways that i2cdetect and i2c_new_probed_device detect whether
there is devic... | ```diff
diff --git a/drivers/gpu/drm/i915/intel_i2c.c b/drivers/gpu/drm/i915/intel_i2c.c
index cab879fedf3c..e24916042550 100644
--- a/drivers/gpu/drm/i915/intel_i2c.c
+++ b/drivers/gpu/drm/i915/intel_i2c.c
@@ -217,7 +217,7 @@ gmbus_xfer_read(struct drm_i915_private *dev_priv, struct i2c_msg *msg,
(len << GMBUS_B... |
a7022d600df1396cba23637b77b352d27d77b284 | Analyze and fix the following issue in the Linux kernel code: ARM: OMAP: fix 'using plain integer as NULL pointer' sparse warnings | Problem Details:
sparse warns when 0 is passed to a function expecting a pointer argument.
Resolve these warnings by replacing the 0 with NULL.
arch/arm/plat-omap/include/plat/dmtimer.h:319:34: warning: Using plain integer as NULL pointer
arch/arm/plat-omap/include/plat/dmtimer.h:324:35: warning: Using plain integer a... | ```diff
diff --git a/arch/arm/mach-omap1/ams-delta-fiq.c b/arch/arm/mach-omap1/ams-delta-fiq.c
index fcce7ff37630..31197bd2dedc 100644
--- a/arch/arm/mach-omap1/ams-delta-fiq.c
+++ b/arch/arm/mach-omap1/ams-delta-fiq.c
@@ -102,7 +102,7 @@ void __init ams_delta_init_fiq(void)
}
retval = request_irq(INT_DEFERRED_FI... |
e2ed89fc4ef436269b63271f6633f1936e236aa8 | Analyze and fix the following issue in the Linux kernel code: ARM: OMAP: add includes for missing prototypes | Problem Details:
Several C files in arch/arm/mach-omap* and arch/arm/plat-omap declare
functions that are used by other files, but don't include the header
file where the prototype is declared. This results in the following
warnings from sparse:
arch/arm/mach-omap2/irq.c:114:5: warning: symbol 'omap_irq_pending' ... | ```diff
diff --git a/arch/arm/mach-omap1/common.h b/arch/arm/mach-omap1/common.h
index af658ad338ec..ef656ff6ffd2 100644
--- a/arch/arm/mach-omap1/common.h
+++ b/arch/arm/mach-omap1/common.h
@@ -56,8 +56,11 @@ void omap1_init_early(void);
void omap1_init_irq(void);
void omap1_restart(char, const char *);
+extern vo... |
ae9a3405fd28ce05dc3d0b51d541fd5ec742b3b4 | Analyze and fix the following issue in the Linux kernel code: ath6kl: fix memory leak in ath6kl_fwlog_block_read() | Problem Details:
If, in
drivers/net/wireless/ath/ath6kl/debug.c::ath6kl_fwlog_block_read(),
the call to wait_for_completion_interruptible() returns -ERESTARTSYS
then we'll return without freeing the (as yet unused) memory we
allocated for 'buf' - thus leaking it.
Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-of... | ```diff
diff --git a/drivers/net/wireless/ath/ath6kl/debug.c b/drivers/net/wireless/ath/ath6kl/debug.c
index 2bcd45095eb9..496382f472de 100644
--- a/drivers/net/wireless/ath/ath6kl/debug.c
+++ b/drivers/net/wireless/ath/ath6kl/debug.c
@@ -407,8 +407,10 @@ static ssize_t ath6kl_fwlog_block_read(struct file *file,
r... |
1f5e6247ca99287bac87aff4971a7eee9c2b223a | Analyze and fix the following issue in the Linux kernel code: ARM: OMAP2/3: VENC hwmods: Remove OCPIF_SWSUP_IDLE flag from VENC slave interface | Problem Details:
The clocks for all DSS slave interfaces were recently changed to "dss_ick" on
OMAP2 and OMAP3, this clock can be autoidled by PRCM. The VENC interface
previously had "dss_54m_fck" as it's clock which couldn't be autoidled, and
hence the OCPIF_SWSUP_IDLE flag was needed.
Remove the OCPIF_SWSUP_IDLE fla... | ```diff
diff --git a/arch/arm/mach-omap2/omap_hwmod_2420_data.c b/arch/arm/mach-omap2/omap_hwmod_2420_data.c
index a5409ce3f323..a6bde34e443a 100644
--- a/arch/arm/mach-omap2/omap_hwmod_2420_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_2420_data.c
@@ -1000,7 +1000,6 @@ static struct omap_hwmod_ocp_if omap2420_l4_core__d... |
3c55c1baffa5f719eb2ae9729088bc867f972f53 | Analyze and fix the following issue in the Linux kernel code: ARM: OMAP2+: hwmod: Revert "ARM: OMAP2+: hwmod: Make omap_hwmod_softreset wait for reset status" | Problem Details:
This reverts commit f9a2f9c3fa76eec55928e8e06f3094c8f01df7cb. This
commit caused a regression in the I2C hwmod reset on OMAP2/3/4,
logging messages similar to these during boot:
[ 0.200378] omap_hwmod: i2c1: softreset failed (waited 10000 usec)
[ 0.222076] omap_hwmod: i2c2: softreset failed (wa... | ```diff
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
index 45f1d9c44e94..7144ae651d3d 100644
--- a/arch/arm/mach-omap2/omap_hwmod.c
+++ b/arch/arm/mach-omap2/omap_hwmod.c
@@ -1906,10 +1906,20 @@ void omap_hwmod_write(u32 v, struct omap_hwmod *oh, u16 reg_offs)
*/
int omap_hwmod_so... |
22026c1a7be900cc6dabd6be37a77bb217d2d837 | Analyze and fix the following issue in the Linux kernel code: ALSA: usb: Remove obsoleted fields from struct snd_usb_substream | Problem Details:
Many fields have been moved to struct snd_usb_endpoint.
Also fix the proc output to correspond to the new structure.
Signed-off-by: Takashi Iwai <tiwai@suse.de> | ```diff
diff --git a/sound/usb/card.h b/sound/usb/card.h
index 8a08687e5bc0..77d2eec5e897 100644
--- a/sound/usb/card.h
+++ b/sound/usb/card.h
@@ -115,21 +115,6 @@ struct snd_usb_substream {
unsigned int cur_rate; /* current rate (for hw_params callback) */
unsigned int period_bytes; /* current period bytes (for h... |
8620a3a908da34e1a0db9ad457136bc96340911f | Analyze and fix the following issue in the Linux kernel code: drm/i915: consolidate ring->add_request a bit | Problem Details:
They're indentical, so just kill one. Also give the other a prefix to
distinguish it from the gen6+ functions - this add_request function is
not really generic code.
v2: Fixup commit message as noted by Ben Widawsky.
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-Off-by: Daniel Vetter <daniel.vett... | ```diff
diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c
index 8cffd0b9aaf3..ac05c749104a 100644
--- a/drivers/gpu/drm/i915/intel_ringbuffer.c
+++ b/drivers/gpu/drm/i915/intel_ringbuffer.c
@@ -565,27 +565,6 @@ pc_render_add_request(struct intel_ring_buffer *ring,
return 0... |
686cb5f9f5dc7db150c9f4e49cc0d45ef952450b | Analyze and fix the following issue in the Linux kernel code: drm/i915: consolidate ring->sync-to functions | Problem Details:
The waiter is always the ring itself (otherwise we'd have a decent
snafu in a callsite), so we can unify this easily.
Also give it the usual gen6_ prefix, in case anyone is foolish enough to
implement hw semaphores for gen5.
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-Off-by: Daniel Vetter <dan... | ```diff
diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c
index be405f23dd5e..bc33f13783b8 100644
--- a/drivers/gpu/drm/i915/intel_ringbuffer.c
+++ b/drivers/gpu/drm/i915/intel_ringbuffer.c
@@ -472,10 +472,9 @@ gen6_add_request(struct intel_ring_buffer *ring,
* @seqno - se... |
85f71932e5f22c8f4a28e09b2c27083839aa5bed | Analyze and fix the following issue in the Linux kernel code: ALSA: usb: Fix fill_max flag set | Problem Details:
ep->fill_max is a 1 bit flag, thus it has to be boolean.
sound/usb/endpoint.c: In function 'snd_usb_endpoint_set_params':
sound/usb/endpoint.c:785: warning: overflow in implicit constant conversion
Signed-off-by: Takashi Iwai <tiwai@suse.de> | ```diff
diff --git a/sound/usb/endpoint.c b/sound/usb/endpoint.c
index 8b695d5562e6..12e5a951a143 100644
--- a/sound/usb/endpoint.c
+++ b/sound/usb/endpoint.c
@@ -771,7 +771,7 @@ int snd_usb_endpoint_set_params(struct snd_usb_endpoint *ep,
ep->datainterval = fmt->datainterval;
ep->maxpacksize = fmt->maxpacksize;
... |
cdc04fd1e982e91936cbcf3dec59a576517d67a1 | Analyze and fix the following issue in the Linux kernel code: ASoC: tegra: add Kconfig and Makefile support for Tegra30 | Problem Details:
This adds Kconfig options for the Tegra30 AHUB and I2S controller, and
updates the Tegra+WM8903 machine driver Kconfig to select those.
Includes a squashed bugfix from Sumit Bhattacharya <sumitb@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensour... | ```diff
diff --git a/sound/soc/tegra/Kconfig b/sound/soc/tegra/Kconfig
index 556cac29ea15..441c317252f9 100644
--- a/sound/soc/tegra/Kconfig
+++ b/sound/soc/tegra/Kconfig
@@ -30,6 +30,23 @@ config SND_SOC_TEGRA20_SPDIF
You will also need to select the individual machine drivers to support
below.
+config SND_S... |
4fb0384f3dc68da10cf3f134c45efc6ab14f71df | Analyze and fix the following issue in the Linux kernel code: ASoC: tegra: add tegra30-i2s driver | Problem Details:
This provides an ASoC DAI interface for Tegra 30's I2S controller.
Includes a squashed bugfix from Sumit Bhattacharya <sumitb@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> | ```diff
diff --git a/Documentation/devicetree/bindings/sound/nvidia,tegra30-i2s.txt b/Documentation/devicetree/bindings/sound/nvidia,tegra30-i2s.txt
new file mode 100644
index 000000000000..dfa6c037124a
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/nvidia,tegra30-i2s.txt
@@ -0,0 +1,15 @@
+NVIDIA Tegra30 I... |
a21361b9b9e0d9436a37951a2b0f25b022136fbb | Analyze and fix the following issue in the Linux kernel code: regmap: fix compile errors in regmap-irq.c due to stride changes | Problem Details:
Commit f01ee60fffa4 ("regmap: implement register striding") caused the
compile errors below. Fix them.
drivers/base/regmap/regmap-irq.c: In function 'regmap_irq_sync_unlock':
drivers/base/regmap/regmap-irq.c:62:12: error: 'map' undeclared (first use in this function)
drivers/base/regmap/regmap-irq.c:6... | ```diff
diff --git a/drivers/base/regmap/regmap-irq.c b/drivers/base/regmap/regmap-irq.c
index 56b8136eb36a..fc69d29d272a 100644
--- a/drivers/base/regmap/regmap-irq.c
+++ b/drivers/base/regmap/regmap-irq.c
@@ -50,6 +50,7 @@ static void regmap_irq_lock(struct irq_data *data)
static void regmap_irq_sync_unlock(struct i... |
6a8d2511e13fdcabe4ee8460347115a50c32b0a8 | Analyze and fix the following issue in the Linux kernel code: regmap: fix compilation when !CONFIG_DEBUG_FS | Problem Details:
Commit 79c64d5 "regmap: allow regmap instances to be named" changed the
prototype of regmap_debugfs_init, but didn't update the dummy inline used
when !CONFIG_DEBUGFS. Fix this.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> | ```diff
diff --git a/drivers/base/regmap/internal.h b/drivers/base/regmap/internal.h
index 9bc1d270f0bd..99b28fffbd0e 100644
--- a/drivers/base/regmap/internal.h
+++ b/drivers/base/regmap/internal.h
@@ -116,7 +116,7 @@ extern void regmap_debugfs_init(struct regmap *map, const char *name);
extern void regmap_debugfs_ex... |
ae5d8af579354fb8e984735de9b4b6e9ad6fecb8 | Analyze and fix the following issue in the Linux kernel code: regmap: mmio: convert some error returns to BUG() | Problem Details:
Some of the error conditions detected by regmap_mmio_*() are pure internal
errors, rather than user-/client-triggerable conditions. Convert these to
BUG().
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> | ```diff
diff --git a/drivers/base/regmap/regmap-mmio.c b/drivers/base/regmap/regmap-mmio.c
index 1a7b5ee11abc..ffa0e850839e 100644
--- a/drivers/base/regmap/regmap-mmio.c
+++ b/drivers/base/regmap/regmap-mmio.c
@@ -35,8 +35,8 @@ static int regmap_mmio_gather_write(void *context,
struct regmap_mmio_context *ctx = cont... |
a956bd6f8583326b18348ab1452b4686778f785d | Analyze and fix the following issue in the Linux kernel code: x86, microcode: Fix sysfs warning during module unload on unsupported CPUs | Problem Details:
Loading the microcode driver on an unsupported CPU and subsequently
unloading the driver causes
WARNING: at fs/sysfs/group.c:138 mc_device_remove+0x5f/0x70 [microcode]()
Hardware name: 01972NG
sysfs group ffffffffa00013d0 not found for kobject 'cpu0'
Modules linked in: snd_hda_codec_hdmi snd_hda_c... | ```diff
diff --git a/arch/x86/kernel/microcode_core.c b/arch/x86/kernel/microcode_core.c
index 87a0f8688301..d389e74342a3 100644
--- a/arch/x86/kernel/microcode_core.c
+++ b/arch/x86/kernel/microcode_core.c
@@ -419,10 +419,8 @@ static int mc_device_add(struct device *dev, struct subsys_interface *sif)
if (err)
ret... |
7d7eb9ea314e992413620610b4d09c9cd5fa8959 | Analyze and fix the following issue in the Linux kernel code: ALSA: hda/realtek - Fix mem leak (and rid us of trailing whitespace). | Problem Details:
In sound/pci/hda/patch_realtek.c::alc_auto_fill_dac_nids(), in the
'for (;;)' loop, if the 'badness' value returned from
fill_and_eval_dacs() is negative, then we'll return from the function
without freeing the memory we allocated for 'best_cfg', thus leaking.
Fix the leak by kfree()'ing the memory whe... | ```diff
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 8f4a48463fad..2508f8109f11 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -3398,8 +3398,10 @@ static int alc_auto_fill_dac_nids(struct hda_codec *codec)
for (;;) {
badness = fill_and_eval_dac... |
a959613533a176a8f5f402585827e94a5220d2db | Analyze and fix the following issue in the Linux kernel code: Revert "kconfig: fix __enabled_ macros definition for invisible and un-selected symbols" | Problem Details:
This reverts commit 953742c8fe8ac45be453fee959d7be40cd89f920.
Dumping two lines into autoconf.h for all existing Kconfig options
results in a giant file (~16k lines) we have to process each time we
compile something. We've weaned IS_ENABLED() and similar off of
requiring the __enabled_ definitions so... | ```diff
diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c
index 0586085136d1..9d0674473564 100644
--- a/scripts/kconfig/confdata.c
+++ b/scripts/kconfig/confdata.c
@@ -489,6 +489,17 @@ header_print_symbol(FILE *fp, struct symbol *sym, const char *value, void *arg)
fprintf(fp, "#define %s%s%s 1\n"... |
69349c2dc01c489eccaa4c472542c08e370c6d7e | Analyze and fix the following issue in the Linux kernel code: kconfig: fix IS_ENABLED to not require all options to be defined | Problem Details:
Using IS_ENABLED() within C (vs. within CPP #if statements) in its
current form requires us to actually define every possible bool/tristate
Kconfig option twice (__enabled_* and __enabled_*_MODULE variants).
This results in a huge autoconf.h file, on the order of 16k lines for a
x86_64 defconfig.
Fi... | ```diff
diff --git a/include/linux/kconfig.h b/include/linux/kconfig.h
index 067eda0e4b32..be342b94c640 100644
--- a/include/linux/kconfig.h
+++ b/include/linux/kconfig.h
@@ -4,29 +4,43 @@
#include <generated/autoconf.h>
/*
- * Helper macros to use CONFIG_ options in C expressions. Note that
+ * Helper macros to us... |
d53ba47484ed6245e640ee4bfe9d21e9bfc15765 | Analyze and fix the following issue in the Linux kernel code: Btrfs: use commit root when loading free space cache | Problem Details:
A user reported that booting his box up with btrfs root on 3.4 was way
slower than on 3.3 because I removed the ideal caching code. It turns out
that we don't load the free space cache if we're in a commit for deadlock
reasons, but since we're reading the cache and it hasn't changed yet we are
safe re... | ```diff
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index a2134d8141c1..2b35f8d14bb9 100644
--- a/fs/btrfs/extent-tree.c
+++ b/fs/btrfs/extent-tree.c
@@ -529,9 +529,7 @@ static int cache_block_group(struct btrfs_block_group_cache *cache,
* allocate blocks for the tree root we can't do the fast cachi... |
5269a9ab7def9a3116663347d59c4d70afa2d180 | Analyze and fix the following issue in the Linux kernel code: irq_domain: fix type mismatch in debugfs output format | Problem Details:
sizeof(void*) returns an unsigned long, but it was being used as a width parameter to a "%-*s" format string which requires an int. On 64 bit platforms this causes a type mismatch:
linux/kernel/irq/irqdomain.c:575: warning: field width should have type
'int', but argument 6 has type 'long uns... | ```diff
diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c
index d34413e78628..0e0ba5f840b2 100644
--- a/kernel/irq/irqdomain.c
+++ b/kernel/irq/irqdomain.c
@@ -629,7 +629,8 @@ static int virq_debug_show(struct seq_file *m, void *private)
int i;
seq_printf(m, "%-5s %-7s %-15s %-*s %s\n", "irq", "hwi... |
474a89885f77953b12bce9f23660c31ef5c2630e | Analyze and fix the following issue in the Linux kernel code: staging: android: fix mem leaks in __persistent_ram_init() | Problem Details:
If, in __persistent_ram_init(), the call to
persistent_ram_buffer_init() fails or the call to
persistent_ram_init_ecc() fails then we fail to free the memory we
allocated to 'prz' with kzalloc() - thus leaking it.
To prevent the leaks I consolidated all error exits from the function
at a 'err:' label ... | ```diff
diff --git a/drivers/staging/android/persistent_ram.c b/drivers/staging/android/persistent_ram.c
index e08f2574e30a..8d8c1e33e0ff 100644
--- a/drivers/staging/android/persistent_ram.c
+++ b/drivers/staging/android/persistent_ram.c
@@ -399,12 +399,12 @@ static __init
struct persistent_ram_zone *__persistent_ra... |
17b7e1ba1e2ecc9a09f5e154e555accd2a2eaedf | Analyze and fix the following issue in the Linux kernel code: staging: vt6656: Don't leak memory in drivers/staging/vt6656/ioctl.c::private_ioctl() | Problem Details:
If copy_to_user() fails in the WLAN_CMD_GET_NODE_LIST case of the
switch in drivers/staging/vt6656/ioctl.c::private_ioctl() we'll leak
the memory allocated to 'pNodeList'. Fix that by kfree'ing the memory
in the failure case.
Also remove a pointless cast (to type 'PSNodeList') of a kmalloc()
return val... | ```diff
diff --git a/drivers/staging/vt6656/ioctl.c b/drivers/staging/vt6656/ioctl.c
index 1463d76895f0..d59456c29df1 100644
--- a/drivers/staging/vt6656/ioctl.c
+++ b/drivers/staging/vt6656/ioctl.c
@@ -565,7 +565,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq)
result = -ENOMEM;
break;
}
- pNodeL... |
62d2feb9803f18c4e3c8a1a2c7e30a54df8a1d72 | Analyze and fix the following issue in the Linux kernel code: staging: iio: hmc5843: Fix crash in probe function. | Problem Details:
Fix crash after issuing:
echo hmc5843 0x1e > /sys/class/i2c-dev/i2c-2/device/new_device
[ 37.180999] device: '2-001e': device_add
[ 37.188293] bus: 'i2c': add device 2-001e
[ 37.194549] PM: Adding info for i2c:2-001e
[ 37.200958] bus: 'i2c': driver_probe_device: matched device 2-001e with... | ```diff
diff --git a/drivers/staging/iio/magnetometer/hmc5843.c b/drivers/staging/iio/magnetometer/hmc5843.c
index 91dd3da70cb4..e00b416c4d33 100644
--- a/drivers/staging/iio/magnetometer/hmc5843.c
+++ b/drivers/staging/iio/magnetometer/hmc5843.c
@@ -521,7 +521,9 @@ static int hmc5843_detect(struct i2c_client *client,
... |
026ee1f66aaa7f01b617a0ba89ac4b531f9603f1 | Analyze and fix the following issue in the Linux kernel code: panic: fix stack dump print on direct call to panic() | Problem Details:
Commit 6e6f0a1f0fa6 ("panic: don't print redundant backtraces on oops")
causes a regression where no stack trace will be printed at all for the
case where kernel code calls panic() directly while not processing an
oops, and of course there are 100's of instances of this type of call.
The original comm... | ```diff
diff --git a/kernel/panic.c b/kernel/panic.c
index 80aed44e345a..8ed89a175d79 100644
--- a/kernel/panic.c
+++ b/kernel/panic.c
@@ -97,7 +97,7 @@ void panic(const char *fmt, ...)
/*
* Avoid nested stack-dumping if a panic occurs during oops processing
*/
- if (!oops_in_progress)
+ if (!test_taint(TAINT_D... |
41c93088127df2579e8ca64010929ec9e41d5543 | Analyze and fix the following issue in the Linux kernel code: Revert "mm: vmscan: fix misused nr_reclaimed in shrink_mem_cgroup_zone()" | Problem Details:
This reverts commit c38446cc65e1f2b3eb8630c53943b94c4f65f670.
Before the commit, the code makes senses to me but not after the commit.
The "nr_reclaimed" is the number of pages reclaimed by scanning through
the memcg's lru lists. The "nr_to_reclaim" is the target value for the
whole function. For ex... | ```diff
diff --git a/mm/vmscan.c b/mm/vmscan.c
index 33c332bbab73..1a518684a32f 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -2107,12 +2107,7 @@ restart:
* with multiple processes reclaiming pages, the total
* freeing target can get unreasonably large.
*/
- if (nr_reclaimed >= nr_to_reclaim)
- nr_to_rec... |
66aebce747eaf9bc456bf1f1b217d8db843031d0 | Analyze and fix the following issue in the Linux kernel code: hugetlb: fix race condition in hugetlb_fault() | Problem Details:
The race is as follows:
Suppose a multi-threaded task forks a new process (on cpu A), thus
bumping up the ref count on all the pages. While the fork is occurring
(and thus we have marked all the PTEs as read-only), another thread in
the original process (on cpu B) tries to write to a huge page, takin... | ```diff
diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index b8ce6f450956..cd65cb19c941 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -2791,6 +2791,7 @@ int hugetlb_fault(struct mm_struct *mm, struct vm_area_struct *vma,
* so no worry about deadlock.
*/
page = pte_page(entry);
+ get_page(page);
if (page != pageca... |
f3ec434c69ac7f447ff6e6389c19727c9f002087 | Analyze and fix the following issue in the Linux kernel code: drivers/rtc/rtc-twl.c: use static register while reading time | Problem Details:
RTC stores time and date in several registers. Due to the fact that
these registers can't be read instantaneously, there is a chance that
reading from counting registers gives an error of one minute, one hour,
one day, etc.
To address this issue, the RTC has hardware support to copy the RTC
counting ... | ```diff
diff --git a/drivers/rtc/rtc-twl.c b/drivers/rtc/rtc-twl.c
index 4c2c6df2a9ef..258abeabf624 100644
--- a/drivers/rtc/rtc-twl.c
+++ b/drivers/rtc/rtc-twl.c
@@ -112,6 +112,7 @@ static const u8 twl6030_rtc_reg_map[] = {
#define BIT_RTC_CTRL_REG_TEST_MODE_M 0x10
#define BIT_RTC_CTRL_REG_SET_32_COUNTER... |
c3cba9281ba39f3aef377fe52890e2d8f1e6dae3 | Analyze and fix the following issue in the Linux kernel code: drivers/rtc/rtc-s3c.c: add placeholder for driver private data | Problem Details:
Driver data field is a pointer, hence assigning that to an integer results
in compilation warnings.
Fixes following compilation warnings:
drivers/rtc/rtc-s3c.c: In function `s3c_rtc_get_driver_data':
drivers/rtc/rtc-s3c.c:452:3: warning: return makes integer from pointer without a cast [enabled b... | ```diff
diff --git a/drivers/rtc/rtc-s3c.c b/drivers/rtc/rtc-s3c.c
index 2087953f108d..3f3a29752369 100644
--- a/drivers/rtc/rtc-s3c.c
+++ b/drivers/rtc/rtc-s3c.c
@@ -40,6 +40,10 @@ enum s3c_cpu_type {
TYPE_S3C64XX,
};
+struct s3c_rtc_drv_data {
+ int cpu_type;
+};
+
/* I have yet to find an S3C implementation wi... |
cd1e6f9e53e1a673a489826729709aaffa8ad621 | Analyze and fix the following issue in the Linux kernel code: drivers/rtc/rtc-s3c.c: fix compilation error | Problem Details:
Fix this error:
drivers/rtc/rtc-s3c.c: At top level:
drivers/rtc/rtc-s3c.c:671:3: error: request for member `data' in something not a structure or union
drivers/rtc/rtc-s3c.c:674:3: error: request for member `data' in something not a structure or union
drivers/rtc/rtc-s3c.c:677:3: error: reque... | ```diff
diff --git a/drivers/rtc/rtc-s3c.c b/drivers/rtc/rtc-s3c.c
index 9ccea134a996..2087953f108d 100644
--- a/drivers/rtc/rtc-s3c.c
+++ b/drivers/rtc/rtc-s3c.c
@@ -667,16 +667,16 @@ static int s3c_rtc_resume(struct platform_device *pdev)
#ifdef CONFIG_OF
static const struct of_device_id s3c_rtc_dt_match[] = {
{
... |
569530fb1b40ab2d2ca147ee79898ac807ebdf90 | Analyze and fix the following issue in the Linux kernel code: memcg: do not open code accesses to res_counter members | Problem Details:
We should use the accessor res_counter_read_u64 for that.
Although a purely cosmetic change is sometimes better delayed, to avoid
conflicting with other people's work, we are starting to have people
touching this code as well, and reproducing the open code behavior
because that's the standard =)
Time... | ```diff
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index ea1e879b2db6..a7165a60d0a7 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -3763,7 +3763,7 @@ move_account:
goto try_to_free;
cond_resched();
/* "ret" should also be checked to ensure all lists are empty. */
- } while (memcg->res.usage > 0 || r... |
32050017cf3bf2b983571a90351328b4f66e463d | Analyze and fix the following issue in the Linux kernel code: drivers/rtc/rtc-efi.c: fix section mismatch warning | Problem Details:
efi_rtc_init() uses platform_driver_probe(), so there's no need to also
set efi_rtc_driver's probe member (as it won't be used anyway). This
fixes a modpost section mismatch warning (as efi_rtc_probe() validly is
__init).
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Cc: Matthew Garrett <mjg@redhat.... | ```diff
diff --git a/drivers/rtc/rtc-efi.c b/drivers/rtc/rtc-efi.c
index 550292304b0f..c9f890b088da 100644
--- a/drivers/rtc/rtc-efi.c
+++ b/drivers/rtc/rtc-efi.c
@@ -213,7 +213,6 @@ static struct platform_driver efi_rtc_driver = {
.name = "rtc-efi",
.owner = THIS_MODULE,
},
- .probe = efi_rtc_probe,
.remove ... |
44e4360fa3384850d65dd36fb4e6e5f2f112709b | Analyze and fix the following issue in the Linux kernel code: drivers/char/random.c: fix boot id uniqueness race | Problem Details:
/proc/sys/kernel/random/boot_id can be read concurrently by userspace
processes. If two (or more) user-space processes concurrently read
boot_id when sysctl_bootid is not yet assigned, a race can occur making
boot_id differ between the reads. Because the whole point of the boot id
is to be unique acr... | ```diff
diff --git a/drivers/char/random.c b/drivers/char/random.c
index 54ca8b23cde3..4ec04a754733 100644
--- a/drivers/char/random.c
+++ b/drivers/char/random.c
@@ -1260,10 +1260,15 @@ static int proc_do_uuid(ctl_table *table, int write,
uuid = table->data;
if (!uuid) {
uuid = tmp_uuid;
- uuid[8] = 0;
- }
- i... |
d833049bd20570cbbadeb5228c579f9f3aaa4e03 | Analyze and fix the following issue in the Linux kernel code: memcg: fix broken boolen expression | Problem Details:
action != CPU_DEAD || action != CPU_DEAD_FROZEN is always true.
Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Acked-by: Michal Hocko <mhocko@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus To... | ```diff
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 7d698df4a067..ea1e879b2db6 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -2165,7 +2165,7 @@ static int __cpuinit memcg_cpu_hotplug_callback(struct notifier_block *nb,
if (action == CPU_ONLINE)
return NOTIFY_OK;
- if ((action != CPU_DEAD) || act... |
6252efcc3626bdcde1c1c2d8a83be0bc66b8cc2c | Analyze and fix the following issue in the Linux kernel code: memcg: fix up documentation on global LRU | Problem Details:
In v3.3-rc1, the global LRU was removed in commit 925b7673cce3 ("mm:
make per-memcg LRU lists exclusive"). The patch fixes up the memcg
docs.
I left the swap session to someone who has better understanding of
'memory+swap'.
Signed-off-by: Ying Han <yinghan@google.com>
Acked-by: Michal Hocko <mhocko@... | ```diff
diff --git a/Documentation/cgroups/memory.txt b/Documentation/cgroups/memory.txt
index 4c95c0034a4b..9b1067afb224 100644
--- a/Documentation/cgroups/memory.txt
+++ b/Documentation/cgroups/memory.txt
@@ -34,8 +34,7 @@ Current Status: linux-2.6.34-mmotm(development version of 2010/April)
Features:
- accounti... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.