Skip to contentSkip to conversation

idr_remove called for id=0 which is not allocated

PATCH In review Alessandro Guido 4 participants 8 messages Sep 22, 2010 – Sep 23, 2010

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

I have this traces in my logs (full dmesg attached).

idr_remove called for id=0 which is not allocated.
Pid: 1136, comm: Xorg Not tainted 2.6.36-rc5-49-gc79bd89 #1

Call Trace:
 [<c1379e16>] ? printk+0x18/0x1a
 [<c113b8f3>] idr_remove+0x73/0x1c0
 [<c11b8d6f>] drm_mode_object_put+0x2f/0x50
 [<c11b8f6e>] drm_mode_destroy+0xe/0x20
 [<c11eb24b>] nouveau_connector_get_modes+0x2b/0x390
 [<c1185b6f>] ? acpi_lid_open+0x22/0x3c
 [<c103800b>] ? queue_delayed_work+0x1b/0x30
 [<c11abf34>] drm_helper_probe_single_connector_modes+0xc4/0x360
 [<c11bb6a7>] drm_mode_getconnector+0x2a7/0x350
 [<c11b00d2>] drm_ioctl+0x1c2/0x4b0
 [<c1068071>] ? filemap_fault+0x81/0x3c0
 [<c11bb400>] ? drm_mode_getconnector+0x0/0x350
 [<c107bedf>] ? handle_mm_fault+0x13f/0x670
 [<c11aff10>] ? drm_ioctl+0x0/0x4b0
 [<c109c90d>] do_vfs_ioctl+0x7d/0x5f0
 [<c101a14c>] ? do_page_fault+0x17c/0x3c0
 [<c108fc6d>] ? vfs_write+0xfd/0x140
 [<c108f1c0>] ? do_sync_write+0x0/0xe0
 [<c109ceb9>] sys_ioctl+0x39/0x60
 [<c1002b90>] sysenter_do_call+0x12/0x26
idr_remove called for id=0 which is not allocated.
Pid: 1136, comm: Xorg Not tainted 2.6.36-rc5-49-gc79bd89 #1
Call Trace:
 [<c1379e16>] ? printk+0x18/0x1a
 [<c113b8f3>] idr_remove+0x73/0x1c0
 [<c11b8d6f>] drm_mode_object_put+0x2f/0x50
 [<c11b8f6e>] drm_mode_destroy+0xe/0x20
 [<c11eb24b>] nouveau_connector_get_modes+0x2b/0x390
 [<c1185b6f>] ? acpi_lid_open+0x22/0x3c
 [<c103800b>] ? queue_delayed_work+0x1b/0x30
 [<c11abf34>] drm_helper_probe_single_connector_modes+0xc4/0x360
 [<c11bb6a7>] drm_mode_getconnector+0x2a7/0x350
 [<c11b00d2>] drm_ioctl+0x1c2/0x4b0
 [<c1068071>] ? filemap_fault+0x81/0x3c0
 [<c11bb400>] ? drm_mode_getconnector+0x0/0x350
 [<c107bedf>] ? handle_mm_fault+0x13f/0x670
 [<c11aff10>] ? drm_ioctl+0x0/0x4b0
 [<c109c90d>] do_vfs_ioctl+0x7d/0x5f0
 [<c101a14c>] ? do_page_fault+0x17c/0x3c0
 [<c108fc6d>] ? vfs_write+0xfd/0x140
 [<c108f1c0>] ? do_sync_write+0x0/0xe0
 [<c109ceb9>] sys_ioctl+0x39/0x60
 [<c1002b90>] sysenter_do_call+0x12/0x26

[drm] nouveau 0000:01:00.0: Allocating FIFO number 1
[drm] nouveau 0000:01:00.0: nouveau_channel_alloc: initialised FIFO 1 idr_remove called for id=0 which is not allocated.
Pid: 1136, comm: Xorg Not tainted 2.6.36-rc5-49-gc79bd89 #1

Call Trace:
 [<c1379e16>] ? printk+0x18/0x1a
 [<c113b8f3>] idr_remove+0x73/0x1c0
 [<c11b8d6f>] drm_mode_object_put+0x2f/0x50
 [<c11b8f6e>] drm_mode_destroy+0xe/0x20
 [<c11eb24b>] nouveau_connector_get_modes+0x2b/0x390
 [<c1185b6f>] ? acpi_lid_open+0x22/0x3c
 [<c103800b>] ? queue_delayed_work+0x1b/0x30
 [<c11abf34>] drm_helper_probe_single_connector_modes+0xc4/0x360
 [<c11bb6a7>] drm_mode_getconnector+0x2a7/0x350
 [<c12ed55a>] ? __kfree_skb+0x3a/0x90
 [<c11b00d2>] drm_ioctl+0x1c2/0x4b0
 [<c11bb400>] ? drm_mode_getconnector+0x0/0x350
 [<c108f344>] ? do_sync_read+0xa4/0xe0
 [<c107bfa1>] ? handle_mm_fault+0x201/0x670
 [<c11aff10>] ? drm_ioctl+0x0/0x4b0
 [<c109c90d>] do_vfs_ioctl+0x7d/0x5f0
 [<c101a14c>] ? do_page_fault+0x17c/0x3c0
 [<c108fe96>] ? vfs_read+0xf6/0x140
 [<c109ceb9>] sys_ioctl+0x39/0x60
 [<c1002b90>] sysenter_do_call+0x12/0x26
idr_remove called for id=0 which is not allocated.
Pid: 1136, comm: Xorg Not tainted 2.6.36-rc5-49-gc79bd89 #1
Call Trace:
 [<c1379e16>] ? printk+0x18/0x1a
 [<c113b8f3>] idr_remove+0x73/0x1c0
 [<c11b8d6f>] drm_mode_object_put+0x2f/0x50
 [<c11b8f6e>] drm_mode_destroy+0xe/0x20
 [<c11eb24b>] nouveau_connector_get_modes+0x2b/0x390
 [<c1185b6f>] ? acpi_lid_open+0x22/0x3c
 [<c103800b>] ? queue_delayed_work+0x1b/0x30
 [<c11abf34>] drm_helper_probe_single_connector_modes+0xc4/0x360
 [<c11bb6a7>] drm_mode_getconnector+0x2a7/0x350
 [<c12ed55a>] ? __kfree_skb+0x3a/0x90
 [<c11b00d2>] drm_ioctl+0x1c2/0x4b0
 [<c11bb400>] ? drm_mode_getconnector+0x0/0x350
 [<c108f344>] ? do_sync_read+0xa4/0xe0
 [<c113f56b>] ? rb_insert_color+0xdb/0x110
 [<c11aff10>] ? drm_ioctl+0x0/0x4b0
 [<c109c90d>] do_vfs_ioctl+0x7d/0x5f0
 [<c1040ad3>] ? hrtimer_start+0x23/0x30
 [<c108fe96>] ? vfs_read+0xf6/0x140
 [<c109ceb9>] sys_ioctl+0x39/0x60
 [<c1002b90>] sysenter_do_call+0x12/0x26
idr_remove called for id=0 which is not allocated.
Pid: 1136, comm: Xorg Not tainted 2.6.36-rc5-49-gc79bd89 #1
Call Trace:
 [<c1379e16>] ? printk+0x18/0x1a
 [<c113b8f3>] idr_remove+0x73/0x1c0
 [<c11b8d6f>] drm_mode_object_put+0x2f/0x50
 [<c11b8f6e>] drm_mode_destroy+0xe/0x20
 [<c11eb24b>] nouveau_connector_get_modes+0x2b/0x390
 [<c1185b6f>] ? acpi_lid_open+0x22/0x3c
 [<c103800b>] ? queue_delayed_work+0x1b/0x30
 [<c11abf34>] drm_helper_probe_single_connector_modes+0xc4/0x360
 [<c11bb6a7>] drm_mode_getconnector+0x2a7/0x350
 [<c12ed55a>] ? __kfree_skb+0x3a/0x90
 [<c11b00d2>] drm_ioctl+0x1c2/0x4b0
 [<c11bb400>] ? drm_mode_getconnector+0x0/0x350
 [<c108f344>] ? do_sync_read+0xa4/0xe0
 [<c113f56b>] ? rb_insert_color+0xdb/0x110
 [<c11aff10>] ? drm_ioctl+0x0/0x4b0
 [<c109c90d>] do_vfs_ioctl+0x7d/0x5f0
 [<c1040ad3>] ? hrtimer_start+0x23/0x30
 [<c108fe96>] ? vfs_read+0xf6/0x140
 [<c109ceb9>] sys_ioctl+0x39/0x60
 [<c1002b90>] sysenter_do_call+0x12/0x26

EXT4-fs (sda3): re-mounted. Opts: nobarrier,commit=0 EXT4-fs (sda4): re-mounted. Opts: commit=0 idr_remove called for id=0 which is not allocated.
Pid: 1136, comm: Xorg Not tainted 2.6.36-rc5-49-gc79bd89 #1

Call Trace:
 [<c1379e16>] ? printk+0x18/0x1a
 [<c113b8f3>] idr_remove+0x73/0x1c0
 [<c11b8d6f>] drm_mode_object_put+0x2f/0x50
 [<c11b8f6e>] drm_mode_destroy+0xe/0x20
 [<c11eb24b>] nouveau_connector_get_modes+0x2b/0x390
 [<c1185b6f>] ? acpi_lid_open+0x22/0x3c
 [<c103800b>] ? queue_delayed_work+0x1b/0x30
 [<c11abf34>] drm_helper_probe_single_connector_modes+0xc4/0x360
 [<c11bb6a7>] drm_mode_getconnector+0x2a7/0x350
 [<c12ed55a>] ? __kfree_skb+0x3a/0x90
 [<c11b00d2>] drm_ioctl+0x1c2/0x4b0
 [<c11bb400>] ? drm_mode_getconnector+0x0/0x350
 [<c108f344>] ? do_sync_read+0xa4/0xe0
 [<c113f56b>] ? rb_insert_color+0xdb/0x110
 [<c11aff10>] ? drm_ioctl+0x0/0x4b0
 [<c109c90d>] do_vfs_ioctl+0x7d/0x5f0
 [<c1040ad3>] ? hrtimer_start+0x23/0x30
 [<c108fe96>] ? vfs_read+0xf6/0x140
 [<c109ceb9>] sys_ioctl+0x39/0x60
 [<c1002b90>] sysenter_do_call+0x12/0x26
idr_remove called for id=0 which is not allocated.
Pid: 1136, comm: Xorg Not tainted 2.6.36-rc5-49-gc79bd89 #1
Call Trace:
 [<c1379e16>] ? printk+0x18/0x1a
 [<c113b8f3>] idr_remove+0x73/0x1c0
 [<c11b8d6f>] drm_mode_object_put+0x2f/0x50
 [<c11b8f6e>] drm_mode_destroy+0xe/0x20
 [<c11eb24b>] nouveau_connector_get_modes+0x2b/0x390
 [<c1185b6f>] ? acpi_lid_open+0x22/0x3c
 [<c103800b>] ? queue_delayed_work+0x1b/0x30
 [<c11abf34>] drm_helper_probe_single_connector_modes+0xc4/0x360
 [<c11bb6a7>] drm_mode_getconnector+0x2a7/0x350
 [<c12ed55a>] ? __kfree_skb+0x3a/0x90
 [<c11b00d2>] drm_ioctl+0x1c2/0x4b0
 [<c11bb400>] ? drm_mode_getconnector+0x0/0x350
 [<c108f344>] ? do_sync_read+0xa4/0xe0
 [<c113f56b>] ? rb_insert_color+0xdb/0x110
 [<c11aff10>] ? drm_ioctl+0x0/0x4b0
 [<c109c90d>] do_vfs_ioctl+0x7d/0x5f0
 [<c1040ad3>] ? hrtimer_start+0x23/0x30
 [<c108fe96>] ? vfs_read+0xf6/0x140
 [<c109ceb9>] sys_ioctl+0x39/0x60
 [<c1002b90>] sysenter_do_call+0x12/0x26
