0078dd8758
[ Upstream commit 643a16a0eb1d6ac23744bb6e90a00fc21148a9dc ]
In some bad situation, the gts may be freed gru_check_chiplet_assignment.
The call chain can be gru_unload_context->gru_free_gru_context->gts_drop
and kfree finally. However, the caller didn't know if the gts is freed
or not and use it afterwards. This will trigger a Use after Free bug.
Fix it by introducing a return value to see if it's in error path or not.
Free the gts in caller if gru_check_chiplet_assignment check failed.
Fixes:
|
||
---|---|---|
.. | ||
gru_instructions.h | ||
gru.h | ||
grufault.c | ||
grufile.c | ||
gruhandles.c | ||
gruhandles.h | ||
grukdump.c | ||
grukservices.c | ||
grukservices.h | ||
grulib.h | ||
grumain.c | ||
gruprocfs.c | ||
grutables.h | ||
grutlbpurge.c | ||
Makefile |