Will Deacon
4df1d2ffe1
ANDROID: usb: f_accessory: Fix teardown ordering in acc_release()
...
acc_release() attempts to synchronise with acc_open() using an atomic
'open_excl' member in 'struct acc_dev'. Unfortunately, acc_release()
prematurely resets this atomic variable to zero, meaning there is a
potential race on 'dev->disconnected':
acc_open() acc_release()
atomic_xchg(open_excl), 0)
atomic_xchg(open_excl, 1)
dev->disconnected = 0; dev->disconnected = 1;
Fix the race by ensuring that the 'disconnected' field is written
before clearing 'open_excl' in acc_release().
Bug: 173789633
Signed-off-by: Will Deacon <willdeacon@google.com >
Change-Id: Ib9a21f2305f6d70de3e760da62dbfdd66889200a
Signed-off-by: Giuliano Procida <gprocida@google.com >
2021-01-05 10:12:26 +00:00
..
2020-12-30 12:19:31 +01:00
2020-11-16 07:43:08 +01:00
2020-11-05 11:08:38 +01:00
2020-11-24 13:27:15 +01:00
2020-11-16 07:43:08 +01:00
2020-12-30 12:19:31 +01:00
2020-12-30 11:25:52 +01:00
2020-12-30 11:26:02 +01:00
2020-11-19 12:25:33 +01:00
2020-12-30 12:19:31 +01:00
2020-12-30 12:19:31 +01:00
2020-12-30 12:19:31 +01:00
2020-09-09 19:48:58 +02:00
2020-12-30 12:19:31 +01:00
2020-10-01 16:49:05 +02:00
2020-12-30 11:25:56 +01:00
2020-11-15 15:40:31 +00:00
2020-12-30 12:19:31 +01:00
2020-12-30 12:19:31 +01:00
2020-10-01 16:49:05 +02:00
2020-07-29 10:16:48 +02:00
2020-06-22 10:50:54 +02:00
2020-12-30 12:19:31 +01:00
2020-12-30 12:19:31 +01:00
2020-12-30 12:19:31 +01:00
2020-12-30 11:25:57 +01:00
2020-11-18 19:18:41 +01:00
2020-10-29 11:36:20 +01:00
2020-12-30 12:19:31 +01:00
2020-12-11 14:59:08 +01:00
2020-12-30 12:19:31 +01:00
2020-12-30 12:19:31 +01:00
2020-12-30 12:19:31 +01:00
2020-12-11 14:59:08 +01:00
2020-12-30 12:19:31 +01:00
2020-06-22 09:05:23 +02:00
2020-11-05 11:08:46 +01:00
2020-06-22 09:05:29 +02:00
2020-10-30 11:43:26 +01:00
2020-12-30 12:19:31 +01:00
2020-12-30 12:19:31 +01:00
2020-11-05 11:08:45 +01:00
2020-12-30 11:26:00 +01:00
2020-11-05 11:08:47 +01:00
2020-11-18 19:18:46 +01:00
2020-11-19 12:25:33 +01:00
2020-12-30 12:19:31 +01:00
2020-12-30 11:26:15 +01:00
2020-12-30 12:19:31 +01:00
2020-12-30 11:26:04 +01:00
2020-10-30 10:38:25 +01:00
2020-12-30 12:19:31 +01:00
2020-12-02 08:48:09 +01:00
2020-11-19 12:25:33 +01:00
2020-08-19 08:15:07 +02:00
2020-12-30 12:19:31 +01:00
2020-10-29 09:55:00 +01:00
2020-12-02 08:48:10 +01:00
2020-12-30 11:26:16 +01:00
2020-12-30 12:19:31 +01:00
2020-12-30 12:19:31 +01:00
2020-11-10 21:11:27 +01:00
2020-12-30 11:26:04 +01:00
2020-12-30 12:19:31 +01:00
2020-10-30 10:38:21 +01:00
2020-11-24 14:57:17 +01:00
2020-08-21 11:05:34 +02:00
2020-11-05 11:08:43 +01:00
2020-11-05 14:02:27 +01:00
2020-12-30 11:26:10 +01:00
2020-12-30 12:19:31 +01:00
2020-12-30 11:25:57 +01:00
2020-12-30 12:19:31 +01:00
2020-12-30 12:19:31 +01:00
2020-12-30 12:19:31 +01:00
2020-12-02 08:48:10 +01:00
2020-12-03 10:10:00 +01:00
2020-10-01 16:49:05 +02:00
2020-11-18 19:18:49 +01:00
2020-12-30 12:19:31 +01:00
2020-11-18 19:18:49 +01:00
2021-01-05 10:12:26 +00:00
2020-12-30 12:19:31 +01:00
2020-11-05 14:02:27 +01:00
2020-12-30 11:25:54 +01:00
2020-10-29 09:55:09 +01:00
2020-08-26 11:07:03 +02:00
2020-11-05 11:08:47 +01:00
2020-12-30 11:26:05 +01:00
2020-12-30 11:26:17 +01:00