Skip to content

Commit

Permalink
OS-7564 panic in mac_hw_emul()
Browse files Browse the repository at this point in the history
Reviewed by: Robert Mustacchi <rm@joyent.com>
Approved by: Jason King <jason.king@joyent.com>
  • Loading branch information
rzezeski committed Mar 1, 2019
1 parent 8548fe4 commit 9a1c2cf
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion usr/src/uts/common/io/mac/mac_util.c
Expand Up @@ -20,7 +20,7 @@
*/
/*
* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright 2018 Joyent, Inc.
* Copyright 2019 Joyent, Inc.
*/

/*
Expand Down Expand Up @@ -1239,9 +1239,19 @@ mac_hw_emul(mblk_t **mp_chain, mblk_t **otail, uint_t *ocount, mac_emul_t emul)
*/
mac_sw_lso(mp, emul, &tmphead, &tmptail,
&tmpcount);
if (tmphead == NULL) {
/* mac_sw_lso() freed the mp. */
mp = next;
continue;
}
count += tmpcount;
} else if ((flags & HCK_NEEDED) && (emul & MAC_HWCKSUM_EMULS)) {
tmp = mac_sw_cksum(mp, emul);
if (tmp == NULL) {
/* mac_sw_cksum() freed the mp. */
mp = next;
continue;
}
tmphead = tmp;
tmptail = tmp;
count++;
Expand Down

0 comments on commit 9a1c2cf

Please sign in to comment.