linux/arch/ia64
Al Viro bd9b51e79c make default ->i_fop have ->open() fail with ENXIO
As it is, default ->i_fop has NULL ->open() (along with all other methods).
The only case where it matters is reopening (via procfs symlink) a file that
didn't get its ->f_op from ->i_fop - anything else will have ->i_fop assigned
to something sane (default would fail on read/write/ioctl/etc.).

	Unfortunately, such case exists - alloc_file() users, especially
anon_get_file() ones.  There we have tons of opened files of very different
kinds sharing the same inode.  As the result, attempt to reopen those via
procfs succeeds and you get a descriptor you can't do anything with.

	Moreover, in case of sockets we set ->i_fop that will only be used
on such reopen attempts - and put a failing ->open() into it to make sure
those do not succeed.

	It would be simpler to put such ->open() into default ->i_fop and leave
it unchanged both for anon inode (as we do anyway) and for socket ones.  Result:
	* everything going through do_dentry_open() works as it used to
	* sock_no_open() kludge is gone
	* attempts to reopen anon-inode files fail as they really ought to
	* ditto for aio_private_file()
	* ditto for perfmon - this one actually tried to imitate sock_no_open()
trick, but failed to set ->i_fop, so in the current tree reopens succeed and
yield completely useless descriptor.  Intent clearly had been to fail with
-ENXIO on such reopens; now it actually does.
	* everything else that used alloc_file() keeps working - it has ->i_fop
set for its inodes anyway

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-12-10 21:32:15 -05:00
..
configs [IA64] refresh arch/ia64/configs/* using "make savedefconfig" 2014-09-23 11:09:29 -07:00
dig Disintegrate asm/system.h for IA64 2012-03-28 18:30:02 +01:00
hp ACPI / ia64 / sba_iommu: Restore the working initialization ordering 2014-06-16 22:33:20 +02:00
include Merge git://git.infradead.org/users/eparis/audit 2014-10-19 16:25:56 -07:00
kernel make default ->i_fop have ->open() fail with ENXIO 2014-12-10 21:32:15 -05:00
kvm KVM: remove garbage arg to *hardware_{en,dis}able 2014-08-29 16:35:55 +02:00
lib Fix common misspellings 2011-03-31 11:26:23 -03:00
mm arm64,ia64,ppc,s390,sh,tile,um,x86,mm: remove default gate area 2014-08-08 15:57:27 -07:00
oprofile Disintegrate asm/system.h for IA64 2012-03-28 18:30:02 +01:00
pci vgaarb: Don't default exclusively to first video device with mem+io 2014-09-16 13:06:18 -06:00
scripts
sn Merge branch 'for-3.18-consistent-ops' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu 2014-10-15 07:48:18 +02:00
uv ia64: change to new flag variables 2011-03-17 14:02:56 +01:00
install.sh
Kconfig kexec: remove CONFIG_KEXEC dependency on crypto 2014-08-29 16:28:16 -07:00
Kconfig.debug
Makefile kbuild: allow to override Python command name 2014-07-18 10:17:58 +02:00
module.lds