idr_remove called for id=0 which is not allocated.
Pid: 1136, comm: Xorg Not tainted 2.6.36-rc5-49-gc79bd89 #1
Call Trace:
 [<c1379e16>] ? printk+0x18/0x1a
 [<c113b8f3>] idr_remove+0x73/0x1c0
 [<c11b8d6f>] drm_mode_object_put+0x2f/0x50
 [<c11b8f6e>] drm_mode_destroy+0xe/0x20
 [<c11eb24b>] nouveau_connector_get_modes+0x2b/0x390
 [<c1185b6f>] ? acpi_lid_open+0x22/0x3c
 [<c103800b>] ? queue_delayed_work+0x1b/0x30
 [<c11abf34>] drm_helper_probe_single_connector_modes+0xc4/0x360
 [<c11bb6a7>] drm_mode_getconnector+0x2a7/0x350
 [<c12ed55a>] ? __kfree_skb+0x3a/0x90
 [<c11b00d2>] drm_ioctl+0x1c2/0x4b0
 [<c11bb400>] ? drm_mode_getconnector+0x0/0x350
 [<c108f344>] ? do_sync_read+0xa4/0xe0
 [<c113f56b>] ? rb_insert_color+0xdb/0x110
 [<c11aff10>] ? drm_ioctl+0x0/0x4b0
 [<c109c90d>] do_vfs_ioctl+0x7d/0x5f0
 [<c1040ad3>] ? hrtimer_start+0x23/0x30
 [<c108fe96>] ? vfs_read+0xf6/0x140
 [<c109ceb9>] sys_ioctl+0x39/0x60
 [<c1002b90>] sysenter_do_call+0x12/0x26
idr_remove called for id=0 which is not allocated.
Pid: 1136, comm: Xorg Not tainted 2.6.36-rc5-49-gc79bd89 #1
Call Trace:
 [<c1379e16>] ? printk+0x18/0x1a
 [<c113b8f3>] idr_remove+0x73/0x1c0
 [<c11b8d6f>] drm_mode_object_put+0x2f/0x50
 [<c11b8f6e>] drm_mode_destroy+0xe/0x20
 [<c11eb24b>] nouveau_connector_get_modes+0x2b/0x390
 [<c1185b6f>] ? acpi_lid_open+0x22/0x3c
 [<c103800b>] ? queue_delayed_work+0x1b/0x30
 [<c11abf34>] drm_helper_probe_single_connector_modes+0xc4/0x360
 [<c11bb6a7>] drm_mode_getconnector+0x2a7/0x350
 [<c12ed55a>] ? __kfree_skb+0x3a/0x90
 [<c11b00d2>] drm_ioctl+0x1c2/0x4b0
 [<c11bb400>] ? drm_mode_getconnector+0x0/0x350
 [<c108f344>] ? do_sync_read+0xa4/0xe0
 [<c113f56b>] ? rb_insert_color+0xdb/0x110
 [<c11aff10>] ? drm_ioctl+0x0/0x4b0
 [<c109c90d>] do_vfs_ioctl+0x7d/0x5f0
 [<c1040ad3>] ? hrtimer_start+0x23/0x30
 [<c108fe96>] ? vfs_read+0xf6/0x140
 [<c109ceb9>] sys_ioctl+0x39/0x60
 [<c1002b90>] sysenter_do_call+0x12/0x26
