Messages in this thread Patch in this message | | | Date | Wed, 30 Jan 2002 11:09:28 +0300 | From | Andrey Panin <> | Subject | [PATCH] 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.
-- Andrey Panin | Embedded systems software engineer pazke@orbita1.ru | PGP key: wwwkeys.eu.pgp.netdiff -urN -X /usr/dontdiff /linux.vanilla/mm/swapfile.c /linux/mm/swapfile.c --- /linux.vanilla/mm/swapfile.c Wed Jan 30 01:07:49 2002 +++ /linux/mm/swapfile.c Tue Jan 29 21:23:46 2002 @@ -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)[unhandled content-type:application/pgp-signature]
| |