lkml.org 
[lkml]   [2023]   [Jun]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: support pmsg record size larger than kmalloc limitation
From
Date
Thanks for the pointer, the document is very helpful. Seems that I cannot use gmail to send patches. I sent it again by git send-email. I also tested myself that the patch is well-formatted. Hopefully this time it works.

> On Jun 27, 2023, at 10:35 AM, Greg KH <gregkh@linuxfoundation.org> wrote:
>
> On Tue, Jun 27, 2023 at 10:05:04AM -0700, Yuxiao Zhang wrote:
>> kfree(record->priv);
>> kfree(record);
>> if (rc != -EEXIST || !quiet)
>> diff --git a/fs/pstore/ram.c b/fs/pstore/ram.c
>> index ade66dbe5f39..296465b14fa9 100644
>> --- a/fs/pstore/ram.c
>> +++ b/fs/pstore/ram.c
>> @@ -20,6 +20,7 @@
>> #include <linux/compiler.h>
>> #include <linux/of.h>
>> #include <linux/of_address.h>
>> +#include <linux/mm.h>
>>
>> #include "internal.h"
>> #include "ram_internal.h"
>> @@ -268,7 +269,7 @@ static ssize_t ramoops_pstore_read(struct
>> pstore_record *record)
>> /* ECC correction notice */
>> record->ecc_notice_size = persistent_ram_ecc_string(prz, NULL, 0);
>>
>> - record->buf = kmalloc(size + record->ecc_notice_size + 1, GFP_KERNEL);
>> + record->buf = kvmalloc(size + record->ecc_notice_size + 1, GFP_KERNEL);
>> if (record->buf == NULL) {
>> size = -ENOMEM;
>> goto out;
>
> Please try emailing a patch to yourself and see if you can apply it
> afterwards. The kernel documentation has a section for how to handle
> email clients, perhaps you should read it?
>
> thanks,
>
> greg k-h

\
 
 \ /
  Last update: 2023-06-27 22:29    [W:0.032 / U:0.988 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site