* [PATCH] Power Hibernate: hibernation_ops->leave should be checked as well.
@ 2010-11-26 5:06 MyungJoo Ham
2010-11-26 5:41 ` Pavel Machek
2010-11-26 22:08 ` Rafael J. Wysocki
0 siblings, 2 replies; 3+ messages in thread
From: MyungJoo Ham @ 2010-11-26 5:06 UTC (permalink / raw)
To: linux-pm; +Cc: Len Brown, kyungmin.park, myungjoo.ham, Andrew Morton
Because hibernate calls hibernation_ops->leave() without checking
whether hibernation_ops->leave is NULL or not, hiberantion_set_ops
should WARN_ON if hibernation_ops->leave is NULL.
This patch added one more condition to check hibernation_ops->leave.
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
---
kernel/power/hibernate.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/kernel/power/hibernate.c b/kernel/power/hibernate.c
index 8dc31e0..e6c498d 100644
--- a/kernel/power/hibernate.c
+++ b/kernel/power/hibernate.c
@@ -61,7 +61,7 @@ void hibernation_set_ops(struct platform_hibernation_ops *ops)
{
if (ops && !(ops->begin && ops->end && ops->pre_snapshot
&& ops->prepare && ops->finish && ops->enter && ops->pre_restore
- && ops->restore_cleanup)) {
+ && ops->restore_cleanup && ops->leave)) {
WARN_ON(1);
return;
}
--
1.7.0.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] Power Hibernate: hibernation_ops->leave should be checked as well.
2010-11-26 5:06 [PATCH] Power Hibernate: hibernation_ops->leave should be checked as well MyungJoo Ham
@ 2010-11-26 5:41 ` Pavel Machek
2010-11-26 22:08 ` Rafael J. Wysocki
1 sibling, 0 replies; 3+ messages in thread
From: Pavel Machek @ 2010-11-26 5:41 UTC (permalink / raw)
To: MyungJoo Ham
Cc: Len Brown, kyungmin.park, myungjoo.ham, linux-pm, Andrew Morton
On Fri 2010-11-26 14:06:43, MyungJoo Ham wrote:
> Because hibernate calls hibernation_ops->leave() without checking
> whether hibernation_ops->leave is NULL or not, hiberantion_set_ops
> should WARN_ON if hibernation_ops->leave is NULL.
>
> This patch added one more condition to check hibernation_ops->leave.
>
> Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
ACK.
> ---
> kernel/power/hibernate.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/kernel/power/hibernate.c b/kernel/power/hibernate.c
> index 8dc31e0..e6c498d 100644
> --- a/kernel/power/hibernate.c
> +++ b/kernel/power/hibernate.c
> @@ -61,7 +61,7 @@ void hibernation_set_ops(struct platform_hibernation_ops *ops)
> {
> if (ops && !(ops->begin && ops->end && ops->pre_snapshot
> && ops->prepare && ops->finish && ops->enter && ops->pre_restore
> - && ops->restore_cleanup)) {
> + && ops->restore_cleanup && ops->leave)) {
> WARN_ON(1);
> return;
> }
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Power Hibernate: hibernation_ops->leave should be checked as well.
2010-11-26 5:06 [PATCH] Power Hibernate: hibernation_ops->leave should be checked as well MyungJoo Ham
2010-11-26 5:41 ` Pavel Machek
@ 2010-11-26 22:08 ` Rafael J. Wysocki
1 sibling, 0 replies; 3+ messages in thread
From: Rafael J. Wysocki @ 2010-11-26 22:08 UTC (permalink / raw)
To: MyungJoo Ham
Cc: Len Brown, kyungmin.park, myungjoo.ham, linux-pm, Andrew Morton
On Friday, November 26, 2010, MyungJoo Ham wrote:
> Because hibernate calls hibernation_ops->leave() without checking
> whether hibernation_ops->leave is NULL or not, hiberantion_set_ops
> should WARN_ON if hibernation_ops->leave is NULL.
>
> This patch added one more condition to check hibernation_ops->leave.
Applied to suspend-2.6/linux-next.
Thanks,
Rafael
> Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
> ---
> kernel/power/hibernate.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/kernel/power/hibernate.c b/kernel/power/hibernate.c
> index 8dc31e0..e6c498d 100644
> --- a/kernel/power/hibernate.c
> +++ b/kernel/power/hibernate.c
> @@ -61,7 +61,7 @@ void hibernation_set_ops(struct platform_hibernation_ops *ops)
> {
> if (ops && !(ops->begin && ops->end && ops->pre_snapshot
> && ops->prepare && ops->finish && ops->enter && ops->pre_restore
> - && ops->restore_cleanup)) {
> + && ops->restore_cleanup && ops->leave)) {
> WARN_ON(1);
> return;
> }
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-11-26 22:08 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-26 5:06 [PATCH] Power Hibernate: hibernation_ops->leave should be checked as well MyungJoo Ham
2010-11-26 5:41 ` Pavel Machek
2010-11-26 22:08 ` Rafael J. Wysocki
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox