>From: Cliff Cai [mailto:cliffcai.sh@xxxxxxxxx] >Sent: Wednesday, April 07, 2010 10:45 AM >To: Mankad, Maulik Ojas >Cc: Alan Cox; Greg KH; linux-usb@xxxxxxxxxxxxxxx >Subject: Re: g_serial: scheduling while atomic bug > > >On Tue, Apr 6, 2010 at 11:13 PM, Maulik <x0082077@xxxxxx> wrote: >> >>> -----Original Message----- >>> From: linux-usb-owner@xxxxxxxxxxxxxxx [mailto:linux-usb- >>> owner@xxxxxxxxxxxxxxx] On Behalf Of Maulik >>> Sent: Tuesday, April 06, 2010 7:24 PM >>> To: 'Alan Cox'; 'Greg KH' >>> Cc: linux-usb@xxxxxxxxxxxxxxx >>> Subject: RE: g_serial: scheduling while atomic bug >>> >>> > >>> > Trace is fairly clear - someone has tty->low_latency set >when they >>> > shouldn't. As a result the push to the ldisc ran n_tty in >the wrong >>> > context. So its a driver bug. >>> >>> Yes I just found that disabling tty->low_latency in >u_serial.c resolves >>> the >>> issue. >>> >> >> The test works in the two cases as listed below for me. >> >> (1) Setting tty->low_latency = 0 in u_serial.c >> (2) Using the patch at [1] which uses a workqueue instead of >tasklet in >> u_serial.c >> >> [1] http://marc.info/?l=linux-usb&m=126405382220848&w=2 >> >> >> Cliff, >> >> You mentioned at [2] that "Disabling tty_low_latency doesn't work". >> >> Did you face any practical issues or was it related to >theoretical concern >> of "waking up the read thread right after calling >tty_flip_buffer_push()"? >> >> [2] http://marc.info/?l=linux-usb&m=126408502425287&w=2 >> >> > >Yes,it will introduce another kind of crash in practice.The second >solution works, but it seems that even with this patch,transfering a >large file can cause data corruption. > Cliff, I tested g_serial with 4 instances (nports=4) and transfering from 1KB upto 70MB files.I did not observe any kind of crash or data corruptions with solution 2 (Using the patch at [1] which uses a workqueue instead of tasklet in u_serial.c). I am using minicom on host side and microcom on OMAP to test the data transfer. Is there any specific testcase/scenario to be run to reproduce this data corruptions? Hema-- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html