Skip to content

list: refine list_item_del to avoid make list corruption - #300

Merged
lgirdwood merged 1 commit into
thesofproject:stable-1.2from
xiulipan:listfix
Sep 6, 2018
Merged

lgirdwood merged 1 commit into
thesofproject:stable-1.2from
xiulipan:listfix

Conversation

@xiulipan

@xiulipan xiulipan commented Sep 3, 2018

Copy link
Copy Markdown
Contributor

There are possible that we call list_item_del to same list item twice. This
will cause the list be into chaos. Reset the next and prev pointer to 0
to avoid risk.

Signed-off-by: Pan Xiuli xiuli.pan@linux.intel.com

Comment thread src/include/sof/list.h Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets have this as a debug option. i.e. define a macro that enables setting next, prev = 0 and then does a check. This way we can use this on any list when we enable list debugging.

@jajanusz

jajanusz commented Sep 3, 2018

Copy link
Copy Markdown
Contributor

shouldn't it go to master instead of stable-1.2 ?

@lgirdwood lgirdwood changed the title list: refine list_item_del to avoid make list chaos list: refine list_item_del to avoid make list corruption Sep 3, 2018
There are possible that we call list_item_del to same list item twice. This
will cause the list be into chaos. Reset the next and prev pointer to 0
to avoid risk.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
@lgirdwood
lgirdwood merged commit 081bc3a into thesofproject:stable-1.2 Sep 6, 2018
@xiulipan
xiulipan deleted the listfix branch September 19, 2019 09:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants