]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blobdiff - ipc/msg.c
ARM: dts: bcm283x: Add VEC node in bcm283x.dtsi
[mirror_ubuntu-zesty-kernel.git] / ipc / msg.c
index 32e9bd837cde0b95d4f963aede5ccc86935b0a39..e3e52ce01123c50365f8c7a2e2079489ff0dd7c9 100644 (file)
--- a/ipc/msg.c
+++ b/ipc/msg.c
@@ -763,7 +763,10 @@ static inline int convert_mode(long *msgtyp, int msgflg)
        if (*msgtyp == 0)
                return SEARCH_ANY;
        if (*msgtyp < 0) {
-               *msgtyp = -*msgtyp;
+               if (*msgtyp == LONG_MIN) /* -LONG_MIN is undefined */
+                       *msgtyp = LONG_MAX;
+               else
+                       *msgtyp = -*msgtyp;
                return SEARCH_LESSEQUAL;
        }
        if (msgflg & MSG_EXCEPT)