From mboxrd@z Thu Jan 1 00:00:00 1970 From: Luc Van Oostenryck Subject: [PATCH 0/4] fix list corruption with recursive remove_usage() Date: Fri, 4 Aug 2017 22:09:11 +0200 Message-ID: <20170804200915.56738-1-luc.vanoostenryck@gmail.com> References: Return-path: Received: from mail-wr0-f196.google.com ([209.85.128.196]:36326 "EHLO mail-wr0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751343AbdHDUJU (ORCPT ); Fri, 4 Aug 2017 16:09:20 -0400 Received: by mail-wr0-f196.google.com with SMTP id y67so3637009wrb.3 for ; Fri, 04 Aug 2017 13:09:20 -0700 (PDT) In-Reply-To: Sender: linux-sparse-owner@vger.kernel.org List-Id: linux-sparse@vger.kernel.org To: Christopher Li Cc: linux-sparse@vger.kernel.org, Luc Van Oostenryck The goal of this series is to avoid list corruption that may happen with pseudo-users when deleting one while doing nested ptrlist walking. This can occurs with mutually recursive calls: remove_usage() - kill_instruction() - remove_usage() - ... Luc Van Oostenryck (4): ptrlist: add a counter for the number of removed elemnets ptrlist: adjust ptr_list_size for the new ->rm field ptrlist: add MARK_CURRENT_DELETED mark pseudo users as deleted instead of removing them flow.c | 28 ++++++++++++++++++++++------ linearize.c | 2 ++ memops.c | 5 ++++- ptrlist.c | 2 +- ptrlist.h | 11 ++++++++++- simplify.c | 10 ++++++++-- unssa.c | 2 ++ 7 files changed, 49 insertions(+), 11 deletions(-) -- 2.13.2