On Fri, Nov 17, 2023 at 03:23:35PM +0100, Heiko Carstens wrote: > I think this patch causes from time to time crashes when running ftrace > selftests. In particular I guess there is a bug wrt error handling in this > function (see below for call trace): > > > +static struct dentry * > > +create_file_dentry(struct eventfs_inode *ei, struct dentry **e_dentry, > > + struct dentry *parent, const char *name, umode_t mode, void *data, > > + const struct file_operations *fops, bool lookup) > > +{ ... > Note that the compare and swap instruction within d_invalidate() generates > a specification exception because it operates on an invalid address > (0xffffffffffffffef), which happens to be -EEXIST. So my assumption is that > create_dir_dentry() has incorrect error handling and passes -EEXIST instead > of a valid dentry pointer to d_invalidate(). > > But I leave it up to you to figure this out :) Ok, wrong function quoted of course. But the rest of my statement should be correct.