Re: [PATCH] drm: drm_bufs: Error out if 'dev->agp' is a null pointer

2022-03-22 Thread Zheyu Ma
On Tue, Mar 22, 2022 at 10:27 PM Daniel Vetter wrote: > > On Mon, Mar 21, 2022 at 09:02:47PM +0800, Zheyu Ma wrote: > > On Thu, Mar 17, 2022 at 6:49 PM Daniel Vetter wrote: > > > > > > On Fri, Mar 11, 2022 at 07:23:02AM +, Zheyu Ma wrote: > > > > The user program can control the 'drm_buf_desc

Re: [PATCH] drm: drm_bufs: Error out if 'dev->agp' is a null pointer

2022-03-22 Thread Daniel Vetter
On Mon, Mar 21, 2022 at 09:02:47PM +0800, Zheyu Ma wrote: > On Thu, Mar 17, 2022 at 6:49 PM Daniel Vetter wrote: > > > > On Fri, Mar 11, 2022 at 07:23:02AM +, Zheyu Ma wrote: > > > The user program can control the 'drm_buf_desc::flags' via ioctl system > > > call and enter the function drm_leg

Re: [PATCH] drm: drm_bufs: Error out if 'dev->agp' is a null pointer

2022-03-21 Thread Zheyu Ma
On Thu, Mar 17, 2022 at 6:49 PM Daniel Vetter wrote: > > On Fri, Mar 11, 2022 at 07:23:02AM +, Zheyu Ma wrote: > > The user program can control the 'drm_buf_desc::flags' via ioctl system > > call and enter the function drm_legacy_addbufs_agp(). If the driver > > doesn't initialize the agp reso

Re: [PATCH] drm: drm_bufs: Error out if 'dev->agp' is a null pointer

2022-03-17 Thread Daniel Vetter
On Fri, Mar 11, 2022 at 07:23:02AM +, Zheyu Ma wrote: > The user program can control the 'drm_buf_desc::flags' via ioctl system > call and enter the function drm_legacy_addbufs_agp(). If the driver > doesn't initialize the agp resources, the driver will cause a null > pointer dereference. > >

[PATCH] drm: drm_bufs: Error out if 'dev->agp' is a null pointer

2022-03-10 Thread Zheyu Ma
The user program can control the 'drm_buf_desc::flags' via ioctl system call and enter the function drm_legacy_addbufs_agp(). If the driver doesn't initialize the agp resources, the driver will cause a null pointer dereference. The following log reveals it: general protection fault, probably f