The previous CL ("CHROMIUM: iommu/exynos: Fix allocation to be safer
in terms of alignment") introduced a potential bug where kfree() was
being called still in one case. It doesn't appear that we run this
codepath in normal usage (so we actually have a memory leak), but it's
good to fix just in case.
BUG=chrome-os-partner:13948
TEST=boot with slub debugging turn on; play youtube video
Change-Id: Ie9aff3e180c95c6f9f3643efe8f98cf5b5693320
Signed-off-by: Doug Anderson <dianders@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/33094
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Reviewed-by: Pawel Osciak <posciak@google.com>
Reviewed-by: Sonny Rao <sonnyrao@chromium.org>
if (*pgcnt != NUM_LV2ENTRIES)
return -EADDRINUSE;
- kfree(page_entry(sent, 0));
+ kmem_cache_free(lv2cache, page_entry(sent, 0));
*pgcnt = 0;
}