Chao Bi
2bc744aa8b
mei: set client's read_cb to NULL when flow control fails
commit accb884b32 upstream.
In mei_cl_read_start(), if it fails to send flow control request, it
will release "cl->read_cb" but forget to set pointer to NULL, leaving
"cl->read_cb" still pointing to random memory, next time this client is
operated like mei_release(), it has chance to refer to this wrong pointer.
Fixes: PANIC at kfree in mei_release()
[228781.826904] Call Trace:
[228781.829737] [<c16249b8>] ? mei_cl_unlink+0x48/0xa0
[228781.835283] [<c1624487>] mei_io_cb_free+0x17/0x30
[228781.840733] [<c16265d8>] mei_release+0xa8/0x180
[228781.845989] [<c135c610>] ? __fsnotify_parent+0xa0/0xf0
[228781.851925] [<c1325a69>] __fput+0xd9/0x200
[228781.856696] [<c1325b9d>] ____fput+0xd/0x10
[228781.861467] [<c125cae1>] task_work_run+0x81/0xb0
[228781.866821] [<c1242e53>] do_exit+0x283/0xa00
[228781.871786] [<c1a82b36>] ? kprobe_flush_task+0x66/0xc0
[228781.877722] [<c124eeb8>] ? __dequeue_signal+0x18/0x1a0
[228781.883657] [<c124f072>] ? dequeue_signal+0x32/0x190
[228781.889397] [<c1243744>] do_group_exit+0x34/0xa0
[228781.894750] [<c12517b6>] get_signal_to_deliver+0x206/0x610
[228781.901075] [<c12018d8>] do_signal+0x38/0x100
[228781.906136] [<c1626d1c>] ? mei_read+0x42c/0x4e0
[228781.911393] [<c12600a0>] ? wake_up_bit+0x30/0x30
[228781.916745] [<c16268f0>] ? mei_poll+0x120/0x120
[228781.922001] [<c1324be9>] ? vfs_read+0x89/0x160
[228781.927158] [<c16268f0>] ? mei_poll+0x120/0x120
[228781.932414] [<c133ca34>] ? fget_light+0x44/0xe0
[228781.937670] [<c1324e58>] ? SyS_read+0x68/0x80
[228781.942730] [<c12019f5>] do_notify_resume+0x55/0x70
[228781.948376] [<c1a7de5d>] work_notifysig+0x29/0x30
[228781.953827] [<c1a70000>] ? bad_area+0x5/0x3e
Signed-off-by: Chao Bi <chao.bi@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-06 21:30:10 -08:00
..
2014-03-06 21:30:09 -08:00
2014-03-06 21:30:09 -08:00
2013-12-08 07:29:25 -08:00
2013-12-04 10:56:59 -08:00
2013-05-17 14:31:05 -04:00
2014-02-22 12:41:25 -08:00
2013-10-13 16:08:32 -07:00
2013-04-11 17:05:37 +00:00
2013-07-13 11:42:26 -07:00
2014-02-22 12:41:27 -08:00
2014-01-15 15:28:52 -08:00
2014-01-15 15:28:45 -08:00
2013-12-08 07:29:25 -08:00
2014-03-06 21:30:09 -08:00
2013-09-26 17:18:02 -07:00
2013-08-04 16:50:57 +08:00
2014-01-09 12:24:21 -08:00
2014-03-06 21:30:09 -08:00
2014-02-13 13:47:59 -08:00
2013-05-09 09:59:16 -07:00
2014-01-09 12:24:21 -08:00
2013-11-29 11:11:53 -08:00
2014-01-15 15:28:45 -08:00
2014-03-06 21:30:00 -08:00
2014-01-15 15:28:45 -08:00
2014-02-22 12:41:28 -08:00
2014-02-22 12:41:27 -08:00
2013-05-07 14:01:27 -07:00
2014-02-13 13:48:03 -08:00
2013-05-07 02:16:21 -04:00
2014-01-09 12:24:21 -08:00
2014-02-22 12:41:27 -08:00
2014-02-22 12:41:29 -08:00
2014-01-09 12:24:24 -08:00
2014-02-13 13:47:59 -08:00
2014-02-20 11:06:11 -08:00
2013-12-08 07:29:25 -08:00
2013-09-26 17:18:27 -07:00
2013-05-08 10:49:18 +09:30
2013-08-11 18:35:20 -07:00
2014-02-22 12:41:29 -08:00
2014-02-20 11:06:11 -08:00
2013-05-18 11:55:52 +02:00
2013-05-07 02:16:21 -04:00
2013-05-08 10:13:35 -07:00
2014-02-13 13:48:03 -08:00
2014-03-06 21:30:10 -08:00
2014-02-13 13:48:00 -08:00
2014-02-13 13:48:00 -08:00
2014-03-06 21:30:10 -08:00
2013-05-21 10:48:41 +02:00
2013-11-13 12:05:35 +09:00
2013-05-04 14:47:26 -04:00
2014-02-22 12:41:27 -08:00
2013-08-11 18:35:21 -07:00
2014-02-06 11:08:15 -08:00
2014-03-06 21:30:09 -08:00
2013-07-21 18:21:25 -07:00
2014-02-20 11:06:11 -08:00
2014-02-06 11:08:16 -08:00
2013-05-02 10:16:16 -07:00
2014-02-22 12:41:29 -08:00
2013-05-01 17:51:54 -07:00
2013-05-25 21:24:15 -07:00
2013-05-18 11:55:58 +02:00
2013-07-28 16:30:07 -07:00
2013-06-24 12:37:47 +01:00
2013-05-07 14:04:56 -07:00
2013-04-12 10:26:24 +02:00
2013-05-07 14:02:00 -07:00
2014-02-13 13:48:03 -08:00
2014-01-09 12:24:24 -08:00
2013-03-31 19:29:12 -04:00
2014-02-06 11:08:17 -08:00
2014-02-22 12:41:26 -08:00
2013-05-09 10:15:46 -07:00
2014-02-22 12:41:27 -08:00
2014-02-06 11:08:17 -08:00
2013-05-18 11:57:30 +02:00
2014-02-22 12:41:27 -08:00
2013-11-13 12:05:33 +09:00
2014-03-06 21:30:10 -08:00
2013-04-29 18:28:43 -07:00
2013-06-05 08:54:16 -06:00
2013-11-13 12:05:32 +09:00
2013-12-08 07:29:27 -08:00
2013-07-28 16:29:55 -07:00
2014-02-22 12:41:28 -08:00
2013-05-18 11:58:03 +02:00
2013-12-20 07:45:11 -08:00
2013-12-11 22:36:27 -08:00
2013-05-01 17:29:18 -04:00
2013-05-04 12:31:18 -07:00
2013-05-04 12:31:18 -07:00