A lack of check for copy-on-write (COW) mapping in `drm gem shmem mmap` allows users to call `mmap` with `PROT WRITE` and `MAP PRIVATE` flag, causing a kernel panic due to `BUG ON` in `vmf insert pfn prot`. The issue can be reproduced by calling `mmap` with specific parameters, such as `void *ptr = mmap(0, size, PROT WRITE, MAP PRIVATE, fd, mmap offset);`. This bug affects all drm drivers using default shmem helpers.