Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2237841pxb; Tue, 23 Feb 2021 01:57:21 -0800 (PST) X-Google-Smtp-Source: ABdhPJyD1O5pTVhDTYgW/LnUAMEOFLcTNvO+28BVa0Z94jjePhW0HsJDMvGJC1zqoHULozTr7FXk X-Received: by 2002:a50:ce18:: with SMTP id y24mr27842798edi.208.1614074240868; Tue, 23 Feb 2021 01:57:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614074240; cv=none; d=google.com; s=arc-20160816; b=SiqZyMlAxVloN4sWW8ocjVw4XAiR8aRarP8/nj+hUniuZ0HAEENj1T6mZfK5P5z8Up Nlgw9MWpRjs0+tEw16ynTWSxZ2irGF5elVNKNql8Xdh4Q96HOthDwbwBZydkfXNy93aP NpV4SG7wBkU8hNZK3QU+Sr+HiNyBkVEiK7/j6GUdwOenrGbKG0zKhbJ0IfrP/VG6VKTb YA2YlhSpcl0dV7Y5gIXubOQJNp3ntQhgKCewRnfOri0k+FHVNqnLGP64zjtMy8MMRDFL eNqk3sVd4ApQ09AqYrYoju/UBWw/To3RSvwiGDp0Ii+MZh9IOTZEjLd/v2CcyfigdcTU 4Tmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=2OlF40uuqCa9xzhPIHo41JTxjWpS4watrjqJdkBP0g8=; b=0DxW+fj7dVECTvhNrJd9KhTx8uTC+16qbwKn6QIopzyDkyrV4NV1r7+40RKhYslRs5 WudI/GnepNDXjzQ8gRLfjVPoAA97KTyaoQs1CFXJpTgRjU/kgOjfQpwmvpbNBOKmSc44 tp1hNufVYZToA1UmcQAqbKdYtjsqXTAU+Z4oLATDf31Teb0CZP3L3WW71mNNBWKpNRQR xkENaoxDcyEY37S3xnehAmWAVybxiHjspmhXVyIEyHMbzZoxBCZdbQu++nPtL27b6uMI SnC0I/SOmp65guSjm96GFYteEgyH6wFPq3r27eur3rqg0kFcHUAme/YQSzDp3vDcv5P4 cmcw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v24si9211450edy.357.2021.02.23.01.56.52; Tue, 23 Feb 2021 01:57:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231177AbhBWJs5 (ORCPT + 99 others); Tue, 23 Feb 2021 04:48:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53474 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231815AbhBWJsW (ORCPT ); Tue, 23 Feb 2021 04:48:22 -0500 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:191:4433::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7BDAFC06174A; Tue, 23 Feb 2021 01:47:42 -0800 (PST) Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.94) (envelope-from ) id 1lEUHz-007Iqu-8F; Tue, 23 Feb 2021 10:47:31 +0100 Message-ID: <7909a51a9b234932e1761484a1c2ab5d8fa16317.camel@sipsolutions.net> Subject: Re: [PATCH net v1 3/3] [RFC] mac80211: ieee80211_store_ack_skb(): make use of skb_clone_sk_optional() From: Johannes Berg To: Marc Kleine-Budde Cc: Oleksij Rempel , "David S. Miller" , Jakub Kicinski , Oliver Hartkopp , Robin van der Gracht , kernel@pengutronix.de, linux-can@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Eric Dumazet , linux-wireless@vger.kernel.org Date: Tue, 23 Feb 2021 10:47:22 +0100 In-Reply-To: <20210222185141.oma64d4uq64pys45@pengutronix.de> References: <20210222151247.24534-1-o.rempel@pengutronix.de> <20210222151247.24534-4-o.rempel@pengutronix.de> <3823be537c3c138de90154835573113c6577188e.camel@sipsolutions.net> <20210222185141.oma64d4uq64pys45@pengutronix.de> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.36.5 (3.36.5-2.fc32) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-malware-bazaar: not-scanned Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On Mon, 2021-02-22 at 19:51 +0100, Marc Kleine-Budde wrote: > On 22.02.2021 17:30:59, Johannes Berg wrote: > > On Mon, 2021-02-22 at 16:12 +0100, Oleksij Rempel wrote: > > > This code is trying to clone the skb with optional skb->sk. But this > > > will fail to clone the skb if socket was closed just after the skb was > > > pushed into the networking stack. > > > > Which IMHO is completely fine. If we then still clone the SKB we can't > > do anything with it, since the point would be to ... send it back to the > > socket, but it's gone. > > Ok, but why is the skb cloned if there is no socket linked in skb->sk? Hm? There are two different ways to get here, one with and one without a socket. johannes