[PATCH] Re: [Report] crash tool cannot resolve struct dm_table properly

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

 




On Thu, 13 Apr 2017, Eric Ren wrote:

> Hi,
> 
> 
> On 04/13/2017 07:28 PM, Mikulas Patocka wrote:
> > 
> > On Thu, 13 Apr 2017, Eric Ren wrote:
> > 
> > > Hi Mikulas,
> > > 
> > > When inspecting on coredump with crash tool, I find that 'dm_table' cannot
> > > be
> > > resolved properly as follows:
> > > 
> > > ===
> > > crash> struct dm_table
> > > struct dm_table {
> > >      int undefined__;
> > > }
> > > SIZE: 4
> > > ===
> > > 
> > > Looks this issue is introduced by 83d5e5b (dm: optimize use SRCU and RCU)
> > > with
> > > this code:
> > > ===
> > > +/*
> > > + * A dummy definition to make RCU happy.
> > > + * struct dm_table should never be dereferenced in this file.
> > >   + */ +struct dm_table {
> > > + int undefined__;
> > > +};
> > > +
> > > ===
> > > 
> > > It stops me from looking into dm_table when analyzing coredump. Is there
> > > any
> > > workaround?
> > > or can be fixed somehow?
> > > 
> > > Regards,
> > > Eric
> > So, move dm_table definition to drivers/md/dm.h
> Thanks. So, are your going to fix this? Or should I test on your suggestion
> and send a patch if it works?
> 
> Regards,
> Eric
> > 
> > Mikulas
> > 
> 

Hi

It turned out that the RCU macros changed and the dummy definition is no 
longer needed. So, we can remove it.



From: Mikulas Patocka <mpatocka@xxxxxxxxxx>

dm: remove dummy dm_table definition

This dummy structure definition was required for RCU macros, but it
doesn't seem to be required anymore, so delete it.

The dummy definition confuses the crash tool, see
https://www.redhat.com/archives/dm-devel/2017-April/msg00197.html

Signed-off-by: Mikulas Patocka <mpatocka@xxxxxxxxxx>

---
 drivers/md/dm-ioctl.c |    8 --------
 1 file changed, 8 deletions(-)

Index: linux-2.6/drivers/md/dm-ioctl.c
===================================================================
--- linux-2.6.orig/drivers/md/dm-ioctl.c
+++ linux-2.6/drivers/md/dm-ioctl.c
@@ -37,14 +37,6 @@ struct hash_cell {
 	struct dm_table *new_map;
 };
 
-/*
- * A dummy definition to make RCU happy.
- * struct dm_table should never be dereferenced in this file.
- */
-struct dm_table {
-	int undefined__;
-};
-
 struct vers_iter {
     size_t param_size;
     struct dm_target_versions *vers, *old_vers;

--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/dm-devel



[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux