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"
[<c013a6cd>] generic_file_aio_write+0x4c/0xc2
[<c0189662>] ext3_file_write+0x19/0x83
[<c0151443>] do_sync_write+0xb0/0xeb
[<c012b065>] autoremove_wake_function+0x0/0x2d
[<cea2935f>] write_to_file+0x58/0x60 [lld]
[<cea29a13>] resp_write+0x15e/0x166 [lld]
[<c011b025>] printk+0x14/0x18
[<cea2a1d3>] vir_tape_queuecommand+0x1cf/0x220 [lld]
[<c025b384>] scsi_done+0x0/0x16
[<c025b1e8>] scsi_dispatch_cmd+0x1cf/0x249
[<c026034a>] scsi_request_fn+0x26c/0x30a
[<c01c8721>] blk_insert_request+0x71/0x82
[<c025f14e>] scsi_insert_special_req+0x1e/0x23
[<cea0554d>] st_do_scsi+0x1a4/0x1ed [st]
[<cea05371>] st_sleep_done+0x0/0x38 [st]
[<cea0697b>] st_write+0x3c2/0x636 [st]
[<cea065b9>] st_write+0x0/0x636 [st]
[<c0151527>] vfs_write+0xa9/0x14b
[<c0151668>] sys_write+0x3c/0x63
[<c0102b43>] 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?
William
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive: http://mail.nl.linux.org/kernelnewbies/
FAQ: http://kernelnewbies.org/faq/