fix sys_swapon() error handling in 2.5.2-dj6
PATCH 1/1 fix sys_swapon() error handling in 2.5.2-dj6
Hi all,
error path in sys_swapon() can pass negative error code to filp_close() which generates an oops, oneliner patch attached.
Best regards.
Signature · 2 lines
Andrey Panin | Embedded systems software engineer [email protected] | PGP key: wwwkeys.eu.pgp.net
linux/mm/swapfile.c renamed from linux.vanilla/mm/swapfile.c +1 -1
@@ -1073,7 +1073,7 @@swap_list_unlock ();if (swap_map)vfree (swap_map); -if (swap_file) +if (swap_file && !IS_ERR (swap_file))filp_close (swap_file,NULL ); out:if (swap_header)