struct aio_thread_reply reply; struct ubd_aio *aio; struct request *req; int err, n, fd = (int) (long) dev;  while(1){ err = os_read_file(fd, &reply, sizeof(reply)); if(err == -EAGAIN) break; if(err < 0){ printk("ubd_aio_handler - read returned err %d\n", -err); break; }  aio = container_of(reply.data, struct ubd_aio, aio); n = reply.err;  if(n == 0){ req = aio->req; req->nr_sectors -= aio->len >> 9;  if((aio->bitmap != NULL) && (atomic_dec_and_test(&aio->bitmap->count))){ aio->aio = aio->bitmap->aio; aio->len = 0; kfree(aio->bitmap); aio->bitmap = NULL; submit_aio(&aio->aio); } else { if((req->nr_sectors == 0) && (aio->bitmap == NULL)){ int len = req->hard_nr_sectors << 9; ubd_finish(req, len); }  if(aio->bitmap_buf != NULL) kfree(aio->bitmap_buf); kfree(aio); } } else if(n < 0){ ubd_finish(aio->req, n); if(aio->bitmap != NULL) kfree(aio->bitmap); if(aio->bitmap_buf != NULL) kfree(aio->bitmap_buf); kfree(aio); } } reactivate_fd(fd, UBD_IRQ);  do_ubd_request(ubd_queue);  
ubd_handler(); 
static irqreturn_t ubd_intr(int irq, void *dev, struct pt_regs *unused){	struct aio_thread_reply reply;	struct ubd_aio *aio;	struct request *req;	int err, n, fd = (int) (long) dev;	while(1){		err = os_read_file(fd, &reply, sizeof(reply));		if(err == -EAGAIN)			break;		if(err < 0){			printk("ubd_aio_handler - read returned err %d\n",			       -err);			break;		}                aio = container_of(reply.data, struct ubd_aio, aio);                n = reply.err;		if(n == 0){			req = aio->req;			req->nr_sectors -= aio->len >> 9;			if((aio->bitmap != NULL) &&			   (atomic_dec_and_test(&aio->bitmap->count))){                                aio->aio = aio->bitmap->aio;                                aio->len = 0;                                kfree(aio->bitmap);                                aio->bitmap = NULL;                                submit_aio(&aio->aio);			}			else {				if((req->nr_sectors == 0) &&                                   (aio->bitmap == NULL)){					int len = req->hard_nr_sectors << 9;					ubd_finish(req, len);				}                                if(aio->bitmap_buf != NULL)                                        kfree(aio->bitmap_buf);				kfree(aio);			}		}                else if(n < 0){                        ubd_finish(aio->req, n);                        if(aio->bitmap != NULL)                                kfree(aio->bitmap);                        if(aio->bitmap_buf != NULL)                                kfree(aio->bitmap_buf);                        kfree(aio);                }	}	reactivate_fd(fd, UBD_IRQ);        do_ubd_request(ubd_queue);	return(IRQ_HANDLED);}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/91acb21f084aa244f26839406ae7ed8aa3668058/ubd_kern.c/buggy/arch/um/drivers/ubd_kern.c