From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 21D3B79C4 for ; Mon, 6 Jan 2025 13:48:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736171325; cv=none; b=rwJUHh687Cwx/H2HZmb6TTWYAV9y/7zcIYnXtYXhtpMpoq46Chi1y7qfHFXWuBYXJkExClqaz74bSPvTn8350l60gs4JanqdcMpuvx58qHlwikGOFFLMV5+8O98pOKkRipF/Dew7QXVkU6+zsBZSLMjwjmxrXRJthqe9o4d5q+A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736171325; c=relaxed/simple; bh=zIptg8xsAZdPeocbIW5bMpe+dEeIij3kubbcyo7u2x8=; h=From:In-Reply-To:References:To:Cc:Subject:MIME-Version: Content-Type:Date:Message-ID; b=YPbzFW6KxvXYYedlckyQ60aUmWF1PG9my0Ri/cHDiDd2Ux+yMqFW7eLkp+pyMpjT8Q5OOAC9W/J9pjVnEU3qreC+j+QyJHeplBIi/1PrvO9IxhP+Fy2tXbB6OzpPhtXNXzi91E03ifCS+DundxuTb3ZNAxlPR4zx60NSRW+VcjY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=jIFlSsR6; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="jIFlSsR6" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1736171323; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=nP2fQLfpCXpYFD0UGO4yUP+mfXaL3DxjrctoLC9BFD4=; b=jIFlSsR6vmA+W2a8S46JLGJQj8IVT5+kz95D0juxi0wP/NwOzRAQXlkAbAWqyr4xuhq7jI tzQnus3xYhMqgCLsZN4SezKhrYg2IDGZ2a44o9+cgnfuH53o4Hshbqlkv8S9lUtxq0qy3J 9BfRdRxeQsKujob5VxbjrSVtVeYX7GY= Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-567-MOAM_oZbMJKNSzRr40KTHg-1; Mon, 06 Jan 2025 08:48:39 -0500 X-MC-Unique: MOAM_oZbMJKNSzRr40KTHg-1 X-Mimecast-MFC-AGG-ID: MOAM_oZbMJKNSzRr40KTHg Received: from mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.15]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 1A2D91955F41; Mon, 6 Jan 2025 13:48:38 +0000 (UTC) Received: from warthog.procyon.org.uk (unknown [10.42.28.12]) by mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 15105195608A; Mon, 6 Jan 2025 13:48:35 +0000 (UTC) Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells In-Reply-To: <20241226012616.2348907-1-lizhi.xu@windriver.com> References: <20241226012616.2348907-1-lizhi.xu@windriver.com> <676c7f0d.050a0220.2f3838.03bb.GAE@google.com> To: Lizhi Xu Cc: dhowells@redhat.com, syzbot+76f33569875eb708e575@syzkaller.appspotmail.com, linux-afs@lists.infradead.org, linux-kernel@vger.kernel.org, marc.dionne@auristor.com, syzkaller-bugs@googlegroups.com Subject: Re: [PATCH] afs: Merge preference rule failure condition Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <291911.1736171315.1@warthog.procyon.org.uk> Date: Mon, 06 Jan 2025 13:48:35 +0000 Message-ID: <291912.1736171315@warthog.procyon.org.uk> X-Scanned-By: MIMEDefang 3.0 on 10.30.177.15 Lizhi Xu wrote: > argc = afs_split_string(&buf, argv, ARRAY_SIZE(argv)); > - if (argc < 0) > - return argc; > if (argc < 2) > goto inval; I think this needs to be slightly different. afs_split_string() will print error messages and can return an error code, so we should go with that and set ret to argc and go to done, not inval. David