diff options
author | Bart Van Assche <[email protected]> | 2016-09-14 10:46:22 +0200 |
---|---|---|
committer | Jens Axboe <[email protected]> | 2016-09-14 08:48:29 -0600 |
commit | 3e1de31b9bf608c5b35e2d0d134eb87f2a9ba4ae (patch) | |
tree | b06d27e90f22588d73d1b969dab7f26fc6e82319 /lib/mpi/mpi-bit.c | |
parent | 4382e33ad374862eacf62003bb02c750391ada05 (diff) |
block: Improve bio_set_op_attrs() robustness
Since REQ_OP_BITS == 3 and __REQ_NR_BITS == 30 it is not that hard
to pass an op_flags argument to bio_set_op_attrs() that is larger
than the number of bits reserved for the op_flags argument. Complain
if this happens. Additionally, ensure that negative arguments trigger
a complaint (1 << ... is signed while 1U << ... is unsigned; adding
0U to an integer expression causes it to be promoted to an unsigned
type).
Signed-off-by: Bart Van Assche <[email protected]>
Cc: Mike Christie <[email protected]>
Cc: Christoph Hellwig <[email protected]>
Cc: Hannes Reinecke <[email protected]>
Cc: Damien Le Moal <[email protected]>
Reviewed-by: Johannes Thumshirn <[email protected]>
Reviewed-by: Christoph Hellwig <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
Diffstat (limited to 'lib/mpi/mpi-bit.c')
0 files changed, 0 insertions, 0 deletions