Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 290425
b: refs/heads/master
c: 01cb543
h: refs/heads/master
i:
  290423: d538f63
v: v3
  • Loading branch information
Ben Hutchings committed Feb 22, 2012
1 parent cdbfa63 commit e544606
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c3cb2a874122889c036934294dbbb8ad82f53060
refs/heads/master: 01cb543db8a2d2dbcea5f357365ce1327ac46193
11 changes: 6 additions & 5 deletions trunk/drivers/net/ethernet/sfc/siena_sriov.c
Original file line number Diff line number Diff line change
Expand Up @@ -796,12 +796,13 @@ static int efx_vfdi_set_status_page(struct efx_vf *vf)
{
struct efx_nic *efx = vf->efx;
struct vfdi_req *req = vf->buf.addr;
unsigned int page_count;
u64 page_count = req->u.set_status_page.peer_page_count;
u64 max_page_count =
(EFX_PAGE_SIZE -
offsetof(struct vfdi_req, u.set_status_page.peer_page_addr[0]))
/ sizeof(req->u.set_status_page.peer_page_addr[0]);

page_count = req->u.set_status_page.peer_page_count;
if (!req->u.set_status_page.dma_addr || EFX_PAGE_SIZE <
offsetof(struct vfdi_req,
u.set_status_page.peer_page_addr[page_count])) {
if (!req->u.set_status_page.dma_addr || page_count > max_page_count) {
if (net_ratelimit())
netif_err(efx, hw, efx->net_dev,
"ERROR: Invalid SET_STATUS_PAGE from %s\n",
Expand Down

0 comments on commit e544606

Please sign in to comment.