Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp2793351lqt; Tue, 23 Apr 2024 01:28:40 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVzv0g1Hww6+MLKTKEXYVPPjJX+41h6wz+BOKDRZGn9O6elvbyLXr9z4zZUI+B6RkeweXPhnx1+V0mKhSkbK5SNmeyZMtR45gVShJzpCw== X-Google-Smtp-Source: AGHT+IF/SWuI1ShiMmiX+RyABqHVBPDQfCZaOLApoMWBuzOIn5TMOXKOw/kIY7r3A47pCYqPd0aJ X-Received: by 2002:a17:90a:680e:b0:2a2:dcbd:9f01 with SMTP id p14-20020a17090a680e00b002a2dcbd9f01mr10710981pjj.38.1713860920469; Tue, 23 Apr 2024 01:28:40 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713860920; cv=pass; d=google.com; s=arc-20160816; b=OcFFPi24U+MT12MqRChJHPMuIPh/p0vhTGh1r0RLnMcv1+e50BHUuCruvO9F5INLWL Yfv7N55kQM5Ma6RpfD5FqQGHPX2SwyeI2zypVIGxnKOTwCmidF/B/x5GOAh/I+80NGcp pqr12JApYGCkjyXEXFVeF8Lt6PWx0xo33V8cvW7OaYZpBjJBJy1w2UoU2w+TPeYtzSkK MISRrmFeyJ49WBwJywgJxP8rT0XIJjU6ocF6VR02JICf4Jhj3th198Jgp2FuF9soLHY3 +E02sAwfTUO1drgiqFDv/NmSqBFUwPESM8QCgmnljlmW1US0hFcbOgqmQL56T208raPq ZUIg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=thread-index:thread-topic:content-transfer-encoding:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:subject :references:in-reply-to:message-id:cc:to:from:date; bh=PMfy89R+1zueDcez+T8fuS2gCg5z0xhHRL2bNInR0Ew=; fh=SkSE0yIt9jRMQkEMd9Fw8K5MnTX0d70sI/ub/yGDGNw=; b=JfH+RrE4wTWfOjb6OGMa/4YdwHKBaO4cWh8FriYlibfxHbRCNZONqHVSkmQ6eKDa+7 oSOiP3rd432+5hg7JsncNlV6nRZLFsQ74HKPbozgfRPW8Gx61imLUpIVqeFte4VnQrH6 HT5CMuTKGAuMaxzCt/htdIvcccSrJhYcfEUHYpg4mjx9GwBQQVq1q5BWfiFhYoeY2Fp0 a1qJSdV+phHhb9lXzbSVxRyDDH5XrxM6fpHa4y4KphN8Dl7vuBy/MMtVJhLhk9ZqVNDd A7fQN4V0eY2QYCf1slln46xYCeXJZRoHS/qscqlYbBM8M2b1K168nFUoz7hjaBmYZFQw 0CCg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-154661-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-154661-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id k62-20020a17090a3ec400b002a47df8bd7bsi9388244pjc.135.2024.04.23.01.28.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Apr 2024 01:28:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-154661-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-154661-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-154661-linux.lists.archive=gmail.com@vger.kernel.org" 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 2E870B21051 for ; Tue, 23 Apr 2024 08:11:19 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 865114D58E; Tue, 23 Apr 2024 08:11:12 +0000 (UTC) Received: from lithops.sigma-star.at (lithops.sigma-star.at [195.201.40.130]) (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 E821844C8F for ; Tue, 23 Apr 2024 08:11:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.201.40.130 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713859872; cv=none; b=CsG2RpP7O6zDRSmuCNhnNGFXcWeT+mkWq/zDIawIA+gv/WXHQy3qYELAGSq6p5fEGEhmUkQjISyNKGLao4ryvNP7Zo2A2VL5Pv2ITfBl9glBtROP2dWZfWqB34Iq1oGNYD+6LQBBlSA8kleHHjpGPQA49F0QusS+j/nuA2GaS6A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713859872; c=relaxed/simple; bh=PMfy89R+1zueDcez+T8fuS2gCg5z0xhHRL2bNInR0Ew=; h=Date:From:To:Cc:Message-ID:In-Reply-To:References:Subject: MIME-Version:Content-Type; b=hX5ubmUeTt9UnspSDpLBbS5+0VE4rlNrXOxTeXfUaXlG1zfNFWtLgvSzH6HvhgbVaRVGjt9Xz6j7lMfGzoTvYA+pmvhmpOkW18grCeFYvJ5H+6qwBFG0/Ax6iyGG4BTQw+QhkFbmqWs+COZ33Pdx9J7dDk+YHEkx3K9+rqfVD2A= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=nod.at; spf=fail smtp.mailfrom=nod.at; arc=none smtp.client-ip=195.201.40.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=nod.at Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=nod.at Received: from localhost (localhost [127.0.0.1]) by lithops.sigma-star.at (Postfix) with ESMTP id 8F901647A83B; Tue, 23 Apr 2024 10:11:04 +0200 (CEST) Received: from lithops.sigma-star.at ([127.0.0.1]) by localhost (lithops.sigma-star.at [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id gstg3scYW05B; Tue, 23 Apr 2024 10:11:03 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by lithops.sigma-star.at (Postfix) with ESMTP id D933C647A83E; Tue, 23 Apr 2024 10:11:03 +0200 (CEST) Received: from lithops.sigma-star.at ([127.0.0.1]) by localhost (lithops.sigma-star.at [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id gvF2eYIkDevt; Tue, 23 Apr 2024 10:11:03 +0200 (CEST) Received: from lithops.sigma-star.at (lithops.sigma-star.at [195.201.40.130]) by lithops.sigma-star.at (Postfix) with ESMTP id ACD99647A81C; Tue, 23 Apr 2024 10:11:03 +0200 (CEST) Date: Tue, 23 Apr 2024 10:11:03 +0200 (CEST) From: Richard Weinberger To: Roberto Sassu Cc: Johannes Berg , anton ivanov , linux-kernel , linux-um , Roberto Sassu Message-ID: <539232323.17201.1713859863502.JavaMail.zimbra@nod.at> In-Reply-To: <15d5da65079d072856ef5e8d88040df2095bb6b7.camel@huaweicloud.com> References: <20240307104926.3531358-1-roberto.sassu@huaweicloud.com> <1743ad022502d64042fa7db4d847a988bb90cbdc.camel@sipsolutions.net> <15d5da65079d072856ef5e8d88040df2095bb6b7.camel@huaweicloud.com> Subject: Re: [PATCH] um: Add winch to winch_handlers before registering winch IRQ 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=utf-8 Content-Transfer-Encoding: quoted-printable X-Mailer: Zimbra 8.8.12_GA_3807 (ZimbraWebClient - FF97 (Linux)/8.8.12_GA_3809) Thread-Topic: Add winch to winch_handlers before registering winch IRQ Thread-Index: qqHtS+MauW85VnvROeFWmuL67kgQcQ== ----- Urspr=C3=BCngliche Mail ----- > Von: "Roberto Sassu" > An: "Johannes Berg" , "richard" , "anton ivanov" > > CC: "linux-kernel" , "linux-um" , "Roberto Sassu" > > Gesendet: Dienstag, 23. April 2024 09:22:31 > Betreff: Re: [PATCH] um: Add winch to winch_handlers before registering w= inch IRQ > On Thu, 2024-03-28 at 09:25 +0100, Johannes Berg wrote: >> On Thu, 2024-03-07 at 11:49 +0100, Roberto Sassu wrote: >> > From: Roberto Sassu >> >=20 >> > Registering a winch IRQ is racy, an interrupt may occur before the win= ch is >> > added to the winch_handlers list. >> >=20 >> > If that happens, register_winch_irq() adds to that list a winch that i= s >> > scheduled to be (or has already been) freed, causing a panic later in >> > winch_cleanup(). >> >=20 >> > Avoid the race by adding the winch to the winch_handlers list before >> > registering the IRQ, and rolling back if um_request_irq() fails. >> >=20 >>=20 >> Reviewed-by: Johannes Berg >=20 > Thank you! Richard, are you going to pick this up? Yes, it's already in my local queue. Thanks, //richard