xen-netback: validate queue numbers in xenvif_set_hash_mapping()
Checking them before the grant copy means nothing as to the validity of the incoming request. As we shouldn't make the new data live before having validated it, introduce a second instance of the mapping array. Signed-off-by: Jan Beulich <jbeulich@suse.com> Reviewed-by: Paul Durrant <paul.durrant@citrix.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
780e83c259
commit
22f9cde340
@@ -241,8 +241,9 @@ struct xenvif_hash_cache {
|
||||
struct xenvif_hash {
|
||||
unsigned int alg;
|
||||
u32 flags;
|
||||
bool mapping_sel;
|
||||
u8 key[XEN_NETBK_MAX_HASH_KEY_SIZE];
|
||||
u32 mapping[XEN_NETBK_MAX_HASH_MAPPING_SIZE];
|
||||
u32 mapping[2][XEN_NETBK_MAX_HASH_MAPPING_SIZE];
|
||||
unsigned int size;
|
||||
struct xenvif_hash_cache cache;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user