lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4FAA0ABB.8090906@linux.vnet.ibm.com>
Date:	Wed, 09 May 2012 11:42:11 +0530
From:	"Srivatsa S. Bhat" <srivatsa.bhat@...ux.vnet.ibm.com>
To:	Minho Ban <mhban@...sung.com>
CC:	"Rafael J. Wysocki" <rjw@...k.pl>, Len Brown <len.brown@...el.com>,
	Pavel Machek <pavel@....cz>, linux-pm@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [RFC/PATCH] PM / Hibernate : Add wait for disk detection if resume_file
 is MAJOR:MINOR style

On 05/07/2012 01:56 PM, Minho Ban wrote:

> name_to_dev_t is not enough to check device detection when the resume_file is
> MAJOR:MINOR format. get_gendisk is needed in that case.
> 
> Signed-off-by: Minho Ban <mhban@...sung.com>
> ---
>  kernel/power/hibernate.c |   10 ++++++++++
>  1 files changed, 10 insertions(+), 0 deletions(-)
> 
> diff --git a/kernel/power/hibernate.c b/kernel/power/hibernate.c
> index e09dfbf..27efaef 100644
> --- a/kernel/power/hibernate.c
> +++ b/kernel/power/hibernate.c
> @@ -25,6 +25,8 @@
>  #include <linux/freezer.h>
>  #include <linux/gfp.h>
>  #include <linux/syscore_ops.h>
> +#include <linux/ctype.h>
> +#include <linux/genhd.h>
>  #include <scsi/scsi_scan.h>
> 
>  #include "power.h"
> @@ -749,6 +751,14 @@ static int software_resume(void)
>  		}
>  	}
> 
> +	/* name_to_dev_t is ineffective if resume_file comes in major:minor
> +	 * format */


Nitpick: Multi-line comments should be of the form:

/*
 * name_to_dev_t is ineffective....
 * ....... major:minor format
 */

Regards,
Srivatsa S. Bhat

> +	if (isdigit(resume_file[0]) && resume_wait) {
> +		int partno;
> +		while (!get_gendisk(swsusp_resume_device, &partno))
> +			msleep(10);
> +	}
> +
>   Check_image:
>  	pr_debug("PM: Hibernation image partition %d:%d present\n",
>  		MAJOR(swsusp_resume_device), MINOR(swsusp_resume_device));

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