summaryrefslogtreecommitdiff
path: root/rust/kernel/alloc/kvec
diff options
context:
space:
mode:
authorMikulas Patocka <mpatocka@redhat.com>2026-11-05 16:11:37 +0100
committerMikulas Patocka <mpatocka@redhat.com>2026-11-05 16:11:37 +0100
commit406d576cc457203cf86eac7f17839b2efec81db4 (patch)
treec73c7aaf55217d38383aa63d40cab0f3aae1b106 /rust/kernel/alloc/kvec
parent875a7161fe1574205293c36f7bbd0815023e48a1 (diff)
dm-sysfs: fix misbehavior if kobject_init_and_add fails
If kobject_init_and_add fails, we must call kobject_put (see the comment at kobject_init_and_add). Before calling kobject_init_and_add, we must zero the kobject (see https://lwn.net/Articles/52085/). If the first call to dm_sysfs_init failed, it may be called again, and that second call would see an uninitialized kobject. Cc: stable@vger.kernel.org Fixes: 784aae735d9b ("dm: add name and uuid to sysfs") Signed-off-by: Mikulas Patocka <mpatocka@redhat.com> Reported-by: Wentao Liang <vulab@iscas.ac.cn>
Diffstat (limited to 'rust/kernel/alloc/kvec')
0 files changed, 0 insertions, 0 deletions