linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* WARNINGs because of ide-proc handling
@ 2010-08-31 20:56 Wolfram Sang
  2010-09-02  2:33 ` David Miller
  0 siblings, 1 reply; 11+ messages in thread
From: Wolfram Sang @ 2010-08-31 20:56 UTC (permalink / raw)
  To: linux-ide

[-- Attachment #1: Type: text/plain, Size: 1548 bytes --]

Hello,

I get the following warning (and some similar ones) on my laptop running
2.6.36-rc3 when removing a CF card via pcmcia:

[ 1087.602129] WARNING: at fs/proc/generic.c:816 remove_proc_entry+0x185/0x1d0()
[ 1087.602137] Hardware name: Amilo M14255
[ 1087.602142] name 'cache'
...

It turned out that none of the entries in ide_disk_proc[] gets created when
inserting the card, so trying to remove them triggers this warning. Adding
some debug printouts

========

diff --git a/drivers/ide/ide-proc.c b/drivers/ide/ide-proc.c
index a3133d7..5016a54 100644
--- a/drivers/ide/ide-proc.c
+++ b/drivers/ide/ide-proc.c
@@ -650,6 +651,7 @@ void ide_proc_register_driver(ide_drive_t *drive, struct ide_driver *driver)
        drive->settings = driver->proc_devsets(drive);
        mutex_unlock(&ide_setting_mtx);
 
+       printk(KERN_INFO "*** wsa: %s - %p - %d\n", driver->proc_entries(drive)->name, drive->proc, (drive->media == ide_disk));
        ide_add_proc_entries(drive->proc, driver->proc_entries(drive), drive);
 }
 
========

results in:

[    9.040157] *** wsa: cache - (null) - 1

This shows that the path needed for those proc-entries does not exist at this
moment (pointer is null). So the callchain for creating all the proc-entries
seems to be disordered? The entries are present for my hard-disk, though.

Kind regards,

   Wolfram

-- 
Pengutronix e.K.                           | Wolfram Sang                |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2010-09-14  4:17 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-31 20:56 WARNINGs because of ide-proc handling Wolfram Sang
2010-09-02  2:33 ` David Miller
2010-09-02 21:28   ` Wolfram Sang
2010-09-02 22:14     ` David Miller
2010-09-03  5:53       ` Wolfram Sang
2010-09-03 12:34         ` David Miller
2010-09-03 14:21           ` Bartlomiej Zolnierkiewicz
2010-09-03 14:35           ` David Miller
2010-09-03 14:47             ` Wolfram Sang
2010-09-03 18:59             ` Wolfram Sang
2010-09-14  4:17               ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).