On Fri, Aug 01, 2003 at 05:05:38PM +0200, Manuel Estrada Sainz wrote: > On Sun, Jul 27, 2003 at 11:21:34PM +0200, Manuel Estrada Sainz wrote: > > On Sun, Jul 27, 2003 at 08:21:11PM +0100, Matthew Wilcox wrote: > > > On Sat, Jul 26, 2003 at 11:04:58AM +0200, Manuel Estrada Sainz wrote: > > > > - hopefully adapt drivers/pci/pci-sysfs.c to this changes > > > > - Please double check, I didn't look very carefully on > > > > this. > > > > > > Definitely wrong. I was going to undo this change since I realised how > > > it doesn't work for you; but the change you made to the PCI code is wrong. > > > It ends up copying everything to offset 0 from the buf address. > > > > Exactly, and that is what sysfs code expects (with the rest of the > > patch), the buffer is just temporary storage, it doesn't really matter > > what offset you use as long as you don't write further than > > buffer+PAGE_SIZE and both sides of the issue agree. > > My fault, I was severely misguided here, Matthew is of course write. > Now that I understand the issue a little deeper I'll try send a correct > patch to get the issue done with. OK, this time I have tested the PCI changes and it works: the patches: - sysfs-bin-unbreak-2-main.diff: - undo recent change, made in the believe that "buffer" was the size of the whole file, it is just PAGE_SIZE in size. This was causing kernel memory corruption. - Since files are allowed to have unknown sizes, by setting their size to 0, we can't preallocate a buffer of their size on open. - sysfs-bin-unbreak-2-request_firmware.diff: - Adapt to the above sysfs change. - sysfs-bin-unbreak-2-pci.diff: - hopefully adapt drivers/pci/pci-sysfs.c to this changes. - Matthew can probably make it look prettier, but for now it works. Have a nice day Manuel -- --- Manuel Estrada Sainz ------------------------ ------------------- Let us have the serenity to accept the things we cannot change, courage to change the things we can, and wisdom to know the difference.