Lines Matching refs:zero

4  * underflow, reaching zero untested, etc).
67 pr_warn("Weird: refcount_inc_not_zero() reported zero\n");
79 pr_warn("Weird: refcount_add_not_zero() reported zero\n");
94 pr_warn("Still at zero: refcount_inc/add() must not inc-from-0\n");
103 * zero it should either saturate (when inc-from-zero isn't protected)
104 * or stay at zero (when inc-from-zero is protected) and should WARN for both.
108 refcount_t zero = REFCOUNT_INIT(2);
111 refcount_dec(&zero);
113 pr_info("attempting bad refcount_dec() to zero\n");
114 refcount_dec(&zero);
116 check_zero(&zero);
124 * looking only at zero-pinning.
149 pr_info("attempting bad refcount_dec() below zero\n");
163 pr_info("attempting bad refcount_dec_and_test() below zero\n");
165 pr_warn("Weird: refcount_dec_and_test() reported zero\n");
178 pr_info("attempting bad refcount_sub_and_test() below zero\n");
180 pr_warn("Weird: refcount_sub_and_test() reported zero\n");
186 * A refcount_sub_and_test() by zero when the counter is at zero should act like
193 pr_info("attempting bad refcount_sub_and_test() at zero\n");
195 pr_warn("Weird: refcount_sub_and_test() reported zero\n");
204 pr_info("Zero detected: stayed at zero\n");
213 pr_info("Fail: zero not detected, incremented to %d\n",
219 * A refcount_inc() from zero should pin to zero or saturate and may WARN.
223 refcount_t zero = REFCOUNT_INIT(0);
225 pr_info("attempting safe refcount_inc_not_zero() from zero\n");
226 if (!refcount_inc_not_zero(&zero)) {
227 pr_info("Good: zero detected\n");
228 if (refcount_read(&zero) == 0)
229 pr_info("Correctly stayed at zero\n");
231 pr_err("Fail: refcount went past zero!\n");
236 pr_info("attempting bad refcount_inc() from zero\n");
237 refcount_inc(&zero);
239 check_from_zero(&zero);
244 * at zero.
248 refcount_t zero = REFCOUNT_INIT(0);
250 pr_info("attempting safe refcount_add_not_zero() from zero\n");
251 if (!refcount_add_not_zero(3, &zero)) {
252 pr_info("Good: zero detected\n");
253 if (refcount_read(&zero) == 0)
254 pr_info("Correctly stayed at zero\n");
256 pr_err("Fail: refcount went past zero\n");
261 pr_info("attempting bad refcount_add() from zero\n");
262 refcount_add(3, &zero);
264 check_from_zero(&zero);
324 pr_warn("Weird: refcount_inc_not_zero() reported zero\n");
336 pr_warn("Weird: refcount_add_not_zero() reported zero\n");
348 pr_warn("Weird: refcount_dec_and_test() reported zero\n");
360 pr_warn("Weird: refcount_sub_and_test() reported zero\n");