From: Keir Fraser Subject: Re: xenbus_mkdir("/tools", "name") fails Date: Wed, 28 Sep 2005 14:29:51 +0100 Message-ID: <7ff92fbbeb65a5c21ed98b2143508712@cl.cam.ac.uk> References: <200509272236.22270.tiger@swsoft.mipt.ru> <5d7aca9505092720474490b62a@mail.gmail.com> <200509281707.08311.tiger@swsoft.mipt.ru> Mime-Version: 1.0 (Apple Message framework v623) Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <200509281707.08311.tiger@swsoft.mipt.ru> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Anton Korenyushkin Cc: NAHieu , xen-devel List-Id: xen-devel@lists.xenproject.org On 28 Sep 2005, at 14:07, Anton Korenyushkin wrote: > I have attached module's code. There are a lot of proc fs stuff in it, > xenbus_mkdir is called when root writes something into > /proc/xen/prmigr. I > execute commands xend start && echo 'hi' >/proc/xen/prmigr. And then i > get > reboot. Most obvious problem I can see is that the entire access isn;t protected by xenbus_lock. Given the current interface you would need to manually acquire and release the lock around your mkdir call. Actually I think that is pretty gross for singleton accesses like this. I'll change the interface to internally do the locking it requires -- exposing xenbus_lock outside xenbus is not really on. Especially since we hope to improve the locking strategy in future! I'll check somethign appropriate in and let you know to give your driver another spin. -- Keir