Files
linux/drivers/vhost
Stefan Hajnoczi 72de9891b5 vhost: fix vhost_vq_access_ok() log check
[ Upstream commit d14d2b7809 ]

Commit d65026c6c6 ("vhost: validate log
when IOTLB is enabled") introduced a regression.  The logic was
originally:

  if (vq->iotlb)
      return 1;
  return A && B;

After the patch the short-circuit logic for A was inverted:

  if (A || vq->iotlb)
      return A;
  return B;

This patch fixes the regression by rewriting the checks in the obvious
way, no longer returning A when vq->iotlb is non-NULL (which is hard to
understand).

Reported-by: syzbot+65a84dde0214b0387ccd@syzkaller.appspotmail.com
Cc: Jason Wang <jasowang@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-20 08:21:07 +02:00
..
2016-08-02 16:54:28 +03:00
2016-08-02 16:54:28 +03:00
2016-08-02 02:57:30 +03:00
2016-09-05 08:04:07 +02:00
2010-12-09 16:00:21 +02:00
2016-08-02 16:53:54 +03:00
2014-12-15 23:49:28 +02:00
2017-12-25 14:23:37 +01:00