[PATCH AUTOSEL 3.18 24/26] hfsplus: do not free node before using

2018-12-05 Thread Sasha Levin
From: Pan Bian [ Upstream commit c7d7d620dcbd2a1c595092280ca943f2fced7bbd ] hfs_bmap_free() frees node via hfs_bnode_put(node). However it then reads node->this when dumping error message on an error path, which may result in a use-after-free bug. This patch frees node only when it is never

[PATCH AUTOSEL 3.18 24/26] hfsplus: do not free node before using

2018-12-05 Thread Sasha Levin
From: Pan Bian [ Upstream commit c7d7d620dcbd2a1c595092280ca943f2fced7bbd ] hfs_bmap_free() frees node via hfs_bnode_put(node). However it then reads node->this when dumping error message on an error path, which may result in a use-after-free bug. This patch frees node only when it is never