diff options
Diffstat (limited to 'scripts/mod/modpost.c')
-rw-r--r-- | scripts/mod/modpost.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index 253c107b9a99..1ec7158b6c1f 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c | |||
@@ -1035,6 +1035,13 @@ static const struct sectioncheck *section_mismatch( | |||
1035 | * fromsec = .data* | 1035 | * fromsec = .data* |
1036 | * atsym =__param* | 1036 | * atsym =__param* |
1037 | * | 1037 | * |
1038 | * Pattern 1a: | ||
1039 | * module_param_call() ops can refer to __init set function if permissions=0 | ||
1040 | * The pattern is identified by: | ||
1041 | * tosec = .init.text | ||
1042 | * fromsec = .data* | ||
1043 | * atsym = __param_ops_* | ||
1044 | * | ||
1038 | * Pattern 2: | 1045 | * Pattern 2: |
1039 | * Many drivers utilise a *driver container with references to | 1046 | * Many drivers utilise a *driver container with references to |
1040 | * add, remove, probe functions etc. | 1047 | * add, remove, probe functions etc. |
@@ -1069,6 +1076,12 @@ static int secref_whitelist(const struct sectioncheck *mismatch, | |||
1069 | (strncmp(fromsym, "__param", strlen("__param")) == 0)) | 1076 | (strncmp(fromsym, "__param", strlen("__param")) == 0)) |
1070 | return 0; | 1077 | return 0; |
1071 | 1078 | ||
1079 | /* Check for pattern 1a */ | ||
1080 | if (strcmp(tosec, ".init.text") == 0 && | ||
1081 | match(fromsec, data_sections) && | ||
1082 | (strncmp(fromsym, "__param_ops_", strlen("__param_ops_")) == 0)) | ||
1083 | return 0; | ||
1084 | |||
1072 | /* Check for pattern 2 */ | 1085 | /* Check for pattern 2 */ |
1073 | if (match(tosec, init_exit_sections) && | 1086 | if (match(tosec, init_exit_sections) && |
1074 | match(fromsec, data_sections) && | 1087 | match(fromsec, data_sections) && |