Home
last modified time | relevance | path

Searched hist:a60dca73a1a8079d867b2c2e9549440346c1ba83 (Results 1 – 2 of 2) sorted by relevance

/openbmc/linux/fs/jfs/
H A Djfs_mount.cdiff a60dca73a1a8079d867b2c2e9549440346c1ba83 Fri Oct 28 07:22:54 CDT 2022 Oleg Kanatov <okanatov@gmail.com> jfs: makes diUnmount/diMount in jfs_mount_rw atomic

jfs_mount_rw can call diUnmount and then diMount. These calls change the
imap pointer. Between these two calls there may be calls of function
jfs_lookup(). The jfs_lookup() function calls jfs_iget(), which, in turn
calls diRead(). The latter references the imap pointer. That may cause
diRead() to refer to a pointer freed in diUnmount(). This commit makes
the calls to diUnmount()/diMount() atomic so that nothing will read the
imap pointer until the whole remount is completed.

Signed-off-by: Oleg Kanatov <okanatov@gmail.com>
Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
H A Djfs_imap.cdiff a60dca73a1a8079d867b2c2e9549440346c1ba83 Fri Oct 28 07:22:54 CDT 2022 Oleg Kanatov <okanatov@gmail.com> jfs: makes diUnmount/diMount in jfs_mount_rw atomic

jfs_mount_rw can call diUnmount and then diMount. These calls change the
imap pointer. Between these two calls there may be calls of function
jfs_lookup(). The jfs_lookup() function calls jfs_iget(), which, in turn
calls diRead(). The latter references the imap pointer. That may cause
diRead() to refer to a pointer freed in diUnmount(). This commit makes
the calls to diUnmount()/diMount() atomic so that nothing will read the
imap pointer until the whole remount is completed.

Signed-off-by: Oleg Kanatov <okanatov@gmail.com>
Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>