diff options
Diffstat (limited to 'modutils')
-rw-r--r-- | modutils/modutils-24.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/modutils/modutils-24.c b/modutils/modutils-24.c index 5c1611c29..7f39e253d 100644 --- a/modutils/modutils-24.c +++ b/modutils/modutils-24.c | |||
@@ -3529,20 +3529,18 @@ static void set_tainted(int fd, const char *m_name, | |||
3529 | /* Check if loading this module will taint the kernel. */ | 3529 | /* Check if loading this module will taint the kernel. */ |
3530 | static void check_tainted_module(struct obj_file *f, const char *m_name) | 3530 | static void check_tainted_module(struct obj_file *f, const char *m_name) |
3531 | { | 3531 | { |
3532 | static const char tainted_file[] ALIGN1 = TAINT_FILENAME; | ||
3533 | |||
3534 | int fd, kernel_has_tainted; | 3532 | int fd, kernel_has_tainted; |
3535 | const char *ptr; | 3533 | const char *ptr; |
3536 | 3534 | ||
3537 | kernel_has_tainted = 1; | 3535 | kernel_has_tainted = 1; |
3538 | fd = open(tainted_file, O_RDWR); | 3536 | fd = open(TAINT_FILENAME, O_RDWR); |
3539 | if (fd < 0) { | 3537 | if (fd < 0) { |
3540 | if (errno == ENOENT) | 3538 | if (errno == ENOENT) |
3541 | kernel_has_tainted = 0; | 3539 | kernel_has_tainted = 0; |
3542 | else if (errno == EACCES) | 3540 | else if (errno == EACCES) |
3543 | kernel_has_tainted = 1; | 3541 | kernel_has_tainted = 1; |
3544 | else { | 3542 | else { |
3545 | perror(tainted_file); | 3543 | perror(TAINT_FILENAME); |
3546 | kernel_has_tainted = 0; | 3544 | kernel_has_tainted = 0; |
3547 | } | 3545 | } |
3548 | } | 3546 | } |