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] [day] [month] [year] [list]
Date:	Mon, 14 May 2012 21:00:38 +0200
From:	"Rafael J. Wysocki" <rjw@...k.pl>
To:	Minho Ban <mhban@...sung.com>
Cc:	Len Brown <len.brown@...el.com>, Pavel Machek <pavel@....cz>,
	Rob Landley <rob@...dley.net>, linux-kernel@...r.kernel.org,
	linux-doc@...r.kernel.org, linux-pm@...r.kernel.org
Subject: Re: [PATCH] PM / Hibernate : Use get_gendisk to verify partition if resume_file is integer format

On Monday, May 14, 2012, Minho Ban wrote:
> On 05/13/2012 06:39 AM, Rafael J. Wysocki wrote:
> > On Wednesday, May 09, 2012, Minho Ban wrote:
> >>  	/* Check if the device is there */
> >>  	swsusp_resume_device = name_to_dev_t(resume_file);
> >> +
> >> +	/*
> >> +	 * name_to_dev_t is ineffective to verify parition if resume_file is in
> >> +	 * integer format. (e.g. major:minor)
> >> +	 */
> >> +	if (isdigit(resume_file[0]) && resume_wait) {
> >> +		int partno;
> >> +		while (!get_gendisk(swsusp_resume_device, &partno))
> >> +			msleep(10);
> >> +	}
> > 
> > Hmm.  Wouldn't it be better to do:
> > 
> > 	if (isdigit(resume_file[0]) && resume_wait) {
> > 		int partno;
> > 		while (!get_gendisk(swsusp_resume_device, &partno))
> > 			msleep(10);
> > 	} else {
> > 		swsusp_resume_device = name_to_dev_t(resume_file);
> > 	}
> > 
> > ?
> 
> Do you want name_to_dev_t to be called again?  If not, swsusp_resume_device parameter 
> in get_gendisk can not be used because it is not initialized yet.

Ah, OK, I didn't notice that.

I think I can take the patch for v3.5 as is.

Thanks,
Rafael
--
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