From nobody Fri Jan 28 15:38:09 2022 X-Original-To: scsi@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4EA60198672C for ; Fri, 28 Jan 2022 15:38:09 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4JlhS10B45z4gGN for ; Fri, 28 Jan 2022 15:38:09 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DAC4D2CC39 for ; Fri, 28 Jan 2022 15:38:08 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 20SFc8PJ049962 for ; Fri, 28 Jan 2022 15:38:08 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 20SFc8XJ049961 for scsi@FreeBSD.org; Fri, 28 Jan 2022 15:38:08 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: scsi@FreeBSD.org Subject: [Bug 261387] Should cam be calling callout drain for struct cam_sim and struct cam_ed? Date: Fri, 28 Jan 2022 15:38:09 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: markj@FreeBSD.org X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: scsi@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: SCSI subsystem List-Archive: https://lists.freebsd.org/archives/freebsd-scsi List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-scsi@freebsd.org X-BeenThere: freebsd-scsi@freebsd.org MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1643384289; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=jb5tI9veEsaclDN+7N5Ixza2KkhX3Zoy6/g6AbQT2Ps=; b=QD5LehyzBW2GIpZk7Uw2arJKETQJQEiLBHoMSIDnV7xW9aCTxawuM5ae4iADcf9pdpTfLL b+g7XDCyGj75scWSd2EQwh1zO/qZBFEaNgtD1a2MyXZEgXV0STs0o0AfHC4byojEd14Dm6 yfZ3k7b0EvwMf+GnRC88mluKn3SEo4ZIS0aI4V+WfqWBofsgMzgR+yOqMGlTgPs70hd+GZ BwpN57xk06KhuSCloE7ppARW9AewilwDCz8ANYj4NROJFjOinrjWOhs6p74rbBuo61Kk45 Wd9TlYp5XekBfjwSvS60k445pqGP+3M64u+4M2mhst03LxB/Cby/evP+b/6hJQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1643384289; a=rsa-sha256; cv=none; b=wC808a08wrXKa4Q7H+u/NPqZd8k5msYwj13sICe4B3wmyJp7iWBDLzlL2exdaxA6Kiwjma 9YayW0NOvtJD8wvEvwqkF2yCmsgO22ZT5q8ZiV/nTTSxnh56Z3K6bQ32bssiwenYBLovbs 4kX1Yf0y6vjME6INYyPAhcujdwu/+Lk8FAj/bDli8SnKBAJyxXQ7u6Qh88TPdG9uV0XWMc OnCdsHGm6uy6+02wtxZfVTF2eWL8eHR4e9KD4eOwq0XiSYmkpEW5YFsTETV19/+GdKs09o F5JUDfLQrH2ABhrp8WEF0zpSis2ZWbLKxyGfhjZk5Nhacbk1JobD9yWnfyk+tw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D261387 --- Comment #3 from Mark Johnston --- (In reply to Herbie.Robinson from comment #2) "theoretical" was a bad word choice. I don't mean that this becomes a prob= lem with sufficiently large timing delays or anything like that. (At least, I can't see how it does.) Rather, this code seemingly violates the implicit contract that consumers have with the callout subsystem, that callout structures shouldn't be freed while the callout handler is running. In fac= t, I believe this is safe to do in this particular case. softclock_call_cc(), t= he function that actually invokes the callout handler, does not access the cal= lout structure after calling the handler except in two cases which do not apply = to the cam_ed callout. So while it's formally correct to drain the callout before destroying the device in cam_destroy_device(), I can't see how it would fix any observed problems. To be clear, I don't disagree with the patch. --=20 You are receiving this mail because: You are the assignee for the bug.=