diff options
| author | Jason Gunthorpe <jgg@mellanox.com> | 2019-06-28 21:18:23 -0300 |
|---|---|---|
| committer | Jason Gunthorpe <jgg@mellanox.com> | 2019-06-28 21:18:23 -0300 |
| commit | 371bb62158d53c1fc33e2fb9b6aeb9522caf6cf4 (patch) | |
| tree | 9442ae9b22e3cf24fbe8dcefae8862a3e4e05629 /drivers/infiniband/hw/hfi1/fault.c | |
| parent | 10dcc7448e9ea49488a38bca7551de1a9da06ad9 (diff) | |
| parent | 4b972a01a7da614b4796475f933094751a295a2f (diff) | |
| download | linux-371bb62158d53c1fc33e2fb9b6aeb9522caf6cf4.tar.gz linux-371bb62158d53c1fc33e2fb9b6aeb9522caf6cf4.tar.bz2 linux-371bb62158d53c1fc33e2fb9b6aeb9522caf6cf4.zip | |
Merge tag 'v5.2-rc6' into rdma.git for-next
For dependencies in next patches.
Resolve conflicts:
- Use uverbs_get_cleared_udata() with new cq allocation flow
- Continue to delete nes despite SPDX conflict
- Resolve list appends in mlx5_command_str()
- Use u16 for vport_rule stuff
- Resolve list appends in struct ib_client
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers/infiniband/hw/hfi1/fault.c')
| -rw-r--r-- | drivers/infiniband/hw/hfi1/fault.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/hfi1/fault.c b/drivers/infiniband/hw/hfi1/fault.c index 3fd3315d0fb0..93613e5def9b 100644 --- a/drivers/infiniband/hw/hfi1/fault.c +++ b/drivers/infiniband/hw/hfi1/fault.c @@ -153,6 +153,7 @@ static ssize_t fault_opcodes_write(struct file *file, const char __user *buf, char *dash; unsigned long range_start, range_end, i; bool remove = false; + unsigned long bound = 1U << BITS_PER_BYTE; end = strchr(ptr, ','); if (end) @@ -178,6 +179,10 @@ static ssize_t fault_opcodes_write(struct file *file, const char __user *buf, BITS_PER_BYTE); break; } + /* Check the inputs */ + if (range_start >= bound || range_end >= bound) + break; + for (i = range_start; i <= range_end; i++) { if (remove) clear_bit(i, fault->opcodes); |
