Murillo Bernardes
2005-Dec-12 18:35 UTC
[Xen-devel] [PATCH] Talk_to_backend on xenbus_probe only if drv->probe was sucessful
Hi, This patch makes xenbus_probe only call talk_to_backend if drv->probe() was sucessful. There is no sense in add a watch before drv->probe, because if it fails the otherend_changed callback will be called and receive a struct with invalid pointers and we get a segfault (ooops). -- Murillo Fernandes Bernardes IBM Linux Technology Center _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Ewan Mellor
2005-Dec-15 13:38 UTC
Re: [Xen-devel] [PATCH] Talk_to_backend on xenbus_probe only if drv->probe was sucessful
On Mon, Dec 12, 2005 at 04:35:45PM -0200, Murillo Bernardes wrote:> Hi, > > This patch makes xenbus_probe only call talk_to_backend if drv->probe() was > sucessful. > > There is no sense in add a watch before drv->probe, because if it fails the > otherend_changed callback will be called and receive a struct with invalid > pointers and we get a segfault (ooops).Applied, thanks Murillo. Ewan. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Murillo Bernardes
2005-Dec-15 16:59 UTC
Re: [Xen-devel] [PATCH] Talk_to_backend on xenbus_probe only if drv->probe was sucessful
On Thursday 15 December 2005 11:38, Ewan Mellor wrote:> On Mon, Dec 12, 2005 at 04:35:45PM -0200, Murillo Bernardes wrote: > > Hi, > > > > This patch makes xenbus_probe only call talk_to_backend if drv->probe() > > was sucessful. > > > > There is no sense in add a watch before drv->probe, because if it fails > > the otherend_changed callback will be called and receive a struct with > > invalid pointers and we get a segfault (ooops). > > Applied, thanks Murillo. > > Ewan.I just found a problem on that. It breaks block devices! I don''t know why yet. Do you know why block devices rely on that watch before probe? Thanks -- Murillo Fernandes Bernardes IBM Linux Technology Center _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Ewan Mellor
2005-Dec-15 17:18 UTC
Re: [Xen-devel] [PATCH] Talk_to_backend on xenbus_probe only if drv->probe was sucessful
On Thu, Dec 15, 2005 at 02:59:31PM -0200, Murillo Bernardes wrote:> On Thursday 15 December 2005 11:38, Ewan Mellor wrote: > > On Mon, Dec 12, 2005 at 04:35:45PM -0200, Murillo Bernardes wrote: > > > Hi, > > > > > > This patch makes xenbus_probe only call talk_to_backend if drv->probe() > > > was sucessful. > > > > > > There is no sense in add a watch before drv->probe, because if it fails > > > the otherend_changed callback will be called and receive a struct with > > > invalid pointers and we get a segfault (ooops). > > > > Applied, thanks Murillo. > > > > Ewan. > I just found a problem on that. It breaks block devices! I don''t know why yet. > > Do you know why block devices rely on that watch before probe?Yes, I found that one too! blkback_probe calls alloc_blkif(dev->otherend_id), so it doesn''t need the watch, but it does need the otherend details to have been read. I''m applying another patch right now. Ewan. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel