public inbox for linux-efi@vger.kernel.org
 help / color / mirror / Atom feed
From: Matt Fleming <matt-HNK1S37rvNbeXh+fF434Mdi2O/JbrIOy@public.gmane.org>
To: Seiji Aguchi <seiji.aguchi-7rDLJAbr9SE@public.gmane.org>
Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	matt.fleming-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org,
	tony.luck-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org,
	tomoki.sekiyama-7rDLJAbr9SE@public.gmane.org,
	dle-develop-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: Re: [PATCH v3] efivars,efi-pstore: Hold off deletion of sysfs entry until, the scan is completed
Date: Thu, 17 Oct 2013 14:18:21 +0100	[thread overview]
Message-ID: <20131017131821.GH10834@console-pimps.org> (raw)
In-Reply-To: <52584373.3010202-7rDLJAbr9SE@public.gmane.org>

On Fri, 11 Oct, at 02:29:07PM, Seiji Aguchi wrote:
> Change from v2:
> - Move dynamic memory allocation to efi_pstore_read() before holding
>   efivars->lock to protect entry->var.Data.
> - Access to entry->scanning while holding efivars->lock.
> - Move a comment about a returned value from efi_pstore_read_func() to
>   efi_pstore_read() because "size < 0" case may happen in efi_pstore_read().

It seems to me that because you're no longer dropping __efivars->lock
when reading from the EFI variable store, you actually don't need all
the ->scanning and ->deleting logic because anything that sets those
flags runs to completion while holding the lock.

Can't the patch be simplified to just allocating data.buf at the
beginning of efi_pstore_read()? Also, it would be a good idea to
introduce a #define for the 1024 magic number, e.g.

#define EFIVARS_DATA_SIZE_MAX	1024

-- 
Matt Fleming, Intel Open Source Technology Center

  parent reply	other threads:[~2013-10-17 13:18 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-11 18:29 [PATCH v3] efivars,efi-pstore: Hold off deletion of sysfs entry until, the scan is completed Seiji Aguchi
     [not found] ` <52584373.3010202-7rDLJAbr9SE@public.gmane.org>
2013-10-17  5:54   ` Madper Xie
     [not found]     ` <878uxssarf.fsf-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-10-17 13:07       ` Seiji Aguchi
     [not found]         ` <A5ED84D3BB3A384992CBB9C77DEDA4D443F0BEB4-ohthHghroY0jroPwUH3sq+6wyyQG6/Uh@public.gmane.org>
2013-10-17 14:30           ` Madper Xie
     [not found]             ` <87fvs0as1p.fsf-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-10-17 15:07               ` Madper Xie
2013-10-17 15:11                 ` Seiji Aguchi
2013-10-17 13:18   ` Matt Fleming [this message]
     [not found]     ` <20131017131821.GH10834-HNK1S37rvNbeXh+fF434Mdi2O/JbrIOy@public.gmane.org>
2013-10-18 22:30       ` Seiji Aguchi
     [not found]         ` <A5ED84D3BB3A384992CBB9C77DEDA4D443F0F2D6-ohthHghroY0jroPwUH3sq+6wyyQG6/Uh@public.gmane.org>
2013-10-30 14:35           ` Matt Fleming
     [not found]             ` <20131030143527.GB8193-HNK1S37rvNbeXh+fF434Mdi2O/JbrIOy@public.gmane.org>
2013-10-30 19:19               ` Seiji Aguchi

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=20131017131821.GH10834@console-pimps.org \
    --to=matt-hnk1s37rvnbexh+ff434mdi2o/jbrioy@public.gmane.org \
    --cc=dle-develop-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
    --cc=linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=matt.fleming-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=seiji.aguchi-7rDLJAbr9SE@public.gmane.org \
    --cc=tomoki.sekiyama-7rDLJAbr9SE@public.gmane.org \
    --cc=tony.luck-ral2JQCrhuEAvxtiuMwx3w@public.gmane.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox