Re: patch-2.0.30, lp.c - bad patch

Dr. Werner Fink (werner@suse.de)
Thu, 1 May 1997 15:28:20 +0200


> While I was testing the parport patch and new ppa.o [1], by running
> the printer and listing the Zip drive at the same time, I got kernel
> messages saying Aiee: Scheduling in interrupt. Looking at the
> patch-2.0.30, I find that it says:
>
> --- v2.0.29/linux/drivers/char/lp.c Tue Jul 2 09:08:41 1996
> +++ linux/drivers/char/lp.c Thu Apr 3 19:15:34 1997
> @@ -116,6 +116,8 @@
> struct lp_stats *stats;
>
> do {
> + if(need_resched)
> + schedule();
> if ((status = LP_S(minor)) & LP_PBUSY) {
> if (!LP_CAREFUL_READY(minor, status))
> return 0;
>
> This is an error, isn't it???

Yes and No ... maybe the statement should be extended:

if(!intr_count && need_resched)
schedule();

to avoid such critical problems with such foreign drivers.

>
> [1] There has since been a new release of ppa.c; I plan to test it in a
> few minutes, with the above patch commented out. The log mess shown
> here is from a 2.0.30 kernel with the patch-2.0.29-parport970323a
> applied.

Werner