Re: [PATCH 2/1] ipc,mqueue: Delete bogus overflow check

2015-07-14 Thread Marcus Gelderie
Hey, I think Davidlohr has a point though on the computation of mq_treesize being redundant code. So even though the overflow check turns out to be necessary, it wouldn't hurt to do some refactoring of the computations, especially, because they occur in mutiple places as copy-paste code. @Davi

[PATCH v3] ipc: Modify message queue accounting to not take kernel data structures into account

2015-07-06 Thread Marcus Gelderie
n QSIZE is not necessary to help the user understand the limitations RLIMIT imposes on the processes. Signed-off-by: Marcus Gelderie v3 Changes: Revert QSIZE to old meaning and remove QKERSIZE field, because the rlimit accounting does not take runtime kernel overhead into account (it is a

Re: [PATCH v2] ipc: Modify message queue accounting to reflect both total user data and auxiliary kernel data

2015-06-25 Thread Marcus Gelderie
Hey all, answers in text below... TLDR: I can remove the QKERSIZE field, as I believe that it does not affect he RLIMIT accounting (details [=code] below). Question is: Should it? Before I provide another patch, I would appreciate another round of feedback, though. So... On Thu, Jun 25, 2015

[PATCH v2] ipc: Modify message queue accounting to reflect both total user data and auxiliary kernel data

2015-06-22 Thread Marcus Gelderie
d and the new implementation) and is therefore not affected by this change, nor by the previous one changing the way of accounting. Signed-off-by: Marcus Gelderie --- ipc/mqueue.c | 20 ++-- 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/ipc/mqueue.c b/ipc/mqueue.c

[PATCH] ipc: Modify message queue accounting to reflect both total user data and auxiliary kernel data

2015-06-13 Thread Marcus Gelderie
field. Signed-off-by: Marcus Gelderie --- ipc/mqueue.c | 20 ++-- 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/ipc/mqueue.c b/ipc/mqueue.c index 3aaea7f..7d4c464 100644 --- a/ipc/mqueue.c +++ b/ipc/mqueue.c @@ -41,7 +41,7 @@ #define MQUEUE_MAGIC 0x19800202 #d

Re: [PATCH] kernel:time fix race condition in alaramtimer.c

2013-07-08 Thread Marcus Gelderie
Ok you're right, that prevents it. Sorry, I missed this check somehow. Cheers Marcus On 07/08/2013 07:31 AM, Srivatsa S. Bhat wrote: > On 07/06/2013 09:37 PM, Marcus Gelderie wrote: >> This patch fixes a race condition whereby the process can be caused to >> sleep indef

[PATCH] kernel:time fix race condition in alaramtimer.c

2013-07-06 Thread Marcus Gelderie
setting its state to TASK_RUNNING) but the code is clearly written under the assumption that it can happen. In this case, the state must be set to TASK_RUNNING after the alarm has been canceled for the same reasons as above. Signed-off-by: Marcus Gelderie --- kernel/time/alarmtimer.c | 6 +- 1

Re: Race condition in time/alarmtimer.c

2013-06-29 Thread Marcus Gelderie
Hi, bouncing this mail because originally my mail address was mangled due to MUA misconfig. Sorry Marcus On Mo, Jun 24, 2013 at 09:12:03PM +0200, Marcus Gelderie wrote: > Hi, > > there seems to be a race condition in kernel/time/alarmtimer.c > > More specifically, the fol

Race condition in time/alarmtimer.c

2013-06-24 Thread Marcus Gelderie
Hi, there seems to be a race condition in kernel/time/alarmtimer.c More specifically, the following function (line numbers correspond to actual file): 584 static int alarmtimer_do_nsleep(struct alarm *alarm, ktime_t absexp) 585 { 586 alarm->data = (void *)current; 587 do { 588

Re: [PATCH 1/1] kernel:time Export symbols of functions declared in linux/alarmtimer.h

2013-06-04 Thread Marcus Gelderie
t is planned (see drivers/staging/android/TODO). Signed-off-by: Marcus Gelderie --- kernel/time/alarmtimer.c | 5 + 1 file changed, 5 insertions(+) diff --git a/kernel/time/alarmtimer.c b/kernel/time/alarmtimer.c index f11d83b..1e7d514 100644 --- a/kernel/time/alarmtimer.c +++ b/kernel/time/alar

[PATCH 1/1] kernel:time Export symbols of functions declared in linux/alarmtimer.h

2013-06-01 Thread Marcus Gelderie
Export symbols so they can be used by drivers/staging/android/alarm-dev.c. So far this is built-in but LKM support is planned (see drivers/staging/android/TODO). Signed-off-by: Marcus Gelderie --- kernel/time/alarmtimer.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff