ipc/mqueue: improve exception handling in do_mq_notify()
authorMarkus Elfring <elfring@users.sourceforge.net>
Wed, 25 Sep 2019 23:48:17 +0000 (16:48 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 26 Sep 2019 00:51:41 +0000 (17:51 -0700)
commitc231740dd95e854de5034cff8f49737d942bc098
treef7ba22624e5c50be90c98a4b59f48c51eab4f47b
parent97b0b1ad58fab9f71b1a6bc056a09af6065ec3bc
ipc/mqueue: improve exception handling in do_mq_notify()

Null pointers were assigned to local variables in a few cases as exception
handling.  The jump target “out” was used where no meaningful data
processing actions should eventually be performed by branches of an if
statement then.  Use an additional jump target for calling dev_kfree_skb()
directly.

Return also directly after error conditions were detected when no extra
clean-up is needed by this function implementation.

Link: http://lkml.kernel.org/r/592ef10e-0b69-72d0-9789-fc48f638fdfd@web.de
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Cc: Davidlohr Bueso <dave@stgolabs.net>
Cc: Manfred Spraul <manfred@colorfullife.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
ipc/mqueue.c