From: Andreas S. <an...@sc...> - 2002-09-15 22:27:17
|
* Brad Hards (bh...@bi...) [020914 03:06]: > On Sat, 14 Sep 2002 10:36, Andreas Schuldei wrote: > > * Andreas Schuldei (an...@sc...) [020914 01:26]: > > > * Andreas Schuldei (an...@sc...) [020913 13:13]: > > > Code; c0178d8b <kbd_keycode+f/21c> <===== > > > 0: 8b 37 mov (%edi),%esi <===== > > > Code; c0178d8d <kbd_keycode+11/21c> > > > 2: 83 fd 02 cmp $0x2,%ebp > > > Code; c0178d90 <kbd_keycode+14/21c> > > > > this oops takes place in the function kbd_keycode, because vt is > > a nullpointer. i added a check for vt==0 and print out some > > warning and returnd, and now it crashes no longer. > Does this happen with "vanilla" versions of 2.4.19 (or 2.4.20-pre7) or 2.5.34? it can not, since all those can not have multiple independent vt. However i did dig some more and this problem occures if the void pointer private is not initialized in kbd_connect. Then it points to NULL, and booom. The pointer gets dereferenced in kbd_keycode, where it is supposed to point to the vt_struct of the controlling terminal. This (void pointer private not beeing initialized) happens, it there are more keyboards then VTs. The common case in the bottom of the function does not catch this, it does not touch private. Would it make sense to let private point to some fix point, in that case? as a (really bad) solution i pointed it at admin_vt, which results in funny effekts, when one types on the keyboard and there is no controlling vt. then the characters showed up in my root ssh session, and i could even close that session. (c: Anyone who is better at this: what would be a sensible vt to point to? |