alloc_pages() can return NULL, in which case we'll pass NULL to __free_pages().
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=78391 Reported-by: RUC_SoftSec <[email protected]> Cc: [email protected] Signed-off-by: Chris Ball <[email protected]> --- drivers/mmc/card/mmc_test.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/card/mmc_test.c b/drivers/mmc/card/mmc_test.c index 0c0fc52..c86da32 100644 --- a/drivers/mmc/card/mmc_test.c +++ b/drivers/mmc/card/mmc_test.c @@ -2884,7 +2884,8 @@ static ssize_t mtf_test_write(struct file *file, const char __user *buf, } #ifdef CONFIG_HIGHMEM - __free_pages(test->highmem, BUFFER_ORDER); + if (test->highmem) + __free_pages(test->highmem, BUFFER_ORDER); #endif kfree(test->buffer); kfree(test); -- Chris Ball <http://printf.net/> -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
