On Fri, Dec 20, 2013 at 09:45:04AM +0800, Gavin Shan wrote: > On Thu, Dec 19, 2013 at 05:18:53PM -0600, Brian W Hart wrote: > >Prevent ioda_eeh_hub_diag() from clobbering itself when called by supplying > >a buffer for P7IOC hub diagnostic data. Take care to inform OPAL of the > >correct size for the buffer. > > > >Signed-off-by: Brian W Hart <ha...@linux.vnet.ibm.com> > >--- > > > >I hope I've understood this correctly. It looks to me like > >ioda_eeh_hub_data is effectively asking OPAL to clobber its own > >text (via 'data') when it makes the call to retrieve the hub data. > > > > Yeah, we should have used following variable as HUB diag-data instead. > > static char *hub_diag = NULL; > > However, it's not safe to allocate page-sized buffer for "hub_diag". > > >Added a hub diagnostic structure per-phb. Perhaps the diagnostic > >structure better belongs in the phb->diag union, but I wasn't sure whether > >we'd need to carry the hub and PHB diag data at the same time. > > > > Please put hub diag-data to struct pnv_phb::diag since we don't need > carry hub and PHB diag-data at same time. With it, please remove > variable "hub_diag" as well.
Thanks; will send another patch. _______________________________________________ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev