[PATCH] Fix filp being passed through raw ioctl handler
[PATCH] Fix filp being passed through raw ioctl handler

Don't pass meaningless file handles to block device ioctls.

The recent raw IO ioctl-passthrough fix started passing the raw file
handle into the block device ioctl handler.  That's unlikely to be
useful, as the file handle is actually open on a character-mode raw
device, not a block device, so dereferencing it is not going to yield
useful results to a block device ioctl handler.

Previously we just passed NULL; also not a value that can usefully
be dereferenced, but at least if it does happen, we'll oops instead of
silently pretending that the file is a block device, so NULL is the more
defensive option here.  This patch reverts to that behaviour.

Noticed by Al Viro.

Signed-off-by: Stephen Tweedie <698ca898a076dfd1f925f8455214874274b76375@redhat.com>
Acked-by: Al Viro <de609eb4d5d70b1d38ec6642adbfc33a2781f63c@parcelfarce.linux.theplanet.co.uk>
Signed-off-by: Linus Torvalds <69652caca27c8b940640ad396ab71f93cacec34f@osdl.org>

TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas