Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1051074ybh; Tue, 21 Jul 2020 14:32:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxWP+uGGp58JSIyB4eb6esUiSmS4XkKLEFsSBgCsY8vfBLNLPgNDMr3qg6cnWqSEODHles1 X-Received: by 2002:a17:906:9354:: with SMTP id p20mr26250125ejw.187.1595367119868; Tue, 21 Jul 2020 14:31:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595367119; cv=none; d=google.com; s=arc-20160816; b=WqBm4ZVh9Y0y1kCsJFq4qTpzdUL6pII+1zeFAhGOFL96rDXYyOfkRNnHh4B9LJA3VC FVUQfeHL3JjQmLsMJvnLhuztDLiNYVWlORrp9Aa0GCgo/Y4qN9ULvWrz7eywNZdKrTIZ /gSHfqWUDxFzqilvPzBo7InmgKh0PvppYxHl1MYbr68lAm8icgfhn59m79x/jYztHRyA cc8Bc+s1GCH6mf4Z+UN2avLusSx4UHZuYBdQUsosKTrLzRoPAs/umZbkA6ldSMBKH5w4 g0DzEZZm7dA276bf95N4vCX0Pnk9zWbkwirYCreUdt7rulQT2bWBSGrk7Q01jbZAs11H 7rpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :mime-version:dkim-signature; bh=nu6TKgtV3qURpGjBvNFV6IMyJvIIBzCD7ImtPQ6thtU=; b=yabsSWHcXjhFRSgCbMe7dNiR6UarDXvxtmduS270rSXDfigcQRmBcPYGfX9iptmTdx Hg1ZeRm1UK2ZZ/GmVRp3MX/GTTskViBpZNNj4mL3z9vZk9rX8byPO5l0VKvmXY+2Q8AX kFECU9/M7TqmN6xtyA09UuoBF+n9mGdQo7S749BC2+9pCekrkyP7d8Bq40O0vqwyKWUn Hol8i2jbPYdAjRQWlXGI8ktu8vpQSxzJaN6mxEglTMIZZhds4LludIZ/qIpZ+9RqCgjH pWnUVCudEGSz3nyEjpAT5p+2OwKdzTZMQ7IQ4ZqRtQ+DNYU2wF48DO6BL8iEf8ye8FZZ 2Lxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=QDNONVZQ; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s3si12895579edy.157.2020.07.21.14.31.36; Tue, 21 Jul 2020 14:31:59 -0700 (PDT) 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=@gmail.com header.s=20161025 header.b=QDNONVZQ; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731199AbgGUVbD (ORCPT + 99 others); Tue, 21 Jul 2020 17:31:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35650 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730654AbgGUVbC (ORCPT ); Tue, 21 Jul 2020 17:31:02 -0400 Received: from mail-lf1-x12f.google.com (mail-lf1-x12f.google.com [IPv6:2a00:1450:4864:20::12f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 228DDC061794 for ; Tue, 21 Jul 2020 14:31:02 -0700 (PDT) Received: by mail-lf1-x12f.google.com with SMTP id u12so142989lff.2 for ; Tue, 21 Jul 2020 14:31:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to:cc; bh=nu6TKgtV3qURpGjBvNFV6IMyJvIIBzCD7ImtPQ6thtU=; b=QDNONVZQPw1ixumkJyQEWmNEfSatUjQbSQ8D3NJFNgq+4HuF65m2fLcvaplwjBJpVQ N1Lj7refGZWfqX3ijDeM5tJLcbUmpr3Ji8MLMSnRESQsDP7TVka0LloXDC/EM2qCJ9/2 HC1zMTOCqiMFBCZR8obJXWrCNi/Lvtz7ZEHQRVUndSEgtNDT5KEEXVsS4ac6KcsyOIIh qvTbX8FbMv24IXV/eP1THWQly1XhuIy0q9K0TnRvRKTMDmjZwIQwHODXJ4jjclzfoZir RdDpUmZJKFSRiZJLABmGogt7dNQXnn+Y36jY8IWvB4Q6lqt3IshxFObp3i/H2RBQ0diI yKcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc; bh=nu6TKgtV3qURpGjBvNFV6IMyJvIIBzCD7ImtPQ6thtU=; b=XThp7DgWlws/lor7ArJrNzb87vS9ZeAQpkvh6uv60MwTauESdGB9uL8lQtE6L/KOA0 uwki+59LYEkd0riy2/Mp980Xw4zofWmUzLcQ2JB9HEYRFxbBXlP738R+zFIYHBb+bI2K KrGkD1Rus4+uNUABCj+eljmIzJxIYhS/oWge3ukYTwENoBr4m2BAVpSo2o6o35wDg+BZ FySZT1neh/tMhDbeuJEqoGVliS7ptEZFyPUgOeqzQ7IAHIJPmclH+H5IOCTVS7M8rpGL bEn3Juc0hRzh1UyUtOZrrJ60Z51sIwgWJ+i84use32Cv2HGYuP85ejYYzS4oaG6OD7Il ty8g== X-Gm-Message-State: AOAM5302s262s2FO7Qxv+KlgT9oUjsYQ7XKT5es0No3w7imdwot01Jd/ nTH+cA4ka41PG4WWJNE38/fELdr2kp3cJylqnw== X-Received: by 2002:ac2:58d5:: with SMTP id u21mr4307530lfo.31.1595367060496; Tue, 21 Jul 2020 14:31:00 -0700 (PDT) MIME-Version: 1.0 From: Madhuparna Bhowmik Date: Wed, 22 Jul 2020 03:00:49 +0530 Message-ID: Subject: Regarding bug in phantom.c To: jirislaby@gmail.com, arnd@arndb.de Cc: andrianov , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, This is regarding a race-condition related bug found in phantom.c by the Linux Driver Verification Project. dev->status is accessed in phantom_release with dev->open_lock and in phantom_isr() using dev->regs_lock therefore there can be a race between updating dev->status in phantom_release() and phantom_status() and reading it's value in phantom_isr(). I don't think there is any particular lock protecting dev->status (like open_lock and regs_lock are for dev->opened and dev->oregs) and also not sure why exactly dev->status is updated in phantom_status() and just after that updated again in phantom_release(). It will be great if you could look into this bug. Thank you, Madhuparna