diff options
author | Ryan Zezeski <rpz@joyent.com> | 2019-02-07 13:13:45 -0700 |
---|---|---|
committer | Ryan Zezeski <rpz@joyent.com> | 2019-03-01 09:17:47 -0700 |
commit | 9a1c2cfb58a9ae7026fac04af4206c2a74566ba9 (patch) | |
tree | c853a2eb3a0b35dc01d1f1c079aaa310f808e5a1 /usr/src/uts | |
parent | 8548fe460ce8a7976986f7006b67e9e8414b4ab5 (diff) | |
download | illumos-joyent-9a1c2cfb58a9ae7026fac04af4206c2a74566ba9.tar.gz |
OS-7564 panic in mac_hw_emul()
Reviewed by: Robert Mustacchi <rm@joyent.com>
Approved by: Jason King <jason.king@joyent.com>
Diffstat (limited to 'usr/src/uts')
-rw-r--r-- | usr/src/uts/common/io/mac/mac_util.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/usr/src/uts/common/io/mac/mac_util.c b/usr/src/uts/common/io/mac/mac_util.c index 111b323f81..334d1d034b 100644 --- a/usr/src/uts/common/io/mac/mac_util.c +++ b/usr/src/uts/common/io/mac/mac_util.c @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright 2018 Joyent, Inc. + * Copyright 2019 Joyent, Inc. */ /* @@ -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++; |