From: Theodore Ts'o Date: Sat, 17 May 2014 01:40:41 +0000 (-0400) Subject: random: fix BUG_ON caused by accounting simplification X-Git-Tag: omap-for-v3.16/fixes-against-rc1~165^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f9c6d4987b23e0a514464bae6771933a48e4cd01;p=pandora-kernel.git random: fix BUG_ON caused by accounting simplification Commit ee1de406ba6eb1 ("random: simplify accounting logic") simplified things too much, in that it allows the following to trigger an overflow that results in a BUG_ON crash: dd if=/dev/urandom of=/dev/zero bs=67108707 count=1 Thanks to Peter Zihlstra for discovering the crash, and Hannes Frederic for analyizing the root cause. Signed-off-by: "Theodore Ts'o" Reported-by: Peter Zijlstra Reported-by: Hannes Frederic Sowa Cc: Greg Price --- Reading git-diff-tree failed