DragonFly BSD
DragonFly commits List (threaded) for 2005-08
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: cvs commit: src/sys/netinet sctp_input.c


From: "Simon 'corecode' Schubert" <corecode@xxxxxxxxxxxx>
Date: Thu, 11 Aug 2005 13:05:16 +0200

On 11.08.2005, at 07:52, Joerg Sonnenberger wrote:
  Log:
  Test for malloc returning NULL.
  Not sure if doing nothing is the best solution.

It certainly isn't. Please don't arbitrarily chance code after mallocs to short circuit or not panic, unless you really understand the code. I'm pretty sure that this is wrong.

This code should use M_INTWAIT and not M_NOWAIT, just like the other
examples.

This function is being called from sctp_input() with a critical section held, so I doubt you are right. Common code I saw always uses M_NOWAIT and treats NULL as a failure.


--
Serve - BSD     +++  RENT this banner advert  +++    ASCII Ribbon   /"\
Work - Mac      +++  space for low $$$ NOW!1  +++      Campaign     \ /
Party Enjoy Relax   |   http://dragonflybsd.org      Against  HTML   \
Dude 2c 2 the max   !   http://golden-apple.biz       Mail + News   / \

Attachment: PGP.sig
Description: This is a digitally signed message part



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]