From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qt0-f195.google.com ([209.85.216.195]:47359 "EHLO mail-qt0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751697AbdJHSvn (ORCPT ); Sun, 8 Oct 2017 14:51:43 -0400 Received: by mail-qt0-f195.google.com with SMTP id z50so34608242qtj.4 for ; Sun, 08 Oct 2017 11:51:42 -0700 (PDT) Date: Sun, 8 Oct 2017 15:51:37 -0300 From: Ernesto =?utf-8?Q?A=2E_Fern=C3=A1ndez?= To: Hin-Tak Leung Cc: Sergei Antonov , Vyacheslav Dubeyko , Al Viro , Christoph Hellwig , Ernesto =?utf-8?Q?A=2E_Fern=C3=A1ndez?= , linux-fsdevel@vger.kernel.org Subject: Re: [PATCH] hfsplus: fix segfault when deleting all attrs of a file Message-ID: <20171008185136.GA1272@debian.home> References: <1676784878.5173672.1507350322487.ref@mail.yahoo.com> <1676784878.5173672.1507350322487@mail.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1676784878.5173672.1507350322487@mail.yahoo.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Sat, Oct 07, 2017 at 04:25:22AM +0000, Hin-Tak Leung wrote: > > -------------------------------------------- > On Sat, 7/10/17, Ernesto A. Fernández wrote: > > > A segmentation fault can be triggered by setting many xattrs > > to a file > > and then deleting it. The number must be high enough for > > more than one > > b-tree node to be needed for storage. > > Sounds like it is easily/reliably reproducible - do you have an estimate/recipe of how many xattrs minimum to trigger this problem, to test and verify this fix? I did not give a number because it depends on the size of the xattrs, and I imagine the bnode size as well, though I only tested it with the default mkfs options. Maybe I should have shared the script I used instead: touch test.file i=1 while [ $i -le 250 ]; do setfattr -n user.$i test.file ((++i)) done rm test.file Of course, if you set a value to the xattrs you will need fewer. > Thanks a lot for the work! And thank you for your attention. > Hin-Tak > > Ernest