Taras Kondratiuk
2623c7a5f2
libata: add refcounting to ata_host
...
After commit 9a6d6a2ddabb ("ata: make ata port as parent device of scsi
host") manual driver unbind/remove causes use-after-free.
Unbind unconditionally invokes devres_release_all() which calls
ata_host_release() and frees ata_host/ata_port memory while it is still
being referenced as a parent of SCSI host. When SCSI host is finally
released scsi_host_dev_release() calls put_device(parent) and accesses
freed ata_port memory.
Add reference counting to make sure that ata_host lives long enough.
Bug report: https://lkml.org/lkml/2017/11/1/945
Fixes: 9a6d6a2ddabb ("ata: make ata port as parent device of scsi host")
Cc: Tejun Heo <tj@kernel.org>
Cc: Lin Ming <minggr@gmail.com>
Cc: linux-ide@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Taras Kondratiuk <takondra@cisco.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
2018-03-13 13:29:10 -07:00
..
2017-05-16 11:25:59 -04:00
2018-01-17 07:52:29 -08:00
2017-10-23 07:09:27 -07:00
2017-08-16 07:38:27 -07:00
2017-03-24 11:40:03 -04:00
2017-11-13 12:17:43 -08:00
2017-12-04 12:35:29 -08:00
2016-02-18 12:41:17 -05:00
2017-03-06 15:40:59 -05:00
2017-08-04 13:34:14 -07:00
2017-12-04 12:18:08 -08:00
2016-06-15 14:26:41 -04:00
2016-08-10 12:16:49 -04:00
2015-01-28 18:45:23 -05:00
2015-01-28 18:45:23 -05:00
2017-01-06 11:39:14 -05:00
2018-01-11 10:09:47 -08:00
2017-12-11 08:53:33 -08:00
2014-05-09 22:37:49 -04:00
2018-01-08 06:15:41 -08:00
2018-01-18 13:17:25 -08:00
2018-02-12 09:18:25 -08:00
2018-02-12 09:17:23 -08:00
2014-04-01 12:48:54 -07:00
2018-03-13 13:29:10 -07:00
2017-11-15 14:11:41 -08:00
2015-07-14 17:46:38 -04:00
2018-02-12 09:21:25 -08:00
2017-05-16 11:25:59 -04:00
2016-05-09 12:36:46 -04:00
2018-03-13 13:29:10 -07:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2018-03-13 13:29:10 -07:00
2018-01-18 13:17:25 -08:00
2014-05-09 22:37:49 -04:00
2018-01-11 17:23:23 -06:00
2017-08-11 10:35:07 -07:00
2018-02-18 05:16:35 -08:00
2017-09-18 20:24:21 -07:00
2018-01-08 04:02:02 -08:00
2017-10-23 07:06:09 -07:00
2017-05-30 11:54:36 -04:00
2018-03-01 13:59:03 -08:00
2014-05-09 22:37:49 -04:00
2014-05-09 22:37:49 -04:00
2015-04-08 10:55:05 -04:00
2015-02-03 07:04:44 -05:00
2014-05-09 22:37:49 -04:00
2017-08-11 10:35:07 -07:00
2014-05-09 22:37:49 -04:00
2014-05-09 22:37:49 -04:00
2017-05-30 11:54:36 -04:00
2018-03-01 13:58:17 -08:00
2017-06-21 18:06:18 -04:00
2014-02-13 16:40:56 -05:00
2015-04-08 10:55:05 -04:00
2014-02-13 16:40:56 -05:00
2016-07-12 11:02:05 -04:00
2016-04-15 16:53:14 -04:00
2016-11-09 11:48:58 -05:00
2015-03-18 22:39:17 +01:00
2018-02-18 05:26:07 -08:00
2014-05-09 22:37:49 -04:00
2017-01-10 11:11:17 -05:00
2015-08-24 15:27:11 -05:00
2017-01-10 11:11:17 -05:00
2018-02-18 05:24:16 -08:00
2016-05-27 11:27:23 -04:00
2018-02-18 05:23:25 -08:00
2014-05-09 22:37:49 -04:00
2014-05-09 22:37:49 -04:00
2016-08-30 11:59:47 -04:00
2014-05-09 22:37:49 -04:00
2014-05-09 22:37:49 -04:00
2017-08-28 10:44:24 -07:00
2017-03-06 15:18:01 -05:00
2014-05-09 22:37:49 -04:00
2014-05-09 22:37:49 -04:00
2014-05-09 22:37:49 -04:00
2014-10-20 16:20:17 +02:00
2017-01-10 11:11:17 -05:00
2014-05-09 22:37:49 -04:00
2018-01-25 07:28:31 -08:00
2014-05-09 22:37:49 -04:00
2015-01-28 18:45:23 -05:00
2015-09-10 17:02:04 -04:00
2014-05-09 22:37:49 -04:00
2017-05-30 11:54:37 -04:00
2017-06-12 14:06:34 -04:00
2014-05-09 22:37:49 -04:00
2018-02-18 05:20:38 -08:00
2014-05-09 22:37:49 -04:00
2017-06-12 14:06:34 -04:00
2014-10-07 17:10:14 -04:00
2015-04-08 10:55:05 -04:00
2014-05-09 22:37:49 -04:00
2014-05-09 22:37:49 -04:00
2014-05-09 22:37:49 -04:00
2014-05-09 22:37:49 -04:00
2017-05-16 11:25:59 -04:00
2018-02-18 05:21:31 -08:00
2017-05-30 11:54:37 -04:00
2017-08-11 10:32:09 -07:00
2017-11-02 11:10:55 +01:00
2016-05-27 15:26:11 -07:00
2017-06-12 14:06:34 -04:00
2018-01-25 07:28:13 -08:00
2017-05-16 11:25:59 -04:00
2017-05-16 11:25:59 -04:00
2017-05-16 11:25:59 -04:00
2017-05-16 11:25:59 -04:00
2018-02-13 06:39:38 -08:00
2015-04-08 10:55:05 -04:00
2017-05-16 11:25:59 -04:00
2017-05-16 11:25:59 -04:00
2017-07-18 18:02:36 -04:00
2017-05-16 11:25:59 -04:00
2017-05-16 11:25:59 -04:00
2017-06-26 16:54:53 -04:00
2017-05-16 11:25:59 -04:00
2017-11-02 11:10:55 +01:00