diff options
Diffstat (limited to 'security/lsm_audit.c')
| -rw-r--r-- | security/lsm_audit.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/security/lsm_audit.c b/security/lsm_audit.c index f84001019356..33028c098ef3 100644 --- a/security/lsm_audit.c +++ b/security/lsm_audit.c | |||
| @@ -321,6 +321,7 @@ static void dump_common_audit_data(struct audit_buffer *ab, | |||
| 321 | if (a->u.net->sk) { | 321 | if (a->u.net->sk) { |
| 322 | struct sock *sk = a->u.net->sk; | 322 | struct sock *sk = a->u.net->sk; |
| 323 | struct unix_sock *u; | 323 | struct unix_sock *u; |
| 324 | struct unix_address *addr; | ||
| 324 | int len = 0; | 325 | int len = 0; |
| 325 | char *p = NULL; | 326 | char *p = NULL; |
| 326 | 327 | ||
| @@ -351,14 +352,15 @@ static void dump_common_audit_data(struct audit_buffer *ab, | |||
| 351 | #endif | 352 | #endif |
| 352 | case AF_UNIX: | 353 | case AF_UNIX: |
| 353 | u = unix_sk(sk); | 354 | u = unix_sk(sk); |
| 355 | addr = smp_load_acquire(&u->addr); | ||
| 356 | if (!addr) | ||
| 357 | break; | ||
| 354 | if (u->path.dentry) { | 358 | if (u->path.dentry) { |
| 355 | audit_log_d_path(ab, " path=", &u->path); | 359 | audit_log_d_path(ab, " path=", &u->path); |
| 356 | break; | 360 | break; |
| 357 | } | 361 | } |
| 358 | if (!u->addr) | 362 | len = addr->len-sizeof(short); |
| 359 | break; | 363 | p = &addr->name->sun_path[0]; |
| 360 | len = u->addr->len-sizeof(short); | ||
| 361 | p = &u->addr->name->sun_path[0]; | ||
| 362 | audit_log_format(ab, " path="); | 364 | audit_log_format(ab, " path="); |
| 363 | if (*p) | 365 | if (*p) |
| 364 | audit_log_untrustedstring(ab, p); | 366 | audit_log_untrustedstring(ab, p); |
