summaryrefslogtreecommitdiffstats
path: root/fs/dcookies.c
diff options
context:
space:
mode:
authorHimangi Saraogi <himangi774@gmail.com>2014-07-19 23:53:35 +0200
committerScott Wood <scottwood@freescale.com>2014-07-30 02:26:31 +0200
commit983e2444100667b4b35c9d56c9a1fec1e817143c (patch)
tree8dbd5f0244c65cda464e0eef3ffc9477f1cb1aef /fs/dcookies.c
parentmemory: Freescale CoreNet Coherency Fabric error reporting driver (diff)
downloadlinux-983e2444100667b4b35c9d56c9a1fec1e817143c.tar.xz
linux-983e2444100667b4b35c9d56c9a1fec1e817143c.zip
powerpc/mpic_msgr: Use kcalloc and correct the argument to sizeof
mpic_msgrs has type struct mpic_msgr **, not struct mpic_msgr *, so the elements of the array should have pointer type, not structure type. The advantage of kcalloc is, that will prevent integer overflows which could result from the multiplication of number of elements and size and it is also a bit nicer to read. The Coccinelle semantic patch that makes the first change is as follows: // <smpl> @disable sizeof_type_expr@ type T; T **x; @@ x = <+...sizeof( - T + *x )...+> // </smpl> Signed-off-by: Himangi Saraogi <himangi774@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Scott Wood <scottwood@freescale.com>
Diffstat (limited to 'fs/dcookies.c')
0 files changed, 0 insertions, 0 deletions