Message-ID: <528A1D6D.3060904@xenomai.org> Date: Mon, 18 Nov 2013 15:00:13 +0100 From: Philippe Gerum MIME-Version: 1.0 References: <528A19A6.4010506@xenomai.org> In-Reply-To: <528A19A6.4010506@xenomai.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Xenomai] [Xenomai-git] Jan Kiszka : switchtest: Account for invalid last_switch.from field List-Id: Discussions about the Xenomai project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gilles Chanteperdrix , xenomai@xenomai.org On 11/18/2013 02:44 PM, Gilles Chanteperdrix wrote: > On 11/18/2013 01:41 PM, git repository hosting wrote: >> Module: xenomai-jki >> Branch: for-forge >> Commit: 3e6d8ff9a99262e78655329dc043aacc607eb158 >> URL: >> http://git.xenomai.org/?p=xenomai-jki.git;a=commit;h=3e6d8ff9a99262e78655329dc043aacc607eb158 >> >> >> Author: Jan Kiszka >> Date: Mon Nov 18 13:19:34 2013 +0100 >> >> switchtest: Account for invalid last_switch.from field >> >> If we close a test device early, no switch may have yet taken place when >> the first call to rtswitch_to_rt/nrt happens. This can cause to_idx to >> become -1, and the system will crash. Handle this corner case >> gracefully. > > I do not see how this can happen at all. Normally all the tasks are > destroyed and joined in rtswitch_close using rtdm_task_destroy / > rtdm_task_join. So, there is probably another problem. > > The whole deletion path was heavily reworked as a consequence of moving Xenomai kthreads over regular linux contexts, so I would not be surprised if some rough edges still exist in that area. -- Philippe.