]> git.ipfire.org Git - ipfire-2.x.git/blame - src/patches/suse-2.6.27.31/patches.suse/novfs-map-drives-correctly.diff
Add a patch to fix Intel E100 wake-on-lan problems.
[ipfire-2.x.git] / src / patches / suse-2.6.27.31 / patches.suse / novfs-map-drives-correctly.diff
CommitLineData
6a930a95
BS
1From: Goldwyn Rodrigues <rgoldwyn@suse.de>
2Subject: Fix oops in set_map_drive
3References: bnc#446824, bnc#444469
4
5The oops was caused because of an unconditional free because of the
6merge changes.
7The error was caused because novfs_set_map_drive was not being called
8with the right args, which caused it to request for incorrect memory
9size.
10Cleaned up some debug messages as well, and corrected debug messages.
11
12
13---
14 fs/novfs/daemon.c | 9 +++++----
15 fs/novfs/inode.c | 11 -----------
16 2 files changed, 5 insertions(+), 15 deletions(-)
17
18Index: 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);
29
30 dm = (struct drive_map *) & DriveMapList.next;
31@@ -1945,8 +1945,8 @@ static int set_map_drive(struct novfs_xp
32
33 list_for_each(list, &DriveMapList) {
34 dm = list_entry(list, struct drive_map, list);
35- DbgPrint("NwdSetMapDrive: dm=0x%p\n"
36- " hash: 0x%x\n"
37+ DbgPrint("set_map_drive: dm=0x%p\n"
38+ " hash: 0x%lx\n"
39 " namelen: %d\n"
40 " name: %s\n",
41 dm, dm->hash, dm->namelen, dm->name);
42@@ -1971,7 +1971,8 @@ static int set_map_drive(struct novfs_xp
43 &dm->list);
44 }
45 }
46- kfree(drivemap);
47+ else
48+ kfree(drivemap);
49 up(&DriveMapLock);
50 return (retVal);
51 }
52Index: 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)
57
58 void __exit exit_novfs(void)
59 {
60- printk(KERN_INFO "exit_novfs\n");
61-
62 novfs_scope_exit();
63- printk(KERN_INFO "exit_novfs after Scope_Uninit\n");
64-
65 novfs_daemon_queue_exit();
66- printk(KERN_INFO "exit_novfs after Uninit_Daemon_Queue\n");
67-
68 novfs_profile_exit();
69- printk(KERN_INFO "exit_novfs after profile_exit\n");
70-
71 novfs_proc_exit();
72- printk(KERN_INFO "exit_novfs Uninit_Procfs_Interface\n");
73-
74 unregister_filesystem(&novfs_fs_type);
75- printk(KERN_INFO "exit_novfs: Exit\n");
76
77 if (novfs_current_mnt) {
78 kfree(novfs_current_mnt);