Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 27 Dec 2004 14:33:36 GMT
From:      Sergiy Vyshnevetskiy <serg@vostok.net>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   kern/75541: Forgotten tunables for sysvmsg module
Message-ID:  <200412271433.iBREXaOR062537@www.freebsd.org>
Resent-Message-ID: <200412271440.iBREeKKD062043@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         75541
>Category:       kern
>Synopsis:       Forgotten tunables for sysvmsg module
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Dec 27 14:40:20 GMT 2004
>Closed-Date:
>Last-Modified:
>Originator:     Sergiy Vyshnevetskiy
>Release:        5-stable
>Organization:
>Environment:
FreeBSD serg.vostok.net 5.3-STABLE FreeBSD 5.3-STABLE #0: Mon Dec  6 11:01:12 EET 2004     root@serg.vostok.net:/usr/5/src/sys/i386/compile/SERG  i386
>Description:
If you load sysvmsg as a module, you can't change values of msgmnb and msgtql - no such tunables.
>How-To-Repeat:
Remove options SYSVMSG from the kernel configuration file, recompile the kernel, reboot, load sysvmsg module.
>Fix:
--- sys/kern/sysv_msg.c.orig  Fri Dec  3 16:48:33 2004                          
+++ sys/kern/sysv_msg.c Fri Dec  3 17:04:58 2004                                
@@ -142,6 +142,8 @@                                                             
  TUNABLE_INT_FETCH("kern.ipc.msgssz", &msginfo.msgssz);                        
  msginfo.msgmax = msginfo.msgseg * msginfo.msgssz;                             
  TUNABLE_INT_FETCH("kern.ipc.msgmni", &msginfo.msgmni);                        
+ TUNABLE_INT_FETCH("kern.ipc.msgmnb", &msginfo.msgmnb);                        
+ TUNABLE_INT_FETCH("kern.ipc.msgtql", &msginfo.msgtql);                        
                                                                                
  msgpool = malloc(msginfo.msgmax, M_MSG, M_WAITOK);                            
  if (msgpool == NULL)                                                          
@@ -1144,8 +1146,8 @@                                                           
 SYSCTL_DECL(_kern_ipc);                                                        
 SYSCTL_INT(_kern_ipc, OID_AUTO, msgmax, CTLFLAG_RD, &msginfo.msgmax, 0, "");   
 SYSCTL_INT(_kern_ipc, OID_AUTO, msgmni, CTLFLAG_RDTUN, &msginfo.msgmni, 0, "");
-SYSCTL_INT(_kern_ipc, OID_AUTO, msgmnb, CTLFLAG_RD, &msginfo.msgmnb, 0, "");   
-SYSCTL_INT(_kern_ipc, OID_AUTO, msgtql, CTLFLAG_RD, &msginfo.msgtql, 0, "");   
+SYSCTL_INT(_kern_ipc, OID_AUTO, msgmnb, CTLFLAG_RDTUN, &msginfo.msgmnb, 0, "");
+SYSCTL_INT(_kern_ipc, OID_AUTO, msgtql, CTLFLAG_RDTUN, &msginfo.msgtql, 0, "");
 SYSCTL_INT(_kern_ipc, OID_AUTO, msgssz, CTLFLAG_RDTUN, &msginfo.msgssz, 0, "");
 SYSCTL_INT(_kern_ipc, OID_AUTO, msgseg, CTLFLAG_RDTUN, &msginfo.msgseg, 0, "");
 SYSCTL_PROC(_kern_ipc, OID_AUTO, msqids, CTLFLAG_RD,                           

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200412271433.iBREXaOR062537>