• Davidlohr Bueso's avatar
    ipc,msg: drop dst nil validation in copy_msg · 5f2a2d5d
    Davidlohr Bueso authored
    d0edd852 ("ipc: convert invalid scenarios to use WARN_ON") relaxed the
    nil dst parameter check, originally being a full BUG_ON.  However, this
    check seems quite unnecessary when the only purpose is for
    ceckpoint/restore (MSG_COPY flag):
    
    o The copy variable is set initially to nil, apparently as a way of
      ensuring that prepare_copy is previously called.  Which is in fact done,
      unconditionally at the beginning of do_msgrcv.
    
    o There is no concurrency with 'copy' (stack allocated in do_msgrcv).
    
    Furthermore, any errors in 'copy' (and thus prepare_copy/copy_msg) should
    always handled by IS_ERR() family.  Therefore remove this check altogether
    as it can never occur with the current users.
    Signed-off-by: default avatarDavidlohr Bueso <dbueso@suse.de>
    Cc: Stanislav Kinsbursky <skinsbursky@parallels.com>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    5f2a2d5d
Name
Last commit
Last update
..
Makefile Loading commit data...
compat.c Loading commit data...
compat_mq.c Loading commit data...
ipc_sysctl.c Loading commit data...
mq_sysctl.c Loading commit data...
mqueue.c Loading commit data...
msg.c Loading commit data...
msgutil.c Loading commit data...
namespace.c Loading commit data...
sem.c Loading commit data...
shm.c Loading commit data...
syscall.c Loading commit data...
util.c Loading commit data...
util.h Loading commit data...