• Oleg Kanatov's avatar
    jfs: makes diUnmount/diMount in jfs_mount_rw atomic · a60dca73
    Oleg Kanatov authored
    
    
    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: default avatarOleg Kanatov <okanatov@gmail.com>
    Signed-off-by: default avatarDave Kleikamp <dave.kleikamp@oracle.com>
    a60dca73
jfs_imap.c 83.1 KB