From: Stanislav Ievlev <inger@linux.ru.net>
Subject: Re: Bug
Date: Fri, 27 Apr 2001 17:38:20 +0400
Next Article (by Author): Re: Pre-Fix for rename hole Stanislav Ievlev
Previous Article (by Author): Bug Stanislav Ievlev
Top of Thread: Bug Stanislav Ievlev
Articles sorted by: [Date]
[Author]
[Subject]
This is a multi-part message in MIME format. --------------000901040602020302050600 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Stanislav Ievlev wrote: > Hello Amon! > > There is bug in RSBAC. File /proc/rsbac-info and syscall > rsbac_syslog() works in non-blocked mode. Therefore, rsbac syslog > (rklogd) go to infinity loop and use 99% of CPU. I think you forget to include some functions to rsbac_log(). Please see patch in attach > > ----------------- > With best regards > Stanislav Ievlev > <inger@linux.ru.net> > > > - > To unsubscribe from the rsbac list, send a mail to > majordomo@rsbac.org with > unsubscribe rsbac > as single line in the body. > > --------------000901040602020302050600 Content-Type: text/plain; name="rsbac-log.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="rsbac-log.patch" --- debug.c.orig Fri Mar 23 17:49:03 2001 +++ debug.c Fri Apr 27 17:15:24 2001 @@ -24,6 +24,10 @@ #include <linux/module.h> #include <linux/console.h> +/*new*/ +spinlock_t rsbac_log_lock = SPIN_LOCK_UNLOCKED; +/*new*/ + /* Boolean debug switch for data structures */ int rsbac_debug_ds = 0; @@ -620,6 +624,7 @@ error = verify_area(VERIFY_WRITE,buf,len); if (error) goto out; + #if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,0) cli(); error = -ERESTARTSYS; @@ -644,15 +649,22 @@ } sti(); #else + error=wait_event_interruptible(rlog_wait,rlog_size); + if (error) + goto out; i = 0; + spin_lock_irq(&rsbac_log_lock); while (rlog_size && i < len) { c = rlog_buf[log_start & RLOG_BUF_MASK]; log_start++; rlog_size--; + spin_unlock_irq(&rsbac_log_lock); __put_user(c,buf); buf++; i++; + spin_lock_irq(&rsbac_log_lock); } + spin_unlock_irq(&rsbac_log_lock); #endif error = i; break; --------------000901040602020302050600-- - To unsubscribe from the rsbac list, send a mail to majordomo@rsbac.org with unsubscribe rsbac as single line in the body.
Next Article (by Author): Re: Pre-Fix for rename hole Stanislav Ievlev
Previous Article (by Author): Bug Stanislav Ievlev
Top of Thread: Bug Stanislav Ievlev
Articles sorted by: [Date]
[Author]
[Subject]