]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - include/net/sock.h
net: avoid limits overflow
[net-next-2.6.git] / include / net / sock.h
index c7a736228ca2dcab930f7f4a9f07d5fda2858c7c..a6338d039857bf6b00bcff087f974ebf46ae0875 100644 (file)
@@ -762,7 +762,7 @@ struct proto {
 
        /* Memory pressure */
        void                    (*enter_memory_pressure)(struct sock *sk);
-       atomic_t                *memory_allocated;      /* Current allocated memory. */
+       atomic_long_t           *memory_allocated;      /* Current allocated memory. */
        struct percpu_counter   *sockets_allocated;     /* Current number of sockets. */
        /*
         * Pressure flag: try to collapse.
@@ -771,7 +771,7 @@ struct proto {
         * is strict, actions are advisory and have some latency.
         */
        int                     *memory_pressure;
-       int                     *sysctl_mem;
+       long                    *sysctl_mem;
        int                     *sysctl_wmem;
        int                     *sysctl_rmem;
        int                     max_header;