Mageia Bugzilla – Attachment 5064 Details for
Bug 12893
System won't boot up after recent kernel and Nvidia updates (plymouth problem)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
New Account
|
Forgot Password
[patch]
depmod: do not allow partial matches with "search" directive
0001-depmod-do-not-allow-partial-matches-with-search-dire.patch (text/plain), 1.25 KB, created by
Anssi Hannula
on 2014-03-19 00:31:48 CET
(
hide
)
Description:
depmod: do not allow partial matches with "search" directive
Filename:
MIME Type:
Creator:
Anssi Hannula
Created:
2014-03-19 00:31:48 CET
Size:
1.25 KB
patch
obsolete
>From dafcae4136cd2dadd2b788ce1a8f0b3da58d7540 Mon Sep 17 00:00:00 2001 >From: Anssi Hannula <anssi@mageia.org> >Date: Wed, 19 Mar 2014 01:24:12 +0200 >Subject: [PATCH 1/2] depmod: do not allow partial matches with "search" > directive > >Currently e.g. "search foo foobar built-in" will cause unpredictable >results if baz.ko is in both foo/ and foobar/, since "foo" in search may >match both of those directories and the preferred module therefore >depends on processing order. > >Fix the code to ensure that the match is performed on full pathname >components only. >--- > tools/depmod.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >diff --git a/tools/depmod.c b/tools/depmod.c >index 9f83ee8..328e578 100644 >--- a/tools/depmod.c >+++ b/tools/depmod.c >@@ -1153,10 +1153,10 @@ static int depmod_module_is_higher_priority(const struct depmod *depmod, const s > DBG("search %s\n", se->builtin ? "built-in" : se->path); > if (se->builtin) > bprio = i; >- else if (newlen >= se->len && >+ else if (newlen > se->len && newpath[se->len] == '/' && > memcmp(se->path, newpath, se->len) == 0) > newprio = i; >- else if (oldlen >= se->len && >+ else if (oldlen > se->len && oldpath[se->len] == '/' && > memcmp(se->path, oldpath, se->len) == 0) > oldprio = i; > } >-- >1.8.1.5 >
From dafcae4136cd2dadd2b788ce1a8f0b3da58d7540 Mon Sep 17 00:00:00 2001 From: Anssi Hannula <anssi@mageia.org> Date: Wed, 19 Mar 2014 01:24:12 +0200 Subject: [PATCH 1/2] depmod: do not allow partial matches with "search" directive Currently e.g. "search foo foobar built-in" will cause unpredictable results if baz.ko is in both foo/ and foobar/, since "foo" in search may match both of those directories and the preferred module therefore depends on processing order. Fix the code to ensure that the match is performed on full pathname components only. --- tools/depmod.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/depmod.c b/tools/depmod.c index 9f83ee8..328e578 100644 --- a/tools/depmod.c +++ b/tools/depmod.c @@ -1153,10 +1153,10 @@ static int depmod_module_is_higher_priority(const struct depmod *depmod, const s DBG("search %s\n", se->builtin ? "built-in" : se->path); if (se->builtin) bprio = i; - else if (newlen >= se->len && + else if (newlen > se->len && newpath[se->len] == '/' && memcmp(se->path, newpath, se->len) == 0) newprio = i; - else if (oldlen >= se->len && + else if (oldlen > se->len && oldpath[se->len] == '/' && memcmp(se->path, oldpath, se->len) == 0) oldprio = i; } -- 1.8.1.5
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 12893
: 5064 |
5105
|
5109
|
5111