Hi!

I think LiS has an unlucky implementation of the I_LINK strioctl 
(lis_i_link() head.c) in case of a returned error from the multiplexing 
driver (ioc_error and/or M_IOCNAK).
In this case lis_i_unlink() is called (verified in LiS V2.4-LiS V2.8)
and an I_UNLINK command is sent to the driver. 

1. In my oppinion a failed operation never needs to be undone.
Other STREAMS implementations (AIX, UnixWare) don't send the I_UNLINK 
command to the driver after a failed I_LINK.

2. The implementation has a severe problem for me because the 
application that called the ioctl(fd,I_LINK,dfd) hangs forever in the 
following close(fd).
When I kill the hanging application I get sometimes a Kernel Panic:
  Unable to handle kernel paging request at virtual address 0040a30c
sometimes I get the warning:
  lis_strclose: error 4 locking stream head, closing anyway
I suppose that this is caused through some wrong updates of some counters
(sd_refcnt, ...) or other synchronization objects in lis_i_unlink().

I suggest to replace the lis_i_unlink() call from lis_i_link() 
through 
 hd->sd_mux.mx_hd = muxed->sd_mux.mx_next;
 muxed->sd_mux.mx_next = NULL;
or an equivalent function that updates the mx_hd and mx_next fields.

With best regards

Dieter Kopp
--
Dieter Kopp, MULTIDATA GmbH, [EMAIL PROTECTED]

Reply via email to