https://github.com/torvalds/linux
Revision f3dc0e384248ea6fda0987f909007fa9ab5fb51a authored by Artem Bityutskiy on 26 October 2010, 21:23:07 UTC, committed by Linus Torvalds on 26 October 2010, 23:52:19 UTC
The 'lib_sort()' test does not free memory if it fails, and it makes the
kernel panic if it cannot allocate memory.  This patch fixes the problem.

This patch also changes several small things:
 o use 'list_add()' helper instead of adding manually
 o introduce temporary 'el1' variable to avoid ugly and unreadalbe
   "if" statement
 o make 'head' to be stack variable instead of 'kmalloc()'ed, which
   simplifies code a bit

Overall, this patch is of clean-up type.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Cc: Don Mullis <don.mullis@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent eeee9eb
History
Tip revision: f3dc0e384248ea6fda0987f909007fa9ab5fb51a authored by Artem Bityutskiy on 26 October 2010, 21:23:07 UTC
lib/list_sort: test: improve errors handling
Tip revision: f3dc0e3
File Mode Size
Documentation
arch
block
crypto
drivers
firmware
fs
include
init
ipc
kernel
lib
mm
net
samples
scripts
security
sound
tools
usr
virt
.gitignore -rw-r--r-- 936 bytes
.mailmap -rw-r--r-- 3.9 KB
COPYING -rw-r--r-- 18.3 KB
CREDITS -rw-r--r-- 91.8 KB
Kbuild -rw-r--r-- 2.5 KB
MAINTAINERS -rw-r--r-- 176.8 KB
Makefile -rw-r--r-- 51.2 KB
README -rw-r--r-- 17.0 KB
REPORTING-BUGS -rw-r--r-- 3.3 KB

README

back to top