math: give up if calculating a value is too complicated
commit73de935ee75c55e09be67a995cd9c8a88aea5451
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 9 Jul 2015 15:02:58 +0000 (9 18:02 +0300)
committerDan Carpenter <dan.carpenter@oracle.com>
Thu, 9 Jul 2015 15:02:58 +0000 (9 18:02 +0300)
tree1c46eeaeae1cd46820e3f6bd529f3902beda91dd
parent0ccf0b857e96d9794d3dcce37895886e1d093a4e
math: give up if calculating a value is too complicated

The kernel has a macro called BLK_RING_SIZE() which expands into a whole
wall of text when you precompile it.  The recursion count is over 10k.  It
leads to a compile failure because you run out of memory.

I have capped the recursion count at 200.  This seemed like a reasonable
guess.  When I tested it, there were about 40 kernel files affected.  This
seems reasonable.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
smatch_math.c