1 From: Goldwyn Rodrigues <rgoldwyn@suse.de>
2 Subject: Fix oops in set_map_drive
3 References: bnc#446824, bnc#444469
5 The oops was caused because of an unconditional free because of the
7 The error was caused because novfs_set_map_drive was not being called
8 with the right args, which caused it to request for incorrect memory
10 Cleaned up some debug messages as well, and corrected debug messages.
14 fs/novfs/daemon.c | 9 +++++----
15 fs/novfs/inode.c | 11 -----------
16 2 files changed, 5 insertions(+), 15 deletions(-)
18 Index: linux-2.6.27/fs/novfs/daemon.c
19 ===================================================================
20 --- linux-2.6.27.orig/fs/novfs/daemon.c 2008-12-02 14:57:29.000000000 +0530
21 +++ linux-2.6.27/fs/novfs/daemon.c 2008-12-02 15:03:15.000000000 +0530
22 @@ -1936,7 +1936,7 @@ static int set_map_drive(struct novfs_xp
23 full_name_hash(drivemap->name,
24 symInfo.linkOffsetLength - 1);
25 drivemap->namelen = symInfo.linkOffsetLength - 1;
26 - DbgPrint("NwdSetMapDrive: hash=0x%x path=%s\n",
27 + DbgPrint("set_map_drive: hash=0x%lx path=%s\n",
28 drivemap->hash, drivemap->name);
30 dm = (struct drive_map *) & DriveMapList.next;
31 @@ -1945,8 +1945,8 @@ static int set_map_drive(struct novfs_xp
33 list_for_each(list, &DriveMapList) {
34 dm = list_entry(list, struct drive_map, list);
35 - DbgPrint("NwdSetMapDrive: dm=0x%p\n"
37 + DbgPrint("set_map_drive: dm=0x%p\n"
41 dm, dm->hash, dm->namelen, dm->name);
42 @@ -1971,7 +1971,8 @@ static int set_map_drive(struct novfs_xp
52 Index: linux-2.6.27/fs/novfs/inode.c
53 ===================================================================
54 --- linux-2.6.27.orig/fs/novfs/inode.c 2008-12-02 15:01:46.000000000 +0530
55 +++ linux-2.6.27/fs/novfs/inode.c 2008-12-02 15:01:52.000000000 +0530
56 @@ -4055,22 +4055,11 @@ int __init init_novfs(void)
58 void __exit exit_novfs(void)
60 - printk(KERN_INFO "exit_novfs\n");
63 - printk(KERN_INFO "exit_novfs after Scope_Uninit\n");
65 novfs_daemon_queue_exit();
66 - printk(KERN_INFO "exit_novfs after Uninit_Daemon_Queue\n");
69 - printk(KERN_INFO "exit_novfs after profile_exit\n");
72 - printk(KERN_INFO "exit_novfs Uninit_Procfs_Interface\n");
74 unregister_filesystem(&novfs_fs_type);
75 - printk(KERN_INFO "exit_novfs: Exit\n");
77 if (novfs_current_mnt) {
78 kfree(novfs_current_mnt);