• Jeff Moyer's avatar
    [PATCH] firmware: fix BUG: in fw_realloc_buffer · 30560ba6
    Jeff Moyer authored
    The fw_realloc_buffer routine does not handle an increase in buffer size of
    more than 4k.  It's not clear to me why it expects that it will only get an
    extra 4k of data.  The attached patch modifies fw_realloc_buffer to vmalloc
    as much memory as is requested, instead of what we previously had + 4k.
    
    I've tested this on my laptop, which would crash occaisionally on boot
    without the patch.  With the patch, it hasn't crashed, but I can't be
    certain that this code path is exercised.
    Signed-off-by: default avatarJeff Moyer <jmoyer@redhat.com>
    Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
    30560ba6
firmware_class.c 15.3 KB