diff options
author | David Herrmann <[email protected]> | 2014-08-24 19:23:26 +0200 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2014-08-28 11:38:04 +1000 |
commit | 00e7208997d7a42b6f7b22f582523755f43a2f9b (patch) | |
tree | f78c53805cf874e597290c8feaa4bb7282e669bb /net/lapb/lapb_subr.c | |
parent | 4d6923733f158e7f8f0695b43c30c22a59ec0a34 (diff) |
drm: fix division-by-zero on dumb_create()
Kinda unexpected, but DIV_ROUND_UP() can overflow if passed an argument
bigger than UINT_MAX - DIVISOR. Fix this by testing for "!cpp" before
using it in the following division.
Note that DIV_ROUND_UP() is defined as:
#define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d))
..this will obviously overflow if (n + d - 1) is bigger than UINT_MAX.
Reported-by: Tommi Rantala <[email protected]>
Signed-off-by: David Herrmann <[email protected]>
Reviewed-by: Rob Clark <[email protected]>
Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'net/lapb/lapb_subr.c')
0 files changed, 0 insertions, 0 deletions