HomeFreeBSD

Fix panic mounting unformatted zvol

Description

Fix panic mounting unformatted zvol

On some older kernels, i.e. 2.6.18, zvol_ioctl_by_inode() may get passed a NULL
file pointer if the user tries to mount a zvol without a filesystem on it.
This change adds checks to prevent a null pointer dereference.

Closes #73.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>

Details

Provenance
Ned Bass <bass6@llnl.gov>Authored on Oct 29 2010, 7:13 PM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Oct 29 2010, 9:46 PM
Parents
rG6ee71f5ce398: Call modprobe with absolute path
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rGb1c582137511: Fix panic mounting unformatted zvol (authored by Ned Bass <bass6@llnl.gov>).Oct 29 2010, 9:46 PM