diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2006-02-18 15:41:50 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2006-02-18 15:41:50 -0500 |
commit | ef20c8c197df9b8d5bd4af0679123826da028861 (patch) | |
tree | 764632d00ca11f241013b1e203d1b9a5c9e30acb | |
parent | bd71c2b17468a2531fb4c81ec1d73520845e97e1 (diff) |
[PATCH] GFP_KERNEL allocations in atomic (auditsc)
audit_log_exit() is called from atomic contexts and gets explicit
gfp_mask argument; it should use it for all allocations rather
than doing some with gfp_mask and some with GFP_KERNEL.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r-- | kernel/auditsc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/kernel/auditsc.c b/kernel/auditsc.c index 685c25175d96..d7e7e637b92a 100644 --- a/kernel/auditsc.c +++ b/kernel/auditsc.c | |||
@@ -841,7 +841,7 @@ static void audit_log_exit(struct audit_context *context, gfp_t gfp_mask) | |||
841 | 841 | ||
842 | for (aux = context->aux; aux; aux = aux->next) { | 842 | for (aux = context->aux; aux; aux = aux->next) { |
843 | 843 | ||
844 | ab = audit_log_start(context, GFP_KERNEL, aux->type); | 844 | ab = audit_log_start(context, gfp_mask, aux->type); |
845 | if (!ab) | 845 | if (!ab) |
846 | continue; /* audit_panic has been called */ | 846 | continue; /* audit_panic has been called */ |
847 | 847 | ||
@@ -878,14 +878,14 @@ static void audit_log_exit(struct audit_context *context, gfp_t gfp_mask) | |||
878 | } | 878 | } |
879 | 879 | ||
880 | if (context->pwd && context->pwdmnt) { | 880 | if (context->pwd && context->pwdmnt) { |
881 | ab = audit_log_start(context, GFP_KERNEL, AUDIT_CWD); | 881 | ab = audit_log_start(context, gfp_mask, AUDIT_CWD); |
882 | if (ab) { | 882 | if (ab) { |
883 | audit_log_d_path(ab, "cwd=", context->pwd, context->pwdmnt); | 883 | audit_log_d_path(ab, "cwd=", context->pwd, context->pwdmnt); |
884 | audit_log_end(ab); | 884 | audit_log_end(ab); |
885 | } | 885 | } |
886 | } | 886 | } |
887 | for (i = 0; i < context->name_count; i++) { | 887 | for (i = 0; i < context->name_count; i++) { |
888 | ab = audit_log_start(context, GFP_KERNEL, AUDIT_PATH); | 888 | ab = audit_log_start(context, gfp_mask, AUDIT_PATH); |
889 | if (!ab) | 889 | if (!ab) |
890 | continue; /* audit_panic has been called */ | 890 | continue; /* audit_panic has been called */ |
891 | 891 | ||