soc: qcom: hab: fix the panic in shmem device shutdown
The global struct list_head pchannels should be directly used as the list head for pchan list traversal. Previously, a local struct list_head instance was wrongly created and used for such traversal. It caused kernel panic in system shutdown. Change-Id: Ifb82b55d5a0237fd12f8f53db095fccbcef96fb8 Signed-off-by: Yong Ding <yongding@codeaurora.org>
This commit is contained in:
parent
6ca24c92b8
commit
435b592e06
1 changed files with 5 additions and 5 deletions
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (c) 2016-2017, The Linux Foundation. All rights reserved.
|
||||
/* Copyright (c) 2016-2018, The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 and
|
||||
|
@ -375,12 +375,12 @@ static void hab_shmem_shutdown(struct platform_device *pdev)
|
|||
int i;
|
||||
struct qvm_channel *dev;
|
||||
struct physical_channel *pchan;
|
||||
struct hab_device hab_dev;
|
||||
struct hab_device *hab_dev;
|
||||
|
||||
for (i = 0; i < hab_driver.ndevices; i++) {
|
||||
hab_dev = hab_driver.devp[i];
|
||||
pr_debug("detaching %s\n", hab_dev.name);
|
||||
list_for_each_entry(pchan, &hab_dev.pchannels, node) {
|
||||
hab_dev = &hab_driver.devp[i];
|
||||
pr_debug("detaching %s\n", hab_dev->name);
|
||||
list_for_each_entry(pchan, &hab_dev->pchannels, node) {
|
||||
dev = (struct qvm_channel *)pchan->hyp_data;
|
||||
dev->guest_ctrl->detach = 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue