Advertisement
Guest User

krealloc

a guest
Jun 23rd, 2012
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 8.78 KB | None | 0 0
  1. This code
  2.  
  3.             HM2_ERR("Before krealloc, &chan->confs[0]=%p\n", &chan->confs[0]);
  4.             chan->confs = (hm2_sserial_data_t *)
  5.                         krealloc(chan->confs,
  6.                                  chan->num_confs * sizeof(hm2_sserial_data_t),
  7.                                  GFP_KERNEL);
  8.             HM2_ERR("Krealloc over, &chan->confs[0]=%p\n", &chan->confs[0]);
  9.             addr = hm2_sserial_get_bytes(hm2, chan, &(chan->confs[chan->num_confs-1]),
  10.                                          addr, 14);
  11. . . .
  12. Gives this result:
  13. Note that we see the "before krealloc" ([[  991.975361]) then a warning, then "Krealloc over" ([991.975898]) and a more terminal crash.
  14.  
  15. So it looks like a problem with the krealloc. But the same code is working OK in v2.5 and master.
  16.  
  17. [  991.974777] hm2/hm2_5i25.0: ptr=f6b9c4b4 char=e
  18. [  991.974844] hm2/hm2_5i25.0: ptr=f6b9c4b5 char=n
  19. [  991.974913] hm2/hm2_5i25.0: ptr=f6b9c4b6 char=c
  20. [  991.974977] hm2/hm2_5i25.0: ptr=f6b9c4b7 char=o
  21. [  991.975041] hm2/hm2_5i25.0: ptr=f6b9c4b8 char=d
  22. [  991.975105] hm2/hm2_5i25.0: ptr=f6b9c4b9 char=e
  23. [  991.975169] hm2/hm2_5i25.0: ptr=f6b9c4ba char=r
  24. [  991.975228] hm2/hm2_5i25.0: ptr=f6b9c4bb char=hm2/hm2_5i25.0: ptr=f5b57bbb data=a0
  25. [  991.975361] hm2/hm2_5i25.0: Before krealloc, &chan->confs[0]=c057f540
  26. [  991.975367] ------------[ cut here ]------------
  27. [  991.975380] WARNING: at /home/moses/Projects/emc2/ubuntu-lucid/mm/slub.c:2929 ksize+0x88/0x90()
  28. [  991.975386] Hardware name:        
  29. [  991.975390] Modules linked in: hm2_pci(+) hostmot2 hal_lib rtapi rtai_math rtai_sem rtai_fifos rtai_sched rtai_hal dm_crypt binfmt_misc appletalk snd_hda_codec_realtek snd_hda_intel snd_hda_codec snd_hwdep snd_pcm_oss snd_mixer_oss arc4 snd_pcm snd_seq_dummy snd_seq_oss snd_seq_midi snd_rawmidi snd_seq_midi_event snd_seq snd_timer snd_seq_device iwl3945 iwlcore snd ppdev mac80211 led_class soundcore joydev parport_pc lp psmouse serio_raw snd_page_alloc cfg80211 shpchp parport dm_raid45 xor fbcon tileblit usbhid hid font bitblit softcursor video output e1000e ahci vga16fb vgastate
  30. [  991.975504] Pid: 4686, comm: insmod Not tainted 2.6.32-122-rtai #rtai
  31. [  991.975509] Call Trace:
  32. [  991.975521]  [<c0143112>] warn_slowpath_common+0x72/0xa0
  33. [  991.975530]  [<c01ef4d8>] ? ksize+0x88/0x90
  34. [  991.975537]  [<c01ef4d8>] ? ksize+0x88/0x90
  35. [  991.975545]  [<c014315a>] warn_slowpath_null+0x1a/0x20
  36. [  991.975553]  [<c01ef4d8>] ksize+0x88/0x90
  37. [  991.975561]  [<c01d286e>] __krealloc+0x2e/0x80
  38. [  991.975569]  [<c01d28dd>] krealloc+0x1d/0x60
  39. [  991.975584]  [<f944e81d>] hm2_sserial_read_configs+0xdc/0x2e2 [hostmot2]
  40. [  991.975605]  [<f944eedb>] hm2_sserial_setup_channel+0x4b8/0x4dc [hostmot2]
  41. [  991.975624]  [<f944f433>] hm2_sserial_parse_md+0x534/0x60d [hostmot2]
  42. [  991.975637]  [<f9446e7c>] hm2_register+0x1212/0x169a [hostmot2]
  43. [  991.975647]  [<c0342753>] ? rb_insert_color+0xd3/0x110
  44. [  991.975656]  [<c01e20fb>] ? __insert_vmap_area+0x5b/0xb0
  45. [  991.975665]  [<c01e3846>] ? alloc_vmap_area+0x1f6/0x2d0
  46. [  991.975675]  [<c01990ed>] ? __ipipe_restore_root+0x2d/0x40
  47. [  991.975684]  [<c0569c67>] ? _spin_unlock_irqrestore+0x17/0x30
  48. [  991.975694]  [<c0121df7>] ? __ipipe_pin_range_globally+0xb7/0xd0
  49. [  991.975702]  [<c033f2b0>] ? ioremap_page_range+0xf0/0x130
  50. [  991.975711]  [<c01220e1>] ? __ioremap_caller+0x241/0x2f0
  51. [  991.975723]  [<f83faca7>] hm2_pci_probe+0x83e/0x8b9 [hm2_pci]
  52. [  991.975732]  [<c0252770>] ? sysfs_addrm_start+0x60/0xa0
  53. [  991.975742]  [<c03571d3>] local_pci_probe+0x13/0x20
  54. [  991.975750]  [<c0357428>] pci_device_probe+0x68/0x90
  55. [  991.975759]  [<c03cf78d>] really_probe+0x4d/0x140
  56. [  991.975767]  [<c01990ed>] ? __ipipe_restore_root+0x2d/0x40
  57. [  991.975776]  [<c03cf89e>] driver_probe_device+0x1e/0x30
  58. [  991.975784]  [<c03cf931>] __driver_attach+0x81/0x90
  59. [  991.975792]  [<c03cedd3>] bus_for_each_dev+0x53/0x80
  60. [  991.975800]  [<c03cf65e>] driver_attach+0x1e/0x20
  61. [  991.975807]  [<c03cf8b0>] ? __driver_attach+0x0/0x90
  62. [  991.975815]  [<c03cf055>] bus_add_driver+0xd5/0x280
  63. [  991.975824]  [<c0357360>] ? pci_device_remove+0x0/0x40
  64. [  991.975832]  [<c03cfc1a>] driver_register+0x6a/0x130
  65. [  991.975840]  [<c0357665>] __pci_register_driver+0x45/0xb0
  66. [  991.975850]  [<f83faef2>] init_module+0x45/0xc7 [hm2_pci]
  67. [  991.975859]  [<c0101041>] do_one_initcall+0x31/0x1b0
  68. [  991.975868]  [<f83faead>] ? init_module+0x0/0xc7 [hm2_pci]
  69. [  991.975877]  [<c0179781>] sys_init_module+0xb1/0x220
  70. [  991.975886]  [<c010340d>] syscall_call+0x7/0xb
  71. [  991.975892] ---[ end trace 821c8cfb33b785e4 ]---
  72. [  991.975898] hm2/hm2_5i25.0: Krealloc over, &chan->confs[0]=c057f540
  73. [  991.975964] hm2/hm2_5i25.0: ptr=c057f540 data=a0
  74. [  991.975982] BUG: unable to handle kernel paging request at c057f540
  75. [  991.975991] IP: [<f944cec9>] hm2_sserial_get_bytes+0x18c/0x1a7 [hostmot2]
  76. [  991.976006] *pde = 370c0063 *pte = 0057f161
  77. [  991.976014] Oops: 0003 [#1] SMP
  78. [  991.976021] last sysfs file: /sys/devices/pci0000:00/0000:00:1c.0/0000:01:00.0/irq
  79. [  991.976028] Modules linked in: hm2_pci(+) hostmot2 hal_lib rtapi rtai_math rtai_sem rtai_fifos rtai_sched rtai_hal dm_crypt binfmt_misc appletalk snd_hda_codec_realtek snd_hda_intel snd_hda_codec snd_hwdep snd_pcm_oss snd_mixer_oss arc4 snd_pcm snd_seq_dummy snd_seq_oss snd_seq_midi snd_rawmidi snd_seq_midi_event snd_seq snd_timer snd_seq_device iwl3945 iwlcore snd ppdev mac80211 led_class soundcore joydev parport_pc lp psmouse serio_raw snd_page_alloc cfg80211 shpchp parport dm_raid45 xor fbcon tileblit usbhid hid font bitblit softcursor video output e1000e ahci vga16fb vgastate
  80. [  991.976130]
  81. [  991.976136] Pid: 4686, comm: insmod Tainted: G        W  (2.6.32-122-rtai #rtai)        
  82. [  991.976143] EIP: 0060:[<f944cec9>] EFLAGS: 00010206 CPU: 1
  83. [  991.976153] EIP is at hm2_sserial_get_bytes+0x18c/0x1a7 [hostmot2]
  84. [  991.976160] EAX: 000000a0 EBX: f6891000 ECX: fffff14e EDX: c057f540
  85. [  991.976166] ESI: f5b4c000 EDI: f83fbc7c EBP: f5b57b94 ESP: f5b57b6c
  86. [  991.976172]  DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068
  87. [  991.976178] Process insmod (pid: 4686, ti=f5b56000 task=f6b1b380 task.ti=f5b56000)
  88. [  991.976184] I-pipe domain Linux
  89. [  991.976187] Stack:
  90. [  991.976191]  00000001 f9458706 f83fbc7c c057f540 000000a0 c057f540 000000a0 f6891000
  91. [  991.976206] <0> f5b4c000 0000a638 f5b57bc8 f944e85b 0000a639 0000000d f83fbc7c c057f540
  92. [  991.976222] <0> f689100c 0000aa58 ac22aa54 a0251063 f6891000 f929b1b8 f5b57c07 f5b57c1c
  93. [  991.976240] Call Trace:
  94. [  991.976252]  [<f944e85b>] ? hm2_sserial_read_configs+0x11a/0x2e2 [hostmot2]
  95. [  991.976270]  [<f944eedb>] ? hm2_sserial_setup_channel+0x4b8/0x4dc [hostmot2]
  96. [  991.976290]  [<f944f433>] ? hm2_sserial_parse_md+0x534/0x60d [hostmot2]
  97. [  991.976302]  [<f9446e7c>] ? hm2_register+0x1212/0x169a [hostmot2]
  98. [  991.976313]  [<c0342753>] ? rb_insert_color+0xd3/0x110
  99. [  991.976325]  [<c01e20fb>] ? __insert_vmap_area+0x5b/0xb0
  100. [  991.976337]  [<c01e3846>] ? alloc_vmap_area+0x1f6/0x2d0
  101. [  991.976349]  [<c01990ed>] ? __ipipe_restore_root+0x2d/0x40
  102. [  991.976360]  [<c0569c67>] ? _spin_unlock_irqrestore+0x17/0x30
  103. [  991.976372]  [<c0121df7>] ? __ipipe_pin_range_globally+0xb7/0xd0
  104. [  991.976383]  [<c033f2b0>] ? ioremap_page_range+0xf0/0x130
  105. [  991.976395]  [<c01220e1>] ? __ioremap_caller+0x241/0x2f0
  106. [  991.976409]  [<f83faca7>] ? hm2_pci_probe+0x83e/0x8b9 [hm2_pci]
  107. [  991.976421]  [<c0252770>] ? sysfs_addrm_start+0x60/0xa0
  108. [  991.976433]  [<c03571d3>] ? local_pci_probe+0x13/0x20
  109. [  991.976444]  [<c0357428>] ? pci_device_probe+0x68/0x90
  110. [  991.976456]  [<c03cf78d>] ? really_probe+0x4d/0x140
  111. [  991.976467]  [<c01990ed>] ? __ipipe_restore_root+0x2d/0x40
  112. [  991.976478]  [<c03cf89e>] ? driver_probe_device+0x1e/0x30
  113. [  991.976490]  [<c03cf931>] ? __driver_attach+0x81/0x90
  114. [  991.976501]  [<c03cedd3>] ? bus_for_each_dev+0x53/0x80
  115. [  991.976512]  [<c03cf65e>] ? driver_attach+0x1e/0x20
  116. [  991.976523]  [<c03cf8b0>] ? __driver_attach+0x0/0x90
  117. [  991.976534]  [<c03cf055>] ? bus_add_driver+0xd5/0x280
  118. [  991.976545]  [<c0357360>] ? pci_device_remove+0x0/0x40
  119. [  991.976556]  [<c03cfc1a>] ? driver_register+0x6a/0x130
  120. [  991.976568]  [<c0357665>] ? __pci_register_driver+0x45/0xb0
  121. [  991.976581]  [<f83faef2>] ? init_module+0x45/0xc7 [hm2_pci]
  122. [  991.976592]  [<c0101041>] ? do_one_initcall+0x31/0x1b0
  123. [  991.976605]  [<f83faead>] ? init_module+0x0/0xc7 [hm2_pci]
  124. [  991.976617]  [<c0179781>] ? sys_init_module+0xb1/0x220
  125. [  991.976628]  [<c010340d>] ? syscall_call+0x7/0xb
  126. [  991.976634] Code: 10 8b 45 ec c7 44 24 04 06 87 45 f9 89 44 24 0c 8b 06 89 44 24 08 c7 04 24 01 00 00 00 e8 48 ed f2 fe 8b 55 ec 8b 45 f0 ff 45 08 <88> 02 42 89 55 ec 83 7d 0c 00 0f 85 d1 fe ff ff 8b 45 08 83 c4
  127. [  991.976839] EIP: [<f944cec9>] hm2_sserial_get_bytes+0x18c/0x1a7 [hostmot2] SS:ESP 0068:f5b57b6c
  128. [  991.976859] CR2: 00000000c057f540
  129. [  991.976868] ---[ end trace 821c8cfb33b785e5 ]---
  130. [  999.348977] RTAI[math]: unloaded.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement