9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Pete Elmore <pete@debu.gs>
To: 9fans@9fans.net
Subject: [9fans] Small 9pcram update
Date: Wed, 20 Mar 2013 09:12:17 +0000	[thread overview]
Message-ID: <20130320091217.1c6d82426254deeee6243c81@debu.gs> (raw)

[Hi!  Here's a small update for 9pcram users, which fixes a bug and
cleans up a little.  I've included plain diff and diff -e patches.
They are the same; do not run them both.  Enjoy your free software!  ☺
-Pete]

Mycroftiv is not currently posting on 9fans.  However this is a small
bugfix and cleanup that should be posted for any 9pcram kernel users
who wish it.  Bug finder: Cinap Lenrek.

[Paid placement for diff -e format patch:
Become PHYSICALLY ATTRACTIVE -- overnight!]

gridterm: diff -e /n/ants.9gridchan.org/rootlessnext/src.9.port/devproc.c devproc.c
2020,2021d
2012,2013d
2005,2006d
1973a
		free(cbf);
.
1968,1969d
1960,1962c
			error(Ebadarg);	
.
1956,1957d
1817,1818d

[Paid placement for plain diff patch:
NYES!  The False Prophets, the Conpirators, Them, the Mediocretins, the
stupid Pink Boys, the malignant ones who breathe down our necks and
abuse their territorial urges without ever dreaming that they are doing
it, the ones who have tried to maim our self-respect down through the
centuries by making Slack and antipredictability TABOO in this human
culture.  They are the offensive ones who brought this Buck Rogers
monstrosity of microchips and inflation, nothing makes sense anymore and
everything costs too much, the weather is weird, WHY DID THEY DO IT?
Don't they know they're begging for the flaming sword of Retribution??]

gridterm: diff /n/ants.9gridchan.org/rootlessnext/src.9.port/devproc.c devproc.c
1817,1818d1816
< 			poperror();
< 			return -1;
1956,1957d1953
< 		poperror();
< 		return;
1960,1962c1956
< 			error(Ebadarg);
< 			poperror();
< 			return;		
---
> 			error(Ebadarg);	
1968,1969d1961
< 			poperror();
< 			return;
1973a1966
> 		free(cbf);
2005,2006d1997
< 			poperror();
< 			return;
2012,2013d2002
< 			poperror();
< 			return;
2020,2021d2008
< 			poperror();
< 			return;

[I think it's probably obvious, but "I" below is not me.  -Pete]

NOTES:
The bugfix is the addition of free(cbf) to the return path of the
unmount option from /proc.  Without this, this leaks the buffer and
could eventually exhaust kernel memory if a massive number of unmount
through /proc were performed.  This bug status severity is LOW, and I
won't be uploading recompiled kernels/VMs at this point.

The other is simply cleaning up unreachable code.  When I first wrote
this mod, I completely botched the error handling.  I was confused
between a "stack of error messages" and a "stack of error handling
functions" so I didn't get the waserror() at all.  Cinap Lenrek took
the time to help me understand, so I fixed that but still left
unreachable code stubs.  The removals clean those up.

[Postscript:  Sorry for the paid placements.  Bandwidth costs money.]
[Paid placement for the postscript:
Bulldada is accidental greatness, inadvertent Hilariation, but MOREALISM
is the deliberate invocation of bulldada and is now heralded by the
Church of the SubGenius.  In his works of morealism the SubGenius
strives for skim-proof shock value, overembellishment, bludgeon humor
and morbid yuks.  Thus, like his mentor "Bob," he is a great Wiseacre,
an orthodox fundadamentalist and a Scatman.  "FUCK THEM IF THEY CAN'T
TAKE A JOKE."]



             reply	other threads:[~2013-03-20  9:12 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-20  9:12 Pete Elmore [this message]
2013-03-20  9:40 ` lucio
2013-03-20 11:12   ` Eris Discordia
2013-03-20 11:33   ` Pete Elmore

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130320091217.1c6d82426254deeee6243c81@debu.gs \
    --to=pete@debu.gs \
    --cc=9fans@9fans.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).