Re: [patch] 2.4.0: defxx oopses upon insmod if short on memory
Alan Cox (alan@lxorguk.ukuu.org.uk)
Mon, 8 Jan 2001 20:15:59 +0000 (GMT)
> @@ -2709,7 +2709,10 @@ static void dfx_rcv_init(DFX_board_t *bp
> struct sk_buff *newskb;
> bp->descr_block_virt->rcv_data[i+j].long_0 = (u32) (PI_RCV_DESCR_M_SOP |
> ((PI_RCV_DATA_K_SIZE_MAX / PI_ALIGN_K_RCV_DATA_BUFF) << PI_RCV_DESCR_V_SEG_LEN));
> - newskb = dev_alloc_skb(NEW_SKB_SIZE);
> + while (!(newskb = dev_alloc_skb(NEW_SKB_SIZE))) {
> + printk(KERN_WARNING "%s: Could not allocate receive buffer.\n", bp->dev->name);
> + schedule();
> + }
Wouldn't it be cleaner to malloc the new buffer and if that fails drop the
just received frame and reuse that skbuff?
schedule definitely isnt going to help
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/