Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1281452 > unrolled thread
| Started by | Xunlei Pang <xlpang@redhat.com> |
|---|---|
| First post | 2015-12-02 06:30 +0100 |
| Last post | 2015-12-02 07:10 +0100 |
| Articles | 3 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH 1/2] kexec: Set KEXEC_TYPE_CRASH before sanity_check_segment_list() Xunlei Pang <xlpang@redhat.com> - 2015-12-02 06:30 +0100
Re: [PATCH 1/2] kexec: Set KEXEC_TYPE_CRASH before sanity_check_segment_list() Dave Young <dyoung@redhat.com> - 2015-12-02 06:50 +0100
Re: [PATCH 1/2] kexec: Set KEXEC_TYPE_CRASH before sanity_check_segment_list() Xunlei Pang <xlpang@redhat.com> - 2015-12-02 07:10 +0100
| From | Xunlei Pang <xlpang@redhat.com> |
|---|---|
| Date | 2015-12-02 06:30 +0100 |
| Subject | [PATCH 1/2] kexec: Set KEXEC_TYPE_CRASH before sanity_check_segment_list() |
| Message-ID | <qB89j-2UA-5@gated-at.bofh.it> |
sanity_check_segment_list() checks KEXEC_TYPE_CRASH flag to ensure
all the segments of the loaded crash kernel are winthin the kernel
crash resource limits, so set the flag beforehand.
Signed-off-by: Xunlei Pang <xlpang@redhat.com>
---
kernel/kexec.c | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/kernel/kexec.c b/kernel/kexec.c
index d873b64..9624391 100644
--- a/kernel/kexec.c
+++ b/kernel/kexec.c
@@ -63,16 +63,19 @@ static int kimage_alloc_init(struct kimage **rimage, unsigned long entry,
if (ret)
goto out_free_image;
- ret = sanity_check_segment_list(image);
- if (ret)
- goto out_free_image;
-
- /* Enable the special crash kernel control page allocation policy. */
+ /*
+ * Enable the special crash kernel control page allocation policy,
+ * and set the crash type flag.
+ */
if (kexec_on_panic) {
image->control_page = crashk_res.start;
image->type = KEXEC_TYPE_CRASH;
}
+ ret = sanity_check_segment_list(image);
+ if (ret)
+ goto out_free_image;
+
/*
* Find a location for the control code buffer, and add it
* the vector of segments so that it's pages will also be
--
2.5.0
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Dave Young <dyoung@redhat.com> |
|---|---|
| Date | 2015-12-02 06:50 +0100 |
| Subject | Re: [PATCH 1/2] kexec: Set KEXEC_TYPE_CRASH before sanity_check_segment_list() |
| Message-ID | <qB8sG-31B-17@gated-at.bofh.it> |
| In reply to | #1281452 |
Ccing Andrew since usually he monitors and picks up kexec patches.
On 12/02/15 at 01:26pm, Xunlei Pang wrote:
> sanity_check_segment_list() checks KEXEC_TYPE_CRASH flag to ensure
> all the segments of the loaded crash kernel are winthin the kernel
> crash resource limits, so set the flag beforehand.
Looks good except a nitpick, see comments inline.
Otherwise:
Acked-by: Dave Young <dyoung@redhat.com>
>
> Signed-off-by: Xunlei Pang <xlpang@redhat.com>
> ---
> kernel/kexec.c | 13 ++++++++-----
> 1 file changed, 8 insertions(+), 5 deletions(-)
>
> diff --git a/kernel/kexec.c b/kernel/kexec.c
> index d873b64..9624391 100644
> --- a/kernel/kexec.c
> +++ b/kernel/kexec.c
> @@ -63,16 +63,19 @@ static int kimage_alloc_init(struct kimage **rimage, unsigned long entry,
> if (ret)
> goto out_free_image;
>
> - ret = sanity_check_segment_list(image);
> - if (ret)
> - goto out_free_image;
> -
> - /* Enable the special crash kernel control page allocation policy. */
> + /*
> + * Enable the special crash kernel control page allocation policy,
> + * and set the crash type flag.
It is obvious it is setting the crash type flag, so no need to add extra
comment.
> + */
> if (kexec_on_panic) {
Like kexec_file.c, move /* Enable ... policy */ here sounds better.
> image->control_page = crashk_res.start;
> image->type = KEXEC_TYPE_CRASH;
> }
>
> + ret = sanity_check_segment_list(image);
> + if (ret)
> + goto out_free_image;
> +
> /*
> * Find a location for the control code buffer, and add it
> * the vector of segments so that it's pages will also be
> --
> 2.5.0
>
Thanks
Dave
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Xunlei Pang <xlpang@redhat.com> |
|---|---|
| Date | 2015-12-02 07:10 +0100 |
| Subject | Re: [PATCH 1/2] kexec: Set KEXEC_TYPE_CRASH before sanity_check_segment_list() |
| Message-ID | <qB8M1-3nY-5@gated-at.bofh.it> |
| In reply to | #1281462 |
Hi Dave,
On 12/02/2015 at 01:47 PM, Dave Young wrote:
> Ccing Andrew since usually he monitors and picks up kexec patches.
>
> On 12/02/15 at 01:26pm, Xunlei Pang wrote:
>> sanity_check_segment_list() checks KEXEC_TYPE_CRASH flag to ensure
>> all the segments of the loaded crash kernel are winthin the kernel
>> crash resource limits, so set the flag beforehand.
> Looks good except a nitpick, see comments inline.
>
> Otherwise:
> Acked-by: Dave Young <dyoung@redhat.com>
>
>> Signed-off-by: Xunlei Pang <xlpang@redhat.com>
>> ---
>> kernel/kexec.c | 13 ++++++++-----
>> 1 file changed, 8 insertions(+), 5 deletions(-)
>>
>> diff --git a/kernel/kexec.c b/kernel/kexec.c
>> index d873b64..9624391 100644
>> --- a/kernel/kexec.c
>> +++ b/kernel/kexec.c
>> @@ -63,16 +63,19 @@ static int kimage_alloc_init(struct kimage **rimage, unsigned long entry,
>> if (ret)
>> goto out_free_image;
>>
>> - ret = sanity_check_segment_list(image);
>> - if (ret)
>> - goto out_free_image;
>> -
>> - /* Enable the special crash kernel control page allocation policy. */
>> + /*
>> + * Enable the special crash kernel control page allocation policy,
>> + * and set the crash type flag.
> It is obvious it is setting the crash type flag, so no need to add extra
> comment.
>
>> + */
>> if (kexec_on_panic) {
> Like kexec_file.c, move /* Enable ... policy */ here sounds better.
Yea, this is better. Will do, thanks.
Regards,
Xunlei
>
>> image->control_page = crashk_res.start;
>> image->type = KEXEC_TYPE_CRASH;
>> }
>>
>> + ret = sanity_check_segment_list(image);
>> + if (ret)
>> + goto out_free_image;
>> +
>> /*
>> * Find a location for the control code buffer, and add it
>> * the vector of segments so that it's pages will also be
>> --
>> 2.5.0
>>
> Thanks
> Dave
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web