From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Dumazet Subject: Re: [PATCHv2 net-next 1/6] sctp: add sctp_info dump api for sctp_diag Date: Sat, 09 Apr 2016 10:31:15 -0700 Message-ID: <1460223075.6473.499.camel@edumazet-glaptop3.roam.corp.google.com> References: <1460179179.6473.476.camel@edumazet-glaptop3.roam.corp.google.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Cc: network dev , linux-sctp@vger.kernel.org, Marcelo Ricardo Leitner , Vlad Yasevich , daniel@iogearbox.net, davem To: Xin Long Return-path: Received: from mail-qk0-f171.google.com ([209.85.220.171]:35925 "EHLO mail-qk0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754613AbcDIRbT (ORCPT ); Sat, 9 Apr 2016 13:31:19 -0400 In-Reply-To: Sender: netdev-owner@vger.kernel.org List-ID: On Sun, 2016-04-10 at 00:10 +0800, Xin Long wrote: > 1. sctp_diag_dump_one -> sctp_transport_lookup_process-> sctp_tsp_dump_one > this one just holds the tsp. and we're using list_for_each_safe here now, > isn't it enough ? list_for_each_safe is 'safe' if you do a list_del() yourself. It is not safe if other cpus are adding/deleting items in the list while this thread is iterating it.