#2 lore raw
In reply to Alessandro Guido
Quoted 17 lines · On Wed, 22 Sep 2010 23:10:10 +0200 Alessandro Guido <[email protected]>…

I have this traces in my logs (full dmesg attached).

idr_remove called for id=0 which is not allocated.
Pid: 1136, comm: Xorg Not tainted 2.6.36-rc5-49-gc79bd89 #1

Call Trace:
  [<c1379e16>] ? printk+0x18/0x1a
  [<c113b8f3>] idr_remove+0x73/0x1c0
  [<c11b8d6f>] drm_mode_object_put+0x2f/0x50
  [<c11b8f6e>] drm_mode_destroy+0xe/0x20
  [<c11eb24b>] nouveau_connector_get_modes+0x2b/0x390
  [<c1185b6f>] ? acpi_lid_open+0x22/0x3c
  [<c103800b>] ? queue_delayed_work+0x1b/0x30
  [<c11abf34>] drm_helper_probe_single_connector_modes+0xc4/0x360
  [<c11bb6a7>] drm_mode_getconnector+0x2a7/0x350
  [<c11b00d2>] drm_ioctl+0x1c2/0x4b0
  [<c1068071>] ? filemap_fault+0x81/0x3c0
  [<c11bb400>] ? drm_mode_getconnector+0x0/0x350
Quoted 8 lines
  [<c107bedf>] ? handle_mm_fault+0x13f/0x670
  [<c11aff10>] ? drm_ioctl+0x0/0x4b0
  [<c109c90d>] do_vfs_ioctl+0x7d/0x5f0
  [<c101a14c>] ? do_page_fault+0x17c/0x3c0
  [<c108fc6d>] ? vfs_write+0xfd/0x140
  [<c108f1c0>] ? do_sync_write+0x0/0xe0
  [<c109ceb9>] sys_ioctl+0x39/0x60
  [<c1002b90>] sysenter_do_call+0x12/0x26

I assume this is a regression. 2.6.35 didn't do this?

#3 lore raw
Quoted 28 lines · Andrew Morton
Quoted 17 lines · On Wed, 22 Sep 2010 23:10:10 +0200 Alessandro Guido <[email protected]>…

I have this traces in my logs (full dmesg attached).

idr_remove called for id=0 which is not allocated.
Pid: 1136, comm: Xorg Not tainted 2.6.36-rc5-49-gc79bd89 #1

Call Trace:
  [<c1379e16>] ? printk+0x18/0x1a
  [<c113b8f3>] idr_remove+0x73/0x1c0
  [<c11b8d6f>] drm_mode_object_put+0x2f/0x50
  [<c11b8f6e>] drm_mode_destroy+0xe/0x20
  [<c11eb24b>] nouveau_connector_get_modes+0x2b/0x390
  [<c1185b6f>] ? acpi_lid_open+0x22/0x3c
  [<c103800b>] ? queue_delayed_work+0x1b/0x30
  [<c11abf34>] drm_helper_probe_single_connector_modes+0xc4/0x360
  [<c11bb6a7>] drm_mode_getconnector+0x2a7/0x350
  [<c11b00d2>] drm_ioctl+0x1c2/0x4b0
  [<c1068071>] ? filemap_fault+0x81/0x3c0
  [<c11bb400>] ? drm_mode_getconnector+0x0/0x350
Quoted 8 lines
  [<c107bedf>] ? handle_mm_fault+0x13f/0x670
  [<c11aff10>] ? drm_ioctl+0x0/0x4b0
  [<c109c90d>] do_vfs_ioctl+0x7d/0x5f0
  [<c101a14c>] ? do_page_fault+0x17c/0x3c0
  [<c108fc6d>] ? vfs_write+0xfd/0x140
  [<c108f1c0>] ? do_sync_write+0x0/0xe0
  [<c109ceb9>] sys_ioctl+0x39/0x60
  [<c1002b90>] sysenter_do_call+0x12/0x26
