mbox series

[v3,0/2] fix potential race between ubifs_tnc_locate() and GC

Message ID 20200305092205.127758-1-houtao1@huawei.com
Headers show
Series fix potential race between ubifs_tnc_locate() and GC | expand

Message

Hou Tao March 5, 2020, 9:22 a.m. UTC
Hi,

The patchset tries to fix the problem reported by 李傲傲 [1]. It happens
because there are races between ubifs_tnc_locate() and GC when
ubifs_tnc_locate() finds the target LEB is used as write-buffers or buds.
And the patchset fixes it by only reading the node from write-buffer
when the node is fully contained in write-buffer.

Comments are welcome.

Regards,
Tao

--
v3:
 -- add Link: tag
 -- add UBIFS_CHK_FORCE_DUMP_BAD_NODE flag for error message control

[1]: https://www.spinics.net/lists/linux-mtd/msg10771.html

Hou Tao (2):
  ubifs: factor out helper ubifs_check_node_buf()
  ubifs: read node from wbuf when it fully sits in wbuf

 fs/ubifs/io.c    | 109 +++++++++++++++++++++++------------------------
 fs/ubifs/tnc.c   |  81 +++++++++++++++++++++++++++++++++--
 fs/ubifs/ubifs.h |   5 +++
 3 files changed, 136 insertions(+), 59 deletions(-)