aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/mod/modpost.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
index 2909391a8035..7c87267b6ff0 100644
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -583,6 +583,12 @@ static int strrcmp(const char *s, const char *sub)
583 583
584/** 584/**
585 * Whitelist to allow certain references to pass with no warning. 585 * Whitelist to allow certain references to pass with no warning.
586 *
587 * Pattern 0:
588 * Do not warn if funtion/data are marked with __init_refok/__initdata_refok.
589 * The pattern is identified by:
590 * fromsec = .text.init.refok | .data.init.refok
591 *
586 * Pattern 1: 592 * Pattern 1:
587 * If a module parameter is declared __initdata and permissions=0 593 * If a module parameter is declared __initdata and permissions=0
588 * then this is legal despite the warning generated. 594 * then this is legal despite the warning generated.
@@ -686,6 +692,11 @@ static int secref_whitelist(const char *modname, const char *tosec,
686 NULL 692 NULL
687 }; 693 };
688 694
695 /* Check for pattern 0 */
696 if ((strcmp(fromsec, ".text.init.refok") == 0) ||
697 (strcmp(fromsec, ".data.init.refok") == 0))
698 return 1;
699
689 /* Check for pattern 1 */ 700 /* Check for pattern 1 */
690 if (strcmp(tosec, ".init.data") != 0) 701 if (strcmp(tosec, ".init.data") != 0)
691 f1 = 0; 702 f1 = 0;