Skip to contentSkip to conversation

mmotm: slqb correctly return value for notification handler

PATCH Applied Shaohua Li 2 participants 2 messages Aug 7, 2009 – Aug 10, 2009 Memory management

lore
Share & tools
lore

Shaohua Li

author
#0 lore raw

PATCH 1/1 mmotm: slqb correctly return value for notification handler

Correctly return value for notification handler. The bug causes other handlers are ignored and panic kernel.

---
 mm/slqb.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
mm/slqb.c +4 -1
Index: mmotm/mm/slqb.c
===================================================================
@@ -2846,7 +2846,10 @@ static int slab_memory_callback(struct n
 		break;
 	}
 
-	ret = notifier_from_errno(ret);
+	if (ret)
+		ret = notifier_from_errno(ret);
+	else
+		ret = NOTIFY_OK;
 	return ret;
 }
 

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>