Minor changes to pstore tree:
- update MAINTAINERS with current git repo, add more files. - move prz allocation checks into the walker - initialize flags correctly (by accident spinlock was technically ok) -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Kees Cook <kees@outflux.net> iQIcBAABCgAGBQJYrJo2AAoJEIly9N/cbcAm9ooP/jQcPPA4PrvC+U8Kv4JsPCbA AKiYvLpDr5F6f+8yUCyemrNj6dPdIvl0FJTCrPD2EZC6GEBXvy87umRIxzqweSi8 E/MCD9PXJoXZZR4Auy9/O2tVd38BxLXqZAd9fVAouDEJUiNPWX2Zvmna9vEGK5Yh FAJ+GL1iHtH17smrN33DmXu4ro6gl+RVLzqYZc5MoQQcAar4c+IWlZyIuHLUNjF2 FNLTJETyAsiCZQ/zvKgJW8gEWVo/qpSHelFEw/xTjcw2oAnp+H1821bd0UmzSlH6 B4Veyv8DfB2Rw+7eAdFetxQDuvuKLZbrecqSr6h6zSftDC3oXyM+Bx+f3v6RL8mt 3ijv4tToV27odBVJzIfPlXL9HN87/2P3UxVJt2e7X96BEyd/AXRXSJFOilD3tud6 Zc6qanC9Agik+URZPRuQzfGK0csdlsqu6wMmOso5qo2fvQ6TsHATtZiwQZEh2i5r 8gOZn7s1EYt5N1XXcTS5damCORnE0i4TvCryfJmR84WKwHSDe43fVnHloU/FXTjt EZM2ZIwpBMzpWh+glLl4+ARkEZMq8gMmNk1vCa+w0F6B2g+ipM3G9GqpWUiUKeKJ /LRQj8RPzIpeRe7z6wxGkDet5XZY/PM/eXriUXOz0f0Mw7WQiJdhOLsUO0kz0s6S /MWo2b1BHU32uJ41xqca =lSPN -----END PGP SIGNATURE----- Merge tag 'pstore-v4.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull pstore updates from Kees Cook: "Minor changes to pstore tree: - update MAINTAINERS with current git repo, add more files. - move prz allocation checks into the walker - initialize flags correctly (by accident spinlock was technically ok)" * tag 'pstore-v4.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: MAINTAINERS: Adjust pstore git repo URI, add files pstore: Check for prz allocation in walker pstore: Correctly initialize spinlock and flags
This commit is contained in:
commit
6d1dd93ea0
@ -9995,16 +9995,19 @@ S: Maintained
|
||||
F: drivers/block/ps3vram.c
|
||||
|
||||
PSTORE FILESYSTEM
|
||||
M: Kees Cook <keescook@chromium.org>
|
||||
M: Anton Vorontsov <anton@enomsg.org>
|
||||
M: Colin Cross <ccross@android.com>
|
||||
M: Kees Cook <keescook@chromium.org>
|
||||
M: Tony Luck <tony.luck@intel.com>
|
||||
S: Maintained
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux.git
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git for-next/pstore
|
||||
F: fs/pstore/
|
||||
F: include/linux/pstore*
|
||||
F: drivers/firmware/efi/efi-pstore.c
|
||||
F: drivers/acpi/apei/erst.c
|
||||
F: Documentation/admin-guide/ramoops.rst
|
||||
F: Documentation/devicetree/bindings/reserved-memory/ramoops.txt
|
||||
K: \b(pstore|ramoops)
|
||||
|
||||
PTP HARDWARE CLOCK SUPPORT
|
||||
M: Richard Cochran <richardcochran@gmail.com>
|
||||
|
@ -133,7 +133,8 @@ ramoops_get_next_prz(struct persistent_ram_zone *przs[], uint *c, uint max,
|
||||
struct persistent_ram_zone *prz;
|
||||
int i = (*c)++;
|
||||
|
||||
if (i >= max)
|
||||
/* Give up if we never existed or have hit the end. */
|
||||
if (!przs || i >= max)
|
||||
return NULL;
|
||||
|
||||
prz = przs[i];
|
||||
@ -280,7 +281,7 @@ static ssize_t ramoops_pstore_read(u64 *id, enum pstore_type_id *type,
|
||||
1, id, type, PSTORE_TYPE_PMSG, 0);
|
||||
|
||||
/* ftrace is last since it may want to dynamically allocate memory. */
|
||||
if (!prz_ok(prz) && cxt->fprzs) {
|
||||
if (!prz_ok(prz)) {
|
||||
if (!(cxt->flags & RAMOOPS_FLAG_FTRACE_PER_CPU)) {
|
||||
prz = ramoops_get_next_prz(cxt->fprzs,
|
||||
&cxt->ftrace_read_cnt, 1, id, type,
|
||||
|
@ -467,8 +467,7 @@ static int persistent_ram_buffer_map(phys_addr_t start, phys_addr_t size,
|
||||
}
|
||||
|
||||
static int persistent_ram_post_init(struct persistent_ram_zone *prz, u32 sig,
|
||||
struct persistent_ram_ecc_info *ecc_info,
|
||||
unsigned long flags)
|
||||
struct persistent_ram_ecc_info *ecc_info)
|
||||
{
|
||||
int ret;
|
||||
|
||||
@ -494,10 +493,9 @@ static int persistent_ram_post_init(struct persistent_ram_zone *prz, u32 sig,
|
||||
prz->buffer->sig);
|
||||
}
|
||||
|
||||
/* Rewind missing or invalid memory area. */
|
||||
prz->buffer->sig = sig;
|
||||
persistent_ram_zap(prz);
|
||||
prz->buffer_lock = __RAW_SPIN_LOCK_UNLOCKED(buffer_lock);
|
||||
prz->flags = flags;
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -533,11 +531,15 @@ struct persistent_ram_zone *persistent_ram_new(phys_addr_t start, size_t size,
|
||||
goto err;
|
||||
}
|
||||
|
||||
/* Initialize general buffer state. */
|
||||
prz->buffer_lock = __RAW_SPIN_LOCK_UNLOCKED(buffer_lock);
|
||||
prz->flags = flags;
|
||||
|
||||
ret = persistent_ram_buffer_map(start, size, prz, memtype);
|
||||
if (ret)
|
||||
goto err;
|
||||
|
||||
ret = persistent_ram_post_init(prz, sig, ecc_info, flags);
|
||||
ret = persistent_ram_post_init(prz, sig, ecc_info);
|
||||
if (ret)
|
||||
goto err;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user