Skip to content

Commit 67bae14

Browse files
author
Jiri Kosina
committed
Merge branch 'for-5.0/upstream-fixes' into for-linus
Document change towards group maintainership of livepatching code samples/ warning fix from Nicholas Mc Guire
2 parents bae0543 + b73d5dc commit 67bae14

File tree

4 files changed

+13
-12
lines changed

4 files changed

+13
-12
lines changed

MAINTAINERS

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8820,10 +8820,10 @@ F: drivers/platform/x86/hp_accel.c
88208820

88218821
LIVE PATCHING
88228822
M: Josh Poimboeuf <[email protected]>
8823-
M: Jessica Yu <[email protected]>
88248823
M: Jiri Kosina <[email protected]>
88258824
M: Miroslav Benes <[email protected]>
8826-
R: Petr Mladek <[email protected]>
8825+
M: Petr Mladek <[email protected]>
8826+
R: Joe Lawrence <[email protected]>
88278827
S: Maintained
88288828
F: kernel/livepatch/
88298829
F: include/linux/livepatch.h
@@ -8834,7 +8834,7 @@ F: Documentation/ABI/testing/sysfs-kernel-livepatch
88348834
F: samples/livepatch/
88358835
F: tools/testing/selftests/livepatch/
88368836
8837-
T: git git://git.kernel.org/pub/scm/linux/kernel/git/jikos/livepatching.git
8837+
T: git git://git.kernel.org/pub/scm/linux/kernel/git/livepatching/livepatching.git
88388838

88398839
LLC (802.2)
88408840

samples/livepatch/livepatch-shadow-fix1.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ static int shadow_leak_ctor(void *obj, void *shadow_data, void *ctor_data)
7171
return 0;
7272
}
7373

74-
struct dummy *livepatch_fix1_dummy_alloc(void)
74+
static struct dummy *livepatch_fix1_dummy_alloc(void)
7575
{
7676
struct dummy *d;
7777
void *leak;
@@ -113,7 +113,7 @@ static void livepatch_fix1_dummy_leak_dtor(void *obj, void *shadow_data)
113113
__func__, d, *shadow_leak);
114114
}
115115

116-
void livepatch_fix1_dummy_free(struct dummy *d)
116+
static void livepatch_fix1_dummy_free(struct dummy *d)
117117
{
118118
void **shadow_leak;
119119

samples/livepatch/livepatch-shadow-fix2.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ struct dummy {
5050
unsigned long jiffies_expire;
5151
};
5252

53-
bool livepatch_fix2_dummy_check(struct dummy *d, unsigned long jiffies)
53+
static bool livepatch_fix2_dummy_check(struct dummy *d, unsigned long jiffies)
5454
{
5555
int *shadow_count;
5656

@@ -78,7 +78,7 @@ static void livepatch_fix2_dummy_leak_dtor(void *obj, void *shadow_data)
7878
__func__, d, *shadow_leak);
7979
}
8080

81-
void livepatch_fix2_dummy_free(struct dummy *d)
81+
static void livepatch_fix2_dummy_free(struct dummy *d)
8282
{
8383
void **shadow_leak;
8484
int *shadow_count;

samples/livepatch/livepatch-shadow-mod.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -96,15 +96,15 @@ MODULE_DESCRIPTION("Buggy module for shadow variable demo");
9696
* Keep a list of all the dummies so we can clean up any residual ones
9797
* on module exit
9898
*/
99-
LIST_HEAD(dummy_list);
100-
DEFINE_MUTEX(dummy_list_mutex);
99+
static LIST_HEAD(dummy_list);
100+
static DEFINE_MUTEX(dummy_list_mutex);
101101

102102
struct dummy {
103103
struct list_head list;
104104
unsigned long jiffies_expire;
105105
};
106106

107-
noinline struct dummy *dummy_alloc(void)
107+
static __used noinline struct dummy *dummy_alloc(void)
108108
{
109109
struct dummy *d;
110110
void *leak;
@@ -129,15 +129,16 @@ noinline struct dummy *dummy_alloc(void)
129129
return d;
130130
}
131131

132-
noinline void dummy_free(struct dummy *d)
132+
static __used noinline void dummy_free(struct dummy *d)
133133
{
134134
pr_info("%s: dummy @ %p, expired = %lx\n",
135135
__func__, d, d->jiffies_expire);
136136

137137
kfree(d);
138138
}
139139

140-
noinline bool dummy_check(struct dummy *d, unsigned long jiffies)
140+
static __used noinline bool dummy_check(struct dummy *d,
141+
unsigned long jiffies)
141142
{
142143
return time_after(jiffies, d->jiffies_expire);
143144
}

0 commit comments

Comments
 (0)