mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Barebox List <barebox@lists.infradead.org>
Subject: Re: [PATCH 4/4] fs: free unused dentries
Date: Tue, 15 Sep 2020 15:28:10 +0200	[thread overview]
Message-ID: <7d170c31-d117-0493-6487-364de7b285b9@pengutronix.de> (raw)
In-Reply-To: <20200915131219.GP4498@pengutronix.de>

Hello,

On 9/15/20 3:12 PM, Sascha Hauer wrote:
> On Tue, Sep 15, 2020 at 10:01:23AM +0200, Ahmad Fatoum wrote:
>> Hello Sascha,
>>
>> On 9/15/20 9:12 AM, Sascha Hauer wrote:
>>> On Tue, Sep 15, 2020 at 07:25:15AM +0200, Ahmad Fatoum wrote:
>>>> Hello Sascha,
>>>>
>>>> On 9/14/20 3:06 PM, Sascha Hauer wrote:
>>>>> So far we only ever freed dentries when the filesystem they are on is
>>>>> unmounted. With this patch we actually trust reference counting and free
>>>>> the dentries once the reference count hits zero.
>>>>
>>>> Unless I revert this patch, I run into a crash doing:
>>>>
>>>> dd if=/dev/zero of=barebox.env count=1
>>>> ./barebox --image=barebox.env
>>>> barebox@barebox sandbox:/ saveenv
>>>> saving environment
>>>
>>> "saveenv" answers with: "saveenv: No such file or directory". Did you
>>> mean to do a "saveenv /dev/fd0"?
>>>
>>>> barebox@barebox sandbox:/ reset
>>>> =================================================================
>>>> ==894761==ERROR: AddressSanitizer: heap-use-after-free on address 0x60e000005d70 at pc 0x5617cfde210a bp 0x7ffff89957d0 sp 0x7ffff89957c8
>>>
>>> I can't reproduce this here unfortunately.
>>
>> Sorry, should've been ./barebox --env=barebox.env
>>
>> I can reproduce it with upstream/next (91a23b64445b8861acbfd96fcc03082b343b0211)
>> and sandbox_defconfig (+CONFIG_RESET). saveenv; reset results in a segmentation fault.
>> CONFIG_KASAN=y
>> CONFIG_MALLOC_LIBC=y
>> gives the better debugging output.
> 
> Hm, still can't reproduce, neither with
> 91a23b64445b8861acbfd96fcc03082b343b0211 nor with current next.

Just tried on the build server; could you try to run nv autoboot=abort; reset instead?

> 
> Sascha
> 
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2020-09-15 13:28 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-14 13:06 [PATCH 1/4] fs: don't free device in remove callback Sascha Hauer
2020-09-14 13:06 ` [PATCH 2/4] fs: Drop unnecessary dput() Sascha Hauer
2020-09-14 13:06 ` [PATCH 3/4] fs: Fix use after free Sascha Hauer
2020-09-14 13:06 ` [PATCH 4/4] fs: free unused dentries Sascha Hauer
2020-09-15  5:25   ` Ahmad Fatoum
2020-09-15  7:12     ` Sascha Hauer
2020-09-15  8:01       ` Ahmad Fatoum
2020-09-15 13:12         ` Sascha Hauer
2020-09-15 13:28           ` Ahmad Fatoum [this message]
2020-09-16 10:43             ` Ahmad Fatoum

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7d170c31-d117-0493-6487-364de7b285b9@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=s.hauer@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox