[pso] [Tema3 Linux] ioctl

Florin Antonescu florinantonescu at yahoo.com
Wed Apr 23 17:55:47 EEST 2008


Intr-adevar era de la un pointer aiurea, ceea ce genera eroarea era struct ssr_dev *dev = filp->private_data; numai ca nu pusesem nimic in private_data, acum am rezolvat, iau pointerul pe alta cale, si anume: inode->i_bdev->bd_disk->private_data. Acum pare a functiona.
Addr2line imi raporta eroarea ca fiind la unregister_blkdev, ceea ce era total neadevarat.





----- Original Message ----
From: Razvan Deaconescu <razvand at cs.pub.ro>
To: Proiectarea Sistemelor de Operare <pso at cursuri.cs.pub.ro>
Sent: Wednesday, April 23, 2008 5:32:03 PM
Subject: Re: [pso] [Tema3 Linux] ioctl

On Wed, 2008-04-23 at 07:09 -0700, Florin Antonescu wrote:
> Am observat ca la executia lfunctiei ioctl(fd, SSR_IOCTL_SYNC, 0) din
> userspace, imi da Kernel Panic.
> Eu am implementat ioctl astfel: apelez sync_blockdev pentru i->b_dev
> si cele doua block_device-uri (hdb1 si hdb2) apoi apelez
> invalidate_bdev pentru cele trei block_device-uri de mai inainte. Cam
> asa am dedus din lista de discutii.
> Ce e gresit in implementarea asta?

Nu e nimic gresit. Probabil ca folosesti niste pointeri aiurea la
sync_blockdev si invalidate_bdev.

Ai folosit objdump/addr2line ca sa vezi linia exacta unde iti da
eroarea?

Razvan



-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

_______________________________________________
pso mailing list
pso at cursuri.cs.pub.ro
http://cursuri.cs.pub.ro/cgi-bin/mailman/listinfo/pso



      ____________________________________________________________________________________
Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://cursuri.cs.pub.ro/pipermail/pso/attachments/20080423/1d3f07d3/attachment.htm 


More information about the pso mailing list