Skip to content
Commit 7be0772d authored by Vitaly Kuznetsov's avatar Vitaly Kuznetsov Committed by David Vrabel
Browse files

x86/xen: avoid freeing static 'name' when kasprintf() fails



In case kasprintf() fails in xen_setup_timer() we assign name to the
static string "<timer kasprintf failed>". We, however, don't check
that fact before issuing kfree() in xen_teardown_timer(), kernel is
supposed to crash with 'kernel BUG at mm/slub.c:3341!'

Solve the issue by making name a fixed length string inside struct
xen_clock_event_device. 16 bytes should be enough.

Suggested-by: default avatarLaszlo Ersek <lersek@redhat.com>
Signed-off-by: default avatarVitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: default avatarDavid Vrabel <david.vrabel@citrix.com>
parent a97dae1a
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment