Require linux C function trace in assembly

Let me First tell you that i am facing problem on linux kernel. I did some changes in kernel C source but then i am getting oops message that hangs my linux.
c0131250 kmem_find_general_cachep_R52bb6891
c01309d0 kmem_cache_create_Rd1c0b4e6
c0130e40 kmem_cache_destroy_Rdf83c692
c0130e00 kmem_cache_shrink_R12f7cf04
c0131170 kmem_cache_alloc_R75810956
c01311d0 kmem_cache_free_R891f2686
c0131240 kmem_cache_size_R16a3c749
c0131180 kmalloc_R93d4cfe6
c0131200 kfree_R037a0cba

I am getting oops at c0130f97. I have written a big module code span on 4 files and those files require to allocate many strings that i allocate through kmalloc with GFP_KERNEL FLAG but something  is going wrong that stucks me at c0130f97 that mean kmem_cache_shrink. How can i solve this.
Sorry but i cannot provide code that creating oops but hope you will understand my problem from this explanation

The objdump on vmlinux shows the instruction c0130f97 lies in function <kmem_cache_grow> whose dump is
c0130f50 <kmem_cache_grow>:
c0130f50:      55                         push   %ebp
c0130f51:      57                         push   %edi
c0130f52:      56                         push   %esi
c0130f53:      53                         push   %ebx
c0130f54:      83 ec 14                   sub    $0x14,%esp
c0130f57:      8b 4c 24 2c                mov    0x2c(%esp,1),%ecx
c0130f5b:      8b 7c 24 28                mov    0x28(%esp,1),%edi
c0130f5f:      f7 c1 0e ee ff ff          test   $0xffffee0e,%ecx
c0130f65:      74 08                      je     c0130f6f <kmem_cache_grow+0x1f>
c0130f67:      0f 0b                      ud2a  
c0130f69:      5f                         pop    %edi
c0130f6a:      04 33                      add    $0x33,%al
c0130f6c:      97                         xchg   %eax,%edi
c0130f6d:      27                         daa    
c0130f6e:      c0                         (bad)  
c0130f6f:      31 c0                      xor    %eax,%eax
c0130f71:      f6 c5 10                   test   $0x10,%ch
c0130f74:      0f 85 5a 01 00 00          jne    c01310d4 <kmem_cache_grow+0x184>
c0130f7a:      a1 88 7d 31 c0             mov    0xc0317d88,%eax
c0130f7f:      8b 15 84 7d 31 c0          mov    0xc0317d84,%edx
c0130f85:      01 d0                      add    %edx,%eax
c0130f87:      85 c0                      test   %eax,%eax
c0130f89:      74 14                      je     c0130f9f <kmem_cache_grow+0x4f>
c0130f8b:      89 c8                      mov    %ecx,%eax
c0130f8d:      25 f0 01 00 00             and    $0x1f0,%eax
c0130f92:      83 f8 20                   cmp    $0x20,%eax
c0130f95:      74 08                      je     c0130f9f <kmem_cache_grow+0x4f>
**************************this is the Problem EIP****************
c0130f97:      0f 0b                      ud2a  
c0130f99:      6a 04                      push   $0x4
c0130f9b:      33 97 27 c0 b8 01          xor    0x1b8c027(%edi),%edx
c0130fa1:      00 00                      add    %al,(%eax)
c0130fa3:      00 89 44 24 0c 89          add    %cl,0x890c2444(%ecx)
c0130fa9:      c8 25 f0 01                enter  $0xf025,$0x1
c0130fad:      00 00                      add    %al,(%eax)
c0130faf:      89 44 24 10                mov    %eax,0x10(%esp,1)
c0130fb3:      83 f8 20                   cmp    $0x20,%eax
c0130fb6:      b8 03 00 00 00             mov    $0x3,%eax
c0130fbb:      0f 45 44 24 0c             cmovne 0xc(%esp,1),%eax
c0130fc0:      89 44 24 0c                mov    %eax,0xc(%esp,1)
c0130fc4:      9c                         pushf  
c0130fc5:      5b                         pop    %ebx
c0130fc6:      fa                         cli    
c0130fc7:      8b 77 34                   mov    0x34(%edi),%esi
c0130fca:      8d 46 01                   lea    0x1(%esi),%eax
c0130fcd:      3b 47 2c                   cmp    0x2c(%edi),%eax
c0130fd0:      89 47 34                   mov    %eax,0x34(%edi)
c0130fd3:      72 07                      jb     c0130fdc <kmem_cache_grow+0x8c>
c0130fd5:      c7 47 34 00 00 00 00       movl   $0x0,0x34(%edi)
c0130fdc:      83 4f 40 01                orl    $0x1,0x40(%edi)
c0130fe0:      8b 6f 30                   mov    0x30(%edi),%ebp
c0130fe3:      ff 47 3c                   incl   0x3c(%edi)
c0130fe6:      0f af f5                   imul   %ebp,%esi
c0130fe9:      53                         push   %ebx
c0130fea:      9d                         popf  
c0130feb:      8b 5f 28                   mov    0x28(%edi),%ebx
c0130fee:      8b 57 24                   mov    0x24(%edi),%edx
c0130ff1:      09 d9                      or     %ebx,%ecx
c0130ff3:      89 c8                      mov    %ecx,%eax
c0130ff5:      e8 66 26 00 00             call   c0133660 <__get_free_pages>
c0130ffa:      85 c0                      test   %eax,%eax
c0130ffc:      89 c5                      mov    %eax,%ebp
c0130ffe:      0f 84 30 01 00 00          je     c0131134 <kmem_cache_grow+0x1e4>
c0131004:      f6 47 1e 01                testb  $0x1,0x1e(%edi)
c0131008:      89 f3                      mov    %esi,%ebx
c013100a:      0f 85 30 01 00 00          jne    c0131140 <kmem_cache_grow+0x1f0>
c0131010:      8d 14 06                   lea    (%esi,%eax,1),%edx
c0131013:      8b 47 20                   mov    0x20(%edi),%eax
c0131016:      8d 04 85 37 00 00 00       lea    0x37(,%eax,4),%eax
c013101d:      83 e0 e0                   and    $0xffffffe0,%eax
c0131020:      01 c3                      add    %eax,%ebx
c0131022:      c7 42 10 00 00 00 00       movl   $0x0,0x10(%edx)
c0131029:      8d 04 2b                   lea    (%ebx,%ebp,1),%eax
c013102c:      89 d6                      mov    %edx,%esi
c013102e:      89 5a 08                   mov    %ebx,0x8(%edx)
c0131031:      89 42 0c                   mov    %eax,0xc(%edx)
c0131034:      85 f6                      test   %esi,%esi
c0131036:      0f 84 b7 00 00 00          je     c01310f3 <kmem_cache_grow+0x1a3>
c013103c:      8b 4f 24                   mov    0x24(%edi),%ecx
c013103f:      ba 01 00 00 00             mov    $0x1,%edx
c0131044:      8d 85 00 00 00 40          lea    0x40000000(%ebp),%eax
c013104a:      c1 e8 0c                   shr    $0xc,%eax
c013104d:      8d 04 40                   lea    (%eax,%eax,2),%eax
c0131050:      d3 e2                      shl    %cl,%edx
c0131052:      8b 0d 90 97 31 c0          mov    0xc0319790,%ecx
c0131058:      c1 e0 04                   shl    $0x4,%eax
c013105b:      01 c8                      add    %ecx,%eax
c013105d:      8d 76 00                   lea    0x0(%esi),%esi
c0131060:      89 38                      mov    %edi,(%eax)
c0131062:      89 70 04                   mov    %esi,0x4(%eax)
c0131065:      0f ba 68 18 08             btsl   $0x8,0x18(%eax)
c013106a:      83 c0 30                   add    $0x30,%eax
c013106d:      4a                         dec    %edx
c013106e:      75 f0                      jne    c0131060 <kmem_cache_grow+0x110>
c0131070:      31 db                      xor    %ebx,%ebx
c0131072:      3b 5f 20                   cmp    0x20(%edi),%ebx
c0131075:      73 29                      jae    c01310a0 <kmem_cache_grow+0x150>
c0131077:      89 f6                      mov    %esi,%esi
c0131079:      8d bc 27 00 00 00 00       lea    0x0(%edi,1),%edi
c0131080:      8b 47 18                   mov    0x18(%edi),%eax
c0131083:      8b 56 0c                   mov    0xc(%esi),%edx
c0131086:      0f af c3                   imul   %ebx,%eax
c0131089:      01 d0                      add    %edx,%eax
c013108b:      8b 57 44                   mov    0x44(%edi),%edx
c013108e:      85 d2                      test   %edx,%edx
c0131090:      75 4e                      jne    c01310e0 <kmem_cache_grow+0x190>
c0131092:      8d 43 01                   lea    0x1(%ebx),%eax
c0131095:      89 44 9e 18                mov    %eax,0x18(%esi,%ebx,4)
c0131099:      89 c3                      mov    %eax,%ebx
c013109b:      3b 47 20                   cmp    0x20(%edi),%eax
c013109e:      72 e0                      jb     c0131080 <kmem_cache_grow+0x130>
c01310a0:      bd ff ff ff ff             mov    $0xffffffff,%ebp
c01310a5:      89 6c 9e 14                mov    %ebp,0x14(%esi,%ebx,4)
c01310a9:      c7 46 14 00 00 00 00       movl   $0x0,0x14(%esi)
c01310b0:      9c                         pushf  
c01310b1:      5b                         pop    %ebx
c01310b2:      fa                         cli    
c01310b3:      ff 4f 3c                   decl   0x3c(%edi)
c01310b6:      8d 47 10                   lea    0x10(%edi),%eax
c01310b9:      89 06                      mov    %eax,(%esi)
c01310bb:      8b 50 04                   mov    0x4(%eax),%edx
c01310be:      89 70 04                   mov    %esi,0x4(%eax)
c01310c1:      89 32                      mov    %esi,(%edx)
c01310c3:      89 56 04                   mov    %edx,0x4(%esi)
c01310c6:      c7 47 4c 00 00 00 00       movl   $0x0,0x4c(%edi)
c01310cd:      53                         push   %ebx
c01310ce:      9d                         popf  
c01310cf:      b8 01 00 00 00             mov    $0x1,%eax
c01310d4:      83 c4 14                   add    $0x14,%esp
c01310d7:      5b                         pop    %ebx
c01310d8:      5e                         pop    %esi
c01310d9:      5f                         pop    %edi
c01310da:      5d                         pop    %ebp
c01310db:      c3                         ret    
c01310dc:      8d 74 26 00                lea    0x0(%esi,1),%esi
c01310e0:      89 7c 24 04                mov    %edi,0x4(%esp,1)
c01310e4:      8b 4c 24 0c                mov    0xc(%esp,1),%ecx
c01310e8:      89 04 24                   mov    %eax,(%esp,1)
c01310eb:      89 4c 24 08                mov    %ecx,0x8(%esp,1)
c01310ef:      ff d2                      call   *%edx
c01310f1:      eb 9f                      jmp    c0131092 <kmem_cache_grow+0x142>
c01310f3:      8b 4f 24                   mov    0x24(%edi),%ecx
c01310f6:      8d 85 00 00 00 40          lea    0x40000000(%ebp),%eax
c01310fc:      ba 01 00 00 00             mov    $0x1,%edx
c0131101:      c1 e8 0c                   shr    $0xc,%eax
c0131104:      8b 35 90 97 31 c0          mov    0xc0319790,%esi
c013110a:      8d 04 40                   lea    (%eax,%eax,2),%eax
c013110d:      d3 e2                      shl    %cl,%edx
c013110f:      c1 e0 04                   shl    $0x4,%eax
c0131112:      4a                         dec    %edx
c0131113:      01 f0                      add    %esi,%eax
c0131115:      83 fa ff                   cmp    $0xffffffff,%edx
c0131118:      74 11                      je     c013112b <kmem_cache_grow+0x1db>
c013111a:      0f ba 70 18 08             btrl   $0x8,0x18(%eax)
c013111f:      4a                         dec    %edx
c0131120:      83 c0 30                   add    $0x30,%eax
c0131123:      83 fa ff                   cmp    $0xffffffff,%edx
c0131126:      75 f2                      jne    c013111a <kmem_cache_grow+0x1ca>
c0131128:      8b 4f 24                   mov    0x24(%edi),%ecx
c013112b:      89 ca                      mov    %ecx,%edx
c013112d:      89 e8                      mov    %ebp,%eax
c013112f:      e8 ac 25 00 00             call   c01336e0 <free_pages>
c0131134:      9c                         pushf  
c0131135:      5b                         pop    %ebx
c0131136:      fa                         cli    
c0131137:      ff 4f 3c                   decl   0x3c(%edi)
c013113a:      53                         push   %ebx
c013113b:      9d                         popf  
c013113c:      31 c0                      xor    %eax,%eax
c013113e:      eb 94                      jmp    c01310d4 <kmem_cache_grow+0x184>
c0131140:      8b 4c 24 10                mov    0x10(%esp,1),%ecx
c0131144:      31 f6                      xor    %esi,%esi
c0131146:      89 4c 24 04                mov    %ecx,0x4(%esp,1)
c013114a:      8b 47 38                   mov    0x38(%edi),%eax
c013114d:      89 04 24                   mov    %eax,(%esp,1)
c0131150:      e8 1b 00 00 00             call   c0131170 <kmem_cache_alloc>
c0131155:      85 c0                      test   %eax,%eax
c0131157:      89 c2                      mov    %eax,%edx
c0131159:      0f 85 c3 fe ff ff          jne    c0131022 <kmem_cache_grow+0xd2>
c013115f:      e9 d0 fe ff ff             jmp    c0131034 <kmem_cache_grow+0xe4>
c0131164:      8d b6 00 00 00 00          lea    0x0(%esi),%esi
c013116a:      8d bf 00 00 00 00          lea    0x0(%edi),%edi
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.


What's happened is you've hit an internal BUG macro, which is triggered when eax isnt 0x20.   So follow the code back and see where eax came from.  It's somehow gotten clobbered.

This is a hard kind of thing to fix.  How about you disable more and more of your code until things work, then start turning on LITTLE bits of your code until things break again?
Can anybody tell me what is the last thing in following instruction
 c0130f65:     74 08                     je     c0130f6f  <kmem_cache_grow+0x1f>

Why some of instructions have last thing like <kmem_cache_grow+0x1f>. What is that mean???
also eax has value 00001f0
OWASP: Forgery and Phishing

Learn the techniques to avoid forgery and phishing attacks and the types of attacks an application or network may face.

linux_lover2004Author Commented:
Hey panemade,
             How did you know eax has 00001f0? and yes I also dont know what is <kmem_cache_grow+0x1f>. Can anybody elaborate it to me?

<kmem_cache_grow+0x1f> means the address at 0x1f (31) bytes after the beginning of the function kmem_cache_grow.
objdump tries to be nice and write symbolic names to all addresses it finds. since there is no symbol located at address 0xc0130f6f,
it looks for the closest symbol, which is kmem_cache_grow, and uses it as a reference point:

0xc0130f6f = 0xc0130f50 + 0x1f = kmem_cache_grow + 0x1f

