From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753480AbbL2Ohq (ORCPT ); Tue, 29 Dec 2015 09:37:46 -0500 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:47542 "EHLO out4-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753381AbbL2Ohn (ORCPT ); Tue, 29 Dec 2015 09:37:43 -0500 X-Sasl-enc: UZ5WrJsb3wXxc3J6MhDEJCShu173xBkIHdsr5uM3dlBh 1451399862 Subject: Re: [PATCH] unix: properly account for FDs passed over unix sockets To: Willy Tarreau , "David S. Miller" , netdev@vger.kernel.org, linux-kernel@vger.kernel.org References: <20151228141435.GA13351@1wt.eu> Cc: Linus Torvalds , Eric Dumazet , socketpair@gmail.com From: Hannes Frederic Sowa Message-ID: <56829AB3.9000607@stressinduktion.org> Date: Tue, 29 Dec 2015 15:37:39 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: <20151228141435.GA13351@1wt.eu> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 28.12.2015 15:14, Willy Tarreau wrote: > @@ -1528,10 +1546,8 @@ static int unix_attach_fds(struct scm_cookie *scm, struct sk_buff *skb) > if (!UNIXCB(skb).fp) > return -ENOMEM; > > - if (unix_sock_count) { > - for (i = scm->fp->count - 1; i >= 0; i--) > - unix_inflight(scm->fp->fp[i]); > - } > + for (i = scm->fp->count - 1; i >= 0; i--) > + unix_inflight(scm->fp->fp[i]); > return max_level; You seem to be able to remove the unix_sock_count variable altogether now. Bye, Hannes