From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Price Date: Fri, 4 May 2018 14:01:31 +0100 Subject: [Cluster-devel] gfs2-utils: mkfs segfault with 4.16 kernel In-Reply-To: <20180504120105.GT4608@gavran.carpriv.carnet.hr> References: <20180504094231.GN4608@gavran.carpriv.carnet.hr> <20180504095011.GP4608@gavran.carpriv.carnet.hr> <88c04bee-a2d0-0efd-f856-09d7448c0517@redhat.com> <20180504102140.GQ4608@gavran.carpriv.carnet.hr> <20180504104234.GR4608@gavran.carpriv.carnet.hr> <20180504105416.GS4608@gavran.carpriv.carnet.hr> <1cec5b2a-4544-3658-4812-b88f0e1a4cfa@redhat.com> <20180504120105.GT4608@gavran.carpriv.carnet.hr> Message-ID: List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit On 04/05/18 13:01, Valentin Vidic wrote: > On Fri, May 04, 2018 at 12:07:01PM +0100, Andrew Price wrote: >> Hm curious. I *can* reproduce the same segfaults but only if I build with >> the 4.15 header and then rebuild with the 4.16 header *without* first >> running ./configure. If I run ./configure the problem resolves itself. > > Thanks, I removed all traces of 4.15 from the system, did a clean > checkout of the repo and master does not segfault anymore :) Ok good, we're on the same page :) > I will try to fix 3.1.10 now... I suspect you'll find the problem in gfs2/libgfs2/ondisk.h where gfs2_rgrp_{in,out} copies the reserved data fields. As the field is smaller in the new gfs2_ondisk.h, the copies could write past the end of the struct into subsequent fields of the containing structure (the rgrp_tree). We should probably use sizeof() there. Same with gfs2_rindex_{in,out}. Andy