i'll try and look at the code later, c if i can find anything interesting... 8-)
okey, i had some time.... 8-)

the instruction you're failing on is ud2a, which is a "special" instruction - the "guaranteed invalid instruction".
it is used to fault the processor and halt the kernel in case you did something really really bad...

now, let's look at the source code for kmem_cache_grow (which is in the file sys/mm/slab.c)

1123         /*
1124          * The test for missing atomic flag is performed here, rather than
1125          * the more obvious place, simply to reduce the critical path length
1126          * in kmem_cache_alloc(). If a caller is seriously mis-behaving they
1127          * will eventually be caught here (where it matters).
1128          */
1129         if (in_interrupt() && (flags & SLAB_LEVEL_MASK) != SLAB_ATOMIC)
1130                 BUG();            <============== THIS IS WHERE YOU FAULT!

now, i have no idea what you're doing before you get to that point, since no code was supplied.
i hereby send you to look at the source code of the file slab.c (containg the failing function).
read the comments in that file, and try and find out what you're doing wrong...

you can find the file here:
i should really gather all the information before writing responses... 8-)

anyway, what you should do is use kmalloc with GFP_ATOMIC and not GFP_KERNEL flag.
this should fix your problem...

the only difference between those flags is in the allocation process itself (the result is the same).
with GFP_KERNEL, the allocation process may sleep if it has to, and with GFP_ATOMIC it will never sleep.
this is important when you use kmalloc from within an interrupt (which I'll can only guess you do, since i can't see any code...).

