Received: by 2002:a05:7412:98c1:b0:fa:551:50a7 with SMTP id kc1csp266180rdb; Fri, 5 Jan 2024 09:06:03 -0800 (PST) X-Google-Smtp-Source: AGHT+IEhT0hC8dChcN8WqptT57zTKX8McGF1awFqgLgbVqY3E7bXWDrUI/86y/asO/0wXf8/AkQC X-Received: by 2002:a05:6512:14b:b0:50e:71d4:a37f with SMTP id m11-20020a056512014b00b0050e71d4a37fmr1141955lfo.55.1704474363142; Fri, 05 Jan 2024 09:06:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704474363; cv=none; d=google.com; s=arc-20160816; b=yJfwkS1RjIJ2Kap4coQSW5RdvJUTqwkr+2MRxjiWlX5hr/CgQuaIr+vo4AgAzNw+qR dVjxNABJNLz0Kdpe/aZK00x6J1s39xKW4C/ahMZbM+g49zPzwnGnFUuuu+0T/m/iCl3+ cOgHbevGL08MMBicTJQU/wwLll8p71iS+1bv2bX5QJJVsW8N0gB7CWT7gp9K465doTtB W5lheDKXYWyhaXNXvoweM09PZRVg5XtA/7gdj39pssfVBbmh/OxhFMjepOJ+L3mCcYVf 3tcZaz+hHXGdygo+DrGQ3PYWeUTxtOFZF4Q4sokOF4loyUuJSXYMmgxQ1/xOxnCdNs7U Xhqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:date:content-transfer-encoding:content-id:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:subject:cc:to :from:organization:dkim-signature; bh=JrHpstWMweqHmwv0W0gV2LfaiN8+NJubK8GIKuda4w4=; fh=ZtXT4EhCVz8l2Yug/IC9dCH+r5a0SWpJM+worp9SNdU=; b=de8AXAzNRQuHPFxLagC4Y+EPkR0Njw7R3kvhbzAI5qY/qxqL0lJbvZrLo5ryKhSGSd PAMs5FGdODqPSj8QrkvMbOHc1dyl4/stc+UDe+MxkrBd/wh86LVrLrEEaAMv1GlmX4hj +wWioD7nofXN/xnFt64Smxcjyd7LaSUWNqT4shtstdZOWh0q8XmNxNGuuyNahWhtCWnl jdvIxY6fgh5vNOvIVDwQheq9Q/XQ5ca+7++dluWrMnpyHx9UWMTsksOPox+q0zfAquMG 8KGFP+uWnNupkihCUtAVhDMab37Bqb2t1vMpfKZkeGRs7posHyx1r4+ccjvkpZLjF3fB 3cIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=PGGoYXkw; spf=pass (google.com: domain of linux-kernel+bounces-18095-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-18095-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id lz25-20020a170906fb1900b00a232e29b109si725693ejb.978.2024.01.05.09.06.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jan 2024 09:06:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-18095-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=PGGoYXkw; spf=pass (google.com: domain of linux-kernel+bounces-18095-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-18095-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id D7B341F23958 for ; Fri, 5 Jan 2024 17:06:02 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8427D31A79; Fri, 5 Jan 2024 17:05:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="PGGoYXkw" X-Original-To: linux-kernel@vger.kernel.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2E34331A81 for ; Fri, 5 Jan 2024 17:05:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1704474349; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JrHpstWMweqHmwv0W0gV2LfaiN8+NJubK8GIKuda4w4=; b=PGGoYXkwb0ZXLQupzQiPV/Lw0atNVwO4pkXUxFytBUe8hNoSHo0PtW6TPh81+8P9uOCi42 riPNDok9Qo+B2AWlSUAODBkLZIeqt7tepNsZyWQxi6KqXW+XOFkZp42MNRkk5PmKv378yi WjqarMyZISgbqOtMqBGu4OmMN+zOsFM= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-549-qnNTMjryOLCldvCVxbsb-g-1; Fri, 05 Jan 2024 12:05:43 -0500 X-MC-Unique: qnNTMjryOLCldvCVxbsb-g-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 401B81C05148; Fri, 5 Jan 2024 17:05:43 +0000 (UTC) Received: from warthog.procyon.org.uk (unknown [10.42.28.14]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1A5253C25; Fri, 5 Jan 2024 17:05:41 +0000 (UTC) Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells To: Marc Dionne cc: dhowells@redhat.com, "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , linux-afs@lists.infradead.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] rxrpc: Fix skbuff cleanup of call's recvmsg_queue and rx_oos_queue Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1366724.1704474341.1@warthog.procyon.org.uk> Content-Transfer-Encoding: quoted-printable Date: Fri, 05 Jan 2024 17:05:41 +0000 Message-ID: <1366725.1704474341@warthog.procyon.org.uk> X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.1 = Fix rxrpc_cleanup_ring() to use rxrpc_purge_queue() rather than skb_queue_purge() so that the count of outstanding skbuffs is correctly updated when a failed call is cleaned up. Without this rmmod may hang waiting for rxrpc_n_rx_skbs to become zero. Reported-by: Marc Dionne Signed-off-by: David Howells cc: "David S. Miller" cc: Eric Dumazet cc: Jakub Kicinski cc: Paolo Abeni cc: linux-afs@lists.infradead.org cc: netdev@vger.kernel.org --- net/rxrpc/call_object.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/rxrpc/call_object.c b/net/rxrpc/call_object.c index 773eecd1e979..f10b37c14772 100644 --- a/net/rxrpc/call_object.c +++ b/net/rxrpc/call_object.c @@ -545,8 +545,8 @@ void rxrpc_get_call(struct rxrpc_call *call, enum rxrp= c_call_trace why) */ static void rxrpc_cleanup_ring(struct rxrpc_call *call) { - skb_queue_purge(&call->recvmsg_queue); - skb_queue_purge(&call->rx_oos_queue); + rxrpc_purge_queue(&call->recvmsg_queue); + rxrpc_purge_queue(&call->rx_oos_queue); } = /*