Re: [PATCH] nouveau/dmem: handle kcalloc() allocation failure

2024-03-04 Thread Jani Nikula
On Sun, 03 Mar 2024, Timur Tabi wrote: > On Sun, Mar 3, 2024 at 4:46 AM Duoming Zhou wrote: >> >> The kcalloc() in nouveau_dmem_evict_chunk() will return null if >> the physical memory has run out. As a result, if we dereference >> src_pfns, dst_pfns or dma_addrs, the null pointer dereference

Re: [PATCH] [v4] nouveau: add command-line GSP-RM registry support

2024-03-04 Thread Danilo Krummrich
On 2/20/24 22:58, Timur Tabi wrote: Add the NVreg_RegistryDwords command line parameter, which allows specifying additional registry keys to be sent to GSP-RM. This allows additional configuration, debugging, and experimentation with GSP-RM, which uses these keys to alter its behavior. Note

[PATCH 1/2] drm/nouveau: fix stale locked mutex in nouveau_gem_ioctl_pushbuf

2024-03-04 Thread Karol Herbst
If VM_BIND is enabled on the client the legacy submission ioctl can't be used, however if a client tries to do so regardless it will return an error. In this case the clients mutex remained unlocked leading to a deadlock inside nouveau_drm_postclose or any other nouveau ioctl call. Fixes:

[PATCH 2/2] drm/nouveau: move more missing UAPI bits

2024-03-04 Thread Karol Herbst
Those are already de-facto UAPI, so let's just move it into the uapi header. Signed-off-by: Karol Herbst --- drivers/gpu/drm/nouveau/nouveau_abi16.c | 20 +++- drivers/gpu/drm/nouveau/nouveau_abi16.h | 12 include/uapi/drm/nouveau_drm.h | 22

Patch "drm/nouveau: don't fini scheduler before entity flush" has been added to the 6.7-stable tree

2024-03-04 Thread gregkh
This is a note to let you know that I've just added the patch titled drm/nouveau: don't fini scheduler before entity flush to the 6.7-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is:

Re: [PATCH stable v6.7] drm/nouveau: don't fini scheduler before entity flush

2024-03-04 Thread Greg KH
On Mon, Mar 04, 2024 at 06:01:46PM +0100, Danilo Krummrich wrote: > This bug is present in v6.7 only, since the scheduler design has been > re-worked in v6.8. > > Client scheduler entities must be flushed before an associated GPU > scheduler is teared down. Otherwise the entitiy might still hold

Re: [PATCH stable v6.7] drm/nouveau: don't fini scheduler before entity flush

2024-03-04 Thread Greg KH
On Mon, Mar 04, 2024 at 06:01:46PM +0100, Danilo Krummrich wrote: > This bug is present in v6.7 only, since the scheduler design has been > re-worked in v6.8. Now queued up, thanks. greg k-h

Re: [PATCH stable v6.7] drm/nouveau: don't fini scheduler before entity flush

2024-03-04 Thread Greg KH
On Mon, Mar 04, 2024 at 07:10:56PM +0100, Danilo Krummrich wrote: > On 3/4/24 18:55, Greg KH wrote: > > On Mon, Mar 04, 2024 at 06:01:46PM +0100, Danilo Krummrich wrote: > > > Cc: # v6.7 only > > You say 6.7 only, but this commit is in 6.6, so why not 6.6 also? > > Good catch, I was sure I

Re: [PATCH 1/2] nouveau: lock the client object tree.

2024-03-04 Thread Danilo Krummrich
On 3/1/24 04:42, Dave Airlie wrote: From: Dave Airlie It appears the client object tree has no locking unless I've missed something else. Fix races around adding/removing client objects, mostly vram bar mappings. 4562.099306] general protection fault, probably for non-canonical address

Re: [PATCH stable v6.7] drm/nouveau: don't fini scheduler before entity flush

2024-03-04 Thread Danilo Krummrich
On 3/4/24 18:55, Greg KH wrote: On Mon, Mar 04, 2024 at 06:01:46PM +0100, Danilo Krummrich wrote: Cc: # v6.7 only You say 6.7 only, but this commit is in 6.6, so why not 6.6 also? Good catch, I was sure I originally merged this for 6.7. This fix should indeed be applied to 6.6 as well.

Patch "drm/nouveau: don't fini scheduler before entity flush" has been added to the 6.6-stable tree

2024-03-04 Thread gregkh
This is a note to let you know that I've just added the patch titled drm/nouveau: don't fini scheduler before entity flush to the 6.6-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is:

[PATCH stable v6.7] drm/nouveau: don't fini scheduler before entity flush

2024-03-04 Thread Danilo Krummrich
This bug is present in v6.7 only, since the scheduler design has been re-worked in v6.8. Client scheduler entities must be flushed before an associated GPU scheduler is teared down. Otherwise the entitiy might still hold a pointer to the scheduler's runqueue which is freed at scheduler tear down

Re: [PATCH 2/2] drm/nouveau: move more missing UAPI bits

2024-03-04 Thread Lyude Paul
Reviewed-by: Lyude Paul On Mon, 2024-03-04 at 19:31 +0100, Karol Herbst wrote: > Those are already de-facto UAPI, so let's just move it into the uapi > header. > > Signed-off-by: Karol Herbst > --- > drivers/gpu/drm/nouveau/nouveau_abi16.c | 20 +++- >

Re: [PATCH 1/2] drm/nouveau: fix stale locked mutex in nouveau_gem_ioctl_pushbuf

2024-03-04 Thread Lyude Paul
Reviewed-by: Lyude Paul On Mon, 2024-03-04 at 19:31 +0100, Karol Herbst wrote: > If VM_BIND is enabled on the client the legacy submission ioctl can't be > used, however if a client tries to do so regardless it will return an > error. In this case the clients mutex remained unlocked leading to a