From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cjRrD-00046S-7C for barebox@lists.infradead.org; Thu, 02 Mar 2017 14:37:28 +0000 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= Date: Thu, 2 Mar 2017 15:37:03 +0100 Message-Id: <20170302143703.25167-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Sender: "barebox" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH] lseek: tighten error checking and allow negative offsets for SEEK_END To: barebox@lists.infradead.org U2lnbmVkLW9mZi1ieTogVXdlIEtsZWluZS1Lw7ZuaWcgPHUua2xlaW5lLWtvZW5pZ0BwZW5ndXRy b25peC5kZT4KLS0tCiBmcy9mcy5jIHwgNiArKysrLS0KIDEgZmlsZSBjaGFuZ2VkLCA0IGluc2Vy dGlvbnMoKyksIDIgZGVsZXRpb25zKC0pCgpkaWZmIC0tZ2l0IGEvZnMvZnMuYyBiL2ZzL2ZzLmMK aW5kZXggZTdiNjk2NTkxNDMzLi4xOTAxYzk0YWQxZWEgMTAwNjQ0Ci0tLSBhL2ZzL2ZzLmMKKysr IGIvZnMvZnMuYwpAQCAtOTEwLDYgKzkxMCw4IEBAIGxvZmZfdCBsc2VlayhpbnQgZmlsZGVzLCBs b2ZmX3Qgb2Zmc2V0LCBpbnQgd2hlbmNlKQogCWNhc2UgU0VFS19TRVQ6CiAJCWlmIChmLT5zaXpl ICE9IEZJTEVfU0laRV9TVFJFQU0gJiYgb2Zmc2V0ID4gZi0+c2l6ZSkKIAkJCWdvdG8gb3V0Owor CQlpZiAob2Zmc2V0IDwgMCkKKwkJCWdvdG8gb3V0O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