summaryrefslogtreecommitdiffstats
path: root/Kconfig
diff options
context:
space:
mode:
authorTom Van Braeckel <tomvanbraeckel@gmail.com>2015-01-12 05:22:16 +0100
committerMiklos Szeredi <mszeredi@suse.cz>2015-03-19 15:29:22 +0100
commit94e4fe2cab3d43b3ba7c3f721743006a8c9d913a (patch)
treeb6bb327977ae0e4a1173ab32bb4f93f9b460e17e /Kconfig
parentaa991b3b267e24f578bac7b09cc57579b660304b (diff)
downloadop-kernel-dev-94e4fe2cab3d43b3ba7c3f721743006a8c9d913a.zip
op-kernel-dev-94e4fe2cab3d43b3ba7c3f721743006a8c9d913a.tar.gz
fuse: explicitly set /dev/fuse file's private_data
The misc subsystem (which is used for /dev/fuse) initializes private_data to point to the misc device when a driver has registered a custom open file operation, and initializes it to NULL when a custom open file operation has *not* been provided. This subtle quirk is confusing, to the point where kernel code registers *empty* file open operations to have private_data point to the misc device structure. And it leads to bugs, where the addition or removal of a custom open file operation surprisingly changes the initial contents of a file's private_data structure. So to simplify things in the misc subsystem, a patch [1] has been proposed to *always* set the private_data to point to the misc device, instead of only doing this when a custom open file operation has been registered. But before this patch can be applied we need to modify drivers that make the assumption that a misc device file's private_data is initialized to NULL because they didn't register a custom open file operation, so they don't rely on this assumption anymore. FUSE uses private_data to store the fuse_conn and errors out if this is not initialized to NULL at mount time. Hence, we now set a file's private_data to NULL explicitly, to be independent of whatever value the misc subsystem initializes it to by default. [1] https://lkml.org/lkml/2014/12/4/939 Reported-by: Giedrius Statkevicius <giedriuswork@gmail.com> Reported-by: Thierry Reding <thierry.reding@gmail.com> Signed-off-by: Tom Van Braeckel <tomvanbraeckel@gmail.com> Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Diffstat (limited to 'Kconfig')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud