aboutsummaryrefslogtreecommitdiff
path: root/modutils
diff options
context:
space:
mode:
Diffstat (limited to 'modutils')
-rw-r--r--modutils/insmod.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/modutils/insmod.c b/modutils/insmod.c
index b9d8a0243..cba8dc4a0 100644
--- a/modutils/insmod.c
+++ b/modutils/insmod.c
@@ -3656,16 +3656,18 @@ static int obj_gpl_license(struct obj_file *f, const char **license)
3656static void set_tainted(struct obj_file *f, int fd, char *m_name, 3656static void set_tainted(struct obj_file *f, int fd, char *m_name,
3657 int kernel_has_tainted, int taint, const char *text1, const char *text2) 3657 int kernel_has_tainted, int taint, const char *text1, const char *text2)
3658{ 3658{
3659 static smallint printed_info;
3660
3659 char buf[80]; 3661 char buf[80];
3660 int oldval; 3662 int oldval;
3661 static int first = 1; 3663
3662 if (fd < 0 && !kernel_has_tainted) 3664 if (fd < 0 && !kernel_has_tainted)
3663 return; /* New modutils on old kernel */ 3665 return; /* New modutils on old kernel */
3664 printf("Warning: loading %s will taint the kernel: %s%s\n", 3666 printf("Warning: loading %s will taint the kernel: %s%s\n",
3665 m_name, text1, text2); 3667 m_name, text1, text2);
3666 if (first) { 3668 if (!printed_info) {
3667 printf(" See %s for information about tainted modules\n", TAINT_URL); 3669 printf(" See %s for information about tainted modules\n", TAINT_URL);
3668 first = 0; 3670 printed_info = 1;
3669 } 3671 }
3670 if (fd >= 0) { 3672 if (fd >= 0) {
3671 read(fd, buf, sizeof(buf)-1); 3673 read(fd, buf, sizeof(buf)-1);