Herbert Xu
1f72371099
crypto: api - Fix races in crypto_unregister_instance
...
There are multiple problems in crypto_unregister_instance:
1) The cra_refcnt BUG_ON check is racy and can cause crashes.
2) The cra_refcnt check shouldn't exist at all.
3) There is no reference on tmpl to protect the tmpl->free call.
This patch rewrites the function using crypto_remove_spawn which
now morphs into crypto_remove_instance.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2015-04-03 17:53:32 +08:00
..
2014-10-12 10:13:55 -04:00
2014-08-21 10:20:52 -07:00
2014-11-24 22:43:57 +08:00
2015-03-31 21:21:04 +08:00
2015-01-26 11:34:22 +11:00
2014-12-22 23:02:35 +11:00
2015-01-13 22:29:11 +11:00
2015-02-14 09:47:01 -08:00
2015-01-26 11:34:22 +11:00
2015-04-03 17:53:32 +08:00
2013-06-25 19:15:17 +08:00
2015-03-04 22:12:39 +13:00
2015-02-04 01:34:15 -05:00
2015-03-16 21:46:25 +11:00
2015-02-14 09:47:01 -08:00
2015-03-09 21:06:18 +11:00
2014-11-24 22:43:57 +08:00
2015-03-31 21:21:03 +08:00
2014-11-24 22:43:57 +08:00
2014-11-26 20:06:30 +08:00
2014-11-26 20:06:30 +08:00
2014-03-10 20:17:11 +08:00
2011-09-22 21:25:25 +10:00
2015-01-13 22:29:11 +11:00
2015-01-13 22:29:11 +11:00
2015-01-13 22:29:11 +11:00
2015-01-13 22:29:11 +11:00
2013-08-14 20:42:03 +10:00
2014-11-26 20:06:30 +08:00
2014-11-26 20:06:30 +08:00
2014-11-26 20:06:30 +08:00
2010-02-16 20:31:37 +08:00
2014-11-26 20:06:30 +08:00
2010-02-16 20:31:04 +08:00
2014-11-24 22:43:57 +08:00
2015-01-13 22:29:11 +11:00
2013-09-12 15:31:34 +10:00
2015-01-13 22:29:11 +11:00
2015-03-31 21:21:04 +08:00
2014-11-24 22:43:57 +08:00
2014-11-26 20:06:29 +08:00
2014-03-21 21:54:28 +08:00
2014-11-26 20:06:30 +08:00
2015-01-20 14:44:15 +11:00
2014-11-24 22:43:57 +08:00
2015-01-13 22:29:11 +11:00
2015-03-09 21:06:18 +11:00
2014-11-26 20:06:30 +08:00
2014-11-26 20:06:30 +08:00
2014-11-24 22:43:57 +08:00
2008-08-29 15:50:02 +10:00
2014-11-26 20:06:30 +08:00
2011-07-08 17:21:21 +08:00
2015-01-13 22:29:11 +11:00
2013-10-25 17:14:03 -04:00
2014-11-26 20:06:30 +08:00
2013-06-25 19:15:17 +08:00
2015-03-12 21:13:35 +11:00
2014-11-24 22:43:57 +08:00
2015-01-13 22:29:11 +11:00
2014-11-26 20:06:30 +08:00
2014-11-24 22:43:57 +08:00
2014-11-24 22:43:57 +08:00
2014-11-24 22:43:57 +08:00
2015-03-04 22:12:39 +13:00
2015-03-31 21:21:13 +08:00
2014-11-24 22:43:57 +08:00
2014-11-24 22:43:57 +08:00
2013-12-09 20:09:12 +08:00
2014-11-24 22:43:57 +08:00
2014-11-26 20:06:30 +08:00
2013-02-19 20:27:03 +08:00
2014-11-26 20:06:30 +08:00
2015-03-31 21:21:04 +08:00
2008-07-10 20:35:12 +08:00
2014-11-24 22:43:57 +08:00
2014-11-24 22:43:57 +08:00
2014-11-24 22:43:57 +08:00
2014-11-24 22:43:57 +08:00
2013-02-19 20:27:03 +08:00
2015-01-13 22:29:11 +11:00
2015-01-26 11:34:22 +11:00
2014-11-24 22:43:57 +08:00
2015-01-20 14:44:16 +11:00
2015-01-13 22:29:11 +11:00
2015-01-13 22:29:11 +11:00
2015-01-13 22:29:11 +11:00
2015-01-13 22:29:11 +11:00
2014-06-07 11:44:39 -07:00
2015-03-12 01:11:05 +11:00
2013-12-20 20:06:25 +08:00
2015-01-13 22:29:11 +11:00
2015-03-31 21:21:03 +08:00
2014-08-29 21:46:36 +08:00
2015-01-13 22:29:11 +11:00
2011-11-09 11:53:32 +08:00
2015-01-13 22:29:11 +11:00
2014-11-26 20:06:30 +08:00
2015-01-13 22:29:11 +11:00
2014-11-26 20:06:30 +08:00
2012-10-11 13:42:32 +11:00
2014-11-26 20:06:30 +08:00
2014-11-24 22:43:57 +08:00