* [PATCH 1/2] pstore: fix build by re-resolving botched merge conflict
@ 2019-11-26 10:56 Ahmad Fatoum
2019-11-26 10:57 ` [PATCH 2/2] pstore: remove unused goto label Ahmad Fatoum
2019-11-27 13:39 ` [PATCH 1/2] pstore: fix build by re-resolving botched merge conflict Sascha Hauer
0 siblings, 2 replies; 3+ messages in thread
From: Ahmad Fatoum @ 2019-11-26 10:56 UTC (permalink / raw)
To: barebox; +Cc: Ahmad Fatoum
297ac7288 ("pstore: Only capture log messages") removed the pstore console.
v3 of the eventually merged 75a74b5c ("console: fix out-of-bounds read
in dputc(/dev/*, ...)") reinstated part of this code, which broke the
pstore build because the now removed bufsize member had a user
reintroduced in the patch.
Fix this by reverting the offending patch's changes to the pstore code.
It wasn't applicable to begin with.
Fixes: 75a74b5c ("console: fix out-of-bounds read in dputc(/dev/*, ...)")
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
Hello Sascha,
I broke pstore in v2019.10.0 because of the botched merge conflict
resolve described above. Can this patch be applied to master?
Thanks,
Ahmad
---
fs/pstore/platform.c | 29 -----------------------------
1 file changed, 29 deletions(-)
diff --git a/fs/pstore/platform.c b/fs/pstore/platform.c
index 15c0174b1f37..0a6fa38edca9 100644
--- a/fs/pstore/platform.c
+++ b/fs/pstore/platform.c
@@ -46,35 +46,6 @@ void pstore_set_kmsg_bytes(int bytes)
static int pstore_ready;
-static void pstore_console_write(const char *s, unsigned c)
-{
- const char *e = s + c;
-
- while (s < e) {
- struct pstore_record record = {
- .type = PSTORE_TYPE_CONSOLE,
- .psi = psinfo,
- };
-
- if (c > psinfo->bufsize)
- c = psinfo->bufsize;
-
- record.buf = (char *)s;
- record.size = c;
- psinfo->write_buf(PSTORE_TYPE_CONSOLE, 0, &record.id, 0,
- record.buf, 0, record.size, psinfo);
- s += c;
- c = e - s;
- }
-}
-
-static int pstore_console_puts(struct console_device *cdev, const char *s,
- size_t nbytes)
-{
- pstore_console_write(s, nbytes);
- return nbytes;
-}
-
void pstore_log(const char *str)
{
uint64_t id;
--
2.24.0
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 2/2] pstore: remove unused goto label
2019-11-26 10:56 [PATCH 1/2] pstore: fix build by re-resolving botched merge conflict Ahmad Fatoum
@ 2019-11-26 10:57 ` Ahmad Fatoum
2019-11-27 13:39 ` [PATCH 1/2] pstore: fix build by re-resolving botched merge conflict Sascha Hauer
1 sibling, 0 replies; 3+ messages in thread
From: Ahmad Fatoum @ 2019-11-26 10:57 UTC (permalink / raw)
To: barebox; +Cc: Ahmad Fatoum
Previous refactoring removed jumps to fail_clear. Remove it.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
fs/pstore/ram.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/fs/pstore/ram.c b/fs/pstore/ram.c
index 86049f989e13..b96857969269 100644
--- a/fs/pstore/ram.c
+++ b/fs/pstore/ram.c
@@ -646,7 +646,6 @@ static int ramoops_probe(struct device_d *dev)
return 0;
fail_buf:
-fail_clear:
kfree(cxt->mprz);
fail_init_mprz:
kfree(cxt->fprz);
--
2.24.0
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 1/2] pstore: fix build by re-resolving botched merge conflict
2019-11-26 10:56 [PATCH 1/2] pstore: fix build by re-resolving botched merge conflict Ahmad Fatoum
2019-11-26 10:57 ` [PATCH 2/2] pstore: remove unused goto label Ahmad Fatoum
@ 2019-11-27 13:39 ` Sascha Hauer
1 sibling, 0 replies; 3+ messages in thread
From: Sascha Hauer @ 2019-11-27 13:39 UTC (permalink / raw)
To: Ahmad Fatoum; +Cc: barebox
On Tue, Nov 26, 2019 at 11:56:59AM +0100, Ahmad Fatoum wrote:
> 297ac7288 ("pstore: Only capture log messages") removed the pstore console.
> v3 of the eventually merged 75a74b5c ("console: fix out-of-bounds read
> in dputc(/dev/*, ...)") reinstated part of this code, which broke the
> pstore build because the now removed bufsize member had a user
> reintroduced in the patch.
>
> Fix this by reverting the offending patch's changes to the pstore code.
> It wasn't applicable to begin with.
>
> Fixes: 75a74b5c ("console: fix out-of-bounds read in dputc(/dev/*, ...)")
> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> ---
> Hello Sascha,
>
> I broke pstore in v2019.10.0 because of the botched merge conflict
> resolve described above. Can this patch be applied to master?
Just did that.
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-11-27 13:39 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-26 10:56 [PATCH 1/2] pstore: fix build by re-resolving botched merge conflict Ahmad Fatoum
2019-11-26 10:57 ` [PATCH 2/2] pstore: remove unused goto label Ahmad Fatoum
2019-11-27 13:39 ` [PATCH 1/2] pstore: fix build by re-resolving botched merge conflict Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox