From: Yi Zou Date: Tue, 14 Aug 2012 23:06:43 +0000 (-0700) Subject: target: fix NULL pointer dereference bug alloc_page() fails to get memory X-Git-Tag: v3.2.29~58 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=077bfcc044b6ec6f780bc53b206dd1ba10aa2cd3;p=pandora-kernel.git target: fix NULL pointer dereference bug alloc_page() fails to get memory commit d0e27c88d795fb9647153063ec48051fd84e1731 upstream. I am hitting this bug when the target is low in memory that fails the alloc_page() for the newly submitted command. This is a sort of off-by-one bug causing NULL pointer dereference in __free_page() since 'i' here is really the counter of total pages that have been successfully allocated here. Signed-off-by: Yi Zou Cc: Andy Grover Cc: Nicholas Bellinger Cc: Open-FCoE.org Signed-off-by: Nicholas Bellinger Signed-off-by: Ben Hutchings --- Reading git-diff-tree failed