zfsonlinux/zfs — pull request #639 by gunnarbeutner (2012-04-05 08:39:05+00:00)
Title: Fixed a NULL pointer dereference bug in zfs_preumount

When zpl_fill_super -> zfs_domount fails (e.g. because the dataset
was destroyed before it could be successfully mounted) the subsequent
call to zpl_kill_sb -> zfs_preumount would derefence a NULL pointer.

This bug can be reproduced using this shell script:

#!/bin/sh
(
while true; do
zfs create -o mountpoint=legacz tank/bar
zfs destroy tank/bar
done
) &

(
while true; do
mount -t zfs tank/bar /mnt
umount /mnt
done
) &