* [RFC] pstore-ram: remove superfluous memory size check
@ 2015-02-10 10:26 Kiran Raparthy
2015-02-10 17:08 ` Mark Salyzyn
0 siblings, 1 reply; 4+ messages in thread
From: Kiran Raparthy @ 2015-02-10 10:26 UTC (permalink / raw)
To: linux-kernel
Cc: Mark Salyzyn, Anton Vorontsov, Colin Cross, Kees Cook, Tony Luck,
Mark Salyzyn, Kiran Raparthy
From: Mark Salyzyn <salyzyn@google.com>
pstore-ram: remove superfluous memory size check
All previous checks will fail with error if memory size
is not sufficient to register a zone, so this legacy
check has become redundant.
Cc: Anton Vorontsov <anton@enomsg.org>
Cc: Colin Cross <ccross@android.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Tony Luck <tony.luck@intel.com>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Mark Salyzyn <salyzyn@android.com>
[Kiran: Added Context]
Signed-off-by: Kiran Raparthy <kumarsharma.r@gmail.com>
---
This is one of the number of patches from the Android AOSP common.git tree,
which is used on Android devices. I wanted to submit it for review
to see if it should go upstream.
fs/pstore/ram.c | 9 ---------
1 file changed, 9 deletions(-)
diff --git a/fs/pstore/ram.c b/fs/pstore/ram.c
index 8613e5b..34ed8f8 100644
--- a/fs/pstore/ram.c
+++ b/fs/pstore/ram.c
@@ -474,14 +474,6 @@ static int ramoops_probe(struct platform_device *pdev)
if (err)
goto fail_init_fprz;
- if (!cxt->przs && !cxt->cprz && !cxt->fprz) {
- pr_err("memory size too small, minimum is %zu\n",
- cxt->console_size + cxt->record_size +
- cxt->ftrace_size);
- err = -EINVAL;
- goto fail_cnt;
- }
-
cxt->pstore.data = cxt;
/*
* Console can handle any buffer size, so prefer LOG_LINE_MAX. If we
@@ -525,7 +517,6 @@ fail_buf:
kfree(cxt->pstore.buf);
fail_clear:
cxt->pstore.bufsize = 0;
-fail_cnt:
kfree(cxt->fprz);
fail_init_fprz:
kfree(cxt->cprz);
--
1.8.2.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [RFC] pstore-ram: remove superfluous memory size check
2015-02-10 10:26 [RFC] pstore-ram: remove superfluous memory size check Kiran Raparthy
@ 2015-02-10 17:08 ` Mark Salyzyn
2015-02-11 4:50 ` Kiran Kumar
0 siblings, 1 reply; 4+ messages in thread
From: Mark Salyzyn @ 2015-02-10 17:08 UTC (permalink / raw)
To: Kiran Raparthy, linux-kernel
Cc: Mark Salyzyn, Anton Vorontsov, Colin Cross, Kees Cook, Tony Luck
Please refer to '[PATCH v2 2/5] pstore: remove superfluous memory size
check'
Sincerely -- Mark Salyzyn
On 02/10/2015 02:26 AM, Kiran Raparthy wrote:
> From: Mark Salyzyn <salyzyn@google.com>
>
> pstore-ram: remove superfluous memory size check
>
> All previous checks will fail with error if memory size
> is not sufficient to register a zone, so this legacy
> check has become redundant.
>
> Cc: Anton Vorontsov <anton@enomsg.org>
> Cc: Colin Cross <ccross@android.com>
> Cc: Kees Cook <keescook@chromium.org>
> Cc: Tony Luck <tony.luck@intel.com>
> Cc: linux-kernel@vger.kernel.org
> Signed-off-by: Mark Salyzyn <salyzyn@android.com>
> [Kiran: Added Context]
> Signed-off-by: Kiran Raparthy <kumarsharma.r@gmail.com>
>
> ---
> This is one of the number of patches from the Android AOSP common.git tree,
> which is used on Android devices. I wanted to submit it for review
> to see if it should go upstream.
> [PATCH v2 2/5] pstore: remove superfluous memory size check
> fs/pstore/ram.c | 9 ---------
> 1 file changed, 9 deletions(-)
>
> diff --git a/fs/pstore/ram.c b/fs/pstore/ram.c
> index 8613e5b..34ed8f8 100644
> --- a/fs/pstore/ram.c
> +++ b/fs/pstore/ram.c
> @@ -474,14 +474,6 @@ static int ramoops_probe(struct platform_device *pdev)
> if (err)
> goto fail_init_fprz;
>
> - if (!cxt->przs && !cxt->cprz && !cxt->fprz) {
> - pr_err("memory size too small, minimum is %zu\n",
> - cxt->console_size + cxt->record_size +
> - cxt->ftrace_size);
> - err = -EINVAL;
> - goto fail_cnt;
> - }
> -
> cxt->pstore.data = cxt;
> /*
> * Console can handle any buffer size, so prefer LOG_LINE_MAX. If we
> @@ -525,7 +517,6 @@ fail_buf:
> kfree(cxt->pstore.buf);
> fail_clear:
> cxt->pstore.bufsize = 0;
> -fail_cnt:
> kfree(cxt->fprz);
> fail_init_fprz:
> kfree(cxt->cprz);
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [RFC] pstore-ram: remove superfluous memory size check
2015-02-10 17:08 ` Mark Salyzyn
@ 2015-02-11 4:50 ` Kiran Kumar
2015-02-12 16:54 ` Tony Luck
0 siblings, 1 reply; 4+ messages in thread
From: Kiran Kumar @ 2015-02-11 4:50 UTC (permalink / raw)
To: Mark Salyzyn
Cc: linux-kernel, Mark Salyzyn, Anton Vorontsov, Colin Cross,
Kees Cook, Tony Luck
On Tue, Feb 10, 2015 at 10:38 PM, Mark Salyzyn <salyzyn@android.com> wrote:
>
> Please refer to '[PATCH v2 2/5] pstore: remove superfluous memory size check'
Cool,thanks for pointing.
Regards,
Kiran
>
> Sincerely -- Mark Salyzyn
>
> On 02/10/2015 02:26 AM, Kiran Raparthy wrote:
>>
>> From: Mark Salyzyn <salyzyn@google.com>
>>
>> pstore-ram: remove superfluous memory size check
>>
>> All previous checks will fail with error if memory size
>> is not sufficient to register a zone, so this legacy
>> check has become redundant.
>>
>> Cc: Anton Vorontsov <anton@enomsg.org>
>> Cc: Colin Cross <ccross@android.com>
>> Cc: Kees Cook <keescook@chromium.org>
>> Cc: Tony Luck <tony.luck@intel.com>
>> Cc: linux-kernel@vger.kernel.org
>> Signed-off-by: Mark Salyzyn <salyzyn@android.com>
>> [Kiran: Added Context]
>> Signed-off-by: Kiran Raparthy <kumarsharma.r@gmail.com>
>>
>> ---
>> This is one of the number of patches from the Android AOSP common.git tree,
>> which is used on Android devices. I wanted to submit it for review
>> to see if it should go upstream.
>> [PATCH v2 2/5] pstore: remove superfluous memory size check
>>
>> fs/pstore/ram.c | 9 ---------
>> 1 file changed, 9 deletions(-)
>>
>> diff --git a/fs/pstore/ram.c b/fs/pstore/ram.c
>> index 8613e5b..34ed8f8 100644
>> --- a/fs/pstore/ram.c
>> +++ b/fs/pstore/ram.c
>> @@ -474,14 +474,6 @@ static int ramoops_probe(struct platform_device *pdev)
>> if (err)
>> goto fail_init_fprz;
>> - if (!cxt->przs && !cxt->cprz && !cxt->fprz) {
>> - pr_err("memory size too small, minimum is %zu\n",
>> - cxt->console_size + cxt->record_size +
>> - cxt->ftrace_size);
>> - err = -EINVAL;
>> - goto fail_cnt;
>> - }
>> -
>> cxt->pstore.data = cxt;
>> /*
>> * Console can handle any buffer size, so prefer LOG_LINE_MAX. If we
>> @@ -525,7 +517,6 @@ fail_buf:
>> kfree(cxt->pstore.buf);
>> fail_clear:
>> cxt->pstore.bufsize = 0;
>> -fail_cnt:
>> kfree(cxt->fprz);
>> fail_init_fprz:
>> kfree(cxt->cprz);
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [RFC] pstore-ram: remove superfluous memory size check
2015-02-11 4:50 ` Kiran Kumar
@ 2015-02-12 16:54 ` Tony Luck
0 siblings, 0 replies; 4+ messages in thread
From: Tony Luck @ 2015-02-12 16:54 UTC (permalink / raw)
To: Kiran Kumar
Cc: Mark Salyzyn, Linux Kernel Mailing List, Mark Salyzyn,
Anton Vorontsov, Colin Cross, Kees Cook
On Tue, Feb 10, 2015 at 8:50 PM, Kiran Kumar <kumarsharma.r@gmail.com> wrote:
> On Tue, Feb 10, 2015 at 10:38 PM, Mark Salyzyn <salyzyn@android.com> wrote:
>>
>> Please refer to '[PATCH v2 2/5] pstore: remove superfluous memory size check'
FYI: Linus pulled the pstore branch - so this patch is now upstream.
-Tony
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-02-12 16:54 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-10 10:26 [RFC] pstore-ram: remove superfluous memory size check Kiran Raparthy
2015-02-10 17:08 ` Mark Salyzyn
2015-02-11 4:50 ` Kiran Kumar
2015-02-12 16:54 ` Tony Luck
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox