<br><br><div class="gmail_quote">On Wed, Feb 22, 2012 at 9:48 AM, Kristof Provost <span dir="ltr">&lt;<a href="mailto:kristof@sigsegv.be">kristof@sigsegv.be</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div class="im">On 2012-02-22 11:01:52 (+0200), Konstantin Zertsekel &lt;<a href="mailto:zertsekel@gmail.com">zertsekel@gmail.com</a>&gt; wrote:<br>
&gt; On Tue, Feb 21, 2012 at 6:14 PM, Dave Hylands &lt;<a href="mailto:dhylands@gmail.com">dhylands@gmail.com</a>&gt; wrote:<br>
</div><div class="im">&gt; &gt; I&#39;m assuming that the semaphore is one which is held across multiple<br>
&gt; &gt; calls into the kernel, otherwise you don&#39;t have an issue in the first<br>
&gt; &gt; place, unless there is a bug on the kernel side of things which<br>
&gt; &gt; actually caused the process to terminate.<br>
&gt;<br>
&gt; Ok, but what happens if things go wrong?<br>
&gt; For example, it driver exists abnormally (segmentation fault or something)?<br>
&gt; Anyway, it seems very strange that the responsibility is of a driver alone!<br>
&gt; There is the *kernel* in the system to take care of abnormal<br>
&gt; situation, not the exit function of a driver...<br>
&gt;<br>
</div>The driver is part of the kernel. If it dies the whole kernel can<br>
(perhaps even should) die.<br>
<br>
There are systems, like Minix, where drivers don&#39;t run in kernel mode<br>
and where a crashing driver won&#39;t take the system down.<br>
There are advantages and disadvantages to that approach.<br>
See <a href="http://en.wikipedia.org/wiki/Microkernel" target="_blank">http://en.wikipedia.org/wiki/Microkernel</a><br>
<font color="#888888"><br></font></blockquote><div><br>I am curious though if userspace gets segmentation fault, which is SIGSEGV, kernel should be the one sending that to user space. And while sending SIGSEGV, it must be doing some exit cleanup, wherein it frees all resources. However unlike memory, i haven&#39;t seen exit code which frees lock as well? <br>

</div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><font color="#888888">
Kristof<br>
</font><div><div></div><div class="h5"><br>
<br>
_______________________________________________<br>
Kernelnewbies mailing list<br>
<a href="mailto:Kernelnewbies@kernelnewbies.org">Kernelnewbies@kernelnewbies.org</a><br>
<a href="http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies" target="_blank">http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies</a><br>
</div></div></blockquote></div><br>