Commit 998ff7f8 authored by Neil Horman's avatar Neil Horman Committed by Greg Kroah-Hartman
Browse files

staging: unisys: BUG halt on error in I/O channel



We precheck that we have enough space in an iochannel prior to writing to
it when we send in a fragmented skb.  Given that there is no recovery from
this condition that I can see, turn it into a BUG halt

Signed-off-by: default avatarNeil Horman <nhorman@redhat.com>
Signed-off-by: default avatarBenjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent ce657aa8
Loading
Loading
Loading
Loading
+10 −2
Original line number Diff line number Diff line
@@ -254,8 +254,16 @@ visor_copy_fragsinfo_from_skb(struct sk_buff *skb, unsigned int firstfraglen,
					      page_offset,
					      skb_shinfo(skb)->frags[ii].
					      size, count, frags_max, frags);
			if (!count)
				return -EIO;
			/*
			 * add_physinfo_entries only returns
			 * zero if the frags array is out of room
			 * That should never happen because we
			 * fail above, if count+numfrags > frags_max.
			 * Given that theres no recovery mechanism from putting
			 * half a packet in the I/O channel, panic here as this
			 * should never happen
			 */
			BUG_ON(!count);
		}
	}
	if (skb_shinfo(skb)->frag_list) {