Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 35440
b: refs/heads/master
c: 9e157a5
h: refs/heads/master
v: v3
  • Loading branch information
Magnus Damm authored and Sam Ravnborg committed Sep 25, 2006
1 parent f249cfb commit 39d4eff
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a07f6033ca135a94a69c6874d028f01338e2535c
refs/heads/master: 9e157a5aa899f1ef73780e4755b57ddeb9225079
16 changes: 12 additions & 4 deletions trunk/scripts/mod/modpost.c
Original file line number Diff line number Diff line change
Expand Up @@ -581,8 +581,8 @@ static int strrcmp(const char *s, const char *sub)
* fromsec = .data
* atsym = *driver, *_template, *_sht, *_ops, *_probe, *probe_one
**/
static int secref_whitelist(const char *tosec, const char *fromsec,
const char *atsym)
static int secref_whitelist(const char *modname, const char *tosec,
const char *fromsec, const char *atsym)
{
int f1 = 1, f2 = 1;
const char **s;
Expand Down Expand Up @@ -618,8 +618,15 @@ static int secref_whitelist(const char *tosec, const char *fromsec,
for (s = pat2sym; *s; s++)
if (strrcmp(atsym, *s) == 0)
f1 = 1;
if (f1 && f2)
return 1;

return f1 && f2;
/* Whitelist all references from .pci_fixup section if vmlinux */
if (is_vmlinux(modname)) {
if ((strcmp(fromsec, ".pci_fixup") == 0) &&
(strcmp(tosec, ".init.text") == 0))
return 1;
}
}

/**
Expand Down Expand Up @@ -726,7 +733,8 @@ static void warn_sec_mismatch(const char *modname, const char *fromsec,

/* check whitelist - we may ignore it */
if (before &&
secref_whitelist(secname, fromsec, elf->strtab + before->st_name))
secref_whitelist(modname, secname, fromsec,
elf->strtab + before->st_name))
return;

if (before && after) {
Expand Down

0 comments on commit 39d4eff

Please sign in to comment.