Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp4049146ybg; Fri, 25 Oct 2019 12:34:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqziN/4//aiz1yTvIuD40ap+VdLcjglUX6opxrJzmgXynirJXvJzSCvK/a5Y/Ewng4FLGExI X-Received: by 2002:aa7:c752:: with SMTP id c18mr2689789eds.151.1572032089566; Fri, 25 Oct 2019 12:34:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572032089; cv=none; d=google.com; s=arc-20160816; b=csqT3cHtehWco+5KCyJQrqvyf1UUwiWngWeAUXiZ/E5XZcoLavu7pdpDRHqsawkkUZ 1H0d8C4xplnif3T/icpgS199Thu77K/ASjEPlsWeGlW9HfFm/sfrKuSQMIS0R2w/K1bA eLpObrBPZRWuYmcFcJXys0zII91YiNAvs3dMtCGYEW0VMCeaqS5Y220vfF6QM4hQLllo MaEPxq9BibfmZDOgeErjRpO441jDgeJ4UlPySbII1Q85Pz8nTHk87k08BtPeRTDi/09y hStbXEjW2uSTOrx8ZeSsBR5jmMk5P4sytWCa52+Vp0l+/BvJe4jse40WOeO6ekoY6ocN Qf5w== 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:in-reply-to :mime-version:user-agent:date:message-id:from:references:cc:to :subject:dkim-signature; bh=3q0asO118tF1DALeYypzSAxsX3AgnykiKoF4WVnAhMk=; b=OTSDQc2L9v4MZIk8+KChl7yqLEzswHVc7F8wOXdtcsEo4ZiKoqAHs3Sq7WJXbnUZtH Sqw8Jb8Po8s/dQd9PfUhZ4tzUKOo2Ne0yge8vFunjXTNAdEVzBrWVMzAP3yODx1A66aY t5BryaBrXbHeNf71122qy3K4QDDPfcHQu9dCJ9lkeND8Z+ogz6ad1my4hxQpjM1/pzjP 5Qk0H+8tt/4+83v7r31HTaWIpv67PZ5HUfUwEu3qM7DMJcuRmgvwNP6yje8DWtB7hwMr AUsOJwgdxlKoFZx0auZNj2QBeD4OTGDJ2TJzPla994x4gnOiyGXIUucG8lW6jhIoP2/2 LOiw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@jv-coder.de header.s=dkim header.b=UVm8WGJM; 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 u12si2419200eda.319.2019.10.25.12.34.26; Fri, 25 Oct 2019 12:34:49 -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; dkim=pass header.i=@jv-coder.de header.s=dkim header.b=UVm8WGJM; 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 S2394379AbfJYJiD (ORCPT + 99 others); Fri, 25 Oct 2019 05:38:03 -0400 Received: from mail.jv-coder.de ([5.9.79.73]:55362 "EHLO mail.jv-coder.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730158AbfJYJiC (ORCPT ); Fri, 25 Oct 2019 05:38:02 -0400 Received: from [10.61.40.7] (unknown [37.156.92.209]) by mail.jv-coder.de (Postfix) with ESMTPSA id 6619B9F64C; Fri, 25 Oct 2019 09:38:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jv-coder.de; s=dkim; t=1571996280; bh=3q0asO118tF1DALeYypzSAxsX3AgnykiKoF4WVnAhMk=; h=Subject:To:From:Message-ID:Date:MIME-Version; b=UVm8WGJMD0FTuKmVfovQfnJa6AG7n9u5+ujc9faJRaNhjORK+A1BzW65fGe5l7HYD kCrzw1sSBFUQ3k8KUJFF1w0VJzH/sjSQ7Y2ZUIwXJ3iixPwsgLEanPzVt+1hwZwuiY 0OCOM0ocPn4Qcfogk8ChIpv5DOvw5YYggER36tLc= Subject: Re: [PATCH v2 1/1] xfrm : lock input tasklet skb queue To: Steffen Klassert , Tom Rix , Sebastian Andrzej Siewior , Steven Rostedt , Thomas Gleixner Cc: herbert@gondor.apana.org.au, davem@davemloft.net, netdev@vger.kernel.org, linux-kernel@vger.kernel.org References: <20191024103134.GD13225@gauss3.secunet.de> From: Joerg Vehlow Message-ID: Date: Fri, 25 Oct 2019 11:37:59 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.1.2 MIME-Version: 1.0 In-Reply-To: <20191024103134.GD13225@gauss3.secunet.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,HELO_MISC_IP,RCVD_IN_DNSWL_BLOCKED, RDNS_NONE autolearn=no autolearn_force=no version=3.4.2 X-Spam-Level: * X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mail.jv-coder.de Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, I always expected this to be applied to the RT patches. That's why I originally send my patch to to Sebastian, Thomas and Steven (I added them again now. The website of the rt patches says patches for the CONFIG_REEMPT_RT patchset should be send to lkml. I hope one of the rt patch maintainers will reply here. Jörg Am 24.10.2019 um 12:31 schrieb Steffen Klassert: > On Tue, Oct 22, 2019 at 05:22:04PM -0700, Tom Rix wrote: >> On PREEMPT_RT_FULL while running netperf, a corruption >> of the skb queue causes an oops. >> >> This appears to be caused by a race condition here >> __skb_queue_tail(&trans->queue, skb); >> tasklet_schedule(&trans->tasklet); >> Where the queue is changed before the tasklet is locked by >> tasklet_schedule. >> >> The fix is to use the skb queue lock. >> >> This is the original work of Joerg Vehlow >> https://lkml.org/lkml/2019/9/9/111 >> xfrm_input: Protect queue with lock >> >> During the skb_queue_splice_init the tasklet could have been preempted >> and __skb_queue_tail called, which led to an inconsistent queue. >> >> ifdefs for CONFIG_PREEMPT_RT_FULL added to reduce runtime effects >> on the normal kernel. > Has Herbert commented on your initial patch, please > fix PREEMPT_RT_FULL instead. There are certainly many > more codepaths that take such assumptions. You can not > fix this by distributing a spin_lock_irqsave here > and there. >