Quoted 1 line

I assume this is a regression. 2.6.35 didn't do this?

Yes, I suspect 6e86e0419471d11ed3d4d46039ee90e8cb85806c is the culprit.

I'll send a patch to Dave, but I can't test it personally, I don't have any hardware the manufacturer has configured in the way it'd need to be to trigger this.

Ben.

Quoted 4 lines

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#4 lore raw

PATCH 1/1 drm/nouveau: fix panels using straps-based mode detection

In reply to Andrew Morton

From: Ben Skeggs <[email protected]>

nouveau_bios_fp_mode() zeroes the mode struct before filling in relevant entries. This nukes the mode id initialised by drm_mode_create(), and causes warnings from idr when we try to remove the mode.

---
 drivers/gpu/drm/nouveau/nouveau_connector.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
drivers/gpu/drm/nouveau/nouveau_connector.c +4 -2
index 98c214c..4b286a8 100644
@@ -594,8 +594,10 @@ nouveau_connector_get_modes(struct drm_connector *connector)
 	if (nv_encoder->dcb->type == OUTPUT_LVDS &&
 	    (nv_encoder->dcb->lvdsconf.use_straps_for_mode ||
 	     dev_priv->vbios.fp_no_ddc) && nouveau_bios_fp_mode(dev, NULL)) {
-		nv_connector->native_mode = drm_mode_create(dev);
-		nouveau_bios_fp_mode(dev, nv_connector->native_mode);
+		struct drm_display_mode mode;
+
+		nouveau_bios_fp_mode(dev, &mode);
+		nv_connector->native_mode = drm_mode_duplicate(dev, &mode);
 	}
 
 	/* Find the native mode if this is a digital panel, if we didn't
Signature · 1 line
1.7.2.2
#5 lore raw

Re: [PATCH] drm/nouveau: fix panels using straps-based mode detection

Fixes the problem on my system.

Thanks!

Tested-by on v1 1/1
#6 lore raw

Re: [PATCH] drm/nouveau: fix panels using straps-based mode detection

In reply to Ben Skeggs
Quoted 18 lines · Ben Skeggs

From: Ben Skeggs <[email protected]>

nouveau_bios_fp_mode() zeroes the mode struct before filling in relevant entries. This nukes the mode id initialised by drm_mode_create(), and causes warnings from idr when we try to remove the mode.

---
 drivers/gpu/drm/nouveau/nouveau_connector.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
drivers/gpu/drm/nouveau/nouveau_connector.c +0 -0
index 98c214c..4b286a8 100644
@@ -594,8 +594,10 @@ nouveau_connector_get_modes(struct drm_connector *connector)
 	if (nv_encoder->dcb->type == OUTPUT_LVDS &&
 	    (nv_encoder->dcb->lvdsconf.use_straps_for_mode ||

drivers/gpu/drm/nouveau/nouveau_connector.c nouveau_connector_get_modes(struct drm_connector *connector) · line 603

Quoted 10 lines
drivers/gpu/drm/nouveau/nouveau_connector.c +4 -2
 	     dev_priv->vbios.fp_no_ddc) && nouveau_bios_fp_mode(dev, NULL)) {
-		nv_connector->native_mode = drm_mode_create(dev);
-		nouveau_bios_fp_mode(dev, nv_connector->native_mode);
+		struct drm_display_mode mode;
+
+		nouveau_bios_fp_mode(dev, &mode);
+		nv_connector->native_mode = drm_mode_duplicate(dev, &mode);
 	}
 
 	/* Find the native mode if this is a digital panel, if we didn't

I had this same problem, and this patch fixes it. Feel free to add:

Regards,

Phil

#7 lore raw
In reply to Andrew Morton

I'm really not sure when it was introduced, since I've switched to constantly use nouveau only recently, but I don't recall seeing anything of this when I tried in 2.6.34.