-
Shengzhe Zhao authored
filp_close is using !file_count(filp) to check if f_count is 0. if it is 0, filp_close think it is a closed file then will return. However, for a closed file, f_count could be reduced to -1, then !file_count(filp) is false, filp_close will proceed to handle this file then could panic. This change will check if f_count is 0 or negative instead of only checking 0 to avoid panic. b/18200219 LRX21M: kernel_panic Change-Id: I5117853dcbebec399021abf34338b1f6aff6ad14 Signed-off-by:
Shengzhe Zhao <a18689@motorola.com> Reviewed-by:
Yi-Wei Zhao <gbjc64@motorola.com> Signed-off-by:
Iliyan Malchev <malchev@google.com>
0b778076