]> git.baikalelectronics.ru Git - kernel.git/commit
hfs: prevent crash on exit from failed search
authorErnesto A. Fernández <ernesto.mnd.fernandez@gmail.com>
Fri, 24 Aug 2018 00:00:31 +0000 (17:00 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 24 Aug 2018 01:48:42 +0000 (18:48 -0700)
commitef3a48759c433ba8120dc612f00fb4df73d8f939
treea4af5550de3b74fba3deff00c78053518b13f808
parent0e9e85c7fa99287b11cfef3c64883c126a56a2e9
hfs: prevent crash on exit from failed search

hfs_find_exit() expects fd->bnode to be NULL after a search has failed.
hfs_brec_insert() may instead set it to an error-valued pointer.  Fix
this to prevent a crash.

Link: http://lkml.kernel.org/r/53d9749a029c41b4016c495fc5838c9dba3afc52.1530294815.git.ernesto.mnd.fernandez@gmail.com
Signed-off-by: Ernesto A. Fernández <ernesto.mnd.fernandez@gmail.com>
Cc: Anatoly Trosinenko <anatoly.trosinenko@gmail.com>
Cc: Viacheslav Dubeyko <slava@dubeyko.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/hfs/brec.c