Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
1.I have a asynchronous driver which is a loop back driver copying data from input buf to output buf passed from the user space.
2.we use get_user_pages to access the user buffers which are allocated using posix_memalign.
3.I use kmap to get kernel virtual address from those pages.
4. I do a memcpy from input to output buffer using kmap virtual address.
5.first few times after booting there is no problem.
6.afterwards i get one of the 2 errors
a.sometimes during kunmap when kmap maps the address which is out of kernel virtual address range (trace is given below).
b.other times during memcpy the output page pointer points to an invalid memory.
the mapping of input pages is successful ddf9b000
[ 210.010657] the mapping of output pages is successful 5be77000
[ 210.010659] the mapping of input pages is successful dd302000
[ 210.010662] the mapping of output pages is successful e2bff000
[ 210.010665] the mapping of input pages is successful e26f1000
[ 210.010667] the mapping of output pages is successful d23fd000
[ 210.010670] the mapping of input pages is successful d768d000
[ 210.010672] the mapping of output pages is successful df7e8000
[ 210.010675] the mapping of input pages is successful e0432000
[ 210.010677] the mapping of output pages is successful d1bcb000
[ 210.010680] the mapping of input pages is successful e06cd000
[ 210.010682] the mapping of output pages is successful e0c81000
[ 210.010685] the mapping of input pages is successful d4b1d000
[ 210.010687] the mapping of output pages is successful d20dd000
[ 210.010690] the mapping of input pages is successful dda2d000
[ 210.010692] the mapping of output pages is successful e33d3000
[ 210.010695] Before memcpy
[ 210.010714] BUG: unable to handle kernel paging request at 5be77000
[ 210.010720] IP: [<f906239e>] pixfix2t_aio_write+0x73e/0x89c [aio_driver]
[ 210.010731] *pde = 00000000
[ 210.010735] Oops: 0002 [#1] SMP
[ 210.010740] last sysfs file: /sys/devices/pci0000:00/0000:00:1d.7/usb1/1-0:1.0/uevent
[ 210.010746] Modules linked in: aio_driver binfmt_misc snd_intel8x0 snd_es1968 fbcon tileblit font bitblit softcursor gameport vga16fb vgastate snd_ac97_codec ac97_bus snd_mpu401_uart snd_pcm_oss snd_mixer_oss snd_pcm snd_seq_dummy snd_seq_oss snd_seq_midi snd_rawmidi snd_seq_midi_event snd_seq snd_timer snd_seq_device i915 ppdev drm_kms_helper radio_maestro v4l2_common snd parport_pc intel_agp lp drm i2c_algo_bit videodev soundcore video v4l1_compat agpgart output snd_page_alloc parport usbhid hid 8139too floppy 8139cp mii
[ 210.010813] Pid: 2190, comm: gst-launch-0.10 Not tainted (2.6.32-24-generic #43-Ubuntu)
[ 210.010817] EIP: 0060:[<f906239e>] EFLAGS: 00010206 CPU: 1
[ 210.010822] EIP is at pixfix2t_aio_write+0x73e/0x89c [aio_driver]
[ 210.010826] EAX: 00000023 EBX: 00000000 ECX: 00000400 EDX: 00000000
[ 210.010829] ESI: ddf9b000 EDI: 5be77000 EBP: ec36deec ESP: ec36de8c
[ 210.010832] DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068
[ 210.010836] Process gst-launch-0.10 (pid: 2190, ti=ec36c000 task=ec300000 task.ti=ec36c000)
[ 210.010839] Stack:
[ 210.010842] f9062807 e33d3000 00000004 00000008 00000000 00000001 00000008 00000000
[ 210.010852] <0> ec308f68 00000008 ec308f60 f3c52000 00000000 00112233 00000001 b6d02000
[ 210.010863] <0> 00008000 b6d1c000 00008000 00000004 00000004 f4b50a00 00000000 00008000
[ 210.010875] Call Trace:
[ 210.010888] [<c023d84c>] ? aio_rw_vect_retry+0x6c/0x190
[ 210.010894] [<f9061c60>] ? pixfix2t_aio_write+0x0/0x89c [aio_driver]
[ 210.010899] [<c023d7e0>] ? aio_rw_vect_retry+0x0/0x190
[ 210.010904] [<c023ec77>] ? aio_run_iocb+0x57/0x150
[ 210.010909] [<c023e2dc>] ? aio_setup_iocb+0x15c/0x270
[ 210.010913] [<c023e11e>] ? __aio_get_req+0xbe/0x120
[ 210.010918] [<c023f692>] ? io_submit_one+0x172/0x200
[ 210.010923] [<c023f809>] ? sys_io_submit+0xe9/0x150
[ 210.010930] [<c01033ec>] ? syscall_call+0x7/0xb
[ 210.010933] Code: 07 28 06 f9 31 db e8 cb 83 52 c7 3b 5d c4 7d 39 8b 34 9d 20 3a 06 f9 85 f6 74 29 8b 3c 9d e0 39 06 f9 85 ff 74 1e b9 00 04 00 00 <f3> a5 8b 4d c4 89 5c 24 04 c7 04 24 0c 32 06 f9 89 4c 24 08 e8
[ 210.010997] EIP: [<f906239e>] pixfix2t_aio_write+0x73e/0x89c [aio_driver] SS:ESP 0068:ec36de8c
[ 210.011004] CR2: 000000005be77000
[ 210.011009] ---[ end trace 9828bdacbb334bc2 ]---
Last edited by vaishnavi05s; 01-17-2011 at 08:07 AM.
Reason: additional info