From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: MIME-Version: 1.0 References: <20180518130413.16997-1-roman.penyaev@profitbricks.com> <20180518130413.16997-2-roman.penyaev@profitbricks.com> <20180519163735.GX3803@linux.vnet.ibm.com> <20180520004318.GY3803@linux.vnet.ibm.com> <20180521153337.GF3803@linux.vnet.ibm.com> In-Reply-To: From: Linus Torvalds Date: Tue, 22 May 2018 09:38:13 -0700 Message-ID: Subject: Re: [PATCH v2 01/26] rculist: introduce list_next_or_null_rr_rcu() To: Roman Pen Cc: Paul McKenney , linux-block , linux-rdma , Jens Axboe , Christoph Hellwig , Sagi Grimberg , Bart Van Assche , Or Gerlitz , Doug Ledford , swapnil.ingle@profitbricks.com, danil.kipnis@profitbricks.com, Jinpu Wang , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" List-ID: On Tue, May 22, 2018 at 2:09 AM Roman Penyaev < roman.penyaev@profitbricks.com> wrote: > Should I resend current patch with more clear comments about how careful > caller should be with a leaking pointer? No. Even if we go your way, there is *one* single user, and that one is special and needs to take a lot more care. Just roll your own version, and make it an inline function like I've asked now now many times, and add a shit-ton of explanations of why it's safe to use in that *one* situation. I don't want any crazy and unsafe stuff in the generic header file that absolutely *nobody* should ever use. Linus