AW: Fix in eeprom.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Jean,

currently I'm only working with Linux MIPS 2.4 kernel, 
so it would be nice if you could forward the patch for 2.6.

I have seen another problem regarding (MIPS) architecture:
	if (!(new_client = kmalloc(sizeof(struct i2c_client) +
				   sizeof(struct eeprom_data),
				   GFP_KERNEL))) {
		err = -ENOMEM;
		goto ERROR0;
	}

you request memory for two structures at a time.
The problem is, that the eeprom_data structure is not
aligned on an 8 byte boundary, which catches an 
unaligned kernel exception when working on the update_lock semaphore
on our machine (www.cantastic.de)
I would propose that you use two kmalloc() (kfree) for each
individual structure, which solves our problem.

regards
Ralf


> > what do you think about this fix?
> 
> You're correct. Nice catching. I've applied it to our CVS repository.
> 
> Will you send a patch to Greg KH for the eeprom driver in Linux 2.6, or
> do you want me to do so?



[Index of Archives]     [Linux Kernel]     [Linux Hardware Monitoring]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux