Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp4647903imm; Mon, 17 Sep 2018 18:45:25 -0700 (PDT) X-Google-Smtp-Source: ANB0VdY1X0rdSuYgjidUVu+gmjgn4j34TtE/Z9p7h78jHTDu5qFawPPIi7YipUDxohEpxjSxTN1P X-Received: by 2002:a17:902:246a:: with SMTP id m39-v6mr26648249plg.57.1537235125391; Mon, 17 Sep 2018 18:45:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537235125; cv=none; d=google.com; s=arc-20160816; b=tOIHDyIjiOt2kys/Cnk1d3zNiYzsQX6ob+pMqMiYf9BNa+DCAB0fTsF+1adiJ8wtwp U0nkiMADGqTbWDIL8n8y/H5kcYhfBldfdXHZu8sO2jaiUyxz5Lcjr3qU8Dr+bt8oemy2 zx8eclJnSDUgrfzTKXXCLrkdSpyS/AZdAahA7PeKAn0ZJzcR69tMJ1tFDeTYEzjaaktL SHA/5/Gafegyy5C2R9N/gG/LUlLRGEggMAOMaDRFHd63w3hbyCbWLUkqXvCrZVAFmcF1 9mnPWhLndD3ZRktcbKVNMU4O4Pzz4OR5D1moVm8sZKuF0mJ3j4TC81YADPgZM1BE8+NS 7UTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:from:subject:cc:to:message-id:date; bh=zL89M9AAx58iepHSZ/CH28L+pnuwkUAz/EeYDnKbH+g=; b=xo2/zyr3ab6C/iphgP+P2gPfDqtpfNNzw+G5hAE0jEvVe2Qa2xj3TNn5+OtCsgXwG0 9IDSzjiyVl/AL5d9yPvSFb+LmecgALP6vaHiSuoyL7ssiD4W4k4E9f0rWwTbx06eecqA scP9pQfcy3zBkdXbFFf3QXQaBzdaSH/3cCCJe50dXzWV8LsMwqxByl8zd3sWHX3ZFwO1 uZZbgYRqVB0yE79oaDX+AYy9aBSVoD2je76fmcvO8qByAqna+V+1NBVF3rxdVkme+HTK swfXPomoSQ/gmHNRxT3HTNQyjGIcDj4nhctMyRITWGQHLX02J1jMyTH2KmrSFHsbJiLl CiYQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 14-v6si16197141pgc.179.2018.09.17.18.45.09; Mon, 17 Sep 2018 18:45:25 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727471AbeIRHPL (ORCPT + 99 others); Tue, 18 Sep 2018 03:15:11 -0400 Received: from shards.monkeyblade.net ([23.128.96.9]:53776 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726428AbeIRHPK (ORCPT ); Tue, 18 Sep 2018 03:15:10 -0400 Received: from localhost (unknown [104.240.4.228]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id 6AC9C14621320; Mon, 17 Sep 2018 18:45:05 -0700 (PDT) Date: Mon, 17 Sep 2018 18:45:02 -0700 (PDT) Message-Id: <20180917.184502.447385458615284933.davem@davemloft.net> To: asmadeus@codewreck.org Cc: doronrk@fb.com, tom@quantonium.net, davejwatson@fb.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] kcm: remove any offset before parsing messages From: David Miller In-Reply-To: <20180912053642.GA2912@nautica> References: <1536657703-27577-1-git-send-email-asmadeus@codewreck.org> <20180912053642.GA2912@nautica> X-Mailer: Mew version 6.7 on Emacs 26 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Mon, 17 Sep 2018 18:45:05 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Dominique Martinet Date: Wed, 12 Sep 2018 07:36:42 +0200 > Dominique Martinet wrote on Tue, Sep 11, 2018: >> Hmm, while trying to benchmark this, I sometimes got hangs in >> kcm_wait_data() for the last packet somehow? >> The sender program was done (exited (zombie) so I assumed the sender >> socket flushed), but the receiver was in kcm_wait_data in kcm_recvmsg >> indicating it parsed a header but there was no skb to peek at? >> But the sock is locked so this shouldn't be racy... >> >> I can get it fairly often with this patch and small messages with an >> offset, but I think it's just because the pull changes some timing - I >> can't hit it with just the clone, and I can hit it with a pull without >> clone as well.... And I don't see how pulling a cloned skb can impact >> the original socket, but I'm a bit fuzzy on this. > > This is weird, I cannot reproduce at all without that pull, even if I > add another delay there instead of the pull, so it's not just timing... I really can't apply this patch until you resolve this. It is weird, given your description, though...