In the Linux kernel, the following vulnerability has been resolved:
kunit: fix reference count leak in kfreeatend
The reference counting issue happens in the normal path of kfreeatend(). When kunitallocandgetresource() is invoked, the function forgets to handle the returned resource object, whose refcount increased inside, causing a refcount leak.
Fix this issue by calling kunitallocresource() instead of kunitallocandgetresource().
Fixed the following when applying: Shuah Khan skhan@linuxfoundation.org
CHECK: Alignment should match open parenthesis + kunitallocresource(test, NULL, kfreeresfree, GFPKERNEL, (void *)tofree);