mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-27 13:05:03 +08:00
\n
-----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEEq1nRK9aeMoq1VSgcnJ2qBz9kQNkFAl/A5GkACgkQnJ2qBz9k QNkcFgf/af1pjTXjYf8ZeyQUNgoA7LCq3Ut9QHQGHOGEYK5aKraff4DgFtcag7nN 4WNPuQh4YSZzDo4Xt/8BCKdcGjiQZ+/6zgn6jhs0q5eKnv7dup0ouQ8mCxpPdPG3 CPzfJtQkKBzKXzC9RFWrcmA6w+B7fDTFGUCsVoNJ3HkxkKSWQHfW5VmYNTi6ueLj zy0hxyvPexN8+nWCw+ZqeKWhsm9aGwxjKVVErNuoj3Sk81zvkhvjZ7ab9Ep6ykek hsFIjVVqm3kd+oE8yMNxPB+h6Iy/mZXNcwOwAnv+qJiIWJX5+xENSqfOQg0NkuD1 gzfSiCzm8Yz3PEoGWeNMxfBn3fOpOA== =uwb7 -----END PGP SIGNATURE----- Merge tag 'writeback_for_v5.10-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs Pull writeback fix from Jan Kara: "A fix of possible missing string termination in writeback tracepoints" * tag 'writeback_for_v5.10-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs: trace: fix potenial dangerous pointer
This commit is contained in:
commit
5b4049d8fc
@ -190,7 +190,7 @@ TRACE_EVENT(inode_foreign_history,
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
strncpy(__entry->name, bdi_dev_name(inode_to_bdi(inode)), 32);
|
||||
strscpy_pad(__entry->name, bdi_dev_name(inode_to_bdi(inode)), 32);
|
||||
__entry->ino = inode->i_ino;
|
||||
__entry->cgroup_ino = __trace_wbc_assign_cgroup(wbc);
|
||||
__entry->history = history;
|
||||
@ -219,7 +219,7 @@ TRACE_EVENT(inode_switch_wbs,
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
strncpy(__entry->name, bdi_dev_name(old_wb->bdi), 32);
|
||||
strscpy_pad(__entry->name, bdi_dev_name(old_wb->bdi), 32);
|
||||
__entry->ino = inode->i_ino;
|
||||
__entry->old_cgroup_ino = __trace_wb_assign_cgroup(old_wb);
|
||||
__entry->new_cgroup_ino = __trace_wb_assign_cgroup(new_wb);
|
||||
@ -252,7 +252,7 @@ TRACE_EVENT(track_foreign_dirty,
|
||||
struct address_space *mapping = page_mapping(page);
|
||||
struct inode *inode = mapping ? mapping->host : NULL;
|
||||
|
||||
strncpy(__entry->name, bdi_dev_name(wb->bdi), 32);
|
||||
strscpy_pad(__entry->name, bdi_dev_name(wb->bdi), 32);
|
||||
__entry->bdi_id = wb->bdi->id;
|
||||
__entry->ino = inode ? inode->i_ino : 0;
|
||||
__entry->memcg_id = wb->memcg_css->id;
|
||||
@ -285,7 +285,7 @@ TRACE_EVENT(flush_foreign,
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
strncpy(__entry->name, bdi_dev_name(wb->bdi), 32);
|
||||
strscpy_pad(__entry->name, bdi_dev_name(wb->bdi), 32);
|
||||
__entry->cgroup_ino = __trace_wb_assign_cgroup(wb);
|
||||
__entry->frn_bdi_id = frn_bdi_id;
|
||||
__entry->frn_memcg_id = frn_memcg_id;
|
||||
|
Loading…
Reference in New Issue
Block a user