@@ -2332,11 +2332,20 @@ static int rewrite_section_headers(struct load_info *info, int flags)
2332
2332
return 0 ;
2333
2333
}
2334
2334
2335
+ static const char * const module_license_offenders [] = {
2336
+ /* driverloader was caught wrongly pretending to be under GPL */
2337
+ "driverloader" ,
2338
+
2339
+ /* lve claims to be GPL but upstream won't provide source */
2340
+ "lve" ,
2341
+ };
2342
+
2335
2343
/*
2336
2344
* These calls taint the kernel depending certain module circumstances */
2337
2345
static void module_augment_kernel_taints (struct module * mod , struct load_info * info )
2338
2346
{
2339
2347
int prev_taint = test_taint (TAINT_PROPRIETARY_MODULE );
2348
+ size_t i ;
2340
2349
2341
2350
if (!get_modinfo (info , "intree" )) {
2342
2351
if (!test_taint (TAINT_OOT_MODULE ))
@@ -2385,15 +2394,11 @@ static void module_augment_kernel_taints(struct module *mod, struct load_info *i
2385
2394
if (strcmp (mod -> name , "ndiswrapper" ) == 0 )
2386
2395
add_taint (TAINT_PROPRIETARY_MODULE , LOCKDEP_NOW_UNRELIABLE );
2387
2396
2388
- /* driverloader was caught wrongly pretending to be under GPL */
2389
- if (strcmp (mod -> name , "driverloader" ) == 0 )
2390
- add_taint_module (mod , TAINT_PROPRIETARY_MODULE ,
2391
- LOCKDEP_NOW_UNRELIABLE );
2392
-
2393
- /* lve claims to be GPL but upstream won't provide source */
2394
- if (strcmp (mod -> name , "lve" ) == 0 )
2395
- add_taint_module (mod , TAINT_PROPRIETARY_MODULE ,
2396
- LOCKDEP_NOW_UNRELIABLE );
2397
+ for (i = 0 ; i < ARRAY_SIZE (module_license_offenders ); ++ i ) {
2398
+ if (strcmp (mod -> name , module_license_offenders [i ]) == 0 )
2399
+ add_taint_module (mod , TAINT_PROPRIETARY_MODULE ,
2400
+ LOCKDEP_NOW_UNRELIABLE );
2401
+ }
2397
2402
2398
2403
if (!prev_taint && test_taint (TAINT_PROPRIETARY_MODULE ))
2399
2404
pr_warn ("%s: module license taints kernel.\n" , mod -> name );
0 commit comments