Problem in command net -s

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Dave

 

I found a problem with the net -s command. It concerns line 1451 in net.c

 

    struct_socket = inode - SIZE(socket);

 

As I understand it we have the type

  struct socket_alloc {

      struct socket socket;

      struct inode vfs_inode;

  }

and we have the address of the second field and want the address of the first. The calculation, using the size of the socket struct, used in net.c require that the second field is aligned directly after the first field. This is unfortunately not true in cases I have seen. By changing the line 1451 to:

 

    struct_socket = inode - MEMBER_OFFSET("socket_alloc", "vfs_inode");

 

things work better.

 

Is this something you would like to change in Crash? I assume you will move the offset calculation to somewhere else so it is only performed once.

 

Jan

 

--
Crash-utility mailing list
Crash-utility@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/crash-utility

[Index of Archives]     [Fedora Development]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]

 

Powered by Linux