From: Vitaly Kuznetsov Date: Mon, 5 Jan 2015 15:27:51 +0000 (+0100) Subject: x86/xen: avoid freeing static 'name' when kasprintf() fails X-Git-Tag: omap-for-v4.1/prcm-dts-mfd-syscon-fix~288^2~5 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7be0772d19103b3eac3c2e9ac325df2563273fdc;p=pandora-kernel.git x86/xen: avoid freeing static 'name' when kasprintf() fails In case kasprintf() fails in xen_setup_timer() we assign name to the static string "". 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: Laszlo Ersek Signed-off-by: Vitaly Kuznetsov Signed-off-by: David Vrabel --- Reading git-diff-tree failed