Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp850469pxu; Wed, 16 Dec 2020 16:51:06 -0800 (PST) X-Google-Smtp-Source: ABdhPJwUJ3en/4LsrYymr9UmO/nqHICx1j3WgQDPu2qrUradVIjLX+GVw0k+dxrRiWN3JrfH8oEm X-Received: by 2002:a17:906:77ce:: with SMTP id m14mr13441096ejn.10.1608166266064; Wed, 16 Dec 2020 16:51:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608166266; cv=none; d=google.com; s=arc-20160816; b=ypApGFmI+a6ESzZkdAwI5jtw6RCiqt9EYVBVRAo/cctspdw5ENUW7ZD1vsZVbuzVDm vjyF4PKP5eFHxR2hEJlYvDJDgbt483ofsfOjwEJBnroMUVinMLihx5GbyjQ3XQRxrzx4 l/HR7ghha/+E/1lvkVjdD2iW7m50QJE6S1gxZTWQLHlpw0/QXNs4od7KXtG0SK1Frv1Q N+xZEq9oTN/7ex7g6N7Q+mkP4I4EbZMVlSfy9MXYbABMbJ4oET6jMRBwNE0pUXhG46SS X8loo77fnTbK7v6QwygAW2FSrK3ycrQ3erfHJKlytzb7OL2Co9CDJOylHYYZR0Iqfxrh Y0wA== 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 :references:in-reply-to:message-id:subject:cc:to:from:dkim-signature :date; bh=DbeIFHrEpLn8JQxVDLBFr2k4d5XfiRfZWE3PlrdRJpA=; b=mY5L1E8XMZ4wgtEY+WJxMzYvifpulSsfiE5xKRs4HVfwKYXjev+pLA/GZ1YiTHTeCV wd05PiMn0MVV7SQHlAGNeU2sIEMqYYFtiH5V/d/TsTbpWRIqRtb/cP8KXm8XH7Uz+LHr N5MTwqx+cwl2tYMqpAu1Yll3Pu8ul8TqyuxezexJPlQm7nuRNHOE389MX2kQkphvqwMm Kh3j7/aokjeJkW1q40FeH9oIVyHMRQgVcB8E7Fk5kp9JkJwceItzwZ6WEOTSYdObL1aa LRD1nmAoRXpKtddFSOY5POWEyX0TdVlt0IeSxJAUzaYXjExpuuq7vC4JQN7HE85hbJnO t+lA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=TW6bxj7F; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z22si1816818ejo.390.2020.12.16.16.50.43; Wed, 16 Dec 2020 16:51:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=TW6bxj7F; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726573AbgLQAtT (ORCPT + 99 others); Wed, 16 Dec 2020 19:49:19 -0500 Received: from mail.kernel.org ([198.145.29.99]:46832 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726380AbgLQAtT (ORCPT ); Wed, 16 Dec 2020 19:49:19 -0500 Date: Wed, 16 Dec 2020 16:48:38 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1608166119; bh=NLNYrstPfE0QbPFqmX/aq0W0aFwreKPMHKoYADup7O4=; h=From:To:Cc:Subject:In-Reply-To:References:From; b=TW6bxj7FeH+GBQc7l6QMpag7hNqnreKCz6JXMDRyWX6Iv82o0LSK1Yrp1qI031hPs bY0+t5W81WOc8RuIYMHIZTxU4vYSLMA1g+Ke+7qlOoizQWY2mGKCHVrDYNDPrMtjqB iYHu/B3jvqLDVIuIyRXwuAhm1dW1vrWgw3y9IRvzj6OubwNSeCzODL0ajDhJQiczxM ag0hHUm4iVZ+oppbwZNPTcDzINtgj9dJq4g81jb0JNXp3fFY4Pvd2NuxOMvcgbfllF 6uY0jwWGRvyz/lHS8VvWE3jEGwGaLQz5TN00KnRDXI1wcsy+9p5w25+nvheE2s1Vn6 iyP0aDd8nqMaw== From: Jakub Kicinski To: Gao Yan Cc: , , , Subject: Re: [PATCH] net: remove disc_data_lock in ppp line discipline Message-ID: <20201216164838.55f939a2@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> In-Reply-To: <20201215150054.570-1-gao.yanB@h3c.com> References: <20201215150054.570-1-gao.yanB@h3c.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 15 Dec 2020 23:00:54 +0800 Gao Yan wrote: > tty layer provide tty->ldisc_sem lock to protect tty->disc_data; > For examlpe, when cpu A is running ppp_synctty_ioctl that > hold the tty->ldisc_sem, so if cpu B calls ppp_synctty_close, > it will wait until cpu A release tty->ldisc_sem. So I think it is > unnecessary to have the disc_data_lock; > > cpu A cpu B > tty_ioctl tty_reopen > ->hold tty->ldisc_sem ->hold tty->ldisc_sem(write), failed > ->ld->ops->ioctl ->wait... > ->release tty->ldisc_sem ->wait...OK,hold tty->ldisc_sem > ->tty_ldisc_reinit > ->tty_ldisc_close > ->ld->ops->close > > Signed-off-by: Gao Yan # Form letter - net-next is closed We have already sent the networking pull request for 5.11 and therefore net-next is closed for new drivers, features, code refactoring and optimizations. We are currently accepting bug fixes only. Please repost when net-next reopens after 5.11-rc1 is cut. Look out for the announcement on the mailing list or check: http://vger.kernel.org/~davem/net-next.html RFC patches sent for review only are obviously welcome at any time.