Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1684940
| From | Daniel Vetter <daniel@ffwll.ch> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] drm: inhibit drm drivers register to uninitialized drm core |
| Date | 2017-07-11 12:10 +0200 |
| Message-ID | <u20he-Vi-39@gated-at.bofh.it> (permalink) |
| References | <u15LX-7rv-5@gated-at.bofh.it> <u1APM-1zU-9@gated-at.bofh.it> <u1B97-1VK-7@gated-at.bofh.it> <u1Li9-8qN-5@gated-at.bofh.it> <u1ZXR-zq-17@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Tue, Jul 11, 2017 at 11:41 AM, Greg Kroah-Hartman <gregkh@linuxfoundation.org> wrote: > On Mon, Jul 10, 2017 at 08:00:37PM +0200, Daniel Vetter wrote: >> On Mon, Jul 10, 2017 at 9:14 AM, Alexandru Moise >> <00moses.alexander00@gmail.com> wrote: >> > On Mon, Jul 10, 2017 at 08:52:46AM +0200, Daniel Vetter wrote: >> >> On Sat, Jul 08, 2017 at 11:43:52PM +0200, Alexandru Moise wrote: >> >> > If the DRM core fails to init for whatever reason, ensure that >> >> > no driver ever calls drm_dev_register(). >> >> > >> >> > This is best done at drm_dev_init() as it covers drivers that call >> >> > drm_dev_alloc() as well as drivers that prefer to embed struct >> >> > drm_device into their own device struct and call drm_dev_init() >> >> > themselves. >> >> > >> >> > In my case I had so many dynamic device majors used that the major >> >> > number for DRM (226) was stolen, causing DRM core init to fail after >> >> > failing to register a chrdev, and ultimately calling debugfs_remove() >> >> > on drm_debugfs_root in drm_core_exit(). > > Note, there are patches in my "to-apply" queue to prevent that from > happening, that should show up in 4.14-rc1. So that shouldn't be an > issue in the future. > >> I feared that would be the answer :-/ Still feels funny that everyone >> will need to hand-roll this, or does everyone simply assume that their >> subsystem's module_init never fails? > > How would we not "hand-roll" this? Every subsystem works a bit > differently. But if you can think of a way to make this generic, that > would be great... Well there's so much almost-magic helper/support code that very often just asking the right people gives me the answer. Sounds like this is a case where we haven't yet invented that magic, and I don't have a bright idea either. I'll Apply Alex' patch. Thanks, Daniel -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] drm: inhibit drm drivers register to uninitialized drm core Alexandru Moise <00moses.alexander00@gmail.com> - 2017-07-08 23:50 +0200
Re: [PATCH] drm: inhibit drm drivers register to uninitialized drm core Daniel Vetter <daniel@ffwll.ch> - 2017-07-10 09:00 +0200
Re: [PATCH] drm: inhibit drm drivers register to uninitialized drm core Alexandru Moise <00moses.alexander00@gmail.com> - 2017-07-10 09:20 +0200
Re: [PATCH] drm: inhibit drm drivers register to uninitialized drm core Daniel Vetter <daniel@ffwll.ch> - 2017-07-10 20:10 +0200
Re: [PATCH] drm: inhibit drm drivers register to uninitialized drm core Alexandru Moise <00moses.alexander00@gmail.com> - 2017-07-10 22:00 +0200
Re: [PATCH] drm: inhibit drm drivers register to uninitialized drm core Daniel Vetter <daniel@ffwll.ch> - 2017-07-11 10:00 +0200
Re: [PATCH] drm: inhibit drm drivers register to uninitialized drm core Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-07-11 11:50 +0200
Re: [PATCH] drm: inhibit drm drivers register to uninitialized drm core Daniel Vetter <daniel@ffwll.ch> - 2017-07-11 12:10 +0200
Re: [PATCH] drm: inhibit drm drivers register to uninitialized drm core Daniel Vetter <daniel@ffwll.ch> - 2017-07-11 12:10 +0200
csiph-web