[PATCH] kexec, x86: fix kexec when boot_params.hardware_subarch != 0

Chris Leech christopher.leech at linux.intel.com
Mon Mar 28 17:45:57 EDT 2011


On Tue, Mar 29, 2011 at 06:40:12AM +0900, Simon Horman wrote:
> > +void setup_subarch(struct x86_linux_param_header *real_mode)
> > +{
> > +	int data_file;
> > +	const off_t offset = offsetof(typeof(*real_mode), hardware_subarch);
> > +
> > +	data_file = open(BOOT_PARAMS_DBGFS, O_RDONLY);
> > +	if (data_file < 0)
> > +		return;
> > +	if (lseek(data_file, offset, SEEK_SET) < 0)
> > +		goto close;
> > +	read(data, &real_mode->hardware_subarch, sizeof(uint32_t));
> 
> Should data be data_file?

Yes.  Sorry, looks like I sent an unrefreshed patch.

- Chris



More information about the kexec mailing list