mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-06 05:02:31 +00:00
audit/stable-6.7 PR 20231030
-----BEGIN PGP SIGNATURE----- iQJIBAABCAAyFiEES0KozwfymdVUl37v6iDy2pc3iXMFAmVAJZ4UHHBhdWxAcGF1 bC1tb29yZS5jb20ACgkQ6iDy2pc3iXNtmg/9GZcLIK5LSxqHNf++8xoRgJGSL0Ku wdKKWalRmW7Ka54SmU8Cj2FpJSL+LZ6JyKBkFylu17+Wi/Ym8zdNgKulZGTPomLb P0J+5rjKf8SgEgVrCyU1APFQhcvbMK7r0aJ7yu+xsV2+7t+bqCHG4YOGX906U8bs TAMcMKe1giNUBQbp2WcdQ2XPptSsiD4SjZfF00hoC8vWLr5nEB8W+EsHNhS6lUwx 7ziOT4CRtxMF/k74jb7uVzvjR8fU73KNTUp+Kf+QJuolOZPrMph2xPmOHkys8eJR uwqac7GcpP8M+9tb0W43yM+AgWsYS63ZoPMXX+72RP1oEeAarTu/U21MsB7aSnxT Lir26psS02RtjUlq6SPGs+ubU2Q3Y7TlG9N+Z/V80/D7K0TYWkXoOBfUm8XPp1xa IymvW5jiFDEvC+4aa4zH0oKVeO3FX3rsb9GkhS2h0PgFOO6FurCgrudyiUc0lxbb TNNvksTFNCelNsv/Vi8WXFFL93VzeX10ZcoKHUCM46kW7xtbsYpZNt15Fv43rHuo 0mTZNU+iMXcarNOH/C3p9DWTXy8Z3rrFR2eBC1oXnCJax/qvK7rodUazMWMy8edj 893+n2ZYE6AxJbammPuG6bgTtv2+YfJv7m9jSY/l1U9tay2exSTR3OWnr/tBZ6S7 J2mS/mIIhPNPJ4w= =xLC2 -----END PGP SIGNATURE----- Merge tag 'audit-pr-20231030' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit Pull audit update from Paul Moore: "Only two audit patches for v6.7, both fairly small with a combined 11 lines of changes. The first patch is a simple __counted_by annontation, and the second fixes a a problem where audit could deadlock on task_lock() when an exe filter is configured. More information is available in the commit description and the patch is tagged for stable" * tag 'audit-pr-20231030' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit: audit: don't take task_lock() in audit_exe_compare() code path audit: Annotate struct audit_chunk with __counted_by
This commit is contained in:
commit
b9886c9766
@ -34,7 +34,7 @@ struct audit_chunk {
|
||||
struct list_head list;
|
||||
struct audit_tree *owner;
|
||||
unsigned index; /* index; upper bit indicates 'will prune' */
|
||||
} owners[];
|
||||
} owners[] __counted_by(count);
|
||||
};
|
||||
|
||||
struct audit_tree_mark {
|
||||
|
@ -527,11 +527,18 @@ int audit_exe_compare(struct task_struct *tsk, struct audit_fsnotify_mark *mark)
|
||||
unsigned long ino;
|
||||
dev_t dev;
|
||||
|
||||
exe_file = get_task_exe_file(tsk);
|
||||
/* only do exe filtering if we are recording @current events/records */
|
||||
if (tsk != current)
|
||||
return 0;
|
||||
|
||||
if (WARN_ON_ONCE(!current->mm))
|
||||
return 0;
|
||||
exe_file = get_mm_exe_file(current->mm);
|
||||
if (!exe_file)
|
||||
return 0;
|
||||
ino = file_inode(exe_file)->i_ino;
|
||||
dev = file_inode(exe_file)->i_sb->s_dev;
|
||||
fput(exe_file);
|
||||
|
||||
return audit_mark_compare(mark, ino, dev);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user