]> git.karo-electronics.de Git - linux-beck.git/commit
relay: check array offset before using it
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 14 Dec 2016 23:05:38 +0000 (15:05 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 Jan 2017 10:39:30 +0000 (11:39 +0100)
commitc4c11b4bdbf684540f9baf9f17fc1c7fb688f1fb
tree6d65c2c80acf9a15c60f2c3f167fa8d492484d84
parent3dd50a5e2be97d1c68545a44851be97294bfdcc7
relay: check array offset before using it

commit 9a29d0fbc2d9ad99fb8a981ab72548cc360e9d4c upstream.

Smatch complains that we started using the array offset before we
checked that it was valid.

Fixes: 017c59c042d0 ('relay: Use per CPU constructs for the relay channel buffer pointers')
Link: http://lkml.kernel.org/r/20161013084947.GC16198@mwanda
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
kernel/relay.c