On Wed, Oct 16, 2019 at 07:48:14PM -0700, Eric Biggers wrote: > From: Eric Biggers <ebiggers@xxxxxxxxxx> > > After do_add_mount() returns success, the caller doesn't hold a > reference to the 'struct mount' anymore. So it's invalid to access it > in mnt_warn_timestamp_expiry(). > > Fix it by calling mnt_warn_timestamp_expiry() before do_add_mount() > rather than after, and adjusting the warning message accordingly. > > Reported-by: syzbot+da4f525235510683d855@xxxxxxxxxxxxxxxxxxxxxxxxx > Fixes: f8b92ba67c5d ("mount: Add mount warning for impending timestamp expiry") > Signed-off-by: Eric Biggers <ebiggers@xxxxxxxxxx> Applied to #fixes and pushed