bottom line, change the flag. happy trails.

P.S. this is more of a linux question than an assembly one, but i like both, so that's ok  8-)
linux_lover2004Author Commented:
Hello mzvika,
            Can i get your mail ID  Please??? I want to know why GFP_KERNEL not work for mr but GFP_ATOMIC work and solve my problem

well, like i said, the answer is inside YOUR code.
the code inside kmem_cache_grow was DESIGNED to fail if you called it from inside an interrupt without the GFP_ATOMIC flag.

my guess is, you're doing kmalloc in the context of an interrupt, in which case you HAVE to use GFP_ATOMIC.
linux_lover2004Author Commented:
Hi mzvika,
         Thanks for answer but now i am again stuck at other side in kernel in packet receiving code function netif_rx.  so i take objdump of netif_rx function given below AND its disassembly of .text section is also given below.
I am getting oops at address c01fa28a. I am unable to identify the C statement that is causing this problem Please help me here also?

int netif_rx(struct sk_buff *skb)
      int this_cpu = smp_processor_id();
      struct softnet_data *queue;
      unsigned long flags;

      if (skb->stamp.tv_sec == 0)

      /* The code is rearranged so that the path is the most
         short when CPU is congested, but is still operating.
      queue = &softnet_data[this_cpu];

      printk(KERN_DEBUG "In netif_rx skb->nh.iph->ihl = %d && skb->nh.iph->version = %d\n",skb->nh.iph->ihl,skb->nh.iph->version);
printk(KERN_DEBUG "SRC=%u.%u.%u.%u\n",NIPQUAD(skb->nh.iph->saddr));
      if (queue->input_pkt_queue.qlen <= netdev_max_backlog) {
            if (queue->input_pkt_queue.qlen) {
                  if (queue->throttle)
                        goto drop;

                  return queue->cng_level;

            if (queue->throttle) {
                  queue->throttle = 0;
                  if (atomic_dec_and_test(&netdev_dropping))

            goto enqueue;

      if (queue->throttle == 0) {
            queue->throttle = 1;


      return NET_RX_DROP;

vmlinux:     file format elf32-i386
Disassembly of section .text:
c01fa270 <netif_rx>:
c01fa270:      56                         push   %esi
c01fa271:      53                         push   %ebx
c01fa272:      83 ec 14                   sub    $0x14,%esp
c01fa275:      8b 5c 24 20                mov    0x20(%esp,1),%ebx
c01fa279:      8b 43 10                   mov    0x10(%ebx),%eax
c01fa27c:      85 c0                      test   %eax,%eax
c01fa27e:      0f 84 a4 01 00 00          je     c01fa428 <netif_rx+0x1b8>
c01fa284:      9c                         pushf  
c01fa285:      5e                         pop    %esi
c01fa286:      fa                         cli    
c01fa287:      8b 53 24                   mov    0x24(%ebx),%edx
*********************Getting oops here******************
c01fa28a:      0f b6 02                   movzbl (%edx),%eax
c01fa28d:      c0 e8 04                   shr    $0x4,%al
c01fa290:      0f b6 c0                   movzbl %al,%eax
c01fa293:      89 44 24 08                mov    %eax,0x8(%esp,1)
c01fa297:      0f b6 02                   movzbl (%edx),%eax
c01fa29a:      c7 04 24 20 74 27 c0       movl   $0xc0277420,(%esp,1)
c01fa2a1:      24 0f                      and    $0xf,%al
c01fa2a3:      0f b6 c0                   movzbl %al,%eax
c01fa2a6:      89 44 24 04                mov    %eax,0x4(%esp,1)
c01fa2aa:      e8 e1 e4 f1 ff             call   c0118790 <printk>
c01fa2af:      8b 53 24                   mov    0x24(%ebx),%edx
c01fa2b2:      0f b6 42 0f                movzbl 0xf(%edx),%eax
c01fa2b6:      89 44 24 10                mov    %eax,0x10(%esp,1)
c01fa2ba:      0f b6 42 0e                movzbl 0xe(%edx),%eax
c01fa2be:      89 44 24 0c                mov    %eax,0xc(%esp,1)
c01fa2c2:      0f b6 42 0d                movzbl 0xd(%edx),%eax
c01fa2c6:      89 44 24 08                mov    %eax,0x8(%esp,1)
c01fa2ca:      0f b6 42 0c                movzbl 0xc(%edx),%eax
c01fa2ce:      c7 04 24 5f 5b 27 c0       movl   $0xc0275b5f,(%esp,1)
c01fa2d5:      89 44 24 04                mov    %eax,0x4(%esp,1)
c01fa2d9:      e8 b2 e4 f1 ff             call   c0118790 <printk>
c01fa2de:      a1 94 0c 2f c0             mov    0xc02f0c94,%eax
c01fa2e3:      ff 05 20 df 32 c0          incl   0xc032df20
c01fa2e9:      3b 05 84 a2 2c c0          cmp    0xc02ca284,%eax
c01fa2ef:      0f 87 11 01 00 00          ja     c01fa406 <netif_rx+0x196>
c01fa2f5:      85 c0                      test   %eax,%eax
c01fa2f7:      74 77                      je     c01fa370 <netif_rx+0x100>
c01fa2f9:      a1 80 0c 2f c0             mov    0xc02f0c80,%eax
c01fa2fe:      85 c0                      test   %eax,%eax
c01fa300:      75 45                      jne    c01fa347 <netif_rx+0xd7>
c01fa302:      8b 43 18                   mov    0x18(%ebx),%eax
c01fa305:      ff 80 ec 00 00 00          incl   0xec(%eax)
c01fa30b:      c7 43 08 8c 0c 2f c0       movl   $0xc02f0c8c,0x8(%ebx)
c01fa312:      a1 90 0c 2f c0             mov    0xc02f0c90,%eax
c01fa317:      ff 05 94 0c 2f c0          incl   0xc02f0c94
c01fa31d:      c7 03 8c 0c 2f c0          movl   $0xc02f0c8c,(%ebx)
c01fa323:      89 43 04                   mov    %eax,0x4(%ebx)
c01fa326:      89 18                      mov    %ebx,(%eax)
c01fa328:      89 1d 90 0c 2f c0          mov    %ebx,0xc02f0c90
c01fa32e:      56                         push   %esi
c01fa32f:      9d                         popf  
c01fa330:      c7 04 24 00 00 00 00       movl   $0x0,(%esp,1)
c01fa337:      e8 c4 fe ff ff             call   c01fa200 <get_sample_stats>
c01fa33c:      a1 84 0c 2f c0             mov    0xc02f0c84,%eax
c01fa341:      83 c4 14                   add    $0x14,%esp
c01fa344:      5b                         pop    %ebx
c01fa345:      5e                         pop    %esi
c01fa346:      c3                         ret    
c01fa347:      ff 05 24 df 32 c0          incl   0xc032df24
c01fa34d:      56                         push   %esi
c01fa34e:      9d                         popf  
c01fa34f:      8b 43 7c                   mov    0x7c(%ebx),%eax
c01fa352:      48                         dec    %eax
c01fa353:      74 0a                      je     c01fa35f <netif_rx+0xef>
c01fa355:      ff 4b 7c                   decl   0x7c(%ebx)
c01fa358:      0f 94 c0                   sete   %al
c01fa35b:      84 c0                      test   %al,%al
c01fa35d:      74 08                      je     c01fa367 <netif_rx+0xf7>
c01fa35f:      89 1c 24                   mov    %ebx,(%esp,1)
c01fa362:      e8 19 b6 ff ff             call   c01f5980 <__kfree_skb>
c01fa367:      b8 01 00 00 00             mov    $0x1,%eax
c01fa36c:      eb d3                      jmp    c01fa341 <netif_rx+0xd1>
c01fa36e:      89 f6                      mov    %esi,%esi
c01fa370:      a1 80 0c 2f c0             mov    0xc02f0c80,%eax
c01fa375:      85 c0                      test   %eax,%eax
c01fa377:      74 07                      je     c01fa380 <netif_rx+0x110>
c01fa379:      31 c0                      xor    %eax,%eax
c01fa37b:      a3 80 0c 2f c0             mov    %eax,0xc02f0c80
c01fa380:      a1 d4 0c 2f c0             mov    0xc02f0cd4,%eax
c01fa385:      31 d2                      xor    %edx,%edx
c01fa387:      83 e0 02                   and    $0x2,%eax
c01fa38a:      74 18                      je     c01fa3a4 <netif_rx+0x134>
c01fa38c:      b8 05 00 00 00             mov    $0x5,%eax
c01fa391:      0f ab 05 d4 0c 2f c0       bts    %eax,0xc02f0cd4
c01fa398:      19 c0                      sbb    %eax,%eax
c01fa39a:      85 c0                      test   %eax,%eax
c01fa39c:      b8 01 00 00 00             mov    $0x1,%eax
c01fa3a1:      0f 44 d0                   cmove  %eax,%edx
c01fa3a4:      85 d2                      test   %edx,%edx
c01fa3a6:      0f 84 56 ff ff ff          je     c01fa302 <netif_rx+0x92>
c01fa3ac:      9c                         pushf  
c01fa3ad:      5a                         pop    %edx
c01fa3ae:      fa                         cli    
c01fa3af:      ff 05 94 0d 2f c0          incl   0xc02f0d94
c01fa3b5:      b9 6c 0d 2f c0             mov    $0xc02f0d6c,%ecx
c01fa3ba:      a1 9c 0c 2f c0             mov    0xc02f0c9c,%eax
c01fa3bf:      89 0d 9c 0c 2f c0          mov    %ecx,0xc02f0c9c
c01fa3c5:      b9 98 0c 2f c0             mov    $0xc02f0c98,%ecx
c01fa3ca:      89 0d 6c 0d 2f c0          mov    %ecx,0xc02f0d6c
c01fa3d0:      c7 00 6c 0d 2f c0          movl   $0xc02f0d6c,(%eax)
c01fa3d6:      a3 70 0d 2f c0             mov    %eax,0xc02f0d70
c01fa3db:      a1 74 0d 2f c0             mov    0xc02f0d74,%eax
c01fa3e0:      85 c0                      test   %eax,%eax
c01fa3e2:      78 18                      js     c01fa3fc <netif_rx+0x18c>
c01fa3e4:      a1 78 0d 2f c0             mov    0xc02f0d78,%eax
c01fa3e9:      a3 74 0d 2f c0             mov    %eax,0xc02f0d74
c01fa3ee:      83 0d 00 8c 2f c0 04       orl    $0x4,0xc02f8c00
c01fa3f5:      52                         push   %edx
c01fa3f6:      9d                         popf  
c01fa3f7:      e9 06 ff ff ff             jmp    c01fa302 <netif_rx+0x92>
c01fa3fc:      8b 0d 78 0d 2f c0          mov    0xc02f0d78,%ecx
c01fa402:      01 c8                      add    %ecx,%eax
c01fa404:      eb e3                      jmp    c01fa3e9 <netif_rx+0x179>
c01fa406:      a1 80 0c 2f c0             mov    0xc02f0c80,%eax
c01fa40b:      85 c0                      test   %eax,%eax
c01fa40d:      0f 85 34 ff ff ff          jne    c01fa347 <netif_rx+0xd7>
c01fa413:      ff 05 2c df 32 c0          incl   0xc032df2c
c01fa419:      b8 01 00 00 00             mov    $0x1,%eax
c01fa41e:      a3 80 0c 2f c0             mov    %eax,0xc02f0c80
c01fa423:      e9 1f ff ff ff             jmp    c01fa347 <netif_rx+0xd7>
c01fa428:      8d 43 10                   lea    0x10(%ebx),%eax
c01fa42b:      89 04 24                   mov    %eax,(%esp,1)
c01fa42e:      e8 ad 3a f1 ff             call   c010dee0 <do_gettimeofday>
c01fa433:      e9 4c fe ff ff             jmp    c01fa284 <netif_rx+0x14>
c01fa438:      90                         nop    
c01fa439:      8d b4 26 00 00 00 00       lea    0x0(%esi,1),%esi
Disassembly of section .text.init:

it's the printk function call, or rather, one of it's parameters.

when you refer to "skb->nh.iph" you're assuming (!!) that the nh member
(which is the "network layer header") of the sk_buff structure is pointing
to a iphdr.
nh is defined as a union, and your assumption might be wrong!
mayb it is pointing to another protocol - ipv6 ? arp? ipx? raw?

you should check the "protocol" member to find out more...

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
linux_lover2004Author Commented:
Thanks i got it  that the problem is because of printk statements. When i remove it  kernel is working fine.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.