]> granicus.if.org Git - zfs/commit
Fix panic mounting unformatted zvol
authorNed Bass <bass6@llnl.gov>
Fri, 29 Oct 2010 19:13:52 +0000 (12:13 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 29 Oct 2010 21:46:33 +0000 (14:46 -0700)
commitb1c58213751141f28793e723017d4064893d819a
treecf9271ebc4e503930915ec22aef373b370d86a60
parent6ee71f5ce39885969f986f3092fed00f41667963
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>
module/zfs/zvol.c