[PATCH v2 2/2] drm/shmem-helper: Avoid vm_open error paths

2022-11-30 Thread Rob Clark
From: Rob Clark vm_open() is not allowed to fail. Fortunately we are guaranteed that the pages are already pinned, thanks to the initial mmap which is now being cloned into a forked process, and only need to increment the refcnt. So just increment it directly. Previously if a signal was delive

Re: [PATCH 2/2] drm/shmem-helper: Avoid vm_open error paths

2022-11-30 Thread Daniel Vetter
On Tue, Nov 29, 2022 at 12:02:42PM -0800, Rob Clark wrote: > From: Rob Clark > > vm_open() is not allowed to fail. Fortunately we are guaranteed that > the pages are already pinned, and only need to increment the refcnt. So > just increment it directly. Please mention hare that the only issue i

Re: [2/2] drm/shmem-helper: Avoid vm_open error paths

2022-11-30 Thread Daniel Vetter
On Tue, Nov 29, 2022 at 12:47:42PM -0800, Rob Clark wrote: > On Tue, Nov 29, 2022 at 12:32 PM Guenter Roeck wrote: > > > > On Tue, Nov 29, 2022 at 12:02:42PM -0800, Rob Clark wrote: > > > From: Rob Clark > > > > > > vm_open() is not allowed to fail. Fortunately we are guaranteed that > > > the p

Re: [2/2] drm/shmem-helper: Avoid vm_open error paths

2022-11-29 Thread Guenter Roeck
On 11/29/22 12:47, Rob Clark wrote: On Tue, Nov 29, 2022 at 12:32 PM Guenter Roeck wrote: On Tue, Nov 29, 2022 at 12:02:42PM -0800, Rob Clark wrote: From: Rob Clark vm_open() is not allowed to fail. Fortunately we are guaranteed that the pages are already pinned, and only need to increment

Re: [2/2] drm/shmem-helper: Avoid vm_open error paths

2022-11-29 Thread Rob Clark
On Tue, Nov 29, 2022 at 12:32 PM Guenter Roeck wrote: > > On Tue, Nov 29, 2022 at 12:02:42PM -0800, Rob Clark wrote: > > From: Rob Clark > > > > vm_open() is not allowed to fail. Fortunately we are guaranteed that > > the pages are already pinned, and only need to increment the refcnt. So > > j

Re: [2/2] drm/shmem-helper: Avoid vm_open error paths

2022-11-29 Thread Guenter Roeck
On Tue, Nov 29, 2022 at 12:02:42PM -0800, Rob Clark wrote: > From: Rob Clark > > vm_open() is not allowed to fail. Fortunately we are guaranteed that > the pages are already pinned, and only need to increment the refcnt. So > just increment it directly. I don't know anything about drm or gem,

[PATCH 2/2] drm/shmem-helper: Avoid vm_open error paths

2022-11-29 Thread Rob Clark
From: Rob Clark vm_open() is not allowed to fail. Fortunately we are guaranteed that the pages are already pinned, and only need to increment the refcnt. So just increment it directly. Fixes: 2194a63a818d ("drm: Add library for shmem backed GEM objects") Cc: sta...@vger.kernel.org Signed-off-b