<br><br><div class="gmail_quote">On Wed, Feb 22, 2012 at 9:48 AM, Kristof Provost <span dir="ltr"><<a href="mailto:kristof@sigsegv.be">kristof@sigsegv.be</a>></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 <<a href="mailto:zertsekel@gmail.com">zertsekel@gmail.com</a>> wrote:<br>
> On Tue, Feb 21, 2012 at 6:14 PM, Dave Hylands <<a href="mailto:dhylands@gmail.com">dhylands@gmail.com</a>> wrote:<br>
</div><div class="im">> > I'm assuming that the semaphore is one which is held across multiple<br>
> > calls into the kernel, otherwise you don't have an issue in the first<br>
> > place, unless there is a bug on the kernel side of things which<br>
> > actually caused the process to terminate.<br>
><br>
> Ok, but what happens if things go wrong?<br>
> For example, it driver exists abnormally (segmentation fault or something)?<br>
> Anyway, it seems very strange that the responsibility is of a driver alone!<br>
> There is the *kernel* in the system to take care of abnormal<br>
> situation, not the exit function of a driver...<br>
><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't run in kernel mode<br>
and where a crashing driver won'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'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>