All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrei Borzenkov <arvidjaar@gmail.com>
To: The development of GNU GRUB <grub-devel@gnu.org>
Subject: Re: Add check when store disk cache
Date: Sat, 19 Sep 2015 10:00:32 +0300	[thread overview]
Message-ID: <55FD0810.30703@gmail.com> (raw)
In-Reply-To: <CANeKxEAfJ4pOD8m7dfq9bNyrjNjGL1nZOJxWZksYZyF+yq2A3g@mail.gmail.com>

18.09.2015 12:07, Arch Stack пишет:
> I want to use the part of the filesystem codes in GRUB to read different
> filesystems on Windows. I have almost completed it and I will release it in
> a few days.
> But it crash sometimes because of the write of zero pointer.I debug it and
> find why it crashed.

Please show stack trace of crash. GRUB does not run multithreaded so 
something different must happen.

> When I apply this patch, it won't crash because of this
> reason.
>
> On Fri, Sep 18, 2015 at 12:03 PM, Andrei Borzenkov <arvidjaar@gmail.com>
> wrote:
>
>> 18.09.2015 03:15, Arch Stack пишет:
>>
>>> I found that the function *grub_disk_cache_store* didn't check for
>>> *cache->lock* before free *cache->data*, and didn't set *cache->lock*
>>> before memcpy something to *cache->data*. If multi thread handle with the
>>> same cache at the same time, it will cause a fault.
>>>
>>
>> Do you actually observe a problem or it is pure hypothesis? GRUB does not
>> run multi-threaded and probably never will.
>>
>> I have created a patch
>>> for it.
>>>
>>>
>>>
>>> _______________________________________________
>>> Grub-devel mailing list
>>> Grub-devel@gnu.org
>>> https://lists.gnu.org/mailman/listinfo/grub-devel
>>>
>>>
>>
>> _______________________________________________
>> Grub-devel mailing list
>> Grub-devel@gnu.org
>> https://lists.gnu.org/mailman/listinfo/grub-devel
>>
>
>
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel
>



  reply	other threads:[~2015-09-19  7:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-18  0:15 Add check when store disk cache Arch Stack
2015-09-18  4:03 ` Andrei Borzenkov
2015-09-18  9:07   ` Arch Stack
2015-09-19  7:00     ` Andrei Borzenkov [this message]
2015-10-13 22:55       ` Vladimir 'φ-coder/phcoder' Serbinenko

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=55FD0810.30703@gmail.com \
    --to=arvidjaar@gmail.com \
    --cc=grub-devel@gnu.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.