From a0be159e69d5bfdb31fa87943151437d03736683 Mon Sep 17 00:00:00 2001 From: Peter Daifuku Date: Thu, 17 Aug 2017 11:49:21 -0700 Subject: gpu: nvgpu: channel_worker_enqueue: warn to info gk20a_channel_worker_enqueue currently WARNS if the call to gk20a_channel_get fails. But in fact a failure here is legitimate, in particular if the channel is in the process of being freed, and the referenceable flag changed between the time the caller grabbed a reference to the channel and the time this function tries to grab its own reference. Instead, turn the warning into an info message. Bug 200329971 Change-Id: Iab4ca6b32bb98f42f05b12b7971538db962b9795 Signed-off-by: Peter Daifuku Reviewed-on: https://git-master.nvidia.com/r/1540458 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gk20a/channel_gk20a.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'drivers/gpu/nvgpu/gk20a') diff --git a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c index d96872f3..5f81b441 100644 --- a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c @@ -1903,10 +1903,13 @@ static void gk20a_channel_worker_enqueue(struct channel_gk20a *ch) /* * Ref released when this item gets processed. The caller should hold - * one ref already, so can't fail. + * one ref already, so normally shouldn't fail, but the channel could + * end up being freed between the time the caller got its reference and + * the time we end up here (e.g., if the client got killed); if so, just + * return. */ - if (WARN_ON(!gk20a_channel_get(ch))) { - nvgpu_warn(g, "cannot get ch ref for worker!"); + if (!gk20a_channel_get(ch)) { + nvgpu_info(g, "cannot get ch ref for worker!"); return; } -- cgit v1.2.2