]> git.baikalelectronics.ru Git - kernel.git/commit
orangefs: Fix sb refcount leak when allocate sb info failed.
authorChenyuan Mi <cymi20@fudan.edu.cn>
Tue, 7 Sep 2021 11:41:05 +0000 (19:41 +0800)
committerMike Marshall <hubcap@omnibond.com>
Mon, 11 Oct 2021 18:25:41 +0000 (14:25 -0400)
commit9c51c2d99e341230aa6834f5d58d5654a1858b19
treeb5256a5990042f6da56ad93c064742b2acb4ac50
parentb2bca3eaaf5960fff1308933422ec17a2feefeb4
orangefs: Fix sb refcount leak when allocate sb info failed.

The reference counting issue happens in one exception handling
path of orangefs_mount(). When failing to allocate sb info, the
function forgets to decrease the refcount of sb increased by
sget(), causing a refcount leak.

Fix this issue by jumping to the label "free_sb_and_op" instead
of "free_op"

Signed-off-by: Chenyuan Mi <cymi20@fudan.edu.cn>
Signed-off-by: Xiyu Yang <xiyuyang19@fudan.edu.cn>
Signed-off-by: Xin Tan <tanxin.ctf@gmail.com>
Signed-off-by: Mike Marshall <hubcap@omnibond.com>
fs/orangefs/super.c