id stringlengths 40 40 | instruction stringlengths 68 308 | input stringlengths 17 33.4k | output stringlengths 100 30k |
|---|---|---|---|
4fad8098bc3cc9dfe711b10b07df821ea30e6879 | Analyze and fix the following issue in the Linux kernel code: i7core_edac: Fix compilation on 32 bits arch | Problem Details:
on i386:
ERROR: "__udivdi3" [drivers/edac/i7core_edac.ko] undefined!\
In both get_sdram_scrub_rate() and set_sdram_scrub_rate()
Reported-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com> | ```diff
diff --git a/drivers/edac/i7core_edac.c b/drivers/edac/i7core_edac.c
index 7cb68decf57d..51d251c32901 100644
--- a/drivers/edac/i7core_edac.c
+++ b/drivers/edac/i7core_edac.c
@@ -37,6 +37,7 @@
#include <linux/smp.h>
#include <asm/mce.h>
#include <asm/processor.h>
+#include <asm/div64.h>
#include "edac_cor... |
535e9c78e1a80946283cecc742b687b3a5ff5109 | Analyze and fix the following issue in the Linux kernel code: i7core_edac: scrubbing fixups | Problem Details:
Get a more reliable DCLK value from DMI, name the SCRUBINTERVAL mask
and guard against potential overflow in the scrub rate computations.
Signed-off-by: Nils Carlson <nils.carlson@ericsson.com> | ```diff
diff --git a/drivers/edac/i7core_edac.c b/drivers/edac/i7core_edac.c
index 6ae7795dea86..7cb68decf57d 100644
--- a/drivers/edac/i7core_edac.c
+++ b/drivers/edac/i7core_edac.c
@@ -31,6 +31,7 @@
#include <linux/pci_ids.h>
#include <linux/slab.h>
#include <linux/delay.h>
+#include <linux/dmi.h>
#include <linux... |
700cc5c94fad6c3f15bacb0d99d9c474aed13c82 | Analyze and fix the following issue in the Linux kernel code: ALSA: intel8x0 - Fix inclusion of kvm_para.h | Problem Details:
<linux/kvm_para.h> should be included instead of <asm/...>
Signed-off-by: Takashi Iwai <tiwai@suse.de> | ```diff
diff --git a/sound/pci/intel8x0.c b/sound/pci/intel8x0.c
index 6dc302c3eb93..45b2055f5a76 100644
--- a/sound/pci/intel8x0.c
+++ b/sound/pci/intel8x0.c
@@ -43,7 +43,7 @@
#include <asm/cacheflush.h>
#ifdef CONFIG_KVM_GUEST
-#include <asm/kvm_para.h>
+#include <linux/kvm_para.h>
#else
#define kvm_para_availa... |
359f90982cba0ba8db39b683de05dcb2de64b979 | Analyze and fix the following issue in the Linux kernel code: ALSA: hda_hwdep: Fix possible buffer overflow | Problem Details:
If a line in the firmware file is larger than the given buffer size (and
so the firmware file size), size is set to a value larger than the actual
buffer size. This results in an overflow in the buffer passed.
Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
Signed-off-by: Takash... | ```diff
diff --git a/sound/pci/hda/hda_hwdep.c b/sound/pci/hda/hda_hwdep.c
index 72e5885007cc..7e7d0788ddcf 100644
--- a/sound/pci/hda/hda_hwdep.c
+++ b/sound/pci/hda/hda_hwdep.c
@@ -756,8 +756,6 @@ static int get_line_from_fw(char *buf, int size, struct firmware *fw)
}
if (!fw->size)
return 0;
- if (size < fw->... |
2dad81adf2c49aa9f8bb7e7c48dff9261bd58396 | Analyze and fix the following issue in the Linux kernel code: netfilter: ipv6: fix afinfo->route refcnt leak on error | Problem Details:
Several callers (h323 conntrack, xt_addrtype) assume that the
returned **dst only needs to be released if the function returns 0.
This is true for the ipv4 implementation, but not for the ipv6 one.
Instead of changing the users, change the ipv6 implementation
to behave like the ipv4 version by only p... | ```diff
diff --git a/net/ipv6/netfilter.c b/net/ipv6/netfilter.c
index 30fcee465448..8992cf6651d4 100644
--- a/net/ipv6/netfilter.c
+++ b/net/ipv6/netfilter.c
@@ -100,9 +100,16 @@ static int nf_ip6_route(struct net *net, struct dst_entry **dst,
.pinet6 = (struct ipv6_pinfo *) &fake_pinfo,
};
const void *sk = str... |
e23ebf0fa9e1548c94d8277e393be97ba48faa06 | Analyze and fix the following issue in the Linux kernel code: ipvs: Fix compilation error in ip_vs.h for ip_vs_confirm_conntrack function. | Problem Details:
This is to address the following error during the compilation:
In file included from kernel/sysctl_binary.c:6:
include/net/ip_vs.h:1406: error: expected identifier or ‘(’ before ‘{’ token
make[1]: *** [kernel/sysctl_binary.o] Error 1
make[1]: *** Waiting for unfinished jobs....
That manifests... | ```diff
diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h
index a6b8b47e41af..05b08c926ade 100644
--- a/include/net/ip_vs.h
+++ b/include/net/ip_vs.h
@@ -1396,7 +1396,7 @@ static inline void ip_vs_update_conntrack(struct sk_buff *skb,
{
}
-static inline int ip_vs_confirm_conntrack(struct sk_buff *skb);
+static... |
7e777dd43d55a78c41c3498afaf3ef7edf157120 | Analyze and fix the following issue in the Linux kernel code: ipvs: Add documentation for new sysctl entries | Problem Details:
Add missing documentation for conntrack, snat_reroute and sync_version.
Also fix up a typo, IPVS_DEBUG should be IP_VS_DEBUG.
Acked-by: Julian Anastasov <ja@ssi.bg>
Acked-by Hans Schillstrom <hans@schillstrom.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Pablo Neira Ayuso <pabl... | ```diff
diff --git a/Documentation/networking/ipvs-sysctl.txt b/Documentation/networking/ipvs-sysctl.txt
index 4ccdbca03811..1dcdd49594c4 100644
--- a/Documentation/networking/ipvs-sysctl.txt
+++ b/Documentation/networking/ipvs-sysctl.txt
@@ -15,6 +15,23 @@ amemthresh - INTEGER
enabled and the variable is auto... |
f83347df57113e54e999aa2491be3f685c0c262d | Analyze and fix the following issue in the Linux kernel code: include: linux: skbuf.h: Fix parameter documentation | Problem Details:
Fixes parameter name of skb_frag_dmamap function to silence warning on
make htmldocs.
Signed-off-by: Marcos Paulo de Souza <marcos.mage@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net> | ```diff
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 6a6b352326d7..fe864885c1ed 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -1806,12 +1806,12 @@ static inline void skb_frag_set_page(struct sk_buff *skb, int f,
/**
* skb_frag_dma_map - maps a paged fragment via the DMA ... |
23e049442b7b4f87f802470b4fd46a0e50b2fbdd | Analyze and fix the following issue in the Linux kernel code: drivers/net/ethernet/i825xx/3c505.c: fix build with dynamic debug | Problem Details:
The `#define filename' screws up the expansion of
DEFINE_DYNAMIC_DEBUG_METADATA:
drivers/net/ethernet/i825xx/3c505.c: In function 'send_pcb':
drivers/net/ethernet/i825xx/3c505.c:390: error: expected identifier before string constant
drivers/net/ethernet/i825xx/3c505.c:390: error: expected '}' before '... | ```diff
diff --git a/drivers/net/ethernet/i825xx/3c505.c b/drivers/net/ethernet/i825xx/3c505.c
index 40e1a175fceb..ba82a266051d 100644
--- a/drivers/net/ethernet/i825xx/3c505.c
+++ b/drivers/net/ethernet/i825xx/3c505.c
@@ -126,15 +126,13 @@
*
*********************************************************/
-#define fil... |
d8805e633e054c816c47cb6e727c81f156d9253d | Analyze and fix the following issue in the Linux kernel code: epoll: fix spurious lockdep warnings | Problem Details:
epoll can acquire recursively acquire ep->mtx on multiple "struct
eventpoll"s at once in the case where one epoll fd is monitoring another
epoll fd. This is perfectly OK, since we're careful about the lock
ordering, but it causes spurious lockdep warnings. Annotate the recursion
using mutex_lock_nest... | ```diff
diff --git a/fs/eventpoll.c b/fs/eventpoll.c
index 9026fc91fe3b..828e750af23a 100644
--- a/fs/eventpoll.c
+++ b/fs/eventpoll.c
@@ -70,6 +70,15 @@
* simultaneous inserts (A into B and B into A) from racing and
* constructing a cycle without either insert observing that it is
* going to.
+ * It is necessary... |
fc23af34b00ef444eec088f744983b9ca6c7f5d1 | Analyze and fix the following issue in the Linux kernel code: llist-return-whether-list-is-empty-before-adding-in-llist_add-fix | Problem Details:
clarify comment
Cc: Huang Ying <ying.huang@intel.com>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | ```diff
diff --git a/include/linux/llist.h b/include/linux/llist.h
index 7287734e08d1..801b44b07aac 100644
--- a/include/linux/llist.h
+++ b/include/linux/llist.h
@@ -148,7 +148,7 @@ static inline struct llist_node *llist_next(struct llist_node *node)
* @new: new entry to be added
* @head: the head for your lock-le... |
66f6958e69d8055277356d3cc2e7a1d734db1755 | Analyze and fix the following issue in the Linux kernel code: lib/string.c: fix strim() semantics for strings that have only blanks | Problem Details:
Commit 84c95c9acf0 ("string: on strstrip(), first remove leading spaces
before running over str") improved the performance of the strim()
function.
Unfortunately this changed the semantics of strim() and broke my code.
Before the patch it was possible to use strim() without using the return
value for... | ```diff
diff --git a/lib/string.c b/lib/string.c
index 11df54325fb8..dc4a86341f91 100644
--- a/lib/string.c
+++ b/lib/string.c
@@ -360,7 +360,6 @@ char *strim(char *s)
size_t size;
char *end;
- s = skip_spaces(s);
size = strlen(s);
if (!size)
return s;
@@ -370,7 +369,7 @@ char *strim(char *s)
end--;
*... |
e3816c5407c800e4fb055d08f668286db6b7113f | Analyze and fix the following issue in the Linux kernel code: lib/idr.c: fix comment for ida_get_new_above() | Problem Details:
Signed-off-by: Wang Sheng-Hui <shhuiw@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | ```diff
diff --git a/lib/idr.c b/lib/idr.c
index 5acf9bb10968..bbf211aea4eb 100644
--- a/lib/idr.c
+++ b/lib/idr.c
@@ -767,8 +767,8 @@ EXPORT_SYMBOL(ida_pre_get);
* @starting_id: id to start search at
* @p_id: pointer to the allocated handle
*
- * Allocate new ID above or equal to @ida. It should be called with
... |
4e101b0e6aa885f5786a058eefc1ce4b7cc7c44e | Analyze and fix the following issue in the Linux kernel code: lib/spinlock_debug.c: print owner on spinlock lockup | Problem Details:
When SPIN_BUG_ON is triggered, the lock owner information is reported.
But it is omitted when spinlock lockup is detected.
This information is useful especially on the architectures which don't
implement trigger_all_cpu_backtrace() that is called just after detecting
lockup. So report it and also avo... | ```diff
diff --git a/lib/spinlock_debug.c b/lib/spinlock_debug.c
index 4755b98b6dfb..5f3eacdd6178 100644
--- a/lib/spinlock_debug.c
+++ b/lib/spinlock_debug.c
@@ -49,13 +49,10 @@ void __rwlock_init(rwlock_t *lock, const char *name,
EXPORT_SYMBOL(__rwlock_init);
-static void spin_bug(raw_spinlock_t *lock, const cha... |
1dff46d6987484eaa31f2fb1425216ba06418be3 | Analyze and fix the following issue in the Linux kernel code: lib/kstrtox: common code between kstrto*() and simple_strto*() functions | Problem Details:
Currently termination logic (\0 or \n\0) is hardcoded in _kstrtoull(),
avoid that for code reuse between kstrto*() and simple_strtoull().
Essentially, make them different only in termination logic.
simple_strtoull() (and scanf(), BTW) ignores integer overflow, that's a
bug we currently don't have guts... | ```diff
diff --git a/lib/kstrtox.c b/lib/kstrtox.c
index 5e066759f551..7a94c8f14e29 100644
--- a/lib/kstrtox.c
+++ b/lib/kstrtox.c
@@ -18,26 +18,40 @@
#include <linux/module.h>
#include <linux/types.h>
#include <asm/uaccess.h>
+#include "kstrtox.h"
-static int _kstrtoull(const char *s, unsigned int base, unsigned ... |
b3c49c05b737887443c894c66635ae68dcdf0027 | Analyze and fix the following issue in the Linux kernel code: drivers/leds/leds-lp5521.c: check if reset is successful | Problem Details:
Make sure that the reset is successful by issuing a dummy read to R
channel current register and check its default value. On some platforms,
without this dummy read, any further access to {R/G/B}_EXEC will not have
any impact.
[akpm@linux-foundation.org: fix up code comment]
Signed-off-by: srinidhi k... | ```diff
diff --git a/drivers/leds/leds-lp5521.c b/drivers/leds/leds-lp5521.c
index 16f281b8c2d0..cb641f1b3342 100644
--- a/drivers/leds/leds-lp5521.c
+++ b/drivers/leds/leds-lp5521.c
@@ -97,6 +97,9 @@
/* Status */
#define LP5521_EXT_CLK_USED 0x08
+/* default R channel current register value */
+#define LP5521_REG_... |
6123b0e274503a0d3588e84fbe07c9aa01bfaf5d | Analyze and fix the following issue in the Linux kernel code: leds: save the delay values after a successful call to blink_set() | Problem Details:
When calling the hardware blinking function implemented by blink_set(),
the delay_on and delay_off values are not preserved across calls.
Fix that and make the "timer" trigger work as expected when hardware
blinking is available.
BEFORE the fix:
$ cd /sys/class/leds/someled
$ echo timer > trigger... | ```diff
diff --git a/drivers/leds/led-class.c b/drivers/leds/led-class.c
index dc3d3d83191a..5c270aecedc5 100644
--- a/drivers/leds/led-class.c
+++ b/drivers/leds/led-class.c
@@ -268,8 +268,11 @@ void led_blink_set(struct led_classdev *led_cdev,
unsigned long *delay_off)
{
if (led_cdev->blink_set &&
- !led... |
fa0ea0e16f748e36d65931227188ccf07f2b77c7 | Analyze and fix the following issue in the Linux kernel code: drivers/leds/leds-lp5521.c: avoid writing uninitialized value to LP5521_REG_OP_MODE register | Problem Details:
If lp5521_read fails, engine_state variable is not initialized.
If lp5521_read fails, we should return error.
This patch fixes below warning.
CC drivers/leds/leds-lp5521.o
drivers/leds/leds-lp5521.c: In function 'lp5521_set_engine_mode':
drivers/leds/leds-lp5521.c:168: warning: 'engine_state' m... | ```diff
diff --git a/drivers/leds/leds-lp5521.c b/drivers/leds/leds-lp5521.c
index 9fc122c81f06..16f281b8c2d0 100644
--- a/drivers/leds/leds-lp5521.c
+++ b/drivers/leds/leds-lp5521.c
@@ -175,14 +175,14 @@ static int lp5521_set_engine_mode(struct lp5521_engine *engine, u8 mode)
mode = LP5521_CMD_DIRECT;
ret = lp5... |
cba4c2ac080e170732a030afc27664b00f838e03 | Analyze and fix the following issue in the Linux kernel code: drivers/leds/led-triggers.c: fix memory leak | Problem Details:
The memory for struct led_trigger should be kfreed in the
led_trigger_register() error path. Also this function should return NULL
on error.
Signed-off-by: Masakazu Mokuno <mokuno@sm.sony.co.jp>
Cc: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off... | ```diff
diff --git a/drivers/leds/led-triggers.c b/drivers/leds/led-triggers.c
index 4bebae733349..6f1ff93d7cec 100644
--- a/drivers/leds/led-triggers.c
+++ b/drivers/leds/led-triggers.c
@@ -261,9 +261,12 @@ void led_trigger_register_simple(const char *name, struct led_trigger **tp)
if (trigger) {
trigger->name = ... |
1bff3a2093161d1b982a0958e4eb194bf3c8ce47 | Analyze and fix the following issue in the Linux kernel code: backlight: rename corgibl_limit_intensity() to genericbl_limit_intensity() | Problem Details:
The rename of corgibl_limit_intensity is missed in commit d00ba726
("backlight: Rename the corgi backlight driver to generic"). Let's fix it
now.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by:... | ```diff
diff --git a/drivers/video/backlight/generic_bl.c b/drivers/video/backlight/generic_bl.c
index 8c6befd65a33..adb191466d64 100644
--- a/drivers/video/backlight/generic_bl.c
+++ b/drivers/video/backlight/generic_bl.c
@@ -56,7 +56,7 @@ static int genericbl_get_intensity(struct backlight_device *bd)
* Called when... |
0556dc340e5159cdff925a5ab7f3a72f49745661 | Analyze and fix the following issue in the Linux kernel code: backlight: fix broken regulator API usage in l4f00242t03 | Problem Details:
The regulator support in the l4f00242t03 is very non-idiomatic. Rather
than requesting the regulators based on the device name and the supply
names used by the device the driver requires boards to pass system
specific supply names around through platform data. The driver also
conditionally requests t... | ```diff
diff --git a/arch/arm/mach-imx/mach-mx27_3ds.c b/arch/arm/mach-imx/mach-mx27_3ds.c
index 2eafbac2c763..377230497dcc 100644
--- a/arch/arm/mach-imx/mach-mx27_3ds.c
+++ b/arch/arm/mach-imx/mach-mx27_3ds.c
@@ -241,7 +241,7 @@ static struct regulator_init_data gpo_init = {
};
static struct regulator_consumer_su... |
ae29bc92da01a2e9d278a9a58c3b307d41cc0254 | Analyze and fix the following issue in the Linux kernel code: printk: remove bounds checking for log_prefix | Problem Details:
Currently log_prefix is testing that the first character of the log level
and facility is less than '0' and greater than '9' (which is always
false).
Since the code being updated works because strtoul bombs out (endp isn't
updated) and 0 is returned anyway just remove the check and don't change
the be... | ```diff
diff --git a/kernel/printk.c b/kernel/printk.c
index 286d2c7be52c..1455a0d4eedd 100644
--- a/kernel/printk.c
+++ b/kernel/printk.c
@@ -595,9 +595,6 @@ static size_t log_prefix(const char *p, unsigned int *level, char *special)
/* multi digit including the level and facility number */
char *endp = NULL;
... |
48e41899e4a3592746e5263c14681bf5c1393563 | Analyze and fix the following issue in the Linux kernel code: printk: fix bounds checking for log_prefix | Problem Details:
Currently log_prefix is testing that the first character of the log level
and facility is less than '0' and greater than '9' (which is always
false). It should be testing to see if the character less than '0' or
greater than '9' instead. This patch makes that change.
The code being changed worked be... | ```diff
diff --git a/kernel/printk.c b/kernel/printk.c
index 6d9dedd11450..286d2c7be52c 100644
--- a/kernel/printk.c
+++ b/kernel/printk.c
@@ -595,7 +595,7 @@ static size_t log_prefix(const char *p, unsigned int *level, char *special)
/* multi digit including the level and facility number */
char *endp = NULL;
... |
4ff819515b203f937cc6c8a0215a37a68d1ee71f | Analyze and fix the following issue in the Linux kernel code: watchdog: move watchdog_*_all_cpus under CONFIG_SYSCTL | Problem Details:
Fix compilation warnings for CONFIG_SYSCTL=n:
fixed compilation warnings in case of disabled CONFIG_SYSCTL
kernel/watchdog.c:483:13: warning: `watchdog_enable_all_cpus' defined but not used
kernel/watchdog.c:500:13: warning: `watchdog_disable_all_cpus' defined but not used
these functions are static ... | ```diff
diff --git a/kernel/watchdog.c b/kernel/watchdog.c
index d680381b0e9c..1d7bca7f4f52 100644
--- a/kernel/watchdog.c
+++ b/kernel/watchdog.c
@@ -481,6 +481,8 @@ static void watchdog_disable(int cpu)
}
}
+/* sysctl functions */
+#ifdef CONFIG_SYSCTL
static void watchdog_enable_all_cpus(void)
{
int cpu;
@@... |
f445027e4e692bd885118460b292d08027fd5501 | Analyze and fix the following issue in the Linux kernel code: stop_machine: make stop_machine safe and efficient to call early | Problem Details:
Make stop_machine() safe to call early in boot, before SMP has been set
up, by simply calling the callback function directly if there's only one
CPU online.
[ Fixes from AKPM:
- add comment
- local_irq_flags, not save_flags
- also call hard_irq_disable() for systems which need it
Tejun sug... | ```diff
diff --git a/kernel/stop_machine.c b/kernel/stop_machine.c
index ba5070ce5765..5b0951aa0496 100644
--- a/kernel/stop_machine.c
+++ b/kernel/stop_machine.c
@@ -41,6 +41,7 @@ struct cpu_stopper {
};
static DEFINE_PER_CPU(struct cpu_stopper, cpu_stopper);
+static bool stop_machine_initialized = false;
stati... |
e58a0f89b25a2299374176d5c37aa89b326681e6 | Analyze and fix the following issue in the Linux kernel code: driver/misc/fsa9480.c fix potential null-pointer dereference | Problem Details:
Signed-off-by: Jonghwan Choi <jhbird.choi@samsung.com>
Cc: Donggeun Kim <dg77.kim@samsung.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | ```diff
diff --git a/drivers/misc/fsa9480.c b/drivers/misc/fsa9480.c
index 27dc0d21aafa..f6586d53e1a3 100644
--- a/drivers/misc/fsa9480.c
+++ b/drivers/misc/fsa9480.c
@@ -400,7 +400,8 @@ static int fsa9480_irq_init(struct fsa9480_usbsw *usbsw)
return ret;
}
- device_init_wakeup(&client->dev, pdata->wakeup);
+... |
895c156c044a736d8dc2239020f4530bb6245675 | Analyze and fix the following issue in the Linux kernel code: lis3: remove the references to the global variable in core driver | Problem Details:
[ilkka.koskinen@nokia.com: fix arg to lis3->read()]
Signed-off-by: Ilkka Koskinen <ilkka.koskinen@nokia.com>
Signed-off-by: Éric Piel <eric.piel@tremplin-utc.net>
Cc: Matthew Garrett <mjg@redhat.com>
Cc: Witold Pilat <witold.pilat@gmail.com>
Cc: Lyall Pearce <lyall.pearce@hp.com>
Cc: Malte Starostik <m... | ```diff
diff --git a/drivers/misc/lis3lv02d/lis3lv02d.c b/drivers/misc/lis3lv02d/lis3lv02d.c
index 57249a01e6e7..29d12a70eb1b 100644
--- a/drivers/misc/lis3lv02d/lis3lv02d.c
+++ b/drivers/misc/lis3lv02d/lis3lv02d.c
@@ -163,7 +163,7 @@ static void lis3lv02d_get_xyz(struct lis3lv02d *lis3, int *x, int *y, int *z)
int i... |
4ca5f468cc2a0be1cba585f335dcbe56b40944f2 | Analyze and fix the following issue in the Linux kernel code: hwmon: convert idr to ida and use ida_simple interface | Problem Details:
hwmon was using an idr with a NULL pointer, so convert to an
ida which then allows use of Rusty's ida_simple_get.
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Tejun Heo <tj@kernel.org>
Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
Cc: James Bot... | ```diff
diff --git a/drivers/hwmon/hwmon.c b/drivers/hwmon/hwmon.c
index a61e7815a2a9..6460487e41b5 100644
--- a/drivers/hwmon/hwmon.c
+++ b/drivers/hwmon/hwmon.c
@@ -27,8 +27,7 @@
static struct class *hwmon_class;
-static DEFINE_IDR(hwmon_idr);
-static DEFINE_SPINLOCK(idr_lock);
+static DEFINE_IDA(hwmon_ida);
... |
c51eaacce2ae6861e1ad8c80ade6102ad428dc93 | Analyze and fix the following issue in the Linux kernel code: lib/Kconfig.debug: fix help message for DEFAULT_HUNG_TASK_TIMEOUT | Problem Details:
Added missing _secs in the help message of config DEFAULT_HUNG_TASK_TIMEOUT.
Signed-off-by: Jiaju Zhang <jjzhang@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | ```diff
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index c583a57cddfe..82928f5ea049 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -248,8 +248,9 @@ config DEFAULT_HUNG_TASK_TIMEOUT
to determine when a task has become non-responsive and should
be considered hung.
- It can be adjusted at ru... |
3d470fc385defa60d9af610f05db8e7f8b4f2f5e | Analyze and fix the following issue in the Linux kernel code: mm: munlock use mapcount to avoid terrible overhead | Problem Details:
A process spent 30 minutes exiting, just munlocking the pages of a large
anonymous area that had been alternately mprotected into page-sized vmas:
for every single page there's an anon_vma walk through all the other
little vmas to find the right one.
A general fix to that would be a lot more complicat... | ```diff
diff --git a/mm/mlock.c b/mm/mlock.c
index 7debb4fdf79b..bd34b3a10852 100644
--- a/mm/mlock.c
+++ b/mm/mlock.c
@@ -110,7 +110,15 @@ void munlock_vma_page(struct page *page)
if (TestClearPageMlocked(page)) {
dec_zone_page_state(page, NR_MLOCK);
if (!isolate_lru_page(page)) {
- int ret = try_to_munlock(... |
35d8c7ad7208dad5d352c483408e555022750978 | Analyze and fix the following issue in the Linux kernel code: mm/huge_memory: fix typo when updating mmu cache | Problem Details:
There are three cases of update_mmu_cache() in the file, and the case in
function collapse_huge_page() has a typo, namely the last parameter used,
which is corrected based on the other two cases.
Due to the define of update_mmu_cache by X86, the only arch that
implements THP currently, the change here... | ```diff
diff --git a/mm/huge_memory.c b/mm/huge_memory.c
index ef954384f53a..860ec211ddd6 100644
--- a/mm/huge_memory.c
+++ b/mm/huge_memory.c
@@ -1952,7 +1952,7 @@ static void collapse_huge_page(struct mm_struct *mm,
BUG_ON(!pmd_none(*pmd));
page_add_new_anon_rmap(new_page, vma, address);
set_pmd_at(mm, address,... |
0089e4853ae1ac161fae5137170971ccb6f4f152 | Analyze and fix the following issue in the Linux kernel code: mm/huge_memory: fix copying user highpage | Problem Details:
The THP copy-on-write handler falls back to regular-sized pages for a huge
page replacement upon allocation failure or if THP has been individually
disabled in the target VMA. The loop responsible for copying page-sized
chunks accidentally uses multiples of PAGE_SHIFT instead of PAGE_SIZE as
the virtu... | ```diff
diff --git a/mm/huge_memory.c b/mm/huge_memory.c
index 44f57631cd7c..ef954384f53a 100644
--- a/mm/huge_memory.c
+++ b/mm/huge_memory.c
@@ -830,7 +830,7 @@ static int do_huge_pmd_wp_page_fallback(struct mm_struct *mm,
for (i = 0; i < HPAGE_PMD_NR; i++) {
copy_user_highpage(pages[i], page + i,
- hadd... |
264e56d8247ef6e31ed4386926cae86c61ddcb18 | Analyze and fix the following issue in the Linux kernel code: mm: disable user interface to manually rescue unevictable pages | Problem Details:
At one point, anonymous pages were supposed to go on the unevictable list
when no swap space was configured, and the idea was to manually rescue
those pages after adding swap and making them evictable again. But
nowadays, swap-backed pages on the anon LRU list are not scanned without
available swap sp... | ```diff
diff --git a/mm/vmscan.c b/mm/vmscan.c
index ac644fe85589..3886b0bd7869 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -3417,66 +3417,12 @@ void scan_mapping_unevictable_pages(struct address_space *mapping)
}
-/**
- * scan_zone_unevictable_pages - check unevictable list for evictable pages
- * @zone - zone ... |
3f380998aeb51b99d5d22cadb41162e1e9db70d2 | Analyze and fix the following issue in the Linux kernel code: vmscan.c: fix invalid strict_strtoul() check in write_scan_unevictable_node() | Problem Details:
write_scan_unevictable_node() checks the value req returned by
strict_strtoul() and returns 1 if req is 0.
However, when strict_strtoul() returns 0, it means successful conversion
of buf to unsigned long.
Due to this, the function was not proceeding to scan the zones for
unevictable pages even though... | ```diff
diff --git a/mm/vmscan.c b/mm/vmscan.c
index 51bc4bf3f723..ac644fe85589 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -3520,8 +3520,8 @@ static ssize_t write_scan_unevictable_node(struct sys_device *dev,
unsigned long res;
unsigned long req = strict_strtoul(buf, 10, &res);
- if (!req)
- return 1; /* zero... |
4e9dc5df46001510ebd3b3e54faa650f474e51a3 | Analyze and fix the following issue in the Linux kernel code: mm: fix kunmap_high() comment | Problem Details:
Signed-off-by: Li Haifeng <omycle@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | ```diff
diff --git a/mm/highmem.c b/mm/highmem.c
index 5ef672c07f75..e159a7b1cc22 100644
--- a/mm/highmem.c
+++ b/mm/highmem.c
@@ -250,7 +250,7 @@ void *kmap_high_get(struct page *page)
#endif
/**
- * kunmap_high - map a highmem page into memory
+ * kunmap_high - unmap a highmem page into memory
* @page: &struct ... |
dd73e85f6d8f721d66bcbd2734a5f4bc3d3cd768 | Analyze and fix the following issue in the Linux kernel code: HWPOISON: convert pr_debug()s to pr_info()s | Problem Details:
Commit fb46e73520940b ("HWPOISON: Convert pr_debugs to pr_info) authored
by Andi Kleen converted a number of pr_debug()s to pr_info()s.
About the same time additional code with pr_debug()s was added by two
other commits 8c6c2ecb4466 ("HWPOSION, hugetlb: recover from free hugepage
error when !MF_COUNT_... | ```diff
diff --git a/mm/memory-failure.c b/mm/memory-failure.c
index 2b43ba051ac9..edc388db730a 100644
--- a/mm/memory-failure.c
+++ b/mm/memory-failure.c
@@ -1310,7 +1310,7 @@ int unpoison_memory(unsigned long pfn)
* to the end.
*/
if (PageHuge(page)) {
- pr_debug("MCE: Memory failure is now running on fr... |
09f363c7363eb10cfb4b82094bd7064e5608258b | Analyze and fix the following issue in the Linux kernel code: vmscan: fix shrinker callback bug in fs/super.c | Problem Details:
The callback must not return -1 when nr_to_scan is zero. Fix the bug in
fs/super.c and add this requirement to the callback specification.
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Cc: Dave Chinner <david@fromorbit.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by:... | ```diff
diff --git a/fs/super.c b/fs/super.c
index 3f56a269a4f4..32a81f3467e0 100644
--- a/fs/super.c
+++ b/fs/super.c
@@ -61,7 +61,7 @@ static int prune_super(struct shrinker *shrink, struct shrink_control *sc)
return -1;
if (!grab_super_passive(sb))
- return -1;
+ return !sc->nr_to_scan ? 0 : -1;
if (sb-... |
20c8c62891a346e09c8d26de41ce78bd7a76c5b0 | Analyze and fix the following issue in the Linux kernel code: mm-add-comment-explaining-task-state-setting-in-bdi_forker_thread-fix | Problem Details:
fiddle wording
Cc: Jan Kara <jack@suse.cz>
Cc: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | ```diff
diff --git a/mm/backing-dev.c b/mm/backing-dev.c
index a87da524a4a0..7520ef0bfd47 100644
--- a/mm/backing-dev.c
+++ b/mm/backing-dev.c
@@ -404,9 +404,8 @@ static int bdi_forker_thread(void *ptr)
/*
* In the following loop we are going to check whether we have
* some work to do without any synchroniza... |
99ef0315f1b320f392acc4364598340e78758fd2 | Analyze and fix the following issue in the Linux kernel code: ksm: fix the comment of try_to_unmap_one() | Problem Details:
try_to_unmap_one() is called by try_to_unmap_ksm(), too.
Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
Cc: Hugh Dickins <hughd@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | ```diff
diff --git a/mm/rmap.c b/mm/rmap.c
index 8005080fb9e3..6541cf7fd1d3 100644
--- a/mm/rmap.c
+++ b/mm/rmap.c
@@ -1164,7 +1164,7 @@ void page_remove_rmap(struct page *page)
/*
* Subfunctions of try_to_unmap: try_to_unmap_one called
- * repeatedly from either try_to_unmap_anon or try_to_unmap_file.
+ * repeate... |
f0dfcde099453aa4c0dc42473828d15a6d492936 | Analyze and fix the following issue in the Linux kernel code: kswapd: assign new_order and new_classzone_idx after wakeup in sleeping | Problem Details:
There 2 places to read pgdat in kswapd. One is return from a successful
balance, another is waked up from kswapd sleeping. The new_order and
new_classzone_idx represent the balance input order and classzone_idx.
But current new_order and new_classzone_idx are not assigned after
kswapd_try_to_sleep()... | ```diff
diff --git a/mm/vmscan.c b/mm/vmscan.c
index dd5fc86dbb82..51bc4bf3f723 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -2887,6 +2887,8 @@ static int kswapd(void *p)
balanced_classzone_idx);
order = pgdat->kswapd_max_order;
classzone_idx = pgdat->classzone_idx;
+ new_order = order;
+ new_classz... |
d1f0ece6cdca973c01a46dff0eb062baafe78a85 | Analyze and fix the following issue in the Linux kernel code: mm/memblock.c: small function definition fixes | Problem Details:
warning: function 'memblock_memory_can_coalesce'
with external linkage has definition.
Signed-off-by: Jonghwan Choi <jhbird.choi@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | ```diff
diff --git a/mm/memblock.c b/mm/memblock.c
index b7ed63633581..7d4f5c8a96cb 100644
--- a/mm/memblock.c
+++ b/mm/memblock.c
@@ -267,7 +267,7 @@ static int __init_memblock memblock_double_array(struct memblock_type *type)
return 0;
}
-extern int __init_memblock __weak memblock_memory_can_coalesce(phys_addr_t... |
d2ebd0f6b89567eb93ead4e2ca0cbe03021f344b | Analyze and fix the following issue in the Linux kernel code: kswapd: avoid unnecessary rebalance after an unsuccessful balancing | Problem Details:
In commit 215ddd66 ("mm: vmscan: only read new_classzone_idx from pgdat
when reclaiming successfully") , Mel Gorman said kswapd is better to sleep
after a unsuccessful balancing if there is tighter reclaim request pending
in the balancing. But in the following scenario, kswapd do something that
is not... | ```diff
diff --git a/mm/vmscan.c b/mm/vmscan.c
index 77ee24fc891a..dd5fc86dbb82 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -2823,7 +2823,9 @@ static void kswapd_try_to_sleep(pg_data_t *pgdat, int order, int classzone_idx)
static int kswapd(void *p)
{
unsigned long order, new_order;
+ unsigned balanced_order;
i... |
64212ec569bfdd094f7a23d9b09862209a983559 | Analyze and fix the following issue in the Linux kernel code: debug-pagealloc: add support for highmem pages | Problem Details:
This adds support for highmem pages poisoning and verification to the
debug-pagealloc feature for no-architecture support.
[akpm@linux-foundation.org: remove unneeded preempt_disable/enable]
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
S... | ```diff
diff --git a/mm/debug-pagealloc.c b/mm/debug-pagealloc.c
index 2618933efdb3..7cea557407f4 100644
--- a/mm/debug-pagealloc.c
+++ b/mm/debug-pagealloc.c
@@ -1,6 +1,7 @@
#include <linux/kernel.h>
#include <linux/string.h>
#include <linux/mm.h>
+#include <linux/highmem.h>
#include <linux/page-debug-flags.h>
#i... |
37a1c49a91ad55f917a399ef2174b5ebda4283f9 | Analyze and fix the following issue in the Linux kernel code: thp: mremap support and TLB optimization | Problem Details:
This adds THP support to mremap (decreases the number of split_huge_page()
calls).
Here are also some benchmarks with a proggy like this:
===
#define _GNU_SOURCE
#include <sys/mman.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <sys/time.h>
#define SIZE (5UL*1024*1024*1024)
... | ```diff
diff --git a/include/linux/huge_mm.h b/include/linux/huge_mm.h
index 48c32ebf65a7..a9ace9c32507 100644
--- a/include/linux/huge_mm.h
+++ b/include/linux/huge_mm.h
@@ -22,6 +22,11 @@ extern int zap_huge_pmd(struct mmu_gather *tlb,
extern int mincore_huge_pmd(struct vm_area_struct *vma, pmd_t *pmd,
unsigned ... |
ebed48460be5abd86d9a24fa7c66378e58109f30 | Analyze and fix the following issue in the Linux kernel code: mremap: check for overflow using deltas | Problem Details:
Using "- 1" relies on the old_end to be page aligned and PAGE_SIZE > 1,
those are reasonable requirements but the check remains obscure and it
looks more like an off by one error than an overflow check. This I feel
will improve readability.
Signed-off-by: Andrea Arcangeli <aarcange@redhat.com>
Acked-... | ```diff
diff --git a/mm/mremap.c b/mm/mremap.c
index 506fa44403df..195e866568e0 100644
--- a/mm/mremap.c
+++ b/mm/mremap.c
@@ -141,9 +141,10 @@ unsigned long move_page_tables(struct vm_area_struct *vma,
for (; old_addr < old_end; old_addr += extent, new_addr += extent) {
cond_resched();
next = (old_addr + PMD_S... |
f5252e009d5b87071a919221e4f6624184005368 | Analyze and fix the following issue in the Linux kernel code: mm: avoid null pointer access in vm_struct via /proc/vmallocinfo | Problem Details:
The /proc/vmallocinfo shows information about vmalloc allocations in
vmlist that is a linklist of vm_struct. It, however, may access pages
field of vm_struct where a page was not allocated. This results in a null
pointer access and leads to a kernel panic.
Why this happens: In __vmalloc_node_range()... | ```diff
diff --git a/include/linux/vmalloc.h b/include/linux/vmalloc.h
index 9332e52ea8c2..687fb11e2010 100644
--- a/include/linux/vmalloc.h
+++ b/include/linux/vmalloc.h
@@ -13,6 +13,7 @@ struct vm_area_struct; /* vma defining user mapping in mm_types.h */
#define VM_MAP 0x00000004 /* vmap()ed pages */
#define VM_... |
8c5fb8eadde41f67c61a7ac2d3246dab87bf7020 | Analyze and fix the following issue in the Linux kernel code: mm/debug-pagealloc.c: use memchr_inv | Problem Details:
Use newly introduced memchr_inv() for page verification.
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | ```diff
diff --git a/mm/debug-pagealloc.c b/mm/debug-pagealloc.c
index a4b6d707a31f..2618933efdb3 100644
--- a/mm/debug-pagealloc.c
+++ b/mm/debug-pagealloc.c
@@ -1,4 +1,5 @@
#include <linux/kernel.h>
+#include <linux/string.h>
#include <linux/mm.h>
#include <linux/page-debug-flags.h>
#include <linux/poison.h>
@@ -... |
77311139f364d7f71fc9ba88f59fd90e60205007 | Analyze and fix the following issue in the Linux kernel code: mm/debug-pagealloc.c: use plain __ratelimit() instead of printk_ratelimit() | Problem Details:
printk_ratelimit() should not be used, because it shares ratelimiting
state with all other unrelated printk_ratelimit() callsites.
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | ```diff
diff --git a/mm/debug-pagealloc.c b/mm/debug-pagealloc.c
index a1e3324de2b5..a4b6d707a31f 100644
--- a/mm/debug-pagealloc.c
+++ b/mm/debug-pagealloc.c
@@ -2,6 +2,7 @@
#include <linux/mm.h>
#include <linux/page-debug-flags.h>
#include <linux/poison.h>
+#include <linux/ratelimit.h>
static inline void set_pa... |
ee72886d8ed5d9de3fa0ed3b99a7ca7702576a96 | Analyze and fix the following issue in the Linux kernel code: mm: vmscan: do not writeback filesystem pages in direct reclaim | Problem Details:
Testing from the XFS folk revealed that there is still too much I/O from
the end of the LRU in kswapd. Previously it was considered acceptable by
VM people for a small number of pages to be written back from reclaim with
testing generally showing about 0.3% of pages reclaimed were written back
(higher... | ```diff
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
index ec57779c5a57..2c41b2c1943b 100644
--- a/include/linux/mmzone.h
+++ b/include/linux/mmzone.h
@@ -100,6 +100,7 @@ enum zone_stat_item {
NR_UNSTABLE_NFS, /* NFS unstable pages */
NR_BOUNCE,
NR_VMSCAN_WRITE,
+ NR_VMSCAN_WRITE_SKIP,
NR_WRITEB... |
4f31888c104687078f8d88c2f11eca1080c88464 | Analyze and fix the following issue in the Linux kernel code: mm: output a list of loaded modules when we hit bad_page() | Problem Details:
When we get a bad_page bug report, it's useful to see what modules the
user had loaded.
Signed-off-by: Dave Jones <davej@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> | ```diff
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 6e8ecb6e021c..83a02052bce4 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -318,6 +318,7 @@ static void bad_page(struct page *page)
current->comm, page_to_pfn(page));
dump_page(page);
+ print_modules();
dump_stack();
out:
/* Leave bad fields... |
43362a4977e37db46f86f7e6ab935f0006956632 | Analyze and fix the following issue in the Linux kernel code: oom: fix race while temporarily setting current's oom_score_adj | Problem Details:
test_set_oom_score_adj() was introduced in 72788c385604 ("oom: replace
PF_OOM_ORIGIN with toggling oom_score_adj") to temporarily elevate
current's oom_score_adj for ksm and swapoff without requiring an
additional per-process flag.
Using that function to both set oom_score_adj to OOM_SCORE_ADJ_MAX and... | ```diff
diff --git a/include/linux/oom.h b/include/linux/oom.h
index 13b7b02e599a..6f9d04a85336 100644
--- a/include/linux/oom.h
+++ b/include/linux/oom.h
@@ -40,6 +40,7 @@ enum oom_constraint {
CONSTRAINT_MEMCG,
};
+extern void compare_swap_oom_score_adj(int old_val, int new_val);
extern int test_set_oom_score_a... |
3fa36acbced23c563345de3179dfe1775f15be5e | Analyze and fix the following issue in the Linux kernel code: radix_tree: clean away saw_unset_tag leftovers | Problem Details:
radix_tree_tag_get()'s BUG (when it sees a tag after saw_unset_tag) was
unsafe and removed in 2.6.34, but the pointless saw_unset_tag left behind.
Remove it now, and return 0 as soon as we see unset tag - we already rely
upon the root tag to be correct, returning 0 immediately if it's not set.
Signed... | ```diff
diff --git a/lib/radix-tree.c b/lib/radix-tree.c
index a2f9da59c197..d9df7454519c 100644
--- a/lib/radix-tree.c
+++ b/lib/radix-tree.c
@@ -576,7 +576,6 @@ int radix_tree_tag_get(struct radix_tree_root *root,
{
unsigned int height, shift;
struct radix_tree_node *node;
- int saw_unset_tag = 0;
/* check t... |
fcf634098c00dd9cd247447368495f0b79be12d1 | Analyze and fix the following issue in the Linux kernel code: Cross Memory Attach | Problem Details:
The basic idea behind cross memory attach is to allow MPI programs doing
intra-node communication to do a single copy of the message rather than a
double copy of the message via shared memory.
The following patch attempts to achieve this by allowing a destination
process, given an address and size fro... | ```diff
diff --git a/arch/powerpc/include/asm/systbl.h b/arch/powerpc/include/asm/systbl.h
index fa0d27a400de..559ae1ee6706 100644
--- a/arch/powerpc/include/asm/systbl.h
+++ b/arch/powerpc/include/asm/systbl.h
@@ -354,3 +354,5 @@ COMPAT_SYS_SPU(clock_adjtime)
SYSCALL_SPU(syncfs)
COMPAT_SYS_SPU(sendmmsg)
SYSCALL_SPU... |
32ea845d5bafc37b7406bea1aee3005407cb0900 | Analyze and fix the following issue in the Linux kernel code: ipc/mqueue.c: fix wrong use of schedule_hrtimeout_range_clock() | Problem Details:
Fix the wrong use of schedule_hrtimeout_range_clock() in wq_sleep(),
although it is harmless for the syscall mq_timed* now. It was introduced
by 9ca7d8e ("mqueue: Convert message queue timeout to use hrtimers").
Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
Cc: Carsten Emde <C.Emde@osadl.org... | ```diff
diff --git a/ipc/mqueue.c b/ipc/mqueue.c
index ed049ea568f4..2e0ecfcc881d 100644
--- a/ipc/mqueue.c
+++ b/ipc/mqueue.c
@@ -449,8 +449,8 @@ static int wq_sleep(struct mqueue_inode_info *info, int sr,
set_current_state(TASK_INTERRUPTIBLE);
spin_unlock(&info->lock);
- time = schedule_hrtimeout_range_clock... |
07a723097cd31e9c2def69ac4d42834a16f79219 | Analyze and fix the following issue in the Linux kernel code: dma-mapping: fix sync_single_range_* DMA debugging | Problem Details:
Commit 5fd75a7850b5 (dma-mapping: remove unnecessary sync_single_range_*
in dma_map_ops) unified not only the dma_map_ops but also the
corresponding debug_dma_sync_* calls. This led to spurious WARN()ings
like the following because the DMA debug code was no longer able to detect
the DMA buffer base ad... | ```diff
diff --git a/include/asm-generic/dma-mapping-common.h b/include/asm-generic/dma-mapping-common.h
index 0c80bb38773f..9fa3f96e38cf 100644
--- a/include/asm-generic/dma-mapping-common.h
+++ b/include/asm-generic/dma-mapping-common.h
@@ -123,7 +123,12 @@ static inline void dma_sync_single_range_for_cpu(struct devi... |
ec53cf23c0ddb0c29950b9a4ac46964c4c6c6c2f | Analyze and fix the following issue in the Linux kernel code: irq: don't put module.h into irq.h for tracking irqgen modules. | Problem Details:
Recent commit "irq: Track the owner of irq descriptor" in
commit ID b6873807a7143b7 placed module.h into linux/irq.h
but we are trying to limit module.h inclusion to just C files
that really need it, due to its size and number of children
includes. This targets just reversing that include.
Add in th... | ```diff
diff --git a/include/linux/irq.h b/include/linux/irq.h
index 59e49c80cc2c..bff29c58da23 100644
--- a/include/linux/irq.h
+++ b/include/linux/irq.h
@@ -23,13 +23,13 @@
#include <linux/errno.h>
#include <linux/topology.h>
#include <linux/wait.h>
-#include <linux/module.h>
#include <asm/irq.h>
#include <asm... |
69e7dae4096caeea0a7e2ede376f22a4fdee8456 | Analyze and fix the following issue in the Linux kernel code: ip_vs.h: fix implicit use of module_get/module_put from module.h | Problem Details:
This file was using the module get/put functions in two simple inline
functions. But module_get/put were only within scope because of
the implicit presence of module.h being everywhere.
Rather than add module.h to another file in include/ -- which is
exactly the thing we are trying to avoid, simply ... | ```diff
diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h
index 8fa4430f99c1..623916acbf31 100644
--- a/include/net/ip_vs.h
+++ b/include/net/ip_vs.h
@@ -1126,17 +1126,16 @@ int unregister_ip_vs_pe(struct ip_vs_pe *pe);
struct ip_vs_pe *ip_vs_pe_getbyname(const char *name);
struct ip_vs_pe *__ip_vs_pe_getbyname(... |
34641c6d003a0a94ccabf78211f42da36799f1a2 | Analyze and fix the following issue in the Linux kernel code: nf_conntrack.h: fix up fallout from implicit moduleparam.h presence | Problem Details:
The implicit presence of module.h everywhere meant that this header
also was getting moduleparam.h which defines struct kernel_param.
Since it only needs to know that kernel_param is a struct, call that
out instead of adding an include of moduleparam.h -- to get rid of this:
include/net/netfilter/nf_... | ```diff
diff --git a/include/net/netfilter/nf_conntrack.h b/include/net/netfilter/nf_conntrack.h
index 0b7f05e4a927..8a2b0ae7dbd2 100644
--- a/include/net/netfilter/nf_conntrack.h
+++ b/include/net/netfilter/nf_conntrack.h
@@ -313,6 +313,8 @@ static inline bool nf_is_loopback_packet(const struct sk_buff *skb)
return ... |
e2ffa376f67a0778891e26026e36605e5dd2fa4d | Analyze and fix the following issue in the Linux kernel code: uwb.h: fix implicit use of asm/page.h for PAGE_SIZE | Problem Details:
Once we clean up the implicit presence of module.h (and all its
sub-includes), we'll see an implicit dependency on page.h for
the PAGE_SIZE define. So fix it in advance.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> | ```diff
diff --git a/include/linux/uwb.h b/include/linux/uwb.h
index b0c564ec2160..7dbbee9741b7 100644
--- a/include/linux/uwb.h
+++ b/include/linux/uwb.h
@@ -33,6 +33,7 @@
#include <linux/wait.h>
#include <linux/workqueue.h>
#include <linux/uwb/spec.h>
+#include <asm/page.h>
struct uwb_dev;
struct uwb_beca_e;
`... |
a8efa9d6bf00fbe9597dd3352dc062a998bf9b15 | Analyze and fix the following issue in the Linux kernel code: linux/dmaengine.h: fix implicit use of bitmap.h and asm/page.h | Problem Details:
The implicit presence of module.h and all its sub-includes was
masking these implicit header usages:
include/linux/dmaengine.h:684: warning: 'struct page' declared inside parameter list
include/linux/dmaengine.h:684: warning: its scope is only this definition or declaration, which is probably not what... | ```diff
diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h
index 8fbf40e0713c..1ceff5ae9d31 100644
--- a/include/linux/dmaengine.h
+++ b/include/linux/dmaengine.h
@@ -24,6 +24,8 @@
#include <linux/device.h>
#include <linux/uio.h>
#include <linux/dma-direction.h>
+#include <linux/bitmap.h>
+#include <... |
1986c93f09c98628d68bec773c16322fb5b88c38 | Analyze and fix the following issue in the Linux kernel code: miscdevice.h: fix up implicit use of lists and types | Problem Details:
By removing the implicit presence of module.h from this file, we
will see things like:
In file included from fs/dlm/user.c:9:
include/linux/miscdevice.h:50: error: field ‘list’ has incomplete type
include/linux/miscdevice.h:54: error: expected specifier-qualifier-list before ‘mode_t’
Call out lists.h... | ```diff
diff --git a/include/linux/miscdevice.h b/include/linux/miscdevice.h
index 8526e91d764f..c41d7270c6c6 100644
--- a/include/linux/miscdevice.h
+++ b/include/linux/miscdevice.h
@@ -1,6 +1,8 @@
#ifndef _LINUX_MISCDEVICE_H
#define _LINUX_MISCDEVICE_H
#include <linux/major.h>
+#include <linux/list.h>
+#include <l... |
bb2eac66ee0e8023432e8b0ff13b75e47be199e9 | Analyze and fix the following issue in the Linux kernel code: stop_machine.h: fix implicit use of smp.h for smp_processor_id | Problem Details:
This will show up on MIPS when we fix all the implicit header presences
that are because of module.h being everywhere.
In file included from kernel/trace/ftrace.c:16:
include/linux/stop_machine.h: In function 'stop_one_cpu':
include/linux/stop_machine.h:50: error: implicit declaration of function 'smp... | ```diff
diff --git a/include/linux/stop_machine.h b/include/linux/stop_machine.h
index 2d04ea916760..c170edc3bf5f 100644
--- a/include/linux/stop_machine.h
+++ b/include/linux/stop_machine.h
@@ -3,6 +3,7 @@
#include <linux/cpu.h>
#include <linux/cpumask.h>
+#include <linux/smp.h>
#include <linux/list.h>
#include ... |
d0a9940289a74378c19078fac5b9858fd114dff7 | Analyze and fix the following issue in the Linux kernel code: of: fix implicit use of errno.h in include/linux/of.h | Problem Details:
It shows up as a build failure on MIPS, as it is used in
three of_property function stubs.
include/linux/of.h:275: error: 'ENOSYS' undeclared (first use in this function)
include/linux/of.h:282: error: 'ENOSYS' undeclared (first use in this function)
include/linux/of.h:295: error: 'ENOSYS' undeclared ... | ```diff
diff --git a/include/linux/of.h b/include/linux/of.h
index 5dbe263462a9..c1f5118c59b4 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -23,6 +23,7 @@
#include <linux/spinlock.h>
#include <asm/byteorder.h>
+#include <asm/errno.h>
typedef u32 phandle;
typedef u32 ihandle;
``` |
4eae0cc4f42a8f630e16c23e141ea7b85787d3c4 | Analyze and fix the following issue in the Linux kernel code: sysdev.h: dont include <linux/module.h> for no reason | Problem Details:
The <linux/module.h> pretty much brings in the kitchen sink along
with it, so it should be avoided wherever reasonably possible in
terms of being included from other commonly used <linux/something.h>
files, as it results in a measureable increase on compile times.
There doesn't appear to be any module... | ```diff
diff --git a/include/linux/sysdev.h b/include/linux/sysdev.h
index d35e783a598c..20f63d3e6144 100644
--- a/include/linux/sysdev.h
+++ b/include/linux/sysdev.h
@@ -22,7 +22,6 @@
#define _SYSDEV_H_
#include <linux/kobject.h>
-#include <linux/module.h>
#include <linux/pm.h>
``` |
23a7bfae6e19cb428da75804e5c4dfd67cd9ae8f | Analyze and fix the following issue in the Linux kernel code: lib: dma-debug needs export.h for EXPORT_SYMBOL | Problem Details:
There are no modular calls here, so just the minimal header for
the EXPORT_SYMBOL macro will suffice.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> | ```diff
diff --git a/lib/dma-debug.c b/lib/dma-debug.c
index 79700fa2dfc4..74c6c7fce749 100644
--- a/lib/dma-debug.c
+++ b/lib/dma-debug.c
@@ -24,6 +24,7 @@
#include <linux/spinlock.h>
#include <linux/debugfs.h>
#include <linux/uaccess.h>
+#include <linux/export.h>
#include <linux/device.h>
#include <linux/types.h... |
0b992080a98fa6f0722c43060819f7c311203a1c | Analyze and fix the following issue in the Linux kernel code: drivers/uwb: fix implicit use of stat.h | Problem Details:
The module.h (via device.h) was pulling handfuls of implicitly present
header files -- including basic stuff like stat.h. Fix up these stat.h
users in advance so they don't break on the cleanup.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> | ```diff
diff --git a/drivers/uwb/lc-dev.c b/drivers/uwb/lc-dev.c
index 90113bafefca..dea265873cbc 100644
--- a/drivers/uwb/lc-dev.c
+++ b/drivers/uwb/lc-dev.c
@@ -28,6 +28,7 @@
#include <linux/err.h>
#include <linux/kdev_t.h>
#include <linux/random.h>
+#include <linux/stat.h>
#include "uwb-internal.h"
/* We init... |
ced55d4ef7d6988bd0608423cf1e2225777f45cc | Analyze and fix the following issue in the Linux kernel code: regulator: Fix implicit use of notifier.h by driver.h | Problem Details:
This was implicitly appearing by way of module.h -- but when
we fix that, we'll get this:
In file included from drivers/regulator/dummy.c:21:
include/linux/regulator/driver.h:197: error: field 'notifier' has incomplete type
make[3]: *** [drivers/regulator/dummy.o] Error 1
Signed-off-by: Paul Gortmake... | ```diff
diff --git a/include/linux/regulator/driver.h b/include/linux/regulator/driver.h
index 12a1aa04b720..52c89ae32f64 100644
--- a/include/linux/regulator/driver.h
+++ b/include/linux/regulator/driver.h
@@ -16,6 +16,7 @@
#define __LINUX_REGULATOR_DRIVER_H_
#include <linux/device.h>
+#include <linux/notifier.h>
... |
65602c32ee9b5500e3cb617ccec2154ee2191898 | Analyze and fix the following issue in the Linux kernel code: regulator: Add module.h to drivers/regulator users as required | Problem Details:
Another group of drivers that are taking advantage of the implicit
presence of module.h -- and will break when we pull the carpet out
from under them during a cleanup. Fix 'em now.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> | ```diff
diff --git a/drivers/regulator/88pm8607.c b/drivers/regulator/88pm8607.c
index d63fddb0fbb0..5dcdb0f3db7e 100644
--- a/drivers/regulator/88pm8607.c
+++ b/drivers/regulator/88pm8607.c
@@ -16,6 +16,7 @@
#include <linux/regulator/driver.h>
#include <linux/regulator/machine.h>
#include <linux/mfd/88pm860x.h>
+#i... |
b5a2c4f1996d1d258ac10897e0bbb57c6904a735 | Analyze and fix the following issue in the Linux kernel code: virtio: Add module.h to drivers/virtio users. | Problem Details:
Up to now, the module.h header was as hard to keep out as
sunlight. But we are cleaning that up. Fix the virtio users
who simply expect module.h to be there in every C file.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> | ```diff
diff --git a/drivers/virtio/virtio.c b/drivers/virtio/virtio.c
index efb35aa8309a..984c501c258f 100644
--- a/drivers/virtio/virtio.c
+++ b/drivers/virtio/virtio.c
@@ -1,6 +1,7 @@
#include <linux/virtio.h>
#include <linux/spinlock.h>
#include <linux/virtio_config.h>
+#include <linux/module.h>
/* Unique num... |
799fd8b23961f73fb7e7eeaee79f7ef0850e6c31 | Analyze and fix the following issue in the Linux kernel code: kvm: fix implicit use of stat.h header file | Problem Details:
This was coming in via an implicit module.h (and its sub-includes)
before, but we'll be cleaning that up shortly. Call out the stat.h
include requirement in advance.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> | ```diff
diff --git a/virt/kvm/iommu.c b/virt/kvm/iommu.c
index d5f3b8d1e095..2b3614594457 100644
--- a/virt/kvm/iommu.c
+++ b/virt/kvm/iommu.c
@@ -26,6 +26,7 @@
#include <linux/list.h>
#include <linux/kvm_host.h>
#include <linux/pci.h>
+#include <linux/stat.h>
#include <linux/dmar.h>
#include <linux/iommu.h>
#inc... |
0205a904df57bf2ed79571fe097b99d2940659b1 | Analyze and fix the following issue in the Linux kernel code: mmc: Fix implicit use of stat.h header in associated files | Problem Details:
Once the implicit use of module.h is prevented, these files will
fail to find the stat.h header content.
Fix up the implicit usage expectations in advance of the cleanup.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> | ```diff
diff --git a/drivers/mmc/core/bus.c b/drivers/mmc/core/bus.c
index 9443e8e9e693..6be49249895a 100644
--- a/drivers/mmc/core/bus.c
+++ b/drivers/mmc/core/bus.c
@@ -15,6 +15,7 @@
#include <linux/device.h>
#include <linux/err.h>
#include <linux/slab.h>
+#include <linux/stat.h>
#include <linux/pm_runtime.h>
... |
5d4a357d8f5e07868a90071f328fec73036e9628 | Analyze and fix the following issue in the Linux kernel code: mfd: Add export.h for EXPORT_SYMBOL/THIS_MODULE as required | Problem Details:
These macros are in <linux/export.h> and will no longer be
implicitly everywhere anymore. Fix it up in advance.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> | ```diff
diff --git a/drivers/mfd/asic3.c b/drivers/mfd/asic3.c
index c71ae09430c5..7d5497388a30 100644
--- a/drivers/mfd/asic3.c
+++ b/drivers/mfd/asic3.c
@@ -20,6 +20,7 @@
#include <linux/delay.h>
#include <linux/irq.h>
#include <linux/gpio.h>
+#include <linux/export.h>
#include <linux/io.h>
#include <linux/slab.... |
44a8e3772f53a5337e74700fc166a3d4c3ef59a2 | Analyze and fix the following issue in the Linux kernel code: bcma: fix implicit use of export.h contents | Problem Details:
Fix in advance, or we will get things like this:
drivers/bcma/core.c:20: warning: data definition has no type or storage class
drivers/bcma/core.c:20: warning: type defaults to 'int' in declaration of 'EXPORT_SYMBOL_GPL'
drivers/bcma/core.c:20: warning: parameter names (without types) in function decl... | ```diff
diff --git a/drivers/bcma/core.c b/drivers/bcma/core.c
index 189a97b51be9..893f6e0c759f 100644
--- a/drivers/bcma/core.c
+++ b/drivers/bcma/core.c
@@ -6,6 +6,7 @@
*/
#include "bcma_private.h"
+#include <linux/export.h>
#include <linux/bcma/bcma.h>
bool bcma_core_is_enabled(struct bcma_device *core)
dif... |
8aaf7a0e37d1560d274da1104bc91273b37e2c52 | Analyze and fix the following issue in the Linux kernel code: drivers/zorro: Add export.h to proc.c | Problem Details:
To fix what used to be the implicit presence of the macros
EXPORT_SYMBOL and THIS_MODULE, via module.h being everywhere.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> | ```diff
diff --git a/drivers/zorro/proc.c b/drivers/zorro/proc.c
index e0c84725d3e9..988880dcee75 100644
--- a/drivers/zorro/proc.c
+++ b/drivers/zorro/proc.c
@@ -13,6 +13,7 @@
#include <linux/proc_fs.h>
#include <linux/seq_file.h>
#include <linux/init.h>
+#include <linux/export.h>
#include <asm/uaccess.h>
#includ... |
0a422f2b1d213f6abeecde88fb45c4b7fa1fd358 | Analyze and fix the following issue in the Linux kernel code: drivers/rapidio: idt_gen2.c is implicitly relying on getting stat.h | Problem Details:
Upon the trial removal of the implicit presence of module.h,
lots of files showed up that were getting the sub-includes
by default without calling them out. Fix them in advance.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> | ```diff
diff --git a/drivers/rapidio/switches/idt_gen2.c b/drivers/rapidio/switches/idt_gen2.c
index 043ee3136e40..809b7a3336ba 100644
--- a/drivers/rapidio/switches/idt_gen2.c
+++ b/drivers/rapidio/switches/idt_gen2.c
@@ -10,6 +10,7 @@
* option) any later version.
*/
+#include <linux/stat.h>
#include <linux/rio... |
48a9e412b69ab000a6f6bcdc79d4ea982d2f35c1 | Analyze and fix the following issue in the Linux kernel code: drivers/of: Add module.h to of_spi.c | Problem Details:
This file really needs the full module.h header file present, but
was just getting it implicitly before. Fix it up in advance so we
avoid build failures once the cleanup commit is present.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> | ```diff
diff --git a/drivers/of/of_spi.c b/drivers/of/of_spi.c
index 1dbce58a58b0..6dbc074e4876 100644
--- a/drivers/of/of_spi.c
+++ b/drivers/of/of_spi.c
@@ -6,6 +6,7 @@
* tree.
*/
+#include <linux/module.h>
#include <linux/of.h>
#include <linux/device.h>
#include <linux/spi/spi.h>
``` |
eb12a679b242c03b9eaa38a67cae9fa3e17ddea6 | Analyze and fix the following issue in the Linux kernel code: drivers/misc: Add module.h to files who are really modular. | Problem Details:
These files really need the full module.h header file present, but
were just getting it implicitly before. Fix it up in advance so we
avoid build failures once the cleanup commit is present.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> | ```diff
diff --git a/drivers/misc/ab8500-pwm.c b/drivers/misc/ab8500-pwm.c
index 35903154ca2e..2208a9d52622 100644
--- a/drivers/misc/ab8500-pwm.c
+++ b/drivers/misc/ab8500-pwm.c
@@ -10,6 +10,7 @@
#include <linux/pwm.h>
#include <linux/mfd/ab8500.h>
#include <linux/mfd/abx500.h>
+#include <linux/module.h>
/*
* ... |
314ef9cb52d8543821cdfd34decd696cd4139a68 | Analyze and fix the following issue in the Linux kernel code: drivers/message: Add module.h to i2o/pci.c | Problem Details:
This file really needs the full module.h header file present, but
was just getting it implicitly before. Fix it up in advance so we
avoid build failures once the cleanup commit is present.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> | ```diff
diff --git a/drivers/message/i2o/pci.c b/drivers/message/i2o/pci.c
index 73e4658af53c..7190d5239b4f 100644
--- a/drivers/message/i2o/pci.c
+++ b/drivers/message/i2o/pci.c
@@ -31,6 +31,7 @@
#include <linux/interrupt.h>
#include <linux/slab.h>
#include <linux/i2o.h>
+#include <linux/module.h>
#include "core.h... |
dff65de26ba8128f051799fd6c3660c7162eefc1 | Analyze and fix the following issue in the Linux kernel code: drivers/media: ir-raw.c needs kmod.h for request_module | Problem Details:
To fix:
drivers/media/rc/ir-raw.c: In function 'init_decoders':
drivers/media/rc/ir-raw.c:354:2: error: implicit declaration of function 'request_module'
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> | ```diff
diff --git a/drivers/media/rc/ir-raw.c b/drivers/media/rc/ir-raw.c
index 27808bb59eba..37fdbff0051b 100644
--- a/drivers/media/rc/ir-raw.c
+++ b/drivers/media/rc/ir-raw.c
@@ -14,6 +14,7 @@
#include <linux/kthread.h>
#include <linux/mutex.h>
+#include <linux/kmod.h>
#include <linux/sched.h>
#include <linux... |
bb207ef1e84ffc4afe89f3a5b84788bac0f968e7 | Analyze and fix the following issue in the Linux kernel code: drivers/gpio: Fix drivers who are implicit users of module.h | Problem Details:
A pending cleanup will mean that module.h won't be implicitly
everywhere anymore. Make sure the modular drivers in gpio
are actually calling out for <module.h> explicitly in advance.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> | ```diff
diff --git a/drivers/gpio/gpio-74x164.c b/drivers/gpio/gpio-74x164.c
index ff525c0958dd..a31ad6f5d910 100644
--- a/drivers/gpio/gpio-74x164.c
+++ b/drivers/gpio/gpio-74x164.c
@@ -15,6 +15,7 @@
#include <linux/spi/74x164.h>
#include <linux/gpio.h>
#include <linux/slab.h>
+#include <linux/module.h>
struct g... |
afd605f68392d85638e1499143b9ad2e1389d742 | Analyze and fix the following issue in the Linux kernel code: drivers/firmware: Add module.h to google/gsmi.c | Problem Details:
This file really needs the full module.h header file present, but
was just getting it implicitly before. Fix it up in advance so we
avoid build failures once the cleanup commit is present.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> | ```diff
diff --git a/drivers/firmware/google/gsmi.c b/drivers/firmware/google/gsmi.c
index aa83de9db1b9..c4e7c59d1c63 100644
--- a/drivers/firmware/google/gsmi.c
+++ b/drivers/firmware/google/gsmi.c
@@ -27,6 +27,7 @@
#include <linux/kdebug.h>
#include <linux/reboot.h>
#include <linux/efi.h>
+#include <linux/module.h... |
80a2e2e35dc84f40306768a1d37011acdfb2eeaa | Analyze and fix the following issue in the Linux kernel code: drivers/edac: Add module.h to mce_amd_inj.c | Problem Details:
This file really needs the full module.h header file present, but
was just getting it implicitly before. Fix it up in advance so we
avoid build failures once the cleanup commit is present.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> | ```diff
diff --git a/drivers/edac/mce_amd_inj.c b/drivers/edac/mce_amd_inj.c
index a4987e03f59e..73c3e26a0bce 100644
--- a/drivers/edac/mce_amd_inj.c
+++ b/drivers/edac/mce_amd_inj.c
@@ -13,6 +13,7 @@
#include <linux/kobject.h>
#include <linux/sysdev.h>
#include <linux/edac.h>
+#include <linux/module.h>
#include <a... |
5c45ad77ffd0108596627816a37de71a04d5cb6d | Analyze and fix the following issue in the Linux kernel code: drivers/dma: Add module.h to files implicitly using it. | Problem Details:
Fix files that were implicitly using module.h but not
calling it out for inclusion directly. We'll break those
once we remove the implicit presence otherwise
[With input from Uwe Kleine-König <u.kleine-koenig@pengutronix.de>]
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> | ```diff
diff --git a/drivers/dma/imx-dma.c b/drivers/dma/imx-dma.c
index d99f71c356b5..3732de89adc9 100644
--- a/drivers/dma/imx-dma.c
+++ b/drivers/dma/imx-dma.c
@@ -23,6 +23,7 @@
#include <linux/slab.h>
#include <linux/platform_device.h>
#include <linux/dmaengine.h>
+#include <linux/module.h>
#include <asm/irq.... |
c05aa8fbcc21b1863085dde5cb3c97b32c52ce40 | Analyze and fix the following issue in the Linux kernel code: drivers/char: Fix implicit use of err.h in ramoops.c | Problem Details:
drivers/char/ramoops.c: In function 'ramoops_init':
drivers/char/ramoops.c:221: error: implicit declaration of function 'IS_ERR'
drivers/char/ramoops.c:222: error: implicit declaration of function 'PTR_ERR'
make[3]: *** [drivers/char/ramoops.o] Error 1
Signed-off-by: Paul Gortmaker <paul.gortmaker@win... | ```diff
diff --git a/drivers/char/ramoops.c b/drivers/char/ramoops.c
index 810aff9e750f..7c7f42a1f880 100644
--- a/drivers/char/ramoops.c
+++ b/drivers/char/ramoops.c
@@ -26,6 +26,7 @@
#include <linux/module.h>
#include <linux/kmsg_dump.h>
#include <linux/time.h>
+#include <linux/err.h>
#include <linux/io.h>
#incl... |
ba33162a2c3c847c02e42b9193b250217fdbbd9d | Analyze and fix the following issue in the Linux kernel code: drivers/base: base.h implicitly depends on <linux/notifier.h> | Problem Details:
This file is currently relying on <linux/module.h> sneaking it in
through the implicit include paths from device.h. Once that
is cleaned up, this will happen:
In file included from drivers/base/init.c:12:
drivers/base/base.h:34: error: field ‘bus_notifier’ has incomplete type
make[3]: *** [drivers/ba... | ```diff
diff --git a/drivers/base/base.h b/drivers/base/base.h
index a34dca0ad041..21c1b96c34c6 100644
--- a/drivers/base/base.h
+++ b/drivers/base/base.h
@@ -1,3 +1,4 @@
+#include <linux/notifier.h>
/**
* struct subsys_private - structure to hold the private to the driver core portions of the bus_type/class struc... |
08a999ce69c17802d92ad760faa21ce112968172 | Analyze and fix the following issue in the Linux kernel code: drivers/base: dma-coherent.c is a module and needs module.h | Problem Details:
It was implicitly getting it before, but it will break compiles
once we fix that.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> | ```diff
diff --git a/drivers/base/dma-coherent.c b/drivers/base/dma-coherent.c
index f369e2795985..bb0025c510b3 100644
--- a/drivers/base/dma-coherent.c
+++ b/drivers/base/dma-coherent.c
@@ -4,6 +4,7 @@
*/
#include <linux/slab.h>
#include <linux/kernel.h>
+#include <linux/module.h>
#include <linux/dma-mapping.h>
... |
b108d9764cff25262bf764542ed1998d3e568962 | Analyze and fix the following issue in the Linux kernel code: infiniband: add in export.h for files using EXPORT_SYMBOL/THIS_MODULE | Problem Details:
These were getting it implicitly via device.h --> module.h but
we are going to stop that when we clean up the headers.
Fix these in advance so the tree remains biscect-clean.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> | ```diff
diff --git a/drivers/infiniband/core/fmr_pool.c b/drivers/infiniband/core/fmr_pool.c
index 4507043d24c8..176c8f90f2bb 100644
--- a/drivers/infiniband/core/fmr_pool.c
+++ b/drivers/infiniband/core/fmr_pool.c
@@ -33,6 +33,7 @@
#include <linux/errno.h>
#include <linux/spinlock.h>
+#include <linux/export.h>
#i... |
e4dd23d753c3cb0d8533d353069e8b2e8a666360 | Analyze and fix the following issue in the Linux kernel code: infiniband: Fix up module files that need to include module.h | Problem Details:
They had been getting it implicitly via device.h but we can't
rely on that for the future, due to a pending cleanup so fix
it now.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> | ```diff
diff --git a/drivers/infiniband/core/addr.c b/drivers/infiniband/core/addr.c
index 236ad9a89c0a..691276bafd78 100644
--- a/drivers/infiniband/core/addr.c
+++ b/drivers/infiniband/core/addr.c
@@ -37,6 +37,7 @@
#include <linux/inetdevice.h>
#include <linux/slab.h>
#include <linux/workqueue.h>
+#include <linux/... |
fc87af74af7f856bb8e7585308fb1fdaaa69ec73 | Analyze and fix the following issue in the Linux kernel code: infiniband: Fix up users implicitly relying on getting stat.h | Problem Details:
They get it via module.h (via device.h) but we want to clean that up.
When we do, we'll get things like:
CC [M] drivers/infiniband/core/sysfs.o
sysfs.c:361: error: 'S_IRUGO' undeclared here (not in a function)
sysfs.c:654: error: 'S_IWUSR' undeclared here (not in a function)
so add in the stat... | ```diff
diff --git a/drivers/infiniband/core/sysfs.c b/drivers/infiniband/core/sysfs.c
index 9ab5df72df7b..ab7fc60aeb5d 100644
--- a/drivers/infiniband/core/sysfs.c
+++ b/drivers/infiniband/core/sysfs.c
@@ -35,6 +35,7 @@
#include "core_priv.h"
#include <linux/slab.h>
+#include <linux/stat.h>
#include <linux/string... |
a8a359318530a779c8d28d86357d492adead5b1f | Analyze and fix the following issue in the Linux kernel code: video: Add export.h for THIS_MODULE/EXPORT_SYMBOL to drivers/video | Problem Details:
With module.h being implicitly everywhere via device.h, the absence
of explicitly including something for EXPORT_SYMBOL went unnoticed.
Since we are heading to fix things up and clean module.h from the
device.h file, we need to explicitly include these files now.
Signed-off-by: Paul Gortmaker <paul.go... | ```diff
diff --git a/drivers/video/fb_notify.c b/drivers/video/fb_notify.c
index 8c020389e4fa..74c2da528884 100644
--- a/drivers/video/fb_notify.c
+++ b/drivers/video/fb_notify.c
@@ -12,6 +12,7 @@
*/
#include <linux/fb.h>
#include <linux/notifier.h>
+#include <linux/export.h>
static BLOCKING_NOTIFIER_HEAD(fb_not... |
a6ee87790b708dc4cdd3643104417793f0d985ec | Analyze and fix the following issue in the Linux kernel code: cpufreq: Fix build of s3c64xx cpufreq driver for header change | Problem Details:
The header change has removed an implicit include of module.h, breaking
the build due to the use of THIS_MODULE. Fix that.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> | ```diff
diff --git a/drivers/cpufreq/s3c64xx-cpufreq.c b/drivers/cpufreq/s3c64xx-cpufreq.c
index b8d1d205e1ef..3475f65aeec6 100644
--- a/drivers/cpufreq/s3c64xx-cpufreq.c
+++ b/drivers/cpufreq/s3c64xx-cpufreq.c
@@ -15,6 +15,7 @@
#include <linux/clk.h>
#include <linux/err.h>
#include <linux/regulator/consumer.h>
+#in... |
93cf5d75b9d0b703ca8f4f8f98303ad77ab20d26 | Analyze and fix the following issue in the Linux kernel code: i2c: Add module.h to modular files prev. implicitly getting it | Problem Details:
These files use interfaces from linux/module.h, so they must
include that file to avoid build errors when the implicit
presence of module.h is removed.
[with i2c-pxa-pci.c fix from Randy Dunlap <rdunlap@xenotime.net>]
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> | ```diff
diff --git a/drivers/i2c/busses/i2c-pxa-pci.c b/drivers/i2c/busses/i2c-pxa-pci.c
index b73da6cd6f91..632e088760a3 100644
--- a/drivers/i2c/busses/i2c-pxa-pci.c
+++ b/drivers/i2c/busses/i2c-pxa-pci.c
@@ -3,6 +3,7 @@
* It does not support slave mode, the register slightly moved. This PCI
* device provides thr... |
345df5126e5cf46c8ddf2ec491f1d6e17e29e645 | Analyze and fix the following issue in the Linux kernel code: i2c: add export.h to i2c-boardinfo.c for EXPORT_SYMBOL | Problem Details:
With module.h being implicitly everywhere via device.h, the absence
of explicitly including something for EXPORT_SYMBOL went unnoticed.
Since we are heading to fix things up and clean module.h from the
device.h file, we need to explicitly include these files now.
Signed-off-by: Paul Gortmaker <paul.go... | ```diff
diff --git a/drivers/i2c/i2c-boardinfo.c b/drivers/i2c/i2c-boardinfo.c
index 3ca2e012e789..10274ffb66d7 100644
--- a/drivers/i2c/i2c-boardinfo.c
+++ b/drivers/i2c/i2c-boardinfo.c
@@ -19,6 +19,7 @@
#include <linux/kernel.h>
#include <linux/i2c.h>
#include <linux/slab.h>
+#include <linux/export.h>
#include <l... |
2113852b239ed4a93d04135372162252f9342bb6 | Analyze and fix the following issue in the Linux kernel code: rtc: Add module.h to implicit users in drivers/rtc | Problem Details:
The module.h was implicitly everywhere, but when we clean
that up, the implicit users will compile fail; fix them up
in advance.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> | ```diff
diff --git a/drivers/rtc/interface.c b/drivers/rtc/interface.c
index 44e91e598f8d..8e286259a007 100644
--- a/drivers/rtc/interface.c
+++ b/drivers/rtc/interface.c
@@ -13,6 +13,7 @@
#include <linux/rtc.h>
#include <linux/sched.h>
+#include <linux/module.h>
#include <linux/log2.h>
#include <linux/workqueue.... |
0e648f42f24f89e24c4dcac534d8e7086c9fd559 | Analyze and fix the following issue in the Linux kernel code: tty: Add export.h for EXPORT_SYMBOL/THIS_MODULE to exporters | Problem Details:
With module.h being implicitly everywhere via device.h, the absence
of explicitly including something for EXPORT_SYMBOL went unnoticed.
Since we are heading to fix things up and clean module.h from the
device.h file, we need to explicitly include these files now.
Signed-off-by: Paul Gortmaker <paul.go... | ```diff
diff --git a/drivers/tty/serial/nwpserial.c b/drivers/tty/serial/nwpserial.c
index 9beaff1cec24..dd4c31d1aee5 100644
--- a/drivers/tty/serial/nwpserial.c
+++ b/drivers/tty/serial/nwpserial.c
@@ -10,6 +10,7 @@
*
*/
#include <linux/init.h>
+#include <linux/export.h>
#include <linux/console.h>
#include <lin... |
578b9ce0095ff3dd2c3b94508407c3be8fcce68d | Analyze and fix the following issue in the Linux kernel code: tty: Add module.h to drivers/tty users who just expect it there. | Problem Details:
We are cleaning up the issue that means module.h is omnipresent.
These tty users are the people who implictly are relying on that.
Fix up the real users to call out the include that they really need.
In the case of jsm_driver.c file, it had moduleparam.h but that
isn't enough and it needs the full mod... | ```diff
diff --git a/drivers/tty/hvc/hvc_iseries.c b/drivers/tty/hvc/hvc_iseries.c
index 21c54955084e..3f4a897bf4d7 100644
--- a/drivers/tty/hvc/hvc_iseries.c
+++ b/drivers/tty/hvc/hvc_iseries.c
@@ -23,6 +23,7 @@
#include <linux/types.h>
#include <linux/init.h>
#include <linux/kernel.h>
+#include <linux/module.h>
#... |
4bcbcc96e16fd44eaf9791cb369da757dae1656c | Analyze and fix the following issue in the Linux kernel code: usb: fix implicit usage of gfp.h in host/xhci-hub.c | Problem Details:
To fix this build error on ARM:
drivers/usb/host/xhci-hub.c: In function 'xhci_stop_device':
drivers/usb/host/xhci-hub.c:261: error: 'GFP_NOIO' undeclared (first use in this function)
make[4]: *** [drivers/usb/host/xhci-hub.o] Error 1
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> | ```diff
diff --git a/drivers/usb/host/xhci-hub.c b/drivers/usb/host/xhci-hub.c
index 431efe72b1f7..430e88fd3f6c 100644
--- a/drivers/usb/host/xhci-hub.c
+++ b/drivers/usb/host/xhci-hub.c
@@ -20,6 +20,7 @@
* Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
+#include <linux/gfp.h>
#include <asm/unaligned.h>
#in... |
f940fcd8eadfe5b909a1474b57de7755edeee62b | Analyze and fix the following issue in the Linux kernel code: usb: Add export.h for EXPORT_SYMBOL/THIS_MODULE where needed | Problem Details:
With module.h being implicitly everywhere via device.h, the absence
of explicitly including something for EXPORT_SYMBOL went unnoticed.
Since we are heading to fix things up and clean module.h from the
device.h file, we need to explicitly include these files now.
Use the lightweight version of the hea... | ```diff
diff --git a/drivers/usb/core/driver.c b/drivers/usb/core/driver.c
index 3b029a0a4787..2de2803f6533 100644
--- a/drivers/usb/core/driver.c
+++ b/drivers/usb/core/driver.c
@@ -24,6 +24,7 @@
#include <linux/device.h>
#include <linux/slab.h>
+#include <linux/export.h>
#include <linux/usb.h>
#include <linux/u... |
acf3368ffb75fc4a83726655d697e79646fe4eb3 | Analyze and fix the following issue in the Linux kernel code: scsi: Fix up files implicitly depending on module.h inclusion | Problem Details:
The module.h header was implicitly present everywhere, so files
with no explicit include of the module infrastructure would build
anyway. We are now removing the implicit include, and so we need
to call out the module.h file that we need explicitly.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windr... | ```diff
diff --git a/drivers/scsi/a2091.c b/drivers/scsi/a2091.c
index 1bb5d3f0e260..79a30633d4aa 100644
--- a/drivers/scsi/a2091.c
+++ b/drivers/scsi/a2091.c
@@ -5,6 +5,7 @@
#include <linux/slab.h>
#include <linux/spinlock.h>
#include <linux/zorro.h>
+#include <linux/module.h>
#include <asm/page.h>
#include <as... |
eefa9cfc891d18aa83744353d2a3fbe95a86ee2d | Analyze and fix the following issue in the Linux kernel code: pci: add module.h to files implicitly relying on its presence. | Problem Details:
These were getting module.h implicitly from device.h but we want
to clean that up, so we fix it here to avoid things like:
pci/slot.c: In function ‘pci_hp_create_module_link’:
pci/slot.c:383: error: ‘module_kset’ undeclared (first use in this function)
Similarly, rpadlpar_core.c is modular, so add mo... | ```diff
diff --git a/drivers/pci/hotplug/pciehp_acpi.c b/drivers/pci/hotplug/pciehp_acpi.c
index 5f7226223a62..376d70d17176 100644
--- a/drivers/pci/hotplug/pciehp_acpi.c
+++ b/drivers/pci/hotplug/pciehp_acpi.c
@@ -27,6 +27,7 @@
#include <linux/pci.h>
#include <linux/pci_hotplug.h>
#include <linux/slab.h>
+#include ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.