Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnish-cache
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
varnishcache
varnish-cache
Commits
cf2c6b97
Commit
cf2c6b97
authored
Dec 03, 2013
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix a NULL pointer deref in LRU.
Spotted by: c0004x.vtc on slow machines.
parent
141001ef
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
1 deletion
+7
-1
cache_expire.c
bin/varnishd/cache/cache_expire.c
+2
-0
cache_fetch.c
bin/varnishd/cache/cache_fetch.c
+3
-1
cache_fetch_proc.c
bin/varnishd/cache/cache_fetch_proc.c
+1
-0
stevedore.c
bin/varnishd/storage/stevedore.c
+1
-0
No files found.
bin/varnishd/cache/cache_expire.c
View file @
cf2c6b97
...
...
@@ -331,6 +331,8 @@ EXP_NukeOne(struct busyobj *bo, struct lru *lru)
VSLb
(
bo
->
vsl
,
SLT_ExpKill
,
"LRU x=%u"
,
oc_getxid
(
bo
->
stats
,
oc
)
&
VSL_IDENTMASK
);
AN
(
bo
->
stats
);
AN
(
oc
);
(
void
)
HSH_DerefObjCore
(
bo
->
stats
,
&
oc
);
return
(
1
);
}
...
...
bin/varnishd/cache/cache_fetch.c
View file @
cf2c6b97
...
...
@@ -384,8 +384,8 @@ vbf_stp_fetch(struct worker *wrk, struct busyobj *bo)
bo
->
exp
.
keep
=
0
.
0
;
obj
=
STV_NewObject
(
bo
,
TRANSIENT_STORAGE
,
l
,
nhttp
);
}
bo
->
stats
=
NULL
;
if
(
obj
==
NULL
)
{
bo
->
stats
=
NULL
;
(
void
)
VFP_Error
(
bo
,
"Could not get storage"
);
VDI_CloseFd
(
&
bo
->
vbc
);
return
(
F_STP_DONE
);
...
...
@@ -459,6 +459,8 @@ vbf_stp_fetch(struct worker *wrk, struct busyobj *bo)
break
;
}
bo
->
stats
=
NULL
;
bo
->
t_body
=
VTIM_mono
();
if
(
bo
->
vbc
!=
NULL
)
{
...
...
bin/varnishd/cache/cache_fetch_proc.c
View file @
cf2c6b97
...
...
@@ -178,6 +178,7 @@ VFP_GetStorage(struct busyobj *bo, ssize_t sz)
if
(
st
!=
NULL
&&
st
->
len
<
st
->
space
)
return
(
st
);
AN
(
bo
->
stats
);
l
=
fetchfrag
;
if
(
l
==
0
)
l
=
sz
;
...
...
bin/varnishd/storage/stevedore.c
View file @
cf2c6b97
...
...
@@ -202,6 +202,7 @@ stv_alloc_obj(struct busyobj *bo, size_t size)
* Always use the stevedore which allocated the object in order to
* keep an object inside the same stevedore.
*/
AN
(
bo
->
stats
);
CHECK_OBJ_NOTNULL
(
bo
,
BUSYOBJ_MAGIC
);
obj
=
bo
->
fetch_obj
;
CHECK_OBJ_NOTNULL
(
obj
,
OBJECT_MAGIC
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment