William J Beksi <wjbeksi@xxxxxxxxxxxxxxxxxxxxx> wrote:
kanishk rastogi wrote:
> hi all,
>
> I am trying o write in to the file from the function Queuecommand of
> SCSI LLD. but writing from this place is giving
>
> Debug: sleeping function called from invalid context at
> include/asm/semaphore.h:99
> in_atomic():0, irqs_disabled():1 ---> "i dont understand this"
> [] generic_file_aio_write+0x4c/0xc2
> [] ext3_file_write+0x19/0x83
> [] do_sync_write+0xb0/0xeb
> [] autoremove_wake_function+0x0/0x2d
> [] write_to_file+0x58/0x60 [lld]
> [] resp_write+0x15e/0x166 [lld]
> [] printk+0x14/0x18
> [] vir_tape_queuecommand+0x1cf/0x220 [lld]
> [] scsi_done+0x0/0x16
> [] scsi_dispatch_cmd+0x1cf/0x249
> [] scsi_request_fn+0x26c/0x30a
> [] blk_insert_request+0x71/0x82
> [] scsi_insert_special_req+0x1e/0x23
> [] st_do_scsi+0x1a4/0x1ed [st]
> [] st_sleep_done+0x0/0x38 [st]
> [] st_write+0x3c2/0x636 [st]
> [] st_write+0x0/0x636 [st]
> [] vfs_write+0xa9/0x14b
> [] sys_write+0x3c/0x63
> [] sysenter_past_esp+0x54/0x75
>
>
> is there any other way of writing the file from this context
Can you use the /proc interface for this?
no i cant. because this data would be a data which is sent by the application to be written in the device which is being virtualized by our driver
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com