Re: [PATCH 1/9] drm/connector: Make the drm_sysfs connector->kdev device hold a reference to the connector

2021-04-30 Thread Daniel Vetter
On Fri, Apr 30, 2021 at 3:32 PM Hans de Goede wrote: > > Hi, > > On 4/30/21 1:38 PM, Daniel Vetter wrote: > > On Fri, Apr 30, 2021 at 1:28 PM Hans de Goede wrote: > >> > >> Hi, > >> > >> On 4/29/21 9:09 PM, Daniel Vetter wrote: > >>> On Thu, Apr 29, 2021 at 02:33:17PM +0200, Hans de Goede wrote:

Re: [PATCH 1/9] drm/connector: Make the drm_sysfs connector->kdev device hold a reference to the connector

2021-04-30 Thread Hans de Goede
p.s. On 4/30/21 1:38 PM, Daniel Vetter wrote: Offtopic: > I'm also not sure why we have to use the kdev stuff here. For other > random objects we need to look up we're building that functionality on > that object. It means you need to keep another list_head around for > that lookup, but that's r

Re: [PATCH 1/9] drm/connector: Make the drm_sysfs connector->kdev device hold a reference to the connector

2021-04-30 Thread Hans de Goede
Hi, On 4/30/21 1:38 PM, Daniel Vetter wrote: > On Fri, Apr 30, 2021 at 1:28 PM Hans de Goede wrote: >> >> Hi, >> >> On 4/29/21 9:09 PM, Daniel Vetter wrote: >>> On Thu, Apr 29, 2021 at 02:33:17PM +0200, Hans de Goede wrote: Hi, On 4/29/21 2:04 PM, Daniel Vetter wrote: > On Thu,

Re: [PATCH 1/9] drm/connector: Make the drm_sysfs connector->kdev device hold a reference to the connector

2021-04-30 Thread Daniel Vetter
On Fri, Apr 30, 2021 at 1:28 PM Hans de Goede wrote: > > Hi, > > On 4/29/21 9:09 PM, Daniel Vetter wrote: > > On Thu, Apr 29, 2021 at 02:33:17PM +0200, Hans de Goede wrote: > >> Hi, > >> > >> On 4/29/21 2:04 PM, Daniel Vetter wrote: > >>> On Thu, Apr 29, 2021 at 01:54:46PM +0200, Greg Kroah-Hartma

Re: [PATCH 1/9] drm/connector: Make the drm_sysfs connector->kdev device hold a reference to the connector

2021-04-30 Thread Hans de Goede
Hi, On 4/29/21 9:09 PM, Daniel Vetter wrote: > On Thu, Apr 29, 2021 at 02:33:17PM +0200, Hans de Goede wrote: >> Hi, >> >> On 4/29/21 2:04 PM, Daniel Vetter wrote: >>> On Thu, Apr 29, 2021 at 01:54:46PM +0200, Greg Kroah-Hartman wrote: On Thu, Apr 29, 2021 at 01:40:28PM +0200, Daniel Vetter w

Re: [PATCH 1/9] drm/connector: Make the drm_sysfs connector->kdev device hold a reference to the connector

2021-04-29 Thread Daniel Vetter
On Thu, Apr 29, 2021 at 02:33:17PM +0200, Hans de Goede wrote: > Hi, > > On 4/29/21 2:04 PM, Daniel Vetter wrote: > > On Thu, Apr 29, 2021 at 01:54:46PM +0200, Greg Kroah-Hartman wrote: > >> On Thu, Apr 29, 2021 at 01:40:28PM +0200, Daniel Vetter wrote: > >>> On Wed, Apr 28, 2021 at 11:52:49PM +02

Re: [PATCH 1/9] drm/connector: Make the drm_sysfs connector->kdev device hold a reference to the connector

2021-04-29 Thread Hans de Goede
Hi, On 4/29/21 2:04 PM, Daniel Vetter wrote: > On Thu, Apr 29, 2021 at 01:54:46PM +0200, Greg Kroah-Hartman wrote: >> On Thu, Apr 29, 2021 at 01:40:28PM +0200, Daniel Vetter wrote: >>> On Wed, Apr 28, 2021 at 11:52:49PM +0200, Hans de Goede wrote: Userspace could hold open a reference to the

Re: [PATCH 1/9] drm/connector: Make the drm_sysfs connector->kdev device hold a reference to the connector

2021-04-29 Thread Hans de Goede
Hi, On 4/29/21 1:40 PM, Daniel Vetter wrote: > On Wed, Apr 28, 2021 at 11:52:49PM +0200, Hans de Goede wrote: >> Userspace could hold open a reference to the connector->kdev device, >> through e.g. holding a sysfs-atrtribute open after >> drm_sysfs_connector_remove() has been called. In this case

Re: [PATCH 1/9] drm/connector: Make the drm_sysfs connector->kdev device hold a reference to the connector

2021-04-29 Thread Daniel Vetter
On Thu, Apr 29, 2021 at 01:54:46PM +0200, Greg Kroah-Hartman wrote: > On Thu, Apr 29, 2021 at 01:40:28PM +0200, Daniel Vetter wrote: > > On Wed, Apr 28, 2021 at 11:52:49PM +0200, Hans de Goede wrote: > > > Userspace could hold open a reference to the connector->kdev device, > > > through e.g. holdi

Re: [PATCH 1/9] drm/connector: Make the drm_sysfs connector->kdev device hold a reference to the connector

2021-04-29 Thread Greg Kroah-Hartman
On Thu, Apr 29, 2021 at 01:40:28PM +0200, Daniel Vetter wrote: > On Wed, Apr 28, 2021 at 11:52:49PM +0200, Hans de Goede wrote: > > Userspace could hold open a reference to the connector->kdev device, > > through e.g. holding a sysfs-atrtribute open after > > drm_sysfs_connector_remove() has been c

Re: [PATCH 1/9] drm/connector: Make the drm_sysfs connector->kdev device hold a reference to the connector

2021-04-29 Thread Daniel Vetter
On Wed, Apr 28, 2021 at 11:52:49PM +0200, Hans de Goede wrote: > Userspace could hold open a reference to the connector->kdev device, > through e.g. holding a sysfs-atrtribute open after > drm_sysfs_connector_remove() has been called. In this case the connector > could be free-ed while the connecto

[PATCH 1/9] drm/connector: Make the drm_sysfs connector->kdev device hold a reference to the connector

2021-04-28 Thread Hans de Goede
Userspace could hold open a reference to the connector->kdev device, through e.g. holding a sysfs-atrtribute open after drm_sysfs_connector_remove() has been called. In this case the connector could be free-ed while the connector->kdev device's drvdata is still pointing to it. Give drm_connector d