Received: by 2002:a05:7412:8521:b0:e2:908c:2ebd with SMTP id t33csp865858rdf; Fri, 3 Nov 2023 19:16:01 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH9VzKAqdiR0zTessuf/CZa8pgQ1Hr5wrY11SX4FQULvdaZimTuxb76m0xGQPmFEW9WhN8P X-Received: by 2002:a17:90a:1f44:b0:280:5e0f:d1c3 with SMTP id y4-20020a17090a1f4400b002805e0fd1c3mr14635714pjy.3.1699064161507; Fri, 03 Nov 2023 19:16:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1699064161; cv=none; d=google.com; s=arc-20160816; b=Q90zJ95yCZf2P23HBud8NqPF0jmWuP8zI9BEptIiaY/VTvsuIY0IUGPJGV2MR1zNjt Y4uH/ILbKbdhHkwn6PwQiZJrUEq6BdTYMh+zcy47/C/7SY7Z/dkphsLLzEOQhtAgjlkQ E+69PV+TA+AKVFAvW4BGyNGo72HHLWdynnbMpgdgv5Lk1j7/1OB33HiaHXj/VwyUJ1Oe E2bPyBzfabpesPrsDd2c6n+pL5hl2vDLAnLzzPJARvV1tf1+JBKIodbPrdwJtmyCnjcu McYMKDI49vGftWB/YLxK4Emo75JFEJjv2WowsIf7ujvB2dIML/5P6GBHlLs7hWfELFuu uaiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=76/z41L+zk5wrCtLhnih2S9eliDBN2yItIpsN/eleis=; fh=t19YXRCU7wLe/xL/PmdbamsBaonvEzh9UiZjXlL1/RQ=; b=PQ0iqYNzo3TgIcDPDjABUuwUte8uMDLTAcJSmzDEQ7dgMKrdHFuruW1sewralgKDdD 81Thsl/ree+XubEyRJKxJaI/zec3sWvaOSUIrh2jkv/IIxkNufPxf2DPM5CZIeSqTfD2 ZJ3uwyGziisjCR6/RX9smot3j1OQSm/hInqrENJ48VeGwkDSs52nNb4x8HOSiScaT3n8 +C4lVHox8bW2ABE5CpK3aGsRRDVHLrj+YJG4+dUzK+7XuVKO5UR2VJZwhp1V5x/JnvMv lZBUC+qEqTMAd6ddrfxCBj3ywSAmICnwXDvs4i6g7iqmLkW/RlCMZ+e7jdJlcFS7mK/B EDaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=ZWksbYPt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id u17-20020a17090abb1100b002773363d105si2833952pjr.188.2023.11.03.19.16.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Nov 2023 19:16:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=ZWksbYPt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 996BB8089855; Fri, 3 Nov 2023 19:15:58 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1378217AbjKDCPk (ORCPT + 99 others); Fri, 3 Nov 2023 22:15:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57638 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1378207AbjKDCPj (ORCPT ); Fri, 3 Nov 2023 22:15:39 -0400 Received: from mail-pj1-x102b.google.com (mail-pj1-x102b.google.com [IPv6:2607:f8b0:4864:20::102b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 84AA8123; Fri, 3 Nov 2023 19:15:36 -0700 (PDT) Received: by mail-pj1-x102b.google.com with SMTP id 98e67ed59e1d1-280cd4e6f47so621565a91.1; Fri, 03 Nov 2023 19:15:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1699064136; x=1699668936; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=76/z41L+zk5wrCtLhnih2S9eliDBN2yItIpsN/eleis=; b=ZWksbYPtV11aqLJd2APoCbm/y3eFwPkJjg1WUjVR9l2RTZ6ziax+EVSKVUZ4VA/FFa NK/GG9A5fOOO+8jltup6zQvGBe23X5ovdzU8AL5w4vzk3wOb2nB/ROAwFto00jp8RG9p ruUQthpkuZYNRoOfeeRWVoeE1fu14XeohJxCFugIZOqRaBmbETRaPpQd4gAktbYdEzq5 42ocBhVqT3mqolbG5HntM1fI//WMYCawPOOjw4GrYZQbiomXvuhPpwzt+KjyPBdqX6T2 tIh5XplSAo7DQzilj5x79XtrjWiz9tCrdpcoGoRmXR72ODF45fUeI8AX5ktYpVtwOkPG XAVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699064136; x=1699668936; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=76/z41L+zk5wrCtLhnih2S9eliDBN2yItIpsN/eleis=; b=aUd8cXVEbCrD3Qr9bHhYfwcLOOErA8fP+E1jC1siloFZceJShPkBJTCfFBLBsHDrpe Xir+fNb2yTgZANfJN8h88LQXT0o0oCbpk7qyyRxNCecYEcz3ng42Pif50DBjgSS4zqAj FHXt8K/Qo/ke1QvPLdI3EYesrJR9UNkdBK2jBUS0mJD7/inIg6eMQ0qCWsPfhUaoQL6u FuEvVG32PTJPZmjr3zCaTjfNwY0HuAj6UdqhYyNAgKdZzaJYPLld9ursLMxJyWKseE+O ctS+M3yWuLwcM1d6l6BrXZ7d5xHKiYLxf23cbHkefRPgSWL/VvlFb5gH6xv6/dFcTFye 1B3w== X-Gm-Message-State: AOJu0YyTfLjKNLcmIYyOkEiC9WRyLfI3GullTKn3uRDUZ1gOKElp7QTL LstdqyVWiPduuY9s3u79zOE= X-Received: by 2002:a17:90a:fe10:b0:280:a26f:5860 with SMTP id ck16-20020a17090afe1000b00280a26f5860mr11160031pjb.1.1699064135885; Fri, 03 Nov 2023 19:15:35 -0700 (PDT) Received: from hoboy.vegasvil.org ([2601:640:8000:54:e2d5:5eff:fea5:802f]) by smtp.gmail.com with ESMTPSA id gt14-20020a17090af2ce00b00280c6f35546sm1893772pjb.49.2023.11.03.19.15.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Nov 2023 19:15:35 -0700 (PDT) Date: Fri, 3 Nov 2023 19:15:32 -0700 From: Richard Cochran To: Jeremy Cline Cc: Edward Adam Davis , habetsm.xilinx@gmail.com, davem@davemloft.net, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, reibax@gmail.com, syzbot+df3f3ef31f60781fa911@syzkaller.appspotmail.com, syzkaller-bugs@googlegroups.com Subject: Re: [PATCH net-next V2] ptp: fix corrupted list in ptp_open Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Fri, 03 Nov 2023 19:15:58 -0700 (PDT) On Fri, Nov 03, 2023 at 07:13:31PM -0700, Richard Cochran wrote: > See ptp_clock.c: > > 416 case PTP_CLOCK_EXTTS: > 417 /* Enqueue timestamp on selected queues */ > 418 list_for_each_entry(tsevq, &ptp->tsevqs, qlist) { > 419 if (test_bit((unsigned int)event->index, tsevq->mask)) > 420 enqueue_external_timestamp(tsevq, event); > 421 } > 422 wake_up_interruptible(&ptp->tsev_wq); > 423 break; And that code can be called from interrupt context. Thus the mutex won't work. It needs to be a spin lock instead. Thanks, Richard