FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Crash Utility

 
 
LinkBack Thread Tools
 
Old 03-12-2012, 06:50 PM
Dave Anderson
 
Default fix command vm/files -d/mount on new kernel

----- Original Message -----
> ...
> If we can continue to have get_pathname() receive a vfsmount pointer,
> it reduces the chance of introducing new bugs like the above, and future
> maintenance will be easier.

Qiao,

Another thing I forgot to mention w/respect to simplifying your
patch. You do things like this in a number of places:

@@ -1336,9 +1336,15 @@ show_mounts(ulong one_vfsmount, int flags, struct task_context *namespace_contex
devlen = strlen("DEVNAME");

for (m = 0, vfsmnt = mntlist; m < mount_cnt; m++, vfsmnt++) {
- readmem(*vfsmnt + OFFSET(vfsmount_mnt_devname),
- KVADDR, &devp, sizeof(void *),
- "vfsmount mnt_devname", FAULT_ON_ERROR);
+ if (VALID_STRUCT(mount)) {
+ readmem(*vfsmnt+OFFSET(mount_mnt_devname),
+ KVADDR, &devp, sizeof(void *),
+ "mount mnt_devname", FAULT_ON_ERROR);
+ } else {
+ readmem(*vfsmnt+OFFSET(vfsmount_mnt_devname),
+ KVADDR, &devp, sizeof(void *),
+ "vfsmount mnt_devname", FAULT_ON_ERROR);
+ }

if (read_string(devp, buf1, BUFSIZE-1)) {
if (strlen(buf1) > devlen)

which could be simplified by a single readmem() call using OFFSET_OPTION():

readmem(*vfsmnt + OFFSET_OPTION(vfsmount_mnt_devname, mount_mnt_devname),
KVADDR, &devp, sizeof(void *), "[vfs]mount mnt_devname", FAULT_ON_ERROR);

If the first (older-kernel) option fails, then the second one is used.

Dave


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

Thread Tools




All times are GMT. The time now is 01:56 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org