Hi, sf...@users.sourceforge.net írta: > Hello Laszlo, > > Tth_Lszl_Attila: >> We are using aufs heavily, and during calling chown() from a program, the aufs code tries to dereference a NULL pointer. >> >> The kernel is 2.6.27 in Ubuntu Intrepid, the corresponding aufs code is: >> >> Downloaded from: pserver:anonym...@aufs.cvs.sourceforge.net:/cvsroot/aufs >> Current Version: Mon, 22 Sep 2008 >> Comments: Unmodified upstream checkout > > It is obsoleted. > Try aufs2 for linux-2.6.27.
We are using aufs over aufs, thus it is not an alternative now. > > >> I checked a newer version which is in Karmic, but I didn't found a significant difference in the related codes parts. > ::: >> Unfortunatelly the file->private_data is a NULL pointer, and the offset of the rw semaphore would be 4 as it appears in the backtrace. After I examined the code it seemed that this is impossible because if a file is opened, the related private_data is set to non-null by au_finfo_init() or if it is still a NULL pointer, the return value of the function is -ENOMEM. In this case the application-level open() function fails. > > Exactly. > In aufs, file->private_data should not be NULL. > I don't know what went wrong, but I'd strongly recommend you to try > aufs2 and not to use the oboleted aufs1. > Later switching to aufs2 may be possible, but we can't yet. This bug is quite strange, I know, but have you any idea what other can set the file's private_data member? My workaround is the following: * additional condition: the private data must be non-null * if this condition is not met, the ATTR_FILE is removed from ia->ia_valid if (ia->ia_valid & ATTR_FILE && ia->ia_file && ia->ia_file->private_data) { /* currently ftruncate(2) only */ file = ia->ia_file; fi_write_lock(file); ia->ia_file = au_h_fptr(file, au_fbstart(file)); } else if (ia->ia_valid & ATTR_FILE) { ia->ia_valid = ~ATTR_FILE; } The NULL dereference problem is gone, but that may break something. -- Laszlo ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july