[PATCH] BUG() call in vmalloc.c causes segmentation fault.

Robert Williamson (robbiew@us.ibm.com)
Mon, 17 Feb 2003 11:16:20 -0500


This is a MIME-formatted message. If you see this text it means that your
E-mail software does not support MIME-formatted messages.

--=_courier-5080-1045498683-0001-2
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

In the function __vmalloc() in mm/vmalloc.c. The function
is parsing the "size" parameter passed to it. If the request
is of zero bytes or if it is greater than num_physpages,
then __vmalloc calls BUG(). The NULL pointer is never
returned, which causes the segmentation fault. This BUG()
call was correctly removed for 2.5.

- Robbie

(See attached file: vmalloc.c.patch)

Robert V. Williamson <robbiew@us.ibm.com>
Linux Test Project
IBM Linux Technology Center
Phone: (512) 838-9295 T/L: 678-9295
Fax: (512) 838-4603
Web: http://ltp.sourceforge.net
IRC: #ltp on freenode.irc.net
====================
"Only two things are infinite, the universe and human stupidity, and I'm
not sure about the former." -Albert Einstein

--=_courier-5080-1045498683-0001-2
Content-Type: application/octet-stream; name="vmalloc.c.patch"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="vmalloc.c.patch"

SW5kZXg6IGZzL2xvY2tzLmMKPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0gbW0vdm1hbGxvYy5jCVRodSBOb3YgMjgg
MTc6NTM6MTUgMjAwMgorKysgbW0vdm1hbGxvYy5jLm5ldwlNb24gRmViIDE3IDExOjAzOjM4IDIw
MDMKQEAgLTIzOSw3ICsyMzksNiBAQAogCiAJc2l6ZSA9IFBBR0VfQUxJR04oc2l6ZSk7CiAJaWYg
KCFzaXplIHx8IChzaXplID4+IFBBR0VfU0hJRlQpID4gbnVtX3BoeXNwYWdlcykgewotCQlCVUco
KTsKIAkJcmV0dXJuIE5VTEw7CiAJfQogCWFyZWEgPSBnZXRfdm1fYXJlYShzaXplLCBWTV9BTExP
Qyk7Cg==

--=_courier-5080-1045498683-0001-2--