All of lore.kernel.org
 help / color / mirror / Atom feed
From: bugzilla-daemon@kernel.org
To: dri-devel@lists.freedesktop.org
Subject: [Bug 219007] New: opening and closing /dev/dri/card0 in a QEMU KVM instance will shutdown system, 6.10.0-rc6+
Date: Fri, 05 Jul 2024 16:05:27 +0000	[thread overview]
Message-ID: <bug-219007-2300@https.bugzilla.kernel.org/> (raw)

https://bugzilla.kernel.org/show_bug.cgi?id=219007

            Bug ID: 219007
           Summary: opening and closing /dev/dri/card0 in a QEMU KVM
                    instance will shutdown system, 6.10.0-rc6+
           Product: Drivers
           Version: 2.5
          Hardware: All
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P3
         Component: Video(DRI - non Intel)
          Assignee: drivers_video-dri@kernel-bugs.osdl.org
          Reporter: colin.i.king@gmail.com
        Regression: No

The following code when run as root on a Debian sid amd64 server running in
virt-manager (KVM QEMU) will shut the system down with 6.10.0-rc6.  The fork()
is required to cause racing on the open/close on /dev/dri/card0

#include <fcntl.h>
#include <unistd.h>

int main(void)
{
         pid_t pid = fork();

         while (1) {
                int fd;

                fd = openat(AT_FDCWD, "/dev/dri/card0",
O_WRONLY|O_NONBLOCK|O_SYNC);
                close(fd);
         }
}

This was originally found using: while true; do sudo ./stress-ng  --dev 4
--dev-file /dev/dri/card0 -t 5; done and narrowed down to the above reproducer.
(cf: https://github.com/ColinIanKing/stress-ng/issues/407 )

This does not occur on pre 6.10 kernels, so it looks like a 6.10 regression.

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

             reply	other threads:[~2024-07-05 16:05 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-05 16:05 bugzilla-daemon [this message]
2024-07-05 16:10 ` [Bug 219007] opening and closing /dev/dri/card0 in a QEMU KVM instance will shutdown system, 6.10.0-rc6+ bugzilla-daemon
2024-07-05 16:14 ` bugzilla-daemon
2024-07-09  8:36 ` bugzilla-daemon
2024-07-09  8:37 ` bugzilla-daemon
2024-07-09  8:41 ` bugzilla-daemon
2024-07-23 15:04 ` bugzilla-daemon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-219007-2300@https.bugzilla.kernel.org/ \
    --to=bugzilla-daemon@kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.