lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Mon, 11 May 2009 18:11:44 +0100 From: Mark McLoughlin <markmc@...hat.com> To: Rusty Russell <rusty@...tcorp.com.au> Cc: netdev@...r.kernel.org, Dor Laor <dor@...hat.com>, Avi Kivity <avi@...hat.com>, virtualization@...ts.linux-foundation.org, Mark McLoughlin <markmc@...hat.com> Subject: [PATCH 1/3] virtio: teach virtio_has_feature() about transport features Drivers don't add transport features to their table, so we shouldn't check these with virtio_check_driver_offered_feature(). We could perhaps add an ->offered_feature() virtio_config_op, but that perhaps that would be overkill for a consitency check like this. Signed-off-by: Mark McLoughlin <markmc@...hat.com> --- include/linux/virtio_config.h | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/include/linux/virtio_config.h b/include/linux/virtio_config.h index bf8ec28..e4ba694 100644 --- a/include/linux/virtio_config.h +++ b/include/linux/virtio_config.h @@ -99,7 +99,9 @@ static inline bool virtio_has_feature(const struct virtio_device *vdev, if (__builtin_constant_p(fbit)) BUILD_BUG_ON(fbit >= 32); - virtio_check_driver_offered_feature(vdev, fbit); + if (fbit < VIRTIO_TRANSPORT_F_START) + virtio_check_driver_offered_feature(vdev, fbit); + return test_bit(fbit, vdev->features); } -- 1.6.0.6 -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists