Files
rockchip-kernel/include/linux
Al Viro 7a4dec5389 Fix sget() race with failing mount
If sget() finds a matching superblock being set up, it'll
grab an active reference to it and grab s_umount.  That's
fine - we'll wait for completion of foofs_get_sb() that way.
However, if said foofs_get_sb() fails we'll end up holding
the halfway-created superblock.  deactivate_locked_super()
called by foofs_get_sb() will just unlock the sucker since
we are holding another active reference to it.

What we need is a way to tell if superblock has been successfully
set up.  Unfortunately, neither ->s_root nor the check for
MS_ACTIVE quite fit.  Cheap and easy way, suitable for backport:
new flag set by the (only) caller of ->get_sb().  If that flag
isn't present by the time sget() grabbed s_umount on preexisting
superblock it has found, it's seeing a stillborn and should
just bury it with deactivate_locked_super() (and repeat the search).

Longer term we want to set that flag in ->get_sb() instances (and
check for it to distinguish between "sget() found us a live sb"
and "sget() has allocated an sb, we need to set it up" in there,
instead of checking ->s_root as we do now).

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Cc: stable@kernel.org
2010-08-09 16:49:01 -04:00
..
2010-07-31 14:20:02 +01:00
2010-05-17 22:39:48 -07:00
2010-05-28 01:38:00 +02:00
2010-05-03 08:33:00 -04:00
2010-03-12 15:53:10 -08:00
2010-06-15 09:56:01 +10:00
2010-05-14 17:08:01 -04:00
2010-05-27 09:12:53 -07:00
2010-05-19 13:38:54 -04:00
2009-11-20 20:13:39 +01:00
2009-11-20 20:13:39 +01:00
2009-11-20 20:13:39 +01:00
2010-08-09 16:47:43 -04:00
2010-06-08 18:44:04 +02:00
2010-02-05 07:35:05 -08:00
2010-08-09 16:48:13 -04:00
2010-05-19 22:41:57 -04:00
2010-05-10 16:08:01 -07:00
2009-12-10 23:52:01 +00:00
2010-05-17 16:30:58 -07:00
2010-05-21 19:30:44 +02:00
2009-12-15 08:53:33 -08:00
2010-04-09 08:36:07 +02:00
2010-08-09 16:48:03 -04:00
2009-12-23 13:33:54 +01:00
2010-08-09 16:49:01 -04:00
2010-03-16 08:55:32 +01:00
2010-05-25 08:07:01 -07:00
2010-05-27 09:12:42 -07:00
2010-05-21 09:34:29 -07:00
2010-02-09 11:13:56 +01:00
2010-03-07 22:17:09 +01:00
2010-03-02 12:23:42 +01:00
2010-02-02 07:32:29 -08:00
2010-01-11 16:28:01 -08:00
2010-03-03 11:26:01 +01:00
2010-05-11 12:01:10 -07:00
2010-03-12 15:52:40 -08:00
2010-05-11 14:40:55 +02:00
2010-05-03 11:50:57 +02:00
2010-04-23 02:08:44 +02:00
2010-05-21 09:37:29 -07:00
2009-12-16 06:56:12 -08:00
2010-05-14 15:09:32 -04:00
2010-05-17 12:17:10 +03:00
2010-04-03 14:56:05 -07:00
2010-06-29 10:38:22 -07:00
2009-12-26 20:40:34 -08:00
2010-02-09 11:13:56 +01:00
2010-02-19 03:35:12 -05:00
2010-08-09 16:48:45 -04:00
2010-07-14 17:14:00 +10:00
2010-03-12 15:52:28 -08:00
2009-12-12 13:08:15 +01:00
2010-05-11 14:40:55 +02:00
2010-04-13 14:49:34 -07:00
2010-02-10 23:49:08 +09:00
2010-05-17 05:27:42 +02:00
2010-07-02 21:59:08 -07:00
2010-05-19 13:44:27 +10:00
2010-04-02 14:30:39 -07:00
2010-05-10 23:08:19 +02:00
2010-03-12 15:53:11 -08:00
2009-12-03 11:43:23 +00:00
2009-12-02 09:55:33 +01:00
2010-02-10 17:47:17 -08:00
2010-05-03 15:53:54 -07:00
2010-03-12 15:52:44 -08:00
2010-08-09 16:47:27 -04:00
2010-03-02 14:28:49 -05:00
2010-05-27 09:12:50 -07:00
2010-05-30 09:02:47 -07:00
2010-05-11 10:09:47 +02:00
2010-03-12 15:53:10 -08:00
2010-05-06 10:56:07 +10:00
2010-05-25 11:41:43 -04:00
2009-11-30 12:02:53 +09:00
2010-03-12 15:52:44 -08:00
2010-04-03 15:09:04 -07:00
2009-12-16 22:32:29 -05:00
2010-05-10 11:08:35 -07:00
2010-08-09 16:48:44 -04:00
2010-01-14 22:38:09 -05:00
2010-05-27 09:12:43 -07:00
2010-05-15 23:28:39 -07:00
2010-02-18 15:43:09 -08:00
2010-03-25 17:18:43 -07:00
2010-04-13 12:43:42 +02:00
2010-03-23 17:19:38 +01:00
2010-05-12 23:02:23 -07:00
2010-05-21 09:34:29 -07:00
2010-05-19 22:40:47 -04:00
2010-05-19 22:15:46 +09:30
2010-04-06 20:35:58 +04:00